1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
6 # rjones <rjones@redhat.com>, 2011.
7 # <www.carrotsoft@gmail.com>, 2011.
10 "Project-Id-Version: libguestfs\n"
11 "Report-Msgid-Bugs-To: https://bugzilla.redhat.com/\n"
12 "POT-Creation-Date: 2011-10-26 21:10+0200\n"
13 "PO-Revision-Date: 2011-10-27 09:15+0000\n"
14 "Last-Translator: rjones <rjones@redhat.com>\n"
15 "Language-Team: Japanese <trans-ja@lists.fedoraproject.org>\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
20 "Plural-Forms: nplurals=1; plural=0\n"
23 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3
24 #: ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3
25 #: ../clone/virt-sysprep.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3
26 #: ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3
27 #: ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3
28 #: ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3
29 #: ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3
30 #: ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3
31 #: ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3
32 #: ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3
33 #: ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3
34 #: ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3
35 #: ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3
36 #: ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30
37 #: ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31
38 #: ../tools/virt-win-reg.pl:35
43 #: ../align/virt-alignment-scan.pod:5
44 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
48 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7
49 #: ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7
50 #: ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7
51 #: ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7
52 #: ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7
53 #: ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7
54 #: ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7
55 #: ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7
56 #: ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7
57 #: ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7
58 #: ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7
59 #: ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7
60 #: ../test-tool/libguestfs-test-tool.pod:7
61 #: ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34
62 #: ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35
63 #: ../tools/virt-win-reg.pl:39
68 #: ../align/virt-alignment-scan.pod:9
71 " virt-alignment-scan [--options] -d domname\n"
76 #: ../align/virt-alignment-scan.pod:11
79 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
84 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19
85 #: ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19
86 #: ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27
87 #: ../erlang/examples/guestfs-erlang.pod:16
88 #: ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18
89 #: ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19
90 #: ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21
91 #: ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20
92 #: ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15
93 #: ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18
94 #: ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29
95 #: ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15
96 #: ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23
97 #: ../test-tool/libguestfs-test-tool.pod:11
98 #: ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40
99 #: ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77
100 #: ../tools/virt-win-reg.pl:63
105 #: ../align/virt-alignment-scan.pod:15
107 "When older operating systems install themselves, the partitioning tools "
108 "place partitions at a sector misaligned with the underlying storage "
109 "(commonly the first partition starts on sector C<63>). Misaligned "
110 "partitions can result in an operating system issuing more I/O than should be"
115 #: ../align/virt-alignment-scan.pod:21
117 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
118 "machines and disk images and warns you if there are alignment problems."
122 #: ../align/virt-alignment-scan.pod:25
124 "Currently there is no virt tool for fixing alignment problems. You can only"
125 " reinstall the guest operating system. The following NetApp document "
126 "summarises the problem and possible solutions: "
127 "L<http://media.netapp.com/documents/tr-3747.pdf>"
131 #: ../align/virt-alignment-scan.pod:30
136 #: ../align/virt-alignment-scan.pod:32
137 msgid "To run this tool on a disk image directly, use the I<-a> option:"
141 #: ../align/virt-alignment-scan.pod:34
144 " $ virt-alignment-scan -a winxp.img\n"
145 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
150 #: ../align/virt-alignment-scan.pod:37
153 " $ virt-alignment-scan -a fedora16.img\n"
154 " /dev/sda1 1048576 1024K ok\n"
155 " /dev/sda2 2097152 2048K ok\n"
156 " /dev/sda3 526385152 2048K ok\n"
161 #: ../align/virt-alignment-scan.pod:42
163 "To run the tool on a guest known to libvirt, use the I<-d> option and "
164 "possibly the I<-c> option:"
168 #: ../align/virt-alignment-scan.pod:45
171 " # virt-alignment-scan -d RHEL5\n"
172 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
173 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
178 #: ../align/virt-alignment-scan.pod:49
181 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
182 " /dev/sda1 1048576 1024K ok\n"
183 " /dev/sda2 105906176 1024K ok\n"
184 " /dev/sdb1 65536 64K ok\n"
189 #: ../align/virt-alignment-scan.pod:54
191 "The output consists of 4 or more whitespace-separated columns. Only the "
192 "first 4 columns are signficant if you want to parse this from a program. "
197 #: ../align/virt-alignment-scan.pod:60
202 #: ../align/virt-alignment-scan.pod:62
204 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
205 "on the first block device)"
209 #: ../align/virt-alignment-scan.pod:65
214 #: ../align/virt-alignment-scan.pod:67
215 msgid "the start of the partition in bytes"
219 #: ../align/virt-alignment-scan.pod:69
224 #: ../align/virt-alignment-scan.pod:71
225 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
229 #: ../align/virt-alignment-scan.pod:73
234 #: ../align/virt-alignment-scan.pod:75
236 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
237 "can cause performance problems"
241 #: ../align/virt-alignment-scan.pod:78
246 #: ../align/virt-alignment-scan.pod:80
247 msgid "optional free-text explanation."
251 #: ../align/virt-alignment-scan.pod:84
253 "The exit code from the program changes depending on whether poorly aligned "
254 "partitions were found. See L</EXIT STATUS> below."
258 #: ../align/virt-alignment-scan.pod:87
259 msgid "If you just want the exit code with no output, use the I<-q> option."
263 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62
264 #: ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261
265 #: ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62
266 #: ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45
267 #: ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42
268 #: ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92
269 #: ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84
270 #: ../resize/virt-resize.pod:262 ../sparsify/virt-sparsify.pod:99
271 #: ../test-tool/libguestfs-test-tool.pod:36
272 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54
273 #: ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103
274 #: ../tools/virt-win-reg.pl:96
279 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66
280 #: ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265
281 #: ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66
282 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160
283 #: ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88
284 #: ../resize/virt-resize.pod:266 ../sparsify/virt-sparsify.pod:103
285 #: ../test-tool/libguestfs-test-tool.pod:40
286 #: ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62
287 #: ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111
288 #: ../tools/virt-win-reg.pl:104
293 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68
294 #: ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267
295 #: ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68
296 #: ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90
297 #: ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64
298 #: ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113
299 #: ../tools/virt-win-reg.pl:106
300 msgid "Display brief help."
304 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70
305 #: ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269
306 #: ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70
307 #: ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92
312 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72
313 #: ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271
314 #: ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72
315 #: ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94
316 msgid "B<--add> file"
320 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
321 msgid "Add I<file> which should be a disk image from a virtual machine."
325 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78
326 #: ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277
327 #: ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78
328 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102
329 #: ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100
331 "The format of the disk image is auto-detected. To override this and force a"
332 " particular format use the I<--format=..> option."
336 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81
337 #: ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291
338 #: ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78
339 #: ../rescue/virt-rescue.pod:107
344 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83
345 #: ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293
346 #: ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80
347 #: ../rescue/virt-rescue.pod:109
348 msgid "B<--connect> URI"
352 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85
353 #: ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295
354 #: ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99
355 #: ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111
356 #: ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82
357 #: ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
359 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
360 "to the default libvirt hypervisor."
364 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88
365 #: ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298
366 #: ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85
367 #: ../rescue/virt-rescue.pod:114
369 "If you specify guest block devices directly (I<-a>), then libvirt is not "
374 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91
375 #: ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307
376 #: ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105
377 #: ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117
382 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93
383 #: ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309
384 #: ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107
385 #: ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119
386 msgid "B<--domain> guest"
390 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95
391 #: ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311
392 #: ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109
393 #: ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121
395 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
400 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105
401 #: ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328
402 #: ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101
403 #: ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142
404 #: ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124
405 msgid "B<--format=raw|qcow2|..>"
409 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107
410 #: ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330
411 #: ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103
412 #: ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235
413 #: ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101
414 #: ../rescue/virt-rescue.pod:126
419 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109
420 #: ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332
421 #: ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105
422 #: ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237
423 #: ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:128
425 "The default for the I<-a> option is to auto-detect the format of the disk "
426 "image. Using this forces the disk format for I<-a> options which follow on "
427 "the command line. Using I<--format> with no argument switches back to auto-"
428 "detection for subsequent I<-a> options."
432 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114
433 #: ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337
434 #: ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110
435 #: ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242
436 #: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336
437 #: ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2877
442 #: ../align/virt-alignment-scan.pod:134
445 " virt-alignment-scan --format=raw -a disk.img\n"
450 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118
451 #: ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341
452 #: ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114
453 #: ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246
454 #: ../rescue/virt-rescue.pod:137
455 msgid "forces raw format (no auto-detection) for C<disk.img>."
459 #: ../align/virt-alignment-scan.pod:138
462 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
467 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122
468 #: ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345
469 #: ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118
470 #: ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250
471 #: ../rescue/virt-rescue.pod:141
473 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
474 "detection for C<another.img>."
478 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125
479 #: ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348
480 #: ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121
481 #: ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144
483 "If you have untrusted raw-format guest disk images, you should use this "
484 "option to specify the disk format. This avoids a possible security problem "
485 "with malicious guests (CVE-2010-3851)."
489 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:491
490 #: ../sparsify/virt-sparsify.pod:153
495 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:493
496 #: ../sparsify/virt-sparsify.pod:155
501 #: ../align/virt-alignment-scan.pod:151
503 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
508 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134
509 #: ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425
510 #: ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173
511 #: ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390
512 #: ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119
513 #: ../rescue/virt-rescue.pod:182 ../sparsify/virt-sparsify.pod:159
518 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136
519 #: ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427
520 #: ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175
521 #: ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392
522 #: ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121
523 #: ../rescue/virt-rescue.pod:184 ../sparsify/virt-sparsify.pod:161
528 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138
529 #: ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429
530 #: ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177
531 #: ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123
532 #: ../rescue/virt-rescue.pod:186 ../sparsify/virt-sparsify.pod:163
533 msgid "Enable verbose messages for debugging."
537 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140
538 #: ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431
539 #: ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179
540 #: ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397
541 #: ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125
542 #: ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:561
543 #: ../sparsify/virt-sparsify.pod:165
548 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142
549 #: ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433
550 #: ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181
551 #: ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399
552 #: ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127
553 #: ../rescue/virt-rescue.pod:190 ../resize/virt-resize.pod:563
554 #: ../sparsify/virt-sparsify.pod:167 ../tools/virt-list-filesystems.pl:69
555 #: ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169
556 #: ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
561 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144
562 #: ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435
563 #: ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183
564 #: ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129
565 #: ../rescue/virt-rescue.pod:192 ../resize/virt-resize.pod:565
566 #: ../sparsify/virt-sparsify.pod:169 ../tools/virt-list-filesystems.pl:71
567 #: ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171
568 #: ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
569 msgid "Display version number and exit."
573 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146
574 #: ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437
575 #: ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185
576 #: ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412
577 #: ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131
578 #: ../rescue/virt-rescue.pod:203 ../sparsify/virt-sparsify.pod:171
579 #: ../tools/virt-tar.pl:158
584 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148
585 #: ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439
586 #: ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187
587 #: ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133
588 #: ../rescue/virt-rescue.pod:205 ../sparsify/virt-sparsify.pod:173
589 msgid "Enable tracing of libguestfs API calls."
593 #: ../align/virt-alignment-scan.pod:172
594 msgid "RECOMMENDED ALIGNMENT"
598 #: ../align/virt-alignment-scan.pod:174
600 "Operating systems older than Windows 2008 and Linux before ca.2010 place the"
601 " first sector of the first partition at sector 63, with a 512 byte sector "
602 "size. This happens because of a historical accident. Drives have to report"
603 " a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
604 "completely meaningless on modern drives, but it happens that the geometry "
605 "reported always has 63 sectors per track. The operating system therefore "
606 "places the first partition at the start of the second \"track\", at sector "
611 #: ../align/virt-alignment-scan.pod:183
613 "When the guest OS is virtualized, the host operating system and hypervisor "
614 "may prefer accesses aligned to one of:"
618 #: ../align/virt-alignment-scan.pod:188
623 #: ../align/virt-alignment-scan.pod:190
625 "if the host OS uses local storage directly on hard drive partitions, and the"
626 " hard drive has 512 byte physical sectors."
630 #: ../align/virt-alignment-scan.pod:193
635 #: ../align/virt-alignment-scan.pod:195
637 "for local storage on new hard drives with 4Kbyte physical sectors; for file-"
638 "backed storage on filesystems with 4Kbyte block size; or for some types of "
639 "network-attached storage."
643 #: ../align/virt-alignment-scan.pod:199
648 #: ../align/virt-alignment-scan.pod:201
650 "for high-end network-attached storage. This is the optimal block size for "
651 "some NetApp hardware."
655 #: ../align/virt-alignment-scan.pod:204
660 #: ../align/virt-alignment-scan.pod:206
661 msgid "see L</1 MB PARTITION ALIGNMENT> below."
665 #: ../align/virt-alignment-scan.pod:210
667 "Partitions which are not aligned correctly to the underlying storage cause "
668 "extra I/O. For example:"
672 #: ../align/virt-alignment-scan.pod:213
676 " +--------------------------+------\n"
678 " | filesystem block |\n"
679 " ---+------------------+------+-------------------+-----+---\n"
680 " | host block | host block |\n"
682 " ---+-------------------------+-------------------------+---\n"
687 #: ../align/virt-alignment-scan.pod:222
689 "In this example, each time a 4K guest block is read, two blocks on the host "
690 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
691 "written, two host blocks must first be read, the old and new data combined, "
692 "and the two blocks written back (4x I/O)."
696 #: ../align/virt-alignment-scan.pod:227
697 msgid "LINUX HOST BLOCK AND I/O SIZE"
701 #: ../align/virt-alignment-scan.pod:229
703 "New versions of the Linux kernel expose the physical and logical block size,"
704 " and minimum and recommended I/O size."
708 #: ../align/virt-alignment-scan.pod:232
709 msgid "For a typical hard drive with 512 byte sectors:"
713 #: ../align/virt-alignment-scan.pod:234
716 " $ cat /sys/block/sda/queue/physical_block_size\n"
718 " $ cat /sys/block/sda/queue/logical_block_size\n"
720 " $ cat /sys/block/sda/queue/minimum_io_size\n"
722 " $ cat /sys/block/sda/queue/optimal_io_size\n"
728 #: ../align/virt-alignment-scan.pod:243
729 msgid "For a NetApp LUN:"
733 #: ../align/virt-alignment-scan.pod:245
736 " $ cat /sys/block/sdc/queue/logical_block_size\n"
738 " $ cat /sys/block/sdc/queue/physical_block_size\n"
740 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
742 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
748 #: ../align/virt-alignment-scan.pod:254
750 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
751 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
755 #: ../align/virt-alignment-scan.pod:258
757 "For detailed information about what these numbers mean, see "
758 "L<http://docs.redhat.com/docs/en-"
759 "US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newstorage-"
764 #: ../align/virt-alignment-scan.pod:261
766 "[Thanks to Mike Snitzer for providing NetApp data and additional "
771 #: ../align/virt-alignment-scan.pod:264
772 msgid "1 MB PARTITION ALIGNMENT"
776 #: ../align/virt-alignment-scan.pod:266
778 "Microsoft picked 1 MB as the default alignment for all partitions starting "
779 "with Windows 2008 Server, and Linux has followed this."
783 #: ../align/virt-alignment-scan.pod:269
785 "Assuming 512 byte sectors in the guest, you will now see the first partition"
786 " starting at sector 2048, and subsequent partitions (if any) will start at "
787 "a multiple of 2048 sectors."
791 #: ../align/virt-alignment-scan.pod:273
793 "1 MB alignment is compatible with all current alignment requirements (4K, "
794 "64K) and provides room for future growth in physical block sizes."
798 #: ../align/virt-alignment-scan.pod:276
799 msgid "SETTING ALIGNMENT"
803 #: ../align/virt-alignment-scan.pod:278
805 "L<virt-resize(1)> can change the alignment of the partitions of some guests."
806 " Currently it can fully align all the partitions of all Windows guests, and"
807 " it will fix the bootloader where necessary. For Linux guests, it can align"
808 " the second and subsequent partitions, so the majority of OS accesses except"
809 " at boot will be aligned."
813 #: ../align/virt-alignment-scan.pod:284
815 "Another way to correct partition alignment problems is to reinstall your "
816 "guest operating systems. If you install operating systems from templates, "
817 "ensure these have correct partition alignment too."
821 #: ../align/virt-alignment-scan.pod:288
823 "For older versions of Windows, the following NetApp document contains useful"
824 " information: L<http://media.netapp.com/documents/tr-3747.pdf>"
828 #: ../align/virt-alignment-scan.pod:291
830 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
831 "an explicit C<%pre> section that creates aligned partitions using "
832 "L<parted(8)>. Do not use the Kickstart C<part> command. The NetApp "
833 "document above contains an example."
837 #: ../align/virt-alignment-scan.pod:296 ../cat/virt-cat.pod:231
838 #: ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483
839 #: ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215
840 #: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352
841 #: ../rescue/virt-rescue.pod:266 ../resize/virt-resize.pod:676
842 #: ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258
843 #: ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289
844 #: ../tools/virt-win-reg.pl:744
845 msgid "SHELL QUOTING"
849 #: ../align/virt-alignment-scan.pod:298 ../cat/virt-cat.pod:233
850 #: ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485
851 #: ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217
852 #: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354
853 #: ../rescue/virt-rescue.pod:268 ../resize/virt-resize.pod:678
854 #: ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260
855 #: ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291
856 #: ../tools/virt-win-reg.pl:752
858 "Libvirt guest names can contain arbitrary characters, some of which have "
859 "meaning to the shell such as C<#> and space. You may need to quote or "
860 "escape these characters on the command line. See the shell manual page "
861 "L<sh(1)> for details."
865 #: ../align/virt-alignment-scan.pod:303 ../cat/virt-cat.pod:238
866 #: ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490
867 #: ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222
868 #: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114
869 #: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:375
870 #: ../resize/virt-resize.pod:683 ../sparsify/virt-sparsify.pod:227
871 #: ../test-tool/libguestfs-test-tool.pod:90
876 #: ../align/virt-alignment-scan.pod:305
877 msgid "This program returns:"
881 #: ../align/virt-alignment-scan.pod:309 ../align/virt-alignment-scan.pod:315
882 #: ../align/virt-alignment-scan.pod:321 ../align/virt-alignment-scan.pod:328
883 #: ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187
884 #: ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202
885 #: ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287
886 #: ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295
887 #: ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314
888 #: ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322
889 #: ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362
890 #: ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388
891 #: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266
892 #: ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276
893 #: ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291
894 #: ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102
895 #: ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132
896 #: ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227
897 #: ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235
898 #: ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243
899 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
900 #: ../fish/guestfish-actions.pod:441 ../fish/guestfish-actions.pod:449
901 #: ../fish/guestfish-actions.pod:456 ../fish/guestfish-actions.pod:463
902 #: ../fish/guestfish-actions.pod:1262 ../fish/guestfish-actions.pod:1266
903 #: ../fish/guestfish-actions.pod:1270 ../fish/guestfish-actions.pod:1274
904 #: ../fish/guestfish-actions.pod:1282 ../fish/guestfish-actions.pod:1286
905 #: ../fish/guestfish-actions.pod:1290 ../fish/guestfish-actions.pod:1300
906 #: ../fish/guestfish-actions.pod:1304 ../fish/guestfish-actions.pod:1308
907 #: ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:1402
908 #: ../fish/guestfish-actions.pod:1407 ../fish/guestfish-actions.pod:1412
909 #: ../fish/guestfish-actions.pod:1454 ../fish/guestfish-actions.pod:1458
910 #: ../fish/guestfish-actions.pod:1463 ../fish/guestfish-actions.pod:1719
911 #: ../fish/guestfish-actions.pod:1726 ../fish/guestfish-actions.pod:1733
912 #: ../fish/guestfish-actions.pod:2136 ../fish/guestfish-actions.pod:2142
913 #: ../fish/guestfish-actions.pod:2150 ../fish/guestfish-actions.pod:2157
914 #: ../fish/guestfish-actions.pod:2164 ../fish/guestfish.pod:445
915 #: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
916 #: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393
917 #: ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:359
918 #: ../resize/virt-resize.pod:363 ../resize/virt-resize.pod:372
919 #: ../resize/virt-resize.pod:378 ../sparsify/virt-sparsify.pod:32
920 #: ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43
921 #: ../sparsify/virt-sparsify.pod:49 ../sparsify/virt-sparsify.pod:54
922 #: ../sparsify/virt-sparsify.pod:58 ../sparsify/virt-sparsify.pod:64
923 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29
924 #: ../src/guestfs-actions.pod:641 ../src/guestfs-actions.pod:649
925 #: ../src/guestfs-actions.pod:656 ../src/guestfs-actions.pod:663
926 #: ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2075
927 #: ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2083
928 #: ../src/guestfs-actions.pod:2091 ../src/guestfs-actions.pod:2095
929 #: ../src/guestfs-actions.pod:2099 ../src/guestfs-actions.pod:2109
930 #: ../src/guestfs-actions.pod:2113 ../src/guestfs-actions.pod:2117
931 #: ../src/guestfs-actions.pod:2255 ../src/guestfs-actions.pod:2259
932 #: ../src/guestfs-actions.pod:2264 ../src/guestfs-actions.pod:2269
933 #: ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:2334
934 #: ../src/guestfs-actions.pod:2339 ../src/guestfs-actions.pod:2754
935 #: ../src/guestfs-actions.pod:2761 ../src/guestfs-actions.pod:2768
936 #: ../src/guestfs-actions.pod:3313 ../src/guestfs-actions.pod:3319
937 #: ../src/guestfs-actions.pod:3327 ../src/guestfs-actions.pod:3334
938 #: ../src/guestfs-actions.pod:3341 ../src/guestfs.pod:403
939 #: ../src/guestfs.pod:408 ../src/guestfs.pod:413 ../src/guestfs.pod:417
940 #: ../src/guestfs.pod:422 ../src/guestfs.pod:426 ../src/guestfs.pod:431
941 #: ../src/guestfs.pod:436 ../src/guestfs.pod:1109 ../src/guestfs.pod:1113
942 #: ../src/guestfs.pod:1117 ../src/guestfs.pod:1122 ../src/guestfs.pod:1130
943 #: ../src/guestfs.pod:1149 ../src/guestfs.pod:1157 ../src/guestfs.pod:1179
944 #: ../src/guestfs.pod:1183 ../src/guestfs.pod:1187 ../src/guestfs.pod:1191
945 #: ../src/guestfs.pod:1195 ../src/guestfs.pod:1199 ../src/guestfs.pod:1689
946 #: ../src/guestfs.pod:1694 ../src/guestfs.pod:1698 ../src/guestfs.pod:1800
947 #: ../src/guestfs.pod:1805 ../src/guestfs.pod:1809 ../src/guestfs.pod:1819
948 #: ../src/guestfs.pod:2108 ../src/guestfs.pod:2113 ../src/guestfs.pod:2119
949 #: ../src/guestfs.pod:2127 ../src/guestfs.pod:2645 ../src/guestfs.pod:2651
950 #: ../src/guestfs.pod:2656 ../src/guestfs.pod:2662 ../src/guestfs.pod:3062
951 #: ../src/guestfs.pod:3067 ../src/guestfs.pod:3071 ../src/guestfs.pod:3075
952 #: ../src/guestfs.pod:3079 ../src/guestfs.pod:3093 ../src/guestfs.pod:3098
953 #: ../src/guestfs.pod:3329 ../src/guestfs.pod:3333 ../src/guestfs.pod:3337
954 #: ../src/guestfs.pod:3341 ../tools/virt-win-reg.pl:197
955 #: ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208
956 #: ../tools/virt-win-reg.pl:721 ../tools/virt-win-reg.pl:727
957 #: ../tools/virt-win-reg.pl:733
962 #: ../align/virt-alignment-scan.pod:311
967 #: ../align/virt-alignment-scan.pod:313
969 "successful exit, all partitions are aligned E<ge> 64K for best performance"
973 #: ../align/virt-alignment-scan.pod:317
978 #: ../align/virt-alignment-scan.pod:319
979 msgid "an error scanning the disk image or guest"
983 #: ../align/virt-alignment-scan.pod:323
988 #: ../align/virt-alignment-scan.pod:325
990 "successful exit, some partitions have alignment E<lt> 64K which can result "
991 "in poor performance on high end network storage"
995 #: ../align/virt-alignment-scan.pod:330
1000 #: ../align/virt-alignment-scan.pod:332
1002 "successful exit, some partitions have alignment E<lt> 4K which can result in"
1003 " poor performance on most hypervisors"
1007 #: ../align/virt-alignment-scan.pod:337 ../cat/virt-cat.pod:243
1008 #: ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495
1009 #: ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:227
1010 #: ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97
1011 #: ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384
1012 #: ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50
1013 #: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47
1014 #: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317
1015 #: ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45
1016 #: ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39
1017 #: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288
1018 #: ../resize/virt-resize.pod:688 ../ruby/examples/guestfs-ruby.pod:36
1019 #: ../sparsify/virt-sparsify.pod:251 ../src/guestfs.pod:3270
1020 #: ../test-tool/libguestfs-test-tool.pod:100
1021 #: ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265
1022 #: ../tools/virt-make-fs.pl:557 ../tools/virt-tar.pl:296
1023 #: ../tools/virt-win-reg.pl:757
1028 #: ../align/virt-alignment-scan.pod:339
1030 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, L"
1031 "<virt-resize(1)>, L<http://libguestfs.org/>."
1035 #: ../align/virt-alignment-scan.pod:346 ../cat/virt-cat.pod:252
1036 #: ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:507
1037 #: ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:235
1038 #: ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:296
1039 #: ../resize/virt-resize.pod:711 ../sparsify/virt-sparsify.pod:264
1040 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277
1041 #: ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:311
1042 #: ../tools/virt-win-reg.pl:783
1047 #: ../align/virt-alignment-scan.pod:348 ../cat/virt-cat.pod:254
1048 #: ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509
1049 #: ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237
1050 #: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395
1051 #: ../rescue/virt-rescue.pod:298 ../resize/virt-resize.pod:713
1052 #: ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210
1053 #: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584
1054 #: ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
1055 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
1059 #: ../align/virt-alignment-scan.pod:350 ../cat/virt-cat.pod:256
1060 #: ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511
1061 #: ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:239
1062 #: ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114
1063 #: ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401
1064 #: ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64
1065 #: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62
1066 #: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332
1067 #: ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62
1068 #: ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56
1069 #: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300
1070 #: ../resize/virt-resize.pod:715 ../ruby/examples/guestfs-ruby.pod:52
1071 #: ../sparsify/virt-sparsify.pod:268 ../src/guestfs.pod:3352
1072 #: ../test-tool/libguestfs-test-tool.pod:110
1073 #: ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281
1074 #: ../tools/virt-make-fs.pl:586 ../tools/virt-tar.pl:315
1075 #: ../tools/virt-win-reg.pl:787
1080 #: ../align/virt-alignment-scan.pod:352 ../clone/virt-sysprep.pod:507
1081 #: ../sparsify/virt-sparsify.pod:270
1082 msgid "Copyright (C) 2011 Red Hat Inc."
1086 #: ../align/virt-alignment-scan.pod:354 ../cat/virt-cat.pod:260
1087 #: ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515
1088 #: ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:243
1089 #: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305
1090 #: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58
1091 #: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60
1092 #: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:407
1093 #: ../rescue/virt-rescue.pod:304 ../resize/virt-resize.pod:719
1094 #: ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115
1095 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
1096 #: ../tools/virt-make-fs.pl:590 ../tools/virt-tar.pl:319
1097 #: ../tools/virt-win-reg.pl:791
1099 "This program is free software; you can redistribute it and/or modify it "
1100 "under the terms of the GNU General Public License as published by the Free "
1101 "Software Foundation; either version 2 of the License, or (at your option) "
1102 "any later version."
1106 #: ../align/virt-alignment-scan.pod:359 ../cat/virt-cat.pod:265
1107 #: ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520
1108 #: ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:248
1109 #: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310
1110 #: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63
1111 #: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65
1112 #: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:412
1113 #: ../rescue/virt-rescue.pod:309 ../resize/virt-resize.pod:724
1114 #: ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120
1115 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
1116 #: ../tools/virt-make-fs.pl:595 ../tools/virt-tar.pl:324
1117 #: ../tools/virt-win-reg.pl:796
1119 "This program is distributed in the hope that it will be useful, but WITHOUT "
1120 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
1121 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
1126 #: ../align/virt-alignment-scan.pod:364 ../cat/virt-cat.pod:270
1127 #: ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525
1128 #: ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:253
1129 #: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315
1130 #: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68
1131 #: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70
1132 #: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:417
1133 #: ../rescue/virt-rescue.pod:314 ../resize/virt-resize.pod:729
1134 #: ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125
1135 #: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
1136 #: ../tools/virt-make-fs.pl:600 ../tools/virt-tar.pl:329
1137 #: ../tools/virt-win-reg.pl:801
1139 "You should have received a copy of the GNU General Public License along with"
1140 " this program; if not, write to the Free Software Foundation, Inc., 675 Mass"
1141 " Ave, Cambridge, MA 02139, USA."
1145 #: ../cat/virt-cat.pod:5
1146 msgid "virt-cat - Display files in a virtual machine"
1150 #: ../cat/virt-cat.pod:9
1153 " virt-cat [--options] -d domname file [file ...]\n"
1158 #: ../cat/virt-cat.pod:11
1161 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
1166 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15
1167 #: ../inspector/virt-inspector.pod:13
1172 #: ../cat/virt-cat.pod:15
1175 " virt-cat domname file\n"
1180 #: ../cat/virt-cat.pod:17
1183 " virt-cat disk.img file\n"
1188 #: ../cat/virt-cat.pod:21
1190 "C<virt-cat> is a command line tool to display the contents of C<file> where "
1191 "C<file> exists in the named virtual machine (or disk image)."
1195 #: ../cat/virt-cat.pod:24
1197 "Multiple filenames can be given, in which case they are concatenated "
1198 "together. Each filename must be a full path, starting at the root directory"
1199 " (starting with '/')."
1203 #: ../cat/virt-cat.pod:28
1205 "C<virt-cat> can be used to quickly view a file. To edit a file, use C<virt-"
1206 "edit>. For more complex cases you should look at the L<guestfish(1)> tool "
1207 "(see L</USING GUESTFISH> below)."
1211 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43
1212 #: ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41
1213 #: ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29
1214 #: ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30
1215 #: ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39
1216 #: ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75
1217 #: ../tools/virt-tar.pl:50
1222 #: ../cat/virt-cat.pod:34
1224 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
1228 #: ../cat/virt-cat.pod:37
1231 " virt-cat -d mydomain /etc/fstab\n"
1236 #: ../cat/virt-cat.pod:39
1237 msgid "List syslog messages from a VM disk image file:"
1241 #: ../cat/virt-cat.pod:41
1244 " virt-cat -a disk.img /var/log/messages | tail\n"
1249 #: ../cat/virt-cat.pod:43
1250 msgid "Find out what DHCP IP address a VM acquired:"
1254 #: ../cat/virt-cat.pod:45
1257 " virt-cat -d mydomain /var/log/messages | \\\n"
1258 " grep 'dhclient: bound to' | tail\n"
1263 #: ../cat/virt-cat.pod:48
1264 msgid "Find out what packages were recently installed:"
1268 #: ../cat/virt-cat.pod:50
1271 " virt-cat -d mydomain /var/log/yum.log | tail\n"
1276 #: ../cat/virt-cat.pod:52
1277 msgid "Find out who is logged on inside a virtual machine:"
1281 #: ../cat/virt-cat.pod:54
1284 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
1290 #: ../cat/virt-cat.pod:57
1291 msgid "or who was logged on:"
1295 #: ../cat/virt-cat.pod:59
1298 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
1299 " last -f /tmp/wtmp\n"
1304 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103
1305 #: ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74
1306 #: ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
1308 "Add I<file> which should be a disk image from a virtual machine. If the "
1309 "virtual machine has multiple block devices, you must supply all of them with"
1310 " separate I<-a> options."
1314 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148
1315 #: ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217
1316 #: ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
1317 msgid "B<--echo-keys>"
1321 #: ../cat/virt-cat.pod:100
1323 "When prompting for keys and passphrases, virt-cat normally turns echoing off"
1324 " so you cannot see what you are typing. If you are not worried about "
1325 "Tempest attacks and there is no one else in the room you can specify this "
1326 "flag to see what you are typing."
1330 #: ../cat/virt-cat.pod:116
1333 " virt-cat --format=raw -a disk.img file\n"
1338 #: ../cat/virt-cat.pod:120
1341 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
1346 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200
1347 #: ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289
1348 #: ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
1349 msgid "B<--keys-from-stdin>"
1353 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202
1354 #: ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291
1355 #: ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1357 "Read key or passphrase parameters from stdin. The default is to try to read"
1358 " passphrases from the user by opening C</dev/tty>."
1362 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
1363 #: ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:209
1364 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1368 #: ../cat/virt-cat.pod:154
1369 msgid "Previous versions of virt-cat allowed you to write either:"
1373 #: ../cat/virt-cat.pod:156
1376 " virt-cat disk.img [disk.img ...] file\n"
1381 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
1382 #: ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:215
1387 #: ../cat/virt-cat.pod:160
1390 " virt-cat guestname file\n"
1395 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
1396 #: ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:219
1398 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1399 "the confusing case where a disk image might have the same name as a guest."
1403 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
1404 #: ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:223
1405 msgid "For compatibility the old style is still supported."
1409 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
1410 msgid "WINDOWS PATHS"
1414 #: ../cat/virt-cat.pod:170
1416 "C<virt-cat> has a limited ability to understand Windows drive letters and "
1417 "paths (eg. C<E:\\foo\\bar.txt>)."
1421 #: ../cat/virt-cat.pod:173 ../edit/virt-edit.pod:262
1422 msgid "If and only if the guest is running Windows then:"
1426 #: ../cat/virt-cat.pod:179 ../edit/virt-edit.pod:268
1428 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
1429 "to the correct filesystem."
1433 #: ../cat/virt-cat.pod:184 ../edit/virt-edit.pod:273
1435 "Any backslash (C<\\>) characters in the path are replaced with forward "
1436 "slashes so that libguestfs can process it."
1440 #: ../cat/virt-cat.pod:189
1442 "The path is resolved case insensitively to locate the file that should be "
1447 #: ../cat/virt-cat.pod:194 ../edit/virt-edit.pod:283
1448 msgid "There are some known shortcomings:"
1452 #: ../cat/virt-cat.pod:200 ../edit/virt-edit.pod:289
1453 msgid "Some NTFS symbolic links may not be followed correctly."
1457 #: ../cat/virt-cat.pod:204 ../edit/virt-edit.pod:293
1458 msgid "NTFS junction points that cross filesystems are not followed."
1462 #: ../cat/virt-cat.pod:208 ../edit/virt-edit.pod:297
1463 msgid "USING GUESTFISH"
1467 #: ../cat/virt-cat.pod:210
1469 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1470 "C<virt-cat> doesn't work."
1474 #: ../cat/virt-cat.pod:213
1475 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1479 #: ../cat/virt-cat.pod:215
1482 " guestfish --ro -i -d domname download file -\n"
1487 #: ../cat/virt-cat.pod:217
1489 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1490 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1494 #: ../cat/virt-cat.pod:221
1496 "The command above uses libguestfs's guest inspection feature and so does not"
1497 " work on guests that libguestfs cannot inspect, or on things like arbitrary "
1498 "disk images that don't contain guests. To display a file from a disk image "
1503 #: ../cat/virt-cat.pod:226
1506 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1511 #: ../cat/virt-cat.pod:228
1513 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1514 "the disk image, and C<file> is the full path to the file."
1518 #: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382
1519 #: ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351
1520 #: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:377
1521 #: ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:229
1523 "This program returns 0 if successful, or non-zero if there was an error."
1527 #: ../cat/virt-cat.pod:245
1529 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, L"
1530 "<virt-tar-out(1)>, L<http://libguestfs.org/>."
1534 #: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:405
1535 #: ../resize/virt-resize.pod:717 ../tools/virt-make-fs.pl:588
1536 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1540 #: ../cat/virt-filesystems.pod:5
1542 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1543 "virtual machine or disk image"
1547 #: ../cat/virt-filesystems.pod:9
1550 " virt-filesystems [--options] -d domname\n"
1555 #: ../cat/virt-filesystems.pod:11
1558 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1563 #: ../cat/virt-filesystems.pod:15
1565 "This tool allows you to discover filesystems, partitions, logical volumes, "
1566 "and their sizes in a disk image or virtual machine. It is a replacement for"
1567 " L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1571 #: ../cat/virt-filesystems.pod:20
1573 "One use for this tool is from shell scripts to iterate over all filesystems "
1574 "from a disk image:"
1578 #: ../cat/virt-filesystems.pod:23
1581 " for fs in $(virt-filesystems -a disk.img); do\n"
1588 #: ../cat/virt-filesystems.pod:27
1590 "Another use is to list partitions before using another tool to modify those "
1591 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1592 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1596 #: ../cat/virt-filesystems.pod:32
1598 "Various command line options control what this program displays. You need "
1599 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1600 "guest respectively. If you just specify that then the program shows "
1601 "filesystems found, one per line, like this:"
1605 #: ../cat/virt-filesystems.pod:37
1608 " $ virt-filesystems -a disk.img\n"
1610 " /dev/vg_guest/lv_root\n"
1615 #: ../cat/virt-filesystems.pod:41
1617 "If you add I<-l> or I<--long> then the output includes extra information:"
1621 #: ../cat/virt-filesystems.pod:44
1624 " $ virt-filesystems -a disk.img -l\n"
1625 " Name Type VFS Label Size\n"
1626 " /dev/sda1 filesystem ext4 boot 524288000\n"
1627 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1632 #: ../cat/virt-filesystems.pod:49
1634 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1639 #: ../cat/virt-filesystems.pod:52
1642 " $ virt-filesystems -a disk.img --extra\n"
1644 " /dev/vg_guest/lv_root\n"
1645 " /dev/vg_guest/lv_swap\n"
1646 " /dev/vg_guest/lv_data\n"
1651 #: ../cat/virt-filesystems.pod:58
1653 "If you add I<--partitions> then partitions are shown instead of filesystems:"
1657 #: ../cat/virt-filesystems.pod:60
1660 " $ virt-filesystems -a disk.img --partitions\n"
1667 #: ../cat/virt-filesystems.pod:64
1669 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, I"
1670 "<--physical-volumes>, I<--block-devices> to list those items."
1674 #: ../cat/virt-filesystems.pod:67
1676 "You can use these options in combination as well (if you want a combination "
1677 "including filesystems, you have to add I<--filesystems>). Notice that some "
1678 "items fall into several categories (eg. C</dev/sda1> might be both a "
1679 "partition and a filesystem). These items are listed several times. To get "
1680 "a list which includes absolutely everything that virt-filesystems knows "
1681 "about, use the I<--all> option."
1685 #: ../cat/virt-filesystems.pod:74
1687 "UUIDs (because they are quite long) are not shown by default. Add the "
1688 "I<--uuid> option to display device and filesystem UUIDs in the long output."
1692 #: ../cat/virt-filesystems.pod:78
1694 "I<--all --long --uuid> is a useful combination to display all possible "
1695 "information about everything."
1699 #: ../cat/virt-filesystems.pod:81
1702 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1703 " Name Type VFS Label Size Parent UUID\n"
1704 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1705 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1706 " /dev/sda1 partition - - 100M /dev/sda -\n"
1707 " /dev/sda2 partition - - 20G /dev/sda -\n"
1708 " /dev/sda device - - 20G - -\n"
1713 #: ../cat/virt-filesystems.pod:89
1715 "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1719 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1724 #: ../cat/virt-filesystems.pod:112
1726 "Display everything. This is currently the same as specifying these options:"
1727 " I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, I"
1728 "<--logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may "
1729 "be added to this list in future)."
1733 #: ../cat/virt-filesystems.pod:117
1734 msgid "See also I<--long>."
1738 #: ../cat/virt-filesystems.pod:119
1739 msgid "B<--blkdevs>"
1743 #: ../cat/virt-filesystems.pod:121
1744 msgid "B<--block-devices>"
1748 #: ../cat/virt-filesystems.pod:123
1749 msgid "Display block devices."
1753 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1758 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1760 "Write out the results in CSV format (comma-separated values). This format "
1761 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1762 "ABOUT CSV FORMAT> below."
1766 #: ../cat/virt-filesystems.pod:150
1768 "When prompting for keys and passphrases, virt-filesystems normally turns "
1769 "echoing off so you cannot see what you are typing. If you are not worried "
1770 "about Tempest attacks and there is no one else in the room you can specify "
1771 "this flag to see what you are typing."
1775 #: ../cat/virt-filesystems.pod:155
1780 #: ../cat/virt-filesystems.pod:157
1782 "This causes filesystems that are not ordinary, mountable filesystems to be "
1783 "displayed. This category includes swapspace, and filesystems that are empty"
1784 " or contain unknown data."
1788 #: ../cat/virt-filesystems.pod:161
1789 msgid "This option implies I<--filesystems>."
1793 #: ../cat/virt-filesystems.pod:163
1794 msgid "B<--filesystems>"
1798 #: ../cat/virt-filesystems.pod:165
1800 "Display mountable filesystems. If no display option was selected then this "
1801 "option is implied."
1805 #: ../cat/virt-filesystems.pod:168
1806 msgid "With I<--extra>, non-mountable filesystems are shown too."
1810 #: ../cat/virt-filesystems.pod:181
1813 " virt-filesystems --format=raw -a disk.img\n"
1818 #: ../cat/virt-filesystems.pod:185
1821 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1826 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352
1827 #: ../df/virt-df.pod:125 ../fish/guestfish.pod:156
1828 #: ../tools/virt-list-partitions.pl:109
1833 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354
1834 #: ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1835 msgid "B<--human-readable>"
1839 #: ../cat/virt-filesystems.pod:198
1840 msgid "In I<--long> mode, display sizes in human-readable format."
1844 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366
1845 #: ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1850 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368
1851 #: ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1856 #: ../cat/virt-filesystems.pod:209
1857 msgid "Display extra columns of data (\"long format\")."
1861 #: ../cat/virt-filesystems.pod:211
1862 msgid "A title row is added unless you also specify I<--no-title>."
1866 #: ../cat/virt-filesystems.pod:213
1868 "The extra columns displayed depend on what output you select, and the "
1869 "ordering of columns may change in future versions. Use the title row, "
1870 "I<--csv> output and/or L<csvtool(1)> to match columns to data in external "
1875 #: ../cat/virt-filesystems.pod:218
1877 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1878 "default is to show raw numbers of I<bytes>."
1882 #: ../cat/virt-filesystems.pod:221
1883 msgid "Use I<--uuid> to display UUIDs too."
1887 #: ../cat/virt-filesystems.pod:223
1892 #: ../cat/virt-filesystems.pod:225
1893 msgid "B<--logvols>"
1897 #: ../cat/virt-filesystems.pod:227
1898 msgid "B<--logical-volumes>"
1902 #: ../cat/virt-filesystems.pod:229
1904 "Display LVM logical volumes. In this mode, these are displayed irrespective"
1905 " of whether the LVs contain filesystems."
1909 #: ../cat/virt-filesystems.pod:232
1910 msgid "B<--no-title>"
1914 #: ../cat/virt-filesystems.pod:234
1915 msgid "In I<--long> mode, don't add a title row."
1919 #: ../cat/virt-filesystems.pod:236
1921 "Note that the order of the columns is not fixed, and may change in future "
1922 "versions of virt-filesystems, so using this option may give you unexpected "
1927 #: ../cat/virt-filesystems.pod:240
1932 #: ../cat/virt-filesystems.pod:242
1933 msgid "B<--partitions>"
1937 #: ../cat/virt-filesystems.pod:244
1939 "Display partitions. In this mode, these are displayed irrespective of "
1940 "whether the partitions contain filesystems."
1944 #: ../cat/virt-filesystems.pod:247
1949 #: ../cat/virt-filesystems.pod:249
1950 msgid "B<--physvols>"
1954 #: ../cat/virt-filesystems.pod:251
1955 msgid "B<--physical-volumes>"
1959 #: ../cat/virt-filesystems.pod:253
1960 msgid "Display LVM physical volumes."
1964 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1969 #: ../cat/virt-filesystems.pod:257
1974 #: ../cat/virt-filesystems.pod:259
1975 msgid "In I<--long> mode, display UUIDs as well."
1979 #: ../cat/virt-filesystems.pod:273
1984 #: ../cat/virt-filesystems.pod:275
1985 msgid "B<--volgroups>"
1989 #: ../cat/virt-filesystems.pod:277
1990 msgid "B<--volume-groups>"
1994 #: ../cat/virt-filesystems.pod:279
1995 msgid "Display LVM volume groups."
1999 #: ../cat/virt-filesystems.pod:287
2004 #: ../cat/virt-filesystems.pod:289
2006 "Note that columns in the output are subject to reordering and change in "
2007 "future versions of this tool."
2011 #: ../cat/virt-filesystems.pod:294
2016 #: ../cat/virt-filesystems.pod:296
2017 msgid "The filesystem, partition, block device or LVM name."
2021 #: ../cat/virt-filesystems.pod:298
2023 "For device and partition names these are displayed as canonical libguestfs "
2024 "names, so that for example C</dev/sda2> is the second partition on the first"
2029 #: ../cat/virt-filesystems.pod:302
2031 "If the I<--long> option is B<not> specified, then only the name column is "
2032 "shown in the output."
2036 #: ../cat/virt-filesystems.pod:305
2041 #: ../cat/virt-filesystems.pod:307
2042 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
2046 #: ../cat/virt-filesystems.pod:309
2051 #: ../cat/virt-filesystems.pod:311
2053 "If there is a filesystem, then this column displays the filesystem type if "
2054 "one could be detected, eg. C<ext4>."
2058 #: ../cat/virt-filesystems.pod:314
2063 #: ../cat/virt-filesystems.pod:316
2065 "If the object has a label (used for identifying and mounting filesystems) "
2066 "then this column contains the label."
2070 #: ../cat/virt-filesystems.pod:319
2075 #: ../cat/virt-filesystems.pod:321
2077 "The partition type byte, displayed as a two digit hexadecimal number. A "
2078 "comprehensive list of partition types can be found here: "
2079 "L<http://www.win.tue.nl/~aeb/partitions/partition_types-1.html>"
2083 #: ../cat/virt-filesystems.pod:325
2084 msgid "This is only applicable for DOS (MBR) partitions."
2088 #: ../cat/virt-filesystems.pod:327
2093 #: ../cat/virt-filesystems.pod:329
2095 "The size of the object in bytes. If the I<--human> option is used then the "
2096 "size is displayed in a human-readable form."
2100 #: ../cat/virt-filesystems.pod:332
2105 #: ../cat/virt-filesystems.pod:334
2107 "The parent column records the parent relationship between objects. For "
2108 "example, if the object is a partition, then this column contains the name of"
2109 " the containing device. If the object is a logical volume, then this column"
2110 " is the name of the volume group."
2114 #: ../cat/virt-filesystems.pod:339
2119 #: ../cat/virt-filesystems.pod:341
2121 "If the object has a UUID (used for identifying and mounting filesystems and "
2122 "block devices) then this column contains the UUID as a string."
2126 #: ../cat/virt-filesystems.pod:345
2127 msgid "The UUID is only displayed if the I<--uuid> option is given."
2131 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:459
2132 #: ../df/virt-df.pod:191
2133 msgid "NOTE ABOUT CSV FORMAT"
2137 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:461
2138 #: ../df/virt-df.pod:193
2140 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
2141 "should be easy to parse, but it is definitely not easy to parse."
2145 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:464
2146 #: ../df/virt-df.pod:196
2148 "Myth: Just split fields at commas. Reality: This does I<not> work reliably."
2149 " This example has two columns:"
2153 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:467
2154 #: ../df/virt-df.pod:199
2157 " \"foo,bar\",baz\n"
2162 #: ../cat/virt-filesystems.pod:359 ../cat/virt-ls.pod:469
2163 #: ../df/virt-df.pod:201
2165 "Myth: Read the file one line at a time. Reality: This does I<not> work "
2166 "reliably. This example has one row:"
2170 #: ../cat/virt-filesystems.pod:362 ../cat/virt-ls.pod:472
2171 #: ../df/virt-df.pod:204
2180 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:475
2181 #: ../df/virt-df.pod:207
2183 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
2184 "packaged in major Linux distributions)."
2188 #: ../cat/virt-filesystems.pod:368 ../cat/virt-ls.pod:478
2189 #: ../df/virt-df.pod:210
2191 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl"
2192 " or Python's built-in csv library)."
2196 #: ../cat/virt-filesystems.pod:371 ../cat/virt-ls.pod:481
2197 #: ../df/virt-df.pod:213
2198 msgid "Most spreadsheets and databases can import CSV directly."
2202 #: ../cat/virt-filesystems.pod:387
2204 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-list-"
2205 "filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, "
2206 "L<http://libguestfs.org/>."
2210 #: ../cat/virt-filesystems.pod:402 ../tools/virt-win-reg.pl:789
2211 msgid "Copyright (C) 2010 Red Hat Inc."
2215 #: ../cat/virt-ls.pod:5
2216 msgid "virt-ls - List files in a virtual machine"
2220 #: ../cat/virt-ls.pod:9
2223 " virt-ls [--options] -d domname directory [directory ...]\n"
2228 #: ../cat/virt-ls.pod:11
2231 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory ...]\n"
2236 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
2241 #: ../cat/virt-ls.pod:15
2244 " virt-ls [--options] domname directory\n"
2249 #: ../cat/virt-ls.pod:17
2252 " virt-ls [--options] disk.img [disk.img ...] directory\n"
2257 #: ../cat/virt-ls.pod:21
2259 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
2260 "more from a virtual machine or disk image."
2264 #: ../cat/virt-ls.pod:24
2266 "Multiple directory names can be given, in which case the output from each is"
2271 #: ../cat/virt-ls.pod:27
2273 "To list directories from a libvirt guest use the I<-d> option to specify the"
2274 " name of the guest. For a disk image, use the I<-a> option."
2278 #: ../cat/virt-ls.pod:31
2280 "C<virt-ls> can do many simple file listings. For more complicated cases you"
2281 " may need to use L<guestfish(1)>, or write a program directly to the "
2282 "L<guestfs(3)> API."
2286 #: ../cat/virt-ls.pod:37
2287 msgid "Get a list of all files and directories in a virtual machine:"
2291 #: ../cat/virt-ls.pod:39
2294 " virt-ls -R -d guest /\n"
2299 #: ../cat/virt-ls.pod:41
2300 msgid "List all setuid or setgid programs in a Linux virtual machine:"
2304 #: ../cat/virt-ls.pod:43
2307 " virt-ls -lR -d guest / | grep '^- [42]'\n"
2312 #: ../cat/virt-ls.pod:45
2313 msgid "List all public-writable directories in a Linux virtual machine:"
2317 #: ../cat/virt-ls.pod:47
2320 " virt-ls -lR -d guest / | grep '^d ...7'\n"
2325 #: ../cat/virt-ls.pod:49
2326 msgid "List all Unix domain sockets in a Linux virtual machine:"
2330 #: ../cat/virt-ls.pod:51
2333 " virt-ls -lR -d guest / | grep '^s'\n"
2338 #: ../cat/virt-ls.pod:53
2339 msgid "List all regular files with filenames ending in '.png':"
2343 #: ../cat/virt-ls.pod:55
2346 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
2351 #: ../cat/virt-ls.pod:57
2352 msgid "To display files larger than 10MB in home directories:"
2356 #: ../cat/virt-ls.pod:59
2359 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
2364 #: ../cat/virt-ls.pod:61
2365 msgid "Find everything modified in the last 7 days:"
2369 #: ../cat/virt-ls.pod:63
2372 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
2377 #: ../cat/virt-ls.pod:65
2378 msgid "Find regular files modified in the last 24 hours:"
2382 #: ../cat/virt-ls.pod:67
2385 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2390 #: ../cat/virt-ls.pod:69
2391 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2395 #: ../cat/virt-ls.pod:71
2397 "Find the differences between files in a guest and an earlier snapshot of the"
2402 #: ../cat/virt-ls.pod:74
2405 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2406 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2407 " diff -u old new | less\n"
2412 #: ../cat/virt-ls.pod:78
2414 "The commands above won't find files where the content has changed but the "
2415 "metadata (eg. file size and modification date) is the same. To do that, you"
2416 " need to add the I<--checksum> parameter to both C<virt-ls> commands. "
2417 "I<--checksum> can be quite slow since it has to read and compute a checksum "
2418 "of every regular file in the virtual machine."
2422 #: ../cat/virt-ls.pod:84
2423 msgid "OUTPUT MODES"
2427 #: ../cat/virt-ls.pod:86
2429 "C<virt-ls> has four output modes, controlled by different combinations of "
2430 "the I<-l> and I<-R> options."
2434 #: ../cat/virt-ls.pod:89
2435 msgid "SIMPLE LISTING"
2439 #: ../cat/virt-ls.pod:91
2440 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2444 #: ../cat/virt-ls.pod:93
2447 " $ virt-ls -d guest /\n"
2455 #: ../cat/virt-ls.pod:98
2456 msgid "LONG LISTING"
2460 #: ../cat/virt-ls.pod:100
2462 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2463 "(more specifically, like the C<guestfs_ll> function)."
2467 #: ../cat/virt-ls.pod:103
2470 " $ virt-ls -l -d guest /\n"
2472 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2473 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2479 #: ../cat/virt-ls.pod:109
2481 "Note that while this is useful for displaying a directory, do not try "
2482 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2487 #: ../cat/virt-ls.pod:113
2488 msgid "RECURSIVE LISTING"
2492 #: ../cat/virt-ls.pod:115
2494 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2495 "and directories recursively:"
2499 #: ../cat/virt-ls.pod:118
2502 " $ virt-ls -R -d guest /tmp\n"
2510 #: ../cat/virt-ls.pod:123
2512 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2513 "converts C<\\0> characters to C<\\n>."
2517 #: ../cat/virt-ls.pod:126
2518 msgid "RECURSIVE LONG LISTING"
2522 #: ../cat/virt-ls.pod:128
2524 "Using I<-lR> options together changes the output to display directories "
2525 "recursively, with file stats, and optionally other features such as "
2526 "checksums and extended attributes."
2530 #: ../cat/virt-ls.pod:132
2532 "Most of the interesting features of C<virt-ls> are only available when using"
2537 #: ../cat/virt-ls.pod:135
2539 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2540 "you cannot use the output in another program (because filenames can contain "
2541 "spaces and other unsafe characters). If the guest was untrusted and someone"
2542 " knew you were using C<virt-ls> to analyze the guest, they could play tricks"
2543 " on you by creating filenames with embedded newline characters. To "
2544 "B<safely> parse the output in another program, use the I<--csv> (Comma-"
2545 "Separated Values) option."
2549 #: ../cat/virt-ls.pod:143
2551 "Note that this output format is completely unrelated to the C<ls -lR> "
2556 #: ../cat/virt-ls.pod:146
2559 " $ virt-ls -lR -d guest /bin\n"
2560 " d 0555 4096 /bin\n"
2561 " - 0755 123 /bin/alsaunmute\n"
2562 " - 0755 28328 /bin/arch\n"
2563 " l 0777 4 /bin/awk -> gawk\n"
2564 " - 0755 27216 /bin/basename\n"
2565 " - 0755 943360 /bin/bash\n"
2571 #: ../cat/virt-ls.pod:155
2572 msgid "These basic fields are always shown:"
2576 #: ../cat/virt-ls.pod:159
2581 #: ../cat/virt-ls.pod:161
2583 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2584 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2585 "link), C<s> (socket) or C<u> (unknown)."
2589 #: ../cat/virt-ls.pod:171
2594 #: ../cat/virt-ls.pod:173
2595 msgid "The Unix permissions, displayed as a 4 digit octal number."
2599 #: ../cat/virt-ls.pod:175
2604 #: ../cat/virt-ls.pod:177
2606 "The size of the file. This is shown in bytes unless I<-h> or I<--human-"
2607 "readable> option is given, in which case this is shown as a human-readable "
2612 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4395
2617 #: ../cat/virt-ls.pod:183
2618 msgid "The full path of the file or directory."
2622 #: ../cat/virt-ls.pod:185
2627 #: ../cat/virt-ls.pod:187
2628 msgid "For symbolic links only, the link target."
2632 #: ../cat/virt-ls.pod:191
2634 "In I<-lR> mode, additional command line options enable the display of more "
2639 #: ../cat/virt-ls.pod:194
2641 "With the I<--uids> flag, these additional fields are displayed before the "
2646 #: ../cat/virt-ls.pod:199
2651 #: ../cat/virt-ls.pod:201
2656 #: ../cat/virt-ls.pod:203
2658 "The UID and GID of the owner of the file (displayed numerically). Note "
2659 "these only make sense in the context of a Unix-like guest."
2663 #: ../cat/virt-ls.pod:208
2664 msgid "With the I<--times> flag, these additional fields are displayed:"
2668 #: ../cat/virt-ls.pod:212
2673 #: ../cat/virt-ls.pod:214
2674 msgid "The time of last access."
2678 #: ../cat/virt-ls.pod:216
2683 #: ../cat/virt-ls.pod:218
2684 msgid "The time of last modification."
2688 #: ../cat/virt-ls.pod:220
2693 #: ../cat/virt-ls.pod:222
2694 msgid "The time of last status change."
2698 #: ../cat/virt-ls.pod:226
2700 "The time fields are displayed as string dates and times, unless one of the "
2701 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2705 #: ../cat/virt-ls.pod:229
2706 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2710 #: ../cat/virt-ls.pod:233
2715 #: ../cat/virt-ls.pod:235
2717 "The device containing the file (displayed as major:minor). This may not "
2718 "match devices as known to the guest."
2722 #: ../cat/virt-ls.pod:238
2727 #: ../cat/virt-ls.pod:240
2728 msgid "The inode number."
2732 #: ../cat/virt-ls.pod:242
2737 #: ../cat/virt-ls.pod:244
2738 msgid "The number of hard links."
2742 #: ../cat/virt-ls.pod:246
2747 #: ../cat/virt-ls.pod:248
2749 "For block and char special files, the device (displayed as major:minor)."
2753 #: ../cat/virt-ls.pod:251
2758 #: ../cat/virt-ls.pod:253
2759 msgid "The number of 512 byte blocks allocated to the file."
2763 #: ../cat/virt-ls.pod:257
2765 "With the I<--checksum> flag, the checksum of the file contents is shown "
2766 "(only for regular files). Computing file checksums can take a considerable "
2771 #: ../cat/virt-ls.pod:280
2772 msgid "B<--checksum>"
2776 #: ../cat/virt-ls.pod:282
2777 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2781 #: ../cat/virt-ls.pod:284
2783 "Display checksum over file contents for regular files. With no argument, "
2784 "this defaults to using I<md5>. Using an argument, you can select the "
2785 "checksum type to use."
2789 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358
2790 #: ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408
2791 #: ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2793 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2798 #: ../cat/virt-ls.pod:316
2800 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2801 "so you cannot see what you are typing. If you are not worried about Tempest"
2802 " attacks and there is no one else in the room you can specify this flag to "
2803 "see what you are typing."
2807 #: ../cat/virt-ls.pod:321
2808 msgid "B<--extra-stats>"
2812 #: ../cat/virt-ls.pod:323
2813 msgid "Display extra stats."
2817 #: ../cat/virt-ls.pod:339
2820 " virt-ls --format=raw -a disk.img /dir\n"
2825 #: ../cat/virt-ls.pod:343
2828 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2833 #: ../cat/virt-ls.pod:356
2834 msgid "Display file sizes in human-readable format."
2838 #: ../cat/virt-ls.pod:370
2843 #: ../cat/virt-ls.pod:372
2844 msgid "B<--recursive>"
2848 #: ../cat/virt-ls.pod:374
2850 "Select the mode. With neither of these options, C<virt-ls> produces a "
2851 "simple, flat list of the files in the named directory. See L</SIMPLE "
2856 #: ../cat/virt-ls.pod:378
2858 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See "
2863 #: ../cat/virt-ls.pod:381
2865 "C<virt-ls -R> produces a recursive list of files starting at the named "
2866 "directory. See L</RECURSIVE LISTING>."
2870 #: ../cat/virt-ls.pod:384
2872 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2873 "parsed. See L</RECURSIVE LONG LISTING>."
2877 #: ../cat/virt-ls.pod:387
2882 #: ../cat/virt-ls.pod:389
2883 msgid "Display time fields."
2887 #: ../cat/virt-ls.pod:394
2888 msgid "B<--time-days>"
2892 #: ../cat/virt-ls.pod:396
2893 msgid "Display time fields as days before now (negative if in the future)."
2897 #: ../cat/virt-ls.pod:398
2899 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2900 "of the file is between 0 and 86399 seconds."
2904 #: ../cat/virt-ls.pod:404
2905 msgid "B<--time-relative>"
2909 #: ../cat/virt-ls.pod:406
2910 msgid "Display time fields as seconds before now (negative if in the future)."
2914 #: ../cat/virt-ls.pod:411
2919 #: ../cat/virt-ls.pod:413
2920 msgid "Display time fields as seconds since the Unix epoch."
2924 #: ../cat/virt-ls.pod:418
2929 #: ../cat/virt-ls.pod:420
2930 msgid "Display UID and GID fields."
2934 #: ../cat/virt-ls.pod:445
2935 msgid "Previous versions of virt-ls allowed you to write either:"
2939 #: ../cat/virt-ls.pod:447
2942 " virt-ls disk.img [disk.img ...] /dir\n"
2947 #: ../cat/virt-ls.pod:451
2950 " virt-ls guestname /dir\n"
2955 #: ../cat/virt-ls.pod:497
2957 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-"
2958 "tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
2959 "L<http://libguestfs.org/>."
2963 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374
2964 #: ../rescue/virt-rescue.pod:302
2965 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2969 #: ../clone/virt-sysprep.pod:5
2971 "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2975 #: ../clone/virt-sysprep.pod:9
2978 " virt-sysprep [--options] -d domname\n"
2983 #: ../clone/virt-sysprep.pod:11
2986 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2991 #: ../clone/virt-sysprep.pod:15
2993 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones"
2994 " can be made from it. Steps in this process include removing SSH host keys,"
2995 " removing persistent network MAC configuration, and removing user accounts."
2996 " Each step can be enabled or disabled as required."
3000 #: ../clone/virt-sysprep.pod:21
3002 "Virt-sysprep is a simple shell script, allowing easy inspection or "
3003 "customization by the system administrator."
3007 #: ../clone/virt-sysprep.pod:24
3009 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
3010 "be shut down. If you want to preserve the existing contents of the guest, "
3011 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> "
3016 #: ../clone/virt-sysprep.pod:29
3018 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
3019 "recommend that you don't. The time you might want to run it as root is when"
3020 " you need root in order to access the disk image, but even in this case it "
3021 "would be better to change the permissions on the disk image to be writable "
3022 "as the non-root user running virt-sysprep."
3026 #: ../clone/virt-sysprep.pod:35
3028 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the"
3029 " Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
3030 "machines in preparation for cloning them. Having said that, virt-sysprep "
3031 "does I<not> currently work on Microsoft Windows guests. We plan to support "
3032 "Windows sysprepping in a future version, and we already have code to do it."
3036 #: ../clone/virt-sysprep.pod:76
3037 msgid "B<--enable=...>"
3041 #: ../clone/virt-sysprep.pod:78
3043 "Choose which sysprep operations to perform. Give a comma-separated list of "
3044 "operations, for example:"
3048 #: ../clone/virt-sysprep.pod:81
3051 " --enable=ssh-hostkeys,udev-persistent-net\n"
3056 #: ../clone/virt-sysprep.pod:83
3058 "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
3062 #: ../clone/virt-sysprep.pod:85
3064 "If the I<--enable> option is not given, then we default to trying all "
3065 "possible sysprep operations. But some sysprep operations are skipped for "
3070 #: ../clone/virt-sysprep.pod:89
3072 "Use I<--list-operations> to list operations supported by a particular "
3073 "version of virt-sysprep."
3077 #: ../clone/virt-sysprep.pod:92
3079 "See L</OPERATIONS> below for a list and an explanation of each operation."
3083 #: ../clone/virt-sysprep.pod:106
3086 " virt-sysprep --format=raw -a disk.img\n"
3091 #: ../clone/virt-sysprep.pod:110
3094 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
3099 #: ../clone/virt-sysprep.pod:119
3100 msgid "B<--hostname> newhostname"
3104 #: ../clone/virt-sysprep.pod:121
3106 "Change the hostname. See the L</hostname> operation below. If not given, "
3107 "defaults to C<localhost.localdomain>."
3111 #: ../clone/virt-sysprep.pod:124
3112 msgid "B<--list-operations>"
3116 #: ../clone/virt-sysprep.pod:126
3117 msgid "List the operations supported by the virt-sysprep program."
3121 #: ../clone/virt-sysprep.pod:128
3122 msgid "B<--selinux-relabel>"
3126 #: ../clone/virt-sysprep.pod:130
3127 msgid "B<--no-selinux-relabel>"
3131 #: ../clone/virt-sysprep.pod:132
3133 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
3134 "I<--no-selinux-relabel> disables relabelling."
3138 #: ../clone/virt-sysprep.pod:135
3140 "The default is to try to detect if SELinux relabelling is required. See "
3141 "L</SELINUX RELABELLING> below for more details."
3145 #: ../clone/virt-sysprep.pod:156
3150 #: ../clone/virt-sysprep.pod:158
3152 "If the I<--enable> option is I<not> given, then I<all sysprep operations are"
3153 " enabled>, although some are skipped depending on the type of guest."
3157 #: ../clone/virt-sysprep.pod:162
3159 "Operations can be individually enabled using the I<--enable> option. Use a "
3160 "comma-separated list, for example:"
3164 #: ../clone/virt-sysprep.pod:165
3167 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
3172 #: ../clone/virt-sysprep.pod:167
3174 "To list the operations supported by the current version of virt-sysprep, use"
3175 " I<--list-operations>."
3179 #: ../clone/virt-sysprep.pod:170
3181 "Future versions of virt-sysprep may add more operations. If you are using "
3182 "virt-sysprep and want predictable behaviour, specify only the operations "
3183 "that you want to have enabled."
3187 #: ../clone/virt-sysprep.pod:174
3192 #: ../clone/virt-sysprep.pod:176
3193 msgid "Remove user at-jobs and cron-jobs."
3197 #: ../clone/virt-sysprep.pod:178
3198 msgid "dhcp-client-state"
3202 #: ../clone/virt-sysprep.pod:180
3203 msgid "Remove DHCP client leases."
3207 #: ../clone/virt-sysprep.pod:182
3208 msgid "dhcp-server-state"
3212 #: ../clone/virt-sysprep.pod:184
3213 msgid "Remove DHCP server leases."
3217 #: ../clone/virt-sysprep.pod:186
3222 #: ../clone/virt-sysprep.pod:188
3224 "Changes the hostname of the guest to the value given in the I<--hostname> "
3229 #: ../clone/virt-sysprep.pod:191
3231 "If the I<--hostname> parameter is not given, then the hostname is changed to"
3232 " C<localhost.localdomain>."
3236 #: ../clone/virt-sysprep.pod:194
3241 #: ../clone/virt-sysprep.pod:196
3242 msgid "Remove many log files."
3246 #: ../clone/virt-sysprep.pod:198
3251 #: ../clone/virt-sysprep.pod:200
3252 msgid "Remove email from the local mail spool directory."
3256 #: ../clone/virt-sysprep.pod:202
3261 #: ../clone/virt-sysprep.pod:204
3263 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
3264 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
3268 #: ../clone/virt-sysprep.pod:207
3273 #: ../clone/virt-sysprep.pod:209
3275 "Write some random bytes from the host into the random seed file of the "
3280 #: ../clone/virt-sysprep.pod:212
3281 msgid "See L</RANDOM SEED> below."
3285 #: ../clone/virt-sysprep.pod:214
3286 msgid "rhn-systemid"
3290 #: ../clone/virt-sysprep.pod:216
3291 msgid "Remove the RHN system ID."
3295 #: ../clone/virt-sysprep.pod:218
3300 #: ../clone/virt-sysprep.pod:220
3301 msgid "Remove the Smolt hardware UUID."
3305 #: ../clone/virt-sysprep.pod:222
3306 msgid "ssh-hostkeys"
3310 #: ../clone/virt-sysprep.pod:224
3311 msgid "Remove the SSH host keys in the guest."
3315 #: ../clone/virt-sysprep.pod:226
3317 "The SSH host keys are regenerated (differently) next time the guest is "
3322 #: ../clone/virt-sysprep.pod:229
3324 "If, after cloning, the guest gets the same IP address, ssh will give you a "
3325 "stark warning about the host key changing:"
3329 #: ../clone/virt-sysprep.pod:232
3332 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3333 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
3334 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3335 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
3340 #: ../clone/virt-sysprep.pod:237
3341 msgid "udev-persistent-net"
3345 #: ../clone/virt-sysprep.pod:239
3347 "Remove udev persistent net rules which map the guest's existing MAC address "
3348 "to a fixed ethernet device (eg. eth0)."
3352 #: ../clone/virt-sysprep.pod:242
3354 "After a guest is cloned, the MAC address usually changes. Since the old MAC"
3355 " address occupies the old name (eg. eth0), this means the fresh MAC address "
3356 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
3357 "Erasing the udev persistent net rules avoids this."
3361 #: ../clone/virt-sysprep.pod:247
3366 #: ../clone/virt-sysprep.pod:249
3367 msgid "Remove the utmp file."
3371 #: ../clone/virt-sysprep.pod:251
3373 "This records who is currently logged in on a machine. In modern Linux "
3374 "distros it is stored in a ramdisk and hence not part of the virtual "
3375 "machine's disk, but it was stored on disk in older distros."
3379 #: ../clone/virt-sysprep.pod:255
3384 #: ../clone/virt-sysprep.pod:257
3385 msgid "Remove the yum UUID."
3389 #: ../clone/virt-sysprep.pod:259
3391 "Yum creates a fresh UUID the next time it runs when it notices that the "
3392 "original UUID has been erased."
3396 #: ../clone/virt-sysprep.pod:262
3397 msgid "COPYING AND CLONING"
3401 #: ../clone/virt-sysprep.pod:264
3403 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3404 "prepare a template from which guests can be cloned. There are many "
3405 "different ways to achieve this using the virt tools, and this section is "
3406 "just an introduction."
3410 #: ../clone/virt-sysprep.pod:269
3411 msgid "A virtual machine (when switched off) consists of two parts:"
3415 #: ../clone/virt-sysprep.pod:273
3416 msgid "I<configuration>"
3420 #: ../clone/virt-sysprep.pod:275
3422 "The configuration or description of the guest. eg. The libvirt XML (see "
3423 "C<virsh dumpxml>), the running configuration of the guest, or another "
3424 "external format like OVF."
3428 #: ../clone/virt-sysprep.pod:279
3429 msgid "Some configuration items that might need to be changed:"
3433 #: ../clone/virt-sysprep.pod:285
3438 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3443 #: ../clone/virt-sysprep.pod:293
3444 msgid "path to block device(s)"
3448 #: ../clone/virt-sysprep.pod:297
3449 msgid "network card MAC address"
3453 #: ../clone/virt-sysprep.pod:301
3454 msgid "I<block device(s)>"
3458 #: ../clone/virt-sysprep.pod:303
3460 "One or more hard disk images, themselves containing files, directories, "
3461 "applications, kernels, configuration, etc."
3465 #: ../clone/virt-sysprep.pod:306
3466 msgid "Some things inside the block devices that might need to be changed:"
3470 #: ../clone/virt-sysprep.pod:312
3471 msgid "hostname and other net configuration"
3475 #: ../clone/virt-sysprep.pod:320
3476 msgid "SSH host keys"
3480 #: ../clone/virt-sysprep.pod:324
3481 msgid "Windows unique security ID (SID)"
3485 #: ../clone/virt-sysprep.pod:328
3486 msgid "Puppet registration"
3490 #: ../clone/virt-sysprep.pod:334
3491 msgid "COPYING THE BLOCK DEVICE"
3495 #: ../clone/virt-sysprep.pod:336
3497 "Starting with an original guest, you probably wish to copy the guest block "
3498 "device and its configuration to make a template. Then once you are happy "
3499 "with the template, you will want to make many clones from it."
3503 #: ../clone/virt-sysprep.pod:341
3509 " original guest --------> template ---------->\n"
3510 " \\------> cloned\n"
3511 " \\-----> guests\n"
3517 #: ../clone/virt-sysprep.pod:349
3519 "You can, of course, just copy the block device on the host using L<cp(1)> or"
3524 #: ../clone/virt-sysprep.pod:352
3528 " original guest --------> template ---------->\n"
3529 " \\------> cloned\n"
3530 " \\-----> guests\n"
3536 #: ../clone/virt-sysprep.pod:358
3537 msgid "There are some smarter (and faster) ways too:"
3541 #: ../clone/virt-sysprep.pod:364
3545 " template ---------->\n"
3546 " \\------> cloned\n"
3547 " \\-----> guests\n"
3553 #: ../clone/virt-sysprep.pod:370
3555 "Use the block device as a backing file and create a snapshot on top for each"
3556 " guest. The advantage is that you don't need to copy the block device (very"
3557 " fast) and only changes are stored (less storage required)."
3561 #: ../clone/virt-sysprep.pod:375
3563 "Note that writing to the backing file once you have created guests on top of"
3564 " it is not possible: you will corrupt the guests."
3568 #: ../clone/virt-sysprep.pod:378
3570 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 "
3571 "-o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3572 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3573 "also create cheap snapshots from files or LUNs."
3577 #: ../clone/virt-sysprep.pod:386
3578 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3582 #: ../clone/virt-sysprep.pod:390
3583 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3587 #: ../clone/virt-sysprep.pod:394
3592 #: ../clone/virt-sysprep.pod:396
3594 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device"
3595 " and/or modify the external libvirt configuration of a guest. It will reset"
3596 " the name, UUID and MAC address of the guest in the libvirt XML."
3600 #: ../clone/virt-sysprep.pod:401
3602 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3603 "image. This was the original motivation to write virt-sysprep."
3607 #: ../clone/virt-sysprep.pod:404
3612 #: ../clone/virt-sysprep.pod:406
3616 " original guest --------> template\n"
3621 #: ../clone/virt-sysprep.pod:409
3623 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making"
3624 " it easier to compress and/or faster to copy."
3628 #: ../clone/virt-sysprep.pod:412
3630 "Notice that since virt-sparsify also copies the image, you can use it to "
3631 "make the initial copy (instead of C<dd>)."
3635 #: ../clone/virt-sysprep.pod:415
3640 #: ../clone/virt-sysprep.pod:417
3644 " template ---------->\n"
3645 " \\------> cloned\n"
3646 " \\-----> guests\n"
3652 #: ../clone/virt-sysprep.pod:423
3654 "If you want to give people cloned guests, but let them pick the size of the "
3655 "guest themselves (eg. depending on how much they are prepared to pay for "
3656 "disk space), then instead of copying the template, you can run L<virt-"
3657 "resize(1)>. Virt-resize performs a copy and resize, and thus is ideal for "
3658 "cloning guests from a template."
3662 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3667 #: ../clone/virt-sysprep.pod:431
3669 "Although virt-sysprep removes some sensitive information from the guest, it "
3670 "does not pretend to remove all of it. You should examine the L</OPERATIONS>"
3671 " above, and the implementation of the operations in the shell script. You "
3672 "should also examine the guest afterwards."
3676 #: ../clone/virt-sysprep.pod:436
3678 "Sensitive files are simply removed. The data they contained may still exist"
3679 " on the disk, easily recovered with a hex editor or undelete tool. Use L"
3680 "<virt-sparsify(1)> as one way to remove this content. See also the "
3681 "L<scrub(1)> command to get rid of deleted content in directory entries and "
3686 #: ../clone/virt-sysprep.pod:442
3691 #: ../clone/virt-sysprep.pod:444
3692 msgid "I<(This section applies to Linux guests only)>"
3696 #: ../clone/virt-sysprep.pod:446
3698 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3699 "from the host into the guest's random seed file."
3703 #: ../clone/virt-sysprep.pod:449
3705 "If this is just done once and the guest is cloned from the same template, "
3706 "then each guest will start with the same entropy, and things like SSH host "
3707 "keys and TCP sequence numbers may be predictable."
3711 #: ../clone/virt-sysprep.pod:453
3713 "Therefore you should arrange to add more randomness I<after> cloning from a "
3714 "template too, which can be done by just enabling the C<random-seed> "
3719 #: ../clone/virt-sysprep.pod:457
3722 " cp template.img newguest.img\n"
3723 " virt-sysprep --enable=random-seed -a newguest.img\n"
3728 #: ../clone/virt-sysprep.pod:460
3729 msgid "SELINUX RELABELLING"
3733 #: ../clone/virt-sysprep.pod:462
3734 msgid "I<(This section applies to Linux guests using SELinux only)>"
3738 #: ../clone/virt-sysprep.pod:464
3740 "If any new files are created by virt-sysprep, then virt-sysprep touches "
3741 "C</.autorelabel> so that these will be correctly labelled by SELinux the "
3742 "next time the guest is booted. This process interrupts boot and can take "
3747 #: ../clone/virt-sysprep.pod:469
3749 "You can force relabelling for all guests by supplying the I<--selinux-"
3754 #: ../clone/virt-sysprep.pod:472
3756 "You can disable relabelling entirely by supplying the I<--no-selinux-"
3761 #: ../clone/virt-sysprep.pod:484
3762 msgid "This program returns 0 on success, or 1 if there was an error."
3766 #: ../clone/virt-sysprep.pod:488
3768 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, L<virt-"
3769 "resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, L<qemu-"
3770 "img(1)>, L<scrub(1)>, L<http://libguestfs.org/>, L<http://libvirt.org/>."
3774 #: ../df/virt-df.pod:5
3775 msgid "virt-df - Display free space on virtual filesystems"
3779 #: ../df/virt-df.pod:9
3782 " virt-df [--options]\n"
3787 #: ../df/virt-df.pod:11
3790 " virt-df [--options] -d domname\n"
3795 #: ../df/virt-df.pod:13
3798 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3803 #: ../df/virt-df.pod:17
3806 " virt-df [--options] domname\n"
3811 #: ../df/virt-df.pod:19
3814 " virt-df [--options] disk.img [disk.img ...]\n"
3819 #: ../df/virt-df.pod:23
3821 "C<virt-df> is a command line tool to display free space on virtual machine "
3822 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3823 "allocated to a virtual machine, but can look inside disk images to see how "
3824 "much space is really being used."
3828 #: ../df/virt-df.pod:28
3830 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt"
3831 " to get a list of all active and inactive guests, and performs a C<df>-type "
3832 "operation on each one in turn, printing out the results."
3836 #: ../df/virt-df.pod:32
3838 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
3839 "C<df>-type operation on either the single named libvirt domain, or on the "
3840 "disk image(s) listed on the command line (which must all belong to a single "
3841 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
3842 "single guest>. If you want to run on multiple guests, then you have to "
3843 "invoke C<virt-df> multiple times."
3847 #: ../df/virt-df.pod:39
3849 "Use the I<--csv> option to get a format which can be easily parsed by other "
3850 "programs. Other options are similar to the standard L<df(1)> command."
3854 #: ../df/virt-df.pod:45
3856 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3857 "output human-readable:"
3861 #: ../df/virt-df.pod:48
3864 " # virt-df -d F14x64 -h\n"
3865 " Filesystem Size Used Available Use%\n"
3866 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3867 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3872 #: ../df/virt-df.pod:53
3873 msgid "Show disk usage for a disk image file called C<test.img>:"
3877 #: ../df/virt-df.pod:55
3880 " $ virt-df -a test1.img\n"
3881 " Filesystem 1K-blocks Used Available Use%\n"
3882 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3887 #: ../df/virt-df.pod:112
3890 " virt-df --format=raw -a disk.img\n"
3895 #: ../df/virt-df.pod:116
3898 " virt-df --format=raw -a disk.img --format -a another.img\n"
3903 #: ../df/virt-df.pod:129
3904 msgid "Print sizes in human-readable format."
3908 #: ../df/virt-df.pod:131
3909 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3913 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3918 #: ../df/virt-df.pod:135
3923 #: ../df/virt-df.pod:137
3924 msgid "Print inodes instead of blocks."
3928 #: ../df/virt-df.pod:139
3929 msgid "B<--one-per-guest>"
3933 #: ../df/virt-df.pod:141
3935 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3936 "disks from several guests to a single libguestfs appliance."
3940 #: ../df/virt-df.pod:144
3941 msgid "You might use this option in the following circumstances:"
3945 #: ../df/virt-df.pod:150
3947 "If you think an untrusted guest might actively try to exploit the libguestfs"
3948 " appliance kernel, then this prevents one guest from interfering with the "
3949 "stats printed for another guest."
3953 #: ../df/virt-df.pod:156
3955 "If the kernel has a bug which stops it from accessing a filesystem in one "
3956 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3957 "and report stats for further guests."
3961 #: ../df/virt-df.pod:165
3963 "Print UUIDs instead of names. This is useful for following a guest even "
3964 "when the guest is migrated or renamed, or when two guests happen to have the"
3969 #: ../df/virt-df.pod:169
3971 "Note that only domains that we fetch from libvirt come with UUIDs. For disk"
3972 " images, we still print the disk image name even when this option is "
3977 #: ../df/virt-df.pod:229
3979 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
3980 "L<http://libguestfs.org/>."
3984 #: ../edit/virt-edit.pod:5
3985 msgid "virt-edit - Edit a file in a virtual machine"
3989 #: ../edit/virt-edit.pod:9
3992 " virt-edit [--options] -d domname file [file ...]\n"
3997 #: ../edit/virt-edit.pod:11
4000 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
4005 #: ../edit/virt-edit.pod:13
4008 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
4013 #: ../edit/virt-edit.pod:17
4016 " virt-edit domname file\n"
4021 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
4024 " virt-edit disk.img [disk.img ...] file\n"
4029 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23
4030 #: ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15
4031 #: ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19
4032 #: ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
4037 #: ../edit/virt-edit.pod:23
4039 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
4040 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
4041 "doing this, but doesn't catch all cases."
4045 #: ../edit/virt-edit.pod:29
4047 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
4048 "exists in the named virtual machine (or disk image)."
4052 #: ../edit/virt-edit.pod:32
4054 "Multiple filenames can be given, in which case they are each edited in turn."
4055 " Each filename must be a full path, starting at the root directory "
4056 "(starting with '/')."
4060 #: ../edit/virt-edit.pod:36
4061 msgid "If you want to just view a file, use L<virt-cat(1)>."
4065 #: ../edit/virt-edit.pod:38
4067 "For more complex cases you should look at the L<guestfish(1)> tool (see "
4068 "L</USING GUESTFISH> below)."
4072 #: ../edit/virt-edit.pod:41
4074 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
4075 "that and much more."
4079 #: ../edit/virt-edit.pod:46
4080 msgid "Edit the named files interactively:"
4084 #: ../edit/virt-edit.pod:48
4087 " virt-edit -d mydomain /boot/grub/grub.conf\n"
4092 #: ../edit/virt-edit.pod:50
4095 " virt-edit -d mydomain /etc/passwd\n"
4100 #: ../edit/virt-edit.pod:52
4101 msgid "For Windows guests, some Windows paths are understood:"
4105 #: ../edit/virt-edit.pod:54
4108 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
4113 #: ../edit/virt-edit.pod:56
4115 "If Perl is installed, you can also edit files non-interactively (see L</NON-"
4116 "INTERACTIVE EDITING> below). To change the init default level to 5:"
4120 #: ../edit/virt-edit.pod:60
4123 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
4128 #: ../edit/virt-edit.pod:81
4129 msgid "B<-b> extension"
4133 #: ../edit/virt-edit.pod:83
4134 msgid "B<--backup> extension"
4138 #: ../edit/virt-edit.pod:85
4140 "Create a backup of the original file I<in the guest disk image>. The backup"
4141 " has the original filename with C<extension> added."
4145 #: ../edit/virt-edit.pod:88
4147 "Usually the first character of C<extension> would be a dot C<.> so you would"
4152 #: ../edit/virt-edit.pod:91
4155 " virt-edit -b .orig [etc]\n"
4160 #: ../edit/virt-edit.pod:93
4161 msgid "By default, no backup file is made."
4165 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181
4166 #: ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74
4167 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78
4168 #: ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
4173 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183
4174 #: ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76
4175 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
4176 #: ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
4177 msgid "B<--connect URI>"
4181 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84
4182 #: ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134
4183 #: ../tools/virt-win-reg.pl:135
4185 "If you specify guest block devices directly, then libvirt is not used at "
4190 #: ../edit/virt-edit.pod:114
4192 "When prompting for keys and passphrases, virt-edit normally turns echoing "
4193 "off so you cannot see what you are typing. If you are not worried about "
4194 "Tempest attacks and there is no one else in the room you can specify this "
4195 "flag to see what you are typing."
4199 #: ../edit/virt-edit.pod:119
4204 #: ../edit/virt-edit.pod:121
4205 msgid "B<--expr> EXPR"
4209 #: ../edit/virt-edit.pod:123
4211 "Instead of launching the external editor, non-interactively apply the Perl "
4212 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
4217 #: ../edit/virt-edit.pod:127
4219 "Be careful to properly quote the expression to prevent it from being altered"
4224 #: ../edit/virt-edit.pod:130
4225 msgid "Note that this option is only available when Perl 5 is installed."
4229 #: ../edit/virt-edit.pod:132
4230 msgid "B<--format> raw|qcow2|..."
4234 #: ../edit/virt-edit.pod:143
4237 " virt-edit --format=raw -a disk.img file\n"
4242 #: ../edit/virt-edit.pod:147
4245 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
4250 #: ../edit/virt-edit.pod:181
4251 msgid "Previous versions of virt-edit allowed you to write either:"
4255 #: ../edit/virt-edit.pod:187
4258 " virt-edit guestname file\n"
4263 #: ../edit/virt-edit.pod:195
4264 msgid "NON-INTERACTIVE EDITING"
4268 #: ../edit/virt-edit.pod:197
4270 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
4271 "administrator can interactively edit the file."
4275 #: ../edit/virt-edit.pod:200
4277 "There are two ways also to use C<virt-edit> from scripts in order to make "
4278 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
4279 "like this, it's less error-prone to write scripts directly using the "
4280 "libguestfs API and Augeas for configuration file editing.)"
4284 #: ../edit/virt-edit.pod:206
4286 "The first method is to temporarily set C<$EDITOR> to any script or program "
4287 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
4288 "update C<tmpfile> in place however it likes."
4292 #: ../edit/virt-edit.pod:210
4294 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
4295 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
4296 "instances of C<foo> with C<bar> in a file:"
4300 #: ../edit/virt-edit.pod:214
4303 " virt-edit -d domname filename -e 's/foo/bar/'\n"
4308 #: ../edit/virt-edit.pod:216
4310 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
4311 "For example to delete root's password you could do:"
4315 #: ../edit/virt-edit.pod:219
4318 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
4323 #: ../edit/virt-edit.pod:221
4325 "What really happens is that the snippet is evaluated as a Perl expression "
4326 "for each line of the file. The line, including the final C<\\n>, is passed "
4327 "in C<$_> and the expression should update C<$_> or leave it unchanged."
4331 #: ../edit/virt-edit.pod:226
4333 "To delete a line, set C<$_> to the empty string. For example, to delete the"
4334 " C<apache> user account from the password file you can do:"
4338 #: ../edit/virt-edit.pod:229
4341 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
4346 #: ../edit/virt-edit.pod:231
4348 "To insert a line, prepend or append it to C<$_>. However appending lines to"
4349 " the end of the file is rather difficult this way since there is no concept "
4350 "of \"last line of the file\" - your expression just doesn't get called "
4351 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4356 #: ../edit/virt-edit.pod:237
4358 "The variable C<$lineno> contains the current line number. As is "
4359 "traditional, the first line in the file is number C<1>."
4363 #: ../edit/virt-edit.pod:240
4365 "The return value from the expression is ignored, but the expression may call"
4366 " C<die> in order to abort the whole program, leaving the original file "
4371 #: ../edit/virt-edit.pod:244
4373 "Remember when matching the end of a line that C<$_> may contain the final "
4374 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4375 "newline then neither of these. Thus to match or substitute some text at the"
4376 " end of a line, use this regular expression:"
4380 #: ../edit/virt-edit.pod:249
4383 " /some text(\\r?\\n)?$/\n"
4388 #: ../edit/virt-edit.pod:251
4390 "Alternately, use the perl C<chomp> function, being careful not to chomp "
4391 "C<$_> itself (since that would remove all newlines from the file):"
4395 #: ../edit/virt-edit.pod:255
4398 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4403 #: ../edit/virt-edit.pod:259
4405 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4406 "paths (eg. C<E:\\foo\\bar.txt>)."
4410 #: ../edit/virt-edit.pod:278
4412 "The path is resolved case insensitively to locate the file that should be "
4417 #: ../edit/virt-edit.pod:299
4419 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4420 "C<virt-edit> doesn't work."
4424 #: ../edit/virt-edit.pod:302
4425 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4429 #: ../edit/virt-edit.pod:304
4432 " guestfish --rw -i -d domname edit /file\n"
4437 #: ../edit/virt-edit.pod:306
4439 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4444 #: ../edit/virt-edit.pod:309
4446 "The command above uses libguestfs's guest inspection feature and so does not"
4447 " work on guests that libguestfs cannot inspect, or on things like arbitrary "
4448 "disk images that don't contain guests. To edit a file on a disk image "
4453 #: ../edit/virt-edit.pod:314
4456 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4461 #: ../edit/virt-edit.pod:316
4463 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4464 "the disk image to edit, and C</file> is the full path to the file."
4468 #: ../edit/virt-edit.pod:320
4470 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4471 "C<write> or C<upload> instead:"
4475 #: ../edit/virt-edit.pod:323
4478 " guestfish --rw -i -d domname touch /newfile\n"
4483 #: ../edit/virt-edit.pod:325
4486 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4491 #: ../edit/virt-edit.pod:327
4494 " guestfish --rw -i -d domname upload localfile /newfile\n"
4499 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119
4500 #: ../rescue/virt-rescue.pod:261 ../sparsify/virt-sparsify.pod:232
4501 #: ../src/guestfs.pod:3209 ../test-tool/libguestfs-test-tool.pod:95
4502 msgid "ENVIRONMENT VARIABLES"
4506 #: ../edit/virt-edit.pod:333
4511 #: ../edit/virt-edit.pod:335
4513 "If set, this string is used as the editor. It may contain arguments, eg. "
4518 #: ../edit/virt-edit.pod:338
4519 msgid "If not set, C<vi> is used."
4523 #: ../edit/virt-edit.pod:356
4525 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-"
4526 "tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
4527 "L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4531 #: ../erlang/examples/guestfs-erlang.pod:5
4532 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4536 #: ../erlang/examples/guestfs-erlang.pod:9
4539 " {ok, G} = guestfs:create(),\n"
4540 " ok = guestfs:add_drive_opts(G, Disk,\n"
4541 " [{format, \"raw\"}, {readonly, true}]),\n"
4542 " ok = guestfs:launch(G),\n"
4543 " [Device] = guestfs:list_devices(G),\n"
4544 " ok = guestfs:close(G).\n"
4549 #: ../erlang/examples/guestfs-erlang.pod:18
4551 "This manual page documents how to call libguestfs from the Erlang "
4552 "programming language. This page just documents the differences from the C "
4553 "API and gives some examples. If you are not familiar with using libguestfs,"
4554 " you also need to read L<guestfs(3)>."
4558 #: ../erlang/examples/guestfs-erlang.pod:23
4559 msgid "OPENING AND CLOSING THE HANDLE"
4563 #: ../erlang/examples/guestfs-erlang.pod:25
4565 "The Erlang bindings are implemented using an external program called C<erl-"
4566 "guestfs>. This program must be on the current PATH, or else you should "
4567 "specify the full path to the program:"
4571 #: ../erlang/examples/guestfs-erlang.pod:29
4574 " {ok, G} = guestfs:create().\n"
4579 #: ../erlang/examples/guestfs-erlang.pod:31
4582 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4587 #: ../erlang/examples/guestfs-erlang.pod:33
4589 "C<G> is the libguestfs handle which you should pass to other functions."
4593 #: ../erlang/examples/guestfs-erlang.pod:36
4594 msgid "To close the handle:"
4598 #: ../erlang/examples/guestfs-erlang.pod:38
4601 " ok = guestfs:close(G).\n"
4606 #: ../erlang/examples/guestfs-erlang.pod:40
4607 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4611 #: ../erlang/examples/guestfs-erlang.pod:42
4613 "For functions that take optional arguments, the first arguments are the non-"
4614 "optional ones. The last argument is a list of tuples supplying the "
4615 "remaining optional arguments."
4619 #: ../erlang/examples/guestfs-erlang.pod:46
4622 " ok = guestfs:add_drive_opts(G, Disk,\n"
4623 " [{format, \"raw\"}, {readonly, true}]).\n"
4628 #: ../erlang/examples/guestfs-erlang.pod:49
4629 msgid "If the last argument would be an empty list, you can also omit it:"
4633 #: ../erlang/examples/guestfs-erlang.pod:51
4636 " ok = guestfs:add_drive_opts(G, Disk).\n"
4641 #: ../erlang/examples/guestfs-erlang.pod:53
4642 msgid "RETURN VALUES AND ERRORS"
4646 #: ../erlang/examples/guestfs-erlang.pod:55
4648 "On success, most functions return a C<Result> term (which could be a list, "
4649 "string, tuple etc.). If there is nothing for the function to return, then "
4650 "the atom C<ok> is returned."
4654 #: ../erlang/examples/guestfs-erlang.pod:59
4655 msgid "On error, you would see one of the following tuples:"
4659 #: ../erlang/examples/guestfs-erlang.pod:63
4660 msgid "C<{error, Msg, Errno}>"
4664 #: ../erlang/examples/guestfs-erlang.pod:65
4665 msgid "This indicates an ordinary error from the function."
4669 #: ../erlang/examples/guestfs-erlang.pod:67
4671 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4676 #: ../erlang/examples/guestfs-erlang.pod:70
4677 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4681 #: ../erlang/examples/guestfs-erlang.pod:72
4682 msgid "C<{unknown, Function}>"
4686 #: ../erlang/examples/guestfs-erlang.pod:74
4688 "This indicates that the function you called is not known. Generally this "
4689 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4690 "which you should not do."
4694 #: ../erlang/examples/guestfs-erlang.pod:78
4695 msgid "C<Function> is the name of the unknown function."
4699 #: ../erlang/examples/guestfs-erlang.pod:80
4700 msgid "C<{unknownarg, Arg}>"
4704 #: ../erlang/examples/guestfs-erlang.pod:82
4706 "This indicates that you called a function with optional arguments, with an "
4707 "unknown argument name."
4711 #: ../erlang/examples/guestfs-erlang.pod:85
4712 msgid "C<Arg> is the name of the unknown argument."
4716 #: ../erlang/examples/guestfs-erlang.pod:89
4717 #: ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37
4718 #: ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31
4719 #: ../python/examples/guestfs-python.pod:34
4720 #: ../ruby/examples/guestfs-ruby.pod:28
4721 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4725 #: ../erlang/examples/guestfs-erlang.pod:91
4726 #: ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39
4727 #: ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33
4728 #: ../python/examples/guestfs-python.pod:36
4729 #: ../ruby/examples/guestfs-ruby.pod:30
4734 #: ../erlang/examples/guestfs-erlang.pod:93
4735 #: ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41
4736 #: ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35
4737 #: ../python/examples/guestfs-python.pod:38
4738 #: ../ruby/examples/guestfs-ruby.pod:32
4739 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4743 #: ../erlang/examples/guestfs-erlang.pod:95
4744 #: ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43
4745 #: ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37
4746 #: ../python/examples/guestfs-python.pod:40
4747 #: ../ruby/examples/guestfs-ruby.pod:34
4752 #: ../erlang/examples/guestfs-erlang.pod:99
4754 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, L<guestfs-"
4755 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4756 "L<guestfs-ruby(3)>, L<http://www.erlang.org/>. L<http://libguestfs.org/>."
4760 #: ../erlang/examples/guestfs-erlang.pod:110
4761 #: ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397
4762 #: ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60
4763 #: ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58
4764 #: ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328
4765 #: ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58
4766 #: ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52
4767 #: ../python/examples/guestfs-python.pod:54
4768 #: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3348
4769 #: ../test-tool/libguestfs-test-tool.pod:106
4774 #: ../erlang/examples/guestfs-erlang.pod:112
4775 #: ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399
4776 #: ../fish/guestfish.pod:1298 ../fish/virt-copy-in.pod:62
4777 #: ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60
4778 #: ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:330
4779 #: ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93
4780 #: ../perl/examples/guestfs-perl.pod:54
4781 #: ../python/examples/guestfs-python.pod:56
4782 #: ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3350
4783 #: ../test-tool/libguestfs-test-tool.pod:108
4784 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4788 #: ../erlang/examples/guestfs-erlang.pod:116
4789 #: ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4790 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4794 #: ../erlang/examples/guestfs-erlang.pod:118
4795 #: ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405
4796 #: ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99
4797 #: ../perl/examples/guestfs-perl.pod:60
4798 #: ../python/examples/guestfs-python.pod:62
4799 #: ../ruby/examples/guestfs-ruby.pod:56
4801 "The examples in this manual page may be freely copied, modified and "
4802 "distributed without any restrictions."
4806 #: ../erlang/examples/guestfs-erlang.pod:121
4807 #: ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408
4808 #: ../java/examples/guestfs-java.pod:69
4809 #: ../ocaml/examples/guestfs-ocaml.pod:102
4810 #: ../perl/examples/guestfs-perl.pod:63
4811 #: ../python/examples/guestfs-python.pod:65
4812 #: ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3357
4814 "This library is free software; you can redistribute it and/or modify it "
4815 "under the terms of the GNU Lesser General Public License as published by the"
4816 " Free Software Foundation; either version 2 of the License, or (at your "
4817 "option) any later version."
4821 #: ../erlang/examples/guestfs-erlang.pod:126
4822 #: ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413
4823 #: ../java/examples/guestfs-java.pod:74
4824 #: ../ocaml/examples/guestfs-ocaml.pod:107
4825 #: ../perl/examples/guestfs-perl.pod:68
4826 #: ../python/examples/guestfs-python.pod:70
4827 #: ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3362
4829 "This library is distributed in the hope that it will be useful, but WITHOUT "
4830 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4831 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License"
4832 " for more details."
4836 #: ../erlang/examples/guestfs-erlang.pod:131
4837 #: ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418
4838 #: ../java/examples/guestfs-java.pod:79
4839 #: ../ocaml/examples/guestfs-ocaml.pod:112
4840 #: ../perl/examples/guestfs-perl.pod:73
4841 #: ../python/examples/guestfs-python.pod:75
4842 #: ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3367
4844 "You should have received a copy of the GNU Lesser General Public License "
4845 "along with this library; if not, write to the Free Software Foundation, "
4846 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4850 #: ../examples/guestfs-examples.pod:5
4851 msgid "guestfs-examples - Examples of using libguestfs from C"
4855 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4858 " #include <guestfs.h>\n"
4860 msgstr "#include <guestfs.h>\n"
4863 #: ../examples/guestfs-examples.pod:11
4866 " guestfs_h *g = guestfs_create ();\n"
4867 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4868 " guestfs_launch (g);\n"
4873 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4876 " cc prog.c -o prog -lguestfs\n"
4878 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4881 " cc prog.c -o prog -lguestfs\n"
4883 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4887 #: ../examples/guestfs-examples.pod:21
4889 "This manual page contains examples of calling libguestfs from the C "
4890 "programming language. If you are not familiar with using libguestfs, you "
4891 "also need to read L<guestfs(3)>."
4895 #: ../examples/guestfs-examples.pod:35
4897 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
4898 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4899 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4903 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97
4904 #: ../python/examples/guestfs-python.pod:60
4905 #: ../ruby/examples/guestfs-ruby.pod:54
4906 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4910 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4915 #: ../examples/guestfs-recipes.pod:5
4917 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4918 "here. The only way which works for both sorts of output is to just write "
4919 "the URL directly. Do NOT use L<...> for URLs."
4923 #: ../examples/guestfs-recipes.pod:9
4925 "We break with tradition here and don't use ALL CAPS for the section "
4926 "headings, as this makes them much easier to read."
4930 #: ../examples/guestfs-recipes.pod:16
4931 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4935 #: ../examples/guestfs-recipes.pod:20
4937 "This page contains recipes for and links to things you can do using "
4938 "libguestfs, L<guestfish(1)> and the virt tools."
4942 #: ../examples/guestfs-recipes.pod:23
4943 msgid "Audit a virtual machine for setuid files"
4947 #: ../examples/guestfs-recipes.pod:25
4949 "The link below contains a small program which can be used to audit a Linux "
4950 "virtual machine to see what setuid and setgid files it contains."
4954 #: ../examples/guestfs-recipes.pod:28
4956 "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-"
4961 #: ../examples/guestfs-recipes.pod:30
4962 msgid "Change the background image in a Windows XP VM"
4966 #: ../examples/guestfs-recipes.pod:32
4968 "The links below explain how to use L<guestfish(1)> to change the background "
4969 "image for a user of a Windows XP VM. Unfortunately the technique appears to"
4970 " be substantially different for each version of Windows."
4974 #: ../examples/guestfs-recipes.pod:37
4976 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html "
4977 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4981 #: ../examples/guestfs-recipes.pod:40
4982 msgid "Cloning a virtual machine (Linux)"
4986 #: ../examples/guestfs-recipes.pod:42
4988 "The guestfish technique described in the link below works well for most "
4989 "Linux VMs. Depending on the Linux distro you may need to change the paths "
4994 #: ../examples/guestfs-recipes.pod:46
4996 "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-"
5001 #: ../examples/guestfs-recipes.pod:48
5003 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
5008 #: ../examples/guestfs-recipes.pod:51
5009 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
5013 #: ../examples/guestfs-recipes.pod:53
5014 msgid "Cloning a virtual machine (Windows)"
5018 #: ../examples/guestfs-recipes.pod:55
5020 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
5021 "straightforward. Currently there is code in the Aeolus Oz project which "
5022 "does this (using libguestfs). As part of our review of the virt-clone tool,"
5023 " we may add sysprepping ability."
5027 #: ../examples/guestfs-recipes.pod:60
5029 "https://github.com/clalancette/oz https://www.redhat.com/archives/virt-"
5030 "tools-list/2011-May/msg00019.html"
5034 #: ../examples/guestfs-recipes.pod:63
5035 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
5039 #: ../examples/guestfs-recipes.pod:65
5040 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
5044 #: ../examples/guestfs-recipes.pod:67
5047 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
5052 #: ../examples/guestfs-recipes.pod:69
5053 msgid "To export just a subdirectory, eg. C</files>, do:"
5057 #: ../examples/guestfs-recipes.pod:71
5060 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
5065 #: ../examples/guestfs-recipes.pod:73
5066 msgid "Create empty disk images"
5070 #: ../examples/guestfs-recipes.pod:75
5072 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
5073 "The useful guide below explains the options available."
5077 #: ../examples/guestfs-recipes.pod:78
5079 "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-"
5084 #: ../examples/guestfs-recipes.pod:80
5085 msgid "Dump raw filesystem content from inside a disk image or VM"
5089 #: ../examples/guestfs-recipes.pod:82
5091 "You can use the L<guestfish(1)> C<download> command to extract the raw "
5092 "filesystem content from any filesystem in a disk image or a VM (even one "
5093 "which is encrypted or buried inside an LV):"
5097 #: ../examples/guestfs-recipes.pod:86
5100 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
5105 #: ../examples/guestfs-recipes.pod:88
5108 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
5113 #: ../examples/guestfs-recipes.pod:90
5114 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
5118 #: ../examples/guestfs-recipes.pod:92
5119 msgid "Edit grub configuration in a VM"
5123 #: ../examples/guestfs-recipes.pod:94
5124 msgid "You can use this to:"
5128 #: ../examples/guestfs-recipes.pod:100
5129 msgid "Fix a virtual machine that does not boot."
5133 #: ../examples/guestfs-recipes.pod:104
5134 msgid "Change which kernel is used to boot the VM."
5138 #: ../examples/guestfs-recipes.pod:108
5139 msgid "Change kernel command line options."
5143 #: ../examples/guestfs-recipes.pod:112
5144 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
5148 #: ../examples/guestfs-recipes.pod:114
5151 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
5156 #: ../examples/guestfs-recipes.pod:116
5158 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
5163 #: ../examples/guestfs-recipes.pod:119
5166 " virt-rescue -d BrokenGuest\n"
5171 #: ../examples/guestfs-recipes.pod:121
5172 msgid "Export any directory from a VM"
5176 #: ../examples/guestfs-recipes.pod:123
5178 "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
5182 #: ../examples/guestfs-recipes.pod:126
5185 " virt-copy-out -d Guest /home .\n"
5190 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9
5191 #: ../fish/guestfish-actions.pod:1450 ../fish/guestfish-actions.pod:1715
5192 #: ../fish/guestfish-actions.pod:2132 ../src/guestfs-actions.pod:18
5193 #: ../src/guestfs-actions.pod:2326 ../src/guestfs-actions.pod:2750
5194 #: ../src/guestfs-actions.pod:3309 ../src/guestfs.pod:1685
5195 #: ../tools/virt-win-reg.pl:717
5200 #: ../examples/guestfs-recipes.pod:134
5202 "The final dot of the command is not a printing error. It means we want to "
5203 "copy out to the current directory."
5207 #: ../examples/guestfs-recipes.pod:139
5208 msgid "This creates a directory called C<home> under the current directory."
5212 #: ../examples/guestfs-recipes.pod:143
5214 "If the guest is a Windows guest then you can use drive letters and "
5215 "backslashes, but you must prefix the path with C<win:> and quote it to "
5216 "protect it from the shell, like this:"
5220 #: ../examples/guestfs-recipes.pod:147
5223 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
5228 #: ../examples/guestfs-recipes.pod:149
5229 msgid "To get the output as a compressed tarball, do:"
5233 #: ../examples/guestfs-recipes.pod:151
5236 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
5241 #: ../examples/guestfs-recipes.pod:153
5243 "Although it sounds tempting, this is usually not a reliable way to get a "
5244 "backup from a running guest. See the entry in the FAQ: "
5245 "http://libguestfs.org/FAQ.html#backup"
5249 #: ../examples/guestfs-recipes.pod:157
5250 msgid "Find out which user is using the most space"
5254 #: ../examples/guestfs-recipes.pod:159
5256 "This simple script examines a Linux guest to find out which user is using "
5257 "the most space in their home directory:"
5261 #: ../examples/guestfs-recipes.pod:162
5269 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
5277 #: ../examples/guestfs-recipes.pod:166
5286 #: ../examples/guestfs-recipes.pod:169
5289 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
5294 #: ../examples/guestfs-recipes.pod:171
5297 " for d in $(guestfish --remote ls \"$dir\"); do\n"
5298 " echo -n \"$dir/$d\"\n"
5300 " guestfish --remote du \"$dir/$d\";\n"
5301 " done | sort -nr -k 2\n"
5306 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
5309 " guestfish --remote exit\n"
5314 #: ../examples/guestfs-recipes.pod:179
5315 msgid "Get DHCP address from a VM"
5319 #: ../examples/guestfs-recipes.pod:181
5321 "The link below explains the many different possible techniques for getting "
5322 "the last assigned DHCP address of a virtual machine."
5326 #: ../examples/guestfs-recipes.pod:184
5328 "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-"
5329 "from-a-virtual-machine-disk-image/#content"
5333 #: ../examples/guestfs-recipes.pod:186
5335 "In the libguestfs source examples directory you will find the latest version"
5336 " of the C<virt-dhcp-address.c> program."
5340 #: ../examples/guestfs-recipes.pod:189
5341 msgid "Get the operating system product name string"
5345 #: ../examples/guestfs-recipes.pod:191
5346 msgid "Save the following script into a file called C<product-name.sh>:"
5350 #: ../examples/guestfs-recipes.pod:193
5355 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5356 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5357 " guestfish --remote inspect-get-product-name \"$root\"\n"
5358 " guestfish --remote exit\n"
5363 #: ../examples/guestfs-recipes.pod:200
5364 msgid "Make the script executable and run it on a named guest:"
5368 #: ../examples/guestfs-recipes.pod:202
5371 " # product-name.sh RHEL60x64\n"
5372 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
5377 #: ../examples/guestfs-recipes.pod:205
5379 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
5380 "C<xpath> command line tool or from your favourite programming language:"
5384 #: ../examples/guestfs-recipes.pod:209
5387 " # virt-inspector RHEL60x64 > xml\n"
5388 " # xpath '//product_name' < xml\n"
5391 " <product_name>Red Hat Enterprise Linux Server release 6.0 (Santiago)</product_name>\n"
5396 #: ../examples/guestfs-recipes.pod:215
5397 msgid "Get the default boot kernel for a Linux VM"
5401 #: ../examples/guestfs-recipes.pod:217
5403 "The link below contains a program to print the default boot kernel for a "
5408 #: ../examples/guestfs-recipes.pod:220
5410 "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-"
5411 "boot-kernel-for-a-vm/#content"
5415 #: ../examples/guestfs-recipes.pod:222
5417 "It uses Augeas, and the technique is generally applicable for many different"
5422 #: ../examples/guestfs-recipes.pod:229
5423 msgid "listing the user accounts in the guest"
5427 #: ../examples/guestfs-recipes.pod:233
5428 msgid "what repositories is it configured to use"
5432 #: ../examples/guestfs-recipes.pod:237
5433 msgid "what NTP servers does it connect to"
5437 #: ../examples/guestfs-recipes.pod:241
5438 msgid "what were the boot messages last time it booted"
5442 #: ../examples/guestfs-recipes.pod:245
5443 msgid "listing who was logged in recently"
5447 #: ../examples/guestfs-recipes.pod:249
5448 msgid "http://augeas.net/"
5452 #: ../examples/guestfs-recipes.pod:251
5453 msgid "Install RPMs in a guest"
5457 #: ../examples/guestfs-recipes.pod:253
5459 "The link below contains a method to install RPMs in a guest. In fact the "
5460 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
5461 "installs them next time the guest is booted. You could use this technique "
5462 "to install vital security updates in an offline guest."
5466 #: ../examples/guestfs-recipes.pod:259
5468 "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
5472 #: ../examples/guestfs-recipes.pod:261
5473 msgid "List applications installed in a VM"
5477 #: ../examples/guestfs-recipes.pod:263
5478 msgid "Save the following to a file C<list-apps.sh>:"
5482 #: ../examples/guestfs-recipes.pod:265
5487 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5488 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5489 " guestfish --remote inspect-list-applications \"$root\"\n"
5490 " guestfish --remote exit\n"
5495 #: ../examples/guestfs-recipes.pod:272
5497 "Make the file executable and then you can run it on any named virtual "
5502 #: ../examples/guestfs-recipes.pod:275
5505 " # list-apps.sh WinGuest\n"
5507 " app_name: Mozilla Firefox (3.6.12)\n"
5508 " app_display_name: Mozilla Firefox (3.6.12)\n"
5510 " app_version: 3.6.12 (en-GB)\n"
5512 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5513 " app_trans_path:\n"
5514 " app_publisher: Mozilla\n"
5515 " app_url: http://www.mozilla.com/en-GB/\n"
5516 " app_source_package:\n"
5518 " app_description: Mozilla Firefox\n"
5521 " app_name: VLC media player\n"
5522 " app_display_name: VLC media player 1.1.5\n"
5524 " app_version: 1.1.5\n"
5526 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5527 " app_trans_path:\n"
5528 " app_publisher: VideoLAN\n"
5529 " app_url: http://www.videolan.org/\n"
5530 " app_source_package:\n"
5532 " app_description:\n"
5538 #: ../examples/guestfs-recipes.pod:305
5540 "If you want to run the script on disk images (instead of libvirt virtual "
5541 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also L<virt-"
5546 #: ../examples/guestfs-recipes.pod:309
5547 msgid "List files and directories in a VM"
5551 #: ../examples/guestfs-recipes.pod:311
5552 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5556 #: ../examples/guestfs-recipes.pod:313
5559 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5564 #: ../examples/guestfs-recipes.pod:315
5565 msgid "List services in a Windows VM"
5569 #: ../examples/guestfs-recipes.pod:317
5571 "The link below contains a script that can be used to list out the services "
5572 "from a Windows VM, and whether those services run at boot time or are loaded"
5577 #: ../examples/guestfs-recipes.pod:321
5579 "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-"
5584 #: ../examples/guestfs-recipes.pod:323
5585 msgid "Make a disk image sparse"
5589 #: ../examples/guestfs-recipes.pod:325
5591 "The link below contains some guides for making a disk image sparse (or "
5592 "reintroducing sparseness)."
5596 #: ../examples/guestfs-recipes.pod:328
5598 "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-"
5603 #: ../examples/guestfs-recipes.pod:330
5604 msgid "Monitor disk usage over time"
5608 #: ../examples/guestfs-recipes.pod:332
5610 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5611 "The link below contains a guide."
5615 #: ../examples/guestfs-recipes.pod:335
5616 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5620 #: ../examples/guestfs-recipes.pod:337
5621 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5625 #: ../examples/guestfs-recipes.pod:339
5627 "L<guestfish(1)> plus the tools described in the link below can be used to "
5628 "read out the Windows Event Log from any virtual machine running Windows "
5629 "Vista or a later version."
5633 #: ../examples/guestfs-recipes.pod:343
5635 "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-"
5636 "guestfish/#content"
5640 #: ../examples/guestfs-recipes.pod:345
5641 msgid "Remove root password (Linux)"
5645 #: ../examples/guestfs-recipes.pod:347
5647 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5648 "files. One use is to remove the root password from a Linux guest:"
5652 #: ../examples/guestfs-recipes.pod:350
5655 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5660 #: ../examples/guestfs-recipes.pod:352
5661 msgid "Remove Administrator password (Windows)"
5665 #: ../examples/guestfs-recipes.pod:354
5667 "The link below contains one technique for removing the Administrator "
5668 "password from a Windows VM, or to be more precise, it gives you a command "
5669 "prompt the next time you log in which you can use to bypass any security:"
5673 #: ../examples/guestfs-recipes.pod:359
5675 "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-"
5676 "administrator-password-with-guestfish/"
5680 #: ../examples/guestfs-recipes.pod:361
5681 msgid "Unpack a live CD"
5685 #: ../examples/guestfs-recipes.pod:363
5687 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5688 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5689 "layers, as outlined in the guide below."
5693 #: ../examples/guestfs-recipes.pod:367
5695 "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-"
5700 #: ../examples/guestfs-recipes.pod:369
5701 msgid "Uploading and downloading files"
5705 #: ../examples/guestfs-recipes.pod:371
5707 "The link below contains general tips on uploading (copying in) and "
5708 "downloading (copying out) files from VMs."
5712 #: ../examples/guestfs-recipes.pod:374
5714 "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5718 #: ../examples/guestfs-recipes.pod:376
5719 msgid "Use libguestfs tools on VMware ESX guests"
5723 #: ../examples/guestfs-recipes.pod:378
5725 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5726 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5730 #: ../examples/guestfs-recipes.pod:382
5732 "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-"
5737 #: ../examples/guestfs-recipes.pod:386
5739 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<guestfs-"
5740 "erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L"
5741 "<guestfs-python(3)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
5745 #: ../examples/guestfs-recipes.pod:403
5746 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5750 #: ../fish/guestfish-actions.pod:1
5755 #: ../fish/guestfish-actions.pod:3
5758 " add-cdrom filename\n"
5763 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
5764 msgid "This function adds a virtual CD-ROM disk image to the guest."
5768 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
5769 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
5773 #: ../fish/guestfish-actions.pod:15
5775 "This call checks for the existence of C<filename>. This stops you from "
5776 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5777 "and C<http:> URLs. To specify those, use the general L</config> call "
5782 #: ../fish/guestfish-actions.pod:22
5784 "If you just want to add an ISO file (often you use this as an efficient way "
5785 "to transfer large files into the guest), then you should probably use L"
5786 "</add-drive-ro> instead."
5790 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214
5791 #: ../fish/guestfish-actions.pod:228
5793 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call"
5798 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:217
5799 #: ../fish/guestfish-actions.pod:231 ../fish/guestfish-actions.pod:941
5800 #: ../fish/guestfish-actions.pod:976 ../fish/guestfish-actions.pod:1149
5801 #: ../fish/guestfish-actions.pod:1509 ../fish/guestfish-actions.pod:1523
5802 #: ../fish/guestfish-actions.pod:3293 ../fish/guestfish-actions.pod:3604
5803 #: ../fish/guestfish-actions.pod:3652 ../fish/guestfish-actions.pod:4579
5804 #: ../fish/guestfish-actions.pod:4602 ../fish/guestfish-actions.pod:4624
5805 #: ../fish/guestfish-actions.pod:4662 ../fish/guestfish-actions.pod:5311
5806 #: ../fish/guestfish-actions.pod:5417 ../src/guestfs-actions.pod:10
5807 #: ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326
5808 #: ../src/guestfs-actions.pod:1572 ../src/guestfs-actions.pod:1629
5809 #: ../src/guestfs-actions.pod:1912 ../src/guestfs-actions.pod:2411
5810 #: ../src/guestfs-actions.pod:2432 ../src/guestfs-actions.pod:5077
5811 #: ../src/guestfs-actions.pod:5599 ../src/guestfs-actions.pod:5699
5812 #: ../src/guestfs-actions.pod:6999 ../src/guestfs-actions.pod:7043
5813 #: ../src/guestfs-actions.pod:7077 ../src/guestfs-actions.pod:7140
5814 #: ../src/guestfs-actions.pod:8072 ../src/guestfs-actions.pod:8181
5815 #: ../src/guestfs-actions.pod:8364
5817 "Deprecated functions will not be removed from the API, but the fact that "
5818 "they are deprecated indicates that there are problems with correct use of "
5823 #: ../fish/guestfish-actions.pod:35
5828 #: ../fish/guestfish-actions.pod:37
5833 #: ../fish/guestfish-actions.pod:39
5836 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..] [readonlydisk:..]\n"
5841 #: ../fish/guestfish-actions.pod:41
5843 "This function adds the disk(s) attached to the named libvirt domain C<dom>."
5844 " It works by connecting to libvirt, requesting the domain and domain XML "
5845 "from libvirt, parsing it for disks, and calling L</add-drive-opts> on each "
5850 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
5852 "The number of disks added is returned. This operation is atomic: if an "
5853 "error is returned, then no disks are added."
5857 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
5859 "This function does some minimal checks to make sure the libvirt domain is "
5860 "not running (unless C<readonly> is true). In a future version we will try "
5861 "to acquire the libvirt lock on each disk."
5865 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
5867 "Disks must be accessible locally. This often means that adding disks from a"
5868 " remote libvirt connection (see L<http://libvirt.org/remote.html>) will "
5869 "fail unless those disks are accessible via the same device path locally too."
5873 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
5875 "The optional C<libvirturi> parameter sets the libvirt URI (see "
5876 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
5877 "default libvirt URI (or one set through an environment variable, see the "
5878 "libvirt documentation for full details)."
5882 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
5884 "The optional C<live> flag controls whether this call will try to connect to "
5885 "a running virtual machine C<guestfsd> process if it sees a suitable "
5886 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
5887 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING"
5888 " DAEMONS> for more information."
5892 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
5894 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
5895 "passed instead of the domain name. The C<dom> string is treated as a UUID "
5896 "first and looked up, and if that lookup fails then we treat C<dom> as a name"
5901 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
5903 "The optional C<readonlydisk> parameter controls what we do for disks which "
5904 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
5908 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
5909 msgid "readonlydisk = \"error\""
5913 #: ../fish/guestfish-actions.pod:84 ../fish/guestfish-actions.pod:95
5914 #: ../fish/guestfish-actions.pod:106 ../src/guestfs-actions.pod:103
5915 #: ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:125
5916 msgid "If C<readonly> is false:"
5920 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
5922 "The whole call is aborted with an error if any disk with the "
5923 "E<lt>readonly/E<gt> flag is found."
5927 #: ../fish/guestfish-actions.pod:89 ../fish/guestfish-actions.pod:100
5928 #: ../fish/guestfish-actions.pod:110 ../src/guestfs-actions.pod:108
5929 #: ../src/guestfs-actions.pod:119 ../src/guestfs-actions.pod:129
5930 msgid "If C<readonly> is true:"
5934 #: ../fish/guestfish-actions.pod:91 ../fish/guestfish-actions.pod:102
5935 #: ../fish/guestfish-actions.pod:112 ../src/guestfs-actions.pod:110
5936 #: ../src/guestfs-actions.pod:121 ../src/guestfs-actions.pod:131
5937 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
5941 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
5942 msgid "readonlydisk = \"read\""
5946 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
5948 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
5949 "are added read/write."
5953 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
5954 msgid "readonlydisk = \"write\" (default)"
5958 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
5959 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
5963 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
5964 msgid "readonlydisk = \"ignore\""
5968 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
5969 msgid "If C<readonly> is true or false:"
5973 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
5974 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
5978 #: ../fish/guestfish-actions.pod:122
5980 "The other optional parameters are passed directly through to L</add-drive-"
5985 #: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:194
5986 #: ../fish/guestfish-actions.pod:624 ../fish/guestfish-actions.pod:835
5987 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:894
5988 #: ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:912
5989 #: ../fish/guestfish-actions.pod:926 ../fish/guestfish-actions.pod:2171
5990 #: ../fish/guestfish-actions.pod:3342 ../fish/guestfish-actions.pod:3505
5991 #: ../fish/guestfish-actions.pod:3640
5993 "This command has one or more optional arguments. See L</OPTIONAL "
5998 #: ../fish/guestfish-actions.pod:127
6003 #: ../fish/guestfish-actions.pod:129
6006 " add-drive filename\n"
6011 #: ../fish/guestfish-actions.pod:131
6013 "This function is the equivalent of calling L</add-drive-opts> with no "
6014 "optional parameters, so the disk is added writable, with the format being "
6015 "detected automatically."
6019 #: ../fish/guestfish-actions.pod:135
6021 "Automatic detection of the format opens you up to a potential security hole "
6022 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6023 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6024 "you should think about replacing calls to this function with calls to L"
6025 "</add-drive-opts>, and specifying the format."
6029 #: ../fish/guestfish-actions.pod:142
6030 msgid "add-drive-opts"
6034 #: ../fish/guestfish-actions.pod:144
6039 #: ../fish/guestfish-actions.pod:146
6042 " add-drive-opts filename [readonly:..] [format:..] [iface:..] [name:..]\n"
6047 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
6049 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6050 "The first time you call this function, the disk appears as C</dev/sda>, the "
6051 "second time as C</dev/sdb>, and so on."
6055 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
6057 "You don't necessarily need to be root when using libguestfs. However you "
6058 "obviously do need sufficient permissions to access the filename for whatever"
6059 " operations you want to perform (ie. read access if you just want to read "
6060 "the image or write access if you want to modify the image)."
6064 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
6065 msgid "This call checks that C<filename> exists."
6069 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3304
6070 #: ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5114
6071 msgid "The optional arguments are:"
6075 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6080 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6082 "If true then the image is treated as read-only. Writes are still allowed, "
6083 "but they are stored in a temporary snapshot overlay which is discarded at "
6084 "the end. The disk that you add is not modified."
6088 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6093 #: ../fish/guestfish-actions.pod:173
6095 "This forces the image format. If you omit this (or use L</add-drive> or L"
6096 "</add-drive-ro>) then the format is automatically detected. Possible "
6097 "formats include C<raw> and C<qcow2>."
6101 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6103 "Automatic detection of the format opens you up to a potential security hole "
6104 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6105 "RHBZ#642934. Specifying the format closes this security hole."
6109 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6114 #: ../fish/guestfish-actions.pod:184
6116 "This rarely-used option lets you emulate the behaviour of the deprecated L"
6117 "</add-drive-with-if> call (q.v.)"
6121 #: ../fish/guestfish-actions.pod:187 ../src/guestfs-actions.pod:247
6126 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
6128 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as"
6129 " a hint to the guest inspection process if it is available."
6133 #: ../fish/guestfish-actions.pod:196
6134 msgid "add-drive-ro"
6138 #: ../fish/guestfish-actions.pod:198
6143 #: ../fish/guestfish-actions.pod:200
6146 " add-drive-ro filename\n"
6151 #: ../fish/guestfish-actions.pod:202
6153 "This function is the equivalent of calling L</add-drive-opts> with the "
6154 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6155 "is added read-only, with the format being detected automatically."
6159 #: ../fish/guestfish-actions.pod:207
6160 msgid "add-drive-ro-with-if"
6164 #: ../fish/guestfish-actions.pod:209
6167 " add-drive-ro-with-if filename iface\n"
6172 #: ../fish/guestfish-actions.pod:211
6174 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6175 "interface emulation to use at run time."
6179 #: ../fish/guestfish-actions.pod:221
6180 msgid "add-drive-with-if"
6184 #: ../fish/guestfish-actions.pod:223
6187 " add-drive-with-if filename iface\n"
6192 #: ../fish/guestfish-actions.pod:225
6194 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6195 "interface emulation to use at run time."
6199 #: ../fish/guestfish-actions.pod:235
6204 #: ../fish/guestfish-actions.pod:237
6207 " aug-clear augpath\n"
6212 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
6214 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6215 "L<augtool(1)> C<clear> command."
6219 #: ../fish/guestfish-actions.pod:242
6224 #: ../fish/guestfish-actions.pod:244
6232 #: ../fish/guestfish-actions.pod:246
6234 "Close the current Augeas handle and free up any resources used by it. After"
6235 " calling this, you have to call L</aug-init> again before you can use any "
6236 "other Augeas functions."
6240 #: ../fish/guestfish-actions.pod:251
6245 #: ../fish/guestfish-actions.pod:253
6248 " aug-defnode name expr val\n"
6253 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
6255 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6259 #: ../fish/guestfish-actions.pod:258
6261 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6262 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6263 "containing that single node."
6267 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
6269 "On success this returns a pair containing the number of nodes in the "
6270 "nodeset, and a boolean flag if a node was created."
6274 #: ../fish/guestfish-actions.pod:266
6279 #: ../fish/guestfish-actions.pod:268
6282 " aug-defvar name expr\n"
6287 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
6289 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6290 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6294 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
6296 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6297 "evaluates to something which is not a nodeset."
6301 #: ../fish/guestfish-actions.pod:277
6306 #: ../fish/guestfish-actions.pod:279
6309 " aug-get augpath\n"
6314 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
6316 "Look up the value associated with C<path>. If C<path> matches exactly one "
6317 "node, the C<value> is returned."
6321 #: ../fish/guestfish-actions.pod:284
6326 #: ../fish/guestfish-actions.pod:286
6329 " aug-init root flags\n"
6334 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
6336 "Create a new Augeas handle for editing configuration files. If there was "
6337 "any previous Augeas handle associated with this guestfs session, then it is "
6342 #: ../fish/guestfish-actions.pod:292
6343 msgid "You must call this before using any other L</aug-*> commands."
6347 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
6349 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6353 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
6355 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6356 "logical I<or> of the following integers:"
6360 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
6361 msgid "C<AUG_SAVE_BACKUP> = 1"
6365 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
6366 msgid "Keep the original file with a C<.augsave> extension."
6370 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
6371 msgid "C<AUG_SAVE_NEWFILE> = 2"
6375 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
6377 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6378 "original. Overrides C<AUG_SAVE_BACKUP>."
6382 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
6383 msgid "C<AUG_TYPE_CHECK> = 4"
6387 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
6388 msgid "Typecheck lenses."
6392 #: ../fish/guestfish-actions.pod:317
6394 "This option is only useful when debugging Augeas lenses. Use of this option"
6395 " may require additional memory for the libguestfs appliance. You may need "
6396 "to set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-"
6401 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
6402 msgid "C<AUG_NO_STDINC> = 8"
6406 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
6407 msgid "Do not use standard load path for modules."
6411 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
6412 msgid "C<AUG_SAVE_NOOP> = 16"
6416 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
6417 msgid "Make save a no-op, just record what would have been changed."
6421 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
6422 msgid "C<AUG_NO_LOAD> = 32"
6426 #: ../fish/guestfish-actions.pod:332
6427 msgid "Do not load the tree in L</aug-init>."
6431 #: ../fish/guestfish-actions.pod:336
6432 msgid "To close the handle, you can call L</aug-close>."
6436 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
6437 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6441 #: ../fish/guestfish-actions.pod:340
6446 #: ../fish/guestfish-actions.pod:342
6449 " aug-insert augpath label true|false\n"
6454 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
6456 "Create a new sibling C<label> for C<path>, inserting it into the tree before"
6457 " or after C<path> (depending on the boolean flag C<before>)."
6461 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
6463 "C<path> must match exactly one existing node in the tree, and C<label> must "
6464 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6468 #: ../fish/guestfish-actions.pod:352
6473 #: ../fish/guestfish-actions.pod:354
6481 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
6482 msgid "Load files into the tree."
6486 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
6487 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6491 #: ../fish/guestfish-actions.pod:361
6496 #: ../fish/guestfish-actions.pod:363
6504 #: ../fish/guestfish-actions.pod:365
6506 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6507 "resulting nodes into alphabetical order."
6511 #: ../fish/guestfish-actions.pod:368
6516 #: ../fish/guestfish-actions.pod:370
6519 " aug-match augpath\n"
6524 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
6526 "Returns a list of paths which match the path expression C<path>. The "
6527 "returned paths are sufficiently qualified so that they match exactly one "
6528 "node in the current tree."
6532 #: ../fish/guestfish-actions.pod:376
6537 #: ../fish/guestfish-actions.pod:378
6540 " aug-mv src dest\n"
6545 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
6547 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6548 "C<dest> is overwritten if it exists."
6552 #: ../fish/guestfish-actions.pod:383
6557 #: ../fish/guestfish-actions.pod:385
6565 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
6566 msgid "Remove C<path> and all of its children."
6570 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
6571 msgid "On success this returns the number of entries which were removed."
6575 #: ../fish/guestfish-actions.pod:391
6580 #: ../fish/guestfish-actions.pod:393
6588 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
6589 msgid "This writes all pending changes to disk."
6593 #: ../fish/guestfish-actions.pod:397
6595 "The flags which were passed to L</aug-init> affect exactly how files are "
6600 #: ../fish/guestfish-actions.pod:400
6605 #: ../fish/guestfish-actions.pod:402
6608 " aug-set augpath val\n"
6613 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
6614 msgid "Set the value associated with C<path> to C<val>."
6618 #: ../fish/guestfish-actions.pod:406
6620 "In the Augeas API, it is possible to clear a node by setting the value to "
6621 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6622 "this call. Instead you must use the L</aug-clear> call."
6626 #: ../fish/guestfish-actions.pod:411
6631 #: ../fish/guestfish-actions.pod:413
6634 " available 'groups ...'\n"
6639 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
6641 "This command is used to check the availability of some groups of "
6642 "functionality in the appliance, which not all builds of the libguestfs "
6643 "appliance will be able to provide."
6647 #: ../fish/guestfish-actions.pod:419
6649 "The libguestfs groups, and the functions that those groups correspond to, "
6650 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6651 "runtime by calling L</available-all-groups>."
6655 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
6657 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
6658 "\"augeas\"]> would check for the availability of the Linux inotify functions"
6659 " and Augeas (configuration file editing) functions."
6663 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
6664 msgid "The command returns no error if I<all> requested groups are available."
6668 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
6670 "It fails with an error if one or more of the requested groups is unavailable"
6671 " in the appliance."
6675 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
6677 "If an unknown group name is included in the list of groups then an error is "
6682 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
6687 #: ../fish/guestfish-actions.pod:443
6688 msgid "You must call L</launch> before calling this function."
6692 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
6694 "The reason is because we don't know what groups are supported by the "
6695 "appliance/daemon until it is running and can be queried."
6699 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
6701 "If a group of functions is available, this does not necessarily mean that "
6702 "they will work. You still have to check for errors when calling individual "
6703 "API functions even if they are available."
6707 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
6709 "It is usually the job of distro packagers to build complete functionality "
6710 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6711 "with all requirements satisfied, will support everything."
6715 #: ../fish/guestfish-actions.pod:465
6717 "This call was added in version C<1.0.80>. In previous versions of "
6718 "libguestfs all you could do would be to speculatively execute a command to "
6719 "find out if the daemon implemented it. See also L</version>."
6723 #: ../fish/guestfish-actions.pod:472
6724 msgid "available-all-groups"
6728 #: ../fish/guestfish-actions.pod:474
6731 " available-all-groups\n"
6736 #: ../fish/guestfish-actions.pod:476
6738 "This command returns a list of all optional groups that this daemon knows "
6739 "about. Note this returns both supported and unsupported groups. To find "
6740 "out which ones the daemon can actually support you have to call "
6741 "L</available> on each member of the returned list."
6745 #: ../fish/guestfish-actions.pod:482
6746 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6750 #: ../fish/guestfish-actions.pod:484
6755 #: ../fish/guestfish-actions.pod:486
6758 " base64-in (base64file|-) filename\n"
6763 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
6765 "This command uploads base64-encoded data from C<base64file> to C<filename>."
6769 #: ../fish/guestfish-actions.pod:491 ../fish/guestfish-actions.pod:500
6770 #: ../fish/guestfish-actions.pod:749 ../fish/guestfish-actions.pod:833
6771 #: ../fish/guestfish-actions.pod:854 ../fish/guestfish-actions.pod:1025
6772 #: ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1418
6773 #: ../fish/guestfish-actions.pod:4882 ../fish/guestfish-actions.pod:4894
6774 #: ../fish/guestfish-actions.pod:4905 ../fish/guestfish-actions.pod:4916
6775 #: ../fish/guestfish-actions.pod:4968 ../fish/guestfish-actions.pod:4977
6776 #: ../fish/guestfish-actions.pod:5031 ../fish/guestfish-actions.pod:5054
6777 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6781 #: ../fish/guestfish-actions.pod:493
6786 #: ../fish/guestfish-actions.pod:495
6789 " base64-out filename (base64file|-)\n"
6794 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
6796 "This command downloads the contents of C<filename>, writing it out to local "
6797 "file C<base64file> encoded as base64."
6801 #: ../fish/guestfish-actions.pod:502
6802 msgid "blockdev-flushbufs"
6806 #: ../fish/guestfish-actions.pod:504
6809 " blockdev-flushbufs device\n"
6814 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
6816 "This tells the kernel to flush internal buffers associated with C<device>."
6820 #: ../fish/guestfish-actions.pod:509 ../fish/guestfish-actions.pod:520
6821 #: ../fish/guestfish-actions.pod:529 ../fish/guestfish-actions.pod:539
6822 #: ../fish/guestfish-actions.pod:551 ../fish/guestfish-actions.pod:564
6823 #: ../fish/guestfish-actions.pod:572 ../fish/guestfish-actions.pod:583
6824 #: ../fish/guestfish-actions.pod:591 ../fish/guestfish-actions.pod:599
6825 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:749
6826 #: ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:780
6827 #: ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:817
6828 #: ../src/guestfs-actions.pod:831 ../src/guestfs-actions.pod:849
6829 #: ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:877
6830 msgid "This uses the L<blockdev(8)> command."
6834 #: ../fish/guestfish-actions.pod:511
6835 msgid "blockdev-getbsz"
6839 #: ../fish/guestfish-actions.pod:513
6842 " blockdev-getbsz device\n"
6847 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
6848 msgid "This returns the block size of a device."
6852 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580
6853 #: ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
6855 "(Note this is different from both I<size in blocks> and I<filesystem block "
6860 #: ../fish/guestfish-actions.pod:522
6861 msgid "blockdev-getro"
6865 #: ../fish/guestfish-actions.pod:524
6868 " blockdev-getro device\n"
6873 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
6875 "Returns a boolean indicating if the block device is read-only (true if read-"
6876 "only, false if not)."
6880 #: ../fish/guestfish-actions.pod:531
6881 msgid "blockdev-getsize64"
6885 #: ../fish/guestfish-actions.pod:533
6888 " blockdev-getsize64 device\n"
6893 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
6894 msgid "This returns the size of the device in bytes."
6898 #: ../fish/guestfish-actions.pod:537
6899 msgid "See also L</blockdev-getsz>."
6903 #: ../fish/guestfish-actions.pod:541
6904 msgid "blockdev-getss"
6908 #: ../fish/guestfish-actions.pod:543
6911 " blockdev-getss device\n"
6916 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
6918 "This returns the size of sectors on a block device. Usually 512, but can be"
6919 " larger for modern devices."
6923 #: ../fish/guestfish-actions.pod:548
6925 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
6929 #: ../fish/guestfish-actions.pod:553
6930 msgid "blockdev-getsz"
6934 #: ../fish/guestfish-actions.pod:555
6937 " blockdev-getsz device\n"
6942 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
6944 "This returns the size of the device in units of 512-byte sectors (even if "
6945 "the sectorsize isn't 512 bytes ... weird)."
6949 #: ../fish/guestfish-actions.pod:560
6951 "See also L</blockdev-getss> for the real sector size of the device, and L"
6952 "</blockdev-getsize64> for the more useful I<size in bytes>."
6956 #: ../fish/guestfish-actions.pod:566
6957 msgid "blockdev-rereadpt"
6961 #: ../fish/guestfish-actions.pod:568
6964 " blockdev-rereadpt device\n"
6969 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
6970 msgid "Reread the partition table on C<device>."
6974 #: ../fish/guestfish-actions.pod:574
6975 msgid "blockdev-setbsz"
6979 #: ../fish/guestfish-actions.pod:576
6982 " blockdev-setbsz device blocksize\n"
6987 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
6988 msgid "This sets the block size of a device."
6992 #: ../fish/guestfish-actions.pod:585
6993 msgid "blockdev-setro"
6997 #: ../fish/guestfish-actions.pod:587
7000 " blockdev-setro device\n"
7005 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
7006 msgid "Sets the block device named C<device> to read-only."
7010 #: ../fish/guestfish-actions.pod:593
7011 msgid "blockdev-setrw"
7015 #: ../fish/guestfish-actions.pod:595
7018 " blockdev-setrw device\n"
7023 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
7024 msgid "Sets the block device named C<device> to read-write."
7028 #: ../fish/guestfish-actions.pod:601
7029 msgid "btrfs-filesystem-resize"
7033 #: ../fish/guestfish-actions.pod:603
7036 " btrfs-filesystem-resize mountpoint [size:..]\n"
7041 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
7042 msgid "This command resizes a btrfs filesystem."
7046 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
7048 "Note that unlike other resize calls, the filesystem has to be mounted and "
7049 "the parameter is the mountpoint not the device (this is a requirement of "
7054 #: ../fish/guestfish-actions.pod:611 ../fish/guestfish-actions.pod:3615
7055 #: ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:5638
7056 msgid "The optional parameters are:"
7060 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3619
7061 #: ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5642
7066 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
7068 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7069 "resized to the maximum size."
7073 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
7074 msgid "See also L<btrfs(8)>."
7078 #: ../fish/guestfish-actions.pod:626
7079 msgid "case-sensitive-path"
7083 #: ../fish/guestfish-actions.pod:628
7086 " case-sensitive-path path\n"
7091 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
7093 "This can be used to resolve case insensitive paths on a filesystem which is "
7094 "case sensitive. The use case is to resolve paths which you have read from "
7095 "Windows configuration files or the Windows Registry, to the true path."
7099 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
7101 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7102 "(and probably others), which is that although the underlying filesystem is "
7103 "case-insensitive, the driver exports the filesystem to Linux as case-"
7108 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
7110 "One consequence of this is that special directories such as C<c:\\windows> "
7111 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7112 "precise details of how they were created. In Windows itself this would not "
7117 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
7119 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-"
7120 "faq/#posixfilenames1>"
7124 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
7126 "This function resolves the true case of each element in the path and returns"
7127 " the case-sensitive path."
7131 #: ../fish/guestfish-actions.pod:652
7133 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
7134 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7135 "how the directories were originally created under Windows)."
7139 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
7140 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7144 #: ../fish/guestfish-actions.pod:660
7145 msgid "See also L</realpath>."
7149 #: ../fish/guestfish-actions.pod:662
7154 #: ../fish/guestfish-actions.pod:664
7162 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4049
7163 #: ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6299
7164 msgid "Return the contents of the file named C<path>."
7168 #: ../fish/guestfish-actions.pod:668
7170 "Note that this function cannot correctly handle binary files (specifically, "
7171 "files containing C<\\0> character which is treated as end of string). For "
7172 "those you need to use the L</read-file> or L</download> functions which have"
7173 " a more complex interface."
7177 #: ../fish/guestfish-actions.pod:673 ../fish/guestfish-actions.pod:808
7178 #: ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:1103
7179 #: ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1180
7180 #: ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1382
7181 #: ../fish/guestfish-actions.pod:1695 ../fish/guestfish-actions.pod:1705
7182 #: ../fish/guestfish-actions.pod:1755 ../fish/guestfish-actions.pod:1770
7183 #: ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1799
7184 #: ../fish/guestfish-actions.pod:3919 ../fish/guestfish-actions.pod:3934
7185 #: ../fish/guestfish-actions.pod:4010 ../fish/guestfish-actions.pod:4027
7186 #: ../fish/guestfish-actions.pod:4042 ../fish/guestfish-actions.pod:4723
7187 #: ../fish/guestfish-actions.pod:4769 ../fish/guestfish-actions.pod:4854
7188 #: ../fish/guestfish-actions.pod:4869 ../fish/guestfish-actions.pod:5275
7189 #: ../fish/guestfish-actions.pod:5287 ../fish/guestfish-actions.pod:5305
7190 #: ../fish/guestfish-actions.pod:5322 ../fish/guestfish-actions.pod:5332
7191 #: ../fish/guestfish-actions.pod:5389 ../fish/guestfish-actions.pod:5399
7192 #: ../fish/guestfish-actions.pod:5428 ../fish/guestfish-actions.pod:5438
7193 #: ../src/guestfs-actions.pod:1001 ../src/guestfs-actions.pod:1180
7194 #: ../src/guestfs-actions.pod:1200 ../src/guestfs-actions.pod:1847
7195 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:1969
7196 #: ../src/guestfs-actions.pod:1988 ../src/guestfs-actions.pod:2234
7197 #: ../src/guestfs-actions.pod:2716 ../src/guestfs-actions.pod:2735
7198 #: ../src/guestfs-actions.pod:2800 ../src/guestfs-actions.pod:2824
7199 #: ../src/guestfs-actions.pod:2841 ../src/guestfs-actions.pod:2870
7200 #: ../src/guestfs-actions.pod:6081 ../src/guestfs-actions.pod:6107
7201 #: ../src/guestfs-actions.pod:6238 ../src/guestfs-actions.pod:6264
7202 #: ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:7255
7203 #: ../src/guestfs-actions.pod:7310 ../src/guestfs-actions.pod:7456
7204 #: ../src/guestfs-actions.pod:7480 ../src/guestfs-actions.pod:8145
7205 #: ../src/guestfs-actions.pod:8165 ../src/guestfs-actions.pod:8198
7206 #: ../src/guestfs-actions.pod:8217 ../src/guestfs-actions.pod:8236
7207 #: ../src/guestfs-actions.pod:8330 ../src/guestfs-actions.pod:8349
7208 #: ../src/guestfs-actions.pod:8395 ../src/guestfs-actions.pod:8414
7210 "Because of the message protocol, there is a transfer limit of somewhere "
7211 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7215 #: ../fish/guestfish-actions.pod:676
7220 #: ../fish/guestfish-actions.pod:678
7223 " checksum csumtype path\n"
7228 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
7230 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7234 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
7236 "The type of checksum to compute is given by the C<csumtype> parameter which "
7237 "must have one of the following values:"
7241 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
7246 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
7248 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7253 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
7258 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
7259 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7263 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
7268 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
7269 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7273 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
7278 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
7279 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7283 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
7288 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
7289 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7293 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
7298 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
7299 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7303 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
7308 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
7309 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7313 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
7314 msgid "The checksum is returned as a printable string."
7318 #: ../fish/guestfish-actions.pod:721
7319 msgid "To get the checksum for a device, use L</checksum-device>."
7323 #: ../fish/guestfish-actions.pod:723
7324 msgid "To get the checksums for many files, use L</checksums-out>."
7328 #: ../fish/guestfish-actions.pod:725
7329 msgid "checksum-device"
7333 #: ../fish/guestfish-actions.pod:727
7336 " checksum-device csumtype device\n"
7341 #: ../fish/guestfish-actions.pod:729
7343 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7344 "device named C<device>. For the types of checksums supported see the "
7345 "L</checksum> command."
7349 #: ../fish/guestfish-actions.pod:733
7350 msgid "checksums-out"
7354 #: ../fish/guestfish-actions.pod:735
7357 " checksums-out csumtype directory (sumsfile|-)\n"
7362 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
7364 "This command computes the checksums of all regular files in C<directory> and"
7365 " then emits a list of those checksums to the local output file C<sumsfile>."
7369 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
7371 "This can be used for verifying the integrity of a virtual machine. However "
7372 "to be properly secure you should pay attention to the output of the checksum"
7373 " command (it uses the ones from GNU coreutils). In particular when the "
7374 "filename is not printable, coreutils uses a special backslash syntax. For "
7375 "more information, see the GNU coreutils info file."
7379 #: ../fish/guestfish-actions.pod:751
7384 #: ../fish/guestfish-actions.pod:753
7387 " chmod mode path\n"
7392 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
7394 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are"
7399 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
7401 "I<Note>: When using this command from guestfish, C<mode> by default would be"
7402 " decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7407 #: ../fish/guestfish-actions.pod:762 ../fish/guestfish-actions.pod:3268
7408 #: ../fish/guestfish-actions.pod:3407 ../fish/guestfish-actions.pod:3417
7409 #: ../fish/guestfish-actions.pod:3427 ../src/guestfs-actions.pod:1117
7410 #: ../src/guestfs-actions.pod:5045 ../src/guestfs-actions.pod:5254
7411 #: ../src/guestfs-actions.pod:5273 ../src/guestfs-actions.pod:5292
7412 msgid "The mode actually set is affected by the umask."
7416 #: ../fish/guestfish-actions.pod:764
7421 #: ../fish/guestfish-actions.pod:766
7424 " chown owner group path\n"
7429 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
7430 msgid "Change the file owner to C<owner> and group to C<group>."
7434 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2703
7435 #: ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4116
7437 "Only numeric uid and gid are supported. If you want to use names, you will "
7438 "need to locate and parse the password file yourself (Augeas support makes "
7439 "this relatively easy)."
7443 #: ../fish/guestfish-actions.pod:774
7448 #: ../fish/guestfish-actions.pod:776
7451 " command 'arguments ...'\n"
7456 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
7458 "This call runs a command from the guest filesystem. The filesystem must be "
7459 "mounted, and must contain a compatible operating system (ie. something "
7460 "Linux, with the same or compatible processor architecture)."
7464 #: ../fish/guestfish-actions.pod:783
7466 "The single parameter is an argv-style list of arguments. The first element "
7467 "is the name of the program to run. Subsequent elements are parameters. The"
7468 " list must be non-empty (ie. must contain a program name). Note that the "
7469 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7473 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
7474 msgid "The return value is anything printed to I<stdout> by the command."
7478 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
7480 "If the command returns a non-zero exit status, then this function returns an"
7481 " error message. The error message string is the content of I<stderr> from "
7486 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
7488 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
7489 "C</bin>. If you require a program from another location, you should provide"
7490 " the full path in the first parameter."
7494 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
7496 "Shared libraries and data files required by the program must be available on"
7497 " filesystems which are mounted in the correct places. It is the caller's "
7498 "responsibility to ensure all filesystems that are needed are mounted at the "
7503 #: ../fish/guestfish-actions.pod:811
7504 msgid "command-lines"
7508 #: ../fish/guestfish-actions.pod:813
7511 " command-lines 'arguments ...'\n"
7516 #: ../fish/guestfish-actions.pod:815
7518 "This is the same as L</command>, but splits the result into a list of lines."
7522 #: ../fish/guestfish-actions.pod:818
7523 msgid "See also: L</sh-lines>"
7527 #: ../fish/guestfish-actions.pod:823
7528 msgid "compress-device-out"
7532 #: ../fish/guestfish-actions.pod:825
7535 " compress-device-out ctype device (zdevice|-) [level:..]\n"
7540 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
7542 "This command compresses C<device> and writes it out to the local file "
7547 #: ../fish/guestfish-actions.pod:830
7549 "The C<ctype> and optional C<level> parameters have the same meaning as in L"
7554 #: ../fish/guestfish-actions.pod:837
7555 msgid "compress-out"
7559 #: ../fish/guestfish-actions.pod:839
7562 " compress-out ctype file (zfile|-) [level:..]\n"
7567 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
7569 "This command compresses C<file> and writes it out to the local file "
7574 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
7576 "The compression program used is controlled by the C<ctype> parameter. "
7577 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7578 "Some compression types may not be supported by particular builds of "
7579 "libguestfs, in which case you will get an error containing the substring "
7580 "\"not supported\"."
7584 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
7586 "The optional C<level> parameter controls compression level. The meaning and"
7587 " default for this parameter depends on the compression program being used."
7591 #: ../fish/guestfish-actions.pod:858
7596 #: ../fish/guestfish-actions.pod:860
7599 " config qemuparam qemuvalue\n"
7604 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
7606 "This can be used to add arbitrary qemu command line parameters of the form "
7607 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7608 "setting some parameters which would interfere with parameters that we use."
7612 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
7613 msgid "The first character of C<param> string must be a C<-> (dash)."
7617 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
7618 msgid "C<value> can be NULL."
7622 #: ../fish/guestfish-actions.pod:871
7623 msgid "copy-device-to-device"
7627 #: ../fish/guestfish-actions.pod:873
7630 " copy-device-to-device src dest [srcoffset:..] [destoffset:..] [size:..]\n"
7635 #: ../fish/guestfish-actions.pod:875
7637 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, L</copy-"
7638 "file-to-device>, and L</copy-file-to-file> let you copy from a source "
7639 "(device|file) to a destination (device|file)."
7643 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
7645 "Partial copies can be made since you can specify optionally the source "
7646 "offset, destination offset and size to copy. These values are all specified"
7647 " in bytes. If not given, the offsets both default to zero, and the size "
7648 "defaults to copying as much as possible until we hit the end of the source."
7652 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
7654 "The source and destination may be the same object. However overlapping "
7655 "regions may not be copied correctly."
7659 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
7661 "If the destination is a file, it is created if required. If the destination"
7662 " file is not large enough, it is extended."
7666 #: ../fish/guestfish-actions.pod:896
7667 msgid "copy-device-to-file"
7671 #: ../fish/guestfish-actions.pod:898
7674 " copy-device-to-file src dest [srcoffset:..] [destoffset:..] [size:..]\n"
7679 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909
7680 #: ../fish/guestfish-actions.pod:918
7681 msgid "See L</copy-device-to-device> for a general overview of this call."
7685 #: ../fish/guestfish-actions.pod:905
7686 msgid "copy-file-to-device"
7690 #: ../fish/guestfish-actions.pod:907
7693 " copy-file-to-device src dest [srcoffset:..] [destoffset:..] [size:..]\n"
7698 #: ../fish/guestfish-actions.pod:914
7699 msgid "copy-file-to-file"
7703 #: ../fish/guestfish-actions.pod:916
7706 " copy-file-to-file src dest [srcoffset:..] [destoffset:..] [size:..]\n"
7711 #: ../fish/guestfish-actions.pod:921
7713 "This is B<not> the function you want for copying files. This is for copying"
7714 " blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7715 "file copying and moving functions."
7719 #: ../fish/guestfish-actions.pod:928
7724 #: ../fish/guestfish-actions.pod:930
7727 " copy-size src dest size\n"
7732 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1576
7734 "This command copies exactly C<size> bytes from one source device or file "
7735 "C<src> to another destination device or file C<dest>."
7739 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1579
7741 "Note this will fail if the source is too short or if the destination is not "
7746 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
7748 "I<This function is deprecated.> In new code, use the "
7749 "L</copy_device_to_device> call instead."
7753 #: ../fish/guestfish-actions.pod:945
7758 #: ../fish/guestfish-actions.pod:947
7766 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1598
7768 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7769 "destination filename or destination directory."
7773 #: ../fish/guestfish-actions.pod:952
7778 #: ../fish/guestfish-actions.pod:954
7786 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1612
7788 "This copies a file or directory from C<src> to C<dest> recursively using the"
7789 " C<cp -a> command."
7793 #: ../fish/guestfish-actions.pod:959
7798 #: ../fish/guestfish-actions.pod:961
7806 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1633
7808 "This command copies from one source device or file C<src> to another "
7809 "destination device or file C<dest>. Normally you would use this to copy to "
7810 "or from a device or partition, for example to duplicate a filesystem."
7814 #: ../fish/guestfish-actions.pod:968
7816 "If the destination is a device, it must be as large or larger than the "
7817 "source file or device, otherwise the copy will fail. This command cannot do"
7818 " partial copies (see L</copy-device-to-device>)."
7822 #: ../fish/guestfish-actions.pod:980
7827 #: ../fish/guestfish-actions.pod:982
7835 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1652
7836 msgid "This command runs the C<df> command to report disk space used."
7840 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
7842 "This command is mostly useful for interactive sessions. It is I<not> "
7843 "intended that you try to parse the output string. Use L</statvfs> from "
7848 #: ../fish/guestfish-actions.pod:990
7853 #: ../fish/guestfish-actions.pod:992
7861 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1668
7863 "This command runs the C<df -h> command to report disk space used in human-"
7868 #: ../fish/guestfish-actions.pod:1001
7873 #: ../fish/guestfish-actions.pod:1003
7881 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1685
7883 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
7884 "This is sometimes useful for extended debugging of problems."
7888 #: ../fish/guestfish-actions.pod:1009
7890 "Another way to get the same information is to enable verbose messages with L"
7891 "</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
7892 "before running the program."
7896 #: ../fish/guestfish-actions.pod:1014
7901 #: ../fish/guestfish-actions.pod:1016
7904 " download remotefilename (filename|-)\n"
7909 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031
7910 #: ../src/guestfs-actions.pod:1706 ../src/guestfs-actions.pod:1731
7912 "Download file C<remotefilename> and save it as C<filename> on the local "
7917 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5027
7918 #: ../src/guestfs-actions.pod:1709 ../src/guestfs-actions.pod:7715
7919 msgid "C<filename> can also be a named pipe."
7923 #: ../fish/guestfish-actions.pod:1023
7924 msgid "See also L</upload>, L</cat>."
7928 #: ../fish/guestfish-actions.pod:1027
7929 msgid "download-offset"
7933 #: ../fish/guestfish-actions.pod:1029
7936 " download-offset remotefilename (filename|-) offset size\n"
7941 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1734
7943 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
7944 "region must be within the file or device)."
7948 #: ../fish/guestfish-actions.pod:1037
7950 "Note that there is no limit on the amount of data that can be downloaded "
7951 "with this call, unlike with L</pread>, and this call always reads the full "
7952 "amount unless an error occurs."
7956 #: ../fish/guestfish-actions.pod:1042
7957 msgid "See also L</download>, L</pread>."
7961 #: ../fish/guestfish-actions.pod:1046
7966 #: ../fish/guestfish-actions.pod:1048
7969 " drop-caches whattodrop\n"
7974 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1759
7976 "This instructs the guest kernel to drop its page cache, and/or dentries and "
7977 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
7978 "to drop, see L<http://linux-mm.org/Drop_Caches>"
7982 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1764
7983 msgid "Setting C<whattodrop> to 3 should drop everything."
7987 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1766
7989 "This automatically calls L<sync(2)> before the operation, so that the "
7990 "maximum guest memory is freed."
7994 #: ../fish/guestfish-actions.pod:1060
7999 #: ../fish/guestfish-actions.pod:1062
8007 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1779
8009 "This command runs the C<du -s> command to estimate file space usage for "
8014 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1782
8016 "C<path> can be a file or a directory. If C<path> is a directory then the "
8017 "estimate includes the contents of the directory and all subdirectories "
8022 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1786
8024 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8028 #: ../fish/guestfish-actions.pod:1074
8033 #: ../fish/guestfish-actions.pod:1076
8036 " e2fsck-f device\n"
8041 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1804
8043 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8044 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be"
8049 #: ../fish/guestfish-actions.pod:1082
8051 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8052 "should use L</fsck>."
8056 #: ../fish/guestfish-actions.pod:1085
8061 #: ../fish/guestfish-actions.pod:1087
8064 " echo-daemon 'words ...'\n"
8069 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1821
8071 "This command concatenates the list of C<words> passed with single spaces "
8072 "between them and returns the resulting string."
8076 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1824
8077 msgid "You can use this command to test the connection through to the daemon."
8081 #: ../fish/guestfish-actions.pod:1094
8082 msgid "See also L</ping-daemon>."
8086 #: ../fish/guestfish-actions.pod:1096
8091 #: ../fish/guestfish-actions.pod:1098
8094 " egrep regex path\n"
8099 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1840
8101 "This calls the external C<egrep> program and returns the matching lines."
8105 #: ../fish/guestfish-actions.pod:1106
8110 #: ../fish/guestfish-actions.pod:1108
8113 " egrepi regex path\n"
8118 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1859
8120 "This calls the external C<egrep -i> program and returns the matching lines."
8124 #: ../fish/guestfish-actions.pod:1116
8129 #: ../fish/guestfish-actions.pod:1118
8132 " equal file1 file2\n"
8137 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1878
8139 "This compares the two files C<file1> and C<file2> and returns true if their "
8140 "content is exactly equal, or false otherwise."
8144 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1881
8145 msgid "The external L<cmp(1)> program is used for the comparison."
8149 #: ../fish/guestfish-actions.pod:1125
8154 #: ../fish/guestfish-actions.pod:1127
8162 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1893
8164 "This returns C<true> if and only if there is a file, directory (or anything)"
8165 " with the given C<path> name."
8169 #: ../fish/guestfish-actions.pod:1132
8170 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8174 #: ../fish/guestfish-actions.pod:1134
8179 #: ../fish/guestfish-actions.pod:1136
8182 " fallocate path len\n"
8187 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157
8188 #: ../src/guestfs-actions.pod:1916 ../src/guestfs-actions.pod:1935
8190 "This command preallocates a file (containing zero bytes) named C<path> of "
8191 "size C<len> bytes. If the file exists already, it is overwritten."
8195 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1920
8197 "Do not confuse this with the guestfish-specific C<alloc> command which "
8198 "allocates a file in the host and attaches it as a device."
8202 #: ../fish/guestfish-actions.pod:1146
8204 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8209 #: ../fish/guestfish-actions.pod:1153
8214 #: ../fish/guestfish-actions.pod:1155
8217 " fallocate64 path len\n"
8222 #: ../fish/guestfish-actions.pod:1161
8224 "Note that this call allocates disk blocks for the file. To create a sparse "
8225 "file use L</truncate-size> instead."
8229 #: ../fish/guestfish-actions.pod:1164
8231 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8232 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8233 "maximum size of files created through that call to 1GB."
8237 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1947
8239 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8240 "commands which create a file in the host and attach it as a device."
8244 #: ../fish/guestfish-actions.pod:1173
8249 #: ../fish/guestfish-actions.pod:1175
8252 " fgrep pattern path\n"
8257 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1962
8259 "This calls the external C<fgrep> program and returns the matching lines."
8263 #: ../fish/guestfish-actions.pod:1183
8268 #: ../fish/guestfish-actions.pod:1185
8271 " fgrepi pattern path\n"
8276 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1981
8278 "This calls the external C<fgrep -i> program and returns the matching lines."
8282 #: ../fish/guestfish-actions.pod:1193
8287 #: ../fish/guestfish-actions.pod:1195
8295 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:1999
8297 "This call uses the standard L<file(1)> command to determine the type or "
8298 "contents of the file."
8302 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2002
8304 "This call will also transparently look inside various types of compressed "
8309 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2005
8311 "The exact command which runs is C<file -zb path>. Note in particular that "
8312 "the filename is not prepended to the output (the I<-b> option)."
8316 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2009
8318 "The output depends on the output of the underlying L<file(1)> command and it"
8319 " can change in future in ways beyond our control. In other words, the "
8320 "output is not guaranteed by the ABI."
8324 #: ../fish/guestfish-actions.pod:1211
8326 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8327 "(etc), L</is-zero>."
8331 #: ../fish/guestfish-actions.pod:1214
8332 msgid "file-architecture"
8336 #: ../fish/guestfish-actions.pod:1216
8339 " file-architecture filename\n"
8344 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2027
8346 "This detects the architecture of the binary C<filename>, and returns it if "
8351 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2030
8352 msgid "Currently defined architectures are:"
8356 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2034
8361 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2036
8363 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8364 "irrespective of the precise processor requirements of the binary."
8368 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2039
8373 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2041
8374 msgid "64 bit x86-64."
8378 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2043
8383 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2045
8384 msgid "32 bit SPARC."
8388 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2047
8393 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2049
8394 msgid "64 bit SPARC V9 and above."
8398 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2051
8403 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2053
8404 msgid "Intel Itanium."
8408 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2055
8413 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2057
8414 msgid "32 bit Power PC."
8418 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2059
8423 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2061
8424 msgid "64 bit Power PC."
8428 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2065
8429 msgid "Libguestfs may return other architecture strings in future."
8433 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2067
8434 msgid "The function works on at least the following types of files:"
8438 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2073
8439 msgid "many types of Un*x and Linux binary"
8443 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2077
8444 msgid "many types of Un*x and Linux shared library"
8448 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2081
8449 msgid "Windows Win32 and Win64 binaries"
8453 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2085
8454 msgid "Windows Win32 and Win64 DLLs"
8458 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2087
8459 msgid "Win32 binaries and DLLs return C<i386>."
8463 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2089
8464 msgid "Win64 binaries and DLLs return C<x86_64>."
8468 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2093
8469 msgid "Linux kernel modules"
8473 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2097
8474 msgid "Linux new-style initrd images"
8478 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2101
8479 msgid "some non-x86 Linux vmlinuz kernels"
8483 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2105
8484 msgid "What it can't do currently:"
8488 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2111
8489 msgid "static libraries (libfoo.a)"
8493 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2115
8494 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8498 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2119
8499 msgid "x86 Linux vmlinuz kernels"
8503 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2121
8505 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8506 "compressed code, and are horribly hard to unpack. If you want to find the "
8507 "architecture of a kernel, use the architecture of the associated initrd or "
8508 "kernel module(s) instead."
8512 #: ../fish/guestfish-actions.pod:1319
8517 #: ../fish/guestfish-actions.pod:1321
8525 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2139
8526 msgid "This command returns the size of C<file> in bytes."
8530 #: ../fish/guestfish-actions.pod:1325
8532 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
8533 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
8537 #: ../fish/guestfish-actions.pod:1329
8542 #: ../fish/guestfish-actions.pod:1331
8545 " fill c len path\n"
8550 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2157
8552 "This command creates a new file called C<path>. The initial content of the "
8553 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
8558 #: ../fish/guestfish-actions.pod:1337
8560 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8561 "L</truncate-size>. To create a file with a pattern of repeating bytes use L"
8566 #: ../fish/guestfish-actions.pod:1342
8567 msgid "fill-pattern"
8571 #: ../fish/guestfish-actions.pod:1344
8574 " fill-pattern pattern len path\n"
8579 #: ../fish/guestfish-actions.pod:1346
8581 "This function is like L</fill> except that it creates a new file of length "
8582 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern"
8583 " is truncated if necessary to ensure the length of the file is exactly "
8588 #: ../fish/guestfish-actions.pod:1351
8593 #: ../fish/guestfish-actions.pod:1353
8601 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2203
8603 "This command lists out all files and directories, recursively, starting at "
8604 "C<directory>. It is essentially equivalent to running the shell command "
8605 "C<find directory -print> but some post-processing happens on the output, "
8610 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2208
8612 "This returns a list of strings I<without any prefix>. Thus if the directory"
8617 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2211
8627 #: ../fish/guestfish-actions.pod:1367
8628 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8632 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2218
8643 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2223
8645 "If C<directory> is not a directory, then this command returns an error."
8649 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2226
8650 msgid "The returned list is sorted."
8654 #: ../fish/guestfish-actions.pod:1380
8655 msgid "See also L</find0>."
8659 #: ../fish/guestfish-actions.pod:1385
8664 #: ../fish/guestfish-actions.pod:1387
8667 " find0 directory (files|-)\n"
8672 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2246
8674 "This command lists out all files and directories, recursively, starting at "
8675 "C<directory>, placing the resulting list in the external file called "
8680 #: ../fish/guestfish-actions.pod:1393
8682 "This command works the same way as L</find> with the following exceptions:"
8686 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2257
8687 msgid "The resulting list is written to an external file."
8691 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2261
8693 "Items (filenames) in the result are separated by C<\\0> characters. See "
8694 "L<find(1)> option I<-print0>."
8698 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2266
8699 msgid "This command is not limited in the number of names that it can return."
8703 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2271
8704 msgid "The result list is not sorted."
8708 #: ../fish/guestfish-actions.pod:1420
8709 msgid "findfs-label"
8713 #: ../fish/guestfish-actions.pod:1422
8716 " findfs-label label\n"
8721 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2285
8723 "This command searches the filesystems and returns the one which has the "
8724 "given label. An error is returned if no such filesystem can be found."
8728 #: ../fish/guestfish-actions.pod:1428
8729 msgid "To find the label of a filesystem, use L</vfs-label>."
8733 #: ../fish/guestfish-actions.pod:1430
8738 #: ../fish/guestfish-actions.pod:1432
8741 " findfs-uuid uuid\n"
8746 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2302
8748 "This command searches the filesystems and returns the one which has the "
8749 "given UUID. An error is returned if no such filesystem can be found."
8753 #: ../fish/guestfish-actions.pod:1438
8754 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8758 #: ../fish/guestfish-actions.pod:1440
8763 #: ../fish/guestfish-actions.pod:1442
8766 " fsck fstype device\n"
8771 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2320
8773 "This runs the filesystem checker (fsck) on C<device> which should have "
8774 "filesystem type C<fstype>."
8778 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2323
8780 "The returned integer is the status. See L<fsck(8)> for the list of status "
8781 "codes from C<fsck>."
8785 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2332
8786 msgid "Multiple status codes can be summed together."
8790 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2336
8792 "A non-zero return code can mean \"success\", for example if errors have been"
8793 " corrected on the filesystem."
8797 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2341
8798 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8802 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2346
8804 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8808 #: ../fish/guestfish-actions.pod:1472
8813 #: ../fish/guestfish-actions.pod:1474
8821 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2357
8823 "Return the additional kernel options which are added to the guest kernel "
8828 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2360
8829 msgid "If C<NULL> then no options are added."
8833 #: ../fish/guestfish-actions.pod:1481
8834 msgid "get-attach-method"
8838 #: ../fish/guestfish-actions.pod:1483
8841 " get-attach-method\n"
8846 #: ../fish/guestfish-actions.pod:1485
8847 msgid "Return the current attach method. See L</set-attach-method>."
8851 #: ../fish/guestfish-actions.pod:1487
8852 msgid "get-autosync"
8856 #: ../fish/guestfish-actions.pod:1489
8864 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2385
8865 msgid "Get the autosync flag."
8869 #: ../fish/guestfish-actions.pod:1493
8874 #: ../fish/guestfish-actions.pod:1495
8882 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2396
8883 msgid "Return the direct appliance mode flag."
8887 #: ../fish/guestfish-actions.pod:1499
8892 #: ../fish/guestfish-actions.pod:1501
8895 " get-e2label device\n"
8900 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2415
8902 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
8906 #: ../fish/guestfish-actions.pod:1506
8908 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
8913 #: ../fish/guestfish-actions.pod:1513
8918 #: ../fish/guestfish-actions.pod:1515
8921 " get-e2uuid device\n"
8926 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2436
8928 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
8932 #: ../fish/guestfish-actions.pod:1520
8934 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
8939 #: ../fish/guestfish-actions.pod:1527
8944 #: ../fish/guestfish-actions.pod:1529
8952 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2449
8954 "This gets the memory size in megabytes allocated to the qemu subprocess."
8958 #: ../fish/guestfish-actions.pod:1534
8960 "If L</set-memsize> was not called on this handle, and if "
8961 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default"
8962 " value for memsize."
8966 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:1595
8967 #: ../fish/guestfish-actions.pod:4375 ../fish/guestfish-actions.pod:4477
8968 #: ../src/guestfs-actions.pod:2456 ../src/guestfs-actions.pod:2548
8969 #: ../src/guestfs-actions.pod:6760 ../src/guestfs-actions.pod:6886
8971 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
8975 #: ../fish/guestfish-actions.pod:1541
8980 #: ../fish/guestfish-actions.pod:1543
8988 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2468
8989 msgid "This returns the enable network flag."
8993 #: ../fish/guestfish-actions.pod:1547
8998 #: ../fish/guestfish-actions.pod:1549
9006 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2479
9007 msgid "Return the current search path."
9011 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2481
9013 "This is always non-NULL. If it wasn't set already, then this will return "
9018 #: ../fish/guestfish-actions.pod:1556
9023 #: ../fish/guestfish-actions.pod:1558
9031 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2494
9032 msgid "This returns the process group flag."
9036 #: ../fish/guestfish-actions.pod:1562
9041 #: ../fish/guestfish-actions.pod:1564
9046 #: ../fish/guestfish-actions.pod:1566
9054 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2505
9056 "Return the process ID of the qemu subprocess. If there is no qemu "
9057 "subprocess, then this will return an error."
9061 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2508
9062 msgid "This is an internal call used for debugging and testing."
9066 #: ../fish/guestfish-actions.pod:1573
9071 #: ../fish/guestfish-actions.pod:1575
9079 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2519
9080 msgid "Return the current qemu binary."
9084 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2521
9086 "This is always non-NULL. If it wasn't set already, then this will return "
9087 "the default qemu binary name."
9091 #: ../fish/guestfish-actions.pod:1582
9092 msgid "get-recovery-proc"
9096 #: ../fish/guestfish-actions.pod:1584
9099 " get-recovery-proc\n"
9104 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2534
9105 msgid "Return the recovery process enabled flag."
9109 #: ../fish/guestfish-actions.pod:1588
9114 #: ../fish/guestfish-actions.pod:1590
9122 #: ../fish/guestfish-actions.pod:1592
9124 "This returns the current setting of the selinux flag which is passed to the "
9125 "appliance at boot time. See L</set-selinux>."
9129 #: ../fish/guestfish-actions.pod:1598
9134 #: ../fish/guestfish-actions.pod:1600
9142 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2560
9143 msgid "This returns the number of virtual CPUs assigned to the appliance."
9147 #: ../fish/guestfish-actions.pod:1604
9152 #: ../fish/guestfish-actions.pod:1606
9160 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2571
9162 "This returns the current state as an opaque integer. This is only useful "
9163 "for printing debug and internal error messages."
9167 #: ../fish/guestfish-actions.pod:1611 ../fish/guestfish-actions.pod:2570
9168 #: ../fish/guestfish-actions.pod:2588 ../fish/guestfish-actions.pod:2626
9169 #: ../fish/guestfish-actions.pod:2642 ../src/guestfs-actions.pod:2574
9170 #: ../src/guestfs-actions.pod:3893 ../src/guestfs-actions.pod:3922
9171 #: ../src/guestfs-actions.pod:3983 ../src/guestfs-actions.pod:4010
9172 msgid "For more information on states, see L<guestfs(3)>."
9176 #: ../fish/guestfish-actions.pod:1613
9181 #: ../fish/guestfish-actions.pod:1615
9189 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2585
9190 msgid "Return the command trace flag."
9194 #: ../fish/guestfish-actions.pod:1619
9199 #: ../fish/guestfish-actions.pod:1621
9207 #: ../fish/guestfish-actions.pod:1623
9209 "Return the current umask. By default the umask is C<022> unless it has been"
9210 " set by calling L</umask>."
9214 #: ../fish/guestfish-actions.pod:1626
9219 #: ../fish/guestfish-actions.pod:1628
9227 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2608
9228 msgid "This returns the verbose messages flag."
9232 #: ../fish/guestfish-actions.pod:1632
9237 #: ../fish/guestfish-actions.pod:1634
9245 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2619
9246 msgid "This gets the SELinux security context of the daemon."
9250 #: ../fish/guestfish-actions.pod:1638
9251 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9255 #: ../fish/guestfish-actions.pod:1641
9260 #: ../fish/guestfish-actions.pod:1643
9263 " getxattr path name\n"
9268 #: ../fish/guestfish-actions.pod:1645
9270 "Get a single extended attribute from file C<path> named C<name>. This call "
9271 "follows symlinks. If you want to lookup an extended attribute for the "
9272 "symlink itself, use L</lgetxattr>."
9276 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2715
9278 "Normally it is better to get all extended attributes from a file in one go "
9279 "by calling L</getxattrs>. However some Linux filesystem implementations are"
9280 " buggy and do not provide a way to list out attributes. For these "
9281 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9282 "attributes you want in advance and call this function."
9286 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2722
9287 #: ../src/guestfs-actions.pod:2648 ../src/guestfs-actions.pod:4143
9289 "Extended attribute values are blobs of binary data. If there is no extended"
9290 " attribute named C<name>, this returns an error."
9294 #: ../fish/guestfish-actions.pod:1659
9295 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9299 #: ../fish/guestfish-actions.pod:1661
9304 #: ../fish/guestfish-actions.pod:1663
9312 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2665
9314 "This call lists the extended attributes of the file or directory C<path>."
9318 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2668
9320 "At the system call level, this is a combination of the L<listxattr(2)> and "
9321 "L<getxattr(2)> calls."
9325 #: ../fish/guestfish-actions.pod:1671
9326 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9330 #: ../fish/guestfish-actions.pod:1673
9335 #: ../fish/guestfish-actions.pod:1675
9338 " glob-expand pattern\n"
9343 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2685
9345 "This command searches for all the pathnames matching C<pattern> according to"
9346 " the wildcard expansion rules used by the shell."
9350 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2689
9352 "If no paths match, then this returns an empty list (note: not an error)."
9356 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2692
9358 "It is just a wrapper around the C L<glob(3)> function with flags "
9359 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
9363 #: ../fish/guestfish-actions.pod:1688
9368 #: ../fish/guestfish-actions.pod:1690
9371 " grep regex path\n"
9376 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2709
9378 "This calls the external C<grep> program and returns the matching lines."
9382 #: ../fish/guestfish-actions.pod:1698
9387 #: ../fish/guestfish-actions.pod:1700
9390 " grepi regex path\n"
9395 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2728
9397 "This calls the external C<grep -i> program and returns the matching lines."
9401 #: ../fish/guestfish-actions.pod:1708
9402 msgid "grub-install"
9406 #: ../fish/guestfish-actions.pod:1710
9409 " grub-install root device\n"
9414 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2747
9416 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9417 "with the root directory being C<root>."
9421 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2756
9423 "There is currently no way in the API to install grub2, which is used by most"
9424 " modern Linux guests. It is possible to run the grub2 command from the "
9425 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9429 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2763
9431 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9432 "compatible with itself, so this only works in rather narrow circumstances. "
9433 "Careful testing with each guest version is advisable."
9437 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2770
9439 "If grub-install reports the error \"No suitable drive was found in the "
9440 "generated device map.\" it may be that you need to create a "
9441 "C</boot/grub/device.map> file first that contains the mapping between grub "
9442 "device names and Linux device names. It is usually sufficient to create a "
9447 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2777
9455 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2779
9456 msgid "replacing C</dev/vda> with the name of the installation device."
9460 #: ../fish/guestfish-actions.pod:1748
9465 #: ../fish/guestfish-actions.pod:1750
9473 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2793
9475 "This command returns up to the first 10 lines of a file as a list of "
9480 #: ../fish/guestfish-actions.pod:1758
9485 #: ../fish/guestfish-actions.pod:1760
9488 " head-n nrlines path\n"
9493 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2812
9495 "If the parameter C<nrlines> is a positive number, this returns the first "
9496 "C<nrlines> lines of the file C<path>."
9500 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2815
9502 "If the parameter C<nrlines> is a negative number, this returns lines from "
9503 "the file C<path>, excluding the last C<nrlines> lines."
9507 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4867
9508 #: ../src/guestfs-actions.pod:2818 ../src/guestfs-actions.pod:7474
9509 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9513 #: ../fish/guestfish-actions.pod:1773
9518 #: ../fish/guestfish-actions.pod:1775
9526 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2835
9528 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
9529 "readable, canonical hex dump of the file."
9533 #: ../fish/guestfish-actions.pod:1783
9538 #: ../fish/guestfish-actions.pod:1785
9541 " initrd-cat initrdpath filename\n"
9546 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2854
9548 "This command unpacks the file C<filename> from the initrd file called "
9549 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9554 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2858
9556 "For example, in guestfish you could use the following command to examine the"
9557 " boot script (usually called C</init>) contained in a Linux initrd or "
9562 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2862
9565 " initrd-cat /boot/initrd-<version>.img init\n"
9570 #: ../fish/guestfish-actions.pod:1797
9571 msgid "See also L</initrd-list>."
9575 #: ../fish/guestfish-actions.pod:1802
9580 #: ../fish/guestfish-actions.pod:1804
9583 " initrd-list path\n"
9588 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2881
9589 msgid "This command lists out files contained in an initrd."
9593 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2883
9595 "The files are listed without any initial C</> character. The files are "
9596 "listed in the order they appear (not necessarily alphabetical). Directory "
9597 "names are listed as separate items."
9601 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2887
9603 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9604 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9609 #: ../fish/guestfish-actions.pod:1816
9610 msgid "inotify-add-watch"
9614 #: ../fish/guestfish-actions.pod:1818
9617 " inotify-add-watch path mask\n"
9622 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2904
9623 msgid "Watch C<path> for the events listed in C<mask>."
9627 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2906
9629 "Note that if C<path> is a directory then events within that directory are "
9630 "watched, but this does I<not> happen recursively (in subdirectories)."
9634 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2910
9636 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9637 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9641 #: ../fish/guestfish-actions.pod:1830
9642 msgid "inotify-close"
9646 #: ../fish/guestfish-actions.pod:1832
9654 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2923
9656 "This closes the inotify handle which was previously opened by inotify_init."
9657 " It removes all watches, throws away any pending events, and deallocates "
9662 #: ../fish/guestfish-actions.pod:1838
9663 msgid "inotify-files"
9667 #: ../fish/guestfish-actions.pod:1840
9675 #: ../fish/guestfish-actions.pod:1842
9677 "This function is a helpful wrapper around L</inotify-read> which just "
9678 "returns a list of pathnames of objects that were touched. The returned "
9679 "pathnames are sorted and deduplicated."
9683 #: ../fish/guestfish-actions.pod:1846
9684 msgid "inotify-init"
9688 #: ../fish/guestfish-actions.pod:1848
9691 " inotify-init maxevents\n"
9696 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2952
9698 "This command creates a new inotify handle. The inotify subsystem can be "
9699 "used to notify events which happen to objects in the guest filesystem."
9703 #: ../fish/guestfish-actions.pod:1854
9705 "C<maxevents> is the maximum number of events which will be queued up between"
9706 " calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>,"
9707 " then the kernel (or previously set) default is used. For Linux 2.6.29 the"
9708 " default was 16384 events. Beyond this limit, the kernel throws away "
9709 "events, but records the fact that it threw them away by setting a flag "
9710 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9714 #: ../fish/guestfish-actions.pod:1864
9716 "Before any events are generated, you have to add some watches to the "
9717 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and L"
9718 "</inotify-watch-all>."
9722 #: ../fish/guestfish-actions.pod:1870
9724 "Queued up events should be read periodically by calling L</inotify-read> (or"
9725 " L</inotify-files> which is just a helpful wrapper around L</inotify-read>)."
9726 " If you don't read the events out often enough then you risk the internal "
9727 "queue overflowing."
9731 #: ../fish/guestfish-actions.pod:1877
9733 "The handle should be closed after use by calling L</inotify-close>. This "
9734 "also removes any watches automatically."
9738 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2983
9740 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9741 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9742 "that there is one global inotify handle per libguestfs instance."
9746 #: ../fish/guestfish-actions.pod:1886
9747 msgid "inotify-read"
9751 #: ../fish/guestfish-actions.pod:1888
9759 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:2997
9761 "Return the complete queue of events that have happened since the previous "
9766 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3000
9767 msgid "If no events have happened, this returns an empty list."
9771 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3002
9773 "I<Note>: In order to make sure that all events have been read, you must call"
9774 " this function repeatedly until it returns an empty list. The reason is "
9775 "that the call will read events up to the maximum appliance-to-host message "
9776 "size and leave remaining events in the queue."
9780 #: ../fish/guestfish-actions.pod:1901
9781 msgid "inotify-rm-watch"
9785 #: ../fish/guestfish-actions.pod:1903
9788 " inotify-rm-watch wd\n"
9793 #: ../fish/guestfish-actions.pod:1905
9794 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9798 #: ../fish/guestfish-actions.pod:1908
9799 msgid "inspect-get-arch"
9803 #: ../fish/guestfish-actions.pod:1910
9806 " inspect-get-arch root\n"
9811 #: ../fish/guestfish-actions.pod:1912
9813 "This returns the architecture of the inspected operating system. The "
9814 "possible return values are listed under L</file-architecture>."
9818 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3037
9820 "If the architecture could not be determined, then the string C<unknown> is "
9825 #: ../fish/guestfish-actions.pod:1919 ../fish/guestfish-actions.pod:2014
9826 #: ../fish/guestfish-actions.pod:2093 ../fish/guestfish-actions.pod:2105
9827 #: ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2251
9828 #: ../fish/guestfish-actions.pod:2272 ../fish/guestfish-actions.pod:2286
9829 #: ../fish/guestfish-actions.pod:2326 ../fish/guestfish-actions.pod:2362
9830 #: ../fish/guestfish-actions.pod:2375 ../fish/guestfish-actions.pod:2388
9831 #: ../fish/guestfish-actions.pod:2398 ../fish/guestfish-actions.pod:2408
9832 #: ../fish/guestfish-actions.pod:2420 ../fish/guestfish-actions.pod:2516
9833 #: ../fish/guestfish-actions.pod:2550 ../src/guestfs-actions.pod:3040
9834 #: ../src/guestfs-actions.pod:3142 ../src/guestfs-actions.pod:3246
9835 #: ../src/guestfs-actions.pod:3265 ../src/guestfs-actions.pod:3396
9836 #: ../src/guestfs-actions.pod:3480 ../src/guestfs-actions.pod:3508
9837 #: ../src/guestfs-actions.pod:3529 ../src/guestfs-actions.pod:3582
9838 #: ../src/guestfs-actions.pod:3626 ../src/guestfs-actions.pod:3646
9839 #: ../src/guestfs-actions.pod:3666 ../src/guestfs-actions.pod:3683
9840 #: ../src/guestfs-actions.pod:3699 ../src/guestfs-actions.pod:3717
9841 #: ../src/guestfs-actions.pod:3819 ../src/guestfs-actions.pod:3860
9842 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9846 #: ../fish/guestfish-actions.pod:1921
9847 msgid "inspect-get-distro"
9851 #: ../fish/guestfish-actions.pod:1923
9854 " inspect-get-distro root\n"
9859 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3053
9861 "This returns the distro (distribution) of the inspected operating system."
9865 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3056
9866 msgid "Currently defined distros are:"
9870 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3060
9871 msgid "\"archlinux\""
9875 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3062
9880 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3064
9885 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3066
9890 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3068
9895 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3070
9900 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3072
9905 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3074
9910 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3076
9915 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3078
9920 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3080
9921 msgid "\"linuxmint\""
9925 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3082
9930 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3084
9935 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3086
9940 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3088
9941 msgid "\"mandriva\""
9945 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3090
9950 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3092
9955 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3094
9960 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3096
9961 msgid "\"opensuse\""
9965 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3098
9970 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3100
9975 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3102
9980 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3104
9981 msgid "\"redhat-based\""
9985 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3106
9986 msgid "Some Red Hat-derived distro."
9990 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3108
9995 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3110
9996 msgid "Red Hat Enterprise Linux."
10000 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3112
10001 msgid "\"scientificlinux\""
10005 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3114
10006 msgid "Scientific Linux."
10010 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3116
10011 msgid "\"slackware\""
10015 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3118
10020 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3120
10021 msgid "\"ttylinux\""
10025 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3122
10030 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3124
10035 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3126
10040 #: ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2084
10041 #: ../fish/guestfish-actions.pod:2353 ../src/guestfs-actions.pod:3128
10042 #: ../src/guestfs-actions.pod:3237 ../src/guestfs-actions.pod:3617
10043 msgid "\"unknown\""
10047 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3130
10048 msgid "The distro could not be determined."
10052 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341
10053 #: ../src/guestfs-actions.pod:3132 ../src/guestfs-actions.pod:3605
10054 msgid "\"windows\""
10058 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3134
10060 "Windows does not have distributions. This string is returned if the OS type"
10065 #: ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2090
10066 #: ../fish/guestfish-actions.pod:2359 ../src/guestfs-actions.pod:3139
10067 #: ../src/guestfs-actions.pod:3243 ../src/guestfs-actions.pod:3623
10069 "Future versions of libguestfs may return other strings here. The caller "
10070 "should be prepared to handle any string."
10074 #: ../fish/guestfish-actions.pod:2016
10075 msgid "inspect-get-drive-mappings"
10079 #: ../fish/guestfish-actions.pod:2018
10082 " inspect-get-drive-mappings root\n"
10087 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3155
10089 "This call is useful for Windows which uses a primitive system of assigning "
10090 "drive letters (like \"C:\") to partitions. This inspection API examines the"
10091 " Windows Registry to find out how disks/partitions are mapped to drive "
10092 "letters, and returns a hash table as in the example below:"
10096 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3161
10099 " C => /dev/vda2\n"
10100 " E => /dev/vdb1\n"
10101 " F => /dev/vdc1\n"
10106 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3165
10108 "Note that keys are drive letters. For Windows, the key is case insensitive "
10109 "and just contains the drive letter, without the customary colon separator "
10114 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3169
10116 "In future we may support other operating systems that also used drive "
10117 "letters, but the keys for those might not be case insensitive and might be "
10118 "longer than 1 character. For example in OS-9, hard drives were named C<h0>,"
10123 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3174
10125 "For Windows guests, currently only hard drive mappings are returned. "
10126 "Removable disks (eg. DVD-ROMs) are ignored."
10130 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3177
10132 "For guests that do not use drive mappings, or if the drive mappings could "
10133 "not be determined, this returns an empty hash table."
10137 #: ../fish/guestfish-actions.pod:2045
10139 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10140 "get-mountpoints>, L</inspect-get-filesystems>."
10144 #: ../fish/guestfish-actions.pod:2049
10145 msgid "inspect-get-filesystems"
10149 #: ../fish/guestfish-actions.pod:2051
10152 " inspect-get-filesystems root\n"
10157 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3198
10159 "This returns a list of all the filesystems that we think are associated with"
10160 " this operating system. This includes the root filesystem, other ordinary "
10161 "filesystems, and non-mounted devices like swap partitions."
10165 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3203
10167 "In the case of a multi-boot virtual machine, it is possible for a filesystem"
10168 " to be shared between operating systems."
10172 #: ../fish/guestfish-actions.pod:2061
10174 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10175 "get-mountpoints>."
10179 #: ../fish/guestfish-actions.pod:2064
10180 msgid "inspect-get-format"
10184 #: ../fish/guestfish-actions.pod:2066
10187 " inspect-get-format root\n"
10192 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3221
10194 "This returns the format of the inspected operating system. You can use it "
10195 "to detect install images, live CDs and similar."
10199 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3224
10200 msgid "Currently defined formats are:"
10204 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3228
10205 msgid "\"installed\""
10209 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3230
10210 msgid "This is an installed operating system."
10214 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3232
10215 msgid "\"installer\""
10219 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3234
10221 "The disk image being inspected is not an installed operating system, but a "
10222 "I<bootable> install disk, live CD, or similar."
10226 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3239
10227 msgid "The format of this disk image is not known."
10231 #: ../fish/guestfish-actions.pod:2095
10232 msgid "inspect-get-hostname"
10236 #: ../fish/guestfish-actions.pod:2097
10239 " inspect-get-hostname root\n"
10244 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3259
10246 "This function returns the hostname of the operating system as found by "
10247 "inspection of the guest's configuration files."
10251 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3262
10253 "If the hostname could not be determined, then the string C<unknown> is "
10258 #: ../fish/guestfish-actions.pod:2107
10259 msgid "inspect-get-icon"
10263 #: ../fish/guestfish-actions.pod:2109
10266 " inspect-get-icon root [favicon:..] [highquality:..]\n"
10271 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3288
10273 "This function returns an icon corresponding to the inspected operating "
10274 "system. The icon is returned as a buffer containing a PNG image (re-encoded"
10275 " to PNG if necessary)."
10279 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3292
10281 "If it was not possible to get an icon this function returns a zero-length "
10282 "(non-NULL) buffer. I<Callers must check for this case>."
10286 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3295
10288 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10289 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10290 "this file will be returned. You can disable favicons by passing the "
10291 "optional C<favicon> boolean as false (default is true)."
10295 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3301
10297 "If finding the favicon fails, then we look in other places in the guest for "
10302 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3304
10304 "If the optional C<highquality> boolean is true then only high quality icons "
10305 "are returned, which means only icons of high resolution with an alpha "
10306 "channel. The default (false) is to return any icon we can, even if it is of"
10307 " substandard quality."
10311 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3315
10313 "Unlike most other inspection API calls, the guest's disks must be mounted up"
10314 " before you call this, since it needs to read information from the guest "
10315 "filesystem during the call."
10319 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3321
10321 "B<Security:> The icon data comes from the untrusted guest, and should be "
10322 "treated with caution. PNG files have been known to contain exploits. "
10323 "Ensure that libpng (or other relevant libraries) are fully up to date before"
10324 " trying to process or display the icon."
10328 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3329
10330 "The PNG image returned can be any size. It might not be square. Libguestfs"
10331 " tries to return the largest, highest quality icon available. The "
10332 "application must scale the icon to the required size."
10336 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3336
10338 "Extracting icons from Windows guests requires the external C<wrestool> "
10339 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10340 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10341 "installed separately."
10345 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3343
10347 "Operating system icons are usually trademarks. Seek legal advice before "
10348 "using trademarks in applications."
10352 #: ../fish/guestfish-actions.pod:2173
10353 msgid "inspect-get-major-version"
10357 #: ../fish/guestfish-actions.pod:2175
10360 " inspect-get-major-version root\n"
10365 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3384
10367 "This returns the major version number of the inspected operating system."
10371 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3387
10373 "Windows uses a consistent versioning scheme which is I<not> reflected in the"
10374 " popular public names used by the operating system. Notably the operating "
10375 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10376 "1). You can find out the real versions corresponding to releases of Windows"
10377 " by consulting Wikipedia or MSDN."
10381 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198
10382 #: ../src/guestfs-actions.pod:3394 ../src/guestfs-actions.pod:3411
10383 msgid "If the version could not be determined, then C<0> is returned."
10387 #: ../fish/guestfish-actions.pod:2191
10388 msgid "inspect-get-minor-version"
10392 #: ../fish/guestfish-actions.pod:2193
10395 " inspect-get-minor-version root\n"
10400 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3408
10402 "This returns the minor version number of the inspected operating system."
10406 #: ../fish/guestfish-actions.pod:2200
10408 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10409 "get-major-version>."
10413 #: ../fish/guestfish-actions.pod:2203
10414 msgid "inspect-get-mountpoints"
10418 #: ../fish/guestfish-actions.pod:2205
10421 " inspect-get-mountpoints root\n"
10426 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3426
10428 "This returns a hash of where we think the filesystems associated with this "
10429 "operating system should be mounted. Callers should note that this is at "
10430 "best an educated guess made by reading configuration files such as "
10431 "C</etc/fstab>. I<In particular note> that this may return filesystems which"
10432 " are non-existent or not mountable and callers should be prepared to handle "
10433 "or ignore failures if they try to mount them."
10437 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3435
10439 "Each element in the returned hashtable has a key which is the path of the "
10440 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10441 "mounted there (eg. C</dev/sda1>)."
10445 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3440
10447 "Non-mounted devices such as swap devices are I<not> returned in this list."
10451 #: ../fish/guestfish-actions.pod:2224
10453 "For operating systems like Windows which still use drive letters, this call "
10454 "will only return an entry for the first drive \"mounted on\" C</>. For "
10455 "information about the mapping of drive letters to partitions, see L"
10456 "</inspect-get-drive-mappings>."
10460 #: ../fish/guestfish-actions.pod:2230
10462 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10463 "get-filesystems>."
10467 #: ../fish/guestfish-actions.pod:2233
10468 msgid "inspect-get-package-format"
10472 #: ../fish/guestfish-actions.pod:2235
10475 " inspect-get-package-format root\n"
10480 #: ../fish/guestfish-actions.pod:2237
10482 "This function and L</inspect-get-package-management> return the package "
10483 "format and package management tool used by the inspected operating system. "
10484 "For example for Fedora these functions would return C<rpm> (package format) "
10485 "and C<yum> (package management)."
10489 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3472
10491 "This returns the string C<unknown> if we could not determine the package "
10492 "format I<or> if the operating system does not have a real packaging system "
10497 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3476
10499 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10500 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10504 #: ../fish/guestfish-actions.pod:2253
10505 msgid "inspect-get-package-management"
10509 #: ../fish/guestfish-actions.pod:2255
10512 " inspect-get-package-management root\n"
10517 #: ../fish/guestfish-actions.pod:2257
10519 "L</inspect-get-package-format> and this function return the package format "
10520 "and package management tool used by the inspected operating system. For "
10521 "example for Fedora these functions would return C<rpm> (package format) and "
10522 "C<yum> (package management)."
10526 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3499
10528 "This returns the string C<unknown> if we could not determine the package "
10529 "management tool I<or> if the operating system does not have a real packaging"
10530 " system (eg. Windows)."
10534 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3503
10536 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10537 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10538 "versions of libguestfs may return other strings."
10542 #: ../fish/guestfish-actions.pod:2274
10543 msgid "inspect-get-product-name"
10547 #: ../fish/guestfish-actions.pod:2276
10550 " inspect-get-product-name root\n"
10555 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3521
10557 "This returns the product name of the inspected operating system. The "
10558 "product name is generally some freeform string which can be displayed to the"
10559 " user, but should not be parsed by programs."
10563 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3526
10565 "If the product name could not be determined, then the string C<unknown> is "
10570 #: ../fish/guestfish-actions.pod:2288
10571 msgid "inspect-get-product-variant"
10575 #: ../fish/guestfish-actions.pod:2290
10578 " inspect-get-product-variant root\n"
10583 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3542
10584 msgid "This returns the product variant of the inspected operating system."
10588 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3545
10590 "For Windows guests, this returns the contents of the Registry key "
10591 "C<HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType>"
10592 " which is usually a string such as C<Client> or C<Server> (other values are "
10593 "possible). This can be used to distinguish consumer and enterprise versions"
10594 " of Windows that have the same version number (for example, Windows 7 and "
10595 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10596 "the latter is C<Server>)."
10600 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3554
10602 "For enterprise Linux guests, in future we intend this to return the product "
10603 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10604 "implemented at present."
10608 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3558
10610 "If the product variant could not be determined, then the string C<unknown> "
10615 #: ../fish/guestfish-actions.pod:2311
10617 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10618 "get-product-name>, L</inspect-get-major-version>."
10622 #: ../fish/guestfish-actions.pod:2315
10623 msgid "inspect-get-roots"
10627 #: ../fish/guestfish-actions.pod:2317
10630 " inspect-get-roots\n"
10635 #: ../fish/guestfish-actions.pod:2319
10637 "This function is a convenient way to get the list of root devices, as "
10638 "returned from a previous call to L</inspect-os>, but without redoing the "
10639 "whole inspection process."
10643 #: ../fish/guestfish-actions.pod:2323
10645 "This returns an empty list if either no root devices were found or the "
10646 "caller has not called L</inspect-os>."
10650 #: ../fish/guestfish-actions.pod:2328
10651 msgid "inspect-get-type"
10655 #: ../fish/guestfish-actions.pod:2330
10658 " inspect-get-type root\n"
10663 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3596
10665 "This returns the type of the inspected operating system. Currently defined "
10670 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3601
10675 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3603
10676 msgid "Any Linux-based operating system."
10680 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3607
10681 msgid "Any Microsoft Windows operating system."
10685 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3609
10686 msgid "\"freebsd\""
10690 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3611
10695 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3613
10700 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3615
10705 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3619
10706 msgid "The operating system type could not be determined."
10710 #: ../fish/guestfish-actions.pod:2364
10711 msgid "inspect-get-windows-current-control-set"
10715 #: ../fish/guestfish-actions.pod:2366
10718 " inspect-get-windows-current-control-set root\n"
10723 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3639
10725 "This returns the Windows CurrentControlSet of the inspected guest. The "
10726 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10730 #: ../fish/guestfish-actions.pod:2371 ../src/guestfs-actions.pod:3642
10732 "This call assumes that the guest is Windows and that the Registry could be "
10733 "examined by inspection. If this is not the case then an error is returned."
10737 #: ../fish/guestfish-actions.pod:2377
10738 msgid "inspect-get-windows-systemroot"
10742 #: ../fish/guestfish-actions.pod:2379
10745 " inspect-get-windows-systemroot root\n"
10750 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3659
10752 "This returns the Windows systemroot of the inspected guest. The systemroot "
10753 "is a directory path such as C</WINDOWS>."
10757 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3662
10759 "This call assumes that the guest is Windows and that the systemroot could be"
10760 " determined by inspection. If this is not the case then an error is "
10765 #: ../fish/guestfish-actions.pod:2390
10766 msgid "inspect-is-live"
10770 #: ../fish/guestfish-actions.pod:2392
10773 " inspect-is-live root\n"
10778 #: ../fish/guestfish-actions.pod:2394
10780 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10781 "then this returns true if a live image was detected on the disk."
10785 #: ../fish/guestfish-actions.pod:2400
10786 msgid "inspect-is-multipart"
10790 #: ../fish/guestfish-actions.pod:2402
10793 " inspect-is-multipart root\n"
10798 #: ../fish/guestfish-actions.pod:2404
10800 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10801 "then this returns true if the disk is part of a set."
10805 #: ../fish/guestfish-actions.pod:2410
10806 msgid "inspect-is-netinst"
10810 #: ../fish/guestfish-actions.pod:2412
10813 " inspect-is-netinst root\n"
10818 #: ../fish/guestfish-actions.pod:2414
10820 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10821 "then this returns true if the disk is a network installer, ie. not a self-"
10822 "contained install CD but one which is likely to require network access to "
10823 "complete the install."
10827 #: ../fish/guestfish-actions.pod:2422
10828 msgid "inspect-list-applications"
10832 #: ../fish/guestfish-actions.pod:2424
10835 " inspect-list-applications root\n"
10840 #: ../fish/guestfish-actions.pod:2426 ../src/guestfs-actions.pod:3729
10841 msgid "Return the list of applications installed in the operating system."
10845 #: ../fish/guestfish-actions.pod:2428
10847 "I<Note:> This call works differently from other parts of the inspection API."
10848 " You have to call L</inspect-os>, then L</inspect-get-mountpoints>, then "
10849 "mount up the disks, before calling this. Listing applications is a "
10850 "significantly more difficult operation which requires access to the full "
10851 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10852 "are just returning data cached in the libguestfs handle, this call actually "
10853 "reads parts of the mounted filesystems during the call."
10857 #: ../fish/guestfish-actions.pod:2438 ../src/guestfs-actions.pod:3741
10859 "This returns an empty list if the inspection code was not able to determine "
10860 "the list of applications."
10864 #: ../fish/guestfish-actions.pod:2441 ../src/guestfs-actions.pod:3744
10865 msgid "The application structure contains the following fields:"
10869 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3748
10870 msgid "C<app_name>"
10874 #: ../fish/guestfish-actions.pod:2447 ../src/guestfs-actions.pod:3750
10876 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10877 "guests, this is the package name."
10881 #: ../fish/guestfish-actions.pod:2450 ../src/guestfs-actions.pod:3753
10882 msgid "C<app_display_name>"
10886 #: ../fish/guestfish-actions.pod:2452 ../src/guestfs-actions.pod:3755
10888 "The display name of the application, sometimes localized to the install "
10889 "language of the guest operating system."
10893 #: ../fish/guestfish-actions.pod:2455 ../src/guestfs-actions.pod:3758
10895 "If unavailable this is returned as an empty string C<\"\">. Callers needing"
10896 " to display something can use C<app_name> instead."
10900 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3761
10901 msgid "C<app_epoch>"
10905 #: ../fish/guestfish-actions.pod:2460 ../src/guestfs-actions.pod:3763
10907 "For package managers which use epochs, this contains the epoch of the "
10908 "package (an integer). If unavailable, this is returned as C<0>."
10912 #: ../fish/guestfish-actions.pod:2463 ../src/guestfs-actions.pod:3766
10913 msgid "C<app_version>"
10917 #: ../fish/guestfish-actions.pod:2465 ../src/guestfs-actions.pod:3768
10919 "The version string of the application or package. If unavailable this is "
10920 "returned as an empty string C<\"\">."
10924 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3771
10925 msgid "C<app_release>"
10929 #: ../fish/guestfish-actions.pod:2470 ../src/guestfs-actions.pod:3773
10931 "The release string of the application or package, for package managers that "
10932 "use this. If unavailable this is returned as an empty string C<\"\">."
10936 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3777
10937 msgid "C<app_install_path>"
10941 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3779
10943 "The installation path of the application (on operating systems such as "
10944 "Windows which use installation paths). This path is in the format used by "
10945 "the guest operating system, it is not a libguestfs path."
10949 #: ../fish/guestfish-actions.pod:2481 ../src/guestfs-actions.pod:3784
10950 msgid "If unavailable this is returned as an empty string C<\"\">."
10954 #: ../fish/guestfish-actions.pod:2483 ../src/guestfs-actions.pod:3786
10955 msgid "C<app_trans_path>"
10959 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3788
10961 "The install path translated into a libguestfs path. If unavailable this is "
10962 "returned as an empty string C<\"\">."
10966 #: ../fish/guestfish-actions.pod:2488 ../src/guestfs-actions.pod:3791
10967 msgid "C<app_publisher>"
10971 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3793
10973 "The name of the publisher of the application, for package managers that use "
10974 "this. If unavailable this is returned as an empty string C<\"\">."
10978 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3797
10983 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3799
10985 "The URL (eg. upstream URL) of the application. If unavailable this is "
10986 "returned as an empty string C<\"\">."
10990 #: ../fish/guestfish-actions.pod:2499 ../src/guestfs-actions.pod:3802
10991 msgid "C<app_source_package>"
10995 #: ../fish/guestfish-actions.pod:2501 ../src/guestfs-actions.pod:3804
10997 "For packaging systems which support this, the name of the source package. "
10998 "If unavailable this is returned as an empty string C<\"\">."
11002 #: ../fish/guestfish-actions.pod:2504 ../src/guestfs-actions.pod:3807
11003 msgid "C<app_summary>"
11007 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:3809
11009 "A short (usually one line) description of the application or package. If "
11010 "unavailable this is returned as an empty string C<\"\">."
11014 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3812
11015 msgid "C<app_description>"
11019 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3814
11021 "A longer description of the application or package. If unavailable this is "
11022 "returned as an empty string C<\"\">."
11026 #: ../fish/guestfish-actions.pod:2518
11031 #: ../fish/guestfish-actions.pod:2520
11039 #: ../fish/guestfish-actions.pod:2522 ../src/guestfs-actions.pod:3832
11041 "This function uses other libguestfs functions and certain heuristics to "
11042 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11043 "for operating systems."
11047 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3836
11048 msgid "The list returned is empty if no operating systems were found."
11052 #: ../fish/guestfish-actions.pod:2528 ../src/guestfs-actions.pod:3838
11054 "If one operating system was found, then this returns a list with a single "
11055 "element, which is the name of the root filesystem of this operating system."
11056 " It is also possible for this function to return a list containing more "
11057 "than one element, indicating a dual-boot or multi-boot virtual machine, with"
11058 " each element being the root filesystem of one of the operating systems."
11062 #: ../fish/guestfish-actions.pod:2535
11064 "You can pass the root string(s) returned to other L</inspect-get-*> "
11065 "functions in order to query further information about each operating system,"
11066 " such as the name and version."
11070 #: ../fish/guestfish-actions.pod:2540
11072 "This function uses other libguestfs features such as L</mount-ro> and L"
11073 "</umount-all> in order to mount and unmount filesystems and look at the "
11074 "contents. This should be called with no disks currently mounted. The "
11075 "function may also use Augeas, so any existing Augeas handle will be closed."
11079 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3856
11081 "This function cannot decrypt encrypted disks. The caller must do that first"
11082 " (supplying the necessary keys) if the disk is encrypted."
11086 #: ../fish/guestfish-actions.pod:2552 ../fish/guestfish-actions.pod:2750
11087 #: ../fish/guestfish-actions.pod:2809
11088 msgid "See also L</list-filesystems>."
11092 #: ../fish/guestfish-actions.pod:2554
11093 msgid "is-blockdev"
11097 #: ../fish/guestfish-actions.pod:2556
11100 " is-blockdev path\n"
11105 #: ../fish/guestfish-actions.pod:2558 ../src/guestfs-actions.pod:3876
11107 "This returns C<true> if and only if there is a block device with the given "
11112 #: ../fish/guestfish-actions.pod:2561 ../fish/guestfish-actions.pod:2579
11113 #: ../fish/guestfish-actions.pod:2598 ../fish/guestfish-actions.pod:2607
11114 #: ../fish/guestfish-actions.pod:2617 ../fish/guestfish-actions.pod:2651
11115 #: ../fish/guestfish-actions.pod:2660
11116 msgid "See also L</stat>."
11120 #: ../fish/guestfish-actions.pod:2563
11125 #: ../fish/guestfish-actions.pod:2565
11133 #: ../fish/guestfish-actions.pod:2567 ../src/guestfs-actions.pod:3890
11135 "This returns true iff this handle is busy processing a command (in the "
11140 #: ../fish/guestfish-actions.pod:2572
11145 #: ../fish/guestfish-actions.pod:2574
11148 " is-chardev path\n"
11153 #: ../fish/guestfish-actions.pod:2576 ../src/guestfs-actions.pod:3905
11155 "This returns C<true> if and only if there is a character device with the "
11156 "given C<path> name."
11160 #: ../fish/guestfish-actions.pod:2581
11165 #: ../fish/guestfish-actions.pod:2583
11173 #: ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3919
11175 "This returns true iff this handle is being configured (in the C<CONFIG> "
11180 #: ../fish/guestfish-actions.pod:2590
11185 #: ../fish/guestfish-actions.pod:2592
11193 #: ../fish/guestfish-actions.pod:2594 ../src/guestfs-actions.pod:3934
11195 "This returns C<true> if and only if there is a directory with the given "
11196 "C<path> name. Note that it returns false for other objects like files."
11200 #: ../fish/guestfish-actions.pod:2600
11205 #: ../fish/guestfish-actions.pod:2602
11213 #: ../fish/guestfish-actions.pod:2604 ../src/guestfs-actions.pod:3950
11215 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11216 "given C<path> name."
11220 #: ../fish/guestfish-actions.pod:2609
11225 #: ../fish/guestfish-actions.pod:2611
11233 #: ../fish/guestfish-actions.pod:2613 ../src/guestfs-actions.pod:3965
11235 "This returns C<true> if and only if there is a regular file with the given "
11236 "C<path> name. Note that it returns false for other objects like "
11241 #: ../fish/guestfish-actions.pod:2619
11242 msgid "is-launching"
11246 #: ../fish/guestfish-actions.pod:2621
11254 #: ../fish/guestfish-actions.pod:2623 ../src/guestfs-actions.pod:3980
11256 "This returns true iff this handle is launching the subprocess (in the "
11257 "C<LAUNCHING> state)."
11261 #: ../fish/guestfish-actions.pod:2628
11266 #: ../fish/guestfish-actions.pod:2630
11274 #: ../fish/guestfish-actions.pod:2632 ../src/guestfs-actions.pod:3995
11276 "This command tests whether C<device> is a logical volume, and returns true "
11277 "iff this is the case."
11281 #: ../fish/guestfish-actions.pod:2635
11286 #: ../fish/guestfish-actions.pod:2637
11294 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4007
11296 "This returns true iff this handle is ready to accept commands (in the "
11301 #: ../fish/guestfish-actions.pod:2644
11306 #: ../fish/guestfish-actions.pod:2646
11309 " is-socket path\n"
11314 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4022
11316 "This returns C<true> if and only if there is a Unix domain socket with the "
11317 "given C<path> name."
11321 #: ../fish/guestfish-actions.pod:2653
11326 #: ../fish/guestfish-actions.pod:2655
11329 " is-symlink path\n"
11334 #: ../fish/guestfish-actions.pod:2657 ../src/guestfs-actions.pod:4037
11336 "This returns C<true> if and only if there is a symbolic link with the given "
11341 #: ../fish/guestfish-actions.pod:2662
11346 #: ../fish/guestfish-actions.pod:2664
11354 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:4052
11356 "This returns true iff the file exists and the file is empty or it contains "
11361 #: ../fish/guestfish-actions.pod:2669
11362 msgid "is-zero-device"
11366 #: ../fish/guestfish-actions.pod:2671
11369 " is-zero-device device\n"
11374 #: ../fish/guestfish-actions.pod:2673 ../src/guestfs-actions.pod:4065
11375 msgid "This returns true iff the device exists and contains all zero bytes."
11379 #: ../fish/guestfish-actions.pod:2675 ../src/guestfs-actions.pod:4067
11380 msgid "Note that for large devices this can take a long time to run."
11384 #: ../fish/guestfish-actions.pod:2677
11385 msgid "kill-subprocess"
11389 #: ../fish/guestfish-actions.pod:2679
11392 " kill-subprocess\n"
11397 #: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:4078
11398 msgid "This kills the qemu subprocess. You should never need to call this."
11402 #: ../fish/guestfish-actions.pod:2683
11407 #: ../fish/guestfish-actions.pod:2685
11412 #: ../fish/guestfish-actions.pod:2687
11420 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:4089
11422 "Internally libguestfs is implemented by running a virtual machine using "
11427 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4092
11429 "You should call this after configuring the handle (eg. adding drives) but "
11430 "before performing any actions."
11434 #: ../fish/guestfish-actions.pod:2695
11439 #: ../fish/guestfish-actions.pod:2697
11442 " lchown owner group path\n"
11447 #: ../fish/guestfish-actions.pod:2699
11449 "Change the file owner to C<owner> and group to C<group>. This is like "
11450 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
11455 #: ../fish/guestfish-actions.pod:2707
11460 #: ../fish/guestfish-actions.pod:2709
11463 " lgetxattr path name\n"
11468 #: ../fish/guestfish-actions.pod:2711 ../src/guestfs-actions.pod:4132
11470 "Get a single extended attribute from file C<path> named C<name>. If C<path>"
11471 " is a symlink, then this call returns an extended attribute from the "
11476 #: ../fish/guestfish-actions.pod:2725
11477 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11481 #: ../fish/guestfish-actions.pod:2727
11486 #: ../fish/guestfish-actions.pod:2729
11489 " lgetxattrs path\n"
11494 #: ../fish/guestfish-actions.pod:2731
11496 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11497 "it returns the extended attributes of the link itself."
11501 #: ../fish/guestfish-actions.pod:2735
11506 #: ../fish/guestfish-actions.pod:2737
11514 #: ../fish/guestfish-actions.pod:2739 ../src/guestfs-actions.pod:4175
11516 "List all 9p filesystems attached to the guest. A list of mount tags is "
11521 #: ../fish/guestfish-actions.pod:2742
11522 msgid "list-devices"
11526 #: ../fish/guestfish-actions.pod:2744
11534 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4189
11535 msgid "List all the block devices."
11539 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4191
11540 msgid "The full block device names are returned, eg. C</dev/sda>."
11544 #: ../fish/guestfish-actions.pod:2752
11545 msgid "list-dm-devices"
11549 #: ../fish/guestfish-actions.pod:2754
11552 " list-dm-devices\n"
11557 #: ../fish/guestfish-actions.pod:2756 ../src/guestfs-actions.pod:4206
11558 msgid "List all device mapper devices."
11562 #: ../fish/guestfish-actions.pod:2758
11564 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11565 "previous call to L</luks-open>."
11569 #: ../fish/guestfish-actions.pod:2761
11571 "Device mapper devices which correspond to logical volumes are I<not> "
11572 "returned in this list. Call L</lvs> if you want to list logical volumes."
11576 #: ../fish/guestfish-actions.pod:2765
11577 msgid "list-filesystems"
11581 #: ../fish/guestfish-actions.pod:2767
11584 " list-filesystems\n"
11589 #: ../fish/guestfish-actions.pod:2769 ../src/guestfs-actions.pod:4226
11591 "This inspection command looks for filesystems on partitions, block devices "
11592 "and logical volumes, returning a list of devices containing filesystems and "
11597 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4230
11599 "The return value is a hash, where the keys are the devices containing "
11600 "filesystems, and the values are the filesystem types. For example:"
11604 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4234
11607 " \"/dev/sda1\" => \"ntfs\"\n"
11608 " \"/dev/sda2\" => \"ext2\"\n"
11609 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11610 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11615 #: ../fish/guestfish-actions.pod:2782 ../src/guestfs-actions.pod:4239
11617 "The value can have the special value \"unknown\", meaning the content of the"
11618 " device is undetermined or empty. \"swap\" means a Linux swap partition."
11622 #: ../fish/guestfish-actions.pod:2786
11624 "This command runs other libguestfs commands, which might include L</mount> "
11625 "and L</umount>, and therefore you should use this soon after launch and only"
11626 " when nothing is mounted."
11630 #: ../fish/guestfish-actions.pod:2790
11632 "Not all of the filesystems returned will be mountable. In particular, swap "
11633 "partitions are returned in the list. Also this command does not check that "
11634 "each filesystem found is valid and mountable, and some filesystems might be "
11635 "mountable but require special options. Filesystems may not all belong to a "
11636 "single logical operating system (use L</inspect-os> to look for OSes)."
11640 #: ../fish/guestfish-actions.pod:2798
11641 msgid "list-partitions"
11645 #: ../fish/guestfish-actions.pod:2800
11648 " list-partitions\n"
11653 #: ../fish/guestfish-actions.pod:2802 ../src/guestfs-actions.pod:4268
11654 msgid "List all the partitions detected on all block devices."
11658 #: ../fish/guestfish-actions.pod:2804 ../src/guestfs-actions.pod:4270
11659 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11663 #: ../fish/guestfish-actions.pod:2806
11665 "This does not return logical volumes. For that you will need to call "
11670 #: ../fish/guestfish-actions.pod:2811
11675 #: ../fish/guestfish-actions.pod:2813
11683 #: ../fish/guestfish-actions.pod:2815 ../src/guestfs-actions.pod:4289
11685 "List the files in C<directory> (relative to the root directory, there is no "
11686 "cwd) in the format of 'ls -la'."
11690 #: ../fish/guestfish-actions.pod:2818 ../src/guestfs-actions.pod:4292
11692 "This command is mostly useful for interactive sessions. It is I<not> "
11693 "intended that you try to parse the output string."
11697 #: ../fish/guestfish-actions.pod:2821
11702 #: ../fish/guestfish-actions.pod:2823
11705 " ln target linkname\n"
11710 #: ../fish/guestfish-actions.pod:2825 ../src/guestfs-actions.pod:4307
11711 msgid "This command creates a hard link using the C<ln> command."
11715 #: ../fish/guestfish-actions.pod:2827
11720 #: ../fish/guestfish-actions.pod:2829
11723 " ln-f target linkname\n"
11728 #: ../fish/guestfish-actions.pod:2831 ../src/guestfs-actions.pod:4320
11730 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11731 "option removes the link (C<linkname>) if it exists already."
11735 #: ../fish/guestfish-actions.pod:2834
11740 #: ../fish/guestfish-actions.pod:2836
11743 " ln-s target linkname\n"
11748 #: ../fish/guestfish-actions.pod:2838 ../src/guestfs-actions.pod:4334
11749 msgid "This command creates a symbolic link using the C<ln -s> command."
11753 #: ../fish/guestfish-actions.pod:2840
11758 #: ../fish/guestfish-actions.pod:2842
11761 " ln-sf target linkname\n"
11766 #: ../fish/guestfish-actions.pod:2844 ../src/guestfs-actions.pod:4347
11768 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11769 "option removes the link (C<linkname>) if it exists already."
11773 #: ../fish/guestfish-actions.pod:2847
11774 msgid "lremovexattr"
11778 #: ../fish/guestfish-actions.pod:2849
11781 " lremovexattr xattr path\n"
11786 #: ../fish/guestfish-actions.pod:2851
11788 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then"
11789 " it removes an extended attribute of the link itself."
11793 #: ../fish/guestfish-actions.pod:2855
11798 #: ../fish/guestfish-actions.pod:2857
11806 #: ../fish/guestfish-actions.pod:2859 ../src/guestfs-actions.pod:4375
11808 "List the files in C<directory> (relative to the root directory, there is no "
11809 "cwd). The '.' and '..' entries are not returned, but hidden files are "
11814 #: ../fish/guestfish-actions.pod:2863
11816 "This command is mostly useful for interactive sessions. Programs should "
11817 "probably use L</readdir> instead."
11821 #: ../fish/guestfish-actions.pod:2866
11826 #: ../fish/guestfish-actions.pod:2868
11829 " lsetxattr xattr val vallen path\n"
11834 #: ../fish/guestfish-actions.pod:2870
11836 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it"
11837 " sets an extended attribute of the link itself."
11841 #: ../fish/guestfish-actions.pod:2874
11846 #: ../fish/guestfish-actions.pod:2876
11854 #: ../fish/guestfish-actions.pod:2878 ../fish/guestfish-actions.pod:4702
11855 #: ../src/guestfs-actions.pod:4411 ../src/guestfs-actions.pod:7214
11856 msgid "Returns file information for the given C<path>."
11860 #: ../fish/guestfish-actions.pod:2880
11862 "This is the same as L</stat> except that if C<path> is a symbolic link, then"
11863 " the link is stat-ed, not the file it refers to."
11867 #: ../fish/guestfish-actions.pod:2884 ../src/guestfs-actions.pod:4417
11868 msgid "This is the same as the C<lstat(2)> system call."
11872 #: ../fish/guestfish-actions.pod:2886
11877 #: ../fish/guestfish-actions.pod:2888
11880 " lstatlist path 'names ...'\n"
11885 #: ../fish/guestfish-actions.pod:2890
11887 "This call allows you to perform the L</lstat> operation on multiple files, "
11888 "where all files are in the directory C<path>. C<names> is the list of files"
11889 " from this directory."
11893 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4436
11895 "On return you get a list of stat structs, with a one-to-one correspondence "
11896 "to the C<names> list. If any name did not exist or could not be lstat'd, "
11897 "then the C<ino> field of that structure is set to C<-1>."
11901 #: ../fish/guestfish-actions.pod:2899
11903 "This call is intended for programs that want to efficiently list a directory"
11904 " contents without making many round-trips. See also L</lxattrlist> for a "
11905 "similarly efficient call for getting extended attributes. Very long "
11906 "directory listings might cause the protocol message size to be exceeded, "
11907 "causing this call to fail. The caller must split up such requests into "
11908 "smaller groups of names."
11912 #: ../fish/guestfish-actions.pod:2907
11913 msgid "luks-add-key"
11917 #: ../fish/guestfish-actions.pod:2909
11920 " luks-add-key device keyslot\n"
11925 #: ../fish/guestfish-actions.pod:2911 ../src/guestfs-actions.pod:4464
11927 "This command adds a new key on LUKS device C<device>. C<key> is any "
11928 "existing key, and is used to access the device. C<newkey> is the new key to"
11929 " add. C<keyslot> is the key slot that will be replaced."
11933 #: ../fish/guestfish-actions.pod:2916
11935 "Note that if C<keyslot> already contains a key, then this command will fail."
11936 " You have to use L</luks-kill-slot> first to remove that key."
11940 #: ../fish/guestfish-actions.pod:2920 ../fish/guestfish-actions.pod:2942
11941 #: ../fish/guestfish-actions.pod:2955 ../fish/guestfish-actions.pod:2969
11942 #: ../fish/guestfish-actions.pod:2995 ../fish/guestfish-actions.pod:3005
11944 "This command has one or more key or passphrase parameters. Guestfish will "
11945 "prompt for these separately."
11949 #: ../fish/guestfish-actions.pod:2923
11954 #: ../fish/guestfish-actions.pod:2925
11957 " luks-close device\n"
11962 #: ../fish/guestfish-actions.pod:2927
11964 "This closes a LUKS device that was created earlier by L</luks-open> or L"
11965 "</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
11966 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
11967 "underlying block device."
11971 #: ../fish/guestfish-actions.pod:2933
11972 msgid "luks-format"
11976 #: ../fish/guestfish-actions.pod:2935
11979 " luks-format device keyslot\n"
11984 #: ../fish/guestfish-actions.pod:2937 ../src/guestfs-actions.pod:4505
11986 "This command erases existing data on C<device> and formats the device as a "
11987 "LUKS encrypted device. C<key> is the initial key, which is added to key "
11988 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
11992 #: ../fish/guestfish-actions.pod:2945 ../fish/guestfish-actions.pod:2958
11993 #: ../fish/guestfish-actions.pod:3045 ../fish/guestfish-actions.pod:3696
11994 #: ../fish/guestfish-actions.pod:4236 ../fish/guestfish-actions.pod:4573
11995 #: ../fish/guestfish-actions.pod:4596 ../fish/guestfish-actions.pod:4618
11996 #: ../fish/guestfish-actions.pod:5364 ../src/guestfs-actions.pod:4512
11997 #: ../src/guestfs-actions.pod:4535 ../src/guestfs-actions.pod:4678
11998 #: ../src/guestfs-actions.pod:5771 ../src/guestfs-actions.pod:6577
11999 #: ../src/guestfs-actions.pod:7028 ../src/guestfs-actions.pod:7058
12000 #: ../src/guestfs-actions.pod:7091 ../src/guestfs-actions.pod:8290
12002 "B<This command is dangerous. Without careful use you can easily destroy all"
12007 #: ../fish/guestfish-actions.pod:2948
12008 msgid "luks-format-cipher"
12012 #: ../fish/guestfish-actions.pod:2950
12015 " luks-format-cipher device keyslot cipher\n"
12020 #: ../fish/guestfish-actions.pod:2952
12022 "This command is the same as L</luks-format> but it also allows you to set "
12023 "the C<cipher> used."
12027 #: ../fish/guestfish-actions.pod:2961
12028 msgid "luks-kill-slot"
12032 #: ../fish/guestfish-actions.pod:2963
12035 " luks-kill-slot device keyslot\n"
12040 #: ../fish/guestfish-actions.pod:2965 ../src/guestfs-actions.pod:4552
12042 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12043 "device C<device>. C<key> must be one of the I<other> keys."
12047 #: ../fish/guestfish-actions.pod:2972
12052 #: ../fish/guestfish-actions.pod:2974
12055 " luks-open device mapname\n"
12060 #: ../fish/guestfish-actions.pod:2976 ../src/guestfs-actions.pod:4572
12062 "This command opens a block device which has been encrypted according to the "
12063 "Linux Unified Key Setup (LUKS) standard."
12067 #: ../fish/guestfish-actions.pod:2979 ../src/guestfs-actions.pod:4575
12068 msgid "C<device> is the encrypted block device or partition."
12072 #: ../fish/guestfish-actions.pod:2981 ../src/guestfs-actions.pod:4577
12074 "The caller must supply one of the keys associated with the LUKS block "
12075 "device, in the C<key> parameter."
12079 #: ../fish/guestfish-actions.pod:2984 ../src/guestfs-actions.pod:4580
12081 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12082 "writes to this block device are decrypted from and encrypted to the "
12083 "underlying C<device> respectively."
12087 #: ../fish/guestfish-actions.pod:2988
12089 "If this block device contains LVM volume groups, then calling L</vgscan> "
12090 "followed by L</vg-activate-all> will make them visible."
12094 #: ../fish/guestfish-actions.pod:2992
12095 msgid "Use L</list-dm-devices> to list all device mapper devices."
12099 #: ../fish/guestfish-actions.pod:2998
12100 msgid "luks-open-ro"
12104 #: ../fish/guestfish-actions.pod:3000
12107 " luks-open-ro device mapname\n"
12112 #: ../fish/guestfish-actions.pod:3002
12114 "This is the same as L</luks-open> except that a read-only mapping is "
12119 #: ../fish/guestfish-actions.pod:3008
12124 #: ../fish/guestfish-actions.pod:3010
12127 " lvcreate logvol volgroup mbytes\n"
12132 #: ../fish/guestfish-actions.pod:3012 ../src/guestfs-actions.pod:4626
12134 "This creates an LVM logical volume called C<logvol> on the volume group "
12135 "C<volgroup>, with C<size> megabytes."
12139 #: ../fish/guestfish-actions.pod:3015
12140 msgid "lvm-canonical-lv-name"
12144 #: ../fish/guestfish-actions.pod:3017
12147 " lvm-canonical-lv-name lvname\n"
12152 #: ../fish/guestfish-actions.pod:3019 ../src/guestfs-actions.pod:4639
12154 "This converts alternative naming schemes for LVs that you might find to the "
12155 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
12160 #: ../fish/guestfish-actions.pod:3023 ../src/guestfs-actions.pod:4643
12162 "This command returns an error if the C<lvname> parameter does not refer to a"
12167 #: ../fish/guestfish-actions.pod:3026
12168 msgid "See also L</is-lv>."
12172 #: ../fish/guestfish-actions.pod:3028
12173 msgid "lvm-clear-filter"
12177 #: ../fish/guestfish-actions.pod:3030
12180 " lvm-clear-filter\n"
12185 #: ../fish/guestfish-actions.pod:3032
12187 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every"
12192 #: ../fish/guestfish-actions.pod:3035 ../fish/guestfish-actions.pod:3066
12193 #: ../src/guestfs-actions.pod:4661 ../src/guestfs-actions.pod:4703
12195 "This command also clears the LVM cache and performs a volume group scan."
12199 #: ../fish/guestfish-actions.pod:3038
12200 msgid "lvm-remove-all"
12204 #: ../fish/guestfish-actions.pod:3040
12207 " lvm-remove-all\n"
12212 #: ../fish/guestfish-actions.pod:3042 ../src/guestfs-actions.pod:4673
12214 "This command removes all LVM logical volumes, volume groups and physical "
12219 #: ../fish/guestfish-actions.pod:3048
12220 msgid "lvm-set-filter"
12224 #: ../fish/guestfish-actions.pod:3050
12227 " lvm-set-filter 'devices ...'\n"
12232 #: ../fish/guestfish-actions.pod:3052 ../src/guestfs-actions.pod:4689
12234 "This sets the LVM device filter so that LVM will only be able to \"see\" the"
12235 " block devices in the list C<devices>, and will ignore all other attached "
12240 #: ../fish/guestfish-actions.pod:3056 ../src/guestfs-actions.pod:4693
12242 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12243 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also"
12244 " there are two types of duplication possible: either cloned PVs/VGs which "
12245 "have identical UUIDs; or VGs that are not cloned but just happen to have the"
12246 " same name. In normal operation you cannot create this situation, but you "
12247 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12248 "inside the LVM metadata."
12252 #: ../fish/guestfish-actions.pod:3069 ../src/guestfs-actions.pod:4706
12253 msgid "You can filter whole block devices or individual partitions."
12257 #: ../fish/guestfish-actions.pod:3071 ../src/guestfs-actions.pod:4708
12259 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12260 "filesystem), even if you are not filtering out that VG."
12264 #: ../fish/guestfish-actions.pod:3075
12269 #: ../fish/guestfish-actions.pod:3077
12272 " lvremove device\n"
12277 #: ../fish/guestfish-actions.pod:3079 ../src/guestfs-actions.pod:4722
12279 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12280 "LV, such as C</dev/VG/LV>."
12284 #: ../fish/guestfish-actions.pod:3082 ../src/guestfs-actions.pod:4725
12286 "You can also remove all LVs in a volume group by specifying the VG name, "
12291 #: ../fish/guestfish-actions.pod:3085
12296 #: ../fish/guestfish-actions.pod:3087
12299 " lvrename logvol newlogvol\n"
12304 #: ../fish/guestfish-actions.pod:3089 ../src/guestfs-actions.pod:4739
12305 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12309 #: ../fish/guestfish-actions.pod:3091
12314 #: ../fish/guestfish-actions.pod:3093
12317 " lvresize device mbytes\n"
12322 #: ../fish/guestfish-actions.pod:3095 ../src/guestfs-actions.pod:4752
12324 "This resizes (expands or shrinks) an existing LVM logical volume to "
12325 "C<mbytes>. When reducing, data in the reduced part is lost."
12329 #: ../fish/guestfish-actions.pod:3099
12330 msgid "lvresize-free"
12334 #: ../fish/guestfish-actions.pod:3101
12337 " lvresize-free lv percent\n"
12342 #: ../fish/guestfish-actions.pod:3103 ../src/guestfs-actions.pod:4767
12344 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the"
12345 " remaining free space in the volume group. Commonly you would call this "
12346 "with pc = 100 which expands the logical volume as much as possible, using "
12347 "all remaining free space in the volume group."
12351 #: ../fish/guestfish-actions.pod:3109
12356 #: ../fish/guestfish-actions.pod:3111
12364 #: ../fish/guestfish-actions.pod:3113 ../src/guestfs-actions.pod:4782
12366 "List all the logical volumes detected. This is the equivalent of the "
12367 "L<lvs(8)> command."
12371 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4785
12373 "This returns a list of the logical volume device names (eg. "
12374 "C</dev/VolGroup00/LogVol00>)."
12378 #: ../fish/guestfish-actions.pod:3119
12379 msgid "See also L</lvs-full>, L</list-filesystems>."
12383 #: ../fish/guestfish-actions.pod:3121
12388 #: ../fish/guestfish-actions.pod:3123
12396 #: ../fish/guestfish-actions.pod:3125 ../src/guestfs-actions.pod:4801
12398 "List all the logical volumes detected. This is the equivalent of the "
12399 "L<lvs(8)> command. The \"full\" version includes all fields."
12403 #: ../fish/guestfish-actions.pod:3128
12408 #: ../fish/guestfish-actions.pod:3130
12416 #: ../fish/guestfish-actions.pod:3132 ../src/guestfs-actions.pod:4816
12417 msgid "This command returns the UUID of the LVM LV C<device>."
12421 #: ../fish/guestfish-actions.pod:3134
12426 #: ../fish/guestfish-actions.pod:3136
12429 " lxattrlist path 'names ...'\n"
12434 #: ../fish/guestfish-actions.pod:3138 ../src/guestfs-actions.pod:4830
12436 "This call allows you to get the extended attributes of multiple files, where"
12437 " all files are in the directory C<path>. C<names> is the list of files from"
12442 #: ../fish/guestfish-actions.pod:3142 ../src/guestfs-actions.pod:4834
12444 "On return you get a flat list of xattr structs which must be interpreted "
12445 "sequentially. The first xattr struct always has a zero-length C<attrname>."
12446 " C<attrval> in this struct is zero-length to indicate there was an error "
12447 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12448 "number (the number of following attributes for this file, which could be "
12449 "C<\"0\">). Then after the first xattr struct are the zero or more "
12450 "attributes for the first named file. This repeats for the second and "
12451 "subsequent files."
12455 #: ../fish/guestfish-actions.pod:3152
12457 "This call is intended for programs that want to efficiently list a directory"
12458 " contents without making many round-trips. See also L</lstatlist> for a "
12459 "similarly efficient call for getting standard stats. Very long directory "
12460 "listings might cause the protocol message size to be exceeded, causing this "
12461 "call to fail. The caller must split up such requests into smaller groups of"
12466 #: ../fish/guestfish-actions.pod:3160
12471 #: ../fish/guestfish-actions.pod:3162
12479 #: ../fish/guestfish-actions.pod:3164 ../src/guestfs-actions.pod:4864
12480 msgid "Create a directory named C<path>."
12484 #: ../fish/guestfish-actions.pod:3166
12489 #: ../fish/guestfish-actions.pod:3168
12492 " mkdir-mode path mode\n"
12497 #: ../fish/guestfish-actions.pod:3170 ../src/guestfs-actions.pod:4877
12499 "This command creates a directory, setting the initial permissions of the "
12500 "directory to C<mode>."
12504 #: ../fish/guestfish-actions.pod:3173 ../src/guestfs-actions.pod:4880
12506 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12507 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12512 #: ../fish/guestfish-actions.pod:3177
12513 msgid "See also L</mkdir>, L</umask>"
12517 #: ../fish/guestfish-actions.pod:3179
12522 #: ../fish/guestfish-actions.pod:3181
12530 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4896
12532 "Create a directory named C<path>, creating any parent directories as "
12533 "necessary. This is like the C<mkdir -p> shell command."
12537 #: ../fish/guestfish-actions.pod:3186
12542 #: ../fish/guestfish-actions.pod:3188
12545 " mkdtemp template\n"
12550 #: ../fish/guestfish-actions.pod:3190 ../src/guestfs-actions.pod:4909
12552 "This command creates a temporary directory. The C<template> parameter "
12553 "should be a full pathname for the temporary directory name with the final "
12554 "six characters being \"XXXXXX\"."
12558 #: ../fish/guestfish-actions.pod:3195 ../src/guestfs-actions.pod:4914
12560 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one"
12561 " being suitable for Windows filesystems."
12565 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4917
12566 msgid "The name of the temporary directory that was created is returned."
12570 #: ../fish/guestfish-actions.pod:3201 ../src/guestfs-actions.pod:4920
12572 "The temporary directory is created with mode 0700 and is owned by root."
12576 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4923
12578 "The caller is responsible for deleting the temporary directory and its "
12579 "contents after use."
12583 #: ../fish/guestfish-actions.pod:3207 ../src/guestfs-actions.pod:4926
12584 msgid "See also: L<mkdtemp(3)>"
12588 #: ../fish/guestfish-actions.pod:3209
12593 #: ../fish/guestfish-actions.pod:3211
12596 " mke2fs-J fstype blocksize device journal\n"
12601 #: ../fish/guestfish-actions.pod:3213 ../src/guestfs-actions.pod:4942
12603 "This creates an ext2/3/4 filesystem on C<device> with an external journal on"
12604 " C<journal>. It is equivalent to the command:"
12608 #: ../fish/guestfish-actions.pod:3217 ../src/guestfs-actions.pod:4946
12611 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12616 #: ../fish/guestfish-actions.pod:3219
12617 msgid "See also L</mke2journal>."
12621 #: ../fish/guestfish-actions.pod:3221
12626 #: ../fish/guestfish-actions.pod:3223
12629 " mke2fs-JL fstype blocksize device label\n"
12634 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4963
12636 "This creates an ext2/3/4 filesystem on C<device> with an external journal on"
12637 " the journal labeled C<label>."
12641 #: ../fish/guestfish-actions.pod:3228
12642 msgid "See also L</mke2journal-L>."
12646 #: ../fish/guestfish-actions.pod:3230
12651 #: ../fish/guestfish-actions.pod:3232
12654 " mke2fs-JU fstype blocksize device uuid\n"
12659 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4981
12661 "This creates an ext2/3/4 filesystem on C<device> with an external journal on"
12662 " the journal with UUID C<uuid>."
12666 #: ../fish/guestfish-actions.pod:3237
12667 msgid "See also L</mke2journal-U>."
12671 #: ../fish/guestfish-actions.pod:3239
12672 msgid "mke2journal"
12676 #: ../fish/guestfish-actions.pod:3241
12679 " mke2journal blocksize device\n"
12684 #: ../fish/guestfish-actions.pod:3243 ../src/guestfs-actions.pod:4997
12686 "This creates an ext2 external journal on C<device>. It is equivalent to the"
12691 #: ../fish/guestfish-actions.pod:3246 ../src/guestfs-actions.pod:5000
12694 " mke2fs -O journal_dev -b blocksize device\n"
12699 #: ../fish/guestfish-actions.pod:3248
12700 msgid "mke2journal-L"
12704 #: ../fish/guestfish-actions.pod:3250
12707 " mke2journal-L blocksize label device\n"
12712 #: ../fish/guestfish-actions.pod:3252 ../src/guestfs-actions.pod:5014
12714 "This creates an ext2 external journal on C<device> with label C<label>."
12718 #: ../fish/guestfish-actions.pod:3254
12719 msgid "mke2journal-U"
12723 #: ../fish/guestfish-actions.pod:3256
12726 " mke2journal-U blocksize uuid device\n"
12731 #: ../fish/guestfish-actions.pod:3258 ../src/guestfs-actions.pod:5028
12732 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12736 #: ../fish/guestfish-actions.pod:3260
12741 #: ../fish/guestfish-actions.pod:3262
12744 " mkfifo mode path\n"
12749 #: ../fish/guestfish-actions.pod:3264
12751 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12752 "is just a convenient wrapper around L</mknod>."
12756 #: ../fish/guestfish-actions.pod:3270
12761 #: ../fish/guestfish-actions.pod:3272
12764 " mkfs fstype device\n"
12769 #: ../fish/guestfish-actions.pod:3274 ../src/guestfs-actions.pod:5058
12771 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12772 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12776 #: ../fish/guestfish-actions.pod:3278
12781 #: ../fish/guestfish-actions.pod:3280
12784 " mkfs-b fstype blocksize device\n"
12789 #: ../fish/guestfish-actions.pod:3282
12791 "This call is similar to L</mkfs>, but it allows you to control the block "
12792 "size of the resulting filesystem. Supported block sizes depend on the "
12793 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12797 #: ../fish/guestfish-actions.pod:3287 ../fish/guestfish-actions.pod:3314
12798 #: ../src/guestfs-actions.pod:5086 ../src/guestfs-actions.pod:5124
12800 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12805 #: ../fish/guestfish-actions.pod:3290
12807 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
12812 #: ../fish/guestfish-actions.pod:3297
12817 #: ../fish/guestfish-actions.pod:3299
12820 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] [sectorsize:..]\n"
12825 #: ../fish/guestfish-actions.pod:3301 ../src/guestfs-actions.pod:5111
12827 "This function creates a filesystem on C<device>. The filesystem type is "
12828 "C<fstype>, for example C<ext3>."
12832 #: ../fish/guestfish-actions.pod:3308 ../src/guestfs-actions.pod:5118
12833 msgid "C<blocksize>"
12837 #: ../fish/guestfish-actions.pod:3310 ../src/guestfs-actions.pod:5120
12839 "The filesystem block size. Supported block sizes depend on the filesystem "
12840 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12845 #: ../fish/guestfish-actions.pod:3317 ../src/guestfs-actions.pod:5127
12846 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
12850 #: ../fish/guestfish-actions.pod:3319 ../src/guestfs-actions.pod:5129
12851 msgid "C<features>"
12855 #: ../fish/guestfish-actions.pod:3321 ../src/guestfs-actions.pod:5131
12856 msgid "This passes the I<-O> parameter to the external mkfs program."
12860 #: ../fish/guestfish-actions.pod:3323 ../src/guestfs-actions.pod:5133
12862 "For certain filesystem types, this allows extra filesystem features to be "
12863 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
12867 #: ../fish/guestfish-actions.pod:3327 ../src/guestfs-actions.pod:5137
12869 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem"
12874 #: ../fish/guestfish-actions.pod:3330 ../src/guestfs-actions.pod:5140
12879 #: ../fish/guestfish-actions.pod:3332 ../src/guestfs-actions.pod:5142
12881 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
12882 "sets the inode size (only for ext2/3/4 filesystems at present)."
12886 #: ../fish/guestfish-actions.pod:3335 ../src/guestfs-actions.pod:5145
12887 msgid "C<sectorsize>"
12891 #: ../fish/guestfish-actions.pod:3337 ../src/guestfs-actions.pod:5147
12893 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
12894 "sets sector size for ufs filesystem."
12898 #: ../fish/guestfish-actions.pod:3344
12899 msgid "mkmountpoint"
12903 #: ../fish/guestfish-actions.pod:3346
12906 " mkmountpoint exemptpath\n"
12911 #: ../fish/guestfish-actions.pod:3348
12913 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used"
12914 " to create extra mountpoints before mounting the first filesystem."
12918 #: ../fish/guestfish-actions.pod:3352 ../src/guestfs-actions.pod:5190
12920 "These calls are I<only> necessary in some very limited circumstances, mainly"
12921 " the case where you want to mount a mix of unrelated and/or read-only "
12922 "filesystems together."
12926 #: ../fish/guestfish-actions.pod:3356 ../src/guestfs-actions.pod:5194
12928 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
12929 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
12930 "inside that. You can unpack this as follows in guestfish:"
12934 #: ../fish/guestfish-actions.pod:3361 ../src/guestfs-actions.pod:5199
12937 " add-ro Fedora-11-i686-Live.iso\n"
12939 " mkmountpoint /cd\n"
12940 " mkmountpoint /sqsh\n"
12941 " mkmountpoint /ext3fs\n"
12942 " mount /dev/sda /cd\n"
12943 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
12944 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
12949 #: ../fish/guestfish-actions.pod:3370 ../src/guestfs-actions.pod:5208
12950 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
12954 #: ../fish/guestfish-actions.pod:3372
12956 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
12957 "unexpected errors if you try to mix these calls. It is safest to manually "
12958 "unmount filesystems and remove mountpoints after use."
12962 #: ../fish/guestfish-actions.pod:3376
12964 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
12965 "for this to work for manual mountpoints, you must ensure that the innermost "
12966 "mountpoints have the longest pathnames, as in the example code above."
12970 #: ../fish/guestfish-actions.pod:3381 ../src/guestfs-actions.pod:5219
12972 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
12976 #: ../fish/guestfish-actions.pod:3383
12978 "Autosync [see L</set-autosync>, this is set by default on handles] can cause"
12979 " L</umount-all> to be called when the handle is closed which can also "
12980 "trigger these issues."
12984 #: ../fish/guestfish-actions.pod:3387
12989 #: ../fish/guestfish-actions.pod:3389
12992 " mknod mode devmajor devminor path\n"
12997 #: ../fish/guestfish-actions.pod:3391 ../src/guestfs-actions.pod:5238
12999 "This call creates block or character special devices, or named pipes "
13004 #: ../fish/guestfish-actions.pod:3394 ../src/guestfs-actions.pod:5241
13006 "The C<mode> parameter should be the mode, using the standard constants. "
13007 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13008 "used when creating block and character special devices."
13012 #: ../fish/guestfish-actions.pod:3399
13014 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13015 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13016 "regular file). These constants are available in the standard Linux header "
13017 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
13018 "wrappers around this command which bitwise OR in the appropriate constant "
13023 #: ../fish/guestfish-actions.pod:3409
13028 #: ../fish/guestfish-actions.pod:3411
13031 " mknod-b mode devmajor devminor path\n"
13036 #: ../fish/guestfish-actions.pod:3413
13038 "This call creates a block device node called C<path> with mode C<mode> and "
13039 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13040 "wrapper around L</mknod>."
13044 #: ../fish/guestfish-actions.pod:3419
13049 #: ../fish/guestfish-actions.pod:3421
13052 " mknod-c mode devmajor devminor path\n"
13057 #: ../fish/guestfish-actions.pod:3423
13059 "This call creates a char device node called C<path> with mode C<mode> and "
13060 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13061 "wrapper around L</mknod>."
13065 #: ../fish/guestfish-actions.pod:3429
13070 #: ../fish/guestfish-actions.pod:3431
13078 #: ../fish/guestfish-actions.pod:3433 ../src/guestfs-actions.pod:5304
13079 msgid "Create a swap partition on C<device>."
13083 #: ../fish/guestfish-actions.pod:3435
13088 #: ../fish/guestfish-actions.pod:3437
13091 " mkswap-L label device\n"
13096 #: ../fish/guestfish-actions.pod:3439 ../src/guestfs-actions.pod:5317
13097 msgid "Create a swap partition on C<device> with label C<label>."
13101 #: ../fish/guestfish-actions.pod:3441 ../src/guestfs-actions.pod:5319
13103 "Note that you cannot attach a swap label to a block device (eg. "
13104 "C</dev/sda>), just to a partition. This appears to be a limitation of the "
13105 "kernel or swap tools."
13109 #: ../fish/guestfish-actions.pod:3445
13114 #: ../fish/guestfish-actions.pod:3447
13117 " mkswap-U uuid device\n"
13122 #: ../fish/guestfish-actions.pod:3449 ../src/guestfs-actions.pod:5334
13123 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13127 #: ../fish/guestfish-actions.pod:3451
13128 msgid "mkswap-file"
13132 #: ../fish/guestfish-actions.pod:3453
13135 " mkswap-file path\n"
13140 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5346
13141 msgid "Create a swap file."
13145 #: ../fish/guestfish-actions.pod:3457
13147 "This command just writes a swap file signature to an existing file. To "
13148 "create the file itself, use something like L</fallocate>."
13152 #: ../fish/guestfish-actions.pod:3460
13157 #: ../fish/guestfish-actions.pod:3462
13160 " modprobe modulename\n"
13165 #: ../fish/guestfish-actions.pod:3464 ../src/guestfs-actions.pod:5361
13166 msgid "This loads a kernel module in the appliance."
13170 #: ../fish/guestfish-actions.pod:3466 ../src/guestfs-actions.pod:5363
13172 "The kernel module must have been whitelisted when libguestfs was built (see "
13173 "C<appliance/kmod.whitelist.in> in the source)."
13177 #: ../fish/guestfish-actions.pod:3469
13182 #: ../fish/guestfish-actions.pod:3471
13185 " mount device mountpoint\n"
13190 #: ../fish/guestfish-actions.pod:3473 ../src/guestfs-actions.pod:5377
13192 "Mount a guest disk at a position in the filesystem. Block devices are named"
13193 " C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13194 "those block devices contain partitions, they will have the usual names (eg. "
13195 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13199 #: ../fish/guestfish-actions.pod:3479 ../src/guestfs-actions.pod:5383
13201 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13202 "mounted on C</> before others can be mounted. Other filesystems can only be"
13203 " mounted on directories which already exist."
13207 #: ../fish/guestfish-actions.pod:3484 ../src/guestfs-actions.pod:5388
13209 "The mounted filesystem is writable, if we have sufficient permissions on the"
13210 " underlying device."
13214 #: ../fish/guestfish-actions.pod:3487
13216 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13217 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13218 "problems for users. If your program might need to work with older versions "
13219 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13220 "first parameter if you don't want any options)."
13224 #: ../fish/guestfish-actions.pod:3494
13229 #: ../fish/guestfish-actions.pod:3496
13232 " mount-9p mounttag mountpoint [options:..]\n"
13237 #: ../fish/guestfish-actions.pod:3498 ../src/guestfs-actions.pod:5417
13239 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13244 #: ../fish/guestfish-actions.pod:3501 ../src/guestfs-actions.pod:5420
13246 "If required, C<trans=virtio> will be automatically added to the options. "
13247 "Any other options required can be passed in the optional C<options> "
13252 #: ../fish/guestfish-actions.pod:3507
13257 #: ../fish/guestfish-actions.pod:3509
13260 " mount-loop file mountpoint\n"
13265 #: ../fish/guestfish-actions.pod:3511 ../src/guestfs-actions.pod:5459
13267 "This command lets you mount C<file> (a filesystem image in a file) on a "
13268 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13273 #: ../fish/guestfish-actions.pod:3515
13274 msgid "mount-options"
13278 #: ../fish/guestfish-actions.pod:3517
13281 " mount-options options device mountpoint\n"
13286 #: ../fish/guestfish-actions.pod:3519
13288 "This is the same as the L</mount> command, but it allows you to set the "
13289 "mount options as for the L<mount(8)> I<-o> flag."
13293 #: ../fish/guestfish-actions.pod:3523 ../src/guestfs-actions.pod:5479
13295 "If the C<options> parameter is an empty string, then no options are passed "
13296 "(all options default to whatever the filesystem uses)."
13300 #: ../fish/guestfish-actions.pod:3527
13305 #: ../fish/guestfish-actions.pod:3529
13308 " mount-ro device mountpoint\n"
13313 #: ../fish/guestfish-actions.pod:3531
13315 "This is the same as the L</mount> command, but it mounts the filesystem with"
13316 " the read-only (I<-o ro>) flag."
13320 #: ../fish/guestfish-actions.pod:3534
13325 #: ../fish/guestfish-actions.pod:3536
13328 " mount-vfs options vfstype device mountpoint\n"
13333 #: ../fish/guestfish-actions.pod:3538
13335 "This is the same as the L</mount> command, but it allows you to set both the"
13336 " mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13340 #: ../fish/guestfish-actions.pod:3542
13341 msgid "mountpoints"
13345 #: ../fish/guestfish-actions.pod:3544
13353 #: ../fish/guestfish-actions.pod:3546
13355 "This call is similar to L</mounts>. That call returns a list of devices. "
13356 "This one returns a hash table (map) of device name to directory where the "
13357 "device is mounted."
13361 #: ../fish/guestfish-actions.pod:3550
13366 #: ../fish/guestfish-actions.pod:3552
13374 #: ../fish/guestfish-actions.pod:3554 ../src/guestfs-actions.pod:5540
13376 "This returns the list of currently mounted filesystems. It returns the list"
13377 " of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13381 #: ../fish/guestfish-actions.pod:3557 ../src/guestfs-actions.pod:5543
13382 msgid "Some internal mounts are not shown."
13386 #: ../fish/guestfish-actions.pod:3559
13387 msgid "See also: L</mountpoints>"
13391 #: ../fish/guestfish-actions.pod:3561
13396 #: ../fish/guestfish-actions.pod:3563
13404 #: ../fish/guestfish-actions.pod:3565 ../src/guestfs-actions.pod:5560
13406 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13407 "destination filename or destination directory."
13411 #: ../fish/guestfish-actions.pod:3568
13412 msgid "ntfs-3g-probe"
13416 #: ../fish/guestfish-actions.pod:3570
13419 " ntfs-3g-probe true|false device\n"
13424 #: ../fish/guestfish-actions.pod:3572 ../src/guestfs-actions.pod:5574
13426 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13427 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
13428 "write, and some cannot be mounted at all)."
13432 #: ../fish/guestfish-actions.pod:3576 ../src/guestfs-actions.pod:5578
13434 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13435 "can be mounted read-write. Set it to false if you want to test if the "
13436 "volume can be mounted read-only."
13440 #: ../fish/guestfish-actions.pod:3580 ../src/guestfs-actions.pod:5582
13442 "The return value is an integer which C<0> if the operation would succeed, or"
13443 " some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13447 #: ../fish/guestfish-actions.pod:3584
13452 #: ../fish/guestfish-actions.pod:3586
13455 " ntfsresize device\n"
13460 #: ../fish/guestfish-actions.pod:3588 ../fish/guestfish-actions.pod:3612
13461 #: ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:5635
13463 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13464 "size of the underlying device."
13468 #: ../fish/guestfish-actions.pod:3591 ../src/guestfs-actions.pod:5606
13470 "I<Note:> After the resize operation, the filesystem is marked as requiring a"
13471 " consistency check (for safety). You have to boot into Windows to perform "
13472 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13473 "resize filesystems which have been marked in this way. So in effect it is "
13474 "not possible to call ntfsresize multiple times on a single filesystem "
13475 "without booting into Windows between each resize."
13479 #: ../fish/guestfish-actions.pod:3599 ../fish/guestfish-actions.pod:3638
13480 #: ../src/guestfs-actions.pod:5614 ../src/guestfs-actions.pod:5661
13481 msgid "See also L<ntfsresize(8)>."
13485 #: ../fish/guestfish-actions.pod:3601 ../fish/guestfish-actions.pod:3649
13487 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13492 #: ../fish/guestfish-actions.pod:3608
13493 msgid "ntfsresize-opts"
13497 #: ../fish/guestfish-actions.pod:3610
13500 " ntfsresize-opts device [size:..] [force:..]\n"
13505 #: ../fish/guestfish-actions.pod:3621 ../src/guestfs-actions.pod:5644
13507 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13508 "resized to fit the container (eg. partition)."
13512 #: ../fish/guestfish-actions.pod:3624 ../src/guestfs-actions.pod:5647
13517 #: ../fish/guestfish-actions.pod:3626 ../src/guestfs-actions.pod:5649
13519 "If this option is true, then force the resize of the filesystem even if the "
13520 "filesystem is marked as requiring a consistency check."
13524 #: ../fish/guestfish-actions.pod:3629
13526 "After the resize operation, the filesystem is always marked as requiring a "
13527 "consistency check (for safety). You have to boot into Windows to perform "
13528 "this check and clear this condition. If you I<don't> set the C<force> "
13529 "option then it is not possible to call L</ntfsresize-opts> multiple times on"
13530 " a single filesystem without booting into Windows between each resize."
13534 #: ../fish/guestfish-actions.pod:3642
13535 msgid "ntfsresize-size"
13539 #: ../fish/guestfish-actions.pod:3644
13542 " ntfsresize-size device size\n"
13547 #: ../fish/guestfish-actions.pod:3646
13549 "This command is the same as L</ntfsresize> except that it allows you to "
13550 "specify the new size (in bytes) explicitly."
13554 #: ../fish/guestfish-actions.pod:3656
13559 #: ../fish/guestfish-actions.pod:3658
13562 " part-add device prlogex startsect endsect\n"
13567 #: ../fish/guestfish-actions.pod:3660
13569 "This command adds a partition to C<device>. If there is no partition table "
13570 "on the device, call L</part-init> first."
13574 #: ../fish/guestfish-actions.pod:3663 ../src/guestfs-actions.pod:5722
13576 "The C<prlogex> parameter is the type of partition. Normally you should pass"
13577 " C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13578 "C<logical>) and C<e> (or C<extended>) partition types."
13582 #: ../fish/guestfish-actions.pod:3668 ../src/guestfs-actions.pod:5727
13584 "C<startsect> and C<endsect> are the start and end of the partition in "
13585 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13586 "from the end of the disk (C<-1> is the last sector)."
13590 #: ../fish/guestfish-actions.pod:3672
13592 "Creating a partition which covers the whole disk is not so easy. Use L"
13593 "</part-disk> to do that."
13597 #: ../fish/guestfish-actions.pod:3675
13602 #: ../fish/guestfish-actions.pod:3677
13605 " part-del device partnum\n"
13610 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5745
13611 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13615 #: ../fish/guestfish-actions.pod:3681 ../src/guestfs-actions.pod:5747
13617 "Note that in the case of MBR partitioning, deleting an extended partition "
13618 "also deletes any logical partitions it contains."
13622 #: ../fish/guestfish-actions.pod:3685
13627 #: ../fish/guestfish-actions.pod:3687
13630 " part-disk device parttype\n"
13635 #: ../fish/guestfish-actions.pod:3689
13637 "This command is simply a combination of L</part-init> followed by L</part-"
13638 "add> to create a single primary partition covering the whole disk."
13642 #: ../fish/guestfish-actions.pod:3693
13644 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other"
13645 " possible values are described in L</part-init>."
13649 #: ../fish/guestfish-actions.pod:3699
13650 msgid "part-get-bootable"
13654 #: ../fish/guestfish-actions.pod:3701
13657 " part-get-bootable device partnum\n"
13662 #: ../fish/guestfish-actions.pod:3703 ../src/guestfs-actions.pod:5783
13664 "This command returns true if the partition C<partnum> on C<device> has the "
13665 "bootable flag set."
13669 #: ../fish/guestfish-actions.pod:3706
13670 msgid "See also L</part-set-bootable>."
13674 #: ../fish/guestfish-actions.pod:3708
13675 msgid "part-get-mbr-id"
13679 #: ../fish/guestfish-actions.pod:3710
13682 " part-get-mbr-id device partnum\n"
13687 #: ../fish/guestfish-actions.pod:3712 ../src/guestfs-actions.pod:5799
13689 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13690 "partition C<partnum>."
13694 #: ../fish/guestfish-actions.pod:3715 ../fish/guestfish-actions.pod:3859
13696 "Note that only MBR (old DOS-style) partitions have type bytes. You will get"
13697 " undefined results for other partition table types (see L</part-get-"
13702 #: ../fish/guestfish-actions.pod:3719
13703 msgid "part-get-parttype"
13707 #: ../fish/guestfish-actions.pod:3721
13710 " part-get-parttype device\n"
13715 #: ../fish/guestfish-actions.pod:3723 ../src/guestfs-actions.pod:5816
13717 "This command examines the partition table on C<device> and returns the "
13718 "partition table type (format) being used."
13722 #: ../fish/guestfish-actions.pod:3726
13724 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13725 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13726 "possible, although unusual. See L</part-init> for a full list."
13730 #: ../fish/guestfish-actions.pod:3731
13735 #: ../fish/guestfish-actions.pod:3733
13738 " part-init device parttype\n"
13743 #: ../fish/guestfish-actions.pod:3735 ../src/guestfs-actions.pod:5836
13745 "This creates an empty partition table on C<device> of one of the partition "
13746 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt>"
13747 " (for large disks)."
13751 #: ../fish/guestfish-actions.pod:3739
13753 "Initially there are no partitions. Following this, you should call L</part-"
13754 "add> for each partition required."
13758 #: ../fish/guestfish-actions.pod:3742 ../src/guestfs-actions.pod:5843
13759 msgid "Possible values for C<parttype> are:"
13763 #: ../fish/guestfish-actions.pod:3746 ../src/guestfs-actions.pod:5847
13768 #: ../fish/guestfish-actions.pod:3748 ../src/guestfs-actions.pod:5849
13773 #: ../fish/guestfish-actions.pod:3750 ../src/guestfs-actions.pod:5851
13774 msgid "Intel EFI / GPT partition table."
13778 #: ../fish/guestfish-actions.pod:3752 ../src/guestfs-actions.pod:5853
13780 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13781 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13782 "the C<mbr> format."
13786 #: ../fish/guestfish-actions.pod:3756 ../src/guestfs-actions.pod:5857
13791 #: ../fish/guestfish-actions.pod:3758 ../src/guestfs-actions.pod:5859
13796 #: ../fish/guestfish-actions.pod:3760 ../src/guestfs-actions.pod:5861
13798 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13799 "Windows. This partition type will B<only> work for device sizes up to 2 TB."
13800 " For large disks we recommend using C<gpt>."
13804 #: ../fish/guestfish-actions.pod:3767 ../src/guestfs-actions.pod:5868
13806 "Other partition table types that may work but are not supported include:"
13810 #: ../fish/guestfish-actions.pod:3772 ../src/guestfs-actions.pod:5873
13815 #: ../fish/guestfish-actions.pod:3774 ../src/guestfs-actions.pod:5875
13816 msgid "AIX disk labels."
13820 #: ../fish/guestfish-actions.pod:3776 ../src/guestfs-actions.pod:5877
13825 #: ../fish/guestfish-actions.pod:3778 ../src/guestfs-actions.pod:5879
13830 #: ../fish/guestfish-actions.pod:3780 ../src/guestfs-actions.pod:5881
13831 msgid "Amiga \"Rigid Disk Block\" format."
13835 #: ../fish/guestfish-actions.pod:3782 ../src/guestfs-actions.pod:5883
13840 #: ../fish/guestfish-actions.pod:3784 ../src/guestfs-actions.pod:5885
13841 msgid "BSD disk labels."
13845 #: ../fish/guestfish-actions.pod:3786 ../src/guestfs-actions.pod:5887
13850 #: ../fish/guestfish-actions.pod:3788 ../src/guestfs-actions.pod:5889
13851 msgid "DASD, used on IBM mainframes."
13855 #: ../fish/guestfish-actions.pod:3790 ../src/guestfs-actions.pod:5891
13860 #: ../fish/guestfish-actions.pod:3792 ../src/guestfs-actions.pod:5893
13861 msgid "MIPS/SGI volumes."
13865 #: ../fish/guestfish-actions.pod:3794 ../src/guestfs-actions.pod:5895
13870 #: ../fish/guestfish-actions.pod:3796 ../src/guestfs-actions.pod:5897
13871 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13875 #: ../fish/guestfish-actions.pod:3798 ../src/guestfs-actions.pod:5899
13880 #: ../fish/guestfish-actions.pod:3800 ../src/guestfs-actions.pod:5901
13881 msgid "NEC PC-98 format, common in Japan apparently."
13885 #: ../fish/guestfish-actions.pod:3802 ../src/guestfs-actions.pod:5903
13890 #: ../fish/guestfish-actions.pod:3804 ../src/guestfs-actions.pod:5905
13891 msgid "Sun disk labels."
13895 #: ../fish/guestfish-actions.pod:3808
13900 #: ../fish/guestfish-actions.pod:3810
13903 " part-list device\n"
13908 #: ../fish/guestfish-actions.pod:3812 ../src/guestfs-actions.pod:5919
13910 "This command parses the partition table on C<device> and returns the list of"
13911 " partitions found."
13915 #: ../fish/guestfish-actions.pod:3815 ../src/guestfs-actions.pod:5922
13916 msgid "The fields in the returned structure are:"
13920 #: ../fish/guestfish-actions.pod:3819 ../src/guestfs-actions.pod:5926
13921 msgid "B<part_num>"
13925 #: ../fish/guestfish-actions.pod:3821 ../src/guestfs-actions.pod:5928
13926 msgid "Partition number, counting from 1."
13930 #: ../fish/guestfish-actions.pod:3823 ../src/guestfs-actions.pod:5930
13931 msgid "B<part_start>"
13935 #: ../fish/guestfish-actions.pod:3825
13937 "Start of the partition I<in bytes>. To get sectors you have to divide by "
13938 "the device's sector size, see L</blockdev-getss>."
13942 #: ../fish/guestfish-actions.pod:3828 ../src/guestfs-actions.pod:5935
13943 msgid "B<part_end>"
13947 #: ../fish/guestfish-actions.pod:3830 ../src/guestfs-actions.pod:5937
13948 msgid "End of the partition in bytes."
13952 #: ../fish/guestfish-actions.pod:3832 ../src/guestfs-actions.pod:5939
13953 msgid "B<part_size>"
13957 #: ../fish/guestfish-actions.pod:3834 ../src/guestfs-actions.pod:5941
13958 msgid "Size of the partition in bytes."
13962 #: ../fish/guestfish-actions.pod:3838
13963 msgid "part-set-bootable"
13967 #: ../fish/guestfish-actions.pod:3840
13970 " part-set-bootable device partnum true|false\n"
13975 #: ../fish/guestfish-actions.pod:3842 ../src/guestfs-actions.pod:5959
13977 "This sets the bootable flag on partition numbered C<partnum> on device "
13978 "C<device>. Note that partitions are numbered from 1."
13982 #: ../fish/guestfish-actions.pod:3845 ../src/guestfs-actions.pod:5962
13984 "The bootable flag is used by some operating systems (notably Windows) to "
13985 "determine which partition to boot from. It is by no means universally "
13990 #: ../fish/guestfish-actions.pod:3849
13991 msgid "part-set-mbr-id"
13995 #: ../fish/guestfish-actions.pod:3851
13998 " part-set-mbr-id device partnum idbyte\n"
14003 #: ../fish/guestfish-actions.pod:3853 ../src/guestfs-actions.pod:5978
14005 "Sets the MBR type byte (also known as the ID byte) of the numbered partition"
14006 " C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14007 "documentation are in fact hexadecimal numbers, but usually documented "
14008 "without any leading \"0x\" which might be confusing."
14012 #: ../fish/guestfish-actions.pod:3863
14013 msgid "part-set-name"
14017 #: ../fish/guestfish-actions.pod:3865
14020 " part-set-name device partnum name\n"
14025 #: ../fish/guestfish-actions.pod:3867 ../src/guestfs-actions.pod:6000
14027 "This sets the partition name on partition numbered C<partnum> on device "
14028 "C<device>. Note that partitions are numbered from 1."
14032 #: ../fish/guestfish-actions.pod:3870 ../src/guestfs-actions.pod:6003
14034 "The partition name can only be set on certain types of partition table. "
14035 "This works on C<gpt> but not on C<mbr> partitions."
14039 #: ../fish/guestfish-actions.pod:3873
14040 msgid "part-to-dev"
14044 #: ../fish/guestfish-actions.pod:3875
14047 " part-to-dev partition\n"
14052 #: ../fish/guestfish-actions.pod:3877 ../src/guestfs-actions.pod:6016
14054 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14055 "partition number, returning the device name (eg. \"/dev/sdb\")."
14059 #: ../fish/guestfish-actions.pod:3881 ../fish/guestfish-actions.pod:3893
14061 "The named partition must exist, for example as a string returned from L"
14062 "</list-partitions>."
14066 #: ../fish/guestfish-actions.pod:3884
14067 msgid "See also L</part-to-partnum>."
14071 #: ../fish/guestfish-actions.pod:3886
14072 msgid "part-to-partnum"
14076 #: ../fish/guestfish-actions.pod:3888
14079 " part-to-partnum partition\n"
14084 #: ../fish/guestfish-actions.pod:3890 ../src/guestfs-actions.pod:6036
14086 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14087 "partition number (eg. C<1>)."
14091 #: ../fish/guestfish-actions.pod:3896
14092 msgid "See also L</part-to-dev>."
14096 #: ../fish/guestfish-actions.pod:3898
14097 msgid "ping-daemon"
14101 #: ../fish/guestfish-actions.pod:3900
14109 #: ../fish/guestfish-actions.pod:3902 ../src/guestfs-actions.pod:6051
14111 "This is a test probe into the guestfs daemon running inside the qemu "
14112 "subprocess. Calling this function checks that the daemon responds to the "
14113 "ping message, without affecting the daemon or attached block device(s) in "
14118 #: ../fish/guestfish-actions.pod:3907
14123 #: ../fish/guestfish-actions.pod:3909
14126 " pread path count offset\n"
14131 #: ../fish/guestfish-actions.pod:3911 ../src/guestfs-actions.pod:6069
14133 "This command lets you read part of a file. It reads C<count> bytes of the "
14134 "file, starting at C<offset>, from file C<path>."
14138 #: ../fish/guestfish-actions.pod:3914 ../fish/guestfish-actions.pod:3929
14139 #: ../src/guestfs-actions.pod:6072 ../src/guestfs-actions.pod:6098
14141 "This may read fewer bytes than requested. For further details see the "
14142 "L<pread(2)> system call."
14146 #: ../fish/guestfish-actions.pod:3917
14147 msgid "See also L</pwrite>, L</pread-device>."
14151 #: ../fish/guestfish-actions.pod:3922
14152 msgid "pread-device"
14156 #: ../fish/guestfish-actions.pod:3924
14159 " pread-device device count offset\n"
14164 #: ../fish/guestfish-actions.pod:3926 ../src/guestfs-actions.pod:6095
14166 "This command lets you read part of a file. It reads C<count> bytes of "
14167 "C<device>, starting at C<offset>."
14171 #: ../fish/guestfish-actions.pod:3932
14172 msgid "See also L</pread>."
14176 #: ../fish/guestfish-actions.pod:3937
14181 #: ../fish/guestfish-actions.pod:3939
14184 " pvcreate device\n"
14189 #: ../fish/guestfish-actions.pod:3941 ../src/guestfs-actions.pod:6118
14191 "This creates an LVM physical volume on the named C<device>, where C<device> "
14192 "should usually be a partition name such as C</dev/sda1>."
14196 #: ../fish/guestfish-actions.pod:3945
14201 #: ../fish/guestfish-actions.pod:3947
14204 " pvremove device\n"
14209 #: ../fish/guestfish-actions.pod:3949 ../src/guestfs-actions.pod:6132
14211 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14216 #: ../fish/guestfish-actions.pod:3952 ../src/guestfs-actions.pod:6135
14218 "The implementation uses the C<pvremove> command which refuses to wipe "
14219 "physical volumes that contain any volume groups, so you have to remove those"
14224 #: ../fish/guestfish-actions.pod:3956
14229 #: ../fish/guestfish-actions.pod:3958
14232 " pvresize device\n"
14237 #: ../fish/guestfish-actions.pod:3960 ../src/guestfs-actions.pod:6149
14239 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14240 "the new size of the underlying device."
14244 #: ../fish/guestfish-actions.pod:3963
14245 msgid "pvresize-size"
14249 #: ../fish/guestfish-actions.pod:3965
14252 " pvresize-size device size\n"
14257 #: ../fish/guestfish-actions.pod:3967
14259 "This command is the same as L</pvresize> except that it allows you to "
14260 "specify the new size (in bytes) explicitly."
14264 #: ../fish/guestfish-actions.pod:3970
14269 #: ../fish/guestfish-actions.pod:3972
14277 #: ../fish/guestfish-actions.pod:3974 ../src/guestfs-actions.pod:6175
14279 "List all the physical volumes detected. This is the equivalent of the "
14280 "L<pvs(8)> command."
14284 #: ../fish/guestfish-actions.pod:3977 ../src/guestfs-actions.pod:6178
14286 "This returns a list of just the device names that contain PVs (eg. "
14291 #: ../fish/guestfish-actions.pod:3980
14292 msgid "See also L</pvs-full>."
14296 #: ../fish/guestfish-actions.pod:3982
14301 #: ../fish/guestfish-actions.pod:3984
14309 #: ../fish/guestfish-actions.pod:3986 ../src/guestfs-actions.pod:6194
14311 "List all the physical volumes detected. This is the equivalent of the "
14312 "L<pvs(8)> command. The \"full\" version includes all fields."
14316 #: ../fish/guestfish-actions.pod:3989
14321 #: ../fish/guestfish-actions.pod:3991
14329 #: ../fish/guestfish-actions.pod:3993 ../src/guestfs-actions.pod:6209
14330 msgid "This command returns the UUID of the LVM PV C<device>."
14334 #: ../fish/guestfish-actions.pod:3995
14339 #: ../fish/guestfish-actions.pod:3997
14342 " pwrite path content offset\n"
14347 #: ../fish/guestfish-actions.pod:3999 ../src/guestfs-actions.pod:6225
14349 "This command writes to part of a file. It writes the data buffer C<content>"
14350 " to the file C<path> starting at offset C<offset>."
14354 #: ../fish/guestfish-actions.pod:4002 ../src/guestfs-actions.pod:6228
14356 "This command implements the L<pwrite(2)> system call, and like that system "
14357 "call it may not write the full data requested. The return value is the "
14358 "number of bytes that were actually written to the file. This could even be "
14359 "0, although short writes are unlikely for regular files in ordinary "
14364 #: ../fish/guestfish-actions.pod:4008
14365 msgid "See also L</pread>, L</pwrite-device>."
14369 #: ../fish/guestfish-actions.pod:4013
14370 msgid "pwrite-device"
14374 #: ../fish/guestfish-actions.pod:4015
14377 " pwrite-device device content offset\n"
14382 #: ../fish/guestfish-actions.pod:4017 ../src/guestfs-actions.pod:6252
14384 "This command writes to part of a device. It writes the data buffer "
14385 "C<content> to C<device> starting at offset C<offset>."
14389 #: ../fish/guestfish-actions.pod:4020 ../src/guestfs-actions.pod:6255
14391 "This command implements the L<pwrite(2)> system call, and like that system "
14392 "call it may not write the full data requested (although short writes to disk"
14393 " devices and partitions are probably impossible with standard Linux "
14398 #: ../fish/guestfish-actions.pod:4025
14399 msgid "See also L</pwrite>."
14403 #: ../fish/guestfish-actions.pod:4030
14408 #: ../fish/guestfish-actions.pod:4032
14411 " read-file path\n"
14416 #: ../fish/guestfish-actions.pod:4034 ../src/guestfs-actions.pod:6276
14417 msgid "This calls returns the contents of the file C<path> as a buffer."
14421 #: ../fish/guestfish-actions.pod:4037
14423 "Unlike L</cat>, this function can correctly handle files that contain "
14424 "embedded ASCII NUL characters. However unlike L</download>, this function "
14425 "is limited in the total size of file that can be handled."
14429 #: ../fish/guestfish-actions.pod:4045
14434 #: ../fish/guestfish-actions.pod:4047
14437 " read-lines path\n"
14442 #: ../fish/guestfish-actions.pod:4051 ../src/guestfs-actions.pod:6301
14444 "The file contents are returned as a list of lines. Trailing C<LF> and "
14445 "C<CRLF> character sequences are I<not> returned."
14449 #: ../fish/guestfish-actions.pod:4054
14451 "Note that this function cannot correctly handle binary files (specifically, "
14452 "files containing C<\\0> character which is treated as end of line). For "
14453 "those you need to use the L</read-file> function which has a more complex "
14458 #: ../fish/guestfish-actions.pod:4059
14463 #: ../fish/guestfish-actions.pod:4061
14471 #: ../fish/guestfish-actions.pod:4063 ../src/guestfs-actions.pod:6321
14472 msgid "This returns the list of directory entries in directory C<dir>."
14476 #: ../fish/guestfish-actions.pod:4065 ../src/guestfs-actions.pod:6323
14478 "All entries in the directory are returned, including C<.> and C<..>. The "
14479 "entries are I<not> sorted, but returned in the same order as the underlying "
14484 #: ../fish/guestfish-actions.pod:4069 ../src/guestfs-actions.pod:6327
14486 "Also this call returns basic file type information about each file. The "
14487 "C<ftyp> field will contain one of the following characters:"
14491 #: ../fish/guestfish-actions.pod:4074 ../src/guestfs-actions.pod:6332
14496 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6334
14497 msgid "Block special"
14501 #: ../fish/guestfish-actions.pod:4078 ../src/guestfs-actions.pod:6336
14506 #: ../fish/guestfish-actions.pod:4080 ../src/guestfs-actions.pod:6338
14507 msgid "Char special"
14511 #: ../fish/guestfish-actions.pod:4082 ../src/guestfs-actions.pod:6340
14516 #: ../fish/guestfish-actions.pod:4084 ../src/guestfs-actions.pod:6342
14521 #: ../fish/guestfish-actions.pod:4086 ../src/guestfs-actions.pod:6344
14526 #: ../fish/guestfish-actions.pod:4088 ../src/guestfs-actions.pod:6346
14527 msgid "FIFO (named pipe)"
14531 #: ../fish/guestfish-actions.pod:4090 ../src/guestfs-actions.pod:6348
14536 #: ../fish/guestfish-actions.pod:4092 ../src/guestfs-actions.pod:6350
14537 msgid "Symbolic link"
14541 #: ../fish/guestfish-actions.pod:4094 ../src/guestfs-actions.pod:6352
14546 #: ../fish/guestfish-actions.pod:4096 ../src/guestfs-actions.pod:6354
14547 msgid "Regular file"
14551 #: ../fish/guestfish-actions.pod:4098 ../src/guestfs-actions.pod:6356
14556 #: ../fish/guestfish-actions.pod:4100 ../src/guestfs-actions.pod:6358
14561 #: ../fish/guestfish-actions.pod:4102 ../src/guestfs-actions.pod:6360
14566 #: ../fish/guestfish-actions.pod:4104 ../src/guestfs-actions.pod:6362
14567 msgid "Unknown file type"
14571 #: ../fish/guestfish-actions.pod:4106 ../src/guestfs-actions.pod:6364
14576 #: ../fish/guestfish-actions.pod:4108 ../src/guestfs-actions.pod:6366
14578 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14582 #: ../fish/guestfish-actions.pod:4113
14584 "This function is primarily intended for use by programs. To get a simple "
14585 "list of names, use L</ls>. To get a printable directory for human "
14586 "consumption, use L</ll>."
14590 #: ../fish/guestfish-actions.pod:4117
14595 #: ../fish/guestfish-actions.pod:4119
14603 #: ../fish/guestfish-actions.pod:4121 ../src/guestfs-actions.pod:6387
14604 msgid "This command reads the target of a symbolic link."
14608 #: ../fish/guestfish-actions.pod:4123
14609 msgid "readlinklist"
14613 #: ../fish/guestfish-actions.pod:4125
14616 " readlinklist path 'names ...'\n"
14621 #: ../fish/guestfish-actions.pod:4127 ../src/guestfs-actions.pod:6401
14623 "This call allows you to do a C<readlink> operation on multiple files, where "
14624 "all files are in the directory C<path>. C<names> is the list of files from "
14629 #: ../fish/guestfish-actions.pod:4131 ../src/guestfs-actions.pod:6405
14631 "On return you get a list of strings, with a one-to-one correspondence to the"
14632 " C<names> list. Each string is the value of the symbolic link."
14636 #: ../fish/guestfish-actions.pod:4135 ../src/guestfs-actions.pod:6409
14638 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14639 "result string is the empty string C<\"\">. However the whole operation is "
14640 "completed even if there were C<readlink(2)> errors, and so you can call this"
14641 " function with names where you don't know if they are symbolic links already"
14642 " (albeit slightly less efficient)."
14646 #: ../fish/guestfish-actions.pod:4142 ../src/guestfs-actions.pod:6416
14648 "This call is intended for programs that want to efficiently list a directory"
14649 " contents without making many round-trips. Very long directory listings "
14650 "might cause the protocol message size to be exceeded, causing this call to "
14651 "fail. The caller must split up such requests into smaller groups of names."
14655 #: ../fish/guestfish-actions.pod:4149
14660 #: ../fish/guestfish-actions.pod:4151
14668 #: ../fish/guestfish-actions.pod:4153 ../src/guestfs-actions.pod:6435
14670 "Return the canonicalized absolute pathname of C<path>. The returned path "
14671 "has no C<.>, C<..> or symbolic link path elements."
14675 #: ../fish/guestfish-actions.pod:4156
14676 msgid "removexattr"
14680 #: ../fish/guestfish-actions.pod:4158
14683 " removexattr xattr path\n"
14688 #: ../fish/guestfish-actions.pod:4160 ../src/guestfs-actions.pod:6450
14690 "This call removes the extended attribute named C<xattr> of the file C<path>."
14694 #: ../fish/guestfish-actions.pod:4163
14695 msgid "See also: L</lremovexattr>, L<attr(5)>."
14699 #: ../fish/guestfish-actions.pod:4165
14704 #: ../fish/guestfish-actions.pod:4167
14707 " resize2fs device\n"
14712 #: ../fish/guestfish-actions.pod:4169 ../src/guestfs-actions.pod:6465
14714 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14715 "underlying device."
14719 #: ../fish/guestfish-actions.pod:4172
14721 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device>"
14722 " before calling this command. For unknown reasons C<resize2fs> sometimes "
14723 "gives an error about this and sometimes not. In any case, it is always safe"
14724 " to call L</e2fsck-f> before calling this function."
14728 #: ../fish/guestfish-actions.pod:4178
14729 msgid "resize2fs-M"
14733 #: ../fish/guestfish-actions.pod:4180
14736 " resize2fs-M device\n"
14741 #: ../fish/guestfish-actions.pod:4182
14743 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14744 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14749 #: ../fish/guestfish-actions.pod:4186
14751 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14752 "and read the C<Block size> and C<Block count> values. These two numbers, "
14753 "multiplied together, give the resulting size of the minimal filesystem in "
14758 #: ../fish/guestfish-actions.pod:4191
14759 msgid "resize2fs-size"
14763 #: ../fish/guestfish-actions.pod:4193
14766 " resize2fs-size device size\n"
14771 #: ../fish/guestfish-actions.pod:4195
14773 "This command is the same as L</resize2fs> except that it allows you to "
14774 "specify the new size (in bytes) explicitly."
14778 #: ../fish/guestfish-actions.pod:4198
14783 #: ../fish/guestfish-actions.pod:4200
14791 #: ../fish/guestfish-actions.pod:4202 ../src/guestfs-actions.pod:6517
14792 msgid "Remove the single file C<path>."
14796 #: ../fish/guestfish-actions.pod:4204
14801 #: ../fish/guestfish-actions.pod:4206
14809 #: ../fish/guestfish-actions.pod:4208 ../src/guestfs-actions.pod:6529
14811 "Remove the file or directory C<path>, recursively removing the contents if "
14812 "its a directory. This is like the C<rm -rf> shell command."
14816 #: ../fish/guestfish-actions.pod:4212
14821 #: ../fish/guestfish-actions.pod:4214
14829 #: ../fish/guestfish-actions.pod:4216 ../src/guestfs-actions.pod:6543
14830 msgid "Remove the single directory C<path>."
14834 #: ../fish/guestfish-actions.pod:4218
14835 msgid "rmmountpoint"
14839 #: ../fish/guestfish-actions.pod:4220
14842 " rmmountpoint exemptpath\n"
14847 #: ../fish/guestfish-actions.pod:4222
14849 "This calls removes a mountpoint that was previously created with "
14850 "L</mkmountpoint>. See L</mkmountpoint> for full details."
14854 #: ../fish/guestfish-actions.pod:4226
14855 msgid "scrub-device"
14859 #: ../fish/guestfish-actions.pod:4228
14862 " scrub-device device\n"
14867 #: ../fish/guestfish-actions.pod:4230 ../src/guestfs-actions.pod:6569
14869 "This command writes patterns over C<device> to make data retrieval more "
14874 #: ../fish/guestfish-actions.pod:4233 ../fish/guestfish-actions.pod:4248
14875 #: ../fish/guestfish-actions.pod:4261 ../src/guestfs-actions.pod:6572
14876 #: ../src/guestfs-actions.pod:6593 ../src/guestfs-actions.pod:6612
14878 "It is an interface to the L<scrub(1)> program. See that manual page for "
14883 #: ../fish/guestfish-actions.pod:4239
14888 #: ../fish/guestfish-actions.pod:4241
14891 " scrub-file file\n"
14896 #: ../fish/guestfish-actions.pod:4243 ../src/guestfs-actions.pod:6588
14898 "This command writes patterns over a file to make data retrieval more "
14903 #: ../fish/guestfish-actions.pod:4246 ../src/guestfs-actions.pod:6591
14904 msgid "The file is I<removed> after scrubbing."
14908 #: ../fish/guestfish-actions.pod:4251
14909 msgid "scrub-freespace"
14913 #: ../fish/guestfish-actions.pod:4253
14916 " scrub-freespace dir\n"
14921 #: ../fish/guestfish-actions.pod:4255
14923 "This command creates the directory C<dir> and then fills it with files until"
14924 " the filesystem is full, and scrubs the files as for L</scrub-file>, and "
14925 "deletes them. The intention is to scrub any free space on the partition "
14926 "containing C<dir>."
14930 #: ../fish/guestfish-actions.pod:4264
14935 #: ../fish/guestfish-actions.pod:4266
14940 #: ../fish/guestfish-actions.pod:4268
14943 " set-append append\n"
14948 #: ../fish/guestfish-actions.pod:4270 ../src/guestfs-actions.pod:6625
14950 "This function is used to add additional options to the guest kernel command "
14955 #: ../fish/guestfish-actions.pod:4273 ../src/guestfs-actions.pod:6628
14957 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
14958 "environment variable."
14962 #: ../fish/guestfish-actions.pod:4276 ../src/guestfs-actions.pod:6631
14964 "Setting C<append> to C<NULL> means I<no> additional options are passed "
14965 "(libguestfs always adds a few of its own)."
14969 #: ../fish/guestfish-actions.pod:4279
14970 msgid "set-attach-method"
14974 #: ../fish/guestfish-actions.pod:4281
14975 msgid "attach-method"
14979 #: ../fish/guestfish-actions.pod:4283
14982 " set-attach-method attachmethod\n"
14987 #: ../fish/guestfish-actions.pod:4285 ../src/guestfs-actions.pod:6644
14989 "Set the method that libguestfs uses to connect to the back end guestfsd "
14990 "daemon. Possible methods are:"
14994 #: ../fish/guestfish-actions.pod:4290 ../src/guestfs-actions.pod:6649
14995 #: ../src/guestfs.pod:2916
14996 msgid "C<appliance>"
15000 #: ../fish/guestfish-actions.pod:4292 ../src/guestfs-actions.pod:6651
15002 "Launch an appliance and connect to it. This is the ordinary method and the "
15007 #: ../fish/guestfish-actions.pod:4295 ../src/guestfs-actions.pod:6654
15008 msgid "C<unix:I<path>>"
15012 #: ../fish/guestfish-actions.pod:4297 ../src/guestfs-actions.pod:6656
15013 msgid "Connect to the Unix domain socket I<path>."
15017 #: ../fish/guestfish-actions.pod:4299 ../src/guestfs-actions.pod:6658
15019 "This method lets you connect to an existing daemon or (using virtio-serial) "
15020 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15021 "RUNNING DAEMONS>."
15025 #: ../fish/guestfish-actions.pod:4305
15026 msgid "set-autosync"
15030 #: ../fish/guestfish-actions.pod:4307
15035 #: ../fish/guestfish-actions.pod:4309
15038 " set-autosync true|false\n"
15043 #: ../fish/guestfish-actions.pod:4311 ../src/guestfs-actions.pod:6674
15045 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15046 "effort attempt to make filesystems consistent and synchronized when the "
15047 "handle is closed (also if the program exits without closing handles)."
15051 #: ../fish/guestfish-actions.pod:4316 ../src/guestfs-actions.pod:6679
15053 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15054 "disabled by default)."
15058 #: ../fish/guestfish-actions.pod:4319
15063 #: ../fish/guestfish-actions.pod:4321
15068 #: ../fish/guestfish-actions.pod:4323
15071 " set-direct true|false\n"
15076 #: ../fish/guestfish-actions.pod:4325 ../src/guestfs-actions.pod:6692
15078 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15079 "passed directly through to the appliance once it is launched."
15083 #: ../fish/guestfish-actions.pod:4329
15085 "One consequence of this is that log messages aren't caught by the library "
15086 "and handled by L</set-log-message-callback>, but go straight to stdout."
15090 #: ../fish/guestfish-actions.pod:4333 ../src/guestfs-actions.pod:6700
15092 "You probably don't want to use this unless you know what you are doing."
15096 #: ../fish/guestfish-actions.pod:4336 ../src/guestfs-actions.pod:6703
15097 msgid "The default is disabled."
15101 #: ../fish/guestfish-actions.pod:4338
15102 msgid "set-e2label"
15106 #: ../fish/guestfish-actions.pod:4340
15109 " set-e2label device label\n"
15114 #: ../fish/guestfish-actions.pod:4342 ../src/guestfs-actions.pod:6716
15116 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15117 "C<label>. Filesystem labels are limited to 16 characters."
15121 #: ../fish/guestfish-actions.pod:4346
15123 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15124 "label on a filesystem."
15128 #: ../fish/guestfish-actions.pod:4349
15133 #: ../fish/guestfish-actions.pod:4351
15136 " set-e2uuid device uuid\n"
15141 #: ../fish/guestfish-actions.pod:4353 ../src/guestfs-actions.pod:6734
15143 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15144 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15145 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15149 #: ../fish/guestfish-actions.pod:4358
15151 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15152 "UUID of a filesystem."
15156 #: ../fish/guestfish-actions.pod:4361
15157 msgid "set-memsize"
15161 #: ../fish/guestfish-actions.pod:4363
15166 #: ../fish/guestfish-actions.pod:4365
15169 " set-memsize memsize\n"
15174 #: ../fish/guestfish-actions.pod:4367
15176 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15177 "This only has any effect if called before L</launch>."
15181 #: ../fish/guestfish-actions.pod:4371 ../src/guestfs-actions.pod:6756
15183 "You can also change this by setting the environment variable "
15184 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15188 #: ../fish/guestfish-actions.pod:4378
15189 msgid "set-network"
15193 #: ../fish/guestfish-actions.pod:4380
15198 #: ../fish/guestfish-actions.pod:4382
15201 " set-network true|false\n"
15206 #: ../fish/guestfish-actions.pod:4384 ../src/guestfs-actions.pod:6773
15208 "If C<network> is true, then the network is enabled in the libguestfs "
15209 "appliance. The default is false."
15213 #: ../fish/guestfish-actions.pod:4387 ../src/guestfs-actions.pod:6776
15215 "This affects whether commands are able to access the network (see "
15216 "L<guestfs(3)/RUNNING COMMANDS>)."
15220 #: ../fish/guestfish-actions.pod:4390
15222 "You must call this before calling L</launch>, otherwise it has no effect."
15226 #: ../fish/guestfish-actions.pod:4393
15231 #: ../fish/guestfish-actions.pod:4397
15234 " set-path searchpath\n"
15239 #: ../fish/guestfish-actions.pod:4399 ../src/guestfs-actions.pod:6792
15240 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15244 #: ../fish/guestfish-actions.pod:4401 ../src/guestfs-actions.pod:6794
15246 "The default is C<$libdir/guestfs> unless overridden by setting "
15247 "C<LIBGUESTFS_PATH> environment variable."
15251 #: ../fish/guestfish-actions.pod:4404 ../src/guestfs-actions.pod:6797
15252 msgid "Setting C<path> to C<NULL> restores the default path."
15256 #: ../fish/guestfish-actions.pod:4406
15261 #: ../fish/guestfish-actions.pod:4408
15266 #: ../fish/guestfish-actions.pod:4410
15269 " set-pgroup true|false\n"
15274 #: ../fish/guestfish-actions.pod:4412 ../src/guestfs-actions.pod:6809
15276 "If C<pgroup> is true, child processes are placed into their own process "
15281 #: ../fish/guestfish-actions.pod:4415 ../src/guestfs-actions.pod:6812
15283 "The practical upshot of this is that signals like C<SIGINT> (from users "
15284 "pressing C<^C>) won't be received by the child process."
15288 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6815
15290 "The default for this flag is false, because usually you want C<^C> to kill "
15295 #: ../fish/guestfish-actions.pod:4421
15300 #: ../fish/guestfish-actions.pod:4423
15305 #: ../fish/guestfish-actions.pod:4425
15313 #: ../fish/guestfish-actions.pod:4427 ../src/guestfs-actions.pod:6828
15314 msgid "Set the qemu binary that we will use."
15318 #: ../fish/guestfish-actions.pod:4429 ../src/guestfs-actions.pod:6830
15320 "The default is chosen when the library was compiled by the configure script."
15324 #: ../fish/guestfish-actions.pod:4432 ../src/guestfs-actions.pod:6833
15326 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15331 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6836
15332 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15336 #: ../fish/guestfish-actions.pod:4437 ../src/guestfs-actions.pod:6838
15338 "Note that you should call this function as early as possible after creating "
15339 "the handle. This is because some pre-launch operations depend on testing "
15340 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15341 "don't retest features, and so you might see inconsistent results. Using the"
15342 " environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15343 "the qemu binary at the same time as the handle is created."
15347 #: ../fish/guestfish-actions.pod:4445
15348 msgid "set-recovery-proc"
15352 #: ../fish/guestfish-actions.pod:4447
15353 msgid "recovery-proc"
15357 #: ../fish/guestfish-actions.pod:4449
15360 " set-recovery-proc true|false\n"
15365 #: ../fish/guestfish-actions.pod:4451
15367 "If this is called with the parameter C<false> then L</launch> does not "
15368 "create a recovery process. The purpose of the recovery process is to stop "
15369 "runaway qemu processes in the case where the main program aborts abruptly."
15373 #: ../fish/guestfish-actions.pod:4456
15375 "This only has any effect if called before L</launch>, and the default is "
15380 #: ../fish/guestfish-actions.pod:4459 ../src/guestfs-actions.pod:6864
15382 "About the only time when you would want to disable this is if the main "
15383 "process will fork itself into the background (\"daemonize\" itself). In "
15384 "this case the recovery process thinks that the main program has disappeared "
15385 "and so kills qemu, which is not very helpful."
15389 #: ../fish/guestfish-actions.pod:4465
15390 msgid "set-selinux"
15394 #: ../fish/guestfish-actions.pod:4467
15399 #: ../fish/guestfish-actions.pod:4469
15402 " set-selinux true|false\n"
15407 #: ../fish/guestfish-actions.pod:4471 ../src/guestfs-actions.pod:6880
15409 "This sets the selinux flag that is passed to the appliance at boot time. "
15410 "The default is C<selinux=0> (disabled)."
15414 #: ../fish/guestfish-actions.pod:4474 ../src/guestfs-actions.pod:6883
15416 "Note that if SELinux is enabled, it is always in Permissive mode "
15417 "(C<enforcing=0>)."
15421 #: ../fish/guestfish-actions.pod:4480
15426 #: ../fish/guestfish-actions.pod:4482
15431 #: ../fish/guestfish-actions.pod:4484
15439 #: ../fish/guestfish-actions.pod:4486 ../src/guestfs-actions.pod:6899
15441 "Change the number of virtual CPUs assigned to the appliance. The default is"
15442 " C<1>. Increasing this may improve performance, though often it has no "
15447 #: ../fish/guestfish-actions.pod:4490
15448 msgid "This function must be called before L</launch>."
15452 #: ../fish/guestfish-actions.pod:4492
15457 #: ../fish/guestfish-actions.pod:4494
15462 #: ../fish/guestfish-actions.pod:4496
15465 " set-trace true|false\n"
15470 #: ../fish/guestfish-actions.pod:4498 ../src/guestfs-actions.pod:6915
15472 "If the command trace flag is set to 1, then libguestfs calls, parameters and"
15473 " return values are traced."
15477 #: ../fish/guestfish-actions.pod:4501 ../src/guestfs-actions.pod:6918
15479 "If you want to trace C API calls into libguestfs (and other libraries) then "
15480 "possibly a better way is to use the external ltrace(1) command."
15484 #: ../fish/guestfish-actions.pod:4505 ../src/guestfs-actions.pod:6922
15486 "Command traces are disabled unless the environment variable "
15487 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15491 #: ../fish/guestfish-actions.pod:4508
15493 "Trace messages are normally sent to C<stderr>, unless you register a "
15494 "callback to send them somewhere else (see L</set-event-callback>)."
15498 #: ../fish/guestfish-actions.pod:4512
15499 msgid "set-verbose"
15503 #: ../fish/guestfish-actions.pod:4514
15508 #: ../fish/guestfish-actions.pod:4516
15511 " set-verbose true|false\n"
15516 #: ../fish/guestfish-actions.pod:4518 ../src/guestfs-actions.pod:6939
15517 msgid "If C<verbose> is true, this turns on verbose messages."
15521 #: ../fish/guestfish-actions.pod:4520 ../src/guestfs-actions.pod:6941
15523 "Verbose messages are disabled unless the environment variable "
15524 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15528 #: ../fish/guestfish-actions.pod:4523
15530 "Verbose messages are normally sent to C<stderr>, unless you register a "
15531 "callback to send them somewhere else (see L</set-event-callback>)."
15535 #: ../fish/guestfish-actions.pod:4527
15540 #: ../fish/guestfish-actions.pod:4529
15543 " setcon context\n"
15548 #: ../fish/guestfish-actions.pod:4531 ../src/guestfs-actions.pod:6958
15550 "This sets the SELinux security context of the daemon to the string "
15555 #: ../fish/guestfish-actions.pod:4534 ../src/guestfs-actions.pod:6961
15556 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15560 #: ../fish/guestfish-actions.pod:4536
15565 #: ../fish/guestfish-actions.pod:4538
15568 " setxattr xattr val vallen path\n"
15573 #: ../fish/guestfish-actions.pod:4540 ../src/guestfs-actions.pod:6976
15575 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15576 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15580 #: ../fish/guestfish-actions.pod:4544
15581 msgid "See also: L</lsetxattr>, L<attr(5)>."
15585 #: ../fish/guestfish-actions.pod:4546
15590 #: ../fish/guestfish-actions.pod:4548
15593 " sfdisk device cyls heads sectors 'lines ...'\n"
15598 #: ../fish/guestfish-actions.pod:4550 ../src/guestfs-actions.pod:7003
15600 "This is a direct interface to the L<sfdisk(8)> program for creating "
15601 "partitions on block devices."
15605 #: ../fish/guestfish-actions.pod:4553 ../src/guestfs-actions.pod:7006
15606 msgid "C<device> should be a block device, for example C</dev/sda>."
15610 #: ../fish/guestfish-actions.pod:4555 ../src/guestfs-actions.pod:7008
15612 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15613 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
15614 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15615 "corresponding parameter is omitted. Usually for 'large' disks, you can just"
15616 " pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather,"
15617 " the kernel) cannot work out the right geometry and you will need to tell "
15622 #: ../fish/guestfish-actions.pod:4563 ../src/guestfs-actions.pod:7016
15624 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information"
15625 " refer to the L<sfdisk(8)> manpage."
15629 #: ../fish/guestfish-actions.pod:4566 ../src/guestfs-actions.pod:7019
15631 "To create a single partition occupying the whole disk, you would pass "
15632 "C<lines> as a single element list, when the single element being the string "
15637 #: ../fish/guestfish-actions.pod:4570
15638 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15642 #: ../fish/guestfish-actions.pod:4576 ../fish/guestfish-actions.pod:4599
15643 #: ../fish/guestfish-actions.pod:4621
15645 "I<This function is deprecated.> In new code, use the L</part_add> call "
15650 #: ../fish/guestfish-actions.pod:4583
15655 #: ../fish/guestfish-actions.pod:4585
15658 " sfdiskM device 'lines ...'\n"
15663 #: ../fish/guestfish-actions.pod:4587
15665 "This is a simplified interface to the L</sfdisk> command, where partition "
15666 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15667 "you don't need to specify the cyls, heads and sectors parameters which were "
15668 "rarely if ever used anyway."
15672 #: ../fish/guestfish-actions.pod:4593
15673 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15677 #: ../fish/guestfish-actions.pod:4606
15682 #: ../fish/guestfish-actions.pod:4608
15685 " sfdisk-N device partnum cyls heads sectors line\n"
15690 #: ../fish/guestfish-actions.pod:4610 ../src/guestfs-actions.pod:7081
15692 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15693 "(note: C<n> counts from 1)."
15697 #: ../fish/guestfish-actions.pod:4613
15699 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15700 "cyls/heads/sectors parameters."
15704 #: ../fish/guestfish-actions.pod:4616
15705 msgid "See also: L</part-add>"
15709 #: ../fish/guestfish-actions.pod:4628
15710 msgid "sfdisk-disk-geometry"
15714 #: ../fish/guestfish-actions.pod:4630
15717 " sfdisk-disk-geometry device\n"
15722 #: ../fish/guestfish-actions.pod:4632
15724 "This displays the disk geometry of C<device> read from the partition table."
15725 " Especially in the case where the underlying block device has been resized,"
15726 " this can be different from the kernel's idea of the geometry (see L"
15727 "</sfdisk-kernel-geometry>)."
15731 #: ../fish/guestfish-actions.pod:4637 ../fish/guestfish-actions.pod:4646
15732 #: ../src/guestfs-actions.pod:7107 ../src/guestfs-actions.pod:7123
15733 msgid "The result is in human-readable format, and not designed to be parsed."
15737 #: ../fish/guestfish-actions.pod:4640
15738 msgid "sfdisk-kernel-geometry"
15742 #: ../fish/guestfish-actions.pod:4642
15745 " sfdisk-kernel-geometry device\n"
15750 #: ../fish/guestfish-actions.pod:4644 ../src/guestfs-actions.pod:7121
15751 msgid "This displays the kernel's idea of the geometry of C<device>."
15755 #: ../fish/guestfish-actions.pod:4649
15760 #: ../fish/guestfish-actions.pod:4651
15763 " sfdisk-l device\n"
15768 #: ../fish/guestfish-actions.pod:4653 ../src/guestfs-actions.pod:7144
15770 "This displays the partition table on C<device>, in the human-readable output"
15771 " of the L<sfdisk(8)> command. It is not intended to be parsed."
15775 #: ../fish/guestfish-actions.pod:4657
15776 msgid "See also: L</part-list>"
15780 #: ../fish/guestfish-actions.pod:4659
15782 "I<This function is deprecated.> In new code, use the L</part_list> call "
15787 #: ../fish/guestfish-actions.pod:4666
15792 #: ../fish/guestfish-actions.pod:4668
15800 #: ../fish/guestfish-actions.pod:4670 ../src/guestfs-actions.pod:7161
15802 "This call runs a command from the guest filesystem via the guest's "
15807 #: ../fish/guestfish-actions.pod:4673
15808 msgid "This is like L</command>, but passes the command to:"
15812 #: ../fish/guestfish-actions.pod:4675 ../src/guestfs-actions.pod:7166
15815 " /bin/sh -c \"command\"\n"
15820 #: ../fish/guestfish-actions.pod:4677 ../src/guestfs-actions.pod:7168
15822 "Depending on the guest's shell, this usually results in wildcards being "
15823 "expanded, shell expressions being interpolated and so on."
15827 #: ../fish/guestfish-actions.pod:4681
15828 msgid "All the provisos about L</command> apply to this call."
15832 #: ../fish/guestfish-actions.pod:4683
15837 #: ../fish/guestfish-actions.pod:4685
15840 " sh-lines command\n"
15845 #: ../fish/guestfish-actions.pod:4687
15847 "This is the same as L</sh>, but splits the result into a list of lines."
15851 #: ../fish/guestfish-actions.pod:4690
15852 msgid "See also: L</command-lines>"
15856 #: ../fish/guestfish-actions.pod:4692
15861 #: ../fish/guestfish-actions.pod:4694
15869 #: ../fish/guestfish-actions.pod:4696 ../src/guestfs-actions.pod:7202
15870 msgid "Sleep for C<secs> seconds."
15874 #: ../fish/guestfish-actions.pod:4698
15879 #: ../fish/guestfish-actions.pod:4700
15887 #: ../fish/guestfish-actions.pod:4704 ../src/guestfs-actions.pod:7216
15888 msgid "This is the same as the C<stat(2)> system call."
15892 #: ../fish/guestfish-actions.pod:4706
15897 #: ../fish/guestfish-actions.pod:4708
15905 #: ../fish/guestfish-actions.pod:4710 ../src/guestfs-actions.pod:7230
15907 "Returns file system statistics for any mounted file system. C<path> should "
15908 "be a file or directory in the mounted file system (typically it is the mount"
15909 " point itself, but it doesn't need to be)."
15913 #: ../fish/guestfish-actions.pod:4714 ../src/guestfs-actions.pod:7234
15914 msgid "This is the same as the C<statvfs(2)> system call."
15918 #: ../fish/guestfish-actions.pod:4716
15923 #: ../fish/guestfish-actions.pod:4718
15931 #: ../fish/guestfish-actions.pod:4720 ../src/guestfs-actions.pod:7248
15933 "This runs the L<strings(1)> command on a file and returns the list of "
15934 "printable strings found."
15938 #: ../fish/guestfish-actions.pod:4726
15943 #: ../fish/guestfish-actions.pod:4728
15946 " strings-e encoding path\n"
15951 #: ../fish/guestfish-actions.pod:4730
15953 "This is like the L</strings> command, but allows you to specify the encoding"
15954 " of strings that are looked for in the source file C<path>."
15958 #: ../fish/guestfish-actions.pod:4734 ../src/guestfs-actions.pod:7271
15959 msgid "Allowed encodings are:"
15963 #: ../fish/guestfish-actions.pod:4738 ../src/guestfs-actions.pod:7275
15968 #: ../fish/guestfish-actions.pod:4740
15970 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
15971 "ISO-8859-X (this is what L</strings> uses)."
15975 #: ../fish/guestfish-actions.pod:4743 ../src/guestfs-actions.pod:7280
15980 #: ../fish/guestfish-actions.pod:4745 ../src/guestfs-actions.pod:7282
15981 msgid "Single 8-bit-byte characters."
15985 #: ../fish/guestfish-actions.pod:4747 ../src/guestfs-actions.pod:7284
15990 #: ../fish/guestfish-actions.pod:4749 ../src/guestfs-actions.pod:7286
15992 "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
15996 #: ../fish/guestfish-actions.pod:4752 ../src/guestfs-actions.pod:7289
15997 msgid "l (lower case letter L)"
16001 #: ../fish/guestfish-actions.pod:4754 ../src/guestfs-actions.pod:7291
16003 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16004 "examining binaries in Windows guests."
16008 #: ../fish/guestfish-actions.pod:4757 ../src/guestfs-actions.pod:7294
16013 #: ../fish/guestfish-actions.pod:4759 ../src/guestfs-actions.pod:7296
16014 msgid "32-bit big endian such as UCS-4BE."
16018 #: ../fish/guestfish-actions.pod:4761 ../src/guestfs-actions.pod:7298
16023 #: ../fish/guestfish-actions.pod:4763 ../src/guestfs-actions.pod:7300
16024 msgid "32-bit little endian such as UCS-4LE."
16028 #: ../fish/guestfish-actions.pod:4767 ../src/guestfs-actions.pod:7304
16029 msgid "The returned strings are transcoded to UTF-8."
16033 #: ../fish/guestfish-actions.pod:4772
16034 msgid "swapoff-device"
16038 #: ../fish/guestfish-actions.pod:4774
16041 " swapoff-device device\n"
16046 #: ../fish/guestfish-actions.pod:4776
16048 "This command disables the libguestfs appliance swap device or partition "
16049 "named C<device>. See L</swapon-device>."
16053 #: ../fish/guestfish-actions.pod:4780
16054 msgid "swapoff-file"
16058 #: ../fish/guestfish-actions.pod:4782
16061 " swapoff-file file\n"
16066 #: ../fish/guestfish-actions.pod:4784 ../src/guestfs-actions.pod:7335
16067 msgid "This command disables the libguestfs appliance swap on file."
16071 #: ../fish/guestfish-actions.pod:4786
16072 msgid "swapoff-label"
16076 #: ../fish/guestfish-actions.pod:4788
16079 " swapoff-label label\n"
16084 #: ../fish/guestfish-actions.pod:4790 ../src/guestfs-actions.pod:7347
16086 "This command disables the libguestfs appliance swap on labeled swap "
16091 #: ../fish/guestfish-actions.pod:4793
16092 msgid "swapoff-uuid"
16096 #: ../fish/guestfish-actions.pod:4795
16099 " swapoff-uuid uuid\n"
16104 #: ../fish/guestfish-actions.pod:4797 ../src/guestfs-actions.pod:7360
16106 "This command disables the libguestfs appliance swap partition with the given"
16111 #: ../fish/guestfish-actions.pod:4800
16112 msgid "swapon-device"
16116 #: ../fish/guestfish-actions.pod:4802
16119 " swapon-device device\n"
16124 #: ../fish/guestfish-actions.pod:4804
16126 "This command enables the libguestfs appliance to use the swap device or "
16127 "partition named C<device>. The increased memory is made available for all "
16128 "commands, for example those run using L</command> or L</sh>."
16132 #: ../fish/guestfish-actions.pod:4809 ../src/guestfs-actions.pod:7378
16134 "Note that you should not swap to existing guest swap partitions unless you "
16135 "know what you are doing. They may contain hibernation information, or other"
16136 " information that the guest doesn't want you to trash. You also risk "
16137 "leaking information about the host to the guest this way. Instead, attach a"
16138 " new host device to the guest and swap on that."
16142 #: ../fish/guestfish-actions.pod:4816
16143 msgid "swapon-file"
16147 #: ../fish/guestfish-actions.pod:4818
16150 " swapon-file file\n"
16155 #: ../fish/guestfish-actions.pod:4820
16157 "This command enables swap to a file. See L</swapon-device> for other notes."
16161 #: ../fish/guestfish-actions.pod:4823
16162 msgid "swapon-label"
16166 #: ../fish/guestfish-actions.pod:4825
16169 " swapon-label label\n"
16174 #: ../fish/guestfish-actions.pod:4827
16176 "This command enables swap to a labeled swap partition. See L</swapon-"
16177 "device> for other notes."
16181 #: ../fish/guestfish-actions.pod:4830
16182 msgid "swapon-uuid"
16186 #: ../fish/guestfish-actions.pod:4832
16189 " swapon-uuid uuid\n"
16194 #: ../fish/guestfish-actions.pod:4834
16196 "This command enables swap to a swap partition with the given UUID. See L"
16197 "</swapon-device> for other notes."
16201 #: ../fish/guestfish-actions.pod:4837
16206 #: ../fish/guestfish-actions.pod:4839
16214 #: ../fish/guestfish-actions.pod:4841 ../src/guestfs-actions.pod:7433
16216 "This syncs the disk, so that any writes are flushed through to the "
16217 "underlying disk image."
16221 #: ../fish/guestfish-actions.pod:4844 ../src/guestfs-actions.pod:7436
16223 "You should always call this if you have modified a disk image, before "
16224 "closing the handle."
16228 #: ../fish/guestfish-actions.pod:4847
16233 #: ../fish/guestfish-actions.pod:4849
16241 #: ../fish/guestfish-actions.pod:4851 ../src/guestfs-actions.pod:7449
16243 "This command returns up to the last 10 lines of a file as a list of strings."
16247 #: ../fish/guestfish-actions.pod:4857
16252 #: ../fish/guestfish-actions.pod:4859
16255 " tail-n nrlines path\n"
16260 #: ../fish/guestfish-actions.pod:4861 ../src/guestfs-actions.pod:7468
16262 "If the parameter C<nrlines> is a positive number, this returns the last "
16263 "C<nrlines> lines of the file C<path>."
16267 #: ../fish/guestfish-actions.pod:4864 ../src/guestfs-actions.pod:7471
16269 "If the parameter C<nrlines> is a negative number, this returns lines from "
16270 "the file C<path>, starting with the C<-nrlines>th line."
16274 #: ../fish/guestfish-actions.pod:4872
16279 #: ../fish/guestfish-actions.pod:4874
16282 " tar-in (tarfile|-) directory\n"
16287 #: ../fish/guestfish-actions.pod:4876 ../src/guestfs-actions.pod:7492
16289 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16290 "tar file) into C<directory>."
16294 #: ../fish/guestfish-actions.pod:4879
16295 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16299 #: ../fish/guestfish-actions.pod:4884
16304 #: ../fish/guestfish-actions.pod:4886
16307 " tar-out directory (tarfile|-)\n"
16312 #: ../fish/guestfish-actions.pod:4888 ../src/guestfs-actions.pod:7509
16314 "This command packs the contents of C<directory> and downloads it to local "
16319 #: ../fish/guestfish-actions.pod:4891
16320 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16324 #: ../fish/guestfish-actions.pod:4896
16329 #: ../fish/guestfish-actions.pod:4898
16332 " tgz-in (tarball|-) directory\n"
16337 #: ../fish/guestfish-actions.pod:4900 ../src/guestfs-actions.pod:7526
16339 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed>"
16340 " tar file) into C<directory>."
16344 #: ../fish/guestfish-actions.pod:4903
16345 msgid "To upload an uncompressed tarball, use L</tar-in>."
16349 #: ../fish/guestfish-actions.pod:4907
16354 #: ../fish/guestfish-actions.pod:4909
16357 " tgz-out directory (tarball|-)\n"
16362 #: ../fish/guestfish-actions.pod:4911 ../src/guestfs-actions.pod:7542
16364 "This command packs the contents of C<directory> and downloads it to local "
16369 #: ../fish/guestfish-actions.pod:4914
16370 msgid "To download an uncompressed tarball, use L</tar-out>."
16374 #: ../fish/guestfish-actions.pod:4918
16379 #: ../fish/guestfish-actions.pod:4920
16387 #: ../fish/guestfish-actions.pod:4922 ../src/guestfs-actions.pod:7557
16389 "Touch acts like the L<touch(1)> command. It can be used to update the "
16390 "timestamps on a file, or, if the file does not exist, to create a new zero-"
16395 #: ../fish/guestfish-actions.pod:4926 ../src/guestfs-actions.pod:7561
16397 "This command only works on regular files, and will fail on other file types "
16398 "such as directories, symbolic links, block special etc."
16402 #: ../fish/guestfish-actions.pod:4929
16407 #: ../fish/guestfish-actions.pod:4931
16415 #: ../fish/guestfish-actions.pod:4933 ../src/guestfs-actions.pod:7574
16417 "This command truncates C<path> to a zero-length file. The file must exist "
16422 #: ../fish/guestfish-actions.pod:4936
16423 msgid "truncate-size"
16427 #: ../fish/guestfish-actions.pod:4938
16430 " truncate-size path size\n"
16435 #: ../fish/guestfish-actions.pod:4940 ../src/guestfs-actions.pod:7588
16437 "This command truncates C<path> to size C<size> bytes. The file must exist "
16442 #: ../fish/guestfish-actions.pod:4943
16444 "If the current file size is less than C<size> then the file is extended to "
16445 "the required size with zero bytes. This creates a sparse file (ie. disk "
16446 "blocks are not allocated for the file until you write to it). To create a "
16447 "non-sparse file of zeroes, use L</fallocate64> instead."
16451 #: ../fish/guestfish-actions.pod:4949
16456 #: ../fish/guestfish-actions.pod:4951
16459 " tune2fs-l device\n"
16464 #: ../fish/guestfish-actions.pod:4953 ../src/guestfs-actions.pod:7607
16466 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on"
16471 #: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7610
16473 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16474 "for more details. The list of fields returned isn't clearly defined, and "
16475 "depends on both the version of C<tune2fs> that libguestfs was built against,"
16476 " and the filesystem itself."
16480 #: ../fish/guestfish-actions.pod:4961
16485 #: ../fish/guestfish-actions.pod:4963
16488 " txz-in (tarball|-) directory\n"
16493 #: ../fish/guestfish-actions.pod:4965 ../src/guestfs-actions.pod:7630
16495 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16496 "tar file) into C<directory>."
16500 #: ../fish/guestfish-actions.pod:4970
16505 #: ../fish/guestfish-actions.pod:4972
16508 " txz-out directory (tarball|-)\n"
16513 #: ../fish/guestfish-actions.pod:4974 ../src/guestfs-actions.pod:7644
16515 "This command packs the contents of C<directory> and downloads it to local "
16516 "file C<tarball> (as an xz compressed tar archive)."
16520 #: ../fish/guestfish-actions.pod:4979
16525 #: ../fish/guestfish-actions.pod:4981
16533 #: ../fish/guestfish-actions.pod:4983 ../src/guestfs-actions.pod:7657
16535 "This function sets the mask used for creating new files and device nodes to "
16540 #: ../fish/guestfish-actions.pod:4986 ../src/guestfs-actions.pod:7660
16542 "Typical umask values would be C<022> which creates new files with "
16543 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16544 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16548 #: ../fish/guestfish-actions.pod:4991 ../src/guestfs-actions.pod:7665
16550 "The default umask is C<022>. This is important because it means that "
16551 "directories and device nodes will be created with C<0644> or C<0755> mode "
16552 "even if you specify C<0777>."
16556 #: ../fish/guestfish-actions.pod:4995
16557 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16561 #: ../fish/guestfish-actions.pod:4998 ../src/guestfs-actions.pod:7672
16562 msgid "This call returns the previous umask."
16566 #: ../fish/guestfish-actions.pod:5000
16571 #: ../fish/guestfish-actions.pod:5002
16576 #: ../fish/guestfish-actions.pod:5004
16579 " umount pathordevice\n"
16584 #: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7684
16586 "This unmounts the given filesystem. The filesystem may be specified either "
16587 "by its mountpoint (path) or the device which contains the filesystem."
16591 #: ../fish/guestfish-actions.pod:5010
16596 #: ../fish/guestfish-actions.pod:5012
16597 msgid "unmount-all"
16601 #: ../fish/guestfish-actions.pod:5014
16609 #: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7697
16610 msgid "This unmounts all mounted filesystems."
16614 #: ../fish/guestfish-actions.pod:5018 ../src/guestfs-actions.pod:7699
16615 msgid "Some internal mounts are not unmounted by this call."
16619 #: ../fish/guestfish-actions.pod:5020
16624 #: ../fish/guestfish-actions.pod:5022
16627 " upload (filename|-) remotefilename\n"
16632 #: ../fish/guestfish-actions.pod:5024 ../fish/guestfish-actions.pod:5037
16633 #: ../src/guestfs-actions.pod:7712 ../src/guestfs-actions.pod:7736
16634 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16638 #: ../fish/guestfish-actions.pod:5029
16639 msgid "See also L</download>."
16643 #: ../fish/guestfish-actions.pod:5033
16644 msgid "upload-offset"
16648 #: ../fish/guestfish-actions.pod:5035
16651 " upload-offset (filename|-) remotefilename offset\n"
16656 #: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7739
16658 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
16659 "The intention is to overwrite parts of existing files or devices, although "
16660 "if a non-existant file is specified then it is created with a \"hole\" "
16661 "before C<offset>. The size of the data written is implicit in the size of "
16662 "the source C<filename>."
16666 #: ../fish/guestfish-actions.pod:5047
16668 "Note that there is no limit on the amount of data that can be uploaded with "
16669 "this call, unlike with L</pwrite>, and this call always writes the full "
16670 "amount unless an error occurs."
16674 #: ../fish/guestfish-actions.pod:5052
16675 msgid "See also L</upload>, L</pwrite>."
16679 #: ../fish/guestfish-actions.pod:5056
16684 #: ../fish/guestfish-actions.pod:5058
16687 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
16692 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7772
16693 msgid "This command sets the timestamps of a file with nanosecond precision."
16697 #: ../fish/guestfish-actions.pod:5063 ../src/guestfs-actions.pod:7775
16699 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16704 #: ../fish/guestfish-actions.pod:5066 ../src/guestfs-actions.pod:7778
16706 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16707 "nanoseconds from the epoch."
16711 #: ../fish/guestfish-actions.pod:5069 ../src/guestfs-actions.pod:7781
16713 "If the C<*nsecs> field contains the special value C<-1> then the "
16714 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16715 "ignored in this case)."
16719 #: ../fish/guestfish-actions.pod:5073 ../src/guestfs-actions.pod:7785
16721 "If the C<*nsecs> field contains the special value C<-2> then the "
16722 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16727 #: ../fish/guestfish-actions.pod:5077
16732 #: ../fish/guestfish-actions.pod:5079
16740 #: ../fish/guestfish-actions.pod:5081 ../src/guestfs-actions.pod:7798
16742 "Return the libguestfs version number that the program is linked against."
16746 #: ../fish/guestfish-actions.pod:5084 ../src/guestfs-actions.pod:7801
16748 "Note that because of dynamic linking this is not necessarily the version of "
16749 "libguestfs that you compiled against. You can compile the program, and then"
16750 " at runtime dynamically link against a completely different C<libguestfs.so>"
16755 #: ../fish/guestfish-actions.pod:5089 ../src/guestfs-actions.pod:7806
16757 "This call was added in version C<1.0.58>. In previous versions of "
16758 "libguestfs there was no way to get the version number. From C code you can "
16759 "use dynamic linker functions to find out if this symbol exists (if it "
16760 "doesn't, then it's an earlier version)."
16764 #: ../fish/guestfish-actions.pod:5095 ../src/guestfs-actions.pod:7812
16766 "The call returns a structure with four elements. The first three (C<major>,"
16767 " C<minor> and C<release>) are numbers and correspond to the usual version "
16768 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16769 "but may be used for distro-specific information."
16773 #: ../fish/guestfish-actions.pod:5101 ../src/guestfs-actions.pod:7818
16775 "To construct the original version string: C<$major.$minor.$release$extra>"
16779 #: ../fish/guestfish-actions.pod:5104 ../src/guestfs-actions.pod:7821
16780 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16784 #: ../fish/guestfish-actions.pod:5106
16786 "I<Note:> Don't use this call to test for availability of features. In "
16787 "enterprise distributions we backport features from later versions into "
16788 "earlier versions, making this an unreliable way to test for features. Use "
16789 "L</available> instead."
16793 #: ../fish/guestfish-actions.pod:5112
16798 #: ../fish/guestfish-actions.pod:5114
16801 " vfs-label device\n"
16806 #: ../fish/guestfish-actions.pod:5116 ../src/guestfs-actions.pod:7841
16807 msgid "This returns the filesystem label of the filesystem on C<device>."
16811 #: ../fish/guestfish-actions.pod:5119 ../src/guestfs-actions.pod:7844
16812 msgid "If the filesystem is unlabeled, this returns the empty string."
16816 #: ../fish/guestfish-actions.pod:5121
16817 msgid "To find a filesystem from the label, use L</findfs-label>."
16821 #: ../fish/guestfish-actions.pod:5123
16826 #: ../fish/guestfish-actions.pod:5125
16829 " vfs-type device\n"
16834 #: ../fish/guestfish-actions.pod:5127 ../src/guestfs-actions.pod:7859
16836 "This command gets the filesystem type corresponding to the filesystem on "
16841 #: ../fish/guestfish-actions.pod:5130 ../src/guestfs-actions.pod:7862
16843 "For most filesystems, the result is the name of the Linux VFS module which "
16844 "would be used to mount this filesystem if you mounted it without specifying "
16845 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16849 #: ../fish/guestfish-actions.pod:5135
16854 #: ../fish/guestfish-actions.pod:5137
16857 " vfs-uuid device\n"
16862 #: ../fish/guestfish-actions.pod:5139 ../src/guestfs-actions.pod:7878
16863 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16867 #: ../fish/guestfish-actions.pod:5142 ../src/guestfs-actions.pod:7881
16868 msgid "If the filesystem does not have a UUID, this returns the empty string."
16872 #: ../fish/guestfish-actions.pod:5144
16873 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
16877 #: ../fish/guestfish-actions.pod:5146
16878 msgid "vg-activate"
16882 #: ../fish/guestfish-actions.pod:5148
16885 " vg-activate true|false 'volgroups ...'\n"
16890 #: ../fish/guestfish-actions.pod:5150 ../src/guestfs-actions.pod:7897
16892 "This command activates or (if C<activate> is false) deactivates all logical "
16893 "volumes in the listed volume groups C<volgroups>."
16897 #: ../fish/guestfish-actions.pod:5153 ../src/guestfs-actions.pod:7900
16898 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16902 #: ../fish/guestfish-actions.pod:5155 ../src/guestfs-actions.pod:7902
16904 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16905 "activated or deactivated."
16909 #: ../fish/guestfish-actions.pod:5158
16910 msgid "vg-activate-all"
16914 #: ../fish/guestfish-actions.pod:5160
16917 " vg-activate-all true|false\n"
16922 #: ../fish/guestfish-actions.pod:5162 ../src/guestfs-actions.pod:7915
16924 "This command activates or (if C<activate> is false) deactivates all logical "
16925 "volumes in all volume groups."
16929 #: ../fish/guestfish-actions.pod:5165 ../src/guestfs-actions.pod:7918
16930 msgid "This command is the same as running C<vgchange -a y|n>"
16934 #: ../fish/guestfish-actions.pod:5167
16939 #: ../fish/guestfish-actions.pod:5169
16942 " vgcreate volgroup 'physvols ...'\n"
16947 #: ../fish/guestfish-actions.pod:5171 ../src/guestfs-actions.pod:7931
16949 "This creates an LVM volume group called C<volgroup> from the non-empty list "
16950 "of physical volumes C<physvols>."
16954 #: ../fish/guestfish-actions.pod:5174
16959 #: ../fish/guestfish-actions.pod:5176
16962 " vglvuuids vgname\n"
16967 #: ../fish/guestfish-actions.pod:5178 ../src/guestfs-actions.pod:7944
16969 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
16970 "volumes created in this volume group."
16974 #: ../fish/guestfish-actions.pod:5181
16976 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
16977 "logical volumes and volume groups."
16981 #: ../fish/guestfish-actions.pod:5184
16982 msgid "See also L</vgpvuuids>."
16986 #: ../fish/guestfish-actions.pod:5186
16991 #: ../fish/guestfish-actions.pod:5188
16994 " vgpvuuids vgname\n"
16999 #: ../fish/guestfish-actions.pod:5190 ../src/guestfs-actions.pod:7964
17001 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
17002 "volumes that this volume group resides on."
17006 #: ../fish/guestfish-actions.pod:5193
17008 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
17009 "physical volumes and volume groups."
17013 #: ../fish/guestfish-actions.pod:5196
17014 msgid "See also L</vglvuuids>."
17018 #: ../fish/guestfish-actions.pod:5198
17023 #: ../fish/guestfish-actions.pod:5200
17026 " vgremove vgname\n"
17031 #: ../fish/guestfish-actions.pod:5202 ../src/guestfs-actions.pod:7984
17032 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17036 #: ../fish/guestfish-actions.pod:5204 ../src/guestfs-actions.pod:7986
17038 "This also forcibly removes all logical volumes in the volume group (if any)."
17042 #: ../fish/guestfish-actions.pod:5207
17047 #: ../fish/guestfish-actions.pod:5209
17050 " vgrename volgroup newvolgroup\n"
17055 #: ../fish/guestfish-actions.pod:5211 ../src/guestfs-actions.pod:8000
17056 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17060 #: ../fish/guestfish-actions.pod:5213
17065 #: ../fish/guestfish-actions.pod:5215
17073 #: ../fish/guestfish-actions.pod:5217 ../src/guestfs-actions.pod:8011
17075 "List all the volumes groups detected. This is the equivalent of the "
17076 "L<vgs(8)> command."
17080 #: ../fish/guestfish-actions.pod:5220 ../src/guestfs-actions.pod:8014
17082 "This returns a list of just the volume group names that were detected (eg. "
17087 #: ../fish/guestfish-actions.pod:5223
17088 msgid "See also L</vgs-full>."
17092 #: ../fish/guestfish-actions.pod:5225
17097 #: ../fish/guestfish-actions.pod:5227
17105 #: ../fish/guestfish-actions.pod:5229 ../src/guestfs-actions.pod:8030
17107 "List all the volumes groups detected. This is the equivalent of the "
17108 "L<vgs(8)> command. The \"full\" version includes all fields."
17112 #: ../fish/guestfish-actions.pod:5232
17117 #: ../fish/guestfish-actions.pod:5234
17125 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:8044
17127 "This rescans all block devices and rebuilds the list of LVM physical "
17128 "volumes, volume groups and logical volumes."
17132 #: ../fish/guestfish-actions.pod:5239
17137 #: ../fish/guestfish-actions.pod:5241
17145 #: ../fish/guestfish-actions.pod:5243 ../src/guestfs-actions.pod:8057
17146 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17150 #: ../fish/guestfish-actions.pod:5245
17155 #: ../fish/guestfish-actions.pod:5247
17163 #: ../fish/guestfish-actions.pod:5249 ../src/guestfs-actions.pod:8097
17165 "This command counts the characters in a file, using the C<wc -c> external "
17170 #: ../fish/guestfish-actions.pod:5252
17175 #: ../fish/guestfish-actions.pod:5254
17183 #: ../fish/guestfish-actions.pod:5256 ../src/guestfs-actions.pod:8110
17185 "This command counts the lines in a file, using the C<wc -l> external "
17190 #: ../fish/guestfish-actions.pod:5259
17195 #: ../fish/guestfish-actions.pod:5261
17203 #: ../fish/guestfish-actions.pod:5263 ../src/guestfs-actions.pod:8123
17205 "This command counts the words in a file, using the C<wc -w> external "
17210 #: ../fish/guestfish-actions.pod:5266
17215 #: ../fish/guestfish-actions.pod:5268
17218 " write path content\n"
17223 #: ../fish/guestfish-actions.pod:5270 ../src/guestfs-actions.pod:8138
17225 "This call creates a file called C<path>. The content of the file is the "
17226 "string C<content> (which can contain any 8 bit data)."
17230 #: ../fish/guestfish-actions.pod:5273
17231 msgid "See also L</write-append>."
17235 #: ../fish/guestfish-actions.pod:5278
17236 msgid "write-append"
17240 #: ../fish/guestfish-actions.pod:5280
17243 " write-append path content\n"
17248 #: ../fish/guestfish-actions.pod:5282 ../src/guestfs-actions.pod:8158
17250 "This call appends C<content> to the end of file C<path>. If C<path> does "
17251 "not exist, then a new file is created."
17255 #: ../fish/guestfish-actions.pod:5285
17256 msgid "See also L</write>."
17260 #: ../fish/guestfish-actions.pod:5290
17265 #: ../fish/guestfish-actions.pod:5292
17268 " write-file path content size\n"
17273 #: ../fish/guestfish-actions.pod:5294 ../src/guestfs-actions.pod:8185
17275 "This call creates a file called C<path>. The contents of the file is the "
17276 "string C<content> (which can contain any 8 bit data), with length C<size>."
17280 #: ../fish/guestfish-actions.pod:5298 ../src/guestfs-actions.pod:8189
17282 "As a special case, if C<size> is C<0> then the length is calculated using "
17283 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17287 #: ../fish/guestfish-actions.pod:5302 ../src/guestfs-actions.pod:8193
17289 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17290 "I<not> work, even if the length is specified."
17294 #: ../fish/guestfish-actions.pod:5308
17296 "I<This function is deprecated.> In new code, use the L</write> call instead."
17300 #: ../fish/guestfish-actions.pod:5315
17305 #: ../fish/guestfish-actions.pod:5317
17308 " zegrep regex path\n"
17313 #: ../fish/guestfish-actions.pod:5319 ../src/guestfs-actions.pod:8210
17315 "This calls the external C<zegrep> program and returns the matching lines."
17319 #: ../fish/guestfish-actions.pod:5325
17324 #: ../fish/guestfish-actions.pod:5327
17327 " zegrepi regex path\n"
17332 #: ../fish/guestfish-actions.pod:5329 ../src/guestfs-actions.pod:8229
17334 "This calls the external C<zegrep -i> program and returns the matching lines."
17338 #: ../fish/guestfish-actions.pod:5335
17343 #: ../fish/guestfish-actions.pod:5337
17351 #: ../fish/guestfish-actions.pod:5339 ../src/guestfs-actions.pod:8247
17352 msgid "This command writes zeroes over the first few blocks of C<device>."
17356 #: ../fish/guestfish-actions.pod:5341 ../src/guestfs-actions.pod:8249
17358 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17359 "securely wipe the device). It should be sufficient to remove any partition "
17360 "tables, filesystem superblocks and so on."
17364 #: ../fish/guestfish-actions.pod:5345 ../fish/guestfish-actions.pod:5360
17365 #: ../src/guestfs-actions.pod:8253 ../src/guestfs-actions.pod:8279
17367 "If blocks are already zero, then this command avoids writing zeroes. This "
17368 "prevents the underlying device from becoming non-sparse or growing "
17373 #: ../fish/guestfish-actions.pod:5349
17374 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17378 #: ../fish/guestfish-actions.pod:5352
17379 msgid "zero-device"
17383 #: ../fish/guestfish-actions.pod:5354
17386 " zero-device device\n"
17391 #: ../fish/guestfish-actions.pod:5356
17393 "This command writes zeroes over the entire C<device>. Compare with L</zero>"
17394 " which just zeroes the first few blocks of a device."
17398 #: ../fish/guestfish-actions.pod:5367
17403 #: ../fish/guestfish-actions.pod:5369
17406 " zerofree device\n"
17411 #: ../fish/guestfish-actions.pod:5371 ../src/guestfs-actions.pod:8301
17413 "This runs the I<zerofree> program on C<device>. This program claims to zero"
17414 " unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17415 "possible to compress the filesystem more effectively."
17419 #: ../fish/guestfish-actions.pod:5376 ../src/guestfs-actions.pod:8306
17420 msgid "You should B<not> run this program if the filesystem is mounted."
17424 #: ../fish/guestfish-actions.pod:5379 ../src/guestfs-actions.pod:8309
17426 "It is possible that using this program can damage the filesystem or data on "
17431 #: ../fish/guestfish-actions.pod:5382
17436 #: ../fish/guestfish-actions.pod:5384
17439 " zfgrep pattern path\n"
17444 #: ../fish/guestfish-actions.pod:5386 ../src/guestfs-actions.pod:8323
17446 "This calls the external C<zfgrep> program and returns the matching lines."
17450 #: ../fish/guestfish-actions.pod:5392
17455 #: ../fish/guestfish-actions.pod:5394
17458 " zfgrepi pattern path\n"
17463 #: ../fish/guestfish-actions.pod:5396 ../src/guestfs-actions.pod:8342
17465 "This calls the external C<zfgrep -i> program and returns the matching lines."
17469 #: ../fish/guestfish-actions.pod:5402
17474 #: ../fish/guestfish-actions.pod:5404
17477 " zfile meth path\n"
17482 #: ../fish/guestfish-actions.pod:5406 ../src/guestfs-actions.pod:8368
17484 "This command runs C<file> after first decompressing C<path> using C<method>."
17488 #: ../fish/guestfish-actions.pod:5409 ../src/guestfs-actions.pod:8371
17489 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17493 #: ../fish/guestfish-actions.pod:5411
17495 "Since 1.0.63, use L</file> instead which can now process compressed files."
17499 #: ../fish/guestfish-actions.pod:5414
17501 "I<This function is deprecated.> In new code, use the L</file> call instead."
17505 #: ../fish/guestfish-actions.pod:5421
17510 #: ../fish/guestfish-actions.pod:5423
17513 " zgrep regex path\n"
17518 #: ../fish/guestfish-actions.pod:5425 ../src/guestfs-actions.pod:8388
17520 "This calls the external C<zgrep> program and returns the matching lines."
17524 #: ../fish/guestfish-actions.pod:5431
17529 #: ../fish/guestfish-actions.pod:5433
17532 " zgrepi regex path\n"
17537 #: ../fish/guestfish-actions.pod:5435 ../src/guestfs-actions.pod:8407
17539 "This calls the external C<zgrep -i> program and returns the matching lines."
17543 #: ../fish/guestfish-commands.pod:1
17548 #: ../fish/guestfish-commands.pod:3
17553 #: ../fish/guestfish-commands.pod:5
17556 " alloc filename size\n"
17561 #: ../fish/guestfish-commands.pod:7
17563 "This creates an empty (zeroed) file of the given size, and then adds so it "
17564 "can be further examined."
17568 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17569 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17573 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17574 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17578 #: ../fish/guestfish-commands.pod:14
17580 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17581 "image, see L</PREPARED DISK IMAGES>."
17585 #: ../fish/guestfish-commands.pod:17
17590 #: ../fish/guestfish-commands.pod:19
17593 " copy-in local [local ...] /remotedir\n"
17598 #: ../fish/guestfish-commands.pod:21
17600 "C<copy-in> copies local files or directories recursively into the disk "
17601 "image, placing them in the directory called C</remotedir> (which must "
17602 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and"
17603 " other commands as necessary."
17607 #: ../fish/guestfish-commands.pod:26
17609 "Multiple local files and directories can be specified, but the last "
17610 "parameter must always be a remote directory. Wildcards cannot be used."
17614 #: ../fish/guestfish-commands.pod:30
17619 #: ../fish/guestfish-commands.pod:32
17622 " copy-out remote [remote ...] localdir\n"
17627 #: ../fish/guestfish-commands.pod:34
17629 "C<copy-out> copies remote files or directories recursively out of the disk "
17630 "image, placing them on the host disk in a local directory called C<localdir>"
17631 " (which must exist). This guestfish meta-command turns into a sequence of "
17632 "L</download>, L</tar-out> and other commands as necessary."
17636 #: ../fish/guestfish-commands.pod:40
17638 "Multiple remote files and directories can be specified, but the last "
17639 "parameter must always be a local directory. To download to the current "
17640 "directory, use C<.> as in:"
17644 #: ../fish/guestfish-commands.pod:44
17647 " copy-out /home .\n"
17652 #: ../fish/guestfish-commands.pod:46
17654 "Wildcards cannot be used in the ordinary command, but you can use them with "
17655 "the help of L</glob> like this:"
17659 #: ../fish/guestfish-commands.pod:49
17662 " glob copy-out /home/* .\n"
17667 #: ../fish/guestfish-commands.pod:51
17672 #: ../fish/guestfish-commands.pod:53
17675 " display filename\n"
17680 #: ../fish/guestfish-commands.pod:55
17682 "Use C<display> (a graphical display program) to display an image file. It "
17683 "downloads the file, and runs C<display> on it."
17687 #: ../fish/guestfish-commands.pod:58
17689 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
17690 "environment variable. For example to use the GNOME display program:"
17694 #: ../fish/guestfish-commands.pod:61
17697 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
17702 #: ../fish/guestfish-commands.pod:63
17703 msgid "See also L<display(1)>."
17707 #: ../fish/guestfish-commands.pod:65
17712 #: ../fish/guestfish-commands.pod:67
17715 " echo [params ...]\n"
17720 #: ../fish/guestfish-commands.pod:69
17721 msgid "This echos the parameters to the terminal."
17725 #: ../fish/guestfish-commands.pod:71
17730 #: ../fish/guestfish-commands.pod:73
17735 #: ../fish/guestfish-commands.pod:75
17740 #: ../fish/guestfish-commands.pod:77
17748 #: ../fish/guestfish-commands.pod:79
17750 "This is used to edit a file. It downloads the file, edits it locally using "
17751 "your editor, then uploads the result."
17755 #: ../fish/guestfish-commands.pod:82
17757 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
17758 "or C<emacs> you will get those corresponding editors."
17762 #: ../fish/guestfish-commands.pod:86
17767 #: ../fish/guestfish-commands.pod:88
17770 " glob command args...\n"
17775 #: ../fish/guestfish-commands.pod:90
17777 "Expand wildcards in any paths in the args list, and run C<command> "
17778 "repeatedly on each matching path."
17782 #: ../fish/guestfish-commands.pod:93
17783 msgid "See L</WILDCARDS AND GLOBBING>."
17787 #: ../fish/guestfish-commands.pod:95
17792 #: ../fish/guestfish-commands.pod:97
17795 " hexedit <filename|device>\n"
17796 " hexedit <filename|device> <max>\n"
17797 " hexedit <filename|device> <start> <max>\n"
17802 #: ../fish/guestfish-commands.pod:101
17804 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
17809 #: ../fish/guestfish-commands.pod:104
17811 "This command works by downloading potentially the whole file or device, "
17812 "editing it locally, then uploading it. If the file or device is large, you "
17813 "have to specify which part you wish to edit by using C<max> and/or C<start> "
17814 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
17815 "usual modifiers allowed such as C<1M> (1 megabyte)."
17819 #: ../fish/guestfish-commands.pod:111
17820 msgid "For example to edit the first few sectors of a disk you might do:"
17824 #: ../fish/guestfish-commands.pod:114
17827 " hexedit /dev/sda 1M\n"
17832 #: ../fish/guestfish-commands.pod:116
17834 "which would allow you to edit anywhere within the first megabyte of the "
17839 #: ../fish/guestfish-commands.pod:119
17840 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
17844 #: ../fish/guestfish-commands.pod:121
17847 " hexedit /dev/sda1 0x400 0x400\n"
17852 #: ../fish/guestfish-commands.pod:123
17853 msgid "(assuming the superblock is in the standard location)."
17857 #: ../fish/guestfish-commands.pod:125
17859 "This command requires the external L<hexedit(1)> program. You can specify "
17860 "another program to use by setting the C<HEXEDITOR> environment variable."
17864 #: ../fish/guestfish-commands.pod:129
17865 msgid "See also L</hexdump>."
17869 #: ../fish/guestfish-commands.pod:131
17874 #: ../fish/guestfish-commands.pod:133
17882 #: ../fish/guestfish-commands.pod:135
17884 "Change the local directory, ie. the current directory of guestfish itself."
17888 #: ../fish/guestfish-commands.pod:138
17889 msgid "Note that C<!cd> won't do what you might expect."
17893 #: ../fish/guestfish-commands.pod:140
17898 #: ../fish/guestfish-commands.pod:142
17903 #: ../fish/guestfish-commands.pod:144
17911 #: ../fish/guestfish-commands.pod:146
17912 msgid "Opens the manual page for guestfish."
17916 #: ../fish/guestfish-commands.pod:148
17921 #: ../fish/guestfish-commands.pod:150
17926 #: ../fish/guestfish-commands.pod:152
17934 #: ../fish/guestfish-commands.pod:154
17942 #: ../fish/guestfish-commands.pod:156
17943 msgid "This is used to view a file."
17947 #: ../fish/guestfish-commands.pod:158
17949 "The default viewer is C<$PAGER>. However if you use the alternate command "
17950 "C<less> you will get the C<less> command specifically."
17954 #: ../fish/guestfish-commands.pod:161
17959 #: ../fish/guestfish-commands.pod:163
17967 #: ../fish/guestfish-commands.pod:165
17969 "Close and reopen the libguestfs handle. It is not necessary to use this "
17970 "normally, because the handle is closed properly when guestfish exits. "
17971 "However this is occasionally useful for testing."
17975 #: ../fish/guestfish-commands.pod:169
17980 #: ../fish/guestfish-commands.pod:171
17983 " setenv VAR value\n"
17988 #: ../fish/guestfish-commands.pod:173
17989 msgid "Set the environment variable C<VAR> to the string C<value>."
17993 #: ../fish/guestfish-commands.pod:175
17995 "To print the value of an environment variable use a shell command such as:"
17999 #: ../fish/guestfish-commands.pod:178
18007 #: ../fish/guestfish-commands.pod:180
18012 #: ../fish/guestfish-commands.pod:182
18015 " sparse filename size\n"
18020 #: ../fish/guestfish-commands.pod:184
18022 "This creates an empty sparse file of the given size, and then adds so it can"
18023 " be further examined."
18027 #: ../fish/guestfish-commands.pod:187
18029 "In all respects it works the same as the L</alloc> command, except that the "
18030 "image file is allocated sparsely, which means that disk blocks are not "
18031 "assigned to the file until they are needed. Sparse disk files only use "
18032 "space when written to, but they are slower and there is a danger you could "
18033 "run out of real disk space during a write operation."
18037 #: ../fish/guestfish-commands.pod:197
18042 #: ../fish/guestfish-commands.pod:199
18050 #: ../fish/guestfish-commands.pod:201
18052 "This command returns a list of the optional groups known to the daemon, and "
18053 "indicates which ones are supported by this build of the libguestfs "
18058 #: ../fish/guestfish-commands.pod:205
18059 msgid "See also L<guestfs(3)/AVAILABILITY>."
18063 #: ../fish/guestfish-commands.pod:207
18068 #: ../fish/guestfish-commands.pod:209
18071 " time command args...\n"
18076 #: ../fish/guestfish-commands.pod:211
18078 "Run the command as usual, but print the elapsed time afterwards. This can "
18079 "be useful for benchmarking operations."
18083 #: ../fish/guestfish-commands.pod:214
18088 #: ../fish/guestfish-commands.pod:216
18096 #: ../fish/guestfish-commands.pod:218
18097 msgid "Remove C<VAR> from the environment."
18101 #: ../fish/guestfish.pod:5
18102 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18106 #: ../fish/guestfish.pod:9
18109 " guestfish [--options] [commands]\n"
18114 #: ../fish/guestfish.pod:11
18122 #: ../fish/guestfish.pod:13
18125 " guestfish [--ro|--rw] -a disk.img\n"
18130 #: ../fish/guestfish.pod:15
18133 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18138 #: ../fish/guestfish.pod:17
18141 " guestfish -d libvirt-domain\n"
18146 #: ../fish/guestfish.pod:19
18149 " guestfish [--ro|--rw] -a disk.img -i\n"
18154 #: ../fish/guestfish.pod:21
18157 " guestfish -d libvirt-domain -i\n"
18162 #: ../fish/guestfish.pod:25
18164 "Using guestfish in read/write mode on live virtual machines can be "
18165 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only)"
18166 " option to use guestfish safely if the disk image or virtual machine might "
18171 #: ../fish/guestfish.pod:32
18173 "Guestfish is a shell and command-line tool for examining and modifying "
18174 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18175 "functionality of the guestfs API, see L<guestfs(3)>."
18179 #: ../fish/guestfish.pod:36
18181 "Guestfish gives you structured access to the libguestfs API, from shell "
18182 "scripts or the command line or interactively. If you want to rescue a "
18183 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18188 #: ../fish/guestfish.pod:43
18189 msgid "As an interactive shell"
18193 #: ../fish/guestfish.pod:45
18201 #: ../fish/guestfish.pod:47
18204 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18205 " editing virtual machine filesystems.\n"
18210 #: ../fish/guestfish.pod:50
18213 " Type: 'help' for a list of commands\n"
18214 " 'man' to read the manual\n"
18215 " 'quit' to quit the shell\n"
18220 #: ../fish/guestfish.pod:54
18223 " ><fs> add-ro disk.img\n"
18225 " ><fs> list-filesystems\n"
18226 " /dev/sda1: ext4\n"
18227 " /dev/vg_guest/lv_root: ext4\n"
18228 " /dev/vg_guest/lv_swap: swap\n"
18229 " ><fs> mount /dev/vg_guest/lv_root /\n"
18230 " ><fs> cat /etc/fstab\n"
18232 " # Created by anaconda\n"
18239 #: ../fish/guestfish.pod:67
18240 msgid "From shell scripts"
18244 #: ../fish/guestfish.pod:69
18245 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18249 #: ../fish/guestfish.pod:71
18252 " guestfish <<_EOF_\n"
18255 " mount /dev/vg_guest/lv_root /\n"
18256 " write /etc/motd \"Welcome, new users\"\n"
18262 #: ../fish/guestfish.pod:78
18263 msgid "List the LVM logical volumes in a disk image:"
18267 #: ../fish/guestfish.pod:80
18270 " guestfish -a disk.img --ro <<_EOF_\n"
18278 #: ../fish/guestfish.pod:85
18279 msgid "List all the filesystems in a disk image:"
18283 #: ../fish/guestfish.pod:87
18286 " guestfish -a disk.img --ro <<_EOF_\n"
18288 " list-filesystems\n"
18294 #: ../fish/guestfish.pod:92
18295 msgid "On one command line"
18299 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18300 msgid "Update C</etc/resolv.conf> in a guest:"
18304 #: ../fish/guestfish.pod:96
18308 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18309 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18314 #: ../fish/guestfish.pod:100
18315 msgid "Edit C</boot/grub/grub.conf> interactively:"
18319 #: ../fish/guestfish.pod:102
18322 " guestfish --rw --add disk.img \\\n"
18323 " --mount /dev/vg_guest/lv_root \\\n"
18324 " --mount /dev/sda1:/boot \\\n"
18325 " edit /boot/grub/grub.conf\n"
18330 #: ../fish/guestfish.pod:107
18331 msgid "Mount disks automatically"
18335 #: ../fish/guestfish.pod:109
18337 "Use the I<-i> option to automatically mount the disks from a virtual "
18342 #: ../fish/guestfish.pod:112
18345 " guestfish --ro -a disk.img -i cat /etc/group\n"
18350 #: ../fish/guestfish.pod:114
18353 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18358 #: ../fish/guestfish.pod:116
18359 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18363 #: ../fish/guestfish.pod:118
18366 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18371 #: ../fish/guestfish.pod:120
18372 msgid "As a script interpreter"
18376 #: ../fish/guestfish.pod:122
18377 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18381 #: ../fish/guestfish.pod:124
18384 " #!/usr/bin/guestfish -f\n"
18385 " sparse test1.img 100M\n"
18387 " part-disk /dev/sda mbr\n"
18388 " mkfs ext2 /dev/sda1\n"
18393 #: ../fish/guestfish.pod:130
18394 msgid "Start with a prepared disk"
18398 #: ../fish/guestfish.pod:132
18400 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18401 "single ext2-formatted partition:"
18405 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18408 " guestfish -N fs\n"
18413 #: ../fish/guestfish.pod:137
18414 msgid "To list what is available do:"
18418 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18421 " guestfish -N help | less\n"
18426 #: ../fish/guestfish.pod:141
18427 msgid "Remote control"
18431 #: ../fish/guestfish.pod:143
18434 " eval \"`guestfish --listen`\"\n"
18435 " guestfish --remote add-ro disk.img\n"
18436 " guestfish --remote run\n"
18437 " guestfish --remote lvs\n"
18442 #: ../fish/guestfish.pod:154
18443 msgid "Displays general help on options."
18447 #: ../fish/guestfish.pod:158
18448 msgid "B<--cmd-help>"
18452 #: ../fish/guestfish.pod:160
18453 msgid "Lists all available guestfish commands."
18457 #: ../fish/guestfish.pod:162
18462 #: ../fish/guestfish.pod:164
18463 msgid "B<--cmd-help cmd>"
18467 #: ../fish/guestfish.pod:166
18468 msgid "Displays detailed help on a single command C<cmd>."
18472 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18473 msgid "B<-a image>"
18477 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18478 msgid "B<--add image>"
18482 #: ../fish/guestfish.pod:172
18483 msgid "Add a block device or virtual machine image to the shell."
18487 #: ../fish/guestfish.pod:177
18489 "Using this flag is mostly equivalent to using the C<add> command, with "
18490 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18491 "the I<--format=...> flag was given."
18495 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18497 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18498 "URI to use. The default is to use the default libvirt connection."
18502 #: ../fish/guestfish.pod:189
18507 #: ../fish/guestfish.pod:191
18509 "If using the I<--listen> option and a csh-like shell, use this option. See "
18510 "section L</REMOTE CONTROL AND CSH> below."
18514 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18515 msgid "B<-d libvirt-domain>"
18519 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18520 msgid "B<--domain libvirt-domain>"
18524 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18526 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18527 "used, then any libvirt domain can be used. However in write mode, only "
18528 "libvirt domains which are shut down can be named here."
18532 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18533 msgid "Domain UUIDs can be used instead of names."
18537 #: ../fish/guestfish.pod:204
18539 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18540 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18541 "if the I<--format:...> flag was given."
18545 #: ../fish/guestfish.pod:208
18550 #: ../fish/guestfish.pod:210
18551 msgid "B<--no-dest-paths>"
18555 #: ../fish/guestfish.pod:212
18557 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18558 "to hit the tab key to complete paths on the guest filesystem, but this "
18559 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18560 "allow this feature to be disabled."
18564 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18566 "When prompting for keys and passphrases, guestfish normally turns echoing "
18567 "off so you cannot see what you are typing. If you are not worried about "
18568 "Tempest attacks and there is no one else in the room you can specify this "
18569 "flag to see what you are typing."
18573 #: ../fish/guestfish.pod:224
18578 #: ../fish/guestfish.pod:226
18579 msgid "B<--file file>"
18583 #: ../fish/guestfish.pod:228
18584 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18588 #: ../fish/guestfish.pod:231
18591 " #!/usr/bin/guestfish -f\n"
18596 #: ../fish/guestfish.pod:244
18599 " guestfish --format=raw -a disk.img\n"
18604 #: ../fish/guestfish.pod:248
18607 " guestfish --format=raw -a disk.img --format -a another.img\n"
18612 #: ../fish/guestfish.pod:253
18614 "If you have untrusted raw-format guest disk images, you should use this "
18615 "option to specify the disk format. This avoids a possible security problem "
18616 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18620 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18621 msgid "B<--inspector>"
18625 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18627 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18628 "system and mount filesystems as they would be mounted on the real virtual "
18633 #: ../fish/guestfish.pod:266
18634 msgid "Typical usage is either:"
18638 #: ../fish/guestfish.pod:268
18641 " guestfish -d myguest -i\n"
18646 #: ../fish/guestfish.pod:270
18647 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18651 #: ../fish/guestfish.pod:272
18654 " guestfish --ro -d myguest -i\n"
18659 #: ../fish/guestfish.pod:274
18660 msgid "(for active domains, readonly), or specify the block device directly:"
18664 #: ../fish/guestfish.pod:276
18667 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18672 #: ../fish/guestfish.pod:278
18674 "Note that the command line syntax changed slightly over older versions of "
18675 "guestfish. You can still use the old syntax:"
18679 #: ../fish/guestfish.pod:281
18682 " guestfish [--ro] -i disk.img\n"
18687 #: ../fish/guestfish.pod:283
18690 " guestfish [--ro] -i libvirt-domain\n"
18695 #: ../fish/guestfish.pod:285
18697 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18698 "then using other commands to mount the filesystems that were found."
18702 #: ../fish/guestfish.pod:294
18703 msgid "B<--listen>"
18707 #: ../fish/guestfish.pod:296
18709 "Fork into the background and listen for remote commands. See section "
18710 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18714 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
18719 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
18721 "Connect to a live virtual machine. (Experimental, see "
18722 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
18726 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
18727 msgid "B<-m dev[:mountpoint[:options]]>"
18731 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
18732 msgid "B<--mount dev[:mountpoint[:options]]>"
18736 #: ../fish/guestfish.pod:308
18737 msgid "Mount the named partition or logical volume on the given mountpoint."
18741 #: ../fish/guestfish.pod:310
18742 msgid "If the mountpoint is omitted, it defaults to C</>."
18746 #: ../fish/guestfish.pod:312
18747 msgid "You have to mount something on C</> before most commands will work."
18751 #: ../fish/guestfish.pod:314
18753 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18758 #: ../fish/guestfish.pod:317
18760 "If you don't know what filesystems a disk image contains, you can either run"
18761 " guestfish without this option, then list the partitions, filesystems and "
18762 "LVs available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18763 "commands), or you can use the L<virt-filesystems(1)> program."
18767 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
18769 "The third (and rarely used) part of the mount parameter is the list of mount"
18770 " options used to mount the underlying filesystem. If this is not given, "
18771 "then the mount options are either the empty string or C<ro> (the latter if "
18772 "the I<--ro> flag is used). By specifying the mount options, you override "
18773 "this default choice. Probably the only time you would use this is to enable"
18774 " ACLs and/or extended attributes if the filesystem can support them:"
18778 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
18781 " -m /dev/sda1:/:acl,user_xattr\n"
18786 #: ../fish/guestfish.pod:333
18787 msgid "Using this flag is equivalent to using the C<mount-options> command."
18791 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202
18792 #: ../resize/virt-resize.pod:435
18797 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
18798 msgid "B<--no-sync>"
18802 #: ../fish/guestfish.pod:339
18804 "Disable autosync. This is enabled by default. See the discussion of "
18805 "autosync in the L<guestfs(3)> manpage."
18809 #: ../fish/guestfish.pod:342
18814 #: ../fish/guestfish.pod:344
18815 msgid "B<--new type>"
18819 #: ../fish/guestfish.pod:346
18824 #: ../fish/guestfish.pod:348
18826 "Prepare a fresh disk image formatted as \"type\". This is an alternative to"
18827 " the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18828 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18833 #: ../fish/guestfish.pod:353
18834 msgid "B<--progress-bars>"
18838 #: ../fish/guestfish.pod:355
18839 msgid "Enable progress bars, even when guestfish is used non-interactively."
18843 #: ../fish/guestfish.pod:357
18845 "Progress bars are enabled by default when guestfish is used as an "
18846 "interactive shell."
18850 #: ../fish/guestfish.pod:360
18851 msgid "B<--no-progress-bars>"
18855 #: ../fish/guestfish.pod:362
18856 msgid "Disable progress bars."
18860 #: ../fish/guestfish.pod:364
18861 msgid "B<--remote[=pid]>"
18865 #: ../fish/guestfish.pod:366
18867 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18868 "CONTROL GUESTFISH OVER A SOCKET> below."
18872 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248
18873 #: ../rescue/virt-rescue.pod:161
18878 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250
18879 #: ../rescue/virt-rescue.pod:163
18884 #: ../fish/guestfish.pod:373
18886 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18887 "mounts are done read-only."
18891 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
18893 "The option must always be used if the disk image or virtual machine might be"
18894 " running, and is generally recommended in cases where you don't need write "
18895 "access to the disk."
18899 #: ../fish/guestfish.pod:380
18901 "Note that prepared disk images created with I<-N> are not affected by this "
18902 "option. Also commands like C<add> are not affected - you have to specify "
18903 "the C<readonly:true> option explicitly if you need it."
18907 #: ../fish/guestfish.pod:384
18908 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18912 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262
18913 #: ../rescue/virt-rescue.pod:173
18914 msgid "B<--selinux>"
18918 #: ../fish/guestfish.pod:388
18919 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18923 #: ../fish/guestfish.pod:394
18925 "Enable very verbose messages. This is particularly useful if you find a "
18930 #: ../fish/guestfish.pod:401
18931 msgid "Display the guestfish / libguestfs version number and exit."
18935 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278
18936 #: ../rescue/virt-rescue.pod:194
18941 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280
18942 #: ../rescue/virt-rescue.pod:196
18947 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
18949 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18950 "mounts are done read-write."
18954 #: ../fish/guestfish.pod:410
18955 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
18959 #: ../fish/guestfish.pod:414
18960 msgid "Echo each command before executing it."
18964 #: ../fish/guestfish.pod:418
18965 msgid "COMMANDS ON COMMAND LINE"
18969 #: ../fish/guestfish.pod:420
18971 "Any additional (non-option) arguments are treated as commands to execute."
18975 #: ../fish/guestfish.pod:423
18977 "Commands to execute should be separated by a colon (C<:>), where the colon "
18978 "is a separate parameter. Thus:"
18982 #: ../fish/guestfish.pod:426
18985 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
18990 #: ../fish/guestfish.pod:428
18992 "If there are no additional arguments, then we enter a shell, either an "
18993 "interactive shell with a prompt (if the input is a terminal) or a non-"
18994 "interactive shell."
18998 #: ../fish/guestfish.pod:432
19000 "In either command line mode or non-interactive shell, the first command that"
19001 " gives an error causes the whole shell to exit. In interactive mode (with a"
19002 " prompt) if a command fails, you can continue to enter commands."
19006 #: ../fish/guestfish.pod:437
19007 msgid "USING launch (OR run)"
19011 #: ../fish/guestfish.pod:439
19013 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
19014 "then launch it, then mount any disks you need, and finally issue "
19015 "actions/commands. So the general order of the day is:"
19019 #: ../fish/guestfish.pod:447
19020 msgid "add or -a/--add"
19024 #: ../fish/guestfish.pod:451
19025 msgid "launch (aka run)"
19029 #: ../fish/guestfish.pod:455
19030 msgid "mount or -m/--mount"
19034 #: ../fish/guestfish.pod:459
19035 msgid "any other commands"
19039 #: ../fish/guestfish.pod:463
19041 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19042 "guest before mounting or performing any other commands."
19046 #: ../fish/guestfish.pod:466
19048 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19049 "I<--new> options were given then C<run> is done automatically, simply "
19050 "because guestfish can't perform the action you asked for without doing this."
19054 #: ../fish/guestfish.pod:471
19055 msgid "OPENING DISKS FOR READ AND WRITE"
19059 #: ../fish/guestfish.pod:473
19061 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19062 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19063 "I<-i> and I<-m> open disk images read-only or for writing."
19067 #: ../fish/guestfish.pod:478
19069 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to"
19070 " opening disk images supplied on the command line for write. To open a disk"
19071 " image read-only you have to do I<-a image --ro>."
19075 #: ../fish/guestfish.pod:482
19077 "This matters: If you accidentally open a live VM disk image writable then "
19078 "you will cause irreversible disk corruption."
19082 #: ../fish/guestfish.pod:485
19084 "In a future libguestfs we intend to change the default the other way. Disk "
19085 "images will be opened read-only. You will have to either specify "
19086 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19087 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19088 "access for disk images specified by those other command line options."
19092 #: ../fish/guestfish.pod:492
19094 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19095 "which does nothing (it is already the default). However it is highly "
19096 "recommended that you use this option to indicate that you need write access,"
19097 " and prepare your scripts for the day when this option will be required for "
19102 #: ../fish/guestfish.pod:498
19104 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any"
19105 " other libguestfs program apart from guestfish and guestmount."
19109 #: ../fish/guestfish.pod:501
19114 #: ../fish/guestfish.pod:503
19116 "You can quote ordinary parameters using either single or double quotes. For"
19121 #: ../fish/guestfish.pod:506
19124 " add \"file with a space.img\"\n"
19129 #: ../fish/guestfish.pod:508
19132 " rm '/file name'\n"
19137 #: ../fish/guestfish.pod:510
19145 #: ../fish/guestfish.pod:512
19147 "A few commands require a list of strings to be passed. For these, use a "
19148 "whitespace-separated list, enclosed in quotes. Strings containing "
19149 "whitespace to be passed through must be enclosed in single quotes. A "
19150 "literal single quote must be escaped with a backslash."
19154 #: ../fish/guestfish.pod:517
19157 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19158 " command \"/bin/echo 'foo bar'\"\n"
19159 " command \"/bin/echo \\'foo\\'\"\n"
19164 #: ../fish/guestfish.pod:521
19165 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19169 #: ../fish/guestfish.pod:523
19171 "In double-quoted arguments (only) use backslash to insert special "
19176 #: ../fish/guestfish.pod:528
19181 #: ../fish/guestfish.pod:530
19182 msgid "Alert (bell) character."
19186 #: ../fish/guestfish.pod:532
19191 #: ../fish/guestfish.pod:534
19192 msgid "Backspace character."
19196 #: ../fish/guestfish.pod:536
19201 #: ../fish/guestfish.pod:538
19202 msgid "Form feed character."
19206 #: ../fish/guestfish.pod:540
19211 #: ../fish/guestfish.pod:542
19212 msgid "Newline character."
19216 #: ../fish/guestfish.pod:544
19221 #: ../fish/guestfish.pod:546
19222 msgid "Carriage return character."
19226 #: ../fish/guestfish.pod:548
19231 #: ../fish/guestfish.pod:550
19232 msgid "Horizontal tab character."
19236 #: ../fish/guestfish.pod:552
19241 #: ../fish/guestfish.pod:554
19242 msgid "Vertical tab character."
19246 #: ../fish/guestfish.pod:556
19251 #: ../fish/guestfish.pod:558
19252 msgid "A literal double quote character."
19256 #: ../fish/guestfish.pod:560
19261 #: ../fish/guestfish.pod:562
19263 "A character with octal value I<ooo>. There must be precisely 3 octal digits"
19268 #: ../fish/guestfish.pod:565
19273 #: ../fish/guestfish.pod:567
19275 "A character with hex value I<hh>. There must be precisely 2 hex digits."
19279 #: ../fish/guestfish.pod:570
19281 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19286 #: ../fish/guestfish.pod:573
19291 #: ../fish/guestfish.pod:575
19292 msgid "A literal backslash character."
19296 #: ../fish/guestfish.pod:579
19297 msgid "OPTIONAL ARGUMENTS"
19301 #: ../fish/guestfish.pod:581
19303 "Some commands take optional arguments. These arguments appear in this "
19304 "documentation as C<[argname:..]>. You can use them as in these examples:"
19308 #: ../fish/guestfish.pod:585
19311 " add-drive-opts filename\n"
19316 #: ../fish/guestfish.pod:587
19319 " add-drive-opts filename readonly:true\n"
19324 #: ../fish/guestfish.pod:589
19327 " add-drive-opts filename format:qcow2 readonly:false\n"
19332 #: ../fish/guestfish.pod:591
19334 "Each optional argument can appear at most once. All optional arguments must"
19335 " appear after the required ones."
19339 #: ../fish/guestfish.pod:594
19344 #: ../fish/guestfish.pod:596
19346 "This section applies to all commands which can take integers as parameters."
19350 #: ../fish/guestfish.pod:599
19351 msgid "SIZE SUFFIX"
19355 #: ../fish/guestfish.pod:601
19357 "When the command takes a parameter measured in bytes, you can use one of the"
19358 " following suffixes to specify kilobytes, megabytes and larger sizes:"
19362 #: ../fish/guestfish.pod:607
19363 msgid "B<k> or B<K> or B<KiB>"
19367 #: ../fish/guestfish.pod:609
19368 msgid "The size in kilobytes (multiplied by 1024)."
19372 #: ../fish/guestfish.pod:611
19377 #: ../fish/guestfish.pod:613
19378 msgid "The size in SI 1000 byte units."
19382 #: ../fish/guestfish.pod:615
19383 msgid "B<M> or B<MiB>"
19387 #: ../fish/guestfish.pod:617
19388 msgid "The size in megabytes (multiplied by 1048576)."
19392 #: ../fish/guestfish.pod:619
19397 #: ../fish/guestfish.pod:621
19398 msgid "The size in SI 1000000 byte units."
19402 #: ../fish/guestfish.pod:623
19403 msgid "B<G> or B<GiB>"
19407 #: ../fish/guestfish.pod:625
19408 msgid "The size in gigabytes (multiplied by 2**30)."
19412 #: ../fish/guestfish.pod:627
19417 #: ../fish/guestfish.pod:629
19418 msgid "The size in SI 10**9 byte units."
19422 #: ../fish/guestfish.pod:631
19423 msgid "B<T> or B<TiB>"
19427 #: ../fish/guestfish.pod:633
19428 msgid "The size in terabytes (multiplied by 2**40)."
19432 #: ../fish/guestfish.pod:635
19437 #: ../fish/guestfish.pod:637
19438 msgid "The size in SI 10**12 byte units."
19442 #: ../fish/guestfish.pod:639
19443 msgid "B<P> or B<PiB>"
19447 #: ../fish/guestfish.pod:641
19448 msgid "The size in petabytes (multiplied by 2**50)."
19452 #: ../fish/guestfish.pod:643
19457 #: ../fish/guestfish.pod:645
19458 msgid "The size in SI 10**15 byte units."
19462 #: ../fish/guestfish.pod:647
19463 msgid "B<E> or B<EiB>"
19467 #: ../fish/guestfish.pod:649
19468 msgid "The size in exabytes (multiplied by 2**60)."
19472 #: ../fish/guestfish.pod:651
19477 #: ../fish/guestfish.pod:653
19478 msgid "The size in SI 10**18 byte units."
19482 #: ../fish/guestfish.pod:655
19483 msgid "B<Z> or B<ZiB>"
19487 #: ../fish/guestfish.pod:657
19488 msgid "The size in zettabytes (multiplied by 2**70)."
19492 #: ../fish/guestfish.pod:659
19497 #: ../fish/guestfish.pod:661
19498 msgid "The size in SI 10**21 byte units."
19502 #: ../fish/guestfish.pod:663
19503 msgid "B<Y> or B<YiB>"
19507 #: ../fish/guestfish.pod:665
19508 msgid "The size in yottabytes (multiplied by 2**80)."
19512 #: ../fish/guestfish.pod:667
19517 #: ../fish/guestfish.pod:669
19518 msgid "The size in SI 10**24 byte units."
19522 #: ../fish/guestfish.pod:675
19525 " truncate-size /file 1G\n"
19530 #: ../fish/guestfish.pod:677
19531 msgid "would truncate the file to 1 gigabyte."
19535 #: ../fish/guestfish.pod:679
19537 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
19538 "the parameter to L</memsize> is specified in megabytes already). Adding a "
19539 "suffix will probably not do what you expect."
19543 #: ../fish/guestfish.pod:683
19544 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19548 #: ../fish/guestfish.pod:685
19550 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19551 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19555 #: ../fish/guestfish.pod:688
19558 " 1234 decimal number 1234\n"
19559 " 02322 octal number, equivalent to decimal 1234\n"
19560 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19565 #: ../fish/guestfish.pod:692
19567 "When using the C<chmod> command, you almost always want to specify an octal "
19568 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19569 "L<chmod(1)> program):"
19573 #: ../fish/guestfish.pod:696
19576 " chmod 0777 /public # OK\n"
19577 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19582 #: ../fish/guestfish.pod:699
19584 "Commands that return numbers usually print them in decimal, but some "
19585 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19586 "octal, preceeded by C<0>)."
19590 #: ../fish/guestfish.pod:703
19591 msgid "WILDCARDS AND GLOBBING"
19595 #: ../fish/guestfish.pod:705
19597 "Neither guestfish nor the underlying guestfs API performs wildcard expansion"
19598 " (globbing) by default. So for example the following will not do what you "
19603 #: ../fish/guestfish.pod:709
19611 #: ../fish/guestfish.pod:711
19613 "Assuming you don't have a directory called literally C</home/*> then the "
19614 "above command will return an error."
19618 #: ../fish/guestfish.pod:714
19619 msgid "To perform wildcard expansion, use the C<glob> command."
19623 #: ../fish/guestfish.pod:716
19626 " glob rm-rf /home/*\n"
19631 #: ../fish/guestfish.pod:718
19633 "runs C<rm-rf> on each path that matches (ie. potentially running the command"
19634 " many times), equivalent to:"
19638 #: ../fish/guestfish.pod:721
19641 " rm-rf /home/jim\n"
19642 " rm-rf /home/joe\n"
19643 " rm-rf /home/mary\n"
19648 #: ../fish/guestfish.pod:725
19649 msgid "C<glob> only works on simple guest paths and not on device names."
19653 #: ../fish/guestfish.pod:727
19655 "If you have several parameters, each containing a wildcard, then glob will "
19656 "perform a Cartesian product."
19660 #: ../fish/guestfish.pod:730
19665 #: ../fish/guestfish.pod:732
19667 "Any line which starts with a I<#> character is treated as a comment and "
19668 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19669 "a command. For example:"
19673 #: ../fish/guestfish.pod:736
19676 " # this is a comment\n"
19677 " # this is a comment\n"
19678 " foo # NOT a comment\n"
19683 #: ../fish/guestfish.pod:740
19684 msgid "Blank lines are also ignored."
19688 #: ../fish/guestfish.pod:742
19689 msgid "RUNNING COMMANDS LOCALLY"
19693 #: ../fish/guestfish.pod:744
19695 "Any line which starts with a I<!> character is treated as a command sent to "
19696 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19700 #: ../fish/guestfish.pod:748
19704 " tgz-out /remote local/remote-data.tar.gz\n"
19709 #: ../fish/guestfish.pod:751
19711 "will create a directory C<local> on the host, and then export the contents "
19712 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19713 "(See C<tgz-out>)."
19717 #: ../fish/guestfish.pod:755
19719 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19720 "effect, due to the way that subprocesses work in Unix."
19724 #: ../fish/guestfish.pod:758
19725 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19729 #: ../fish/guestfish.pod:760
19731 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19732 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19733 "and executed as guestfish commands."
19737 #: ../fish/guestfish.pod:764
19739 "Thus you can use shell script to construct arbitrary guestfish commands "
19740 "which are then parsed by guestfish."
19744 #: ../fish/guestfish.pod:767
19746 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19747 "through C</foo.100>) using guestfish commands alone. However this is simple"
19748 " if we use a shell script to create the guestfish commands for us:"
19752 #: ../fish/guestfish.pod:772
19755 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19760 #: ../fish/guestfish.pod:774
19761 msgid "or with names like C</foo.001>:"
19765 #: ../fish/guestfish.pod:776
19768 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19773 #: ../fish/guestfish.pod:778
19775 "When using guestfish interactively it can be helpful to just run the shell "
19776 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19777 "ordinary I<!> local command), see what guestfish commands it would run, and "
19778 "when you are happy with those prepend the C<E<lt>> character to run the "
19779 "guestfish commands for real."
19783 #: ../fish/guestfish.pod:784
19788 #: ../fish/guestfish.pod:786
19790 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19791 "command (a guestfish command) to the second command (any host command). For"
19796 #: ../fish/guestfish.pod:790
19799 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19804 #: ../fish/guestfish.pod:792
19806 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19807 "program). The above command would list all accounts in the guest filesystem"
19808 " which have UID 0, ie. root accounts including backdoors. Other examples:"
19812 #: ../fish/guestfish.pod:797
19815 " hexdump /bin/ls | head\n"
19816 " list-devices | tail -1\n"
19817 " tgz-out / - | tar ztf -\n"
19822 #: ../fish/guestfish.pod:801
19824 "The space before the pipe symbol is required, any space after the pipe "
19825 "symbol is optional. Everything after the pipe symbol is just passed "
19826 "straight to the host shell, so it can contain redirections, globs and "
19827 "anything else that makes sense on the host side."
19831 #: ../fish/guestfish.pod:806
19833 "To use a literal argument which begins with a pipe symbol, you have to quote"
19838 #: ../fish/guestfish.pod:809
19846 #: ../fish/guestfish.pod:811
19847 msgid "HOME DIRECTORIES"
19851 #: ../fish/guestfish.pod:813
19853 "If a parameter starts with the character C<~> then the tilde may be expanded"
19854 " as a home directory path (either C<~> for the current user's home "
19855 "directory, or C<~user> for another user)."
19859 #: ../fish/guestfish.pod:817
19861 "Note that home directory expansion happens for users known I<on the host>, "
19862 "not in the guest filesystem."
19866 #: ../fish/guestfish.pod:820
19868 "To use a literal argument which begins with a tilde, you have to quote it, "
19873 #: ../fish/guestfish.pod:823
19881 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
19882 msgid "ENCRYPTED DISKS"
19886 #: ../fish/guestfish.pod:827
19888 "Libguestfs has some support for Linux guests encrypted according to the "
19889 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19890 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
19891 "LUKS is supported."
19895 #: ../fish/guestfish.pod:832
19896 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19900 #: ../fish/guestfish.pod:834
19903 " ><fs> vfs-type /dev/sda2\n"
19909 #: ../fish/guestfish.pod:837
19911 "Then open those devices using L</luks-open>. This creates a device-mapper "
19912 "device called C</dev/mapper/luksdev>."
19916 #: ../fish/guestfish.pod:840
19919 " ><fs> luks-open /dev/sda2 luksdev\n"
19920 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19925 #: ../fish/guestfish.pod:843
19927 "Finally you have to tell LVM to scan for volume groups on the newly created "
19932 #: ../fish/guestfish.pod:846
19936 " vg-activate-all true\n"
19941 #: ../fish/guestfish.pod:849
19942 msgid "The logical volume(s) can now be mounted in the usual way."
19946 #: ../fish/guestfish.pod:851
19948 "Before closing a LUKS device you must unmount any logical volumes on it and "
19949 "deactivate the volume groups by calling C<vg-activate false VG> on each one."
19950 " Then you can close the mapper device:"
19954 #: ../fish/guestfish.pod:855
19957 " vg-activate false /dev/VG\n"
19958 " luks-close /dev/mapper/luksdev\n"
19963 #: ../fish/guestfish.pod:860
19965 "If a path is prefixed with C<win:> then you can use Windows-style drive "
19966 "letters and paths (with some limitations). The following commands are "
19971 #: ../fish/guestfish.pod:864
19974 " file /WINDOWS/system32/config/system.LOG\n"
19979 #: ../fish/guestfish.pod:866
19982 " file win:\\windows\\system32\\config\\system.log\n"
19987 #: ../fish/guestfish.pod:868
19990 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
19995 #: ../fish/guestfish.pod:870
19997 "The parameter is rewritten \"behind the scenes\" by looking up the position "
19998 "where the drive is mounted, prepending that to the path, changing all "
19999 "backslash characters to forward slash, then resolving the result using L"
20000 "</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
20001 "then the parameter might be rewritten like this:"
20005 #: ../fish/guestfish.pod:876
20008 " win:e:\\foo\\bar => /e/FOO/bar\n"
20013 #: ../fish/guestfish.pod:878
20014 msgid "This only works in argument positions that expect a path."
20018 #: ../fish/guestfish.pod:880
20019 msgid "UPLOADING AND DOWNLOADING FILES"
20023 #: ../fish/guestfish.pod:882
20025 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
20026 "others which upload from or download to a local file, you can use the "
20027 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
20031 #: ../fish/guestfish.pod:886
20039 #: ../fish/guestfish.pod:888
20041 "reads stdin and creates from that a file C</foo> in the disk image, and:"
20045 #: ../fish/guestfish.pod:891
20048 " tar-out /etc - | tar tf -\n"
20053 #: ../fish/guestfish.pod:893
20055 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20056 "command (see L</PIPES>)."
20060 #: ../fish/guestfish.pod:896
20062 "When using C<-> to read from stdin, the input is read up to the end of "
20063 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20064 "some arbitrary end marker:"
20068 #: ../fish/guestfish.pod:900
20071 " upload -<<END /foo\n"
20080 #: ../fish/guestfish.pod:906
20082 "Any string of characters can be used instead of C<END>. The end marker must"
20083 " appear on a line of its own, without any preceeding or following characters"
20084 " (not even spaces)."
20088 #: ../fish/guestfish.pod:910
20090 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20091 "upload local files (so-called \"FileIn\" parameters in the generator)."
20095 #: ../fish/guestfish.pod:913
20096 msgid "EXIT ON ERROR BEHAVIOUR"
20100 #: ../fish/guestfish.pod:915
20102 "By default, guestfish will ignore any errors when in interactive mode (ie. "
20103 "taking commands from a human over a tty), and will exit on the first error "
20104 "in non-interactive mode (scripts, commands given on the command line)."
20108 #: ../fish/guestfish.pod:920
20110 "If you prefix a command with a I<-> character, then that command will not "
20111 "cause guestfish to exit, even if that (one) command returns an error."
20115 #: ../fish/guestfish.pod:924
20116 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20120 #: ../fish/guestfish.pod:926
20122 "Guestfish can be remote-controlled over a socket. This is useful "
20123 "particularly in shell scripts where you want to make several different "
20124 "changes to a filesystem, but you don't want the overhead of starting up a "
20125 "guestfish process each time."
20129 #: ../fish/guestfish.pod:931
20130 msgid "Start a guestfish server process using:"
20134 #: ../fish/guestfish.pod:933
20137 " eval \"`guestfish --listen`\"\n"
20142 #: ../fish/guestfish.pod:935
20143 msgid "and then send it commands by doing:"
20147 #: ../fish/guestfish.pod:937
20150 " guestfish --remote cmd [...]\n"
20155 #: ../fish/guestfish.pod:939
20156 msgid "To cause the server to exit, send it the exit command:"
20160 #: ../fish/guestfish.pod:943
20162 "Note that the server will normally exit if there is an error in a command. "
20163 "You can change this in the usual way. See section L</EXIT ON ERROR "
20168 #: ../fish/guestfish.pod:947
20169 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20173 #: ../fish/guestfish.pod:949
20175 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which"
20176 " is how the I<--remote> option knows where to send the commands. You can "
20177 "have several guestfish listener processes running using:"
20181 #: ../fish/guestfish.pod:953
20184 " eval \"`guestfish --listen`\"\n"
20185 " pid1=$GUESTFISH_PID\n"
20186 " eval \"`guestfish --listen`\"\n"
20187 " pid2=$GUESTFISH_PID\n"
20189 " guestfish --remote=$pid1 cmd\n"
20190 " guestfish --remote=$pid2 cmd\n"
20195 #: ../fish/guestfish.pod:961
20196 msgid "REMOTE CONTROL AND CSH"
20200 #: ../fish/guestfish.pod:963
20202 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20207 #: ../fish/guestfish.pod:966
20210 " eval \"`guestfish --listen --csh`\"\n"
20215 #: ../fish/guestfish.pod:968
20216 msgid "REMOTE CONTROL DETAILS"
20220 #: ../fish/guestfish.pod:970
20222 "Remote control happens over a Unix domain socket called "
20223 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
20224 "of the process, and C<$PID> is the process ID of the server."
20228 #: ../fish/guestfish.pod:974
20229 msgid "Guestfish client and server versions must match exactly."
20233 #: ../fish/guestfish.pod:976
20234 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20238 #: ../fish/guestfish.pod:978
20240 "From Bash, you can use the following code which creates a guestfish "
20241 "instance, correctly quotes the command line, handles failure to start, and "
20242 "cleans up guestfish when the script exits:"
20246 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20254 #: ../fish/guestfish.pod:986
20257 " guestfish[0]=\"guestfish\"\n"
20258 " guestfish[1]=\"--listen\"\n"
20259 " guestfish[2]=\"--ro\"\n"
20260 " guestfish[3]=\"-a\"\n"
20261 " guestfish[4]=\"disk.img\"\n"
20266 #: ../fish/guestfish.pod:992
20269 " GUESTFISH_PID=\n"
20270 " eval $(\"${guestfish[@]}\")\n"
20271 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20272 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20279 #: ../fish/guestfish.pod:999
20282 " cleanup_guestfish ()\n"
20284 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20286 " trap cleanup_guestfish EXIT ERR\n"
20291 #: ../fish/guestfish.pod:1005
20294 " guestfish --remote -- run\n"
20299 #: ../fish/guestfish.pod:1007
20307 #: ../fish/guestfish.pod:1009
20308 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20312 #: ../fish/guestfish.pod:1011
20314 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20315 "context hangs, ie. don't do (note the backquotes):"
20319 #: ../fish/guestfish.pod:1014
20322 " a=`guestfish --remote run`\n"
20327 #: ../fish/guestfish.pod:1016
20329 "Since the C<run> command produces no output on stdout, this is not useful "
20330 "anyway. For further information see "
20331 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
20335 #: ../fish/guestfish.pod:1020
20336 msgid "PREPARED DISK IMAGES"
20340 #: ../fish/guestfish.pod:1022
20342 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20343 "preformatted disk images that guestfish can make for you to save typing. "
20344 "This is particularly useful for testing purposes. This option is used "
20345 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20346 "can be mixed with I<-a>)."
20350 #: ../fish/guestfish.pod:1028
20352 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20353 "the second and so on. Existing files in the current directory are "
20358 #: ../fish/guestfish.pod:1032
20360 "The type briefly describes how the disk should be sized, partitioned, how "
20361 "filesystem(s) should be created, and how content should be added. "
20362 "Optionally the type can be followed by extra parameters, separated by C<:> "
20363 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
20364 "sparsely-allocated disk, containing a single partition, with the partition "
20365 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem"
20366 " on a 1GB disk instead."
20370 #: ../fish/guestfish.pod:1040
20371 msgid "To list the available types and any extra parameters they take, run:"
20375 #: ../fish/guestfish.pod:1044
20377 "Note that the prepared filesystem is not mounted. You would usually have to"
20378 " use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20382 #: ../fish/guestfish.pod:1048
20384 "If any I<-N> or I<--new> options are given, the guest is automatically "
20389 #: ../fish/guestfish.pod:1053
20390 msgid "Create a 100MB disk with an ext4-formatted partition:"
20394 #: ../fish/guestfish.pod:1055
20397 " guestfish -N fs:ext4\n"
20402 #: ../fish/guestfish.pod:1057
20403 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20407 #: ../fish/guestfish.pod:1059
20410 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20415 #: ../fish/guestfish.pod:1061
20416 msgid "Create a blank 200MB disk:"
20420 #: ../fish/guestfish.pod:1063
20423 " guestfish -N disk:200M\n"
20428 #: ../fish/guestfish.pod:1065
20429 msgid "PROGRESS BARS"
20433 #: ../fish/guestfish.pod:1067
20435 "Some (not all) long-running commands send progress notification messages as "
20436 "they are running. Guestfish turns these messages into progress bars."
20440 #: ../fish/guestfish.pod:1071
20442 "When a command that supports progress bars takes longer than two seconds to "
20443 "run, and if progress bars are enabled, then you will see one appearing below"
20448 #: ../fish/guestfish.pod:1075
20451 " ><fs> copy-size /large-file /another-file 2048M\n"
20452 " / 10% [#####-----------------------------------------] 00:30\n"
20457 #: ../fish/guestfish.pod:1078
20459 "The spinner on the left hand side moves round once for every progress "
20460 "notification received from the backend. This is a (reasonably) golden "
20461 "assurance that the command is \"doing something\" even if the progress bar "
20462 "is not moving, because the command is able to send the progress "
20463 "notifications. When the bar reaches 100% and the command finishes, the "
20464 "spinner disappears."
20468 #: ../fish/guestfish.pod:1085
20470 "Progress bars are enabled by default when guestfish is used interactively. "
20471 "You can enable them even for non-interactive modes using I<--progress-bars>,"
20472 " and you can disable them completely using I<--no-progress-bars>."
20476 #: ../fish/guestfish.pod:1090
20477 msgid "GUESTFISH COMMANDS"
20481 #: ../fish/guestfish.pod:1092
20483 "The commands in this section are guestfish convenience commands, in other "
20484 "words, they are not part of the L<guestfs(3)> API."
20488 #: ../fish/guestfish.pod:1095
20493 #: ../fish/guestfish.pod:1097
20502 #: ../fish/guestfish.pod:1100
20503 msgid "Without any parameter, this provides general help."
20507 #: ../fish/guestfish.pod:1102
20508 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20512 #: ../fish/guestfish.pod:1104
20513 msgid "quit | exit"
20517 #: ../fish/guestfish.pod:1106
20518 msgid "This exits guestfish. You can also use C<^D> key."
20522 #: ../fish/guestfish.pod:1108
20523 msgid "@FISH_COMMANDS@"
20527 #: ../fish/guestfish.pod:1110
20532 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20537 #: ../fish/guestfish.pod:1116
20539 "guestfish returns 0 if the commands completed without error, or 1 if there "
20544 #: ../fish/guestfish.pod:1123
20549 #: ../fish/guestfish.pod:1125
20551 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20556 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3213
20557 msgid "FEBOOTSTRAP_KERNEL"
20561 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3215
20562 msgid "FEBOOTSTRAP_MODULES"
20566 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3217
20568 "These two environment variables allow the kernel that libguestfs uses in the"
20569 " appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20570 "most recent host kernel is chosen. For more information about kernel "
20571 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20572 "available in febootstrap E<ge> 3.8."
20576 #: ../fish/guestfish.pod:1138
20577 msgid "GUESTFISH_DISPLAY_IMAGE"
20581 #: ../fish/guestfish.pod:1140
20583 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20584 "If not set, it uses L<display(1)>."
20588 #: ../fish/guestfish.pod:1143
20589 msgid "GUESTFISH_PID"
20593 #: ../fish/guestfish.pod:1145
20595 "Used with the I<--remote> option to specify the remote guestfish process to "
20596 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20600 #: ../fish/guestfish.pod:1149
20605 #: ../fish/guestfish.pod:1151
20607 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20608 "not specified, the external L<hexedit(1)> program is used."
20612 #: ../fish/guestfish.pod:1155
20617 #: ../fish/guestfish.pod:1157
20619 "If compiled with GNU readline support, various files in the home directory "
20620 "can be used. See L</FILES>."
20624 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3223
20625 msgid "LIBGUESTFS_APPEND"
20629 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3225
20630 msgid "Pass additional options to the guest kernel."
20634 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3227
20635 msgid "LIBGUESTFS_DEBUG"
20639 #: ../fish/guestfish.pod:1166
20641 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20642 "effect as using the B<-v> option."
20646 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3232
20647 msgid "LIBGUESTFS_MEMSIZE"
20651 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3234
20653 "Set the memory allocated to the qemu process, in megabytes. For example:"
20657 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3237
20660 " LIBGUESTFS_MEMSIZE=700\n"
20665 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3239
20666 msgid "LIBGUESTFS_PATH"
20670 #: ../fish/guestfish.pod:1178
20672 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20673 "the discussion of paths in L<guestfs(3)>."
20677 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3244
20678 msgid "LIBGUESTFS_QEMU"
20682 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3246
20684 "Set the default qemu binary that libguestfs uses. If not set, then the qemu"
20685 " which was found at compile time by the configure script is used."
20689 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3252
20690 msgid "LIBGUESTFS_TRACE"
20694 #: ../fish/guestfish.pod:1189
20695 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
20699 #: ../fish/guestfish.pod:1191
20704 #: ../fish/guestfish.pod:1193
20706 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
20711 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:236
20712 #: ../src/guestfs.pod:3257
20717 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3259
20719 "Location of temporary directory, defaults to C</tmp> except for the cached "
20720 "supermin appliance which defaults to C</var/tmp>."
20724 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3262
20726 "If libguestfs was compiled to use the supermin appliance then the real "
20727 "appliance is cached in this directory, shared between all handles belonging "
20728 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
20729 "use in case C</var/tmp> is not large enough."
20733 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297
20734 #: ../rescue/virt-rescue.pod:273
20739 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301
20740 #: ../rescue/virt-rescue.pod:277
20741 msgid "$HOME/.libguestfs-tools.rc"
20745 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303
20746 #: ../rescue/virt-rescue.pod:279
20747 msgid "/etc/libguestfs-tools.conf"
20751 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305
20752 #: ../rescue/virt-rescue.pod:281
20754 "This configuration file controls the default read-only or read-write mode "
20755 "(I<--ro> or I<--rw>)."
20759 #: ../fish/guestfish.pod:1220
20760 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
20764 #: ../fish/guestfish.pod:1222
20765 msgid "$HOME/.guestfish"
20769 #: ../fish/guestfish.pod:1224
20771 "If compiled with GNU readline support, then the command history is saved in "
20776 #: ../fish/guestfish.pod:1227
20777 msgid "$HOME/.inputrc"
20781 #: ../fish/guestfish.pod:1229
20782 msgid "/etc/inputrc"
20786 #: ../fish/guestfish.pod:1231
20788 "If compiled with GNU readline support, then these files can be used to "
20789 "configure readline. For further information, please see "
20790 "L<readline(3)/INITIALIZATION FILE>."
20794 #: ../fish/guestfish.pod:1235
20795 msgid "To write rules which only apply to guestfish, use:"
20799 #: ../fish/guestfish.pod:1237
20809 #: ../fish/guestfish.pod:1241
20811 "Variables that you can set in inputrc that change the behaviour of guestfish"
20812 " in useful ways include:"
20816 #: ../fish/guestfish.pod:1246
20817 msgid "completion-ignore-case (default: on)"
20821 #: ../fish/guestfish.pod:1248
20823 "By default, guestfish will ignore case when tab-completing paths on the "
20828 #: ../fish/guestfish.pod:1251
20831 " set completion-ignore-case off\n"
20836 #: ../fish/guestfish.pod:1253
20837 msgid "to make guestfish case sensitive."
20841 #: ../fish/guestfish.pod:1257
20846 #: ../fish/guestfish.pod:1259
20847 msgid "test2.img (etc)"
20851 #: ../fish/guestfish.pod:1261
20853 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
20854 "will be created in the file C<test1.img> in the current directory. The "
20855 "second use of I<-N> will use C<test2.img> and so on. Any existing file with"
20856 " the same name will be overwritten."
20860 #: ../fish/guestfish.pod:1270
20862 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, L<virt-"
20863 "cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-"
20864 "edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-"
20865 "filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-"
20866 "fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-"
20867 "sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-"
20868 "win-reg(1)>, L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-"
20873 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3354
20874 #: ../test-tool/libguestfs-test-tool.pod:112
20875 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
20879 #: ../fish/virt-copy-in.pod:5
20881 "virt-copy-in - Copy files and directories into a virtual machine disk image."
20885 #: ../fish/virt-copy-in.pod:9
20888 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
20893 #: ../fish/virt-copy-in.pod:11
20896 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
20901 #: ../fish/virt-copy-in.pod:15
20903 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially"
20904 " causing disk corruption. The virtual machine must be shut down before you "
20905 "use this command."
20909 #: ../fish/virt-copy-in.pod:21
20911 "C<virt-copy-in> copies files and directories from the local disk into a "
20912 "virtual machine disk image or named libvirt domain."
20916 #: ../fish/virt-copy-in.pod:24
20918 "You can give one of more filenames and directories on the command line. "
20919 "Directories are copied in recursively. The final parameter must be the "
20920 "destination directory in the disk image which must be an absolute path "
20921 "starting with a C</> character."
20925 #: ../fish/virt-copy-in.pod:33
20928 " virt-copy-in -d MyGuest resolv.conf /etc\n"
20933 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
20934 msgid "Upload a home directory to a guest:"
20938 #: ../fish/virt-copy-in.pod:37
20941 " virt-copy-in -d MyGuest skel /home\n"
20946 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
20947 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
20948 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
20952 #: ../fish/virt-copy-in.pod:41
20954 "This command is just a simple shell script wrapper around the "
20955 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
20956 "trivial copy, you are probably better off using guestfish directly."
20960 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
20961 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
20963 "Since the shell script just passes options straight to guestfish, read "
20964 "L<guestfish(1)> to see the full list of options."
20968 #: ../fish/virt-copy-in.pod:52
20970 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, L"
20971 "<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20975 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
20976 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
20977 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
20981 #: ../fish/virt-copy-out.pod:5
20983 "virt-copy-out - Copy files and directories out of a virtual machine disk "
20988 #: ../fish/virt-copy-out.pod:9
20991 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
20996 #: ../fish/virt-copy-out.pod:11
20999 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
21004 #: ../fish/virt-copy-out.pod:15
21006 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
21007 "image or named libvirt domain."
21011 #: ../fish/virt-copy-out.pod:18
21013 "You can give one of more filenames and directories on the command line. "
21014 "Directories are copied out recursively."
21018 #: ../fish/virt-copy-out.pod:23
21019 msgid "Download the home directories from a virtual machine:"
21023 #: ../fish/virt-copy-out.pod:25
21027 " virt-copy-out -d MyGuest /home homes\n"
21032 #: ../fish/virt-copy-out.pod:30
21034 "This command is just a simple shell script wrapper around the "
21035 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
21036 "trivial copy, you are probably better off using guestfish directly."
21040 #: ../fish/virt-copy-out.pod:41
21042 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L"
21043 "<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21047 #: ../fish/virt-tar-in.pod:5
21048 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21052 #: ../fish/virt-tar-in.pod:9
21055 " virt-tar-in -a disk.img data.tar /destination\n"
21060 #: ../fish/virt-tar-in.pod:11
21063 " virt-tar-in -d domain data.tar /destination\n"
21068 #: ../fish/virt-tar-in.pod:13
21071 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21076 #: ../fish/virt-tar-in.pod:17
21078 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21079 "causing disk corruption. The virtual machine must be shut down before you "
21080 "use this command."
21084 #: ../fish/virt-tar-in.pod:23
21086 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21087 "image or named libvirt domain."
21091 #: ../fish/virt-tar-in.pod:26
21093 "The first parameter is the tar file. Use C<-> to read the tar file from "
21094 "standard input. The second parameter is the absolute target directory to "
21099 #: ../fish/virt-tar-in.pod:34
21102 " virt-tar-in -d MyGuest homes.tar /home\n"
21107 #: ../fish/virt-tar-in.pod:38
21109 "This command is just a simple shell script wrapper around the "
21110 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial"
21111 " copy, you are probably better off using guestfish directly."
21115 #: ../fish/virt-tar-in.pod:49
21117 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L"
21118 "<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
21119 "L<http://libguestfs.org/>."
21123 #: ../fish/virt-tar-out.pod:5
21125 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21129 #: ../fish/virt-tar-out.pod:9
21132 " virt-tar-out -a disk.img /dir files.tar\n"
21137 #: ../fish/virt-tar-out.pod:11
21140 " virt-tar-out -d domain /dir files.tar\n"
21145 #: ../fish/virt-tar-out.pod:13
21148 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21153 #: ../fish/virt-tar-out.pod:17
21155 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21159 #: ../fish/virt-tar-out.pod:20
21161 "The first parameter is the absolute path of the virtual machine directory. "
21162 "The second parameter is the tar file to write. Use C<-> to write to "
21167 #: ../fish/virt-tar-out.pod:26
21168 msgid "Download the home directories from a guest:"
21172 #: ../fish/virt-tar-out.pod:28
21175 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21180 #: ../fish/virt-tar-out.pod:32
21182 "This command is just a simple shell script wrapper around the "
21183 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
21184 "trivial copy, you are probably better off using guestfish directly."
21188 #: ../fish/virt-tar-out.pod:43
21190 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L"
21191 "<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21195 #: ../fuse/guestmount.pod:5
21197 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21201 #: ../fuse/guestmount.pod:9
21204 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21209 #: ../fuse/guestmount.pod:11
21212 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21217 #: ../fuse/guestmount.pod:13
21220 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21225 #: ../fuse/guestmount.pod:17
21227 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21228 "machines. If you do this, you risk disk corruption in the VM."
21232 #: ../fuse/guestmount.pod:22
21234 "The guestmount program can be used to mount virtual machine filesystems and "
21235 "other disk images on the host. It uses libguestfs for access to the guest "
21236 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21237 "a mountable device."
21241 #: ../fuse/guestmount.pod:27
21243 "Along with other options, you have to give at least one device (I<-a> "
21244 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m>"
21245 " option) or use the I<-i> inspection option or the I<--live> option. How "
21246 "this works is better explained in the L<guestfish(1)> manual page, or by "
21247 "looking at the examples below."
21251 #: ../fuse/guestmount.pod:33
21253 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21254 "by you, and the filesystem will not be visible to any other users unless you"
21255 " make certain global configuration changes to C</etc/fuse.conf>. To unmount"
21256 " the filesystem, use the C<fusermount -u> command."
21260 #: ../fuse/guestmount.pod:41
21262 "For a typical Windows guest which has its main filesystem on the first "
21267 #: ../fuse/guestmount.pod:44
21270 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21275 #: ../fuse/guestmount.pod:46
21277 "For a typical Linux guest which has a /boot filesystem on the first "
21278 "partition, and the root filesystem on a logical volume:"
21282 #: ../fuse/guestmount.pod:49
21285 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21290 #: ../fuse/guestmount.pod:51
21291 msgid "To get libguestfs to detect guest mountpoints for you:"
21295 #: ../fuse/guestmount.pod:53
21298 " guestmount -a guest.img -i --ro /mnt\n"
21303 #: ../fuse/guestmount.pod:55
21304 msgid "For a libvirt guest called \"Guest\" you could do:"
21308 #: ../fuse/guestmount.pod:57
21311 " guestmount -d Guest -i --ro /mnt\n"
21316 #: ../fuse/guestmount.pod:59
21318 "If you don't know what filesystems are contained in a guest or disk image, "
21319 "use L<virt-filesystems(1)> first:"
21323 #: ../fuse/guestmount.pod:62
21326 " virt-filesystems MyGuest\n"
21331 #: ../fuse/guestmount.pod:64
21333 "If you want to trace the libguestfs calls but without excessive debugging "
21334 "information, we recommend:"
21338 #: ../fuse/guestmount.pod:67
21341 " guestmount [...] --trace /mnt\n"
21346 #: ../fuse/guestmount.pod:69
21347 msgid "If you want to debug the program, we recommend:"
21351 #: ../fuse/guestmount.pod:71
21354 " guestmount [...] --trace --verbose /mnt\n"
21359 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68
21360 #: ../resize/virt-resize.pod:621
21365 #: ../fuse/guestmount.pod:75
21366 msgid "Other users cannot see the filesystem by default"
21370 #: ../fuse/guestmount.pod:77
21372 "If you mount a filesystem as one user (eg. root), then other users will not "
21373 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21374 "option when mounting:"
21378 #: ../fuse/guestmount.pod:81
21381 " sudo guestmount [...] -o allow_other /mnt\n"
21386 #: ../fuse/guestmount.pod:83
21387 msgid "Enabling FUSE"
21391 #: ../fuse/guestmount.pod:85
21393 "On some distros, you may need to add yourself to a special group (eg. "
21394 "C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21395 "Debian and derivatives."
21399 #: ../fuse/guestmount.pod:89
21401 "On other distros, no special group is required. It is not necessary on "
21402 "Fedora or Red Hat Enterprise Linux."
21406 #: ../fuse/guestmount.pod:100
21407 msgid "Add a block device or virtual machine image."
21411 #: ../fuse/guestmount.pod:123
21412 msgid "B<--dir-cache-timeout N>"
21416 #: ../fuse/guestmount.pod:125
21418 "Set the readdir cache timeout to I<N> seconds, the default being 60 seconds."
21419 " The readdir cache [actually, there are several semi-independent caches] is"
21420 " populated after a readdir(2) call with the stat and extended attributes of "
21421 "the files in the directory, in anticipation that they will be requested soon"
21426 #: ../fuse/guestmount.pod:131
21428 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21429 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21430 "requests, only cache existing ones."
21434 #: ../fuse/guestmount.pod:151
21436 "If you have untrusted raw-format guest disk images, you should use this "
21437 "option to specify the disk format. This avoids a possible security problem "
21438 "with malicious guests (CVE-2010-3851). See also "
21439 "L<guestfs(3)/guestfs_add_drive_opts>."
21443 #: ../fuse/guestmount.pod:156
21444 msgid "B<--fuse-help>"
21448 #: ../fuse/guestmount.pod:158
21449 msgid "Display help on special FUSE options (see I<-o> below)."
21453 #: ../fuse/guestmount.pod:162
21454 msgid "Display brief help and exit."
21458 #: ../fuse/guestmount.pod:186
21460 "Mount the named partition or logical volume on the given mountpoint B<in the"
21461 " guest> (this has nothing to do with mountpoints in the host)."
21465 #: ../fuse/guestmount.pod:189
21467 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21468 "something on C</>."
21472 #: ../fuse/guestmount.pod:206
21474 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21475 "unmounted. If you specify this option, then we don't attempt to sync the "
21476 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21480 #: ../fuse/guestmount.pod:211
21481 msgid "B<-o option>"
21485 #: ../fuse/guestmount.pod:213
21486 msgid "B<--option option>"
21490 #: ../fuse/guestmount.pod:215
21491 msgid "Pass extra options to FUSE."
21495 #: ../fuse/guestmount.pod:217
21497 "To get a list of all the extra options supported by FUSE, use the command "
21498 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21499 "of them are a good idea."
21503 #: ../fuse/guestmount.pod:221
21506 " guestmount --fuse-help\n"
21511 #: ../fuse/guestmount.pod:223
21512 msgid "Some potentially useful FUSE options:"
21516 #: ../fuse/guestmount.pod:227
21517 msgid "B<-o allow_other>"
21521 #: ../fuse/guestmount.pod:229
21522 msgid "Allow other users to see the filesystem."
21526 #: ../fuse/guestmount.pod:231
21527 msgid "B<-o attr_timeout=N>"
21531 #: ../fuse/guestmount.pod:233
21532 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21536 #: ../fuse/guestmount.pod:235
21537 msgid "B<-o kernel_cache>"
21541 #: ../fuse/guestmount.pod:237
21543 "Allow the kernel to cache files (reduces the number of reads that have to go"
21544 " through the L<guestfs(3)> API). This is generally a good idea if you can "
21545 "afford the extra memory usage."
21549 #: ../fuse/guestmount.pod:241
21550 msgid "B<-o uid=N> B<-o gid=N>"
21554 #: ../fuse/guestmount.pod:243
21556 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21557 "the chosen values."
21561 #: ../fuse/guestmount.pod:252
21563 "Add devices and mount everything read-only. Also disallow writes and make "
21564 "the disk appear read-only to FUSE."
21568 #: ../fuse/guestmount.pod:255
21570 "This is highly recommended if you are not going to edit the guest disk. If "
21571 "the guest is running and this option is I<not> supplied, then there is a "
21572 "strong risk of disk corruption in the guest. We try to prevent this from "
21573 "happening, but it is not always possible."
21577 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:171
21578 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21582 #: ../fuse/guestmount.pod:264
21583 msgid "Enable SELinux support for the guest."
21587 #: ../fuse/guestmount.pod:270
21588 msgid "Enable verbose messages from underlying libguestfs."
21592 #: ../fuse/guestmount.pod:276
21593 msgid "Display the program version and exit."
21597 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308
21598 #: ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
21599 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21603 #: ../fuse/guestmount.pod:289
21608 #: ../fuse/guestmount.pod:291
21609 msgid "Trace libguestfs calls and entry into each FUSE function."
21613 #: ../fuse/guestmount.pod:293
21614 msgid "This also stops the daemon from forking into the background."
21618 #: ../fuse/guestmount.pod:319
21620 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L"
21621 "<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
21622 "L<http://fuse.sf.net/>."
21626 #: ../fuse/guestmount.pod:334
21627 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21631 #: ../inspector/virt-inspector.pod:5
21633 "virt-inspector - Display operating system version and other information "
21634 "about a virtual machine"
21638 #: ../inspector/virt-inspector.pod:9
21641 " virt-inspector [--options] -d domname\n"
21646 #: ../inspector/virt-inspector.pod:11
21649 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21654 #: ../inspector/virt-inspector.pod:15
21657 " virt-inspector domname\n"
21662 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
21665 " virt-inspector disk.img [disk.img ...]\n"
21670 #: ../inspector/virt-inspector.pod:21
21672 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21673 "determine the version of the operating system and other information about "
21674 "the virtual machine."
21678 #: ../inspector/virt-inspector.pod:25
21679 msgid "Virt-inspector produces XML output for feeding into other programs."
21683 #: ../inspector/virt-inspector.pod:27
21685 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21686 "the libvirt domain (see: C<virsh list --all>)."
21690 #: ../inspector/virt-inspector.pod:30
21692 "You can also run virt-inspector directly on disk images from a single "
21693 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain"
21694 " has several block devices, in which case you should list several I<-a> "
21695 "options one after another, with the first corresponding to the guest's "
21696 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
21700 #: ../inspector/virt-inspector.pod:37
21702 "You can also run virt-inspector on install disks, live CDs, bootable USB "
21703 "keys and similar."
21707 #: ../inspector/virt-inspector.pod:40
21709 "Virt-inspector can only inspect and report upon I<one domain at a time>. To"
21710 " inspect several virtual machines, you have to run virt-inspector several "
21711 "times (for example, from a shell script for-loop)."
21715 #: ../inspector/virt-inspector.pod:45
21717 "Because virt-inspector needs direct access to guest images, it won't "
21718 "normally work over remote libvirt connections."
21722 #: ../inspector/virt-inspector.pod:48
21724 "All of the information available from virt-inspector is also available "
21725 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
21726 "The same information can also be fetched using guestfish or via libguestfs "
21727 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
21728 "WITH OTHER PROGRAMMING LANGUAGES>)."
21732 #: ../inspector/virt-inspector.pod:81
21734 "Libvirt is only used if you specify a C<domname> on the command line. If "
21735 "you specify guest block devices directly (I<-a>), then libvirt is not used "
21740 #: ../inspector/virt-inspector.pod:94
21742 "When prompting for keys and passphrases, virt-inspector normally turns "
21743 "echoing off so you cannot see what you are typing. If you are not worried "
21744 "about Tempest attacks and there is no one else in the room you can specify "
21745 "this flag to see what you are typing."
21749 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
21750 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
21751 #: ../tools/virt-win-reg.pl:144
21753 "Specify the format of disk images given on the command line. If this is "
21754 "omitted then the format is autodetected from the content of the disk image."
21758 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
21759 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
21760 #: ../tools/virt-win-reg.pl:148
21762 "If disk images are requested from libvirt, then this program asks libvirt "
21763 "for this information. In this case, the value of the format parameter is "
21768 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:391
21769 #: ../resize/virt-resize.pod:483 ../sparsify/virt-sparsify.pod:132
21770 #: ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102
21771 #: ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
21773 "If working with untrusted raw-format guest disk images, you should ensure "
21774 "the format is always specified."
21778 #: ../inspector/virt-inspector.pod:139
21779 msgid "Previous versions of virt-inspector allowed you to write either:"
21783 #: ../inspector/virt-inspector.pod:145
21786 " virt-inspector guestname\n"
21791 #: ../inspector/virt-inspector.pod:153
21796 #: ../inspector/virt-inspector.pod:155
21798 "The virt-inspector XML is described precisely in a RELAX NG schema file C"
21799 "<virt-inspector.rng> which is supplied with libguestfs. This section is "
21800 "just an overview."
21804 #: ../inspector/virt-inspector.pod:159
21806 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
21807 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
21808 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
21809 "which is vanishingly rare in real world VMs."
21813 #: ../inspector/virt-inspector.pod:164
21814 msgid "E<lt>operatingsystemE<gt>"
21818 #: ../inspector/virt-inspector.pod:166
21820 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
21821 "describe the operating system, its architecture, the descriptive \"product "
21822 "name\" string, the type of OS and so on, as in this example:"
21826 #: ../inspector/virt-inspector.pod:170
21829 " <operatingsystems>\n"
21830 " <operatingsystem>\n"
21831 " <root>/dev/sda2</root>\n"
21832 " <name>windows</name>\n"
21833 " <arch>i386</arch>\n"
21834 " <distro>windows</distro>\n"
21835 " <product_name>Windows 7 Enterprise</product_name>\n"
21836 " <product_variant>Client</product_variant>\n"
21837 " <major_version>6</major_version>\n"
21838 " <minor_version>1</minor_version>\n"
21839 " <windows_systemroot>/Windows</windows_systemroot>\n"
21840 " <format>installed</format>\n"
21845 #: ../inspector/virt-inspector.pod:183
21847 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
21848 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora>"
21849 " but many other distros are recognized) and E<lt>archE<gt> is the guest "
21850 "architecture. The other fields are fairly self-explanatory, but because "
21851 "these fields are taken directly from the libguestfs inspection API you can "
21852 "find precise information from L<guestfs(3)/INSPECTION>."
21856 #: ../inspector/virt-inspector.pod:191
21858 "The E<lt>rootE<gt> element is the root filesystem device, but from the point"
21859 " of view of libguestfs (block devices may have completely different names "
21860 "inside the VM itself)."
21864 #: ../inspector/virt-inspector.pod:195
21865 msgid "E<lt>mountpointsE<gt>"
21869 #: ../inspector/virt-inspector.pod:197
21871 "Un*x-like guests typically have multiple filesystems which are mounted at "
21872 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
21873 "element which looks like this:"
21877 #: ../inspector/virt-inspector.pod:201
21880 " <operatingsystems>\n"
21881 " <operatingsystem>\n"
21884 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
21885 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
21886 " </mountpoints>\n"
21891 #: ../inspector/virt-inspector.pod:209
21893 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
21894 "and may have completely different names inside the guest. Only mountable "
21895 "filesystems appear in this list, not things like swap devices."
21899 #: ../inspector/virt-inspector.pod:214
21900 msgid "E<lt>filesystemsE<gt>"
21904 #: ../inspector/virt-inspector.pod:216
21906 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
21907 "filesystems belonging to the guest, including swap and empty partitions. "
21908 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
21909 "this OS or shared with this OS and other OSes)."
21913 #: ../inspector/virt-inspector.pod:222
21914 msgid "You might see something like this:"
21918 #: ../inspector/virt-inspector.pod:224
21921 " <operatingsystems>\n"
21922 " <operatingsystem>\n"
21925 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21926 " <type>ext4</type>\n"
21927 " <label>Fedora-13-x86_64</label>\n"
21928 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
21934 #: ../inspector/virt-inspector.pod:234
21936 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
21937 "the label, and the UUID."
21941 #: ../inspector/virt-inspector.pod:237
21942 msgid "E<lt>applicationsE<gt>"
21946 #: ../inspector/virt-inspector.pod:239
21948 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
21949 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
21954 #: ../inspector/virt-inspector.pod:243
21956 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
21957 "Typical values would be C<rpm> and C<deb>."
21961 #: ../inspector/virt-inspector.pod:246
21963 "E<lt>package_managementE<gt>, if present, describes the package manager. "
21964 "Typical values include C<yum>, C<up2date> and C<apt>"
21968 #: ../inspector/virt-inspector.pod:249
21969 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
21973 #: ../inspector/virt-inspector.pod:252
21976 " <operatingsystems>\n"
21977 " <operatingsystem>\n"
21979 " <applications>\n"
21981 " <name>coreutils</name>\n"
21982 " <version>8.5</version>\n"
21983 " <release>1</release>\n"
21984 " </application>\n"
21989 #: ../inspector/virt-inspector.pod:262
21991 "The version and release fields may not be available for some types guests. "
21992 "Other fields are possible, see "
21993 "L<guestfs(3)/guestfs_inspect_list_applications>."
21997 #: ../inspector/virt-inspector.pod:266
21998 msgid "E<lt>drive_mappingsE<gt>"
22002 #: ../inspector/virt-inspector.pod:268
22004 "For operating systems like Windows which use drive letters, virt-inspector "
22005 "is able to find out how drive letters map to filesystems."
22009 #: ../inspector/virt-inspector.pod:272
22012 " <operatingsystems>\n"
22013 " <operatingsystem>\n"
22015 " <drive_mappings>\n"
22016 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
22017 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
22018 " </drive_mappings>\n"
22023 #: ../inspector/virt-inspector.pod:280
22025 "In the example above, drive C maps to the filesystem on the second partition"
22026 " on the first disk, and drive E maps to the filesystem on the first "
22027 "partition on the second disk."
22031 #: ../inspector/virt-inspector.pod:284
22033 "Note that this only covers permanent local filesystem mappings, not things "
22034 "like network shares. Furthermore NTFS volume mount points may not be listed"
22039 #: ../inspector/virt-inspector.pod:288
22040 msgid "E<lt>iconE<gt>"
22044 #: ../inspector/virt-inspector.pod:290
22046 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22047 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22048 "very large and high quality."
22052 #: ../inspector/virt-inspector.pod:294
22055 " <operatingsystems>\n"
22056 " <operatingsystem>\n"
22059 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22060 " [... many lines of base64 data ...]\n"
22066 #: ../inspector/virt-inspector.pod:302
22068 "To display the icon, you have to extract it and convert the base64 data back"
22069 " to a binary file. Use an XPath query or simply an editor to extract the "
22070 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22075 #: ../inspector/virt-inspector.pod:307
22078 " base64 -i -d < icon.data > icon.png\n"
22083 #: ../inspector/virt-inspector.pod:309
22084 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22088 #: ../inspector/virt-inspector.pod:311
22090 "Virt-inspector can detect some operating system installers on install disks,"
22091 " live CDs, bootable USB keys and more."
22095 #: ../inspector/virt-inspector.pod:314
22097 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22098 "fields may be present to indicate a live CD, network installer, or one part "
22099 "of a multipart CD. For example:"
22103 #: ../inspector/virt-inspector.pod:318
22106 " <operatingsystems>\n"
22107 " <operatingsystem>\n"
22108 " <root>/dev/sda</root>\n"
22109 " <name>linux</name>\n"
22110 " <arch>i386</arch>\n"
22111 " <distro>ubuntu</distro>\n"
22112 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
22113 " <major_version>10</major_version>\n"
22114 " <minor_version>10</minor_version>\n"
22115 " <format>installer</format>\n"
22121 #: ../inspector/virt-inspector.pod:330
22122 msgid "USING XPATH"
22126 #: ../inspector/virt-inspector.pod:332
22128 "You can use the XPath query language to select parts of the XML. We "
22129 "recommend using C<xmlstarlet> to perform XPath queries from the command "
22134 #: ../inspector/virt-inspector.pod:338
22137 " $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
22139 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22140 " <type>ext4</type>\n"
22146 #: ../inspector/virt-inspector.pod:344
22149 " $ virt-inspector -d Guest | \\\n"
22150 " xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22156 #: ../inspector/virt-inspector.pod:348
22159 " $ virt-inspector -d Guest | \\\n"
22160 " xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
22161 " [displays the guest icon, if there is one]\n"
22166 #: ../inspector/virt-inspector.pod:359
22167 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22171 #: ../inspector/virt-inspector.pod:361
22173 "Early versions of libguestfs shipped with a different virt-inspector program"
22174 " written in Perl (the current version is written in C). The XML output of "
22175 "the Perl virt-inspector was different and it could also output in other "
22176 "formats like text."
22180 #: ../inspector/virt-inspector.pod:366
22182 "The old virt-inspector is no longer supported or shipped with libguestfs."
22186 #: ../inspector/virt-inspector.pod:369
22188 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22189 "versions of virt-inspector with different names:"
22193 #: ../inspector/virt-inspector.pod:372
22196 " virt-inspector Old Perl version.\n"
22197 " virt-inspector2 New C version.\n"
22202 #: ../inspector/virt-inspector.pod:382
22204 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
22205 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22209 #: ../inspector/virt-inspector.pod:399
22210 msgid "Matthew Booth L<mbooth@redhat.com>"
22214 #: ../java/examples/guestfs-java.pod:5
22215 msgid "guestfs-java - How to use libguestfs from Java"
22219 #: ../java/examples/guestfs-java.pod:9
22222 " import com.redhat.et.libguestfs.*;\n"
22227 #: ../java/examples/guestfs-java.pod:11
22230 " GuestFS g = new GuestFS ();\n"
22231 " g.add_drive_opts (\"disk.img\", null);\n"
22237 #: ../java/examples/guestfs-java.pod:17
22239 "This manual page documents how to call libguestfs from the Java programming "
22240 "language. This page just documents the differences from the C API and gives"
22241 " some examples. If you are not familiar with using libguestfs, you also "
22242 "need to read L<guestfs(3)>."
22246 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22247 msgid "CLOSING THE HANDLE"
22251 #: ../java/examples/guestfs-java.pod:24
22253 "The handle is closed when it is reaped by the garbage collector. Because "
22254 "libguestfs handles include a lot of state, it is also possible to close (and"
22255 " hence free) them explicitly by calling the C<close> method."
22259 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
22260 #: ../python/examples/guestfs-python.pod:21
22261 #: ../ruby/examples/guestfs-ruby.pod:22
22266 #: ../java/examples/guestfs-java.pod:31
22268 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22269 "exception. This has a single parameter which is the error message (a "
22274 #: ../java/examples/guestfs-java.pod:35
22275 msgid "Calling any method on a closed handle raises the same exception."
22279 #: ../java/examples/guestfs-java.pod:47
22281 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-"
22282 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
22283 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22287 #: ../ocaml/examples/guestfs-ocaml.pod:5
22288 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22292 #: ../ocaml/examples/guestfs-ocaml.pod:9
22293 msgid "Module style:"
22297 #: ../ocaml/examples/guestfs-ocaml.pod:11
22300 " let g = Guestfs.create () in\n"
22301 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22302 " Guestfs.launch g;\n"
22307 #: ../ocaml/examples/guestfs-ocaml.pod:15
22308 msgid "Object-oriented style:"
22312 #: ../ocaml/examples/guestfs-ocaml.pod:17
22315 " let g = new Guestfs.guestfs () in\n"
22316 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22322 #: ../ocaml/examples/guestfs-ocaml.pod:21
22325 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22327 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22332 #: ../ocaml/examples/guestfs-ocaml.pod:27
22334 "This manual page documents how to call libguestfs from the OCaml programming"
22335 " language. This page just documents the differences from the C API and "
22336 "gives some examples. If you are not familiar with using libguestfs, you "
22337 "also need to read L<guestfs(3)>."
22341 #: ../ocaml/examples/guestfs-ocaml.pod:32
22342 msgid "PROGRAMMING STYLES"
22346 #: ../ocaml/examples/guestfs-ocaml.pod:34
22348 "There are two different programming styles supported by the OCaml bindings."
22349 " You can use a module style, with each C function mapped to an OCaml "
22354 #: ../ocaml/examples/guestfs-ocaml.pod:38
22357 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22362 #: ../ocaml/examples/guestfs-ocaml.pod:40
22367 #: ../ocaml/examples/guestfs-ocaml.pod:42
22370 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22375 #: ../ocaml/examples/guestfs-ocaml.pod:44
22377 "Alternately you can use an object-oriented style, calling methods on the "
22378 "class C<Guestfs.guestfs>:"
22382 #: ../ocaml/examples/guestfs-ocaml.pod:47
22385 " method set_verbose : bool -> unit\n"
22390 #: ../ocaml/examples/guestfs-ocaml.pod:49
22392 "The object-oriented style is usually briefer, and the minor performance "
22393 "penalty isn't noticable in the general overhead of performing libguestfs "
22398 #: ../ocaml/examples/guestfs-ocaml.pod:55
22400 "The handle is closed when it is reaped by the garbage collector. Because "
22401 "libguestfs handles include a lot of state, it is also possible to close (and"
22402 " hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22407 #: ../ocaml/examples/guestfs-ocaml.pod:62
22409 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22410 "exception. This has a single parameter which is the error message (a "
22415 #: ../ocaml/examples/guestfs-ocaml.pod:66
22417 "Calling any function/method on a closed handle raises "
22418 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
22423 #: ../ocaml/examples/guestfs-ocaml.pod:80
22425 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-"
22426 "java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, L"
22427 "<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22431 #: ../perl/examples/guestfs-perl.pod:5
22432 msgid "guestfs-perl - How to use libguestfs from Perl"
22436 #: ../perl/examples/guestfs-perl.pod:9
22439 " use Sys::Guestfs;\n"
22444 #: ../perl/examples/guestfs-perl.pod:11
22447 " my $h = Sys::Guestfs->new ();\n"
22448 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22449 " $h->launch ();\n"
22450 " $h->mount_options ('', '/dev/sda1', '/');\n"
22451 " $h->touch ('/hello');\n"
22457 #: ../perl/examples/guestfs-perl.pod:20
22459 "This manual page documents how to call libguestfs from the Perl programming "
22460 "language. This page just documents the differences from the C API and gives"
22461 " some examples. If you are not familiar with using libguestfs, you also "
22462 "need to read L<guestfs(3)>. To read the full Perl API, see "
22463 "L<Sys::Guestfs(3)>."
22467 #: ../perl/examples/guestfs-perl.pod:26
22472 #: ../perl/examples/guestfs-perl.pod:28
22474 "Errors from libguestfs functions turn into calls to C<croak> (see "
22479 #: ../perl/examples/guestfs-perl.pod:41
22481 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-"
22482 "erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L"
22483 "<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22487 #: ../python/examples/guestfs-python.pod:5
22488 msgid "guestfs-python - How to use libguestfs from Python"
22492 #: ../python/examples/guestfs-python.pod:9
22495 " import guestfs\n"
22496 " g = guestfs.GuestFS ()\n"
22497 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22503 #: ../python/examples/guestfs-python.pod:16
22505 "This manual page documents how to call libguestfs from the Python "
22506 "programming language. This page just documents the differences from the C "
22507 "API and gives some examples. If you are not familiar with using libguestfs,"
22508 " you also need to read L<guestfs(3)>."
22512 #: ../python/examples/guestfs-python.pod:23
22514 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22515 "single string argument which is the error message."
22519 #: ../python/examples/guestfs-python.pod:26
22520 msgid "MORE DOCUMENTATION"
22524 #: ../python/examples/guestfs-python.pod:28
22529 #: ../python/examples/guestfs-python.pod:30
22533 " >>> import guestfs\n"
22534 " >>> help (guestfs)\n"
22539 #: ../python/examples/guestfs-python.pod:44
22541 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-"
22542 "java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, L"
22543 "<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22547 #: ../rescue/virt-rescue.pod:5
22548 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22552 #: ../rescue/virt-rescue.pod:9
22555 " virt-rescue [--options] -d domname\n"
22560 #: ../rescue/virt-rescue.pod:11
22563 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22568 #: ../rescue/virt-rescue.pod:15
22571 " virt-rescue [--options] domname\n"
22576 #: ../rescue/virt-rescue.pod:17
22579 " virt-rescue [--options] disk.img [disk.img ...]\n"
22584 #: ../rescue/virt-rescue.pod:21
22586 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22587 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22588 "you from doing this, but doesn't catch all cases."
22592 #: ../rescue/virt-rescue.pod:25
22594 "However if you use the I<--ro> (read only) option, then you can attach a "
22595 "shell to a live virtual machine. The results might be strange or "
22596 "inconsistent at times but you won't get disk corruption."
22600 #: ../rescue/virt-rescue.pod:31
22602 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22603 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22604 "recovery tools which you can use to examine or rescue a virtual machine or "
22609 #: ../rescue/virt-rescue.pod:36
22611 "You can run virt-rescue on any virtual machine known to libvirt, or directly"
22612 " on disk image(s):"
22616 #: ../rescue/virt-rescue.pod:39
22619 " virt-rescue -d GuestName\n"
22624 #: ../rescue/virt-rescue.pod:41
22627 " virt-rescue --ro -a /path/to/disk.img\n"
22632 #: ../rescue/virt-rescue.pod:43
22635 " virt-rescue -a /dev/sdc\n"
22640 #: ../rescue/virt-rescue.pod:45
22641 msgid "For live VMs you I<must> use the --ro option."
22645 #: ../rescue/virt-rescue.pod:47
22647 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22648 "in an interactive bash shell where you can use many ordinary Linux commands."
22649 " What you see in C</> (C</bin>, C</lib> etc) is the rescue appliance. You "
22650 "must mount the virtual machine's filesystems by hand. There is an empty "
22651 "directory called C</sysroot> where you can mount filesystems."
22655 #: ../rescue/virt-rescue.pod:54
22657 "In the example below, we list logical volumes, then choose one to mount "
22658 "under C</sysroot>:"
22662 #: ../rescue/virt-rescue.pod:57
22666 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
22667 " lv_root vg_f11x64 -wi-a- 8.83G\n"
22668 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
22669 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
22670 " ><rescue> ls /sysroot\n"
22675 #: ../rescue/virt-rescue.pod:64
22677 "If you don't know what filesystems are available on the virtual machine then"
22678 " you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
22682 #: ../rescue/virt-rescue.pod:70
22684 "Virt-rescue can be used on I<any> disk image file or device, not just a "
22685 "virtual machine. For example you can use it on a blank file if you want to "
22686 "partition that file (although we would recommend using L<guestfish(1)> "
22687 "instead as it is more suitable for this purpose). You can even use virt-"
22688 "rescue on things like SD cards."
22692 #: ../rescue/virt-rescue.pod:76
22694 "Virt-rescue does not require root. You only need to run it as root if you "
22695 "need root to open the disk image."
22699 #: ../rescue/virt-rescue.pod:79
22701 "This tool is just designed for quick interactive hacking on a virtual "
22702 "machine. For more structured access to a virtual machine disk image, you "
22703 "should use L<guestfs(3)>. To get a structured shell that you can use to "
22704 "make scripted changes to guests, use L<guestfish(1)>."
22708 #: ../rescue/virt-rescue.pod:103
22709 msgid "B<--append kernelopts>"
22713 #: ../rescue/virt-rescue.pod:105
22714 msgid "Pass additional options to the rescue kernel."
22718 #: ../rescue/virt-rescue.pod:135
22721 " virt-rescue --format=raw -a disk.img\n"
22726 #: ../rescue/virt-rescue.pod:139
22729 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
22734 #: ../rescue/virt-rescue.pod:148
22739 #: ../rescue/virt-rescue.pod:150
22740 msgid "B<--memsize MB>"
22744 #: ../rescue/virt-rescue.pod:152
22746 "Change the amount of memory allocated to the rescue system. The default is "
22747 "set by libguestfs and is small but adequate for running system tools. The "
22748 "occasional program might need more memory. The parameter is specified in "
22753 #: ../rescue/virt-rescue.pod:157
22754 msgid "B<--network>"
22758 #: ../rescue/virt-rescue.pod:159
22759 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
22763 #: ../rescue/virt-rescue.pod:165
22764 msgid "Open the image read-only."
22768 #: ../rescue/virt-rescue.pod:175
22770 "Enable SELinux in the rescue appliance. You should read "
22771 "L<guestfs(3)/SELINUX> before using this option."
22775 #: ../rescue/virt-rescue.pod:178
22780 #: ../rescue/virt-rescue.pod:180
22781 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
22785 #: ../rescue/virt-rescue.pod:198
22787 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
22788 "are done read-write."
22792 #: ../rescue/virt-rescue.pod:211
22793 msgid "Previous versions of virt-rescue allowed you to write either:"
22797 #: ../rescue/virt-rescue.pod:213
22800 " virt-rescue disk.img [disk.img ...]\n"
22805 #: ../rescue/virt-rescue.pod:217
22808 " virt-rescue guestname\n"
22813 #: ../rescue/virt-rescue.pod:225
22818 #: ../rescue/virt-rescue.pod:227
22820 "Adding the I<--network> option enables QEMU user networking in the rescue "
22821 "appliance. There are some differences between user networking and ordinary "
22826 #: ../rescue/virt-rescue.pod:233
22827 msgid "ping does not work"
22831 #: ../rescue/virt-rescue.pod:235
22833 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
22834 "send the ping packets, and because virt-rescue must be able to run as non-"
22835 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
22836 "The ping command will appear to resolve addresses but will not be able to "
22837 "send or receive any packets. This does not mean that the network is not "
22842 #: ../rescue/virt-rescue.pod:242
22843 msgid "cannot receive connections"
22847 #: ../rescue/virt-rescue.pod:244
22848 msgid "QEMU user networking cannot receive incoming connections."
22852 #: ../rescue/virt-rescue.pod:246
22853 msgid "making TCP connections"
22857 #: ../rescue/virt-rescue.pod:248
22859 "The virt-rescue appliance needs to be small and so does not include many "
22860 "network tools. In particular there is no L<telnet(1)> command. You can "
22861 "make TCP connections from the shell using the magical "
22862 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
22866 #: ../rescue/virt-rescue.pod:253
22869 " exec 3<>/dev/tcp/redhat.com/80\n"
22870 " echo \"GET /\" >&3\n"
22876 #: ../rescue/virt-rescue.pod:257
22877 msgid "See L<bash(1)> for more details."
22881 #: ../rescue/virt-rescue.pod:263
22883 "Several environment variables affect virt-rescue. See "
22884 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
22888 #: ../rescue/virt-rescue.pod:290
22890 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22891 "L<http://libguestfs.org/>."
22895 #: ../resize/virt-resize.pod:5
22896 msgid "virt-resize - Resize a virtual machine disk"
22900 #: ../resize/virt-resize.pod:9
22903 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
22904 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
22905 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
22910 #: ../resize/virt-resize.pod:15
22912 "Virt-resize is a tool which can resize a virtual machine disk, making it "
22913 "larger or smaller overall, and resizing or deleting any partitions contained"
22918 #: ../resize/virt-resize.pod:19
22920 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
22921 "not> be used on live virtual machines - for consistent results, shut the "
22922 "virtual machine down before resizing it."
22926 #: ../resize/virt-resize.pod:23
22928 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
22929 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
22933 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:597
22934 #: ../sparsify/virt-sparsify.pod:203 ../src/guestfs.pod:484
22935 #: ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
22940 #: ../resize/virt-resize.pod:33
22942 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
22943 "fill the extra 5GB of space."
22947 #: ../resize/virt-resize.pod:36
22950 " virt-filesystems --long -h --all -a olddisk\n"
22955 #: ../resize/virt-resize.pod:38
22958 " truncate -r olddisk newdisk\n"
22959 " truncate -s +5G newdisk\n"
22964 #: ../resize/virt-resize.pod:41
22967 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
22968 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
22973 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:604
22974 #: ../sparsify/virt-sparsify.pod:210 ../src/guestfs.pod:490
22975 #: ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
22980 #: ../resize/virt-resize.pod:46
22982 "As above, but make the /boot partition 200MB bigger, while giving the "
22983 "remaining space to /dev/sda2:"
22987 #: ../resize/virt-resize.pod:49
22990 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22991 " olddisk newdisk\n"
22996 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:610
22997 #: ../sparsify/virt-sparsify.pod:216 ../src/guestfs.pod:501
22998 #: ../src/guestfs.pod:1451
23003 #: ../resize/virt-resize.pod:54
23005 "As in the first example, but expand a logical volume as the final step. "
23006 "This is what you would typically use for Linux guests that use LVM:"
23010 #: ../resize/virt-resize.pod:58
23013 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
23014 " olddisk newdisk\n"
23019 #: ../resize/virt-resize.pod:61
23024 #: ../resize/virt-resize.pod:63
23026 "As in the first example, but the output format will be qcow2 instead of a "
23031 #: ../resize/virt-resize.pod:66
23034 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
23035 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23040 #: ../resize/virt-resize.pod:71
23041 msgid "DETAILED USAGE"
23045 #: ../resize/virt-resize.pod:73
23046 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23050 #: ../resize/virt-resize.pod:77
23051 msgid "1. Shut down the virtual machine"
23055 #: ../resize/virt-resize.pod:79
23056 msgid "2. Locate input disk image"
23060 #: ../resize/virt-resize.pod:81
23062 "Locate the input disk image (ie. the file or device on the host containing "
23063 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23064 "dumpxml> like this to find the disk image name:"
23068 #: ../resize/virt-resize.pod:85
23071 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23072 " Found 1 nodes:\n"
23074 " <source dev=\"/dev/vg/lv_guest\" />\n"
23079 #: ../resize/virt-resize.pod:90
23080 msgid "3. Look at current sizing"
23084 #: ../resize/virt-resize.pod:92
23086 "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23090 #: ../resize/virt-resize.pod:95
23093 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23094 " Name Type Size Parent\n"
23095 " /dev/sda1 partition 101M /dev/sda\n"
23096 " /dev/sda2 partition 7.9G /dev/sda\n"
23097 " /dev/sda device 8.0G -\n"
23102 #: ../resize/virt-resize.pod:101
23104 "(This example is a virtual machine with an 8 GB disk which we would like to "
23105 "expand up to 10 GB)."
23109 #: ../resize/virt-resize.pod:104
23110 msgid "4. Create output disk"
23114 #: ../resize/virt-resize.pod:106
23116 "Virt-resize cannot do in-place disk modifications. You have to have space "
23117 "to store the resized output disk."
23121 #: ../resize/virt-resize.pod:109
23123 "To store the resized disk image in a file, create a file of a suitable size:"
23127 #: ../resize/virt-resize.pod:112
23130 " # rm -f outdisk\n"
23131 " # truncate -s 10G outdisk\n"
23136 #: ../resize/virt-resize.pod:115
23137 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23141 #: ../resize/virt-resize.pod:117
23144 " # lvcreate -L 10G -n lv_name vg_name\n"
23149 #: ../resize/virt-resize.pod:119
23150 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23154 #: ../resize/virt-resize.pod:121
23157 " # virsh pool-list\n"
23158 " # virsh vol-create-as poolname newvol 10G\n"
23163 #: ../resize/virt-resize.pod:124
23168 #: ../resize/virt-resize.pod:126
23170 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23171 "file) and the output disk. The output disk is the one created in the "
23176 #: ../resize/virt-resize.pod:130
23179 " # virt-resize indisk outdisk\n"
23184 #: ../resize/virt-resize.pod:132
23186 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23187 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23188 "larger, then an extra, empty partition is created at the end of the disk "
23189 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23194 #: ../resize/virt-resize.pod:138
23196 "More realistically you'd want to expand existing partitions in the disk "
23197 "image by passing extra options (for the full list see the L</OPTIONS> "
23202 #: ../resize/virt-resize.pod:142
23204 "L</--expand> is the most useful option. It expands the named partition "
23205 "within the disk to fill any extra space:"
23209 #: ../resize/virt-resize.pod:145
23212 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23217 #: ../resize/virt-resize.pod:147
23219 "(In this case, an extra partition is I<not> created at the end of the disk, "
23220 "because there will be no unused space)."
23224 #: ../resize/virt-resize.pod:150
23226 "L</--resize> is the other commonly used option. The following would "
23227 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23228 "rest of the available space:"
23232 #: ../resize/virt-resize.pod:154
23235 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23236 " indisk outdisk\n"
23241 #: ../resize/virt-resize.pod:157
23243 "If the expanded partition in the image contains a filesystem or LVM PV, then"
23244 " if virt-resize knows how, it will resize the contents, the equivalent of "
23245 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23246 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23247 "filesystems, so you would have to online resize them after booting the "
23252 #: ../resize/virt-resize.pod:164
23253 msgid "Other options are covered below."
23257 #: ../resize/virt-resize.pod:166
23262 #: ../resize/virt-resize.pod:168
23263 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23267 #: ../resize/virt-resize.pod:170
23268 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23272 #: ../resize/virt-resize.pod:172
23275 " # virsh edit guestname\n"
23280 #: ../resize/virt-resize.pod:174
23282 "Change E<lt>source ...E<gt>, see "
23283 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
23287 #: ../resize/virt-resize.pod:177
23288 msgid "Then start up the domain with the new, resized disk:"
23292 #: ../resize/virt-resize.pod:179
23295 " # virsh start guestname\n"
23300 #: ../resize/virt-resize.pod:181
23302 "and check that it still works. See also the L</NOTES> section below for "
23303 "additional information."
23307 #: ../resize/virt-resize.pod:184
23308 msgid "7. Resize LVs etc inside the guest"
23312 #: ../resize/virt-resize.pod:186
23313 msgid "(This can also be done offline using L<guestfish(1)>)"
23317 #: ../resize/virt-resize.pod:188
23319 "Once the guest has booted you should see the new space available, at least "
23320 "for filesystems that virt-resize knows how to resize, and for PVs. The user"
23321 " may need to resize LVs inside PVs, and also resize filesystem types that "
23322 "virt-resize does not know how to expand."
23326 #: ../resize/virt-resize.pod:195
23327 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23331 #: ../resize/virt-resize.pod:197
23333 "Shrinking is somewhat more complex than expanding, and only an overview is "
23338 #: ../resize/virt-resize.pod:200
23340 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23341 "filesystems). The user has to shrink content before passing the disk image "
23342 "to virt-resize, and virt-resize will check that the content has been shrunk "
23347 #: ../resize/virt-resize.pod:205
23348 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23352 #: ../resize/virt-resize.pod:207
23354 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23355 "steps 3 and 4 above to allocate a new disk image."
23359 #: ../resize/virt-resize.pod:210
23361 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23365 #: ../resize/virt-resize.pod:213
23366 msgid "IGNORING OR DELETING PARTITIONS"
23370 #: ../resize/virt-resize.pod:215
23372 "virt-resize also gives a convenient way to ignore or delete partitions when "
23373 "copying from the input disk to the output disk. Ignoring a partition speeds"
23374 " up the copy where you don't care about the existing contents of a "
23375 "partition. Deleting a partition removes it completely, but note that it "
23376 "also renumbers any partitions after the one which is deleted, which can "
23377 "leave some guests unbootable."
23381 #: ../resize/virt-resize.pod:222
23382 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23386 #: ../resize/virt-resize.pod:224
23388 "If the input disk is in qcow2 format, then you may prefer that the output is"
23389 " in qcow2 format as well. Alternately, virt-resize can convert the format "
23390 "on the fly. The output format is simply determined by the format of the "
23391 "empty output container that you provide. Thus to create qcow2 output, use:"
23395 #: ../resize/virt-resize.pod:230
23398 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23403 #: ../resize/virt-resize.pod:232
23404 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23408 #: ../resize/virt-resize.pod:234
23409 msgid "Similarly, to get non-sparse raw output use:"
23413 #: ../resize/virt-resize.pod:236
23416 " fallocate -l size outdisk\n"
23421 #: ../resize/virt-resize.pod:238
23423 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
23424 "if=/dev/zero of=outdisk bs=1M count=..>)"
23428 #: ../resize/virt-resize.pod:241
23429 msgid "LOGICAL PARTITIONS"
23433 #: ../resize/virt-resize.pod:243
23435 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23436 "tables) cannot be resized."
23440 #: ../resize/virt-resize.pod:246
23442 "To understand what is going on, firstly one of the four partitions "
23443 "C</dev/sda1-4> will have MBR partition type C<05> or C<0f>. This is called "
23444 "the B<extended partition>. Use L<virt-filesystems(1)> to see the MBR "
23449 #: ../resize/virt-resize.pod:251
23450 msgid "Logical partitions live inside the extended partition."
23454 #: ../resize/virt-resize.pod:253
23456 "The extended partition can be expanded, but not shrunk (unless you force it,"
23457 " which is not advisable). When the extended partition is copied across, all"
23458 " the logical partitions contained inside are copied over implicitly. Virt-"
23459 "resize does not look inside the extended partition, so it copies the logical"
23460 " partitions blindly."
23464 #: ../resize/virt-resize.pod:259
23466 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command"
23467 " line. Doing so will give an error."
23471 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23472 msgid "Display help."
23476 #: ../resize/virt-resize.pod:270
23477 msgid "B<--align-first auto>"
23481 #: ../resize/virt-resize.pod:272
23482 msgid "B<--align-first never>"
23486 #: ../resize/virt-resize.pod:274
23487 msgid "B<--align-first always>"
23491 #: ../resize/virt-resize.pod:276
23493 "Align the first partition for improved performance (see also the "
23494 "I<--alignment> option)."
23498 #: ../resize/virt-resize.pod:279
23500 "The default is I<--align-first auto> which only aligns the first partition "
23501 "if it is safe to do so. That is, only when we know how to fix the "
23502 "bootloader automatically, and at the moment that can only be done for "
23507 #: ../resize/virt-resize.pod:284
23509 "I<--align-first never> means we never move the first partition. This is the"
23510 " safest option. Try this if the guest does not boot after resizing."
23514 #: ../resize/virt-resize.pod:288
23516 "I<--align-first always> means we always align the first partition (if it "
23517 "needs to be aligned). For some guests this will break the bootloader, "
23518 "making the guest unbootable."
23522 #: ../resize/virt-resize.pod:292
23523 msgid "B<--alignment N>"
23527 #: ../resize/virt-resize.pod:294
23529 "Set the alignment of partitions to C<N> sectors. The default in virt-resize"
23530 " E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
23534 #: ../resize/virt-resize.pod:298
23536 "Assuming 512 byte sector size inside the guest, here are some suitable "
23541 #: ../resize/virt-resize.pod:303
23542 msgid "I<--alignment 1> (512 bytes)"
23546 #: ../resize/virt-resize.pod:305
23548 "The partitions would be packed together as closely as possible, but would be"
23549 " completely unaligned. In some cases this can cause very poor performance."
23550 " See L<virt-alignment-scan(1)> for further details."
23554 #: ../resize/virt-resize.pod:309
23555 msgid "I<--alignment 8> (4K)"
23559 #: ../resize/virt-resize.pod:311
23561 "This would be the minimum acceptable alignment for reasonable performance on"
23566 #: ../resize/virt-resize.pod:314
23567 msgid "I<--alignment 128> (64K)"
23571 #: ../resize/virt-resize.pod:316
23573 "This alignment provides good performance when the host is using high end "
23578 #: ../resize/virt-resize.pod:319
23579 msgid "I<--alignment 2048> (1M)"
23583 #: ../resize/virt-resize.pod:321
23585 "This is the standard alignment used by all newly installed guests since "
23590 #: ../resize/virt-resize.pod:326
23595 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177
23596 #: ../tools/virt-win-reg.pl:120
23601 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
23602 msgid "Enable debugging messages."
23606 #: ../resize/virt-resize.pod:332
23607 msgid "B<--delete part>"
23611 #: ../resize/virt-resize.pod:334
23613 "Delete the named partition. It would be more accurate to describe this as "
23614 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
23615 "the original disk image is left intact."
23619 #: ../resize/virt-resize.pod:338
23621 "Note that when you delete a partition, then anything contained in the "
23622 "partition is also deleted. Furthermore, this causes any partitions that "
23623 "come after to be I<renumbered>, which can easily make your guest unbootable."
23627 #: ../resize/virt-resize.pod:343 ../resize/virt-resize.pod:404
23628 #: ../resize/virt-resize.pod:531 ../sparsify/virt-sparsify.pod:145
23629 msgid "You can give this option multiple times."
23633 #: ../resize/virt-resize.pod:345
23634 msgid "B<--expand part>"
23638 #: ../resize/virt-resize.pod:347
23640 "Expand the named partition so it uses up all extra space (space left over "
23641 "after any other resize changes that you request have been done)."
23645 #: ../resize/virt-resize.pod:350
23647 "If virt-resize knows how, it will expand the direct content of the "
23648 "partition. For example, if the partition is an LVM PV, it will expand the "
23649 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
23650 "content it doesn't know about alone."
23654 #: ../resize/virt-resize.pod:355
23655 msgid "Currently virt-resize can resize:"
23659 #: ../resize/virt-resize.pod:361
23660 msgid "ext2, ext3 and ext4 filesystems."
23664 #: ../resize/virt-resize.pod:365
23665 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
23669 #: ../resize/virt-resize.pod:367
23671 "The filesystem must have been shut down consistently last time it was used."
23672 " Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a"
23673 " consistency check, so at the first boot after resizing Windows will check "
23678 #: ../resize/virt-resize.pod:374
23680 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
23681 "inside the PV, but see the I<--LV-expand> option. The user could also "
23682 "resize LVs as desired after boot."
23686 #: ../resize/virt-resize.pod:380
23687 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
23691 #: ../resize/virt-resize.pod:384 ../resize/virt-resize.pod:559
23692 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
23696 #: ../resize/virt-resize.pod:386 ../sparsify/virt-sparsify.pod:125
23697 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92
23698 #: ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
23699 msgid "B<--format> raw"
23703 #: ../resize/virt-resize.pod:388 ../sparsify/virt-sparsify.pod:129
23705 "Specify the format of the input disk image. If this flag is not given then "
23706 "it is auto-detected from the image itself."
23710 #: ../resize/virt-resize.pod:394
23712 "Note that this option I<does not> affect the output format. See L</QCOW2 "
23713 "AND NON-SPARSE RAW FORMATS>."
23717 #: ../resize/virt-resize.pod:397
23718 msgid "B<--ignore part>"
23722 #: ../resize/virt-resize.pod:399
23724 "Ignore the named partition. Effectively this means the partition is "
23725 "allocated on the destination disk, but the content is not copied across from"
23726 " the source disk. The content of the partition will be blank (all zero "
23731 #: ../resize/virt-resize.pod:406
23732 msgid "B<--LV-expand logvol>"
23736 #: ../resize/virt-resize.pod:408
23738 "This takes the logical volume and, as a final step, expands it to fill all "
23739 "the space available in its volume group. A typical usage, assuming a Linux "
23740 "guest with a single PV C</dev/sda2> and a root device called "
23741 "C</dev/vg_guest/lv_root> would be:"
23745 #: ../resize/virt-resize.pod:413
23748 " virt-resize indisk outdisk \\\n"
23749 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
23754 #: ../resize/virt-resize.pod:416
23756 "This would first expand the partition (and PV), and then expand the root "
23757 "device to fill the extra space in the PV."
23761 #: ../resize/virt-resize.pod:419
23763 "The contents of the LV are also resized if virt-resize knows how to do that."
23764 " You can stop virt-resize from trying to expand the content by using the "
23765 "option I<--no-expand-content>."
23769 #: ../resize/virt-resize.pod:423
23770 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
23774 #: ../resize/virt-resize.pod:425
23776 "You can give this option multiple times, I<but> it doesn't make sense to do "
23777 "this unless the logical volumes you specify are all in different volume "
23782 #: ../resize/virt-resize.pod:429 ../sparsify/virt-sparsify.pod:147
23783 msgid "B<--machine-readable>"
23787 #: ../resize/virt-resize.pod:431 ../sparsify/virt-sparsify.pod:149
23789 "This option is used to make the output more machine friendly when being "
23790 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
23794 #: ../resize/virt-resize.pod:437
23795 msgid "B<--dryrun>"
23799 #: ../resize/virt-resize.pod:439
23800 msgid "Print a summary of what would be done, but don't do anything."
23804 #: ../resize/virt-resize.pod:441
23805 msgid "B<--no-copy-boot-loader>"
23809 #: ../resize/virt-resize.pod:443
23811 "By default, virt-resize copies over some sectors at the start of the disk "
23812 "(up to the beginning of the first partition). Commonly these sectors "
23813 "contain the Master Boot Record (MBR) and the boot loader, and are required "
23814 "in order for the guest to boot correctly."
23818 #: ../resize/virt-resize.pod:448
23820 "If you specify this flag, then this initial copy is not done. You may need "
23821 "to reinstall the boot loader in this case."
23825 #: ../resize/virt-resize.pod:451
23826 msgid "B<--no-extra-partition>"
23830 #: ../resize/virt-resize.pod:453
23832 "By default, virt-resize creates an extra partition if there is any extra, "
23833 "unused space after all resizing has happened. Use this option to prevent "
23834 "the extra partition from being created. If you do this then the extra space"
23835 " will be inaccessible until you run fdisk, parted, or some other "
23836 "partitioning tool in the guest."
23840 #: ../resize/virt-resize.pod:459
23842 "Note that if the surplus space is smaller than 10 MB, no extra partition "
23847 #: ../resize/virt-resize.pod:462
23848 msgid "B<--no-expand-content>"
23852 #: ../resize/virt-resize.pod:464
23854 "By default, virt-resize will try to expand the direct contents of "
23855 "partitions, if it knows how (see I<--expand> option above)."
23859 #: ../resize/virt-resize.pod:467
23861 "If you give the I<--no-expand-content> option then virt-resize will not "
23866 #: ../resize/virt-resize.pod:470
23867 msgid "B<--ntfsresize-force>"
23871 #: ../resize/virt-resize.pod:472
23873 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
23874 "the NTFS disk is marked as needing a consistency check. You have to use "
23875 "this option if you want to resize a Windows guest multiple times without "
23876 "booting into Windows between each resize."
23880 #: ../resize/virt-resize.pod:478
23881 msgid "B<--output-format> raw"
23885 #: ../resize/virt-resize.pod:480
23887 "Specify the format of the output disk image. If this flag is not given then"
23888 " it is auto-detected from the image itself."
23892 #: ../resize/virt-resize.pod:486
23894 "Note that this option I<does not create> the output format. This option "
23895 "just tells libguestfs what it is so it doesn't try to guess it. You still "
23896 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
23897 "SPARSE RAW FORMATS>."
23901 #: ../resize/virt-resize.pod:495
23902 msgid "Don't print the summary."
23906 #: ../resize/virt-resize.pod:497
23907 msgid "B<--resize part=size>"
23911 #: ../resize/virt-resize.pod:499
23913 "Resize the named partition (expanding or shrinking it) so that it has the "
23918 #: ../resize/virt-resize.pod:502
23920 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
23921 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current"
23922 " size; or as a relative number or percentage. For example:"
23926 #: ../resize/virt-resize.pod:508
23929 " --resize /dev/sda2=10G\n"
23934 #: ../resize/virt-resize.pod:510
23937 " --resize /dev/sda4=90%\n"
23942 #: ../resize/virt-resize.pod:512
23945 " --resize /dev/sda2=+1G\n"
23950 #: ../resize/virt-resize.pod:514
23953 " --resize /dev/sda2=-200M\n"
23958 #: ../resize/virt-resize.pod:516
23961 " --resize /dev/sda1=+128K\n"
23966 #: ../resize/virt-resize.pod:518
23969 " --resize /dev/sda1=+10%\n"
23974 #: ../resize/virt-resize.pod:520
23977 " --resize /dev/sda1=-10%\n"
23982 #: ../resize/virt-resize.pod:522
23984 "You can increase the size of any partition. Virt-resize will expand the "
23985 "direct content of the partition if it knows how (see I<--expand> below)."
23989 #: ../resize/virt-resize.pod:526
23991 "You can only I<decrease> the size of partitions that contain filesystems or "
23992 "PVs which have already been shrunk. Virt-resize will check this has been "
23993 "done before proceeding, or else will print an error (see also I<--resize-"
23998 #: ../resize/virt-resize.pod:533
23999 msgid "B<--resize-force part=size>"
24003 #: ../resize/virt-resize.pod:535
24005 "This is the same as I<--resize> except that it will let you decrease the "
24006 "size of any partition. Generally this means you will lose any data which "
24007 "was at the end of the partition you shrink, but you may not care about that "
24008 "(eg. if shrinking an unused partition, or if you can easily recreate it such"
24009 " as a swap partition)."
24013 #: ../resize/virt-resize.pod:541
24014 msgid "See also the I<--ignore> option."
24018 #: ../resize/virt-resize.pod:543
24019 msgid "B<--shrink part>"
24023 #: ../resize/virt-resize.pod:545
24025 "Shrink the named partition until the overall disk image fits in the "
24026 "destination. The named partition B<must> contain a filesystem or PV which "
24027 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24028 "online tools). Virt-resize will check this and give an error if it has not "
24033 #: ../resize/virt-resize.pod:551
24035 "The amount by which the overall disk must be shrunk (after carrying out all "
24036 "other operations requested by the user) is called the \"deficit\". For "
24037 "example, a straight copy (assume no other operations) from a 5GB disk image"
24038 " to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24039 "would give an error unless the user specified a partition to shrink and that"
24040 " partition had more than a gigabyte of free space."
24044 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:177
24045 msgid "MACHINE READABLE OUTPUT"
24049 #: ../resize/virt-resize.pod:571
24051 "The I<--machine-readable> option can be used to make the output more machine"
24052 " friendly, which is useful when calling virt-resize from other programs, "
24057 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:183
24058 msgid "There are two ways to use this option."
24062 #: ../resize/virt-resize.pod:577
24064 "Firstly use the option on its own to query the capabilities of the virt-"
24065 "resize binary. Typical output looks like this:"
24069 #: ../resize/virt-resize.pod:580
24072 " $ virt-resize --machine-readable\n"
24074 " ntfsresize-force\n"
24082 #: ../resize/virt-resize.pod:587 ../sparsify/virt-sparsify.pod:193
24084 "A list of features is printed, one per line, and the program exits with "
24089 #: ../resize/virt-resize.pod:590 ../sparsify/virt-sparsify.pod:196
24091 "Secondly use the option in conjunction with other options to make the "
24092 "regular program output more machine friendly."
24096 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:199
24097 msgid "At the moment this means:"
24101 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:205
24103 "Progress bar messages can be parsed from stdout by looking for this regular "
24108 #: ../resize/virt-resize.pod:602 ../sparsify/virt-sparsify.pod:208
24111 " ^[0-9]+/[0-9]+$\n"
24116 #: ../resize/virt-resize.pod:606 ../sparsify/virt-sparsify.pod:212
24118 "The calling program should treat messages sent to stdout (except for "
24119 "progress bar messages) as status messages. They can be logged and/or "
24120 "displayed to the user."
24124 #: ../resize/virt-resize.pod:612
24126 "The calling program should treat messages sent to stderr as error messages."
24127 " In addition, virt-resize exits with a non-zero status code if there was a "
24132 #: ../resize/virt-resize.pod:618
24134 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
24135 "readable> option and will return an error."
24139 #: ../resize/virt-resize.pod:623
24140 msgid "\"Partition 1 does not end on cylinder boundary.\""
24144 #: ../resize/virt-resize.pod:625
24146 "Virt-resize aligns partitions to multiples of 128 sectors (see the "
24147 "I<--alignment> parameter). Usually this means the partitions will not be "
24148 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24149 "for disks manufactured since the early 1990s, and doubly so for virtual hard"
24150 " drives. Alignment of partitions to cylinders is not required by any modern"
24151 " operating system."
24155 #: ../resize/virt-resize.pod:632
24156 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24160 #: ../resize/virt-resize.pod:634
24162 "In Windows Vista and later versions, Microsoft switched to using a separate "
24163 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24164 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24165 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24166 "the second partition (ie. C: drive) should work."
24170 #: ../resize/virt-resize.pod:641
24172 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24173 "NTFS partitions have been expanded. This is just a safety check and (unless"
24174 " it find errors) is nothing to worry about."
24178 #: ../resize/virt-resize.pod:645
24179 msgid "GUEST BOOT STUCK AT \"GRUB\""
24183 #: ../resize/virt-resize.pod:647
24185 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24186 "printing C<GRUB> on the console, try reinstalling grub."
24190 #: ../resize/virt-resize.pod:650
24193 " guestfish -i -a newdisk\n"
24194 " ><fs> cat /boot/grub/device.map\n"
24195 " # check the contents of this file are sensible or\n"
24196 " # edit the file if necessary\n"
24197 " ><fs> grub-install / /dev/vda\n"
24203 #: ../resize/virt-resize.pod:657
24205 "For more flexible guest reconfiguration, including if you need to specify "
24206 "other parameters to grub-install, use L<virt-rescue(1)>."
24210 #: ../resize/virt-resize.pod:660
24211 msgid "ALTERNATIVE TOOLS"
24215 #: ../resize/virt-resize.pod:662
24217 "There are several proprietary tools for resizing partitions. We won't "
24218 "mention any here."
24222 #: ../resize/virt-resize.pod:665
24224 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24225 "operations on disk images. They can resize and move partitions, but I don't"
24226 " think they can do anything with the contents, and they certainly don't "
24231 #: ../resize/virt-resize.pod:670
24233 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24234 "but at a much lower level. You will probably end up hand-calculating sector"
24235 " offsets, which is something that virt-resize was designed to avoid. If you"
24236 " want to see the guestfish-equivalent commands that virt-resize runs, use "
24237 "the I<--debug> flag."
24241 #: ../resize/virt-resize.pod:690
24243 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
24244 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
24245 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
24246 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<virt-"
24247 "sparsify(1)>, L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24251 #: ../ruby/examples/guestfs-ruby.pod:5
24252 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24256 #: ../ruby/examples/guestfs-ruby.pod:9
24259 " require 'guestfs'\n"
24260 " g = Guestfs::Guestfs.new()\n"
24261 " g.add_drive_opts(\"disk.img\",\n"
24262 " :readonly => 1, :format => \"raw\")\n"
24268 #: ../ruby/examples/guestfs-ruby.pod:17
24270 "This manual page documents how to call libguestfs from the Ruby programming "
24271 "language. This page just documents the differences from the C API and gives"
24272 " some examples. If you are not familiar with using libguestfs, you also "
24273 "need to read L<guestfs(3)>."
24277 #: ../ruby/examples/guestfs-ruby.pod:24
24279 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24280 "This has a single parameter which is the error message (a string)."
24284 #: ../ruby/examples/guestfs-ruby.pod:38
24286 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-"
24287 "java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L"
24288 "<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24292 #: ../sparsify/virt-sparsify.pod:5
24293 msgid "virt-sparsify - Make a virtual machine disk sparse"
24297 #: ../sparsify/virt-sparsify.pod:9
24300 " virt-sparsify [--options] indisk outdisk\n"
24305 #: ../sparsify/virt-sparsify.pod:13
24307 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24308 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24309 "the disk image can be converted back to free space on the host."
24313 #: ../sparsify/virt-sparsify.pod:18
24315 "Virt-sparsify can locate and sparsify free space in most filesystems (eg. "
24316 "ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24320 #: ../sparsify/virt-sparsify.pod:21
24322 "Virt-sparsify can also convert between some disk formats, for example "
24323 "converting a raw disk image to a thin-provisioned qcow2 image."
24327 #: ../sparsify/virt-sparsify.pod:24
24329 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24330 "machines. If a virtual machine has more than one attached disk, you must "
24331 "sparsify each one separately."
24335 #: ../sparsify/virt-sparsify.pod:28
24336 msgid "IMPORTANT LIMITATIONS"
24340 #: ../sparsify/virt-sparsify.pod:34
24342 "Virt-sparsify does not do in-place modifications. It copies from a source "
24343 "image to a destination image, leaving the source unchanged. I<Check that "
24344 "the sparsification was successful before deleting the source image>."
24348 #: ../sparsify/virt-sparsify.pod:41
24349 msgid "The virtual machine I<must be shut down> before using this tool."
24353 #: ../sparsify/virt-sparsify.pod:45
24355 "Virt-sparsify may require up to 2x the virtual size of the source disk image"
24356 " (1 temporary copy + 1 destination image). This is in the worst case and "
24357 "usually much less space is required."
24361 #: ../sparsify/virt-sparsify.pod:51
24363 "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24367 #: ../sparsify/virt-sparsify.pod:56
24368 msgid "Virt-sparsify cannot handle encrypted disks."
24372 #: ../sparsify/virt-sparsify.pod:60
24374 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24375 "this space is often used for critical items like bootloaders so it's not "
24380 #: ../sparsify/virt-sparsify.pod:66
24382 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24383 "to do this unless we can be sure there is no hibernation data, so at the "
24384 "moment swap partitions are ignored."
24388 #: ../sparsify/virt-sparsify.pod:72
24390 "You may also want to read the manual pages for the associated tools L<virt-"
24391 "filesystems(1)> and L<virt-df(1)> before starting."
24395 #: ../sparsify/virt-sparsify.pod:77
24396 msgid "Typical usage is:"
24400 #: ../sparsify/virt-sparsify.pod:79
24403 " virt-sparsify indisk outdisk\n"
24408 #: ../sparsify/virt-sparsify.pod:81
24410 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24411 "is created, or overwritten if it already exists. The format of the input "
24412 "disk is detected (eg. qcow2) and the same format is used for the output "
24417 #: ../sparsify/virt-sparsify.pod:86
24418 msgid "To convert between formats, use the I<--convert> option:"
24422 #: ../sparsify/virt-sparsify.pod:88
24425 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24430 #: ../sparsify/virt-sparsify.pod:90
24432 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24433 "can find within the source disk image. You can get it to ignore (don't zero"
24434 " free space on) certain filesystems by doing:"
24438 #: ../sparsify/virt-sparsify.pod:94
24441 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24446 #: ../sparsify/virt-sparsify.pod:96
24448 "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24452 #: ../sparsify/virt-sparsify.pod:107
24453 msgid "B<--convert> raw"
24457 #: ../sparsify/virt-sparsify.pod:109
24458 msgid "B<--convert> qcow2"
24462 #: ../sparsify/virt-sparsify.pod:111
24463 msgid "B<--convert> [other formats]"
24467 #: ../sparsify/virt-sparsify.pod:113
24469 "Use C<output-format> as the format for the destination image. If this is "
24470 "not specified, then the input format is used."
24474 #: ../sparsify/virt-sparsify.pod:116
24475 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>."
24479 #: ../sparsify/virt-sparsify.pod:118
24481 "You can also use any format supported by the L<qemu-img(1)> program, eg. "
24482 "C<vdi> or C<vmdk>, but support for other formats is reliant on qemu."
24486 #: ../sparsify/virt-sparsify.pod:122
24488 "Specifying the I<--convert> option is usually a good idea, because then "
24489 "virt-sparsify doesn't need to try to guess the input format."
24493 #: ../sparsify/virt-sparsify.pod:127
24494 msgid "B<--format> qcow2"
24498 #: ../sparsify/virt-sparsify.pod:135
24499 msgid "B<--ignore> filesystem"
24503 #: ../sparsify/virt-sparsify.pod:137
24504 msgid "B<--ignore> volgroup"
24508 #: ../sparsify/virt-sparsify.pod:139
24510 "Ignore the named filesystem. Free space on the filesystem will not be "
24511 "zeroed, but existing blocks of zeroes will still be sparsified."
24515 #: ../sparsify/virt-sparsify.pod:142
24517 "In the second form, this ignores the named volume group. Use the volume "
24518 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24522 #: ../sparsify/virt-sparsify.pod:157
24523 msgid "This disables progress bars and other unnecessary output."
24527 #: ../sparsify/virt-sparsify.pod:179
24529 "The I<--machine-readable> option can be used to make the output more machine"
24530 " friendly, which is useful when calling virt-sparsify from other programs, "
24535 #: ../sparsify/virt-sparsify.pod:185
24537 "Firstly use the option on its own to query the capabilities of the virt-"
24538 "sparsify binary. Typical output looks like this:"
24542 #: ../sparsify/virt-sparsify.pod:188
24545 " $ virt-sparsify --machine-readable\n"
24553 #: ../sparsify/virt-sparsify.pod:218
24555 "The calling program should treat messages sent to stderr as error messages."
24556 " In addition, virt-sparsify exits with a non-zero status code if there was "
24561 #: ../sparsify/virt-sparsify.pod:224
24563 "All versions of virt-sparsify have supported the I<--machine-readable> "
24568 #: ../sparsify/virt-sparsify.pod:238
24570 "Location of the temporary directory used for the potentially large temporary"
24575 #: ../sparsify/virt-sparsify.pod:241
24577 "You should ensure there is enough free space in the worst case for a full "
24578 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24579 "to another directory that has enough space."
24583 #: ../sparsify/virt-sparsify.pod:245
24584 msgid "This defaults to C</tmp>."
24588 #: ../sparsify/virt-sparsify.pod:249
24590 "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24594 #: ../sparsify/virt-sparsify.pod:253
24596 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>,"
24597 " L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, L<qemu-"
24598 "img(1)>, L<http://libguestfs.org/>."
24602 #: ../src/guestfs-actions.pod:1
24603 msgid "guestfs_add_cdrom"
24607 #: ../src/guestfs-actions.pod:3
24611 " guestfs_add_cdrom (guestfs_h *g,\n"
24612 " const char *filename);\n"
24617 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302
24618 #: ../src/guestfs-actions.pod:323
24620 "I<This function is deprecated.> In new code, use the "
24621 "L</guestfs_add_drive_opts> call instead."
24625 #: ../src/guestfs-actions.pod:24
24627 "This call checks for the existence of C<filename>. This stops you from "
24628 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24629 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call"
24634 #: ../src/guestfs-actions.pod:31
24636 "If you just want to add an ISO file (often you use this as an efficient way "
24637 "to transfer large files into the guest), then you should probably use "
24638 "C<guestfs_add_drive_ro> instead."
24642 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:187
24643 #: ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:291
24644 #: ../src/guestfs-actions.pod:312 ../src/guestfs-actions.pod:333
24645 #: ../src/guestfs-actions.pod:346 ../src/guestfs-actions.pod:360
24646 #: ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:500
24647 #: ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:559
24648 #: ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:605
24649 #: ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:705
24650 #: ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:734
24651 #: ../src/guestfs-actions.pod:833 ../src/guestfs-actions.pod:851
24652 #: ../src/guestfs-actions.pod:865 ../src/guestfs-actions.pod:879
24653 #: ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:1099
24654 #: ../src/guestfs-actions.pod:1119 ../src/guestfs-actions.pod:1137
24655 #: ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:1286
24656 #: ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:1372
24657 #: ../src/guestfs-actions.pod:1423 ../src/guestfs-actions.pod:1474
24658 #: ../src/guestfs-actions.pod:1530 ../src/guestfs-actions.pod:1582
24659 #: ../src/guestfs-actions.pod:1601 ../src/guestfs-actions.pod:1615
24660 #: ../src/guestfs-actions.pod:1643 ../src/guestfs-actions.pod:1713
24661 #: ../src/guestfs-actions.pod:1744 ../src/guestfs-actions.pod:1769
24662 #: ../src/guestfs-actions.pod:1811 ../src/guestfs-actions.pod:1924
24663 #: ../src/guestfs-actions.pod:1951 ../src/guestfs-actions.pod:2166
24664 #: ../src/guestfs-actions.pod:2188 ../src/guestfs-actions.pod:2275
24665 #: ../src/guestfs-actions.pod:2783 ../src/guestfs-actions.pod:2927
24666 #: ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3023
24667 #: ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4095
24668 #: ../src/guestfs-actions.pod:4120 ../src/guestfs-actions.pod:4309
24669 #: ../src/guestfs-actions.pod:4323 ../src/guestfs-actions.pod:4336
24670 #: ../src/guestfs-actions.pod:4350 ../src/guestfs-actions.pod:4365
24671 #: ../src/guestfs-actions.pod:4401 ../src/guestfs-actions.pod:4473
24672 #: ../src/guestfs-actions.pod:4493 ../src/guestfs-actions.pod:4510
24673 #: ../src/guestfs-actions.pod:4533 ../src/guestfs-actions.pod:4556
24674 #: ../src/guestfs-actions.pod:4591 ../src/guestfs-actions.pod:4610
24675 #: ../src/guestfs-actions.pod:4629 ../src/guestfs-actions.pod:4664
24676 #: ../src/guestfs-actions.pod:4676 ../src/guestfs-actions.pod:4712
24677 #: ../src/guestfs-actions.pod:4728 ../src/guestfs-actions.pod:4741
24678 #: ../src/guestfs-actions.pod:4756 ../src/guestfs-actions.pod:4773
24679 #: ../src/guestfs-actions.pod:4866 ../src/guestfs-actions.pod:4886
24680 #: ../src/guestfs-actions.pod:4899 ../src/guestfs-actions.pod:4950
24681 #: ../src/guestfs-actions.pod:4968 ../src/guestfs-actions.pod:4986
24682 #: ../src/guestfs-actions.pod:5002 ../src/guestfs-actions.pod:5016
24683 #: ../src/guestfs-actions.pod:5030 ../src/guestfs-actions.pod:5047
24684 #: ../src/guestfs-actions.pod:5062 ../src/guestfs-actions.pod:5089
24685 #: ../src/guestfs-actions.pod:5152 ../src/guestfs-actions.pod:5225
24686 #: ../src/guestfs-actions.pod:5256 ../src/guestfs-actions.pod:5275
24687 #: ../src/guestfs-actions.pod:5294 ../src/guestfs-actions.pod:5306
24688 #: ../src/guestfs-actions.pod:5323 ../src/guestfs-actions.pod:5336
24689 #: ../src/guestfs-actions.pod:5351 ../src/guestfs-actions.pod:5366
24690 #: ../src/guestfs-actions.pod:5398 ../src/guestfs-actions.pod:5424
24691 #: ../src/guestfs-actions.pod:5463 ../src/guestfs-actions.pod:5483
24692 #: ../src/guestfs-actions.pod:5497 ../src/guestfs-actions.pod:5514
24693 #: ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:5616
24694 #: ../src/guestfs-actions.pod:5663 ../src/guestfs-actions.pod:5706
24695 #: ../src/guestfs-actions.pod:5734 ../src/guestfs-actions.pod:5751
24696 #: ../src/guestfs-actions.pod:5769 ../src/guestfs-actions.pod:5909
24697 #: ../src/guestfs-actions.pod:5966 ../src/guestfs-actions.pod:5988
24698 #: ../src/guestfs-actions.pod:6006 ../src/guestfs-actions.pod:6056
24699 #: ../src/guestfs-actions.pod:6122 ../src/guestfs-actions.pod:6139
24700 #: ../src/guestfs-actions.pod:6152 ../src/guestfs-actions.pod:6166
24701 #: ../src/guestfs-actions.pod:6455 ../src/guestfs-actions.pod:6474
24702 #: ../src/guestfs-actions.pod:6493 ../src/guestfs-actions.pod:6507
24703 #: ../src/guestfs-actions.pod:6519 ../src/guestfs-actions.pod:6533
24704 #: ../src/guestfs-actions.pod:6545 ../src/guestfs-actions.pod:6559
24705 #: ../src/guestfs-actions.pod:6575 ../src/guestfs-actions.pod:6596
24706 #: ../src/guestfs-actions.pod:6615 ../src/guestfs-actions.pod:6634
24707 #: ../src/guestfs-actions.pod:6664 ../src/guestfs-actions.pod:6682
24708 #: ../src/guestfs-actions.pod:6705 ../src/guestfs-actions.pod:6723
24709 #: ../src/guestfs-actions.pod:6742 ../src/guestfs-actions.pod:6763
24710 #: ../src/guestfs-actions.pod:6782 ../src/guestfs-actions.pod:6799
24711 #: ../src/guestfs-actions.pod:6818 ../src/guestfs-actions.pod:6846
24712 #: ../src/guestfs-actions.pod:6870 ../src/guestfs-actions.pod:6889
24713 #: ../src/guestfs-actions.pod:6905 ../src/guestfs-actions.pod:6929
24714 #: ../src/guestfs-actions.pod:6948 ../src/guestfs-actions.pod:6963
24715 #: ../src/guestfs-actions.pod:6982 ../src/guestfs-actions.pod:7026
24716 #: ../src/guestfs-actions.pod:7056 ../src/guestfs-actions.pod:7089
24717 #: ../src/guestfs-actions.pod:7204 ../src/guestfs-actions.pod:7325
24718 #: ../src/guestfs-actions.pod:7337 ../src/guestfs-actions.pod:7350
24719 #: ../src/guestfs-actions.pod:7363 ../src/guestfs-actions.pod:7385
24720 #: ../src/guestfs-actions.pod:7398 ../src/guestfs-actions.pod:7411
24721 #: ../src/guestfs-actions.pod:7424 ../src/guestfs-actions.pod:7439
24722 #: ../src/guestfs-actions.pod:7498 ../src/guestfs-actions.pod:7515
24723 #: ../src/guestfs-actions.pod:7531 ../src/guestfs-actions.pod:7547
24724 #: ../src/guestfs-actions.pod:7564 ../src/guestfs-actions.pod:7577
24725 #: ../src/guestfs-actions.pod:7597 ../src/guestfs-actions.pod:7633
24726 #: ../src/guestfs-actions.pod:7647 ../src/guestfs-actions.pod:7688
24727 #: ../src/guestfs-actions.pod:7701 ../src/guestfs-actions.pod:7719
24728 #: ../src/guestfs-actions.pod:7753 ../src/guestfs-actions.pod:7789
24729 #: ../src/guestfs-actions.pod:7905 ../src/guestfs-actions.pod:7920
24730 #: ../src/guestfs-actions.pod:7934 ../src/guestfs-actions.pod:7989
24731 #: ../src/guestfs-actions.pod:8002 ../src/guestfs-actions.pod:8047
24732 #: ../src/guestfs-actions.pod:8087 ../src/guestfs-actions.pod:8143
24733 #: ../src/guestfs-actions.pod:8163 ../src/guestfs-actions.pod:8196
24734 #: ../src/guestfs-actions.pod:8260 ../src/guestfs-actions.pod:8283
24735 #: ../src/guestfs-actions.pod:8312
24736 msgid "This function returns 0 on success or -1 on error."
24740 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189
24741 #: ../src/guestfs-actions.pod:1334 ../src/guestfs-actions.pod:2389
24742 #: ../src/guestfs-actions.pod:2487 ../src/guestfs-actions.pod:2612
24743 #: ../src/guestfs-actions.pod:4082 ../src/guestfs-actions.pod:4102
24744 #: ../src/guestfs-actions.pod:5400 ../src/guestfs-actions.pod:6684
24745 #: ../src/guestfs-actions.pod:6801 ../src/guestfs-actions.pod:6950
24746 #: ../src/guestfs-actions.pod:7441 ../src/guestfs-actions.pod:7566
24747 #: ../src/guestfs-actions.pod:8089
24748 msgid "(Added in 0.3)"
24752 #: ../src/guestfs-actions.pod:41
24753 msgid "guestfs_add_domain"
24757 #: ../src/guestfs-actions.pod:43
24761 " guestfs_add_domain (guestfs_h *g,\n"
24762 " const char *dom,\n"
24768 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198
24769 #: ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:1214
24770 #: ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1344
24771 #: ../src/guestfs-actions.pod:1411 ../src/guestfs-actions.pod:1462
24772 #: ../src/guestfs-actions.pod:1513 ../src/guestfs-actions.pod:3280
24773 #: ../src/guestfs-actions.pod:5101 ../src/guestfs-actions.pod:5410
24774 #: ../src/guestfs-actions.pod:5627
24776 "You may supply a list of optional arguments to this call. Use zero or more "
24777 "of the following pairs of parameters, and terminate the list with C<-1> on "
24778 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
24782 #: ../src/guestfs-actions.pod:53
24785 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
24786 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
24787 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
24788 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
24789 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
24790 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
24795 #: ../src/guestfs-actions.pod:60
24797 "This function adds the disk(s) attached to the named libvirt domain C<dom>."
24798 " It works by connecting to libvirt, requesting the domain and domain XML "
24799 "from libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on"
24804 #: ../src/guestfs-actions.pod:141
24806 "The other optional parameters are passed directly through to "
24807 "C<guestfs_add_drive_opts>."
24811 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403
24812 #: ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:751
24813 #: ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800
24814 #: ../src/guestfs-actions.pod:819 ../src/guestfs-actions.pod:1789
24815 #: ../src/guestfs-actions.pod:2145 ../src/guestfs-actions.pod:2348
24816 #: ../src/guestfs-actions.pod:2459 ../src/guestfs-actions.pod:2510
24817 #: ../src/guestfs-actions.pod:2562 ../src/guestfs-actions.pod:2576
24818 #: ../src/guestfs-actions.pod:2599 ../src/guestfs-actions.pod:2914
24819 #: ../src/guestfs-actions.pod:3398 ../src/guestfs-actions.pod:3416
24820 #: ../src/guestfs-actions.pod:5586 ../src/guestfs-actions.pod:5806
24821 #: ../src/guestfs-actions.pod:6044 ../src/guestfs-actions.pod:6236
24822 #: ../src/guestfs-actions.pod:6262 ../src/guestfs-actions.pod:7674
24823 #: ../src/guestfs-actions.pod:8100 ../src/guestfs-actions.pod:8113
24824 #: ../src/guestfs-actions.pod:8126
24825 msgid "On error this function returns -1."
24829 #: ../src/guestfs-actions.pod:146
24830 msgid "(Added in 1.7.4)"
24834 #: ../src/guestfs-actions.pod:148
24835 msgid "guestfs_add_domain_va"
24839 #: ../src/guestfs-actions.pod:150
24843 " guestfs_add_domain_va (guestfs_h *g,\n"
24844 " const char *dom,\n"
24845 " va_list args);\n"
24850 #: ../src/guestfs-actions.pod:155
24851 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
24855 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168
24856 #: ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278
24857 #: ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:940
24858 #: ../src/guestfs-actions.pod:1242 ../src/guestfs-actions.pod:1255
24859 #: ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1314
24860 #: ../src/guestfs-actions.pod:1389 ../src/guestfs-actions.pod:1401
24861 #: ../src/guestfs-actions.pod:1440 ../src/guestfs-actions.pod:1452
24862 #: ../src/guestfs-actions.pod:1491 ../src/guestfs-actions.pod:1503
24863 #: ../src/guestfs-actions.pod:1547 ../src/guestfs-actions.pod:1559
24864 #: ../src/guestfs-actions.pod:3364 ../src/guestfs-actions.pod:3376
24865 #: ../src/guestfs-actions.pod:5166 ../src/guestfs-actions.pod:5178
24866 #: ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5450
24867 #: ../src/guestfs-actions.pod:5676 ../src/guestfs-actions.pod:5687
24868 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
24872 #: ../src/guestfs-actions.pod:159
24873 msgid "guestfs_add_domain_argv"
24877 #: ../src/guestfs-actions.pod:161
24881 " guestfs_add_domain_argv (guestfs_h *g,\n"
24882 " const char *dom,\n"
24883 " const struct guestfs_add_domain_argv *optargs);\n"
24888 #: ../src/guestfs-actions.pod:166
24889 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
24893 #: ../src/guestfs-actions.pod:170
24894 msgid "guestfs_add_drive"
24898 #: ../src/guestfs-actions.pod:172
24902 " guestfs_add_drive (guestfs_h *g,\n"
24903 " const char *filename);\n"
24908 #: ../src/guestfs-actions.pod:176
24910 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no"
24911 " optional parameters, so the disk is added writable, with the format being "
24912 "detected automatically."
24916 #: ../src/guestfs-actions.pod:180
24918 "Automatic detection of the format opens you up to a potential security hole "
24919 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24920 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24921 "you should think about replacing calls to this function with calls to "
24922 "C<guestfs_add_drive_opts>, and specifying the format."
24926 #: ../src/guestfs-actions.pod:191
24927 msgid "guestfs_add_drive_opts"
24931 #: ../src/guestfs-actions.pod:193
24935 " guestfs_add_drive_opts (guestfs_h *g,\n"
24936 " const char *filename,\n"
24942 #: ../src/guestfs-actions.pod:203
24945 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
24946 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
24947 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
24948 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
24953 #: ../src/guestfs-actions.pod:233
24955 "This forces the image format. If you omit this (or use C<guestfs_add_drive>"
24956 " or C<guestfs_add_drive_ro>) then the format is automatically detected. "
24957 "Possible formats include C<raw> and C<qcow2>."
24961 #: ../src/guestfs-actions.pod:244
24963 "This rarely-used option lets you emulate the behaviour of the deprecated "
24964 "C<guestfs_add_drive_with_if> call (q.v.)"
24968 #: ../src/guestfs-actions.pod:256
24969 msgid "(Added in 1.5.23)"
24973 #: ../src/guestfs-actions.pod:258
24974 msgid "guestfs_add_drive_opts_va"
24978 #: ../src/guestfs-actions.pod:260
24982 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
24983 " const char *filename,\n"
24984 " va_list args);\n"
24989 #: ../src/guestfs-actions.pod:265
24990 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
24994 #: ../src/guestfs-actions.pod:269
24995 msgid "guestfs_add_drive_opts_argv"
24999 #: ../src/guestfs-actions.pod:271
25003 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
25004 " const char *filename,\n"
25005 " const struct guestfs_add_drive_opts_argv *optargs);\n"
25010 #: ../src/guestfs-actions.pod:276
25011 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
25015 #: ../src/guestfs-actions.pod:280
25016 msgid "guestfs_add_drive_ro"
25020 #: ../src/guestfs-actions.pod:282
25024 " guestfs_add_drive_ro (guestfs_h *g,\n"
25025 " const char *filename);\n"
25030 #: ../src/guestfs-actions.pod:286
25032 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
25033 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
25034 "disk is added read-only, with the format being detected automatically."
25038 #: ../src/guestfs-actions.pod:293
25039 msgid "(Added in 1.0.38)"
25043 #: ../src/guestfs-actions.pod:295
25044 msgid "guestfs_add_drive_ro_with_if"
25048 #: ../src/guestfs-actions.pod:297
25052 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
25053 " const char *filename,\n"
25054 " const char *iface);\n"
25059 #: ../src/guestfs-actions.pod:309
25061 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the"
25062 " QEMU interface emulation to use at run time."
25066 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335
25067 #: ../src/guestfs-actions.pod:2873
25068 msgid "(Added in 1.0.84)"
25072 #: ../src/guestfs-actions.pod:316
25073 msgid "guestfs_add_drive_with_if"
25077 #: ../src/guestfs-actions.pod:318
25081 " guestfs_add_drive_with_if (guestfs_h *g,\n"
25082 " const char *filename,\n"
25083 " const char *iface);\n"
25088 #: ../src/guestfs-actions.pod:330
25090 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
25091 "QEMU interface emulation to use at run time."
25095 #: ../src/guestfs-actions.pod:337
25096 msgid "guestfs_aug_clear"
25100 #: ../src/guestfs-actions.pod:339
25104 " guestfs_aug_clear (guestfs_h *g,\n"
25105 " const char *augpath);\n"
25110 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2601
25111 msgid "(Added in 1.3.4)"
25115 #: ../src/guestfs-actions.pod:350
25116 msgid "guestfs_aug_close"
25120 #: ../src/guestfs-actions.pod:352
25124 " guestfs_aug_close (guestfs_h *g);\n"
25129 #: ../src/guestfs-actions.pod:355
25131 "Close the current Augeas handle and free up any resources used by it. After"
25132 " calling this, you have to call C<guestfs_aug_init> again before you can use"
25133 " any other Augeas functions."
25137 #: ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:387
25138 #: ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:419
25139 #: ../src/guestfs-actions.pod:482 ../src/guestfs-actions.pod:502
25140 #: ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:547
25141 #: ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:575
25142 #: ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:607
25143 #: ../src/guestfs-actions.pod:6313
25144 msgid "(Added in 0.7)"
25148 #: ../src/guestfs-actions.pod:364
25149 msgid "guestfs_aug_defnode"
25153 #: ../src/guestfs-actions.pod:366
25156 " struct guestfs_int_bool *\n"
25157 " guestfs_aug_defnode (guestfs_h *g,\n"
25158 " const char *name,\n"
25159 " const char *expr,\n"
25160 " const char *val);\n"
25165 #: ../src/guestfs-actions.pod:375
25167 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25168 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25169 "containing that single node."
25173 #: ../src/guestfs-actions.pod:383
25175 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25176 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25180 #: ../src/guestfs-actions.pod:389
25181 msgid "guestfs_aug_defvar"
25185 #: ../src/guestfs-actions.pod:391
25189 " guestfs_aug_defvar (guestfs_h *g,\n"
25190 " const char *name,\n"
25191 " const char *expr);\n"
25196 #: ../src/guestfs-actions.pod:407
25197 msgid "guestfs_aug_get"
25201 #: ../src/guestfs-actions.pod:409
25205 " guestfs_aug_get (guestfs_h *g,\n"
25206 " const char *augpath);\n"
25211 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:980
25212 #: ../src/guestfs-actions.pod:998 ../src/guestfs-actions.pod:1058
25213 #: ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1177
25214 #: ../src/guestfs-actions.pod:1658 ../src/guestfs-actions.pod:1675
25215 #: ../src/guestfs-actions.pod:1694 ../src/guestfs-actions.pod:1828
25216 #: ../src/guestfs-actions.pod:2016 ../src/guestfs-actions.pod:2128
25217 #: ../src/guestfs-actions.pod:2291 ../src/guestfs-actions.pod:2308
25218 #: ../src/guestfs-actions.pod:2375 ../src/guestfs-actions.pod:2418
25219 #: ../src/guestfs-actions.pod:2439 ../src/guestfs-actions.pod:2624
25220 #: ../src/guestfs-actions.pod:2838 ../src/guestfs-actions.pod:3042
25221 #: ../src/guestfs-actions.pod:3144 ../src/guestfs-actions.pod:3248
25222 #: ../src/guestfs-actions.pod:3267 ../src/guestfs-actions.pod:3482
25223 #: ../src/guestfs-actions.pod:3510 ../src/guestfs-actions.pod:3531
25224 #: ../src/guestfs-actions.pod:3565 ../src/guestfs-actions.pod:3628
25225 #: ../src/guestfs-actions.pod:3648 ../src/guestfs-actions.pod:3668
25226 #: ../src/guestfs-actions.pod:4295 ../src/guestfs-actions.pod:4648
25227 #: ../src/guestfs-actions.pod:4818 ../src/guestfs-actions.pod:4928
25228 #: ../src/guestfs-actions.pod:5824 ../src/guestfs-actions.pod:6025
25229 #: ../src/guestfs-actions.pod:6211 ../src/guestfs-actions.pod:6389
25230 #: ../src/guestfs-actions.pod:6438 ../src/guestfs-actions.pod:7110
25231 #: ../src/guestfs-actions.pod:7126 ../src/guestfs-actions.pod:7150
25232 #: ../src/guestfs-actions.pod:7174 ../src/guestfs-actions.pod:7848
25233 #: ../src/guestfs-actions.pod:7867 ../src/guestfs-actions.pod:7885
25234 #: ../src/guestfs-actions.pod:8059 ../src/guestfs-actions.pod:8376
25236 "This function returns a string, or NULL on error. I<The caller must free "
25237 "the returned string after use>."
25241 #: ../src/guestfs-actions.pod:421
25242 msgid "guestfs_aug_init"
25246 #: ../src/guestfs-actions.pod:423
25250 " guestfs_aug_init (guestfs_h *g,\n"
25251 " const char *root,\n"
25257 #: ../src/guestfs-actions.pod:432
25258 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25262 #: ../src/guestfs-actions.pod:457
25264 "This option is only useful when debugging Augeas lenses. Use of this option"
25265 " may require additional memory for the libguestfs appliance. You may need "
25266 "to set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25267 "C<guestfs_set_memsize>."
25271 #: ../src/guestfs-actions.pod:472
25272 msgid "Do not load the tree in C<guestfs_aug_init>."
25276 #: ../src/guestfs-actions.pod:476
25277 msgid "To close the handle, you can call C<guestfs_aug_close>."
25281 #: ../src/guestfs-actions.pod:484
25282 msgid "guestfs_aug_insert"
25286 #: ../src/guestfs-actions.pod:486
25290 " guestfs_aug_insert (guestfs_h *g,\n"
25291 " const char *augpath,\n"
25292 " const char *label,\n"
25298 #: ../src/guestfs-actions.pod:504
25299 msgid "guestfs_aug_load"
25303 #: ../src/guestfs-actions.pod:506
25307 " guestfs_aug_load (guestfs_h *g);\n"
25312 #: ../src/guestfs-actions.pod:518
25313 msgid "guestfs_aug_ls"
25317 #: ../src/guestfs-actions.pod:520
25321 " guestfs_aug_ls (guestfs_h *g,\n"
25322 " const char *augpath);\n"
25327 #: ../src/guestfs-actions.pod:524
25329 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25330 "sorting the resulting nodes into alphabetical order."
25334 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543
25335 #: ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1196
25336 #: ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:1862
25337 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:1984
25338 #: ../src/guestfs-actions.pod:2230 ../src/guestfs-actions.pod:2696
25339 #: ../src/guestfs-actions.pod:2712 ../src/guestfs-actions.pod:2731
25340 #: ../src/guestfs-actions.pod:2796 ../src/guestfs-actions.pod:2820
25341 #: ../src/guestfs-actions.pod:2891 ../src/guestfs-actions.pod:2940
25342 #: ../src/guestfs-actions.pod:3209 ../src/guestfs-actions.pod:3584
25343 #: ../src/guestfs-actions.pod:3864 ../src/guestfs-actions.pod:4178
25344 #: ../src/guestfs-actions.pod:4195 ../src/guestfs-actions.pod:4215
25345 #: ../src/guestfs-actions.pod:4277 ../src/guestfs-actions.pod:4382
25346 #: ../src/guestfs-actions.pod:4790 ../src/guestfs-actions.pod:5547
25347 #: ../src/guestfs-actions.pod:6183 ../src/guestfs-actions.pod:6309
25348 #: ../src/guestfs-actions.pod:6423 ../src/guestfs-actions.pod:7190
25349 #: ../src/guestfs-actions.pod:7251 ../src/guestfs-actions.pod:7306
25350 #: ../src/guestfs-actions.pod:7452 ../src/guestfs-actions.pod:7476
25351 #: ../src/guestfs-actions.pod:7952 ../src/guestfs-actions.pod:7972
25352 #: ../src/guestfs-actions.pod:8019 ../src/guestfs-actions.pod:8213
25353 #: ../src/guestfs-actions.pod:8232 ../src/guestfs-actions.pod:8326
25354 #: ../src/guestfs-actions.pod:8345 ../src/guestfs-actions.pod:8391
25355 #: ../src/guestfs-actions.pod:8410
25357 "This function returns a NULL-terminated array of strings (like "
25358 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
25359 "strings and the array after use>."
25363 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1121
25364 #: ../src/guestfs-actions.pod:1139 ../src/guestfs-actions.pod:1900
25365 #: ../src/guestfs-actions.pod:3942 ../src/guestfs-actions.pod:3973
25366 #: ../src/guestfs-actions.pod:4631 ../src/guestfs-actions.pod:4681
25367 #: ../src/guestfs-actions.pod:4868 ../src/guestfs-actions.pod:4901
25368 #: ../src/guestfs-actions.pod:5064 ../src/guestfs-actions.pod:5551
25369 #: ../src/guestfs-actions.pod:6124 ../src/guestfs-actions.pod:6521
25370 #: ../src/guestfs-actions.pod:6535 ../src/guestfs-actions.pod:6547
25371 #: ../src/guestfs-actions.pod:7031 ../src/guestfs-actions.pod:7690
25372 #: ../src/guestfs-actions.pod:7703 ../src/guestfs-actions.pod:7936
25373 #: ../src/guestfs-actions.pod:8201
25374 msgid "(Added in 0.8)"
25378 #: ../src/guestfs-actions.pod:533
25379 msgid "guestfs_aug_match"
25383 #: ../src/guestfs-actions.pod:535
25387 " guestfs_aug_match (guestfs_h *g,\n"
25388 " const char *augpath);\n"
25393 #: ../src/guestfs-actions.pod:549
25394 msgid "guestfs_aug_mv"
25398 #: ../src/guestfs-actions.pod:551
25402 " guestfs_aug_mv (guestfs_h *g,\n"
25403 " const char *src,\n"
25404 " const char *dest);\n"
25409 #: ../src/guestfs-actions.pod:563
25410 msgid "guestfs_aug_rm"
25414 #: ../src/guestfs-actions.pod:565
25418 " guestfs_aug_rm (guestfs_h *g,\n"
25419 " const char *augpath);\n"
25424 #: ../src/guestfs-actions.pod:577
25425 msgid "guestfs_aug_save"
25429 #: ../src/guestfs-actions.pod:579
25433 " guestfs_aug_save (guestfs_h *g);\n"
25438 #: ../src/guestfs-actions.pod:584
25440 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25445 #: ../src/guestfs-actions.pod:591
25446 msgid "guestfs_aug_set"
25450 #: ../src/guestfs-actions.pod:593
25454 " guestfs_aug_set (guestfs_h *g,\n"
25455 " const char *augpath,\n"
25456 " const char *val);\n"
25461 #: ../src/guestfs-actions.pod:600
25463 "In the Augeas API, it is possible to clear a node by setting the value to "
25464 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25465 "this call. Instead you must use the C<guestfs_aug_clear> call."
25469 #: ../src/guestfs-actions.pod:609
25470 msgid "guestfs_available"
25474 #: ../src/guestfs-actions.pod:611
25478 " guestfs_available (guestfs_h *g,\n"
25479 " char *const *groups);\n"
25484 #: ../src/guestfs-actions.pod:619
25486 "The libguestfs groups, and the functions that those groups correspond to, "
25487 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25488 "runtime by calling C<guestfs_available_all_groups>."
25492 #: ../src/guestfs-actions.pod:643
25493 msgid "You must call C<guestfs_launch> before calling this function."
25497 #: ../src/guestfs-actions.pod:665
25499 "This call was added in version C<1.0.80>. In previous versions of "
25500 "libguestfs all you could do would be to speculatively execute a command to "
25501 "find out if the daemon implemented it. See also C<guestfs_version>."
25505 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1645
25506 msgid "(Added in 1.0.80)"
25510 #: ../src/guestfs-actions.pod:676
25511 msgid "guestfs_available_all_groups"
25515 #: ../src/guestfs-actions.pod:678
25519 " guestfs_available_all_groups (guestfs_h *g);\n"
25524 #: ../src/guestfs-actions.pod:681
25526 "This command returns a list of all optional groups that this daemon knows "
25527 "about. Note this returns both supported and unsupported groups. To find "
25528 "out which ones the daemon can actually support you have to call "
25529 "C<guestfs_available> on each member of the returned list."
25533 #: ../src/guestfs-actions.pod:687
25534 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25538 #: ../src/guestfs-actions.pod:693
25539 msgid "(Added in 1.3.15)"
25543 #: ../src/guestfs-actions.pod:695
25544 msgid "guestfs_base64_in"
25548 #: ../src/guestfs-actions.pod:697
25552 " guestfs_base64_in (guestfs_h *g,\n"
25553 " const char *base64file,\n"
25554 " const char *filename);\n"
25559 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25560 msgid "(Added in 1.3.5)"
25564 #: ../src/guestfs-actions.pod:709
25565 msgid "guestfs_base64_out"
25569 #: ../src/guestfs-actions.pod:711
25573 " guestfs_base64_out (guestfs_h *g,\n"
25574 " const char *filename,\n"
25575 " const char *base64file);\n"
25580 #: ../src/guestfs-actions.pod:723
25581 msgid "guestfs_blockdev_flushbufs"
25585 #: ../src/guestfs-actions.pod:725
25589 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25590 " const char *device);\n"
25595 #: ../src/guestfs-actions.pod:736 ../src/guestfs-actions.pod:753
25596 #: ../src/guestfs-actions.pod:768 ../src/guestfs-actions.pod:784
25597 #: ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:821
25598 #: ../src/guestfs-actions.pod:835 ../src/guestfs-actions.pod:853
25599 #: ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:881
25600 msgid "(Added in 0.9.3)"
25604 #: ../src/guestfs-actions.pod:738
25605 msgid "guestfs_blockdev_getbsz"
25609 #: ../src/guestfs-actions.pod:740
25613 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25614 " const char *device);\n"
25619 #: ../src/guestfs-actions.pod:755
25620 msgid "guestfs_blockdev_getro"
25624 #: ../src/guestfs-actions.pod:757
25628 " guestfs_blockdev_getro (guestfs_h *g,\n"
25629 " const char *device);\n"
25634 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1883
25635 #: ../src/guestfs-actions.pod:1898 ../src/guestfs-actions.pod:2387
25636 #: ../src/guestfs-actions.pod:2398 ../src/guestfs-actions.pod:2470
25637 #: ../src/guestfs-actions.pod:2496 ../src/guestfs-actions.pod:2536
25638 #: ../src/guestfs-actions.pod:2551 ../src/guestfs-actions.pod:2587
25639 #: ../src/guestfs-actions.pod:2610 ../src/guestfs-actions.pod:3685
25640 #: ../src/guestfs-actions.pod:3701 ../src/guestfs-actions.pod:3719
25641 #: ../src/guestfs-actions.pod:3881 ../src/guestfs-actions.pod:3895
25642 #: ../src/guestfs-actions.pod:3910 ../src/guestfs-actions.pod:3924
25643 #: ../src/guestfs-actions.pod:3940 ../src/guestfs-actions.pod:3955
25644 #: ../src/guestfs-actions.pod:3971 ../src/guestfs-actions.pod:3985
25645 #: ../src/guestfs-actions.pod:3998 ../src/guestfs-actions.pod:4012
25646 #: ../src/guestfs-actions.pod:4027 ../src/guestfs-actions.pod:4042
25647 #: ../src/guestfs-actions.pod:4055 ../src/guestfs-actions.pod:4069
25648 #: ../src/guestfs-actions.pod:5788
25649 msgid "This function returns a C truth value on success or -1 on error."
25653 #: ../src/guestfs-actions.pod:770
25654 msgid "guestfs_blockdev_getsize64"
25658 #: ../src/guestfs-actions.pod:772
25662 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25663 " const char *device);\n"
25668 #: ../src/guestfs-actions.pod:778
25669 msgid "See also C<guestfs_blockdev_getsz>."
25673 #: ../src/guestfs-actions.pod:786
25674 msgid "guestfs_blockdev_getss"
25678 #: ../src/guestfs-actions.pod:788
25682 " guestfs_blockdev_getss (guestfs_h *g,\n"
25683 " const char *device);\n"
25688 #: ../src/guestfs-actions.pod:795
25690 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25695 #: ../src/guestfs-actions.pod:804
25696 msgid "guestfs_blockdev_getsz"
25700 #: ../src/guestfs-actions.pod:806
25704 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25705 " const char *device);\n"
25710 #: ../src/guestfs-actions.pod:813
25712 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25713 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25717 #: ../src/guestfs-actions.pod:823
25718 msgid "guestfs_blockdev_rereadpt"
25722 #: ../src/guestfs-actions.pod:825
25726 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25727 " const char *device);\n"
25732 #: ../src/guestfs-actions.pod:837
25733 msgid "guestfs_blockdev_setbsz"
25737 #: ../src/guestfs-actions.pod:839
25741 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25742 " const char *device,\n"
25743 " int blocksize);\n"
25748 #: ../src/guestfs-actions.pod:855
25749 msgid "guestfs_blockdev_setro"
25753 #: ../src/guestfs-actions.pod:857
25757 " guestfs_blockdev_setro (guestfs_h *g,\n"
25758 " const char *device);\n"
25763 #: ../src/guestfs-actions.pod:869
25764 msgid "guestfs_blockdev_setrw"
25768 #: ../src/guestfs-actions.pod:871
25772 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25773 " const char *device);\n"
25778 #: ../src/guestfs-actions.pod:883
25779 msgid "guestfs_btrfs_filesystem_resize"
25783 #: ../src/guestfs-actions.pod:885
25787 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25788 " const char *mountpoint,\n"
25794 #: ../src/guestfs-actions.pod:895
25797 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25802 #: ../src/guestfs-actions.pod:918
25803 msgid "(Added in 1.11.17)"
25807 #: ../src/guestfs-actions.pod:920
25808 msgid "guestfs_btrfs_filesystem_resize_va"
25812 #: ../src/guestfs-actions.pod:922
25816 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
25817 " const char *mountpoint,\n"
25818 " va_list args);\n"
25823 #: ../src/guestfs-actions.pod:927
25824 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
25828 #: ../src/guestfs-actions.pod:931
25829 msgid "guestfs_btrfs_filesystem_resize_argv"
25833 #: ../src/guestfs-actions.pod:933
25837 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
25838 " const char *mountpoint,\n"
25839 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
25844 #: ../src/guestfs-actions.pod:938
25845 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
25849 #: ../src/guestfs-actions.pod:942
25850 msgid "guestfs_case_sensitive_path"
25854 #: ../src/guestfs-actions.pod:944
25858 " guestfs_case_sensitive_path (guestfs_h *g,\n"
25859 " const char *path);\n"
25864 #: ../src/guestfs-actions.pod:970
25866 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
25867 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
25868 "how the directories were originally created under Windows)."
25872 #: ../src/guestfs-actions.pod:978
25873 msgid "See also C<guestfs_realpath>."
25877 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:7870
25878 msgid "(Added in 1.0.75)"
25882 #: ../src/guestfs-actions.pod:985
25883 msgid "guestfs_cat"
25887 #: ../src/guestfs-actions.pod:987
25891 " guestfs_cat (guestfs_h *g,\n"
25892 " const char *path);\n"
25897 #: ../src/guestfs-actions.pod:993
25899 "Note that this function cannot correctly handle binary files (specifically, "
25900 "files containing C<\\0> character which is treated as end of string). For "
25901 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
25902 "functions which have a more complex interface."
25906 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4199
25907 #: ../src/guestfs-actions.pod:4281 ../src/guestfs-actions.pod:4298
25908 #: ../src/guestfs-actions.pod:4386 ../src/guestfs-actions.pod:4794
25909 #: ../src/guestfs-actions.pod:4808 ../src/guestfs-actions.pod:6187
25910 #: ../src/guestfs-actions.pod:6201 ../src/guestfs-actions.pod:8023
25911 #: ../src/guestfs-actions.pod:8037
25912 msgid "(Added in 0.4)"
25916 #: ../src/guestfs-actions.pod:1006
25917 msgid "guestfs_checksum"
25921 #: ../src/guestfs-actions.pod:1008
25925 " guestfs_checksum (guestfs_h *g,\n"
25926 " const char *csumtype,\n"
25927 " const char *path);\n"
25932 #: ../src/guestfs-actions.pod:1054
25933 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
25937 #: ../src/guestfs-actions.pod:1056
25938 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
25942 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1720
25943 #: ../src/guestfs-actions.pod:2578 ../src/guestfs-actions.pod:3897
25944 #: ../src/guestfs-actions.pod:3926 ../src/guestfs-actions.pod:3987
25945 #: ../src/guestfs-actions.pod:4014 ../src/guestfs-actions.pod:7726
25946 msgid "(Added in 1.0.2)"
25950 #: ../src/guestfs-actions.pod:1063
25951 msgid "guestfs_checksum_device"
25955 #: ../src/guestfs-actions.pod:1065
25959 " guestfs_checksum_device (guestfs_h *g,\n"
25960 " const char *csumtype,\n"
25961 " const char *device);\n"
25966 #: ../src/guestfs-actions.pod:1070
25968 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25969 "device named C<device>. For the types of checksums supported see the "
25970 "C<guestfs_checksum> command."
25974 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5618
25975 #: ../src/guestfs-actions.pod:5753 ../src/guestfs-actions.pod:5790
25976 #: ../src/guestfs-actions.pod:5808 ../src/guestfs-actions.pod:5990
25977 #: ../src/guestfs-actions.pod:7635 ../src/guestfs-actions.pod:7649
25978 #: ../src/guestfs-actions.pod:8049
25979 msgid "(Added in 1.3.2)"
25983 #: ../src/guestfs-actions.pod:1079
25984 msgid "guestfs_checksums_out"
25988 #: ../src/guestfs-actions.pod:1081
25992 " guestfs_checksums_out (guestfs_h *g,\n"
25993 " const char *csumtype,\n"
25994 " const char *directory,\n"
25995 " const char *sumsfile);\n"
26000 #: ../src/guestfs-actions.pod:1101
26001 msgid "(Added in 1.3.7)"
26005 #: ../src/guestfs-actions.pod:1103
26006 msgid "guestfs_chmod"
26010 #: ../src/guestfs-actions.pod:1105
26014 " guestfs_chmod (guestfs_h *g,\n"
26016 " const char *path);\n"
26021 #: ../src/guestfs-actions.pod:1123
26022 msgid "guestfs_chown"
26026 #: ../src/guestfs-actions.pod:1125
26030 " guestfs_chown (guestfs_h *g,\n"
26033 " const char *path);\n"
26038 #: ../src/guestfs-actions.pod:1141
26039 msgid "guestfs_command"
26043 #: ../src/guestfs-actions.pod:1143
26047 " guestfs_command (guestfs_h *g,\n"
26048 " char *const *arguments);\n"
26053 #: ../src/guestfs-actions.pod:1152
26055 "The single parameter is an argv-style list of arguments. The first element "
26056 "is the name of the program to run. Subsequent elements are parameters. The"
26057 " list must be non-empty (ie. must contain a program name). Note that the "
26058 "command runs directly, and is I<not> invoked via the shell (see "
26063 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203
26064 #: ../src/guestfs-actions.pod:2019
26065 msgid "(Added in 0.9.1)"
26069 #: ../src/guestfs-actions.pod:1185
26070 msgid "guestfs_command_lines"
26074 #: ../src/guestfs-actions.pod:1187
26078 " guestfs_command_lines (guestfs_h *g,\n"
26079 " char *const *arguments);\n"
26084 #: ../src/guestfs-actions.pod:1191
26086 "This is the same as C<guestfs_command>, but splits the result into a list of"
26091 #: ../src/guestfs-actions.pod:1194
26092 msgid "See also: C<guestfs_sh_lines>"
26096 #: ../src/guestfs-actions.pod:1205
26097 msgid "guestfs_compress_device_out"
26101 #: ../src/guestfs-actions.pod:1207
26105 " guestfs_compress_device_out (guestfs_h *g,\n"
26106 " const char *ctype,\n"
26107 " const char *device,\n"
26108 " const char *zdevice,\n"
26114 #: ../src/guestfs-actions.pod:1219
26117 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
26122 #: ../src/guestfs-actions.pod:1224
26124 "The C<ctype> and optional C<level> parameters have the same meaning as in "
26125 "C<guestfs_compress_out>."
26129 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288
26130 #: ../src/guestfs-actions.pod:2564 ../src/guestfs-actions.pod:6907
26131 msgid "(Added in 1.13.15)"
26135 #: ../src/guestfs-actions.pod:1231
26136 msgid "guestfs_compress_device_out_va"
26140 #: ../src/guestfs-actions.pod:1233
26144 " guestfs_compress_device_out_va (guestfs_h *g,\n"
26145 " const char *ctype,\n"
26146 " const char *device,\n"
26147 " const char *zdevice,\n"
26148 " va_list args);\n"
26153 #: ../src/guestfs-actions.pod:1240
26154 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
26158 #: ../src/guestfs-actions.pod:1244
26159 msgid "guestfs_compress_device_out_argv"
26163 #: ../src/guestfs-actions.pod:1246
26167 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
26168 " const char *ctype,\n"
26169 " const char *device,\n"
26170 " const char *zdevice,\n"
26171 " const struct guestfs_compress_device_out_argv *optargs);\n"
26176 #: ../src/guestfs-actions.pod:1253
26177 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
26181 #: ../src/guestfs-actions.pod:1257
26182 msgid "guestfs_compress_out"
26186 #: ../src/guestfs-actions.pod:1259
26190 " guestfs_compress_out (guestfs_h *g,\n"
26191 " const char *ctype,\n"
26192 " const char *file,\n"
26193 " const char *zfile,\n"
26199 #: ../src/guestfs-actions.pod:1271
26202 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26207 #: ../src/guestfs-actions.pod:1290
26208 msgid "guestfs_compress_out_va"
26212 #: ../src/guestfs-actions.pod:1292
26216 " guestfs_compress_out_va (guestfs_h *g,\n"
26217 " const char *ctype,\n"
26218 " const char *file,\n"
26219 " const char *zfile,\n"
26220 " va_list args);\n"
26225 #: ../src/guestfs-actions.pod:1299
26226 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26230 #: ../src/guestfs-actions.pod:1303
26231 msgid "guestfs_compress_out_argv"
26235 #: ../src/guestfs-actions.pod:1305
26239 " guestfs_compress_out_argv (guestfs_h *g,\n"
26240 " const char *ctype,\n"
26241 " const char *file,\n"
26242 " const char *zfile,\n"
26243 " const struct guestfs_compress_out_argv *optargs);\n"
26248 #: ../src/guestfs-actions.pod:1312
26249 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26253 #: ../src/guestfs-actions.pod:1316
26254 msgid "guestfs_config"
26258 #: ../src/guestfs-actions.pod:1318
26262 " guestfs_config (guestfs_h *g,\n"
26263 " const char *qemuparam,\n"
26264 " const char *qemuvalue);\n"
26269 #: ../src/guestfs-actions.pod:1336
26270 msgid "guestfs_copy_device_to_device"
26274 #: ../src/guestfs-actions.pod:1338
26278 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26279 " const char *src,\n"
26280 " const char *dest,\n"
26286 #: ../src/guestfs-actions.pod:1349
26289 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26290 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26291 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26296 #: ../src/guestfs-actions.pod:1353
26298 "The four calls C<guestfs_copy_device_to_device>, "
26299 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26300 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26301 "destination (device|file)."
26305 #: ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1425
26306 #: ../src/guestfs-actions.pod:1476 ../src/guestfs-actions.pod:1532
26307 #: ../src/guestfs-actions.pod:1584 ../src/guestfs-actions.pod:1715
26308 #: ../src/guestfs-actions.pod:1746 ../src/guestfs-actions.pod:1791
26309 #: ../src/guestfs-actions.pod:2168 ../src/guestfs-actions.pod:2190
26310 #: ../src/guestfs-actions.pod:4097 ../src/guestfs-actions.pod:7721
26311 #: ../src/guestfs-actions.pod:7755 ../src/guestfs-actions.pod:8262
26312 #: ../src/guestfs-actions.pod:8285
26314 "This long-running command can generate progress notification messages so "
26315 "that the caller can display a progress bar or indicator. To receive these "
26316 "messages, the caller must register a progress event callback. See "
26317 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
26321 #: ../src/guestfs-actions.pod:1379
26322 msgid "guestfs_copy_device_to_device_va"
26326 #: ../src/guestfs-actions.pod:1381
26330 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26331 " const char *src,\n"
26332 " const char *dest,\n"
26333 " va_list args);\n"
26338 #: ../src/guestfs-actions.pod:1387
26339 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26343 #: ../src/guestfs-actions.pod:1391
26344 msgid "guestfs_copy_device_to_device_argv"
26348 #: ../src/guestfs-actions.pod:1393
26352 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26353 " const char *src,\n"
26354 " const char *dest,\n"
26355 " const struct guestfs_copy_device_to_device_argv *optargs);\n"
26360 #: ../src/guestfs-actions.pod:1399
26361 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26365 #: ../src/guestfs-actions.pod:1403
26366 msgid "guestfs_copy_device_to_file"
26370 #: ../src/guestfs-actions.pod:1405
26374 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26375 " const char *src,\n"
26376 " const char *dest,\n"
26382 #: ../src/guestfs-actions.pod:1416
26385 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26386 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26387 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26392 #: ../src/guestfs-actions.pod:1420 ../src/guestfs-actions.pod:1471
26393 #: ../src/guestfs-actions.pod:1522
26395 "See C<guestfs_copy_device_to_device> for a general overview of this call."
26399 #: ../src/guestfs-actions.pod:1430
26400 msgid "guestfs_copy_device_to_file_va"
26404 #: ../src/guestfs-actions.pod:1432
26408 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26409 " const char *src,\n"
26410 " const char *dest,\n"
26411 " va_list args);\n"
26416 #: ../src/guestfs-actions.pod:1438
26417 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26421 #: ../src/guestfs-actions.pod:1442
26422 msgid "guestfs_copy_device_to_file_argv"
26426 #: ../src/guestfs-actions.pod:1444
26430 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26431 " const char *src,\n"
26432 " const char *dest,\n"
26433 " const struct guestfs_copy_device_to_file_argv *optargs);\n"
26438 #: ../src/guestfs-actions.pod:1450
26439 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26443 #: ../src/guestfs-actions.pod:1454
26444 msgid "guestfs_copy_file_to_device"
26448 #: ../src/guestfs-actions.pod:1456
26452 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26453 " const char *src,\n"
26454 " const char *dest,\n"
26460 #: ../src/guestfs-actions.pod:1467
26463 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26464 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26465 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26470 #: ../src/guestfs-actions.pod:1481
26471 msgid "guestfs_copy_file_to_device_va"
26475 #: ../src/guestfs-actions.pod:1483
26479 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26480 " const char *src,\n"
26481 " const char *dest,\n"
26482 " va_list args);\n"
26487 #: ../src/guestfs-actions.pod:1489
26488 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26492 #: ../src/guestfs-actions.pod:1493
26493 msgid "guestfs_copy_file_to_device_argv"
26497 #: ../src/guestfs-actions.pod:1495
26501 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26502 " const char *src,\n"
26503 " const char *dest,\n"
26504 " const struct guestfs_copy_file_to_device_argv *optargs);\n"
26509 #: ../src/guestfs-actions.pod:1501
26510 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26514 #: ../src/guestfs-actions.pod:1505
26515 msgid "guestfs_copy_file_to_file"
26519 #: ../src/guestfs-actions.pod:1507
26523 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26524 " const char *src,\n"
26525 " const char *dest,\n"
26531 #: ../src/guestfs-actions.pod:1518
26534 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26535 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26536 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26541 #: ../src/guestfs-actions.pod:1525
26543 "This is B<not> the function you want for copying files. This is for copying"
26544 " blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26545 "C<guestfs_mv> for general file copying and moving functions."
26549 #: ../src/guestfs-actions.pod:1537
26550 msgid "guestfs_copy_file_to_file_va"
26554 #: ../src/guestfs-actions.pod:1539
26558 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26559 " const char *src,\n"
26560 " const char *dest,\n"
26561 " va_list args);\n"
26566 #: ../src/guestfs-actions.pod:1545
26567 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26571 #: ../src/guestfs-actions.pod:1549
26572 msgid "guestfs_copy_file_to_file_argv"
26576 #: ../src/guestfs-actions.pod:1551
26580 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26581 " const char *src,\n"
26582 " const char *dest,\n"
26583 " const struct guestfs_copy_file_to_file_argv *optargs);\n"
26588 #: ../src/guestfs-actions.pod:1557
26589 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26593 #: ../src/guestfs-actions.pod:1561
26594 msgid "guestfs_copy_size"
26598 #: ../src/guestfs-actions.pod:1563
26602 " guestfs_copy_size (guestfs_h *g,\n"
26603 " const char *src,\n"
26604 " const char *dest,\n"
26605 " int64_t size);\n"
26610 #: ../src/guestfs-actions.pod:1569 ../src/guestfs-actions.pod:1626
26612 "I<This function is deprecated.> In new code, use the "
26613 "L</guestfs_copy_device_to_device> call instead."
26617 #: ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:4821
26618 #: ../src/guestfs-actions.pod:6214 ../src/guestfs-actions.pod:7956
26619 #: ../src/guestfs-actions.pod:7976 ../src/guestfs-actions.pod:8062
26620 msgid "(Added in 1.0.87)"
26624 #: ../src/guestfs-actions.pod:1591
26629 #: ../src/guestfs-actions.pod:1593
26633 " guestfs_cp (guestfs_h *g,\n"
26634 " const char *src,\n"
26635 " const char *dest);\n"
26640 #: ../src/guestfs-actions.pod:1603 ../src/guestfs-actions.pod:1617
26641 #: ../src/guestfs-actions.pod:1697 ../src/guestfs-actions.pod:1771
26642 #: ../src/guestfs-actions.pod:1885 ../src/guestfs-actions.pod:5565
26643 #: ../src/guestfs-actions.pod:6058
26644 msgid "(Added in 1.0.18)"
26648 #: ../src/guestfs-actions.pod:1605
26649 msgid "guestfs_cp_a"
26653 #: ../src/guestfs-actions.pod:1607
26657 " guestfs_cp_a (guestfs_h *g,\n"
26658 " const char *src,\n"
26659 " const char *dest);\n"
26664 #: ../src/guestfs-actions.pod:1619
26669 #: ../src/guestfs-actions.pod:1621
26673 " guestfs_dd (guestfs_h *g,\n"
26674 " const char *src,\n"
26675 " const char *dest);\n"
26680 #: ../src/guestfs-actions.pod:1638
26682 "If the destination is a device, it must be as large or larger than the "
26683 "source file or device, otherwise the copy will fail. This command cannot do"
26684 " partial copies (see C<guestfs_copy_device_to_device>)."
26688 #: ../src/guestfs-actions.pod:1647
26693 #: ../src/guestfs-actions.pod:1649
26697 " guestfs_df (guestfs_h *g);\n"
26702 #: ../src/guestfs-actions.pod:1654 ../src/guestfs-actions.pod:1671
26704 "This command is mostly useful for interactive sessions. It is I<not> "
26705 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
26710 #: ../src/guestfs-actions.pod:1661 ../src/guestfs-actions.pod:1678
26711 #: ../src/guestfs-actions.pod:1796 ../src/guestfs-actions.pod:2803
26712 #: ../src/guestfs-actions.pod:2827 ../src/guestfs-actions.pod:2895
26713 #: ../src/guestfs-actions.pod:4931 ../src/guestfs-actions.pod:5465
26714 #: ../src/guestfs-actions.pod:7459 ../src/guestfs-actions.pod:7483
26715 #: ../src/guestfs-actions.pod:8102 ../src/guestfs-actions.pod:8115
26716 #: ../src/guestfs-actions.pod:8128
26717 msgid "(Added in 1.0.54)"
26721 #: ../src/guestfs-actions.pod:1663
26722 msgid "guestfs_df_h"
26726 #: ../src/guestfs-actions.pod:1665
26730 " guestfs_df_h (guestfs_h *g);\n"
26735 #: ../src/guestfs-actions.pod:1680
26736 msgid "guestfs_dmesg"
26740 #: ../src/guestfs-actions.pod:1682
26744 " guestfs_dmesg (guestfs_h *g);\n"
26749 #: ../src/guestfs-actions.pod:1689
26751 "Another way to get the same information is to enable verbose messages with "
26752 "C<guestfs_set_verbose> or by setting the environment variable "
26753 "C<LIBGUESTFS_DEBUG=1> before running the program."
26757 #: ../src/guestfs-actions.pod:1699
26758 msgid "guestfs_download"
26762 #: ../src/guestfs-actions.pod:1701
26766 " guestfs_download (guestfs_h *g,\n"
26767 " const char *remotefilename,\n"
26768 " const char *filename);\n"
26773 #: ../src/guestfs-actions.pod:1711
26774 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
26778 #: ../src/guestfs-actions.pod:1722
26779 msgid "guestfs_download_offset"
26783 #: ../src/guestfs-actions.pod:1724
26787 " guestfs_download_offset (guestfs_h *g,\n"
26788 " const char *remotefilename,\n"
26789 " const char *filename,\n"
26790 " int64_t offset,\n"
26791 " int64_t size);\n"
26796 #: ../src/guestfs-actions.pod:1737
26798 "Note that there is no limit on the amount of data that can be downloaded "
26799 "with this call, unlike with C<guestfs_pread>, and this call always reads the"
26800 " full amount unless an error occurs."
26804 #: ../src/guestfs-actions.pod:1742
26805 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26809 #: ../src/guestfs-actions.pod:1751 ../src/guestfs-actions.pod:7760
26810 msgid "(Added in 1.5.17)"
26814 #: ../src/guestfs-actions.pod:1753
26815 msgid "guestfs_drop_caches"
26819 #: ../src/guestfs-actions.pod:1755
26823 " guestfs_drop_caches (guestfs_h *g,\n"
26824 " int whattodrop);\n"
26829 #: ../src/guestfs-actions.pod:1773
26834 #: ../src/guestfs-actions.pod:1775
26838 " guestfs_du (guestfs_h *g,\n"
26839 " const char *path);\n"
26844 #: ../src/guestfs-actions.pod:1798
26845 msgid "guestfs_e2fsck_f"
26849 #: ../src/guestfs-actions.pod:1800
26853 " guestfs_e2fsck_f (guestfs_h *g,\n"
26854 " const char *device);\n"
26859 #: ../src/guestfs-actions.pod:1808
26861 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
26862 "Normally you should use C<guestfs_fsck>."
26866 #: ../src/guestfs-actions.pod:1813
26867 msgid "(Added in 1.0.29)"
26871 #: ../src/guestfs-actions.pod:1815
26872 msgid "guestfs_echo_daemon"
26876 #: ../src/guestfs-actions.pod:1817
26880 " guestfs_echo_daemon (guestfs_h *g,\n"
26881 " char *const *words);\n"
26886 #: ../src/guestfs-actions.pod:1826
26887 msgid "See also C<guestfs_ping_daemon>."
26891 #: ../src/guestfs-actions.pod:1831 ../src/guestfs-actions.pod:2589
26892 #: ../src/guestfs-actions.pod:6931
26893 msgid "(Added in 1.0.69)"
26897 #: ../src/guestfs-actions.pod:1833
26898 msgid "guestfs_egrep"
26902 #: ../src/guestfs-actions.pod:1835
26906 " guestfs_egrep (guestfs_h *g,\n"
26907 " const char *regex,\n"
26908 " const char *path);\n"
26913 #: ../src/guestfs-actions.pod:1850 ../src/guestfs-actions.pod:1869
26914 #: ../src/guestfs-actions.pod:1926 ../src/guestfs-actions.pod:1972
26915 #: ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:2719
26916 #: ../src/guestfs-actions.pod:2738 ../src/guestfs-actions.pod:2916
26917 #: ../src/guestfs-actions.pod:2929 ../src/guestfs-actions.pod:2944
26918 #: ../src/guestfs-actions.pod:2990 ../src/guestfs-actions.pod:3012
26919 #: ../src/guestfs-actions.pod:3025 ../src/guestfs-actions.pod:4311
26920 #: ../src/guestfs-actions.pod:4325 ../src/guestfs-actions.pod:4338
26921 #: ../src/guestfs-actions.pod:4352 ../src/guestfs-actions.pod:5353
26922 #: ../src/guestfs-actions.pod:6392 ../src/guestfs-actions.pod:6441
26923 #: ../src/guestfs-actions.pod:7327 ../src/guestfs-actions.pod:7339
26924 #: ../src/guestfs-actions.pod:7352 ../src/guestfs-actions.pod:7365
26925 #: ../src/guestfs-actions.pod:7387 ../src/guestfs-actions.pod:7400
26926 #: ../src/guestfs-actions.pod:7413 ../src/guestfs-actions.pod:7426
26927 #: ../src/guestfs-actions.pod:8220 ../src/guestfs-actions.pod:8239
26928 #: ../src/guestfs-actions.pod:8333 ../src/guestfs-actions.pod:8352
26929 #: ../src/guestfs-actions.pod:8398 ../src/guestfs-actions.pod:8417
26930 msgid "(Added in 1.0.66)"
26934 #: ../src/guestfs-actions.pod:1852
26935 msgid "guestfs_egrepi"
26939 #: ../src/guestfs-actions.pod:1854
26943 " guestfs_egrepi (guestfs_h *g,\n"
26944 " const char *regex,\n"
26945 " const char *path);\n"
26950 #: ../src/guestfs-actions.pod:1871
26951 msgid "guestfs_equal"
26955 #: ../src/guestfs-actions.pod:1873
26959 " guestfs_equal (guestfs_h *g,\n"
26960 " const char *file1,\n"
26961 " const char *file2);\n"
26966 #: ../src/guestfs-actions.pod:1887
26967 msgid "guestfs_exists"
26971 #: ../src/guestfs-actions.pod:1889
26975 " guestfs_exists (guestfs_h *g,\n"
26976 " const char *path);\n"
26981 #: ../src/guestfs-actions.pod:1896
26982 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
26986 #: ../src/guestfs-actions.pod:1902
26987 msgid "guestfs_fallocate"
26991 #: ../src/guestfs-actions.pod:1904
26995 " guestfs_fallocate (guestfs_h *g,\n"
26996 " const char *path,\n"
27002 #: ../src/guestfs-actions.pod:1909
27004 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64>"
27009 #: ../src/guestfs-actions.pod:1928
27010 msgid "guestfs_fallocate64"
27014 #: ../src/guestfs-actions.pod:1930
27018 " guestfs_fallocate64 (guestfs_h *g,\n"
27019 " const char *path,\n"
27025 #: ../src/guestfs-actions.pod:1939
27027 "Note that this call allocates disk blocks for the file. To create a sparse "
27028 "file use C<guestfs_truncate_size> instead."
27032 #: ../src/guestfs-actions.pod:1942
27034 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
27035 "oversight it only allowed 30 bit lengths to be specified, effectively "
27036 "limiting the maximum size of files created through that call to 1GB."
27040 #: ../src/guestfs-actions.pod:1953
27041 msgid "(Added in 1.3.17)"
27045 #: ../src/guestfs-actions.pod:1955
27046 msgid "guestfs_fgrep"
27050 #: ../src/guestfs-actions.pod:1957
27054 " guestfs_fgrep (guestfs_h *g,\n"
27055 " const char *pattern,\n"
27056 " const char *path);\n"
27061 #: ../src/guestfs-actions.pod:1974
27062 msgid "guestfs_fgrepi"
27066 #: ../src/guestfs-actions.pod:1976
27070 " guestfs_fgrepi (guestfs_h *g,\n"
27071 " const char *pattern,\n"
27072 " const char *path);\n"
27077 #: ../src/guestfs-actions.pod:1993
27078 msgid "guestfs_file"
27082 #: ../src/guestfs-actions.pod:1995
27086 " guestfs_file (guestfs_h *g,\n"
27087 " const char *path);\n"
27092 #: ../src/guestfs-actions.pod:2013
27094 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
27095 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
27099 #: ../src/guestfs-actions.pod:2021
27100 msgid "guestfs_file_architecture"
27104 #: ../src/guestfs-actions.pod:2023
27108 " guestfs_file_architecture (guestfs_h *g,\n"
27109 " const char *filename);\n"
27114 #: ../src/guestfs-actions.pod:2131 ../src/guestfs-actions.pod:2294
27115 #: ../src/guestfs-actions.pod:2311 ../src/guestfs-actions.pod:3045
27116 #: ../src/guestfs-actions.pod:3147 ../src/guestfs-actions.pod:3213
27117 #: ../src/guestfs-actions.pod:3400 ../src/guestfs-actions.pod:3418
27118 #: ../src/guestfs-actions.pod:3458 ../src/guestfs-actions.pod:3534
27119 #: ../src/guestfs-actions.pod:3631 ../src/guestfs-actions.pod:3868
27120 #: ../src/guestfs-actions.pod:4000
27121 msgid "(Added in 1.5.3)"
27125 #: ../src/guestfs-actions.pod:2133
27126 msgid "guestfs_filesize"
27130 #: ../src/guestfs-actions.pod:2135
27134 " guestfs_filesize (guestfs_h *g,\n"
27135 " const char *file);\n"
27140 #: ../src/guestfs-actions.pod:2141
27142 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
27143 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
27144 "devices, use C<guestfs_blockdev_getsize64>."
27148 #: ../src/guestfs-actions.pod:2147
27149 msgid "(Added in 1.0.82)"
27153 #: ../src/guestfs-actions.pod:2149
27154 msgid "guestfs_fill"
27158 #: ../src/guestfs-actions.pod:2151
27162 " guestfs_fill (guestfs_h *g,\n"
27165 " const char *path);\n"
27170 #: ../src/guestfs-actions.pod:2161
27172 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
27173 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
27174 "bytes use C<guestfs_fill_pattern>."
27178 #: ../src/guestfs-actions.pod:2173
27179 msgid "(Added in 1.0.79)"
27183 #: ../src/guestfs-actions.pod:2175
27184 msgid "guestfs_fill_pattern"
27188 #: ../src/guestfs-actions.pod:2177
27192 " guestfs_fill_pattern (guestfs_h *g,\n"
27193 " const char *pattern,\n"
27195 " const char *path);\n"
27200 #: ../src/guestfs-actions.pod:2183
27202 "This function is like C<guestfs_fill> except that it creates a new file of "
27203 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
27204 "pattern is truncated if necessary to ensure the length of the file is "
27205 "exactly C<len> bytes."
27209 #: ../src/guestfs-actions.pod:2195
27210 msgid "(Added in 1.3.12)"
27214 #: ../src/guestfs-actions.pod:2197
27215 msgid "guestfs_find"
27219 #: ../src/guestfs-actions.pod:2199
27223 " guestfs_find (guestfs_h *g,\n"
27224 " const char *directory);\n"
27229 #: ../src/guestfs-actions.pod:2215
27231 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27235 #: ../src/guestfs-actions.pod:2228
27236 msgid "See also C<guestfs_find0>."
27240 #: ../src/guestfs-actions.pod:2237 ../src/guestfs-actions.pod:4758
27241 #: ../src/guestfs-actions.pod:6476
27242 msgid "(Added in 1.0.27)"
27246 #: ../src/guestfs-actions.pod:2239
27247 msgid "guestfs_find0"
27251 #: ../src/guestfs-actions.pod:2241
27255 " guestfs_find0 (guestfs_h *g,\n"
27256 " const char *directory,\n"
27257 " const char *files);\n"
27262 #: ../src/guestfs-actions.pod:2250
27264 "This command works the same way as C<guestfs_find> with the following "
27269 #: ../src/guestfs-actions.pod:2277
27270 msgid "(Added in 1.0.74)"
27274 #: ../src/guestfs-actions.pod:2279
27275 msgid "guestfs_findfs_label"
27279 #: ../src/guestfs-actions.pod:2281
27283 " guestfs_findfs_label (guestfs_h *g,\n"
27284 " const char *label);\n"
27289 #: ../src/guestfs-actions.pod:2289
27290 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27294 #: ../src/guestfs-actions.pod:2296
27295 msgid "guestfs_findfs_uuid"
27299 #: ../src/guestfs-actions.pod:2298
27303 " guestfs_findfs_uuid (guestfs_h *g,\n"
27304 " const char *uuid);\n"
27309 #: ../src/guestfs-actions.pod:2306
27310 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27314 #: ../src/guestfs-actions.pod:2313
27315 msgid "guestfs_fsck"
27319 #: ../src/guestfs-actions.pod:2315
27323 " guestfs_fsck (guestfs_h *g,\n"
27324 " const char *fstype,\n"
27325 " const char *device);\n"
27330 #: ../src/guestfs-actions.pod:2350 ../src/guestfs-actions.pod:8267
27331 msgid "(Added in 1.0.16)"
27335 #: ../src/guestfs-actions.pod:2352
27336 msgid "guestfs_get_append"
27340 #: ../src/guestfs-actions.pod:2354
27344 " guestfs_get_append (guestfs_h *g);\n"
27349 #: ../src/guestfs-actions.pod:2362
27351 "This function returns a string which may be NULL. There is no way to return"
27352 " an error from this function. The string is owned by the guest handle and "
27353 "must I<not> be freed."
27357 #: ../src/guestfs-actions.pod:2366 ../src/guestfs-actions.pod:6154
27358 #: ../src/guestfs-actions.pod:6636 ../src/guestfs-actions.pod:7094
27359 #: ../src/guestfs-actions.pod:7113 ../src/guestfs-actions.pod:7129
27360 #: ../src/guestfs-actions.pod:7153 ../src/guestfs-actions.pod:7907
27361 #: ../src/guestfs-actions.pod:7922 ../src/guestfs-actions.pod:8314
27362 msgid "(Added in 1.0.26)"
27366 #: ../src/guestfs-actions.pod:2368
27367 msgid "guestfs_get_attach_method"
27371 #: ../src/guestfs-actions.pod:2370
27375 " guestfs_get_attach_method (guestfs_h *g);\n"
27380 #: ../src/guestfs-actions.pod:2373
27381 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27385 #: ../src/guestfs-actions.pod:2378 ../src/guestfs-actions.pod:6666
27386 msgid "(Added in 1.9.8)"
27390 #: ../src/guestfs-actions.pod:2380
27391 msgid "guestfs_get_autosync"
27395 #: ../src/guestfs-actions.pod:2382
27399 " guestfs_get_autosync (guestfs_h *g);\n"
27404 #: ../src/guestfs-actions.pod:2391
27405 msgid "guestfs_get_direct"
27409 #: ../src/guestfs-actions.pod:2393
27413 " guestfs_get_direct (guestfs_h *g);\n"
27418 #: ../src/guestfs-actions.pod:2400 ../src/guestfs-actions.pod:6707
27419 msgid "(Added in 1.0.72)"
27423 #: ../src/guestfs-actions.pod:2402
27424 msgid "guestfs_get_e2label"
27428 #: ../src/guestfs-actions.pod:2404
27432 " guestfs_get_e2label (guestfs_h *g,\n"
27433 " const char *device);\n"
27438 #: ../src/guestfs-actions.pod:2408
27440 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27445 #: ../src/guestfs-actions.pod:2421 ../src/guestfs-actions.pod:2442
27446 #: ../src/guestfs-actions.pod:6725 ../src/guestfs-actions.pod:6744
27447 msgid "(Added in 1.0.15)"
27451 #: ../src/guestfs-actions.pod:2423
27452 msgid "guestfs_get_e2uuid"
27456 #: ../src/guestfs-actions.pod:2425
27460 " guestfs_get_e2uuid (guestfs_h *g,\n"
27461 " const char *device);\n"
27466 #: ../src/guestfs-actions.pod:2429
27468 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27473 #: ../src/guestfs-actions.pod:2444
27474 msgid "guestfs_get_memsize"
27478 #: ../src/guestfs-actions.pod:2446
27482 " guestfs_get_memsize (guestfs_h *g);\n"
27487 #: ../src/guestfs-actions.pod:2452
27489 "If C<guestfs_set_memsize> was not called on this handle, and if "
27490 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default"
27491 " value for memsize."
27495 #: ../src/guestfs-actions.pod:2461 ../src/guestfs-actions.pod:5049
27496 #: ../src/guestfs-actions.pod:5258 ../src/guestfs-actions.pod:5277
27497 #: ../src/guestfs-actions.pod:5296 ../src/guestfs-actions.pod:5308
27498 #: ../src/guestfs-actions.pod:5325 ../src/guestfs-actions.pod:5338
27499 #: ../src/guestfs-actions.pod:6379 ../src/guestfs-actions.pod:6765
27500 #: ../src/guestfs-actions.pod:7061 ../src/guestfs-actions.pod:7676
27501 msgid "(Added in 1.0.55)"
27505 #: ../src/guestfs-actions.pod:2463
27506 msgid "guestfs_get_network"
27510 #: ../src/guestfs-actions.pod:2465
27514 " guestfs_get_network (guestfs_h *g);\n"
27519 #: ../src/guestfs-actions.pod:2472 ../src/guestfs-actions.pod:6784
27520 msgid "(Added in 1.5.4)"
27524 #: ../src/guestfs-actions.pod:2474
27525 msgid "guestfs_get_path"
27529 #: ../src/guestfs-actions.pod:2476
27533 " guestfs_get_path (guestfs_h *g);\n"
27538 #: ../src/guestfs-actions.pod:2484 ../src/guestfs-actions.pod:2524
27540 "This function returns a string, or NULL on error. The string is owned by "
27541 "the guest handle and must I<not> be freed."
27545 #: ../src/guestfs-actions.pod:2489
27546 msgid "guestfs_get_pgroup"
27550 #: ../src/guestfs-actions.pod:2491
27554 " guestfs_get_pgroup (guestfs_h *g);\n"
27559 #: ../src/guestfs-actions.pod:2498 ../src/guestfs-actions.pod:6820
27560 #: ../src/guestfs-actions.pod:8168
27561 msgid "(Added in 1.11.18)"
27565 #: ../src/guestfs-actions.pod:2500
27566 msgid "guestfs_get_pid"
27570 #: ../src/guestfs-actions.pod:2502
27574 " guestfs_get_pid (guestfs_h *g);\n"
27579 #: ../src/guestfs-actions.pod:2512
27580 msgid "(Added in 1.0.56)"
27584 #: ../src/guestfs-actions.pod:2514
27585 msgid "guestfs_get_qemu"
27589 #: ../src/guestfs-actions.pod:2516
27593 " guestfs_get_qemu (guestfs_h *g);\n"
27598 #: ../src/guestfs-actions.pod:2527 ../src/guestfs-actions.pod:6848
27599 msgid "(Added in 1.0.6)"
27603 #: ../src/guestfs-actions.pod:2529
27604 msgid "guestfs_get_recovery_proc"
27608 #: ../src/guestfs-actions.pod:2531
27612 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27617 #: ../src/guestfs-actions.pod:2538 ../src/guestfs-actions.pod:4122
27618 #: ../src/guestfs-actions.pod:4453 ../src/guestfs-actions.pod:4856
27619 #: ../src/guestfs-actions.pod:4888 ../src/guestfs-actions.pod:6084
27620 #: ../src/guestfs-actions.pod:6427 ../src/guestfs-actions.pod:6872
27621 #: ../src/guestfs-actions.pod:7579 ../src/guestfs-actions.pod:7599
27622 #: ../src/guestfs-actions.pod:7791
27623 msgid "(Added in 1.0.77)"
27627 #: ../src/guestfs-actions.pod:2540
27628 msgid "guestfs_get_selinux"
27632 #: ../src/guestfs-actions.pod:2542
27636 " guestfs_get_selinux (guestfs_h *g);\n"
27641 #: ../src/guestfs-actions.pod:2545
27643 "This returns the current setting of the selinux flag which is passed to the "
27644 "appliance at boot time. See C<guestfs_set_selinux>."
27648 #: ../src/guestfs-actions.pod:2553 ../src/guestfs-actions.pod:2627
27649 #: ../src/guestfs-actions.pod:6891 ../src/guestfs-actions.pod:6965
27650 msgid "(Added in 1.0.67)"
27654 #: ../src/guestfs-actions.pod:2555
27655 msgid "guestfs_get_smp"
27659 #: ../src/guestfs-actions.pod:2557
27663 " guestfs_get_smp (guestfs_h *g);\n"
27668 #: ../src/guestfs-actions.pod:2566
27669 msgid "guestfs_get_state"
27673 #: ../src/guestfs-actions.pod:2568
27677 " guestfs_get_state (guestfs_h *g);\n"
27682 #: ../src/guestfs-actions.pod:2580
27683 msgid "guestfs_get_trace"
27687 #: ../src/guestfs-actions.pod:2582
27691 " guestfs_get_trace (guestfs_h *g);\n"
27696 #: ../src/guestfs-actions.pod:2591
27697 msgid "guestfs_get_umask"
27701 #: ../src/guestfs-actions.pod:2593
27705 " guestfs_get_umask (guestfs_h *g);\n"
27710 #: ../src/guestfs-actions.pod:2596
27712 "Return the current umask. By default the umask is C<022> unless it has been"
27713 " set by calling C<guestfs_umask>."
27717 #: ../src/guestfs-actions.pod:2603
27718 msgid "guestfs_get_verbose"
27722 #: ../src/guestfs-actions.pod:2605
27726 " guestfs_get_verbose (guestfs_h *g);\n"
27731 #: ../src/guestfs-actions.pod:2614
27732 msgid "guestfs_getcon"
27736 #: ../src/guestfs-actions.pod:2616
27740 " guestfs_getcon (guestfs_h *g);\n"
27745 #: ../src/guestfs-actions.pod:2621
27747 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
27751 #: ../src/guestfs-actions.pod:2629
27752 msgid "guestfs_getxattr"
27756 #: ../src/guestfs-actions.pod:2631
27760 " guestfs_getxattr (guestfs_h *g,\n"
27761 " const char *path,\n"
27762 " const char *name,\n"
27763 " size_t *size_r);\n"
27768 #: ../src/guestfs-actions.pod:2637
27770 "Get a single extended attribute from file C<path> named C<name>. This call "
27771 "follows symlinks. If you want to lookup an extended attribute for the "
27772 "symlink itself, use C<guestfs_lgetxattr>."
27776 #: ../src/guestfs-actions.pod:2641 ../src/guestfs-actions.pod:4136
27778 "Normally it is better to get all extended attributes from a file in one go "
27779 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
27780 "implementations are buggy and do not provide a way to list out attributes. "
27781 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27782 "extended attributes you want in advance and call this function."
27786 #: ../src/guestfs-actions.pod:2651
27787 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27791 #: ../src/guestfs-actions.pod:2653 ../src/guestfs-actions.pod:2866
27792 #: ../src/guestfs-actions.pod:3348 ../src/guestfs-actions.pod:4148
27793 #: ../src/guestfs-actions.pod:6077 ../src/guestfs-actions.pod:6103
27794 #: ../src/guestfs-actions.pod:6284
27796 "This function returns a buffer, or NULL on error. The size of the returned "
27797 "buffer is written to C<*size_r>. I<The caller must free the returned buffer"
27802 #: ../src/guestfs-actions.pod:2657 ../src/guestfs-actions.pod:4152
27803 msgid "(Added in 1.7.24)"
27807 #: ../src/guestfs-actions.pod:2659
27808 msgid "guestfs_getxattrs"
27812 #: ../src/guestfs-actions.pod:2661
27815 " struct guestfs_xattr_list *\n"
27816 " guestfs_getxattrs (guestfs_h *g,\n"
27817 " const char *path);\n"
27822 #: ../src/guestfs-actions.pod:2671
27823 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27827 #: ../src/guestfs-actions.pod:2673 ../src/guestfs-actions.pod:4164
27828 #: ../src/guestfs-actions.pod:4852
27830 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was"
27831 " an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27835 #: ../src/guestfs-actions.pod:2677 ../src/guestfs-actions.pod:4168
27836 #: ../src/guestfs-actions.pod:4367 ../src/guestfs-actions.pod:4403
27837 #: ../src/guestfs-actions.pod:6457 ../src/guestfs-actions.pod:6984
27838 #: ../src/guestfs-actions.pod:8379
27839 msgid "(Added in 1.0.59)"
27843 #: ../src/guestfs-actions.pod:2679
27844 msgid "guestfs_glob_expand"
27848 #: ../src/guestfs-actions.pod:2681
27852 " guestfs_glob_expand (guestfs_h *g,\n"
27853 " const char *pattern);\n"
27858 #: ../src/guestfs-actions.pod:2700 ../src/guestfs-actions.pod:7177
27859 #: ../src/guestfs-actions.pod:7194
27860 msgid "(Added in 1.0.50)"
27864 #: ../src/guestfs-actions.pod:2702
27865 msgid "guestfs_grep"
27869 #: ../src/guestfs-actions.pod:2704
27873 " guestfs_grep (guestfs_h *g,\n"
27874 " const char *regex,\n"
27875 " const char *path);\n"
27880 #: ../src/guestfs-actions.pod:2721
27881 msgid "guestfs_grepi"
27885 #: ../src/guestfs-actions.pod:2723
27889 " guestfs_grepi (guestfs_h *g,\n"
27890 " const char *regex,\n"
27891 " const char *path);\n"
27896 #: ../src/guestfs-actions.pod:2740
27897 msgid "guestfs_grub_install"
27901 #: ../src/guestfs-actions.pod:2742
27905 " guestfs_grub_install (guestfs_h *g,\n"
27906 " const char *root,\n"
27907 " const char *device);\n"
27912 #: ../src/guestfs-actions.pod:2785
27913 msgid "(Added in 1.0.17)"
27917 #: ../src/guestfs-actions.pod:2787
27918 msgid "guestfs_head"
27922 #: ../src/guestfs-actions.pod:2789
27926 " guestfs_head (guestfs_h *g,\n"
27927 " const char *path);\n"
27932 #: ../src/guestfs-actions.pod:2805
27933 msgid "guestfs_head_n"
27937 #: ../src/guestfs-actions.pod:2807
27941 " guestfs_head_n (guestfs_h *g,\n"
27943 " const char *path);\n"
27948 #: ../src/guestfs-actions.pod:2829
27949 msgid "guestfs_hexdump"
27953 #: ../src/guestfs-actions.pod:2831
27957 " guestfs_hexdump (guestfs_h *g,\n"
27958 " const char *path);\n"
27963 #: ../src/guestfs-actions.pod:2844 ../src/guestfs-actions.pod:7258
27964 #: ../src/guestfs-actions.pod:7313
27965 msgid "(Added in 1.0.22)"
27969 #: ../src/guestfs-actions.pod:2846
27970 msgid "guestfs_initrd_cat"
27974 #: ../src/guestfs-actions.pod:2848
27978 " guestfs_initrd_cat (guestfs_h *g,\n"
27979 " const char *initrdpath,\n"
27980 " const char *filename,\n"
27981 " size_t *size_r);\n"
27986 #: ../src/guestfs-actions.pod:2864
27987 msgid "See also C<guestfs_initrd_list>."
27991 #: ../src/guestfs-actions.pod:2875
27992 msgid "guestfs_initrd_list"
27996 #: ../src/guestfs-actions.pod:2877
28000 " guestfs_initrd_list (guestfs_h *g,\n"
28001 " const char *path);\n"
28006 #: ../src/guestfs-actions.pod:2897
28007 msgid "guestfs_inotify_add_watch"
28011 #: ../src/guestfs-actions.pod:2899
28015 " guestfs_inotify_add_watch (guestfs_h *g,\n"
28016 " const char *path,\n"
28022 #: ../src/guestfs-actions.pod:2918
28023 msgid "guestfs_inotify_close"
28027 #: ../src/guestfs-actions.pod:2920
28031 " guestfs_inotify_close (guestfs_h *g);\n"
28036 #: ../src/guestfs-actions.pod:2931
28037 msgid "guestfs_inotify_files"
28041 #: ../src/guestfs-actions.pod:2933
28045 " guestfs_inotify_files (guestfs_h *g);\n"
28050 #: ../src/guestfs-actions.pod:2936
28052 "This function is a helpful wrapper around C<guestfs_inotify_read> which just"
28053 " returns a list of pathnames of objects that were touched. The returned "
28054 "pathnames are sorted and deduplicated."
28058 #: ../src/guestfs-actions.pod:2946
28059 msgid "guestfs_inotify_init"
28063 #: ../src/guestfs-actions.pod:2948
28067 " guestfs_inotify_init (guestfs_h *g,\n"
28068 " int maxevents);\n"
28073 #: ../src/guestfs-actions.pod:2956
28075 "C<maxevents> is the maximum number of events which will be queued up between"
28076 " calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
28077 "passed as C<0>, then the kernel (or previously set) default is used. For "
28078 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
28079 "throws away events, but records the fact that it threw them away by setting "
28080 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
28081 "C<guestfs_inotify_read>)."
28085 #: ../src/guestfs-actions.pod:2966
28087 "Before any events are generated, you have to add some watches to the "
28088 "internal watch list. See: C<guestfs_inotify_add_watch>, "
28089 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
28093 #: ../src/guestfs-actions.pod:2972
28095 "Queued up events should be read periodically by calling "
28096 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful"
28097 " wrapper around C<guestfs_inotify_read>). If you don't read the events out "
28098 "often enough then you risk the internal queue overflowing."
28102 #: ../src/guestfs-actions.pod:2979
28104 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
28105 "This also removes any watches automatically."
28109 #: ../src/guestfs-actions.pod:2992
28110 msgid "guestfs_inotify_read"
28114 #: ../src/guestfs-actions.pod:2994
28117 " struct guestfs_inotify_event_list *\n"
28118 " guestfs_inotify_read (guestfs_h *g);\n"
28123 #: ../src/guestfs-actions.pod:3008
28125 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
28126 "there was an error. I<The caller must call "
28127 "C<guestfs_free_inotify_event_list> after use>."
28131 #: ../src/guestfs-actions.pod:3014
28132 msgid "guestfs_inotify_rm_watch"
28136 #: ../src/guestfs-actions.pod:3016
28140 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
28146 #: ../src/guestfs-actions.pod:3020
28148 "Remove a previously defined inotify watch. See "
28149 "C<guestfs_inotify_add_watch>."
28153 #: ../src/guestfs-actions.pod:3027
28154 msgid "guestfs_inspect_get_arch"
28158 #: ../src/guestfs-actions.pod:3029
28162 " guestfs_inspect_get_arch (guestfs_h *g,\n"
28163 " const char *root);\n"
28168 #: ../src/guestfs-actions.pod:3033
28170 "This returns the architecture of the inspected operating system. The "
28171 "possible return values are listed under C<guestfs_file_architecture>."
28175 #: ../src/guestfs-actions.pod:3047
28176 msgid "guestfs_inspect_get_distro"
28180 #: ../src/guestfs-actions.pod:3049
28184 " guestfs_inspect_get_distro (guestfs_h *g,\n"
28185 " const char *root);\n"
28190 #: ../src/guestfs-actions.pod:3149
28191 msgid "guestfs_inspect_get_drive_mappings"
28195 #: ../src/guestfs-actions.pod:3151
28199 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
28200 " const char *root);\n"
28205 #: ../src/guestfs-actions.pod:3180
28207 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28208 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
28212 #: ../src/guestfs-actions.pod:3184 ../src/guestfs-actions.pod:3452
28213 #: ../src/guestfs-actions.pod:4255 ../src/guestfs-actions.pod:5527
28214 #: ../src/guestfs-actions.pod:7615
28216 "This function returns a NULL-terminated array of strings, or NULL if there "
28217 "was an error. The array of strings will always have length C<2n+1>, where "
28218 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
28219 "caller must free the strings and the array after use>."
28223 #: ../src/guestfs-actions.pod:3190 ../src/guestfs-actions.pod:3651
28224 msgid "(Added in 1.9.17)"
28228 #: ../src/guestfs-actions.pod:3192
28229 msgid "guestfs_inspect_get_filesystems"
28233 #: ../src/guestfs-actions.pod:3194
28237 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
28238 " const char *root);\n"
28243 #: ../src/guestfs-actions.pod:3206
28245 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28246 "C<guestfs_inspect_get_mountpoints>."
28250 #: ../src/guestfs-actions.pod:3215
28251 msgid "guestfs_inspect_get_format"
28255 #: ../src/guestfs-actions.pod:3217
28259 " guestfs_inspect_get_format (guestfs_h *g,\n"
28260 " const char *root);\n"
28265 #: ../src/guestfs-actions.pod:3251 ../src/guestfs-actions.pod:3687
28266 #: ../src/guestfs-actions.pod:3703 ../src/guestfs-actions.pod:3721
28267 #: ../src/guestfs-actions.pod:6495
28268 msgid "(Added in 1.9.4)"
28272 #: ../src/guestfs-actions.pod:3253
28273 msgid "guestfs_inspect_get_hostname"
28277 #: ../src/guestfs-actions.pod:3255
28281 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28282 " const char *root);\n"
28287 #: ../src/guestfs-actions.pod:3270
28288 msgid "(Added in 1.7.9)"
28292 #: ../src/guestfs-actions.pod:3272
28293 msgid "guestfs_inspect_get_icon"
28297 #: ../src/guestfs-actions.pod:3274
28301 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28302 " const char *root,\n"
28303 " size_t *size_r,\n"
28309 #: ../src/guestfs-actions.pod:3285
28312 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28313 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28318 #: ../src/guestfs-actions.pod:3352 ../src/guestfs-actions.pod:4182
28319 #: ../src/guestfs-actions.pod:5426
28320 msgid "(Added in 1.11.12)"
28324 #: ../src/guestfs-actions.pod:3354
28325 msgid "guestfs_inspect_get_icon_va"
28329 #: ../src/guestfs-actions.pod:3356
28333 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28334 " const char *root,\n"
28335 " size_t *size_r,\n"
28336 " va_list args);\n"
28341 #: ../src/guestfs-actions.pod:3362
28342 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28346 #: ../src/guestfs-actions.pod:3366
28347 msgid "guestfs_inspect_get_icon_argv"
28351 #: ../src/guestfs-actions.pod:3368
28355 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28356 " const char *root,\n"
28357 " size_t *size_r,\n"
28358 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
28363 #: ../src/guestfs-actions.pod:3374
28364 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28368 #: ../src/guestfs-actions.pod:3378
28369 msgid "guestfs_inspect_get_major_version"
28373 #: ../src/guestfs-actions.pod:3380
28377 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28378 " const char *root);\n"
28383 #: ../src/guestfs-actions.pod:3402
28384 msgid "guestfs_inspect_get_minor_version"
28388 #: ../src/guestfs-actions.pod:3404
28392 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28393 " const char *root);\n"
28398 #: ../src/guestfs-actions.pod:3413
28400 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28401 "C<guestfs_inspect_get_major_version>."
28405 #: ../src/guestfs-actions.pod:3420
28406 msgid "guestfs_inspect_get_mountpoints"
28410 #: ../src/guestfs-actions.pod:3422
28414 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28415 " const char *root);\n"
28420 #: ../src/guestfs-actions.pod:3443
28422 "For operating systems like Windows which still use drive letters, this call "
28423 "will only return an entry for the first drive \"mounted on\" C</>. For "
28424 "information about the mapping of drive letters to partitions, see "
28425 "C<guestfs_inspect_get_drive_mappings>."
28429 #: ../src/guestfs-actions.pod:3449
28431 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28432 "C<guestfs_inspect_get_filesystems>."
28436 #: ../src/guestfs-actions.pod:3460
28437 msgid "guestfs_inspect_get_package_format"
28441 #: ../src/guestfs-actions.pod:3462
28445 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28446 " const char *root);\n"
28451 #: ../src/guestfs-actions.pod:3466
28453 "This function and C<guestfs_inspect_get_package_management> return the "
28454 "package format and package management tool used by the inspected operating "
28455 "system. For example for Fedora these functions would return C<rpm> (package"
28456 " format) and C<yum> (package management)."
28460 #: ../src/guestfs-actions.pod:3485 ../src/guestfs-actions.pod:3513
28461 msgid "(Added in 1.7.5)"
28465 #: ../src/guestfs-actions.pod:3487
28466 msgid "guestfs_inspect_get_package_management"
28470 #: ../src/guestfs-actions.pod:3489
28474 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28475 " const char *root);\n"
28480 #: ../src/guestfs-actions.pod:3493
28482 "C<guestfs_inspect_get_package_format> and this function return the package "
28483 "format and package management tool used by the inspected operating system. "
28484 "For example for Fedora these functions would return C<rpm> (package format) "
28485 "and C<yum> (package management)."
28489 #: ../src/guestfs-actions.pod:3515
28490 msgid "guestfs_inspect_get_product_name"
28494 #: ../src/guestfs-actions.pod:3517
28498 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28499 " const char *root);\n"
28504 #: ../src/guestfs-actions.pod:3536
28505 msgid "guestfs_inspect_get_product_variant"
28509 #: ../src/guestfs-actions.pod:3538
28513 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28514 " const char *root);\n"
28519 #: ../src/guestfs-actions.pod:3561
28521 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28522 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28526 #: ../src/guestfs-actions.pod:3568
28527 msgid "(Added in 1.9.13)"
28531 #: ../src/guestfs-actions.pod:3570
28532 msgid "guestfs_inspect_get_roots"
28536 #: ../src/guestfs-actions.pod:3572
28540 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28545 #: ../src/guestfs-actions.pod:3575
28547 "This function is a convenient way to get the list of root devices, as "
28548 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28549 "the whole inspection process."
28553 #: ../src/guestfs-actions.pod:3579
28555 "This returns an empty list if either no root devices were found or the "
28556 "caller has not called C<guestfs_inspect_os>."
28560 #: ../src/guestfs-actions.pod:3588
28561 msgid "(Added in 1.7.3)"
28565 #: ../src/guestfs-actions.pod:3590
28566 msgid "guestfs_inspect_get_type"
28570 #: ../src/guestfs-actions.pod:3592
28574 " guestfs_inspect_get_type (guestfs_h *g,\n"
28575 " const char *root);\n"
28580 #: ../src/guestfs-actions.pod:3633
28581 msgid "guestfs_inspect_get_windows_current_control_set"
28585 #: ../src/guestfs-actions.pod:3635
28589 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28590 " const char *root);\n"
28595 #: ../src/guestfs-actions.pod:3653
28596 msgid "guestfs_inspect_get_windows_systemroot"
28600 #: ../src/guestfs-actions.pod:3655
28604 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28605 " const char *root);\n"
28610 #: ../src/guestfs-actions.pod:3671
28611 msgid "(Added in 1.5.25)"
28615 #: ../src/guestfs-actions.pod:3673
28616 msgid "guestfs_inspect_is_live"
28620 #: ../src/guestfs-actions.pod:3675
28624 " guestfs_inspect_is_live (guestfs_h *g,\n"
28625 " const char *root);\n"
28630 #: ../src/guestfs-actions.pod:3679
28632 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28633 "disk), then this returns true if a live image was detected on the disk."
28637 #: ../src/guestfs-actions.pod:3689
28638 msgid "guestfs_inspect_is_multipart"
28642 #: ../src/guestfs-actions.pod:3691
28646 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28647 " const char *root);\n"
28652 #: ../src/guestfs-actions.pod:3695
28654 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28655 "disk), then this returns true if the disk is part of a set."
28659 #: ../src/guestfs-actions.pod:3705
28660 msgid "guestfs_inspect_is_netinst"
28664 #: ../src/guestfs-actions.pod:3707
28668 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28669 " const char *root);\n"
28674 #: ../src/guestfs-actions.pod:3711
28676 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28677 "disk), then this returns true if the disk is a network installer, ie. not a "
28678 "self-contained install CD but one which is likely to require network access "
28679 "to complete the install."
28683 #: ../src/guestfs-actions.pod:3723
28684 msgid "guestfs_inspect_list_applications"
28688 #: ../src/guestfs-actions.pod:3725
28691 " struct guestfs_application_list *\n"
28692 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28693 " const char *root);\n"
28698 #: ../src/guestfs-actions.pod:3731
28700 "I<Note:> This call works differently from other parts of the inspection API."
28701 " You have to call C<guestfs_inspect_os>, then "
28702 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28703 "this. Listing applications is a significantly more difficult operation "
28704 "which requires access to the full filesystem. Also note that unlike the "
28705 "other C<guestfs_inspect_get_*> calls which are just returning data cached in"
28706 " the libguestfs handle, this call actually reads parts of the mounted "
28707 "filesystems during the call."
28711 #: ../src/guestfs-actions.pod:3821
28713 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28714 "there was an error. I<The caller must call C<guestfs_free_application_list>"
28719 #: ../src/guestfs-actions.pod:3825
28720 msgid "(Added in 1.7.8)"
28724 #: ../src/guestfs-actions.pod:3827
28725 msgid "guestfs_inspect_os"
28729 #: ../src/guestfs-actions.pod:3829
28733 " guestfs_inspect_os (guestfs_h *g);\n"
28738 #: ../src/guestfs-actions.pod:3845
28740 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28741 "functions in order to query further information about each operating system,"
28742 " such as the name and version."
28746 #: ../src/guestfs-actions.pod:3850
28748 "This function uses other libguestfs features such as C<guestfs_mount_ro> and"
28749 " C<guestfs_umount_all> in order to mount and unmount filesystems and look at"
28750 " the contents. This should be called with no disks currently mounted. The "
28751 "function may also use Augeas, so any existing Augeas handle will be closed."
28755 #: ../src/guestfs-actions.pod:3862 ../src/guestfs-actions.pod:4193
28756 #: ../src/guestfs-actions.pod:4275
28757 msgid "See also C<guestfs_list_filesystems>."
28761 #: ../src/guestfs-actions.pod:3870
28762 msgid "guestfs_is_blockdev"
28766 #: ../src/guestfs-actions.pod:3872
28770 " guestfs_is_blockdev (guestfs_h *g,\n"
28771 " const char *path);\n"
28776 #: ../src/guestfs-actions.pod:3879 ../src/guestfs-actions.pod:3908
28777 #: ../src/guestfs-actions.pod:3938 ../src/guestfs-actions.pod:3953
28778 #: ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:4025
28779 #: ../src/guestfs-actions.pod:4040
28780 msgid "See also C<guestfs_stat>."
28784 #: ../src/guestfs-actions.pod:3883 ../src/guestfs-actions.pod:3912
28785 #: ../src/guestfs-actions.pod:3957 ../src/guestfs-actions.pod:4029
28786 #: ../src/guestfs-actions.pod:4044
28787 msgid "(Added in 1.5.10)"
28791 #: ../src/guestfs-actions.pod:3885
28792 msgid "guestfs_is_busy"
28796 #: ../src/guestfs-actions.pod:3887
28800 " guestfs_is_busy (guestfs_h *g);\n"
28805 #: ../src/guestfs-actions.pod:3899
28806 msgid "guestfs_is_chardev"
28810 #: ../src/guestfs-actions.pod:3901
28814 " guestfs_is_chardev (guestfs_h *g,\n"
28815 " const char *path);\n"
28820 #: ../src/guestfs-actions.pod:3914
28821 msgid "guestfs_is_config"
28825 #: ../src/guestfs-actions.pod:3916
28829 " guestfs_is_config (guestfs_h *g);\n"
28834 #: ../src/guestfs-actions.pod:3928
28835 msgid "guestfs_is_dir"
28839 #: ../src/guestfs-actions.pod:3930
28843 " guestfs_is_dir (guestfs_h *g,\n"
28844 " const char *path);\n"
28849 #: ../src/guestfs-actions.pod:3944
28850 msgid "guestfs_is_fifo"
28854 #: ../src/guestfs-actions.pod:3946
28858 " guestfs_is_fifo (guestfs_h *g,\n"
28859 " const char *path);\n"
28864 #: ../src/guestfs-actions.pod:3959
28865 msgid "guestfs_is_file"
28869 #: ../src/guestfs-actions.pod:3961
28873 " guestfs_is_file (guestfs_h *g,\n"
28874 " const char *path);\n"
28879 #: ../src/guestfs-actions.pod:3975
28880 msgid "guestfs_is_launching"
28884 #: ../src/guestfs-actions.pod:3977
28888 " guestfs_is_launching (guestfs_h *g);\n"
28893 #: ../src/guestfs-actions.pod:3989
28894 msgid "guestfs_is_lv"
28898 #: ../src/guestfs-actions.pod:3991
28902 " guestfs_is_lv (guestfs_h *g,\n"
28903 " const char *device);\n"
28908 #: ../src/guestfs-actions.pod:4002
28909 msgid "guestfs_is_ready"
28913 #: ../src/guestfs-actions.pod:4004
28917 " guestfs_is_ready (guestfs_h *g);\n"
28922 #: ../src/guestfs-actions.pod:4016
28923 msgid "guestfs_is_socket"
28927 #: ../src/guestfs-actions.pod:4018
28931 " guestfs_is_socket (guestfs_h *g,\n"
28932 " const char *path);\n"
28937 #: ../src/guestfs-actions.pod:4031
28938 msgid "guestfs_is_symlink"
28942 #: ../src/guestfs-actions.pod:4033
28946 " guestfs_is_symlink (guestfs_h *g,\n"
28947 " const char *path);\n"
28952 #: ../src/guestfs-actions.pod:4046
28953 msgid "guestfs_is_zero"
28957 #: ../src/guestfs-actions.pod:4048
28961 " guestfs_is_zero (guestfs_h *g,\n"
28962 " const char *path);\n"
28967 #: ../src/guestfs-actions.pod:4057 ../src/guestfs-actions.pod:4071
28968 msgid "(Added in 1.11.8)"
28972 #: ../src/guestfs-actions.pod:4059
28973 msgid "guestfs_is_zero_device"
28977 #: ../src/guestfs-actions.pod:4061
28981 " guestfs_is_zero_device (guestfs_h *g,\n"
28982 " const char *device);\n"
28987 #: ../src/guestfs-actions.pod:4073
28988 msgid "guestfs_kill_subprocess"
28992 #: ../src/guestfs-actions.pod:4075
28996 " guestfs_kill_subprocess (guestfs_h *g);\n"
29001 #: ../src/guestfs-actions.pod:4084
29002 msgid "guestfs_launch"
29006 #: ../src/guestfs-actions.pod:4086
29010 " guestfs_launch (guestfs_h *g);\n"
29015 #: ../src/guestfs-actions.pod:4104
29016 msgid "guestfs_lchown"
29020 #: ../src/guestfs-actions.pod:4106
29024 " guestfs_lchown (guestfs_h *g,\n"
29027 " const char *path);\n"
29032 #: ../src/guestfs-actions.pod:4112
29034 "Change the file owner to C<owner> and group to C<group>. This is like "
29035 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
29036 "changed, not the target."
29040 #: ../src/guestfs-actions.pod:4124
29041 msgid "guestfs_lgetxattr"
29045 #: ../src/guestfs-actions.pod:4126
29049 " guestfs_lgetxattr (guestfs_h *g,\n"
29050 " const char *path,\n"
29051 " const char *name,\n"
29052 " size_t *size_r);\n"
29057 #: ../src/guestfs-actions.pod:4146
29058 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
29062 #: ../src/guestfs-actions.pod:4154
29063 msgid "guestfs_lgetxattrs"
29067 #: ../src/guestfs-actions.pod:4156
29070 " struct guestfs_xattr_list *\n"
29071 " guestfs_lgetxattrs (guestfs_h *g,\n"
29072 " const char *path);\n"
29077 #: ../src/guestfs-actions.pod:4160
29079 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link,"
29080 " then it returns the extended attributes of the link itself."
29084 #: ../src/guestfs-actions.pod:4170
29085 msgid "guestfs_list_9p"
29089 #: ../src/guestfs-actions.pod:4172
29093 " guestfs_list_9p (guestfs_h *g);\n"
29098 #: ../src/guestfs-actions.pod:4184
29099 msgid "guestfs_list_devices"
29103 #: ../src/guestfs-actions.pod:4186
29107 " guestfs_list_devices (guestfs_h *g);\n"
29112 #: ../src/guestfs-actions.pod:4201
29113 msgid "guestfs_list_dm_devices"
29117 #: ../src/guestfs-actions.pod:4203
29121 " guestfs_list_dm_devices (guestfs_h *g);\n"
29126 #: ../src/guestfs-actions.pod:4208
29128 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
29129 "previous call to C<guestfs_luks_open>."
29133 #: ../src/guestfs-actions.pod:4211
29135 "Device mapper devices which correspond to logical volumes are I<not> "
29136 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
29141 #: ../src/guestfs-actions.pod:4219 ../src/guestfs-actions.pod:5665
29142 msgid "(Added in 1.11.15)"
29146 #: ../src/guestfs-actions.pod:4221
29147 msgid "guestfs_list_filesystems"
29151 #: ../src/guestfs-actions.pod:4223
29155 " guestfs_list_filesystems (guestfs_h *g);\n"
29160 #: ../src/guestfs-actions.pod:4243
29162 "This command runs other libguestfs commands, which might include "
29163 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
29164 "soon after launch and only when nothing is mounted."
29168 #: ../src/guestfs-actions.pod:4247
29170 "Not all of the filesystems returned will be mountable. In particular, swap "
29171 "partitions are returned in the list. Also this command does not check that "
29172 "each filesystem found is valid and mountable, and some filesystems might be "
29173 "mountable but require special options. Filesystems may not all belong to a "
29174 "single logical operating system (use C<guestfs_inspect_os> to look for "
29179 #: ../src/guestfs-actions.pod:4261 ../src/guestfs-actions.pod:6028
29180 msgid "(Added in 1.5.15)"
29184 #: ../src/guestfs-actions.pod:4263
29185 msgid "guestfs_list_partitions"
29189 #: ../src/guestfs-actions.pod:4265
29193 " guestfs_list_partitions (guestfs_h *g);\n"
29198 #: ../src/guestfs-actions.pod:4272
29200 "This does not return logical volumes. For that you will need to call "
29205 #: ../src/guestfs-actions.pod:4283
29210 #: ../src/guestfs-actions.pod:4285
29214 " guestfs_ll (guestfs_h *g,\n"
29215 " const char *directory);\n"
29220 #: ../src/guestfs-actions.pod:4300
29225 #: ../src/guestfs-actions.pod:4302
29229 " guestfs_ln (guestfs_h *g,\n"
29230 " const char *target,\n"
29231 " const char *linkname);\n"
29236 #: ../src/guestfs-actions.pod:4313
29237 msgid "guestfs_ln_f"
29241 #: ../src/guestfs-actions.pod:4315
29245 " guestfs_ln_f (guestfs_h *g,\n"
29246 " const char *target,\n"
29247 " const char *linkname);\n"
29252 #: ../src/guestfs-actions.pod:4327
29253 msgid "guestfs_ln_s"
29257 #: ../src/guestfs-actions.pod:4329
29261 " guestfs_ln_s (guestfs_h *g,\n"
29262 " const char *target,\n"
29263 " const char *linkname);\n"
29268 #: ../src/guestfs-actions.pod:4340
29269 msgid "guestfs_ln_sf"
29273 #: ../src/guestfs-actions.pod:4342
29277 " guestfs_ln_sf (guestfs_h *g,\n"
29278 " const char *target,\n"
29279 " const char *linkname);\n"
29284 #: ../src/guestfs-actions.pod:4354
29285 msgid "guestfs_lremovexattr"
29289 #: ../src/guestfs-actions.pod:4356
29293 " guestfs_lremovexattr (guestfs_h *g,\n"
29294 " const char *xattr,\n"
29295 " const char *path);\n"
29300 #: ../src/guestfs-actions.pod:4361
29302 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29303 "link, then it removes an extended attribute of the link itself."
29307 #: ../src/guestfs-actions.pod:4369
29312 #: ../src/guestfs-actions.pod:4371
29316 " guestfs_ls (guestfs_h *g,\n"
29317 " const char *directory);\n"
29322 #: ../src/guestfs-actions.pod:4379
29324 "This command is mostly useful for interactive sessions. Programs should "
29325 "probably use C<guestfs_readdir> instead."
29329 #: ../src/guestfs-actions.pod:4388
29330 msgid "guestfs_lsetxattr"
29334 #: ../src/guestfs-actions.pod:4390
29338 " guestfs_lsetxattr (guestfs_h *g,\n"
29339 " const char *xattr,\n"
29340 " const char *val,\n"
29342 " const char *path);\n"
29347 #: ../src/guestfs-actions.pod:4397
29349 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29350 "then it sets an extended attribute of the link itself."
29354 #: ../src/guestfs-actions.pod:4405
29355 msgid "guestfs_lstat"
29359 #: ../src/guestfs-actions.pod:4407
29362 " struct guestfs_stat *\n"
29363 " guestfs_lstat (guestfs_h *g,\n"
29364 " const char *path);\n"
29369 #: ../src/guestfs-actions.pod:4413
29371 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29372 "link, then the link is stat-ed, not the file it refers to."
29376 #: ../src/guestfs-actions.pod:4419 ../src/guestfs-actions.pod:7218
29378 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29379 "error. I<The caller must call C<guestfs_free_stat> after use>."
29383 #: ../src/guestfs-actions.pod:4423 ../src/guestfs-actions.pod:7222
29384 #: ../src/guestfs-actions.pod:7240 ../src/guestfs-actions.pod:7621
29385 msgid "(Added in 0.9.2)"
29389 #: ../src/guestfs-actions.pod:4425
29390 msgid "guestfs_lstatlist"
29394 #: ../src/guestfs-actions.pod:4427
29397 " struct guestfs_stat_list *\n"
29398 " guestfs_lstatlist (guestfs_h *g,\n"
29399 " const char *path,\n"
29400 " char *const *names);\n"
29405 #: ../src/guestfs-actions.pod:4432
29407 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29408 "files, where all files are in the directory C<path>. C<names> is the list "
29409 "of files from this directory."
29413 #: ../src/guestfs-actions.pod:4441
29415 "This call is intended for programs that want to efficiently list a directory"
29416 " contents without making many round-trips. See also C<guestfs_lxattrlist> "
29417 "for a similarly efficient call for getting extended attributes. Very long "
29418 "directory listings might cause the protocol message size to be exceeded, "
29419 "causing this call to fail. The caller must split up such requests into "
29420 "smaller groups of names."
29424 #: ../src/guestfs-actions.pod:4449
29426 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29427 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29431 #: ../src/guestfs-actions.pod:4455
29432 msgid "guestfs_luks_add_key"
29436 #: ../src/guestfs-actions.pod:4457
29440 " guestfs_luks_add_key (guestfs_h *g,\n"
29441 " const char *device,\n"
29442 " const char *key,\n"
29443 " const char *newkey,\n"
29449 #: ../src/guestfs-actions.pod:4469
29451 "Note that if C<keyslot> already contains a key, then this command will fail."
29452 " You have to use C<guestfs_luks_kill_slot> first to remove that key."
29456 #: ../src/guestfs-actions.pod:4475 ../src/guestfs-actions.pod:4515
29457 #: ../src/guestfs-actions.pod:4538 ../src/guestfs-actions.pod:4558
29458 #: ../src/guestfs-actions.pod:4593 ../src/guestfs-actions.pod:4612
29460 "This function takes a key or passphrase parameter which could contain "
29461 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29466 #: ../src/guestfs-actions.pod:4479 ../src/guestfs-actions.pod:4519
29467 #: ../src/guestfs-actions.pod:4542 ../src/guestfs-actions.pod:4562
29468 msgid "(Added in 1.5.2)"
29472 #: ../src/guestfs-actions.pod:4481
29473 msgid "guestfs_luks_close"
29477 #: ../src/guestfs-actions.pod:4483
29481 " guestfs_luks_close (guestfs_h *g,\n"
29482 " const char *device);\n"
29487 #: ../src/guestfs-actions.pod:4487
29489 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29490 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the"
29491 " LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the"
29492 " underlying block device."
29496 #: ../src/guestfs-actions.pod:4495 ../src/guestfs-actions.pod:4597
29497 #: ../src/guestfs-actions.pod:4616 ../src/guestfs-actions.pod:4666
29498 #: ../src/guestfs-actions.pod:4714
29499 msgid "(Added in 1.5.1)"
29503 #: ../src/guestfs-actions.pod:4497
29504 msgid "guestfs_luks_format"
29508 #: ../src/guestfs-actions.pod:4499
29512 " guestfs_luks_format (guestfs_h *g,\n"
29513 " const char *device,\n"
29514 " const char *key,\n"
29520 #: ../src/guestfs-actions.pod:4521
29521 msgid "guestfs_luks_format_cipher"
29525 #: ../src/guestfs-actions.pod:4523
29529 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29530 " const char *device,\n"
29531 " const char *key,\n"
29533 " const char *cipher);\n"
29538 #: ../src/guestfs-actions.pod:4530
29540 "This command is the same as C<guestfs_luks_format> but it also allows you to"
29541 " set the C<cipher> used."
29545 #: ../src/guestfs-actions.pod:4544
29546 msgid "guestfs_luks_kill_slot"
29550 #: ../src/guestfs-actions.pod:4546
29554 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29555 " const char *device,\n"
29556 " const char *key,\n"
29562 #: ../src/guestfs-actions.pod:4564
29563 msgid "guestfs_luks_open"
29567 #: ../src/guestfs-actions.pod:4566
29571 " guestfs_luks_open (guestfs_h *g,\n"
29572 " const char *device,\n"
29573 " const char *key,\n"
29574 " const char *mapname);\n"
29579 #: ../src/guestfs-actions.pod:4584
29581 "If this block device contains LVM volume groups, then calling "
29582 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29587 #: ../src/guestfs-actions.pod:4588
29588 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29592 #: ../src/guestfs-actions.pod:4599
29593 msgid "guestfs_luks_open_ro"
29597 #: ../src/guestfs-actions.pod:4601
29601 " guestfs_luks_open_ro (guestfs_h *g,\n"
29602 " const char *device,\n"
29603 " const char *key,\n"
29604 " const char *mapname);\n"
29609 #: ../src/guestfs-actions.pod:4607
29611 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29616 #: ../src/guestfs-actions.pod:4618
29617 msgid "guestfs_lvcreate"
29621 #: ../src/guestfs-actions.pod:4620
29625 " guestfs_lvcreate (guestfs_h *g,\n"
29626 " const char *logvol,\n"
29627 " const char *volgroup,\n"
29633 #: ../src/guestfs-actions.pod:4633
29634 msgid "guestfs_lvm_canonical_lv_name"
29638 #: ../src/guestfs-actions.pod:4635
29642 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29643 " const char *lvname);\n"
29648 #: ../src/guestfs-actions.pod:4646
29649 msgid "See also C<guestfs_is_lv>."
29653 #: ../src/guestfs-actions.pod:4651
29654 msgid "(Added in 1.5.24)"
29658 #: ../src/guestfs-actions.pod:4653
29659 msgid "guestfs_lvm_clear_filter"
29663 #: ../src/guestfs-actions.pod:4655
29667 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29672 #: ../src/guestfs-actions.pod:4658
29674 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29675 "see every block device."
29679 #: ../src/guestfs-actions.pod:4668
29680 msgid "guestfs_lvm_remove_all"
29684 #: ../src/guestfs-actions.pod:4670
29688 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29693 #: ../src/guestfs-actions.pod:4683
29694 msgid "guestfs_lvm_set_filter"
29698 #: ../src/guestfs-actions.pod:4685
29702 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29703 " char *const *devices);\n"
29708 #: ../src/guestfs-actions.pod:4716
29709 msgid "guestfs_lvremove"
29713 #: ../src/guestfs-actions.pod:4718
29717 " guestfs_lvremove (guestfs_h *g,\n"
29718 " const char *device);\n"
29723 #: ../src/guestfs-actions.pod:4730 ../src/guestfs-actions.pod:6141
29724 #: ../src/guestfs-actions.pod:7991
29725 msgid "(Added in 1.0.13)"
29729 #: ../src/guestfs-actions.pod:4732
29730 msgid "guestfs_lvrename"
29734 #: ../src/guestfs-actions.pod:4734
29738 " guestfs_lvrename (guestfs_h *g,\n"
29739 " const char *logvol,\n"
29740 " const char *newlogvol);\n"
29745 #: ../src/guestfs-actions.pod:4743 ../src/guestfs-actions.pod:8004
29746 msgid "(Added in 1.0.83)"
29750 #: ../src/guestfs-actions.pod:4745
29751 msgid "guestfs_lvresize"
29755 #: ../src/guestfs-actions.pod:4747
29759 " guestfs_lvresize (guestfs_h *g,\n"
29760 " const char *device,\n"
29766 #: ../src/guestfs-actions.pod:4760
29767 msgid "guestfs_lvresize_free"
29771 #: ../src/guestfs-actions.pod:4762
29775 " guestfs_lvresize_free (guestfs_h *g,\n"
29776 " const char *lv,\n"
29782 #: ../src/guestfs-actions.pod:4775
29783 msgid "(Added in 1.3.3)"
29787 #: ../src/guestfs-actions.pod:4777
29788 msgid "guestfs_lvs"
29792 #: ../src/guestfs-actions.pod:4779
29796 " guestfs_lvs (guestfs_h *g);\n"
29801 #: ../src/guestfs-actions.pod:4788
29802 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29806 #: ../src/guestfs-actions.pod:4796
29807 msgid "guestfs_lvs_full"
29811 #: ../src/guestfs-actions.pod:4798
29814 " struct guestfs_lvm_lv_list *\n"
29815 " guestfs_lvs_full (guestfs_h *g);\n"
29820 #: ../src/guestfs-actions.pod:4804
29822 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29823 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
29828 #: ../src/guestfs-actions.pod:4810
29829 msgid "guestfs_lvuuid"
29833 #: ../src/guestfs-actions.pod:4812
29837 " guestfs_lvuuid (guestfs_h *g,\n"
29838 " const char *device);\n"
29843 #: ../src/guestfs-actions.pod:4823
29844 msgid "guestfs_lxattrlist"
29848 #: ../src/guestfs-actions.pod:4825
29851 " struct guestfs_xattr_list *\n"
29852 " guestfs_lxattrlist (guestfs_h *g,\n"
29853 " const char *path,\n"
29854 " char *const *names);\n"
29859 #: ../src/guestfs-actions.pod:4844
29861 "This call is intended for programs that want to efficiently list a directory"
29862 " contents without making many round-trips. See also C<guestfs_lstatlist> "
29863 "for a similarly efficient call for getting standard stats. Very long "
29864 "directory listings might cause the protocol message size to be exceeded, "
29865 "causing this call to fail. The caller must split up such requests into "
29866 "smaller groups of names."
29870 #: ../src/guestfs-actions.pod:4858
29871 msgid "guestfs_mkdir"
29875 #: ../src/guestfs-actions.pod:4860
29879 " guestfs_mkdir (guestfs_h *g,\n"
29880 " const char *path);\n"
29885 #: ../src/guestfs-actions.pod:4870
29886 msgid "guestfs_mkdir_mode"
29890 #: ../src/guestfs-actions.pod:4872
29894 " guestfs_mkdir_mode (guestfs_h *g,\n"
29895 " const char *path,\n"
29901 #: ../src/guestfs-actions.pod:4884
29902 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
29906 #: ../src/guestfs-actions.pod:4890
29907 msgid "guestfs_mkdir_p"
29911 #: ../src/guestfs-actions.pod:4892
29915 " guestfs_mkdir_p (guestfs_h *g,\n"
29916 " const char *path);\n"
29921 #: ../src/guestfs-actions.pod:4903
29922 msgid "guestfs_mkdtemp"
29926 #: ../src/guestfs-actions.pod:4905
29930 " guestfs_mkdtemp (guestfs_h *g,\n"
29931 " const char *template);\n"
29936 #: ../src/guestfs-actions.pod:4933
29937 msgid "guestfs_mke2fs_J"
29941 #: ../src/guestfs-actions.pod:4935
29945 " guestfs_mke2fs_J (guestfs_h *g,\n"
29946 " const char *fstype,\n"
29947 " int blocksize,\n"
29948 " const char *device,\n"
29949 " const char *journal);\n"
29954 #: ../src/guestfs-actions.pod:4948
29955 msgid "See also C<guestfs_mke2journal>."
29959 #: ../src/guestfs-actions.pod:4952 ../src/guestfs-actions.pod:4970
29960 #: ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5004
29961 #: ../src/guestfs-actions.pod:5018 ../src/guestfs-actions.pod:5032
29962 #: ../src/guestfs-actions.pod:5091 ../src/guestfs-actions.pod:5368
29963 msgid "(Added in 1.0.68)"
29967 #: ../src/guestfs-actions.pod:4954
29968 msgid "guestfs_mke2fs_JL"
29972 #: ../src/guestfs-actions.pod:4956
29976 " guestfs_mke2fs_JL (guestfs_h *g,\n"
29977 " const char *fstype,\n"
29978 " int blocksize,\n"
29979 " const char *device,\n"
29980 " const char *label);\n"
29985 #: ../src/guestfs-actions.pod:4966
29986 msgid "See also C<guestfs_mke2journal_L>."
29990 #: ../src/guestfs-actions.pod:4972
29991 msgid "guestfs_mke2fs_JU"
29995 #: ../src/guestfs-actions.pod:4974
29999 " guestfs_mke2fs_JU (guestfs_h *g,\n"
30000 " const char *fstype,\n"
30001 " int blocksize,\n"
30002 " const char *device,\n"
30003 " const char *uuid);\n"
30008 #: ../src/guestfs-actions.pod:4984
30009 msgid "See also C<guestfs_mke2journal_U>."
30013 #: ../src/guestfs-actions.pod:4990
30014 msgid "guestfs_mke2journal"
30018 #: ../src/guestfs-actions.pod:4992
30022 " guestfs_mke2journal (guestfs_h *g,\n"
30023 " int blocksize,\n"
30024 " const char *device);\n"
30029 #: ../src/guestfs-actions.pod:5006
30030 msgid "guestfs_mke2journal_L"
30034 #: ../src/guestfs-actions.pod:5008
30038 " guestfs_mke2journal_L (guestfs_h *g,\n"
30039 " int blocksize,\n"
30040 " const char *label,\n"
30041 " const char *device);\n"
30046 #: ../src/guestfs-actions.pod:5020
30047 msgid "guestfs_mke2journal_U"
30051 #: ../src/guestfs-actions.pod:5022
30055 " guestfs_mke2journal_U (guestfs_h *g,\n"
30056 " int blocksize,\n"
30057 " const char *uuid,\n"
30058 " const char *device);\n"
30063 #: ../src/guestfs-actions.pod:5034
30064 msgid "guestfs_mkfifo"
30068 #: ../src/guestfs-actions.pod:5036
30072 " guestfs_mkfifo (guestfs_h *g,\n"
30074 " const char *path);\n"
30079 #: ../src/guestfs-actions.pod:5041
30081 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
30082 "is just a convenient wrapper around C<guestfs_mknod>."
30086 #: ../src/guestfs-actions.pod:5051
30087 msgid "guestfs_mkfs"
30091 #: ../src/guestfs-actions.pod:5053
30095 " guestfs_mkfs (guestfs_h *g,\n"
30096 " const char *fstype,\n"
30097 " const char *device);\n"
30102 #: ../src/guestfs-actions.pod:5066
30103 msgid "guestfs_mkfs_b"
30107 #: ../src/guestfs-actions.pod:5068
30111 " guestfs_mkfs_b (guestfs_h *g,\n"
30112 " const char *fstype,\n"
30113 " int blocksize,\n"
30114 " const char *device);\n"
30119 #: ../src/guestfs-actions.pod:5074
30121 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
30126 #: ../src/guestfs-actions.pod:5081
30128 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
30129 "block size of the resulting filesystem. Supported block sizes depend on the"
30130 " filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
30134 #: ../src/guestfs-actions.pod:5093
30135 msgid "guestfs_mkfs_opts"
30139 #: ../src/guestfs-actions.pod:5095
30143 " guestfs_mkfs_opts (guestfs_h *g,\n"
30144 " const char *fstype,\n"
30145 " const char *device,\n"
30151 #: ../src/guestfs-actions.pod:5106
30154 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
30155 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
30156 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
30157 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
30162 #: ../src/guestfs-actions.pod:5154
30163 msgid "(Added in 1.7.19)"
30167 #: ../src/guestfs-actions.pod:5156
30168 msgid "guestfs_mkfs_opts_va"
30172 #: ../src/guestfs-actions.pod:5158
30176 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
30177 " const char *fstype,\n"
30178 " const char *device,\n"
30179 " va_list args);\n"
30184 #: ../src/guestfs-actions.pod:5164
30185 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
30189 #: ../src/guestfs-actions.pod:5168
30190 msgid "guestfs_mkfs_opts_argv"
30194 #: ../src/guestfs-actions.pod:5170
30198 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
30199 " const char *fstype,\n"
30200 " const char *device,\n"
30201 " const struct guestfs_mkfs_opts_argv *optargs);\n"
30206 #: ../src/guestfs-actions.pod:5176
30207 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
30211 #: ../src/guestfs-actions.pod:5180
30212 msgid "guestfs_mkmountpoint"
30216 #: ../src/guestfs-actions.pod:5182
30220 " guestfs_mkmountpoint (guestfs_h *g,\n"
30221 " const char *exemptpath);\n"
30226 #: ../src/guestfs-actions.pod:5186
30228 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
30229 "that can be used to create extra mountpoints before mounting the first "
30234 #: ../src/guestfs-actions.pod:5210
30236 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
30237 "may get unexpected errors if you try to mix these calls. It is safest to "
30238 "manually unmount filesystems and remove mountpoints after use."
30242 #: ../src/guestfs-actions.pod:5214
30244 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
30245 "first, so for this to work for manual mountpoints, you must ensure that the "
30246 "innermost mountpoints have the longest pathnames, as in the example code "
30251 #: ../src/guestfs-actions.pod:5221
30253 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
30254 "can cause C<guestfs_umount_all> to be called when the handle is closed which"
30255 " can also trigger these issues."
30259 #: ../src/guestfs-actions.pod:5227 ../src/guestfs-actions.pod:5533
30260 #: ../src/guestfs-actions.pod:6561
30261 msgid "(Added in 1.0.62)"
30265 #: ../src/guestfs-actions.pod:5229
30266 msgid "guestfs_mknod"
30270 #: ../src/guestfs-actions.pod:5231
30274 " guestfs_mknod (guestfs_h *g,\n"
30278 " const char *path);\n"
30283 #: ../src/guestfs-actions.pod:5246
30285 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30286 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30287 "regular file). These constants are available in the standard Linux header "
30288 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30289 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in"
30290 " the appropriate constant for you."
30294 #: ../src/guestfs-actions.pod:5260
30295 msgid "guestfs_mknod_b"
30299 #: ../src/guestfs-actions.pod:5262
30303 " guestfs_mknod_b (guestfs_h *g,\n"
30307 " const char *path);\n"
30312 #: ../src/guestfs-actions.pod:5269
30314 "This call creates a block device node called C<path> with mode C<mode> and "
30315 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30316 "wrapper around C<guestfs_mknod>."
30320 #: ../src/guestfs-actions.pod:5279
30321 msgid "guestfs_mknod_c"
30325 #: ../src/guestfs-actions.pod:5281
30329 " guestfs_mknod_c (guestfs_h *g,\n"
30333 " const char *path);\n"
30338 #: ../src/guestfs-actions.pod:5288
30340 "This call creates a char device node called C<path> with mode C<mode> and "
30341 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30342 "wrapper around C<guestfs_mknod>."
30346 #: ../src/guestfs-actions.pod:5298
30347 msgid "guestfs_mkswap"
30351 #: ../src/guestfs-actions.pod:5300
30355 " guestfs_mkswap (guestfs_h *g,\n"
30356 " const char *device);\n"
30361 #: ../src/guestfs-actions.pod:5310
30362 msgid "guestfs_mkswap_L"
30366 #: ../src/guestfs-actions.pod:5312
30370 " guestfs_mkswap_L (guestfs_h *g,\n"
30371 " const char *label,\n"
30372 " const char *device);\n"
30377 #: ../src/guestfs-actions.pod:5327
30378 msgid "guestfs_mkswap_U"
30382 #: ../src/guestfs-actions.pod:5329
30386 " guestfs_mkswap_U (guestfs_h *g,\n"
30387 " const char *uuid,\n"
30388 " const char *device);\n"
30393 #: ../src/guestfs-actions.pod:5340
30394 msgid "guestfs_mkswap_file"
30398 #: ../src/guestfs-actions.pod:5342
30402 " guestfs_mkswap_file (guestfs_h *g,\n"
30403 " const char *path);\n"
30408 #: ../src/guestfs-actions.pod:5348
30410 "This command just writes a swap file signature to an existing file. To "
30411 "create the file itself, use something like C<guestfs_fallocate>."
30415 #: ../src/guestfs-actions.pod:5355
30416 msgid "guestfs_modprobe"
30420 #: ../src/guestfs-actions.pod:5357
30424 " guestfs_modprobe (guestfs_h *g,\n"
30425 " const char *modulename);\n"
30430 #: ../src/guestfs-actions.pod:5370
30431 msgid "guestfs_mount"
30435 #: ../src/guestfs-actions.pod:5372
30439 " guestfs_mount (guestfs_h *g,\n"
30440 " const char *device,\n"
30441 " const char *mountpoint);\n"
30446 #: ../src/guestfs-actions.pod:5391
30448 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30449 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30450 "problems for users. If your program might need to work with older versions "
30451 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30452 "for the first parameter if you don't want any options)."
30456 #: ../src/guestfs-actions.pod:5402
30457 msgid "guestfs_mount_9p"
30461 #: ../src/guestfs-actions.pod:5404
30465 " guestfs_mount_9p (guestfs_h *g,\n"
30466 " const char *mounttag,\n"
30467 " const char *mountpoint,\n"
30473 #: ../src/guestfs-actions.pod:5415
30476 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30481 #: ../src/guestfs-actions.pod:5428
30482 msgid "guestfs_mount_9p_va"
30486 #: ../src/guestfs-actions.pod:5430
30490 " guestfs_mount_9p_va (guestfs_h *g,\n"
30491 " const char *mounttag,\n"
30492 " const char *mountpoint,\n"
30493 " va_list args);\n"
30498 #: ../src/guestfs-actions.pod:5436
30499 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30503 #: ../src/guestfs-actions.pod:5440
30504 msgid "guestfs_mount_9p_argv"
30508 #: ../src/guestfs-actions.pod:5442
30512 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30513 " const char *mounttag,\n"
30514 " const char *mountpoint,\n"
30515 " const struct guestfs_mount_9p_argv *optargs);\n"
30520 #: ../src/guestfs-actions.pod:5448
30521 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30525 #: ../src/guestfs-actions.pod:5452
30526 msgid "guestfs_mount_loop"
30530 #: ../src/guestfs-actions.pod:5454
30534 " guestfs_mount_loop (guestfs_h *g,\n"
30535 " const char *file,\n"
30536 " const char *mountpoint);\n"
30541 #: ../src/guestfs-actions.pod:5467
30542 msgid "guestfs_mount_options"
30546 #: ../src/guestfs-actions.pod:5469
30550 " guestfs_mount_options (guestfs_h *g,\n"
30551 " const char *options,\n"
30552 " const char *device,\n"
30553 " const char *mountpoint);\n"
30558 #: ../src/guestfs-actions.pod:5475
30560 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30561 "the mount options as for the L<mount(8)> I<-o> flag."
30565 #: ../src/guestfs-actions.pod:5485 ../src/guestfs-actions.pod:5499
30566 #: ../src/guestfs-actions.pod:5516
30567 msgid "(Added in 1.0.10)"
30571 #: ../src/guestfs-actions.pod:5487
30572 msgid "guestfs_mount_ro"
30576 #: ../src/guestfs-actions.pod:5489
30580 " guestfs_mount_ro (guestfs_h *g,\n"
30581 " const char *device,\n"
30582 " const char *mountpoint);\n"
30587 #: ../src/guestfs-actions.pod:5494
30589 "This is the same as the C<guestfs_mount> command, but it mounts the "
30590 "filesystem with the read-only (I<-o ro>) flag."
30594 #: ../src/guestfs-actions.pod:5501
30595 msgid "guestfs_mount_vfs"
30599 #: ../src/guestfs-actions.pod:5503
30603 " guestfs_mount_vfs (guestfs_h *g,\n"
30604 " const char *options,\n"
30605 " const char *vfstype,\n"
30606 " const char *device,\n"
30607 " const char *mountpoint);\n"
30612 #: ../src/guestfs-actions.pod:5510
30614 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30615 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
30620 #: ../src/guestfs-actions.pod:5518
30621 msgid "guestfs_mountpoints"
30625 #: ../src/guestfs-actions.pod:5520
30629 " guestfs_mountpoints (guestfs_h *g);\n"
30634 #: ../src/guestfs-actions.pod:5523
30636 "This call is similar to C<guestfs_mounts>. That call returns a list of "
30637 "devices. This one returns a hash table (map) of device name to directory "
30638 "where the device is mounted."
30642 #: ../src/guestfs-actions.pod:5535
30643 msgid "guestfs_mounts"
30647 #: ../src/guestfs-actions.pod:5537
30651 " guestfs_mounts (guestfs_h *g);\n"
30656 #: ../src/guestfs-actions.pod:5545
30657 msgid "See also: C<guestfs_mountpoints>"
30661 #: ../src/guestfs-actions.pod:5553
30666 #: ../src/guestfs-actions.pod:5555
30670 " guestfs_mv (guestfs_h *g,\n"
30671 " const char *src,\n"
30672 " const char *dest);\n"
30677 #: ../src/guestfs-actions.pod:5567
30678 msgid "guestfs_ntfs_3g_probe"
30682 #: ../src/guestfs-actions.pod:5569
30686 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
30688 " const char *device);\n"
30693 #: ../src/guestfs-actions.pod:5588
30694 msgid "(Added in 1.0.43)"
30698 #: ../src/guestfs-actions.pod:5590
30699 msgid "guestfs_ntfsresize"
30703 #: ../src/guestfs-actions.pod:5592
30707 " guestfs_ntfsresize (guestfs_h *g,\n"
30708 " const char *device);\n"
30713 #: ../src/guestfs-actions.pod:5596 ../src/guestfs-actions.pod:5696
30715 "I<This function is deprecated.> In new code, use the "
30716 "L</guestfs_ntfsresize_opts> call instead."
30720 #: ../src/guestfs-actions.pod:5620
30721 msgid "guestfs_ntfsresize_opts"
30725 #: ../src/guestfs-actions.pod:5622
30729 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
30730 " const char *device,\n"
30736 #: ../src/guestfs-actions.pod:5632
30739 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
30740 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
30745 #: ../src/guestfs-actions.pod:5652
30747 "After the resize operation, the filesystem is always marked as requiring a "
30748 "consistency check (for safety). You have to boot into Windows to perform "
30749 "this check and clear this condition. If you I<don't> set the C<force> "
30750 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
30751 "times on a single filesystem without booting into Windows between each "
30756 #: ../src/guestfs-actions.pod:5667
30757 msgid "guestfs_ntfsresize_opts_va"
30761 #: ../src/guestfs-actions.pod:5669
30765 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
30766 " const char *device,\n"
30767 " va_list args);\n"
30772 #: ../src/guestfs-actions.pod:5674
30773 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
30777 #: ../src/guestfs-actions.pod:5678
30778 msgid "guestfs_ntfsresize_opts_argv"
30782 #: ../src/guestfs-actions.pod:5680
30786 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30787 " const char *device,\n"
30788 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
30793 #: ../src/guestfs-actions.pod:5685
30794 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30798 #: ../src/guestfs-actions.pod:5689
30799 msgid "guestfs_ntfsresize_size"
30803 #: ../src/guestfs-actions.pod:5691
30807 " guestfs_ntfsresize_size (guestfs_h *g,\n"
30808 " const char *device,\n"
30809 " int64_t size);\n"
30814 #: ../src/guestfs-actions.pod:5703
30816 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
30817 "to specify the new size (in bytes) explicitly."
30821 #: ../src/guestfs-actions.pod:5708 ../src/guestfs-actions.pod:6168
30822 #: ../src/guestfs-actions.pod:6241 ../src/guestfs-actions.pod:6509
30823 #: ../src/guestfs-actions.pod:8148
30824 msgid "(Added in 1.3.14)"
30828 #: ../src/guestfs-actions.pod:5710
30829 msgid "guestfs_part_add"
30833 #: ../src/guestfs-actions.pod:5712
30837 " guestfs_part_add (guestfs_h *g,\n"
30838 " const char *device,\n"
30839 " const char *prlogex,\n"
30840 " int64_t startsect,\n"
30841 " int64_t endsect);\n"
30846 #: ../src/guestfs-actions.pod:5719
30848 "This command adds a partition to C<device>. If there is no partition table "
30849 "on the device, call C<guestfs_part_init> first."
30853 #: ../src/guestfs-actions.pod:5731
30855 "Creating a partition which covers the whole disk is not so easy. Use "
30856 "C<guestfs_part_disk> to do that."
30860 #: ../src/guestfs-actions.pod:5736 ../src/guestfs-actions.pod:5774
30861 #: ../src/guestfs-actions.pod:5827 ../src/guestfs-actions.pod:5911
30862 #: ../src/guestfs-actions.pod:5949 ../src/guestfs-actions.pod:5968
30863 #: ../src/guestfs-actions.pod:6008
30864 msgid "(Added in 1.0.78)"
30868 #: ../src/guestfs-actions.pod:5738
30869 msgid "guestfs_part_del"
30873 #: ../src/guestfs-actions.pod:5740
30877 " guestfs_part_del (guestfs_h *g,\n"
30878 " const char *device,\n"
30884 #: ../src/guestfs-actions.pod:5755
30885 msgid "guestfs_part_disk"
30889 #: ../src/guestfs-actions.pod:5757
30893 " guestfs_part_disk (guestfs_h *g,\n"
30894 " const char *device,\n"
30895 " const char *parttype);\n"
30900 #: ../src/guestfs-actions.pod:5762
30902 "This command is simply a combination of C<guestfs_part_init> followed by "
30903 "C<guestfs_part_add> to create a single primary partition covering the whole "
30908 #: ../src/guestfs-actions.pod:5766
30910 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other"
30911 " possible values are described in C<guestfs_part_init>."
30915 #: ../src/guestfs-actions.pod:5776
30916 msgid "guestfs_part_get_bootable"
30920 #: ../src/guestfs-actions.pod:5778
30924 " guestfs_part_get_bootable (guestfs_h *g,\n"
30925 " const char *device,\n"
30931 #: ../src/guestfs-actions.pod:5786
30932 msgid "See also C<guestfs_part_set_bootable>."
30936 #: ../src/guestfs-actions.pod:5792
30937 msgid "guestfs_part_get_mbr_id"
30941 #: ../src/guestfs-actions.pod:5794
30945 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
30946 " const char *device,\n"
30952 #: ../src/guestfs-actions.pod:5802 ../src/guestfs-actions.pod:5984
30954 "Note that only MBR (old DOS-style) partitions have type bytes. You will get"
30955 " undefined results for other partition table types (see "
30956 "C<guestfs_part_get_parttype>)."
30960 #: ../src/guestfs-actions.pod:5810
30961 msgid "guestfs_part_get_parttype"
30965 #: ../src/guestfs-actions.pod:5812
30969 " guestfs_part_get_parttype (guestfs_h *g,\n"
30970 " const char *device);\n"
30975 #: ../src/guestfs-actions.pod:5819
30977 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30978 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30979 "possible, although unusual. See C<guestfs_part_init> for a full list."
30983 #: ../src/guestfs-actions.pod:5829
30984 msgid "guestfs_part_init"
30988 #: ../src/guestfs-actions.pod:5831
30992 " guestfs_part_init (guestfs_h *g,\n"
30993 " const char *device,\n"
30994 " const char *parttype);\n"
30999 #: ../src/guestfs-actions.pod:5840
31001 "Initially there are no partitions. Following this, you should call "
31002 "C<guestfs_part_add> for each partition required."
31006 #: ../src/guestfs-actions.pod:5913
31007 msgid "guestfs_part_list"
31011 #: ../src/guestfs-actions.pod:5915
31014 " struct guestfs_partition_list *\n"
31015 " guestfs_part_list (guestfs_h *g,\n"
31016 " const char *device);\n"
31021 #: ../src/guestfs-actions.pod:5932
31023 "Start of the partition I<in bytes>. To get sectors you have to divide by "
31024 "the device's sector size, see C<guestfs_blockdev_getss>."
31028 #: ../src/guestfs-actions.pod:5945
31030 "This function returns a C<struct guestfs_partition_list *>, or NULL if there"
31031 " was an error. I<The caller must call C<guestfs_free_partition_list> after "
31036 #: ../src/guestfs-actions.pod:5951
31037 msgid "guestfs_part_set_bootable"
31041 #: ../src/guestfs-actions.pod:5953
31045 " guestfs_part_set_bootable (guestfs_h *g,\n"
31046 " const char *device,\n"
31048 " int bootable);\n"
31053 #: ../src/guestfs-actions.pod:5970
31054 msgid "guestfs_part_set_mbr_id"
31058 #: ../src/guestfs-actions.pod:5972
31062 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
31063 " const char *device,\n"
31070 #: ../src/guestfs-actions.pod:5992
31071 msgid "guestfs_part_set_name"
31075 #: ../src/guestfs-actions.pod:5994
31079 " guestfs_part_set_name (guestfs_h *g,\n"
31080 " const char *device,\n"
31082 " const char *name);\n"
31087 #: ../src/guestfs-actions.pod:6010
31088 msgid "guestfs_part_to_dev"
31092 #: ../src/guestfs-actions.pod:6012
31096 " guestfs_part_to_dev (guestfs_h *g,\n"
31097 " const char *partition);\n"
31102 #: ../src/guestfs-actions.pod:6020 ../src/guestfs-actions.pod:6039
31104 "The named partition must exist, for example as a string returned from "
31105 "C<guestfs_list_partitions>."
31109 #: ../src/guestfs-actions.pod:6023
31110 msgid "See also C<guestfs_part_to_partnum>."
31114 #: ../src/guestfs-actions.pod:6030
31115 msgid "guestfs_part_to_partnum"
31119 #: ../src/guestfs-actions.pod:6032
31123 " guestfs_part_to_partnum (guestfs_h *g,\n"
31124 " const char *partition);\n"
31129 #: ../src/guestfs-actions.pod:6042
31130 msgid "See also C<guestfs_part_to_dev>."
31134 #: ../src/guestfs-actions.pod:6046
31135 msgid "guestfs_ping_daemon"
31139 #: ../src/guestfs-actions.pod:6048
31143 " guestfs_ping_daemon (guestfs_h *g);\n"
31148 #: ../src/guestfs-actions.pod:6060
31149 msgid "guestfs_pread"
31153 #: ../src/guestfs-actions.pod:6062
31157 " guestfs_pread (guestfs_h *g,\n"
31158 " const char *path,\n"
31160 " int64_t offset,\n"
31161 " size_t *size_r);\n"
31166 #: ../src/guestfs-actions.pod:6075
31167 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
31171 #: ../src/guestfs-actions.pod:6086
31172 msgid "guestfs_pread_device"
31176 #: ../src/guestfs-actions.pod:6088
31180 " guestfs_pread_device (guestfs_h *g,\n"
31181 " const char *device,\n"
31183 " int64_t offset,\n"
31184 " size_t *size_r);\n"
31189 #: ../src/guestfs-actions.pod:6101
31190 msgid "See also C<guestfs_pread>."
31194 #: ../src/guestfs-actions.pod:6110
31195 msgid "(Added in 1.5.21)"
31199 #: ../src/guestfs-actions.pod:6112
31200 msgid "guestfs_pvcreate"
31204 #: ../src/guestfs-actions.pod:6114
31208 " guestfs_pvcreate (guestfs_h *g,\n"
31209 " const char *device);\n"
31214 #: ../src/guestfs-actions.pod:6126
31215 msgid "guestfs_pvremove"
31219 #: ../src/guestfs-actions.pod:6128
31223 " guestfs_pvremove (guestfs_h *g,\n"
31224 " const char *device);\n"
31229 #: ../src/guestfs-actions.pod:6143
31230 msgid "guestfs_pvresize"
31234 #: ../src/guestfs-actions.pod:6145
31238 " guestfs_pvresize (guestfs_h *g,\n"
31239 " const char *device);\n"
31244 #: ../src/guestfs-actions.pod:6156
31245 msgid "guestfs_pvresize_size"
31249 #: ../src/guestfs-actions.pod:6158
31253 " guestfs_pvresize_size (guestfs_h *g,\n"
31254 " const char *device,\n"
31255 " int64_t size);\n"
31260 #: ../src/guestfs-actions.pod:6163
31262 "This command is the same as C<guestfs_pvresize> except that it allows you to"
31263 " specify the new size (in bytes) explicitly."
31267 #: ../src/guestfs-actions.pod:6170
31268 msgid "guestfs_pvs"
31272 #: ../src/guestfs-actions.pod:6172
31276 " guestfs_pvs (guestfs_h *g);\n"
31281 #: ../src/guestfs-actions.pod:6181
31282 msgid "See also C<guestfs_pvs_full>."
31286 #: ../src/guestfs-actions.pod:6189
31287 msgid "guestfs_pvs_full"
31291 #: ../src/guestfs-actions.pod:6191
31294 " struct guestfs_lvm_pv_list *\n"
31295 " guestfs_pvs_full (guestfs_h *g);\n"
31300 #: ../src/guestfs-actions.pod:6197
31302 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31303 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
31308 #: ../src/guestfs-actions.pod:6203
31309 msgid "guestfs_pvuuid"
31313 #: ../src/guestfs-actions.pod:6205
31317 " guestfs_pvuuid (guestfs_h *g,\n"
31318 " const char *device);\n"
31323 #: ../src/guestfs-actions.pod:6216
31324 msgid "guestfs_pwrite"
31328 #: ../src/guestfs-actions.pod:6218
31332 " guestfs_pwrite (guestfs_h *g,\n"
31333 " const char *path,\n"
31334 " const char *content,\n"
31335 " size_t content_size,\n"
31336 " int64_t offset);\n"
31341 #: ../src/guestfs-actions.pod:6234
31342 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31346 #: ../src/guestfs-actions.pod:6243
31347 msgid "guestfs_pwrite_device"
31351 #: ../src/guestfs-actions.pod:6245
31355 " guestfs_pwrite_device (guestfs_h *g,\n"
31356 " const char *device,\n"
31357 " const char *content,\n"
31358 " size_t content_size,\n"
31359 " int64_t offset);\n"
31364 #: ../src/guestfs-actions.pod:6260
31365 msgid "See also C<guestfs_pwrite>."
31369 #: ../src/guestfs-actions.pod:6267
31370 msgid "(Added in 1.5.20)"
31374 #: ../src/guestfs-actions.pod:6269
31375 msgid "guestfs_read_file"
31379 #: ../src/guestfs-actions.pod:6271
31383 " guestfs_read_file (guestfs_h *g,\n"
31384 " const char *path,\n"
31385 " size_t *size_r);\n"
31390 #: ../src/guestfs-actions.pod:6279
31392 "Unlike C<guestfs_cat>, this function can correctly handle files that contain"
31393 " embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31394 "function is limited in the total size of file that can be handled."
31398 #: ../src/guestfs-actions.pod:6291
31399 msgid "(Added in 1.0.63)"
31403 #: ../src/guestfs-actions.pod:6293
31404 msgid "guestfs_read_lines"
31408 #: ../src/guestfs-actions.pod:6295
31412 " guestfs_read_lines (guestfs_h *g,\n"
31413 " const char *path);\n"
31418 #: ../src/guestfs-actions.pod:6304
31420 "Note that this function cannot correctly handle binary files (specifically, "
31421 "files containing C<\\0> character which is treated as end of line). For "
31422 "those you need to use the C<guestfs_read_file> function which has a more "
31423 "complex interface."
31427 #: ../src/guestfs-actions.pod:6315
31428 msgid "guestfs_readdir"
31432 #: ../src/guestfs-actions.pod:6317
31435 " struct guestfs_dirent_list *\n"
31436 " guestfs_readdir (guestfs_h *g,\n"
31437 " const char *dir);\n"
31442 #: ../src/guestfs-actions.pod:6371
31444 "This function is primarily intended for use by programs. To get a simple "
31445 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31446 "consumption, use C<guestfs_ll>."
31450 #: ../src/guestfs-actions.pod:6375
31452 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31453 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
31458 #: ../src/guestfs-actions.pod:6381
31459 msgid "guestfs_readlink"
31463 #: ../src/guestfs-actions.pod:6383
31467 " guestfs_readlink (guestfs_h *g,\n"
31468 " const char *path);\n"
31473 #: ../src/guestfs-actions.pod:6394
31474 msgid "guestfs_readlinklist"
31478 #: ../src/guestfs-actions.pod:6396
31482 " guestfs_readlinklist (guestfs_h *g,\n"
31483 " const char *path,\n"
31484 " char *const *names);\n"
31489 #: ../src/guestfs-actions.pod:6429
31490 msgid "guestfs_realpath"
31494 #: ../src/guestfs-actions.pod:6431
31498 " guestfs_realpath (guestfs_h *g,\n"
31499 " const char *path);\n"
31504 #: ../src/guestfs-actions.pod:6443
31505 msgid "guestfs_removexattr"
31509 #: ../src/guestfs-actions.pod:6445
31513 " guestfs_removexattr (guestfs_h *g,\n"
31514 " const char *xattr,\n"
31515 " const char *path);\n"
31520 #: ../src/guestfs-actions.pod:6453
31521 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31525 #: ../src/guestfs-actions.pod:6459
31526 msgid "guestfs_resize2fs"
31530 #: ../src/guestfs-actions.pod:6461
31534 " guestfs_resize2fs (guestfs_h *g,\n"
31535 " const char *device);\n"
31540 #: ../src/guestfs-actions.pod:6468
31542 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31543 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31544 "sometimes gives an error about this and sometimes not. In any case, it is "
31545 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31549 #: ../src/guestfs-actions.pod:6478
31550 msgid "guestfs_resize2fs_M"
31554 #: ../src/guestfs-actions.pod:6480
31558 " guestfs_resize2fs_M (guestfs_h *g,\n"
31559 " const char *device);\n"
31564 #: ../src/guestfs-actions.pod:6484
31566 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31567 "resized to its minimum size. This works like the I<-M> option to the "
31568 "C<resize2fs> command."
31572 #: ../src/guestfs-actions.pod:6488
31574 "To get the resulting size of the filesystem you should call "
31575 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31576 "These two numbers, multiplied together, give the resulting size of the "
31577 "minimal filesystem in bytes."
31581 #: ../src/guestfs-actions.pod:6497
31582 msgid "guestfs_resize2fs_size"
31586 #: ../src/guestfs-actions.pod:6499
31590 " guestfs_resize2fs_size (guestfs_h *g,\n"
31591 " const char *device,\n"
31592 " int64_t size);\n"
31597 #: ../src/guestfs-actions.pod:6504
31599 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31600 "to specify the new size (in bytes) explicitly."
31604 #: ../src/guestfs-actions.pod:6511
31609 #: ../src/guestfs-actions.pod:6513
31613 " guestfs_rm (guestfs_h *g,\n"
31614 " const char *path);\n"
31619 #: ../src/guestfs-actions.pod:6523
31620 msgid "guestfs_rm_rf"
31624 #: ../src/guestfs-actions.pod:6525
31628 " guestfs_rm_rf (guestfs_h *g,\n"
31629 " const char *path);\n"
31634 #: ../src/guestfs-actions.pod:6537
31635 msgid "guestfs_rmdir"
31639 #: ../src/guestfs-actions.pod:6539
31643 " guestfs_rmdir (guestfs_h *g,\n"
31644 " const char *path);\n"
31649 #: ../src/guestfs-actions.pod:6549
31650 msgid "guestfs_rmmountpoint"
31654 #: ../src/guestfs-actions.pod:6551
31658 " guestfs_rmmountpoint (guestfs_h *g,\n"
31659 " const char *exemptpath);\n"
31664 #: ../src/guestfs-actions.pod:6555
31666 "This calls removes a mountpoint that was previously created with "
31667 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
31671 #: ../src/guestfs-actions.pod:6563
31672 msgid "guestfs_scrub_device"
31676 #: ../src/guestfs-actions.pod:6565
31680 " guestfs_scrub_device (guestfs_h *g,\n"
31681 " const char *device);\n"
31686 #: ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6598
31687 #: ../src/guestfs-actions.pod:6617
31688 msgid "(Added in 1.0.52)"
31692 #: ../src/guestfs-actions.pod:6582
31693 msgid "guestfs_scrub_file"
31697 #: ../src/guestfs-actions.pod:6584
31701 " guestfs_scrub_file (guestfs_h *g,\n"
31702 " const char *file);\n"
31707 #: ../src/guestfs-actions.pod:6600
31708 msgid "guestfs_scrub_freespace"
31712 #: ../src/guestfs-actions.pod:6602
31716 " guestfs_scrub_freespace (guestfs_h *g,\n"
31717 " const char *dir);\n"
31722 #: ../src/guestfs-actions.pod:6606
31724 "This command creates the directory C<dir> and then fills it with files until"
31725 " the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
31726 "and deletes them. The intention is to scrub any free space on the partition"
31727 " containing C<dir>."
31731 #: ../src/guestfs-actions.pod:6619
31732 msgid "guestfs_set_append"
31736 #: ../src/guestfs-actions.pod:6621
31740 " guestfs_set_append (guestfs_h *g,\n"
31741 " const char *append);\n"
31746 #: ../src/guestfs-actions.pod:6638
31747 msgid "guestfs_set_attach_method"
31751 #: ../src/guestfs-actions.pod:6640
31755 " guestfs_set_attach_method (guestfs_h *g,\n"
31756 " const char *attachmethod);\n"
31761 #: ../src/guestfs-actions.pod:6668
31762 msgid "guestfs_set_autosync"
31766 #: ../src/guestfs-actions.pod:6670
31770 " guestfs_set_autosync (guestfs_h *g,\n"
31771 " int autosync);\n"
31776 #: ../src/guestfs-actions.pod:6686
31777 msgid "guestfs_set_direct"
31781 #: ../src/guestfs-actions.pod:6688
31785 " guestfs_set_direct (guestfs_h *g,\n"
31791 #: ../src/guestfs-actions.pod:6696
31793 "One consequence of this is that log messages aren't caught by the library "
31794 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
31799 #: ../src/guestfs-actions.pod:6709
31800 msgid "guestfs_set_e2label"
31804 #: ../src/guestfs-actions.pod:6711
31808 " guestfs_set_e2label (guestfs_h *g,\n"
31809 " const char *device,\n"
31810 " const char *label);\n"
31815 #: ../src/guestfs-actions.pod:6720
31817 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
31818 "the existing label on a filesystem."
31822 #: ../src/guestfs-actions.pod:6727
31823 msgid "guestfs_set_e2uuid"
31827 #: ../src/guestfs-actions.pod:6729
31831 " guestfs_set_e2uuid (guestfs_h *g,\n"
31832 " const char *device,\n"
31833 " const char *uuid);\n"
31838 #: ../src/guestfs-actions.pod:6739
31840 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
31841 "the existing UUID of a filesystem."
31845 #: ../src/guestfs-actions.pod:6746
31846 msgid "guestfs_set_memsize"
31850 #: ../src/guestfs-actions.pod:6748
31854 " guestfs_set_memsize (guestfs_h *g,\n"
31860 #: ../src/guestfs-actions.pod:6752
31862 "This sets the memory size in megabytes allocated to the qemu subprocess. "
31863 "This only has any effect if called before C<guestfs_launch>."
31867 #: ../src/guestfs-actions.pod:6767
31868 msgid "guestfs_set_network"
31872 #: ../src/guestfs-actions.pod:6769
31876 " guestfs_set_network (guestfs_h *g,\n"
31882 #: ../src/guestfs-actions.pod:6779
31884 "You must call this before calling C<guestfs_launch>, otherwise it has no "
31889 #: ../src/guestfs-actions.pod:6786
31890 msgid "guestfs_set_path"
31894 #: ../src/guestfs-actions.pod:6788
31898 " guestfs_set_path (guestfs_h *g,\n"
31899 " const char *searchpath);\n"
31904 #: ../src/guestfs-actions.pod:6803
31905 msgid "guestfs_set_pgroup"
31909 #: ../src/guestfs-actions.pod:6805
31913 " guestfs_set_pgroup (guestfs_h *g,\n"
31919 #: ../src/guestfs-actions.pod:6822
31920 msgid "guestfs_set_qemu"
31924 #: ../src/guestfs-actions.pod:6824
31928 " guestfs_set_qemu (guestfs_h *g,\n"
31929 " const char *qemu);\n"
31934 #: ../src/guestfs-actions.pod:6850
31935 msgid "guestfs_set_recovery_proc"
31939 #: ../src/guestfs-actions.pod:6852
31943 " guestfs_set_recovery_proc (guestfs_h *g,\n"
31944 " int recoveryproc);\n"
31949 #: ../src/guestfs-actions.pod:6856
31951 "If this is called with the parameter C<false> then C<guestfs_launch> does "
31952 "not create a recovery process. The purpose of the recovery process is to "
31953 "stop runaway qemu processes in the case where the main program aborts "
31958 #: ../src/guestfs-actions.pod:6861
31960 "This only has any effect if called before C<guestfs_launch>, and the default"
31965 #: ../src/guestfs-actions.pod:6874
31966 msgid "guestfs_set_selinux"
31970 #: ../src/guestfs-actions.pod:6876
31974 " guestfs_set_selinux (guestfs_h *g,\n"
31980 #: ../src/guestfs-actions.pod:6893
31981 msgid "guestfs_set_smp"
31985 #: ../src/guestfs-actions.pod:6895
31989 " guestfs_set_smp (guestfs_h *g,\n"
31995 #: ../src/guestfs-actions.pod:6903
31996 msgid "This function must be called before C<guestfs_launch>."
32000 #: ../src/guestfs-actions.pod:6909
32001 msgid "guestfs_set_trace"
32005 #: ../src/guestfs-actions.pod:6911
32009 " guestfs_set_trace (guestfs_h *g,\n"
32015 #: ../src/guestfs-actions.pod:6925
32017 "Trace messages are normally sent to C<stderr>, unless you register a "
32018 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32022 #: ../src/guestfs-actions.pod:6933
32023 msgid "guestfs_set_verbose"
32027 #: ../src/guestfs-actions.pod:6935
32031 " guestfs_set_verbose (guestfs_h *g,\n"
32037 #: ../src/guestfs-actions.pod:6944
32039 "Verbose messages are normally sent to C<stderr>, unless you register a "
32040 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32044 #: ../src/guestfs-actions.pod:6952
32045 msgid "guestfs_setcon"
32049 #: ../src/guestfs-actions.pod:6954
32053 " guestfs_setcon (guestfs_h *g,\n"
32054 " const char *context);\n"
32059 #: ../src/guestfs-actions.pod:6967
32060 msgid "guestfs_setxattr"
32064 #: ../src/guestfs-actions.pod:6969
32068 " guestfs_setxattr (guestfs_h *g,\n"
32069 " const char *xattr,\n"
32070 " const char *val,\n"
32072 " const char *path);\n"
32077 #: ../src/guestfs-actions.pod:6980
32078 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
32082 #: ../src/guestfs-actions.pod:6986
32083 msgid "guestfs_sfdisk"
32087 #: ../src/guestfs-actions.pod:6988
32091 " guestfs_sfdisk (guestfs_h *g,\n"
32092 " const char *device,\n"
32096 " char *const *lines);\n"
32101 #: ../src/guestfs-actions.pod:6996 ../src/guestfs-actions.pod:7040
32102 #: ../src/guestfs-actions.pod:7074
32104 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
32109 #: ../src/guestfs-actions.pod:7023
32111 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
32115 #: ../src/guestfs-actions.pod:7033
32116 msgid "guestfs_sfdiskM"
32120 #: ../src/guestfs-actions.pod:7035
32124 " guestfs_sfdiskM (guestfs_h *g,\n"
32125 " const char *device,\n"
32126 " char *const *lines);\n"
32131 #: ../src/guestfs-actions.pod:7047
32133 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
32134 "partition sizes are specified in megabytes only (rounded to the nearest "
32135 "cylinder) and you don't need to specify the cyls, heads and sectors "
32136 "parameters which were rarely if ever used anyway."
32140 #: ../src/guestfs-actions.pod:7053
32142 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
32143 "C<guestfs_part_disk>"
32147 #: ../src/guestfs-actions.pod:7063
32148 msgid "guestfs_sfdisk_N"
32152 #: ../src/guestfs-actions.pod:7065
32156 " guestfs_sfdisk_N (guestfs_h *g,\n"
32157 " const char *device,\n"
32162 " const char *line);\n"
32167 #: ../src/guestfs-actions.pod:7084
32169 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
32170 "for the cyls/heads/sectors parameters."
32174 #: ../src/guestfs-actions.pod:7087
32175 msgid "See also: C<guestfs_part_add>"
32179 #: ../src/guestfs-actions.pod:7096
32180 msgid "guestfs_sfdisk_disk_geometry"
32184 #: ../src/guestfs-actions.pod:7098
32188 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
32189 " const char *device);\n"
32194 #: ../src/guestfs-actions.pod:7102
32196 "This displays the disk geometry of C<device> read from the partition table."
32197 " Especially in the case where the underlying block device has been resized,"
32198 " this can be different from the kernel's idea of the geometry (see "
32199 "C<guestfs_sfdisk_kernel_geometry>)."
32203 #: ../src/guestfs-actions.pod:7115
32204 msgid "guestfs_sfdisk_kernel_geometry"
32208 #: ../src/guestfs-actions.pod:7117
32212 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
32213 " const char *device);\n"
32218 #: ../src/guestfs-actions.pod:7131
32219 msgid "guestfs_sfdisk_l"
32223 #: ../src/guestfs-actions.pod:7133
32227 " guestfs_sfdisk_l (guestfs_h *g,\n"
32228 " const char *device);\n"
32233 #: ../src/guestfs-actions.pod:7137
32235 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
32240 #: ../src/guestfs-actions.pod:7148
32241 msgid "See also: C<guestfs_part_list>"
32245 #: ../src/guestfs-actions.pod:7155
32250 #: ../src/guestfs-actions.pod:7157
32254 " guestfs_sh (guestfs_h *g,\n"
32255 " const char *command);\n"
32260 #: ../src/guestfs-actions.pod:7164
32261 msgid "This is like C<guestfs_command>, but passes the command to:"
32265 #: ../src/guestfs-actions.pod:7172
32266 msgid "All the provisos about C<guestfs_command> apply to this call."
32270 #: ../src/guestfs-actions.pod:7179
32271 msgid "guestfs_sh_lines"
32275 #: ../src/guestfs-actions.pod:7181
32279 " guestfs_sh_lines (guestfs_h *g,\n"
32280 " const char *command);\n"
32285 #: ../src/guestfs-actions.pod:7185
32287 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32292 #: ../src/guestfs-actions.pod:7188
32293 msgid "See also: C<guestfs_command_lines>"
32297 #: ../src/guestfs-actions.pod:7196
32298 msgid "guestfs_sleep"
32302 #: ../src/guestfs-actions.pod:7198
32306 " guestfs_sleep (guestfs_h *g,\n"
32312 #: ../src/guestfs-actions.pod:7206
32313 msgid "(Added in 1.0.41)"
32317 #: ../src/guestfs-actions.pod:7208 ../src/guestfs-structs.pod:109
32318 msgid "guestfs_stat"
32322 #: ../src/guestfs-actions.pod:7210
32325 " struct guestfs_stat *\n"
32326 " guestfs_stat (guestfs_h *g,\n"
32327 " const char *path);\n"
32332 #: ../src/guestfs-actions.pod:7224 ../src/guestfs-structs.pod:135
32333 msgid "guestfs_statvfs"
32337 #: ../src/guestfs-actions.pod:7226
32340 " struct guestfs_statvfs *\n"
32341 " guestfs_statvfs (guestfs_h *g,\n"
32342 " const char *path);\n"
32347 #: ../src/guestfs-actions.pod:7236
32349 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an"
32350 " error. I<The caller must call C<guestfs_free_statvfs> after use>."
32354 #: ../src/guestfs-actions.pod:7242
32355 msgid "guestfs_strings"
32359 #: ../src/guestfs-actions.pod:7244
32363 " guestfs_strings (guestfs_h *g,\n"
32364 " const char *path);\n"
32369 #: ../src/guestfs-actions.pod:7260
32370 msgid "guestfs_strings_e"
32374 #: ../src/guestfs-actions.pod:7262
32378 " guestfs_strings_e (guestfs_h *g,\n"
32379 " const char *encoding,\n"
32380 " const char *path);\n"
32385 #: ../src/guestfs-actions.pod:7267
32387 "This is like the C<guestfs_strings> command, but allows you to specify the "
32388 "encoding of strings that are looked for in the source file C<path>."
32392 #: ../src/guestfs-actions.pod:7277
32394 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32395 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32399 #: ../src/guestfs-actions.pod:7315
32400 msgid "guestfs_swapoff_device"
32404 #: ../src/guestfs-actions.pod:7317
32408 " guestfs_swapoff_device (guestfs_h *g,\n"
32409 " const char *device);\n"
32414 #: ../src/guestfs-actions.pod:7321
32416 "This command disables the libguestfs appliance swap device or partition "
32417 "named C<device>. See C<guestfs_swapon_device>."
32421 #: ../src/guestfs-actions.pod:7329
32422 msgid "guestfs_swapoff_file"
32426 #: ../src/guestfs-actions.pod:7331
32430 " guestfs_swapoff_file (guestfs_h *g,\n"
32431 " const char *file);\n"
32436 #: ../src/guestfs-actions.pod:7341
32437 msgid "guestfs_swapoff_label"
32441 #: ../src/guestfs-actions.pod:7343
32445 " guestfs_swapoff_label (guestfs_h *g,\n"
32446 " const char *label);\n"
32451 #: ../src/guestfs-actions.pod:7354
32452 msgid "guestfs_swapoff_uuid"
32456 #: ../src/guestfs-actions.pod:7356
32460 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32461 " const char *uuid);\n"
32466 #: ../src/guestfs-actions.pod:7367
32467 msgid "guestfs_swapon_device"
32471 #: ../src/guestfs-actions.pod:7369
32475 " guestfs_swapon_device (guestfs_h *g,\n"
32476 " const char *device);\n"
32481 #: ../src/guestfs-actions.pod:7373
32483 "This command enables the libguestfs appliance to use the swap device or "
32484 "partition named C<device>. The increased memory is made available for all "
32485 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32489 #: ../src/guestfs-actions.pod:7389
32490 msgid "guestfs_swapon_file"
32494 #: ../src/guestfs-actions.pod:7391
32498 " guestfs_swapon_file (guestfs_h *g,\n"
32499 " const char *file);\n"
32504 #: ../src/guestfs-actions.pod:7395
32506 "This command enables swap to a file. See C<guestfs_swapon_device> for other"
32511 #: ../src/guestfs-actions.pod:7402
32512 msgid "guestfs_swapon_label"
32516 #: ../src/guestfs-actions.pod:7404
32520 " guestfs_swapon_label (guestfs_h *g,\n"
32521 " const char *label);\n"
32526 #: ../src/guestfs-actions.pod:7408
32528 "This command enables swap to a labeled swap partition. See "
32529 "C<guestfs_swapon_device> for other notes."
32533 #: ../src/guestfs-actions.pod:7415
32534 msgid "guestfs_swapon_uuid"
32538 #: ../src/guestfs-actions.pod:7417
32542 " guestfs_swapon_uuid (guestfs_h *g,\n"
32543 " const char *uuid);\n"
32548 #: ../src/guestfs-actions.pod:7421
32550 "This command enables swap to a swap partition with the given UUID. See "
32551 "C<guestfs_swapon_device> for other notes."
32555 #: ../src/guestfs-actions.pod:7428
32556 msgid "guestfs_sync"
32560 #: ../src/guestfs-actions.pod:7430
32564 " guestfs_sync (guestfs_h *g);\n"
32569 #: ../src/guestfs-actions.pod:7443
32570 msgid "guestfs_tail"
32574 #: ../src/guestfs-actions.pod:7445
32578 " guestfs_tail (guestfs_h *g,\n"
32579 " const char *path);\n"
32584 #: ../src/guestfs-actions.pod:7461
32585 msgid "guestfs_tail_n"
32589 #: ../src/guestfs-actions.pod:7463
32593 " guestfs_tail_n (guestfs_h *g,\n"
32595 " const char *path);\n"
32600 #: ../src/guestfs-actions.pod:7485
32601 msgid "guestfs_tar_in"
32605 #: ../src/guestfs-actions.pod:7487
32609 " guestfs_tar_in (guestfs_h *g,\n"
32610 " const char *tarfile,\n"
32611 " const char *directory);\n"
32616 #: ../src/guestfs-actions.pod:7495
32618 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32622 #: ../src/guestfs-actions.pod:7500 ../src/guestfs-actions.pod:7517
32623 #: ../src/guestfs-actions.pod:7533 ../src/guestfs-actions.pod:7549
32624 msgid "(Added in 1.0.3)"
32628 #: ../src/guestfs-actions.pod:7502
32629 msgid "guestfs_tar_out"
32633 #: ../src/guestfs-actions.pod:7504
32637 " guestfs_tar_out (guestfs_h *g,\n"
32638 " const char *directory,\n"
32639 " const char *tarfile);\n"
32644 #: ../src/guestfs-actions.pod:7512
32646 "To download a compressed tarball, use C<guestfs_tgz_out> or "
32647 "C<guestfs_txz_out>."
32651 #: ../src/guestfs-actions.pod:7519
32652 msgid "guestfs_tgz_in"
32656 #: ../src/guestfs-actions.pod:7521
32660 " guestfs_tgz_in (guestfs_h *g,\n"
32661 " const char *tarball,\n"
32662 " const char *directory);\n"
32667 #: ../src/guestfs-actions.pod:7529
32668 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
32672 #: ../src/guestfs-actions.pod:7535
32673 msgid "guestfs_tgz_out"
32677 #: ../src/guestfs-actions.pod:7537
32681 " guestfs_tgz_out (guestfs_h *g,\n"
32682 " const char *directory,\n"
32683 " const char *tarball);\n"
32688 #: ../src/guestfs-actions.pod:7545
32689 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
32693 #: ../src/guestfs-actions.pod:7551
32694 msgid "guestfs_touch"
32698 #: ../src/guestfs-actions.pod:7553
32702 " guestfs_touch (guestfs_h *g,\n"
32703 " const char *path);\n"
32708 #: ../src/guestfs-actions.pod:7568
32709 msgid "guestfs_truncate"
32713 #: ../src/guestfs-actions.pod:7570
32717 " guestfs_truncate (guestfs_h *g,\n"
32718 " const char *path);\n"
32723 #: ../src/guestfs-actions.pod:7581
32724 msgid "guestfs_truncate_size"
32728 #: ../src/guestfs-actions.pod:7583
32732 " guestfs_truncate_size (guestfs_h *g,\n"
32733 " const char *path,\n"
32734 " int64_t size);\n"
32739 #: ../src/guestfs-actions.pod:7591
32741 "If the current file size is less than C<size> then the file is extended to "
32742 "the required size with zero bytes. This creates a sparse file (ie. disk "
32743 "blocks are not allocated for the file until you write to it). To create a "
32744 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
32748 #: ../src/guestfs-actions.pod:7601
32749 msgid "guestfs_tune2fs_l"
32753 #: ../src/guestfs-actions.pod:7603
32757 " guestfs_tune2fs_l (guestfs_h *g,\n"
32758 " const char *device);\n"
32763 #: ../src/guestfs-actions.pod:7623
32764 msgid "guestfs_txz_in"
32768 #: ../src/guestfs-actions.pod:7625
32772 " guestfs_txz_in (guestfs_h *g,\n"
32773 " const char *tarball,\n"
32774 " const char *directory);\n"
32779 #: ../src/guestfs-actions.pod:7637
32780 msgid "guestfs_txz_out"
32784 #: ../src/guestfs-actions.pod:7639
32788 " guestfs_txz_out (guestfs_h *g,\n"
32789 " const char *directory,\n"
32790 " const char *tarball);\n"
32795 #: ../src/guestfs-actions.pod:7651
32796 msgid "guestfs_umask"
32800 #: ../src/guestfs-actions.pod:7653
32804 " guestfs_umask (guestfs_h *g,\n"
32810 #: ../src/guestfs-actions.pod:7669
32812 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
32813 "C<guestfs_mkdir>."
32817 #: ../src/guestfs-actions.pod:7678
32818 msgid "guestfs_umount"
32822 #: ../src/guestfs-actions.pod:7680
32826 " guestfs_umount (guestfs_h *g,\n"
32827 " const char *pathordevice);\n"
32832 #: ../src/guestfs-actions.pod:7692
32833 msgid "guestfs_umount_all"
32837 #: ../src/guestfs-actions.pod:7694
32841 " guestfs_umount_all (guestfs_h *g);\n"
32846 #: ../src/guestfs-actions.pod:7705
32847 msgid "guestfs_upload"
32851 #: ../src/guestfs-actions.pod:7707
32855 " guestfs_upload (guestfs_h *g,\n"
32856 " const char *filename,\n"
32857 " const char *remotefilename);\n"
32862 #: ../src/guestfs-actions.pod:7717
32863 msgid "See also C<guestfs_download>."
32867 #: ../src/guestfs-actions.pod:7728
32868 msgid "guestfs_upload_offset"
32872 #: ../src/guestfs-actions.pod:7730
32876 " guestfs_upload_offset (guestfs_h *g,\n"
32877 " const char *filename,\n"
32878 " const char *remotefilename,\n"
32879 " int64_t offset);\n"
32884 #: ../src/guestfs-actions.pod:7746
32886 "Note that there is no limit on the amount of data that can be uploaded with "
32887 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
32888 "full amount unless an error occurs."
32892 #: ../src/guestfs-actions.pod:7751
32893 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
32897 #: ../src/guestfs-actions.pod:7762
32898 msgid "guestfs_utimens"
32902 #: ../src/guestfs-actions.pod:7764
32906 " guestfs_utimens (guestfs_h *g,\n"
32907 " const char *path,\n"
32908 " int64_t atsecs,\n"
32909 " int64_t atnsecs,\n"
32910 " int64_t mtsecs,\n"
32911 " int64_t mtnsecs);\n"
32916 #: ../src/guestfs-actions.pod:7793 ../src/guestfs-structs.pod:175
32917 msgid "guestfs_version"
32921 #: ../src/guestfs-actions.pod:7795
32924 " struct guestfs_version *\n"
32925 " guestfs_version (guestfs_h *g);\n"
32930 #: ../src/guestfs-actions.pod:7823
32932 "I<Note:> Don't use this call to test for availability of features. In "
32933 "enterprise distributions we backport features from later versions into "
32934 "earlier versions, making this an unreliable way to test for features. Use "
32935 "C<guestfs_available> instead."
32939 #: ../src/guestfs-actions.pod:7829
32941 "This function returns a C<struct guestfs_version *>, or NULL if there was an"
32942 " error. I<The caller must call C<guestfs_free_version> after use>."
32946 #: ../src/guestfs-actions.pod:7833
32947 msgid "(Added in 1.0.58)"
32951 #: ../src/guestfs-actions.pod:7835
32952 msgid "guestfs_vfs_label"
32956 #: ../src/guestfs-actions.pod:7837
32960 " guestfs_vfs_label (guestfs_h *g,\n"
32961 " const char *device);\n"
32966 #: ../src/guestfs-actions.pod:7846
32967 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
32971 #: ../src/guestfs-actions.pod:7851 ../src/guestfs-actions.pod:7888
32972 msgid "(Added in 1.3.18)"
32976 #: ../src/guestfs-actions.pod:7853
32977 msgid "guestfs_vfs_type"
32981 #: ../src/guestfs-actions.pod:7855
32985 " guestfs_vfs_type (guestfs_h *g,\n"
32986 " const char *device);\n"
32991 #: ../src/guestfs-actions.pod:7872
32992 msgid "guestfs_vfs_uuid"
32996 #: ../src/guestfs-actions.pod:7874
33000 " guestfs_vfs_uuid (guestfs_h *g,\n"
33001 " const char *device);\n"
33006 #: ../src/guestfs-actions.pod:7883
33007 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
33011 #: ../src/guestfs-actions.pod:7890
33012 msgid "guestfs_vg_activate"
33016 #: ../src/guestfs-actions.pod:7892
33020 " guestfs_vg_activate (guestfs_h *g,\n"
33022 " char *const *volgroups);\n"
33027 #: ../src/guestfs-actions.pod:7909
33028 msgid "guestfs_vg_activate_all"
33032 #: ../src/guestfs-actions.pod:7911
33036 " guestfs_vg_activate_all (guestfs_h *g,\n"
33037 " int activate);\n"
33042 #: ../src/guestfs-actions.pod:7924
33043 msgid "guestfs_vgcreate"
33047 #: ../src/guestfs-actions.pod:7926
33051 " guestfs_vgcreate (guestfs_h *g,\n"
33052 " const char *volgroup,\n"
33053 " char *const *physvols);\n"
33058 #: ../src/guestfs-actions.pod:7938
33059 msgid "guestfs_vglvuuids"
33063 #: ../src/guestfs-actions.pod:7940
33067 " guestfs_vglvuuids (guestfs_h *g,\n"
33068 " const char *vgname);\n"
33073 #: ../src/guestfs-actions.pod:7947
33075 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
33076 "associate logical volumes and volume groups."
33080 #: ../src/guestfs-actions.pod:7950
33081 msgid "See also C<guestfs_vgpvuuids>."
33085 #: ../src/guestfs-actions.pod:7958
33086 msgid "guestfs_vgpvuuids"
33090 #: ../src/guestfs-actions.pod:7960
33094 " guestfs_vgpvuuids (guestfs_h *g,\n"
33095 " const char *vgname);\n"
33100 #: ../src/guestfs-actions.pod:7967
33102 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
33103 "associate physical volumes and volume groups."
33107 #: ../src/guestfs-actions.pod:7970
33108 msgid "See also C<guestfs_vglvuuids>."
33112 #: ../src/guestfs-actions.pod:7978
33113 msgid "guestfs_vgremove"
33117 #: ../src/guestfs-actions.pod:7980
33121 " guestfs_vgremove (guestfs_h *g,\n"
33122 " const char *vgname);\n"
33127 #: ../src/guestfs-actions.pod:7993
33128 msgid "guestfs_vgrename"
33132 #: ../src/guestfs-actions.pod:7995
33136 " guestfs_vgrename (guestfs_h *g,\n"
33137 " const char *volgroup,\n"
33138 " const char *newvolgroup);\n"
33143 #: ../src/guestfs-actions.pod:8006
33144 msgid "guestfs_vgs"
33148 #: ../src/guestfs-actions.pod:8008
33152 " guestfs_vgs (guestfs_h *g);\n"
33157 #: ../src/guestfs-actions.pod:8017
33158 msgid "See also C<guestfs_vgs_full>."
33162 #: ../src/guestfs-actions.pod:8025
33163 msgid "guestfs_vgs_full"
33167 #: ../src/guestfs-actions.pod:8027
33170 " struct guestfs_lvm_vg_list *\n"
33171 " guestfs_vgs_full (guestfs_h *g);\n"
33176 #: ../src/guestfs-actions.pod:8033
33178 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
33179 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
33184 #: ../src/guestfs-actions.pod:8039
33185 msgid "guestfs_vgscan"
33189 #: ../src/guestfs-actions.pod:8041
33193 " guestfs_vgscan (guestfs_h *g);\n"
33198 #: ../src/guestfs-actions.pod:8051
33199 msgid "guestfs_vguuid"
33203 #: ../src/guestfs-actions.pod:8053
33207 " guestfs_vguuid (guestfs_h *g,\n"
33208 " const char *vgname);\n"
33213 #: ../src/guestfs-actions.pod:8064
33214 msgid "guestfs_wait_ready"
33218 #: ../src/guestfs-actions.pod:8066
33222 " guestfs_wait_ready (guestfs_h *g);\n"
33227 #: ../src/guestfs-actions.pod:8069
33229 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call"
33234 #: ../src/guestfs-actions.pod:8076
33235 msgid "This function is a no op."
33239 #: ../src/guestfs-actions.pod:8078
33241 "In versions of the API E<lt> 1.0.71 you had to call this function just after"
33242 " calling C<guestfs_launch> to wait for the launch to complete. However this"
33243 " is no longer necessary because C<guestfs_launch> now does the waiting."
33247 #: ../src/guestfs-actions.pod:8083
33249 "If you see any calls to this function in code then you can just remove them,"
33250 " unless you want to retain compatibility with older versions of the API."
33254 #: ../src/guestfs-actions.pod:8091
33255 msgid "guestfs_wc_c"
33259 #: ../src/guestfs-actions.pod:8093
33263 " guestfs_wc_c (guestfs_h *g,\n"
33264 " const char *path);\n"
33269 #: ../src/guestfs-actions.pod:8104
33270 msgid "guestfs_wc_l"
33274 #: ../src/guestfs-actions.pod:8106
33278 " guestfs_wc_l (guestfs_h *g,\n"
33279 " const char *path);\n"
33284 #: ../src/guestfs-actions.pod:8117
33285 msgid "guestfs_wc_w"
33289 #: ../src/guestfs-actions.pod:8119
33293 " guestfs_wc_w (guestfs_h *g,\n"
33294 " const char *path);\n"
33299 #: ../src/guestfs-actions.pod:8130
33300 msgid "guestfs_write"
33304 #: ../src/guestfs-actions.pod:8132
33308 " guestfs_write (guestfs_h *g,\n"
33309 " const char *path,\n"
33310 " const char *content,\n"
33311 " size_t content_size);\n"
33316 #: ../src/guestfs-actions.pod:8141
33317 msgid "See also C<guestfs_write_append>."
33321 #: ../src/guestfs-actions.pod:8150
33322 msgid "guestfs_write_append"
33326 #: ../src/guestfs-actions.pod:8152
33330 " guestfs_write_append (guestfs_h *g,\n"
33331 " const char *path,\n"
33332 " const char *content,\n"
33333 " size_t content_size);\n"
33338 #: ../src/guestfs-actions.pod:8161
33339 msgid "See also C<guestfs_write>."
33343 #: ../src/guestfs-actions.pod:8170
33344 msgid "guestfs_write_file"
33348 #: ../src/guestfs-actions.pod:8172
33352 " guestfs_write_file (guestfs_h *g,\n"
33353 " const char *path,\n"
33354 " const char *content,\n"
33360 #: ../src/guestfs-actions.pod:8178
33362 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33367 #: ../src/guestfs-actions.pod:8203
33368 msgid "guestfs_zegrep"
33372 #: ../src/guestfs-actions.pod:8205
33376 " guestfs_zegrep (guestfs_h *g,\n"
33377 " const char *regex,\n"
33378 " const char *path);\n"
33383 #: ../src/guestfs-actions.pod:8222
33384 msgid "guestfs_zegrepi"
33388 #: ../src/guestfs-actions.pod:8224
33392 " guestfs_zegrepi (guestfs_h *g,\n"
33393 " const char *regex,\n"
33394 " const char *path);\n"
33399 #: ../src/guestfs-actions.pod:8241
33400 msgid "guestfs_zero"
33404 #: ../src/guestfs-actions.pod:8243
33408 " guestfs_zero (guestfs_h *g,\n"
33409 " const char *device);\n"
33414 #: ../src/guestfs-actions.pod:8257
33416 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33417 "C<guestfs_is_zero_device>"
33421 #: ../src/guestfs-actions.pod:8269
33422 msgid "guestfs_zero_device"
33426 #: ../src/guestfs-actions.pod:8271
33430 " guestfs_zero_device (guestfs_h *g,\n"
33431 " const char *device);\n"
33436 #: ../src/guestfs-actions.pod:8275
33438 "This command writes zeroes over the entire C<device>. Compare with "
33439 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33443 #: ../src/guestfs-actions.pod:8293
33444 msgid "(Added in 1.3.1)"
33448 #: ../src/guestfs-actions.pod:8295
33449 msgid "guestfs_zerofree"
33453 #: ../src/guestfs-actions.pod:8297
33457 " guestfs_zerofree (guestfs_h *g,\n"
33458 " const char *device);\n"
33463 #: ../src/guestfs-actions.pod:8316
33464 msgid "guestfs_zfgrep"
33468 #: ../src/guestfs-actions.pod:8318
33472 " guestfs_zfgrep (guestfs_h *g,\n"
33473 " const char *pattern,\n"
33474 " const char *path);\n"
33479 #: ../src/guestfs-actions.pod:8335
33480 msgid "guestfs_zfgrepi"
33484 #: ../src/guestfs-actions.pod:8337
33488 " guestfs_zfgrepi (guestfs_h *g,\n"
33489 " const char *pattern,\n"
33490 " const char *path);\n"
33495 #: ../src/guestfs-actions.pod:8354
33496 msgid "guestfs_zfile"
33500 #: ../src/guestfs-actions.pod:8356
33504 " guestfs_zfile (guestfs_h *g,\n"
33505 " const char *meth,\n"
33506 " const char *path);\n"
33511 #: ../src/guestfs-actions.pod:8361
33513 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33518 #: ../src/guestfs-actions.pod:8373
33520 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33525 #: ../src/guestfs-actions.pod:8381
33526 msgid "guestfs_zgrep"
33530 #: ../src/guestfs-actions.pod:8383
33534 " guestfs_zgrep (guestfs_h *g,\n"
33535 " const char *regex,\n"
33536 " const char *path);\n"
33541 #: ../src/guestfs-actions.pod:8400
33542 msgid "guestfs_zgrepi"
33546 #: ../src/guestfs-actions.pod:8402
33550 " guestfs_zgrepi (guestfs_h *g,\n"
33551 " const char *regex,\n"
33552 " const char *path);\n"
33557 #: ../src/guestfs-availability.pod:3
33562 #: ../src/guestfs-availability.pod:5
33564 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
33565 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
33566 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
33567 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
33568 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
33572 #: ../src/guestfs-availability.pod:21
33577 #: ../src/guestfs-availability.pod:23
33578 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
33582 #: ../src/guestfs-availability.pod:26
33587 #: ../src/guestfs-availability.pod:28
33588 msgid "The following functions: L</guestfs_grub_install>"
33592 #: ../src/guestfs-availability.pod:31
33597 #: ../src/guestfs-availability.pod:33
33599 "The following functions: L</guestfs_inotify_add_watch> "
33600 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init>"
33601 " L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
33605 #: ../src/guestfs-availability.pod:41
33606 msgid "B<linuxfsuuid>"
33610 #: ../src/guestfs-availability.pod:43
33612 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
33613 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
33617 #: ../src/guestfs-availability.pod:50
33618 msgid "B<linuxmodules>"
33622 #: ../src/guestfs-availability.pod:52
33623 msgid "The following functions: L</guestfs_modprobe>"
33627 #: ../src/guestfs-availability.pod:55
33628 msgid "B<linuxxattrs>"
33632 #: ../src/guestfs-availability.pod:57
33634 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
33635 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
33636 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
33637 "L</guestfs_setxattr>"
33641 #: ../src/guestfs-availability.pod:68
33646 #: ../src/guestfs-availability.pod:70
33648 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
33649 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
33650 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
33654 #: ../src/guestfs-availability.pod:79
33659 #: ../src/guestfs-availability.pod:81
33661 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
33662 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
33663 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
33664 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
33665 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
33666 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
33667 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
33668 "L</guestfs_vgs_full>"
33672 #: ../src/guestfs-availability.pod:104
33677 #: ../src/guestfs-availability.pod:106
33679 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
33680 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
33684 #: ../src/guestfs-availability.pod:112
33689 #: ../src/guestfs-availability.pod:114
33690 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
33694 #: ../src/guestfs-availability.pod:117
33695 msgid "B<ntfsprogs>"
33699 #: ../src/guestfs-availability.pod:119
33701 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
33702 "L</guestfs_ntfsresize_size>"
33706 #: ../src/guestfs-availability.pod:124
33707 msgid "B<realpath>"
33711 #: ../src/guestfs-availability.pod:126
33712 msgid "The following functions: L</guestfs_realpath>"
33716 #: ../src/guestfs-availability.pod:129
33721 #: ../src/guestfs-availability.pod:131
33723 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
33724 "L</guestfs_scrub_freespace>"
33728 #: ../src/guestfs-availability.pod:136
33733 #: ../src/guestfs-availability.pod:138
33734 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
33738 #: ../src/guestfs-availability.pod:142
33743 #: ../src/guestfs-availability.pod:144
33744 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
33748 #: ../src/guestfs-availability.pod:148
33749 msgid "B<zerofree>"
33753 #: ../src/guestfs-availability.pod:150
33754 msgid "The following functions: L</guestfs_zerofree>"
33758 #: ../src/guestfs-structs.pod:1
33759 msgid "guestfs_int_bool"
33763 #: ../src/guestfs-structs.pod:3
33766 " struct guestfs_int_bool {\n"
33774 #: ../src/guestfs-structs.pod:8
33777 " struct guestfs_int_bool_list {\n"
33778 " uint32_t len; /* Number of elements in list. */\n"
33779 " struct guestfs_int_bool *val; /* Elements. */\n"
33785 #: ../src/guestfs-structs.pod:13
33788 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
33789 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
33794 #: ../src/guestfs-structs.pod:16
33795 msgid "guestfs_lvm_pv"
33799 #: ../src/guestfs-structs.pod:18
33802 " struct guestfs_lvm_pv {\n"
33803 " char *pv_name;\n"
33804 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33805 " char pv_uuid[32];\n"
33807 " uint64_t pv_size;\n"
33808 " uint64_t dev_size;\n"
33809 " uint64_t pv_free;\n"
33810 " uint64_t pv_used;\n"
33811 " char *pv_attr;\n"
33812 " int64_t pv_pe_count;\n"
33813 " int64_t pv_pe_alloc_count;\n"
33814 " char *pv_tags;\n"
33815 " uint64_t pe_start;\n"
33816 " int64_t pv_mda_count;\n"
33817 " uint64_t pv_mda_free;\n"
33823 #: ../src/guestfs-structs.pod:36
33826 " struct guestfs_lvm_pv_list {\n"
33827 " uint32_t len; /* Number of elements in list. */\n"
33828 " struct guestfs_lvm_pv *val; /* Elements. */\n"
33834 #: ../src/guestfs-structs.pod:41
33837 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
33838 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
33843 #: ../src/guestfs-structs.pod:44
33844 msgid "guestfs_lvm_vg"
33848 #: ../src/guestfs-structs.pod:46
33851 " struct guestfs_lvm_vg {\n"
33852 " char *vg_name;\n"
33853 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33854 " char vg_uuid[32];\n"
33856 " char *vg_attr;\n"
33857 " uint64_t vg_size;\n"
33858 " uint64_t vg_free;\n"
33859 " char *vg_sysid;\n"
33860 " uint64_t vg_extent_size;\n"
33861 " int64_t vg_extent_count;\n"
33862 " int64_t vg_free_count;\n"
33863 " int64_t max_lv;\n"
33864 " int64_t max_pv;\n"
33865 " int64_t pv_count;\n"
33866 " int64_t lv_count;\n"
33867 " int64_t snap_count;\n"
33868 " int64_t vg_seqno;\n"
33869 " char *vg_tags;\n"
33870 " int64_t vg_mda_count;\n"
33871 " uint64_t vg_mda_free;\n"
33877 #: ../src/guestfs-structs.pod:69
33880 " struct guestfs_lvm_vg_list {\n"
33881 " uint32_t len; /* Number of elements in list. */\n"
33882 " struct guestfs_lvm_vg *val; /* Elements. */\n"
33888 #: ../src/guestfs-structs.pod:74
33891 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
33892 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
33897 #: ../src/guestfs-structs.pod:77
33898 msgid "guestfs_lvm_lv"
33902 #: ../src/guestfs-structs.pod:79
33905 " struct guestfs_lvm_lv {\n"
33906 " char *lv_name;\n"
33907 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33908 " char lv_uuid[32];\n"
33909 " char *lv_attr;\n"
33910 " int64_t lv_major;\n"
33911 " int64_t lv_minor;\n"
33912 " int64_t lv_kernel_major;\n"
33913 " int64_t lv_kernel_minor;\n"
33914 " uint64_t lv_size;\n"
33915 " int64_t seg_count;\n"
33917 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33918 " float snap_percent;\n"
33919 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33920 " float copy_percent;\n"
33921 " char *move_pv;\n"
33922 " char *lv_tags;\n"
33923 " char *mirror_log;\n"
33924 " char *modules;\n"
33930 #: ../src/guestfs-structs.pod:101
33933 " struct guestfs_lvm_lv_list {\n"
33934 " uint32_t len; /* Number of elements in list. */\n"
33935 " struct guestfs_lvm_lv *val; /* Elements. */\n"
33941 #: ../src/guestfs-structs.pod:106
33944 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
33945 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
33950 #: ../src/guestfs-structs.pod:111
33953 " struct guestfs_stat {\n"
33957 " int64_t nlink;\n"
33962 " int64_t blksize;\n"
33963 " int64_t blocks;\n"
33964 " int64_t atime;\n"
33965 " int64_t mtime;\n"
33966 " int64_t ctime;\n"
33972 #: ../src/guestfs-structs.pod:127
33975 " struct guestfs_stat_list {\n"
33976 " uint32_t len; /* Number of elements in list. */\n"
33977 " struct guestfs_stat *val; /* Elements. */\n"
33983 #: ../src/guestfs-structs.pod:132
33986 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
33987 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
33992 #: ../src/guestfs-structs.pod:137
33995 " struct guestfs_statvfs {\n"
33996 " int64_t bsize;\n"
33997 " int64_t frsize;\n"
33998 " int64_t blocks;\n"
33999 " int64_t bfree;\n"
34000 " int64_t bavail;\n"
34001 " int64_t files;\n"
34002 " int64_t ffree;\n"
34003 " int64_t favail;\n"
34006 " int64_t namemax;\n"
34012 #: ../src/guestfs-structs.pod:151
34015 " struct guestfs_statvfs_list {\n"
34016 " uint32_t len; /* Number of elements in list. */\n"
34017 " struct guestfs_statvfs *val; /* Elements. */\n"
34023 #: ../src/guestfs-structs.pod:156
34026 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
34027 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
34032 #: ../src/guestfs-structs.pod:159
34033 msgid "guestfs_dirent"
34037 #: ../src/guestfs-structs.pod:161
34040 " struct guestfs_dirent {\n"
34049 #: ../src/guestfs-structs.pod:167
34052 " struct guestfs_dirent_list {\n"
34053 " uint32_t len; /* Number of elements in list. */\n"
34054 " struct guestfs_dirent *val; /* Elements. */\n"
34060 #: ../src/guestfs-structs.pod:172
34063 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
34064 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
34069 #: ../src/guestfs-structs.pod:177
34072 " struct guestfs_version {\n"
34073 " int64_t major;\n"
34074 " int64_t minor;\n"
34075 " int64_t release;\n"
34082 #: ../src/guestfs-structs.pod:184
34085 " struct guestfs_version_list {\n"
34086 " uint32_t len; /* Number of elements in list. */\n"
34087 " struct guestfs_version *val; /* Elements. */\n"
34093 #: ../src/guestfs-structs.pod:189
34096 " void guestfs_free_version (struct guestfs_free_version *);\n"
34097 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
34102 #: ../src/guestfs-structs.pod:192
34103 msgid "guestfs_xattr"
34107 #: ../src/guestfs-structs.pod:194
34110 " struct guestfs_xattr {\n"
34111 " char *attrname;\n"
34112 " /* The next two fields describe a byte array. */\n"
34113 " uint32_t attrval_len;\n"
34114 " char *attrval;\n"
34120 #: ../src/guestfs-structs.pod:201
34123 " struct guestfs_xattr_list {\n"
34124 " uint32_t len; /* Number of elements in list. */\n"
34125 " struct guestfs_xattr *val; /* Elements. */\n"
34131 #: ../src/guestfs-structs.pod:206
34134 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
34135 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
34140 #: ../src/guestfs-structs.pod:209
34141 msgid "guestfs_inotify_event"
34145 #: ../src/guestfs-structs.pod:211
34148 " struct guestfs_inotify_event {\n"
34149 " int64_t in_wd;\n"
34150 " uint32_t in_mask;\n"
34151 " uint32_t in_cookie;\n"
34152 " char *in_name;\n"
34158 #: ../src/guestfs-structs.pod:218
34161 " struct guestfs_inotify_event_list {\n"
34162 " uint32_t len; /* Number of elements in list. */\n"
34163 " struct guestfs_inotify_event *val; /* Elements. */\n"
34169 #: ../src/guestfs-structs.pod:223
34172 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
34173 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
34178 #: ../src/guestfs-structs.pod:226
34179 msgid "guestfs_partition"
34183 #: ../src/guestfs-structs.pod:228
34186 " struct guestfs_partition {\n"
34187 " int32_t part_num;\n"
34188 " uint64_t part_start;\n"
34189 " uint64_t part_end;\n"
34190 " uint64_t part_size;\n"
34196 #: ../src/guestfs-structs.pod:235
34199 " struct guestfs_partition_list {\n"
34200 " uint32_t len; /* Number of elements in list. */\n"
34201 " struct guestfs_partition *val; /* Elements. */\n"
34207 #: ../src/guestfs-structs.pod:240
34210 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
34211 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
34216 #: ../src/guestfs-structs.pod:243
34217 msgid "guestfs_application"
34221 #: ../src/guestfs-structs.pod:245
34224 " struct guestfs_application {\n"
34225 " char *app_name;\n"
34226 " char *app_display_name;\n"
34227 " int32_t app_epoch;\n"
34228 " char *app_version;\n"
34229 " char *app_release;\n"
34230 " char *app_install_path;\n"
34231 " char *app_trans_path;\n"
34232 " char *app_publisher;\n"
34233 " char *app_url;\n"
34234 " char *app_source_package;\n"
34235 " char *app_summary;\n"
34236 " char *app_description;\n"
34242 #: ../src/guestfs-structs.pod:260
34245 " struct guestfs_application_list {\n"
34246 " uint32_t len; /* Number of elements in list. */\n"
34247 " struct guestfs_application *val; /* Elements. */\n"
34253 #: ../src/guestfs-structs.pod:265
34256 " void guestfs_free_application (struct guestfs_free_application *);\n"
34257 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
34262 #: ../src/guestfs.pod:5
34263 msgid "guestfs - Library for accessing and modifying virtual machine images"
34267 #: ../src/guestfs.pod:11
34270 " guestfs_h *g = guestfs_create ();\n"
34271 " guestfs_add_drive (g, \"guest.img\");\n"
34272 " guestfs_launch (g);\n"
34273 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34274 " guestfs_touch (g, \"/hello\");\n"
34275 " guestfs_umount (g, \"/\");\n"
34276 " guestfs_close (g);\n"
34279 " guestfs_h *g = guestfs_create ();\n"
34280 " guestfs_add_drive (g, \"guest.img\");\n"
34281 " guestfs_launch (g);\n"
34282 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34283 " guestfs_touch (g, \"/hello\");\n"
34284 " guestfs_umount (g, \"/\");\n"
34285 " guestfs_close (g);\n"
34289 #: ../src/guestfs.pod:25
34291 "Libguestfs is a library for accessing and modifying guest disk images. "
34292 "Amongst the things this is good for: making batch configuration changes to "
34293 "guests, getting disk used/free statistics (see also: virt-df), migrating "
34294 "between virtualization systems (see also: virt-p2v), performing partial "
34295 "backups, performing partial guest clones, cloning guests and changing "
34296 "registry/UUID/hostname info, and much else besides."
34300 #: ../src/guestfs.pod:33
34302 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest"
34303 " filesystem that Linux and qemu can, including but not limited to: ext2/3/4,"
34304 " btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34309 #: ../src/guestfs.pod:38
34311 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34312 "what filesystem is in each LV, etc.). It can also run commands in the "
34313 "context of the guest. Also you can access filesystems over FUSE."
34317 #: ../src/guestfs.pod:43
34319 "Libguestfs is a library that can be linked with C and C++ management "
34320 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java,"
34321 " PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the"
34326 #: ../src/guestfs.pod:48
34328 "You don't need to be root to use libguestfs, although obviously you do need "
34329 "enough permissions to access the disk images."
34333 #: ../src/guestfs.pod:51
34335 "Libguestfs is a large API because it can do many things. For a gentle "
34336 "introduction, please read the L</API OVERVIEW> section next."
34340 #: ../src/guestfs.pod:54
34342 "There are also some example programs in the L<guestfs-examples(3)> manual "
34347 #: ../src/guestfs.pod:57
34348 msgid "API OVERVIEW"
34352 #: ../src/guestfs.pod:59
34354 "This section provides a gentler overview of the libguestfs API. We also try"
34355 " to group API calls together, where that may not be obvious from reading "
34356 "about the individual calls in the main section of this manual."
34360 #: ../src/guestfs.pod:64
34365 #: ../src/guestfs.pod:66
34367 "Before you can use libguestfs calls, you have to create a handle. Then you "
34368 "must add at least one disk image to the handle, followed by launching the "
34369 "handle, then performing whatever operations you want, and finally closing "
34370 "the handle. By convention we use the single letter C<g> for the name of the"
34371 " handle variable, although of course you can use any name you want."
34375 #: ../src/guestfs.pod:73
34377 "The general structure of all libguestfs-using programs looks like this:"
34381 #: ../src/guestfs.pod:76
34384 " guestfs_h *g = guestfs_create ();\n"
34389 #: ../src/guestfs.pod:78
34392 " /* Call guestfs_add_drive additional times if there are\n"
34393 " * multiple disk images.\n"
34395 " guestfs_add_drive (g, \"guest.img\");\n"
34400 #: ../src/guestfs.pod:83
34403 " /* Most manipulation calls won't work until you've launched\n"
34404 " * the handle 'g'. You have to do this _after_ adding drives\n"
34405 " * and _before_ other commands.\n"
34407 " guestfs_launch (g);\n"
34412 #: ../src/guestfs.pod:89
34415 " /* Now you can examine what partitions, LVs etc are available.\n"
34417 " char **partitions = guestfs_list_partitions (g);\n"
34418 " char **logvols = guestfs_lvs (g);\n"
34423 #: ../src/guestfs.pod:94
34426 " /* To access a filesystem in the image, you must mount it.\n"
34428 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34433 #: ../src/guestfs.pod:98
34436 " /* Now you can perform filesystem actions on the guest\n"
34439 " guestfs_touch (g, \"/hello\");\n"
34444 #: ../src/guestfs.pod:103
34447 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34448 " * it is done automatically when you close the handle. See\n"
34449 " * discussion of autosync in this page.\n"
34451 " guestfs_sync (g);\n"
34456 #: ../src/guestfs.pod:109
34459 " /* Close the handle 'g'. */\n"
34460 " guestfs_close (g);\n"
34465 #: ../src/guestfs.pod:112
34467 "The code above doesn't include any error checking. In real code you should "
34468 "check return values carefully for errors. In general all functions that "
34469 "return integers return C<-1> on error, and all functions that return "
34470 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34471 "how to handle errors, and consult the documentation for each function call "
34472 "below to see precisely how they return error indications. See L<guestfs-"
34473 "examples(3)> for fully worked examples."
34477 #: ../src/guestfs.pod:121
34478 msgid "DISK IMAGES"
34482 #: ../src/guestfs.pod:123
34484 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34485 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34486 "actual block device, or simply an empty file of zeroes that you have created"
34487 " through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all"
34492 #: ../src/guestfs.pod:129
34494 "The call you should use in modern code for adding drives is "
34495 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34496 "specifying that the format is raw, do:"
34500 #: ../src/guestfs.pod:133
34503 " guestfs_add_drive_opts (g, filename,\n"
34504 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34510 #: ../src/guestfs.pod:137
34511 msgid "You can add a disk read-only using:"
34515 #: ../src/guestfs.pod:139
34518 " guestfs_add_drive_opts (g, filename,\n"
34519 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34520 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34526 #: ../src/guestfs.pod:144
34528 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34529 "libguestfs won't modify the file."
34533 #: ../src/guestfs.pod:147
34535 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34536 "by a virtual machine. Adding it read-write will almost certainly cause disk"
34537 " corruption, but adding it read-only is safe."
34541 #: ../src/guestfs.pod:151
34543 "You must add at least one disk image, and you may add multiple disk images."
34544 " In the API, the disk images are usually referred to as C</dev/sda> (for "
34545 "the first one you added), C</dev/sdb> (for the second one you added), etc."
34549 #: ../src/guestfs.pod:156
34551 "Once L</guestfs_launch> has been called you cannot add any more images. You"
34552 " can call L</guestfs_list_devices> to get a list of the device names, in the"
34553 " order that you added them. See also L</BLOCK DEVICE NAMING> below."
34557 #: ../src/guestfs.pod:161
34562 #: ../src/guestfs.pod:163
34564 "Before you can read or write files, create directories and so on in a disk "
34565 "image that contains filesystems, you have to mount those filesystems using "
34566 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that"
34567 " a disk image contains (for example) one partition with a filesystem on that"
34568 " partition, then you can mount it directly:"
34572 #: ../src/guestfs.pod:170
34575 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
34580 #: ../src/guestfs.pod:172
34582 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
34583 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
34584 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
34585 "that these are libguestfs virtual devices, and are nothing to do with host "
34590 #: ../src/guestfs.pod:178
34592 "If you are given a disk image and you don't know what it contains then you "
34593 "have to find out. Libguestfs can do that too: use "
34594 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
34595 "and LVs, and either try mounting each to see what is mountable, or else "
34596 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
34597 "filesystems, use L</guestfs_list_filesystems>."
34601 #: ../src/guestfs.pod:186
34603 "Libguestfs also has a set of APIs for inspection of unknown disk images (see"
34604 " L</INSPECTION> below). But you might find it easier to look at higher "
34605 "level programs built on top of libguestfs, in particular L<virt-"
34610 #: ../src/guestfs.pod:191
34612 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
34613 "several other variations of the C<guestfs_mount_*> call."
34617 #: ../src/guestfs.pod:194
34618 msgid "FILESYSTEM ACCESS AND MODIFICATION"
34622 #: ../src/guestfs.pod:196
34624 "The majority of the libguestfs API consists of fairly low-level calls for "
34625 "accessing and modifying the files, directories, symlinks etc on mounted "
34626 "filesystems. There are over a hundred such calls which you can find listed "
34627 "in detail below in this man page, and we don't even pretend to cover them "
34628 "all in this overview."
34632 #: ../src/guestfs.pod:202
34634 "Specify filenames as full paths, starting with C<\"/\"> and including the "
34639 #: ../src/guestfs.pod:205
34641 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
34642 "the file called C<\"etc/passwd\"> then you could do:"
34646 #: ../src/guestfs.pod:208
34649 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
34654 #: ../src/guestfs.pod:210
34656 "This would return C<data> as a newly allocated buffer containing the full "
34657 "content of that file (with some conditions: see also L</DOWNLOADING> below),"
34658 " or C<NULL> if there was an error."
34662 #: ../src/guestfs.pod:214
34664 "As another example, to create a top-level directory on that filesystem "
34665 "called C<\"var\"> you would do:"
34669 #: ../src/guestfs.pod:217
34672 " guestfs_mkdir (g, \"/var\");\n"
34677 #: ../src/guestfs.pod:219
34678 msgid "To create a symlink you could do:"
34682 #: ../src/guestfs.pod:221
34685 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
34686 " \"/etc/rc3.d/S30portmap\");\n"
34691 #: ../src/guestfs.pod:224
34693 "Libguestfs will reject attempts to use relative paths and there is no "
34694 "concept of a current working directory."
34698 #: ../src/guestfs.pod:227
34700 "Libguestfs can return errors in many situations: for example if the "
34701 "filesystem isn't writable, or if a file or directory that you requested "
34702 "doesn't exist. If you are using the C API (documented here) you have to "
34703 "check for those error conditions after each call. (Other language bindings "
34704 "turn these errors into exceptions)."
34708 #: ../src/guestfs.pod:233
34710 "File writes are affected by the per-handle umask, set by calling "
34711 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
34715 #: ../src/guestfs.pod:236
34716 msgid "PARTITIONING"
34720 #: ../src/guestfs.pod:238
34722 "Libguestfs contains API calls to read, create and modify partition tables on"
34727 #: ../src/guestfs.pod:241
34729 "In the common case where you want to create a single partition covering the "
34730 "whole disk, you should use the L</guestfs_part_disk> call:"
34734 #: ../src/guestfs.pod:245
34737 " const char *parttype = \"mbr\";\n"
34738 " if (disk_is_larger_than_2TB)\n"
34739 " parttype = \"gpt\";\n"
34740 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
34745 #: ../src/guestfs.pod:250
34747 "Obviously this effectively wipes anything that was on that disk image "
34752 #: ../src/guestfs.pod:253
34757 #: ../src/guestfs.pod:255
34759 "Libguestfs provides access to a large part of the LVM2 API, such as "
34760 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
34761 "unless you familiarize yourself with the concepts of physical volumes, "
34762 "volume groups and logical volumes."
34766 #: ../src/guestfs.pod:260
34768 "This author strongly recommends reading the LVM HOWTO, online at "
34769 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
34773 #: ../src/guestfs.pod:263
34774 msgid "DOWNLOADING"
34778 #: ../src/guestfs.pod:265
34780 "Use L</guestfs_cat> to download small, text only files. This call is "
34781 "limited to files which are less than 2 MB and which cannot contain any ASCII"
34782 " NUL (C<\\0>) characters. However the API is very simple to use."
34786 #: ../src/guestfs.pod:269
34788 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
34789 "bit data, since it returns a (pointer, size) pair. However it is still "
34790 "limited to \"small\" files, less than 2 MB."
34794 #: ../src/guestfs.pod:273
34796 "L</guestfs_download> can be used to download any file, with no limits on "
34797 "content or size (even files larger than 4 GB)."
34801 #: ../src/guestfs.pod:276
34803 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
34807 #: ../src/guestfs.pod:279
34812 #: ../src/guestfs.pod:281
34814 "It's often the case that you want to write a file or files to the disk "
34819 #: ../src/guestfs.pod:284
34821 "To write a small file with fixed content, use L</guestfs_write>. To create "
34822 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
34823 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
34824 "variety of other functions for creating test files, for example "
34825 "L</guestfs_fill> and L</guestfs_fill_pattern>."
34829 #: ../src/guestfs.pod:290
34831 "To upload a single file, use L</guestfs_upload>. This call has no limits on"
34832 " file content or size (even files larger than 4 GB)."
34836 #: ../src/guestfs.pod:293
34838 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
34842 #: ../src/guestfs.pod:295
34844 "However the fastest way to upload I<large numbers of arbitrary files> is to "
34845 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
34846 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add"
34847 " the drive in a predictable way (eg. adding it last after all other drives) "
34848 "then you can get the device name from L</guestfs_list_devices> and mount it "
34849 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
34850 "sometimes non-portable between kernel versions, and they don't support "
34851 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
34852 "using a label or UUID, use an ISO image instead."
34856 #: ../src/guestfs.pod:306
34861 #: ../src/guestfs.pod:308
34863 "There are various different commands for copying between files and devices "
34864 "and in and out of the guest filesystem. These are summarised in the table "
34869 #: ../src/guestfs.pod:314
34870 msgid "B<file> to B<file>"
34874 #: ../src/guestfs.pod:316
34876 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
34877 "directories recursively."
34881 #: ../src/guestfs.pod:319
34883 "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
34887 #: ../src/guestfs.pod:322
34888 msgid "B<file> to B<device>"
34892 #: ../src/guestfs.pod:324
34893 msgid "B<device> to B<file>"
34897 #: ../src/guestfs.pod:326
34898 msgid "B<device> to B<device>"
34902 #: ../src/guestfs.pod:328
34904 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or "
34905 "L</guestfs_copy_device_to_device>."
34909 #: ../src/guestfs.pod:331
34910 msgid "Example: duplicate the contents of an LV:"
34914 #: ../src/guestfs.pod:333
34917 " guestfs_copy_device_to_device (g,\n"
34918 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34919 " /* -1 marks the end of the list of optional parameters */\n"
34925 #: ../src/guestfs.pod:338
34927 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
34928 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
34929 "optional C<size> parameter:"
34933 #: ../src/guestfs.pod:342
34936 " guestfs_copy_device_to_device (g,\n"
34937 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34938 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
34944 #: ../src/guestfs.pod:347
34945 msgid "B<file on the host> to B<file or device>"
34949 #: ../src/guestfs.pod:349
34950 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
34954 #: ../src/guestfs.pod:351
34955 msgid "B<file or device> to B<file on the host>"
34959 #: ../src/guestfs.pod:353
34960 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
34964 #: ../src/guestfs.pod:357
34965 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
34969 #: ../src/guestfs.pod:359
34971 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
34972 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
34973 "appears you can only upload and download to files. However many Un*x-like "
34974 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
34975 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
34976 "stderr, and arbitrary file descriptor N."
34980 #: ../src/guestfs.pod:367
34981 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
34985 #: ../src/guestfs.pod:370
34988 " guestfs_download (g, filename, \"/dev/stdout\");\n"
34993 #: ../src/guestfs.pod:372
34994 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
34998 #: ../src/guestfs.pod:374
35001 " char devfd[64];\n"
35002 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
35003 " guestfs_tar_out (g, \"/\", devfd);\n"
35008 #: ../src/guestfs.pod:378
35009 msgid "LISTING FILES"
35013 #: ../src/guestfs.pod:380
35015 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
35016 "L<guestfish(1)>-equivalent command C<ll>)."
35020 #: ../src/guestfs.pod:383
35022 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
35023 "programs, as a flat list of strings."
35027 #: ../src/guestfs.pod:386
35029 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
35030 "directory, plus additional information about each one. It is more "
35031 "equivalent to using the L<readdir(3)> call on a local filesystem."
35035 #: ../src/guestfs.pod:390
35037 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
35042 #: ../src/guestfs.pod:393
35043 msgid "RUNNING COMMANDS"
35047 #: ../src/guestfs.pod:395
35049 "Although libguestfs is primarily an API for manipulating files inside guest "
35050 "images, we also provide some limited facilities for running commands inside "
35055 #: ../src/guestfs.pod:399
35056 msgid "There are many limitations to this:"
35060 #: ../src/guestfs.pod:405
35062 "The kernel version that the command runs under will be different from what "
35067 #: ../src/guestfs.pod:410
35069 "If the command needs to communicate with daemons, then most likely they "
35070 "won't be running."
35074 #: ../src/guestfs.pod:415
35075 msgid "The command will be running in limited memory."
35079 #: ../src/guestfs.pod:419
35081 "The network may not be available unless you enable it (see "
35082 "L</guestfs_set_network>)."
35086 #: ../src/guestfs.pod:424
35087 msgid "Only supports Linux guests (not Windows, BSD, etc)."
35091 #: ../src/guestfs.pod:428
35093 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
35097 #: ../src/guestfs.pod:433
35099 "For SELinux guests, you may need to enable SELinux and load policy first. "
35100 "See L</SELINUX> in this manpage."
35104 #: ../src/guestfs.pod:438
35106 "I<Security:> It is not safe to run commands from untrusted, possibly "
35107 "malicious guests. These commands may attempt to exploit your program by "
35108 "sending unexpected output. They could also try to exploit the Linux kernel "
35109 "or qemu provided by the libguestfs appliance. They could use the network "
35110 "provided by the libguestfs appliance to bypass ordinary network partitions "
35111 "and firewalls. They could use the elevated privileges or different SELinux "
35112 "context of your program to their advantage."
35116 #: ../src/guestfs.pod:447
35118 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
35119 "(a script which runs when the guest next boots normally), and to have this "
35120 "script run the commands you want in the normal context of the running guest,"
35121 " network security and so on. For information about other security issues, "
35122 "see L</SECURITY>."
35126 #: ../src/guestfs.pod:455
35128 "The two main API calls to run commands are L</guestfs_command> and "
35129 "L</guestfs_sh> (there are also variations)."
35133 #: ../src/guestfs.pod:458
35135 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
35136 "shell globs, redirections, etc will work."
35140 #: ../src/guestfs.pod:461
35141 msgid "CONFIGURATION FILES"
35145 #: ../src/guestfs.pod:463
35147 "To read and write configuration files in Linux guest filesystems, we "
35148 "strongly recommend using Augeas. For example, Augeas understands how to "
35149 "read and write, say, a Linux shadow password file or X.org configuration "
35150 "file, and so avoids you having to write that code."
35154 #: ../src/guestfs.pod:468
35156 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't"
35157 " document Augeas itself here because there is excellent documentation on the"
35158 " L<http://augeas.net/> website."
35162 #: ../src/guestfs.pod:472
35164 "If you don't want to use Augeas (you fool!) then try calling "
35165 "L</guestfs_read_lines> to get the file as a list of lines which you can "
35170 #: ../src/guestfs.pod:476
35175 #: ../src/guestfs.pod:478
35177 "We support SELinux guests. To ensure that labeling happens correctly in "
35178 "SELinux guests, you need to enable SELinux and load the guest's policy:"
35182 #: ../src/guestfs.pod:486
35183 msgid "Before launching, do:"
35187 #: ../src/guestfs.pod:488
35190 " guestfs_set_selinux (g, 1);\n"
35195 #: ../src/guestfs.pod:492
35197 "After mounting the guest's filesystem(s), load the policy. This is best "
35198 "done by running the L<load_policy(8)> command in the guest itself:"
35202 #: ../src/guestfs.pod:496
35205 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
35210 #: ../src/guestfs.pod:498
35212 "(Older versions of C<load_policy> require you to specify the name of the "
35217 #: ../src/guestfs.pod:503
35219 "Optionally, set the security context for the API. The correct security "
35220 "context to use can only be known by inspecting the guest. As an example:"
35224 #: ../src/guestfs.pod:507
35227 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
35232 #: ../src/guestfs.pod:511
35233 msgid "This will work for running commands and editing existing files."
35237 #: ../src/guestfs.pod:513
35239 "When new files are created, you may need to label them explicitly, for "
35240 "example by running the external command C<restorecon pathname>."
35244 #: ../src/guestfs.pod:517
35249 #: ../src/guestfs.pod:519
35251 "Certain calls are affected by the current file mode creation mask (the "
35252 "\"umask\"). In particular ones which create files or directories, such as "
35253 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
35254 "either the default mode that the file is created with or modifies the mode "
35259 #: ../src/guestfs.pod:525
35261 "The default umask is C<022>, so files are created with modes such as C<0644>"
35262 " and directories with C<0755>."
35266 #: ../src/guestfs.pod:528
35268 "There are two ways to avoid being affected by umask. Either set umask to 0 "
35269 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
35270 "L</guestfs_chmod> after creating each file or directory."
35274 #: ../src/guestfs.pod:532
35275 msgid "For more information about umask, see L<umask(2)>."
35279 #: ../src/guestfs.pod:536
35281 "Libguestfs allows you to access Linux guests which have been encrypted using"
35282 " whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
35283 "standard. This includes nearly all whole disk encryption systems used by "
35284 "modern Linux guests."
35288 #: ../src/guestfs.pod:542
35290 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
35291 "returns the string C<crypto_LUKS>)."
35295 #: ../src/guestfs.pod:545
35297 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
35298 "will require the passphrase!"
35302 #: ../src/guestfs.pod:548
35304 "Opening a LUKS device creates a new device mapper device called "
35305 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
35306 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
35307 "decrypted from and encrypted to the underlying block device respectively."
35311 #: ../src/guestfs.pod:554
35313 "LVM volume groups on the device can be made visible by calling "
35314 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
35315 "volume(s) can now be mounted in the usual way."
35319 #: ../src/guestfs.pod:558
35321 "Use the reverse process to close a LUKS device. Unmount any logical volumes"
35322 " on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35323 "[\"/dev/VG\"])>. Then close the mapper device by calling "
35324 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35325 "underlying encrypted block device)."
35329 #: ../src/guestfs.pod:565
35334 #: ../src/guestfs.pod:567
35336 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35337 "contains operating systems, an install CD or a live CD. (These APIs used to"
35338 " be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since"
35339 " version 1.5.3 the most frequently used part of this library has been "
35340 "rewritten in C and moved into the core code)."
35344 #: ../src/guestfs.pod:574
35346 "Add all disks belonging to the unknown virtual machine and call "
35347 "L</guestfs_launch> in the usual way."
35351 #: ../src/guestfs.pod:577
35353 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls"
35354 " and certain heuristics, and returns a list of operating systems that were "
35355 "found. An empty list means none were found. A single element is the root "
35356 "filesystem of the operating system. For dual- or multi-boot guests, "
35357 "multiple roots can be returned, each one corresponding to a separate "
35358 "operating system. (Multi-boot virtual machines are extremely rare in the "
35359 "world of virtualization, but since this scenario can happen, we have built "
35360 "libguestfs to deal with it.)"
35364 #: ../src/guestfs.pod:586
35366 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35367 "to get additional details about that operating system. For example, call "
35368 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for"
35369 " Windows and Linux-based operating systems respectively."
35373 #: ../src/guestfs.pod:592
35375 "Un*x-like and Linux-based operating systems usually consist of several "
35376 "filesystems which are mounted at boot time (for example, a separate boot "
35377 "partition mounted on C</boot>). The inspection rules are able to detect how"
35378 " filesystems correspond to mount points. Call "
35379 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35380 "hash table like this example:"
35384 #: ../src/guestfs.pod:599
35387 " /boot => /dev/sda1\n"
35388 " / => /dev/vg_guest/lv_root\n"
35389 " /usr => /dev/vg_guest/lv_usr\n"
35394 #: ../src/guestfs.pod:603
35396 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35397 "filesystems as suggested."
35401 #: ../src/guestfs.pod:606
35403 "Be careful to mount filesystems in the right order (eg. C</> before "
35404 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
35409 #: ../src/guestfs.pod:610
35411 "Inspection currently only works for some common operating systems. "
35412 "Contributors are welcome to send patches for other operating systems that we"
35413 " currently cannot detect."
35417 #: ../src/guestfs.pod:614
35419 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35420 "for more details. The L</guestfs_inspect_os> function just ignores any "
35421 "encrypted devices."
35425 #: ../src/guestfs.pod:618
35427 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35428 "inspection and caches the results in the guest handle. Subsequent calls to "
35429 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
35430 "read the disks. If you change the content of the guest disks, you can redo "
35431 "inspection by calling L</guestfs_inspect_os> again. "
35432 "(L</guestfs_inspect_list_applications> works a little differently from the "
35433 "other calls and does read the disks. See documentation for that function "
35438 #: ../src/guestfs.pod:627
35439 msgid "INSPECTING INSTALL DISKS"
35443 #: ../src/guestfs.pod:629
35445 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35450 #: ../src/guestfs.pod:632
35452 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35453 "system, which currently can be C<installed> (a regular operating system) or "
35454 "C<installer> (some sort of install disk)."
35458 #: ../src/guestfs.pod:636
35460 "Further information is available about the operating system that can be "
35461 "installed using the regular inspection APIs like "
35462 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
35467 #: ../src/guestfs.pod:641
35469 "Some additional information specific to installer disks is also available "
35470 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
35471 "L</guestfs_inspect_is_multipart> calls."
35475 #: ../src/guestfs.pod:646
35476 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35480 #: ../src/guestfs.pod:648
35482 "Libguestfs can mount NTFS partitions. It does this using the L<http://www"
35483 ".ntfs-3g.org/> driver."
35487 #: ../src/guestfs.pod:651
35488 msgid "DRIVE LETTERS AND PATHS"
35492 #: ../src/guestfs.pod:653
35494 "DOS and Windows still use drive letters, and the filesystems are always "
35495 "treated as case insensitive by Windows itself, and therefore you might find "
35496 "a Windows configuration file referring to a path like "
35497 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
35498 "that directory might be referred to as C</WINDOWS/System32>."
35502 #: ../src/guestfs.pod:659
35504 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35505 "L</guestfs_inspect_get_drive_mappings>)"
35509 #: ../src/guestfs.pod:662
35511 "Dealing with separator characters (backslash vs forward slash) is outside "
35512 "the scope of libguestfs, but usually a simple character replacement will "
35517 #: ../src/guestfs.pod:666
35519 "To resolve the case insensitivity of paths, call "
35520 "L</guestfs_case_sensitive_path>."
35524 #: ../src/guestfs.pod:669
35525 msgid "ACCESSING THE WINDOWS REGISTRY"
35529 #: ../src/guestfs.pod:671
35531 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35532 "files, through the library C<hivex> which is part of the libguestfs project "
35533 "although ships as a separate tarball. You have to locate and download the "
35534 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35535 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-"
35536 "win-reg(1)> for more help on this issue."
35540 #: ../src/guestfs.pod:679
35541 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
35545 #: ../src/guestfs.pod:681
35547 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
35548 "provide something which looks like a Linux symlink. The way it tries to do "
35549 "the rewriting is described here:"
35553 #: ../src/guestfs.pod:685
35555 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
35560 #: ../src/guestfs.pod:687
35562 "The essential problem is that ntfs-3g simply does not have enough "
35563 "information to do a correct job. NTFS links can contain drive letters and "
35564 "references to external device GUIDs that ntfs-3g has no way of resolving. "
35565 "It is almost certainly the case that libguestfs callers should ignore what "
35566 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
35570 #: ../src/guestfs.pod:694
35572 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
35573 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
35574 "attribute, and read the raw reparse data from that (you can find the format "
35575 "documented in various places around the web)."
35579 #: ../src/guestfs.pod:699
35580 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
35584 #: ../src/guestfs.pod:701
35586 "There are other useful extended attributes that can be read from ntfs-3g "
35587 "filesystems (using L</guestfs_getxattr>). See:"
35591 #: ../src/guestfs.pod:704
35593 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
35597 #: ../src/guestfs.pod:706
35598 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
35602 #: ../src/guestfs.pod:708
35604 "Although we don't want to discourage you from using the C API, we will "
35605 "mention here that the same API is also available in other languages."
35609 #: ../src/guestfs.pod:711
35611 "The API is broadly identical in all supported languages. This means that "
35612 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)>"
35613 " in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
35614 "OCaml. In other words, a straightforward, predictable isomorphism between "
35619 #: ../src/guestfs.pod:717
35621 "Error messages are automatically transformed into exceptions if the language"
35626 #: ../src/guestfs.pod:720
35628 "We don't try to \"object orientify\" parts of the API in OO languages, "
35629 "although contributors are welcome to write higher level APIs above what we "
35630 "provide in their favourite languages if they wish."
35634 #: ../src/guestfs.pod:726
35639 #: ../src/guestfs.pod:728
35641 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
35642 "identical to the C API. C++ classes and exceptions are not used."
35646 #: ../src/guestfs.pod:732
35651 #: ../src/guestfs.pod:734
35653 "The C# bindings are highly experimental. Please read the warnings at the "
35654 "top of C<csharp/Libguestfs.cs>."
35658 #: ../src/guestfs.pod:737
35663 #: ../src/guestfs.pod:739
35664 msgid "See L<guestfs-erlang(3)>."
35668 #: ../src/guestfs.pod:741
35673 #: ../src/guestfs.pod:743
35675 "This is the only language binding that is working but incomplete. Only "
35676 "calls which return simple integers have been bound in Haskell, and we are "
35677 "looking for help to complete this binding."
35681 #: ../src/guestfs.pod:747
35686 #: ../src/guestfs.pod:749
35688 "Full documentation is contained in the Javadoc which is distributed with "
35689 "libguestfs. For examples, see L<guestfs-java(3)>."
35693 #: ../src/guestfs.pod:752
35698 #: ../src/guestfs.pod:754
35699 msgid "See L<guestfs-ocaml(3)>."
35703 #: ../src/guestfs.pod:756
35708 #: ../src/guestfs.pod:758
35709 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
35713 #: ../src/guestfs.pod:760
35718 #: ../src/guestfs.pod:762
35720 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
35721 "the php-libguestfs package for your distribution."
35725 #: ../src/guestfs.pod:765
35726 msgid "The PHP binding only works correctly on 64 bit machines."
35730 #: ../src/guestfs.pod:767
35735 #: ../src/guestfs.pod:769
35736 msgid "See L<guestfs-python(3)>."
35740 #: ../src/guestfs.pod:771
35745 #: ../src/guestfs.pod:773
35746 msgid "See L<guestfs-ruby(3)>."
35750 #: ../src/guestfs.pod:775
35751 msgid "B<shell scripts>"
35755 #: ../src/guestfs.pod:777
35756 msgid "See L<guestfish(1)>."
35760 #: ../src/guestfs.pod:781
35761 msgid "LIBGUESTFS GOTCHAS"
35765 #: ../src/guestfs.pod:783
35767 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
35768 "system [...] that works in the way it is documented but is counterintuitive "
35769 "and almost invites mistakes.\""
35773 #: ../src/guestfs.pod:787
35775 "Since we developed libguestfs and the associated tools, there are several "
35776 "things we would have designed differently, but are now stuck with for "
35777 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0"
35778 " release, you can expect these to change. Beware of them."
35782 #: ../src/guestfs.pod:795
35783 msgid "Autosync / forgetting to sync."
35787 #: ../src/guestfs.pod:797
35789 "I<Update:> Autosync is enabled by default for all API users starting from "
35790 "libguestfs 1.5.24. This section only applies to older versions."
35794 #: ../src/guestfs.pod:800
35796 "When modifying a filesystem from C or another language, you B<must> unmount "
35797 "all filesystems and call L</guestfs_sync> explicitly before you close the "
35798 "libguestfs handle. You can also call:"
35802 #: ../src/guestfs.pod:804
35805 " guestfs_set_autosync (g, 1);\n"
35810 #: ../src/guestfs.pod:806
35812 "to have the unmount/sync done automatically for you when the handle 'g' is "
35813 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
35818 #: ../src/guestfs.pod:810
35820 "If you forget to do this, then it is entirely possible that your changes "
35821 "won't be written out, or will be partially written, or (very rarely) that "
35822 "you'll get disk corruption."
35826 #: ../src/guestfs.pod:814
35828 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
35829 "guestfish scripts that forget to sync will work just fine, which can make "
35830 "this very puzzling if you are trying to debug a problem."
35834 #: ../src/guestfs.pod:818
35835 msgid "Mount option C<-o sync> should not be the default."
35839 #: ../src/guestfs.pod:820
35841 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
35842 "libguestfs 1.13.16. This section only applies to older versions."
35846 #: ../src/guestfs.pod:823
35848 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly."
35849 " However C<-o sync> does not add any reliability benefit, but does have a "
35850 "very large performance impact."
35854 #: ../src/guestfs.pod:827
35856 "The work around is to use L</guestfs_mount_options> and set the mount "
35857 "options that you actually want to use."
35861 #: ../src/guestfs.pod:830
35862 msgid "Read-only should be the default."
35866 #: ../src/guestfs.pod:832
35868 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
35869 "specify I<--rw> if you want to make changes to the image."
35873 #: ../src/guestfs.pod:835
35874 msgid "This would reduce the potential to corrupt live VM images."
35878 #: ../src/guestfs.pod:837
35880 "Note that many filesystems change the disk when you just mount and unmount, "
35881 "even if you didn't perform any writes. You need to use "
35882 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
35886 #: ../src/guestfs.pod:841
35887 msgid "guestfish command line is hard to use."
35891 #: ../src/guestfs.pod:843
35893 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
35894 "examination). It tries to run a guestfish command C<disk.img> which doesn't"
35895 " exist, so it fails. In earlier versions of guestfish the error message was"
35896 " also unintuitive, but we have corrected this since. Like the Bourne shell,"
35897 " we should have used C<guestfish -c command> to run commands."
35901 #: ../src/guestfs.pod:850
35902 msgid "guestfish megabyte modifiers don't work right on all commands"
35906 #: ../src/guestfs.pod:852
35908 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
35909 "other modifiers). What guestfish actually does is to multiply the number "
35910 "part by the modifier part and pass the result to the C API. However this "
35911 "doesn't work for a few APIs which aren't expecting bytes, but are already "
35912 "expecting some other unit (eg. megabytes)."
35916 #: ../src/guestfs.pod:859
35917 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
35921 #: ../src/guestfs.pod:861
35924 " lvcreate LV VG 100M\n"
35929 #: ../src/guestfs.pod:863
35931 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
35932 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
35933 "megabytes * megabytes) logical volume. The error message you get from this "
35934 "is also a little obscure."
35938 #: ../src/guestfs.pod:868
35940 "This could be fixed in the generator by specially marking parameters and "
35941 "return values which take bytes or other units."
35945 #: ../src/guestfs.pod:871
35946 msgid "Ambiguity between devices and paths"
35950 #: ../src/guestfs.pod:873
35952 "There is a subtle ambiguity in the API between a device name (eg. "
35953 "C</dev/sdb2>) and a similar pathname. A file might just happen to be called"
35954 " C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
35958 #: ../src/guestfs.pod:878
35960 "In the current API we usually resolve this ambiguity by having two separate "
35961 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
35962 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
35963 "detecting if the path supplied begins with C</dev/>."
35967 #: ../src/guestfs.pod:884
35969 "To avoid both the ambiguity and the need to duplicate some calls, we could "
35970 "make paths/devices into structured names. One way to do this would be to "
35971 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
35972 "aspect of grub. Another way would be to use a structured type, equivalent "
35973 "to this OCaml type:"
35977 #: ../src/guestfs.pod:890
35980 " type path = Path of string | Device of int | Partition of int * int\n"
35985 #: ../src/guestfs.pod:892
35986 msgid "which would allow you to pass arguments like:"
35990 #: ../src/guestfs.pod:894
35993 " Path \"/foo/bar\"\n"
35994 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
35995 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
35996 " Path \"/dev/sdb2\" (* not a device *)\n"
36001 #: ../src/guestfs.pod:899
36003 "As you can see there are still problems to resolve even with this "
36004 "representation. Also consider how it might work in guestfish."
36008 #: ../src/guestfs.pod:904
36009 msgid "KEYS AND PASSPHRASES"
36013 #: ../src/guestfs.pod:906
36015 "Certain libguestfs calls take a parameter that contains sensitive key "
36016 "material, passed in as a C string."
36020 #: ../src/guestfs.pod:909
36022 "In the future we would hope to change the libguestfs implementation so that "
36023 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
36024 "swap. However this is I<not> done at the moment, because of the complexity "
36025 "of such an implementation."
36029 #: ../src/guestfs.pod:914
36031 "Therefore you should be aware that any key parameter you pass to libguestfs "
36032 "might end up being written out to the swap partition. If this is a concern,"
36033 " scrub the swap partition or don't use libguestfs on encrypted devices."
36037 #: ../src/guestfs.pod:919
36038 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
36042 #: ../src/guestfs.pod:921
36044 "All high-level libguestfs actions are synchronous. If you want to use "
36045 "libguestfs asynchronously then you must create a thread."
36049 #: ../src/guestfs.pod:924
36051 "Only use the handle from a single thread. Either use the handle exclusively"
36052 " from one thread, or provide your own mutex so that two threads cannot issue"
36053 " calls on the same handle at the same time."
36057 #: ../src/guestfs.pod:928
36059 "See the graphical program guestfs-browser for one possible architecture for "
36060 "multithreaded programs using libvirt and libguestfs."
36064 #: ../src/guestfs.pod:931
36069 #: ../src/guestfs.pod:933
36071 "Libguestfs needs a supermin appliance, which it finds by looking along an "
36076 #: ../src/guestfs.pod:936
36078 "By default it looks for these in the directory C<$libdir/guestfs> (eg. "
36079 "C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
36083 #: ../src/guestfs.pod:939
36085 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH>"
36086 " to change the directories that libguestfs will search in. The value is a "
36087 "colon-separated list of paths. The current directory is I<not> searched "
36088 "unless the path contains an empty element or C<.>. For example "
36089 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
36090 "then C</usr/lib/guestfs>."
36094 #: ../src/guestfs.pod:946
36095 msgid "QEMU WRAPPERS"
36099 #: ../src/guestfs.pod:948
36101 "If you want to compile your own qemu, run qemu from a non-standard location,"
36102 " or pass extra arguments to qemu, then you can write a shell-script wrapper "
36107 #: ../src/guestfs.pod:952
36109 "There is one important rule to remember: you I<must C<exec qemu>> as the "
36110 "last command in the shell script (so that qemu replaces the shell and "
36111 "becomes the direct child of the libguestfs-using program). If you don't do "
36112 "this, then the qemu process won't be cleaned up correctly."
36116 #: ../src/guestfs.pod:957
36118 "Here is an example of a wrapper, where I have built my own copy of qemu from"
36123 #: ../src/guestfs.pod:960
36127 " qemudir=/home/rjones/d/qemu\n"
36128 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
36133 #: ../src/guestfs.pod:964
36135 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
36136 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
36141 #: ../src/guestfs.pod:968
36144 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
36149 #: ../src/guestfs.pod:970
36151 "Note that libguestfs also calls qemu with the -help and -version options in "
36152 "order to determine features."
36156 #: ../src/guestfs.pod:973
36158 "Wrappers can also be used to edit the options passed to qemu. In the "
36159 "following example, the C<-machine ...> option (C<-machine> and the following"
36160 " argument) are removed from the command line and replaced with C<-machine "
36161 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
36162 "right one to remove, putting the remaining options into the C<args> array."
36166 #: ../src/guestfs.pod:982
36170 " while [ $# -gt 0 ]; do\n"
36171 " case \"$1\" in\n"
36175 " args[i]=\"$1\"\n"
36184 #: ../src/guestfs.pod:994
36187 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
36192 #: ../src/guestfs.pod:996
36193 msgid "ATTACHING TO RUNNING DAEMONS"
36197 #: ../src/guestfs.pod:998
36199 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
36200 "babies. Use with caution."
36204 #: ../src/guestfs.pod:1001
36206 "I<Note (2):> This section explains how to attach to a running daemon from a "
36207 "low level perspective. For most users, simply using virt tools such as "
36208 "L<guestfish(1)> with the I<--live> option will \"just work\"."
36212 #: ../src/guestfs.pod:1005
36213 msgid "Using guestfs_set_attach_method"
36217 #: ../src/guestfs.pod:1007
36219 "By calling L</guestfs_set_attach_method> you can change how the library "
36220 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
36221 "L</ARCHITECTURE> for some background)."
36225 #: ../src/guestfs.pod:1011
36227 "The normal attach method is C<appliance>, where a small appliance is created"
36228 " containing the daemon, and then the library connects to this."
36232 #: ../src/guestfs.pod:1014
36234 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
36235 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
36236 "daemon over the Unix domain socket."
36240 #: ../src/guestfs.pod:1018
36242 "The normal use for this is to connect to a running virtual machine that "
36243 "contains a C<guestfsd> daemon, and send commands so you can read and write "
36244 "files inside the live virtual machine."
36248 #: ../src/guestfs.pod:1022
36249 msgid "Using guestfs_add_domain with live flag"
36253 #: ../src/guestfs.pod:1024
36255 "L</guestfs_add_domain> provides some help for getting the correct attach "
36256 "method. If you pass the C<live> option to this function, then (if the "
36257 "virtual machine is running) it will examine the libvirt XML looking for a "
36258 "virtio-serial channel to connect to:"
36262 #: ../src/guestfs.pod:1030
36269 " <channel type='unix'>\n"
36270 " <source mode='bind' path='/path/to/socket'/>\n"
36271 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
36280 #: ../src/guestfs.pod:1042
36282 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
36283 "method to C<unix:/path/to/socket>."
36287 #: ../src/guestfs.pod:1045
36289 "Some of the libguestfs tools (including guestfish) support a I<--live> "
36290 "option which is passed through to L</guestfs_add_domain> thus allowing you "
36291 "to attach to and modify live virtual machines."
36295 #: ../src/guestfs.pod:1049
36297 "The virtual machine needs to have been set up beforehand so that it has the "
36298 "virtio-serial channel and so that guestfsd is running inside it."
36302 #: ../src/guestfs.pod:1053
36303 msgid "ABI GUARANTEE"
36307 #: ../src/guestfs.pod:1055
36309 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36310 "actions as outlined in this section. Although we will deprecate some "
36311 "actions, for example if they get replaced by newer calls, we will keep the "
36312 "old actions forever. This allows you the developer to program in confidence"
36313 " against the libguestfs API."
36317 #: ../src/guestfs.pod:1061
36318 msgid "BLOCK DEVICE NAMING"
36322 #: ../src/guestfs.pod:1063
36324 "In the kernel there is now quite a profusion of schemata for naming block "
36325 "devices (in this context, by I<block device> I mean a physical or virtual "
36326 "hard drive). The original Linux IDE driver used names starting with "
36327 "C</dev/hd*>. SCSI devices have historically used a different naming scheme,"
36328 " C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
36329 "replacement for the old IDE driver (particularly for SATA devices) those "
36330 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
36331 "machines with paravirtualized drivers. This has created several different "
36332 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
36337 #: ../src/guestfs.pod:1075
36339 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36340 "Linux kernel to access block devices. We can run a variety of appliances "
36341 "based on a variety of Linux kernels."
36345 #: ../src/guestfs.pod:1079
36347 "This causes a problem for libguestfs because many API calls use device or "
36348 "partition names. Working scripts and the recipe (example) scripts that we "
36349 "make available over the internet could fail if the naming scheme changes."
36353 #: ../src/guestfs.pod:1084
36355 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36356 "Internally C</dev/sd*> names are translated, if necessary, to other names as"
36357 " required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any"
36358 " device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36362 #: ../src/guestfs.pod:1090
36364 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>,"
36365 " L</guestfs_list_partitions> and similar calls return the true names of the "
36366 "devices and partitions as known to the appliance."
36370 #: ../src/guestfs.pod:1095
36371 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36375 #: ../src/guestfs.pod:1097
36377 "Usually this translation is transparent. However in some (very rare) cases"
36378 " you may need to know the exact algorithm. Such cases include where you use"
36379 " L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
36380 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
36384 #: ../src/guestfs.pod:1103
36386 "The algorithm is applied only to I<parameters> which are known to be either "
36387 "device or partition names. Return values from functions such as "
36388 "L</guestfs_list_devices> are never changed."
36392 #: ../src/guestfs.pod:1111
36393 msgid "Is the string a parameter which is a device or partition name?"
36397 #: ../src/guestfs.pod:1115
36398 msgid "Does the string begin with C</dev/sd>?"
36402 #: ../src/guestfs.pod:1119
36404 "Does the named device exist? If so, we use that device. However if I<not> "
36405 "then we continue with this algorithm."
36409 #: ../src/guestfs.pod:1124
36410 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36414 #: ../src/guestfs.pod:1126
36415 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36419 #: ../src/guestfs.pod:1128
36420 msgid "If that named device exists, use it. If not, continue."
36424 #: ../src/guestfs.pod:1132
36425 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36429 #: ../src/guestfs.pod:1134
36430 msgid "If that named device exists, use it. If not, return an error."
36434 #: ../src/guestfs.pod:1138
36435 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36439 #: ../src/guestfs.pod:1140
36441 "Although the standard naming scheme and automatic translation is useful for "
36442 "simple programs and guestfish scripts, for larger programs it is best not to"
36443 " rely on this mechanism."
36447 #: ../src/guestfs.pod:1144
36449 "Where possible for maximum future portability programs using libguestfs "
36450 "should use these future-proof techniques:"
36454 #: ../src/guestfs.pod:1151
36456 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36457 "device names, and then use those names directly."
36461 #: ../src/guestfs.pod:1154
36463 "Since those device names exist by definition, they will never be translated."
36467 #: ../src/guestfs.pod:1159
36469 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36470 "filesystem labels."
36474 #: ../src/guestfs.pod:1166
36476 "This section discusses security implications of using libguestfs, "
36477 "particularly with untrusted or malicious guests or disk images."
36481 #: ../src/guestfs.pod:1169
36482 msgid "GENERAL SECURITY CONSIDERATIONS"
36486 #: ../src/guestfs.pod:1171
36488 "Be careful with any files or data that you download from a guest (by "
36489 "\"download\" we mean not just the L</guestfs_download> command but any "
36490 "command that reads files, filenames, directories or anything else from a "
36491 "disk image). An attacker could manipulate the data to fool your program "
36492 "into doing the wrong thing. Consider cases such as:"
36496 #: ../src/guestfs.pod:1181
36497 msgid "the data (file etc) not being present"
36501 #: ../src/guestfs.pod:1185
36502 msgid "being present but empty"
36506 #: ../src/guestfs.pod:1189
36507 msgid "being much larger than normal"
36511 #: ../src/guestfs.pod:1193
36512 msgid "containing arbitrary 8 bit data"
36516 #: ../src/guestfs.pod:1197
36517 msgid "being in an unexpected character encoding"
36521 #: ../src/guestfs.pod:1201
36522 msgid "containing homoglyphs."
36526 #: ../src/guestfs.pod:1205
36527 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36531 #: ../src/guestfs.pod:1207
36533 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36534 "(VFS) module can sometimes be escalated into exploits by deliberately "
36535 "creating a malicious, malformed filesystem. These exploits are very severe "
36536 "for two reasons. Firstly there are very many filesystem drivers in the "
36537 "kernel, and many of them are infrequently used and not much developer "
36538 "attention has been paid to the code. Linux userspace helps potential "
36539 "crackers by detecting the filesystem type and automatically choosing the "
36540 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36541 "the administrator. Secondly, a kernel-level exploit is like a local root "
36542 "exploit (worse in some ways), giving immediate and total access to the "
36543 "system right down to the hardware level."
36547 #: ../src/guestfs.pod:1220
36549 "That explains why you should never mount a filesystem from an untrusted "
36550 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
36551 "inside a qemu virtual machine, usually running as a non-root user. The "
36552 "attacker would need to write a filesystem which first exploited the kernel, "
36553 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
36554 "the libguestfs protocol, and finally to be as serious as the host kernel "
36555 "exploit it would need to escalate its privileges to root. This multi-step "
36556 "escalation, performed by a static piece of data, is thought to be extremely "
36557 "hard to do, although we never say 'never' about security issues."
36561 #: ../src/guestfs.pod:1231
36563 "In any case callers can reduce the attack surface by forcing the filesystem "
36564 "type when mounting (use L</guestfs_mount_vfs>)."
36568 #: ../src/guestfs.pod:1234
36569 msgid "PROTOCOL SECURITY"
36573 #: ../src/guestfs.pod:1236
36575 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a"
36576 " defined upper message size. However a program that uses libguestfs must "
36577 "also take care - for example you can write a program that downloads a binary"
36578 " from a disk image and executes it locally, and no amount of protocol "
36579 "security will save you from the consequences."
36583 #: ../src/guestfs.pod:1242
36584 msgid "INSPECTION SECURITY"
36588 #: ../src/guestfs.pod:1244
36590 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
36591 "directly from the guest, and these could contain any 8 bit data. Callers "
36592 "should be careful to escape these before printing them to a structured file "
36593 "(for example, use HTML escaping if creating a web page)."
36597 #: ../src/guestfs.pod:1250
36599 "Guest configuration may be altered in unusual ways by the administrator of "
36600 "the virtual machine, and may not reflect reality (particularly for untrusted"
36601 " or actively malicious guests). For example we parse the hostname from "
36602 "configuration files like C</etc/sysconfig/network> that we find in the "
36603 "guest, but the guest administrator can easily manipulate these files to "
36604 "provide the wrong hostname."
36608 #: ../src/guestfs.pod:1258
36610 "The inspection API parses guest configuration using two external libraries: "
36611 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
36612 "designed to be robust in the face of malicious data, although denial of "
36613 "service attacks are still possible, for example with oversized configuration"
36618 #: ../src/guestfs.pod:1264
36619 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
36623 #: ../src/guestfs.pod:1266
36625 "Be very cautious about running commands from the guest. By running a "
36626 "command in the guest, you are giving CPU time to a binary that you do not "
36627 "control, under the same user account as the library, albeit wrapped in qemu "
36628 "virtualization. More information and alternatives can be found in the "
36629 "section L</RUNNING COMMANDS>."
36633 #: ../src/guestfs.pod:1272
36634 msgid "CVE-2010-3851"
36638 #: ../src/guestfs.pod:1274
36639 msgid "https://bugzilla.redhat.com/642934"
36643 #: ../src/guestfs.pod:1276
36645 "This security bug concerns the automatic disk format detection that qemu "
36646 "does on disk images."
36650 #: ../src/guestfs.pod:1279
36652 "A raw disk image is just the raw bytes, there is no header. Other disk "
36653 "images like qcow2 contain a special header. Qemu deals with this by looking"
36654 " for one of the known headers, and if none is found then assuming the disk "
36655 "image must be raw."
36659 #: ../src/guestfs.pod:1284
36661 "This allows a guest which has been given a raw disk image to write some "
36662 "other header. At next boot (or when the disk image is accessed by "
36663 "libguestfs) qemu would do autodetection and think the disk image format was,"
36664 " say, qcow2 based on the header written by the guest."
36668 #: ../src/guestfs.pod:1289
36670 "This in itself would not be a problem, but qcow2 offers many features, one "
36671 "of which is to allow a disk image to refer to another image (called the "
36672 "\"backing disk\"). It does this by placing the path to the backing disk "
36673 "into the qcow2 header. This path is not validated and could point to any "
36674 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
36675 "\"holes\" in the qcow2 disk image, which of course is completely under the "
36676 "control of the attacker."
36680 #: ../src/guestfs.pod:1297
36682 "In libguestfs this is rather hard to exploit except under two circumstances:"
36686 #: ../src/guestfs.pod:1304
36687 msgid "You have enabled the network or have opened the disk in write mode."
36691 #: ../src/guestfs.pod:1308
36693 "You are also running untrusted code from the guest (see L</RUNNING "
36698 #: ../src/guestfs.pod:1313
36700 "The way to avoid this is to specify the expected disk format when adding "
36701 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
36702 "should always do this if the disk is raw format, and it's a good idea for "
36707 #: ../src/guestfs.pod:1318
36709 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
36710 "format is fetched from libvirt and passed through."
36714 #: ../src/guestfs.pod:1321
36716 "For libguestfs tools, use the I<--format> command line parameter as "
36721 #: ../src/guestfs.pod:1324
36722 msgid "CONNECTION MANAGEMENT"
36726 #: ../src/guestfs.pod:1326
36727 msgid "guestfs_h *"
36731 #: ../src/guestfs.pod:1328
36733 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
36734 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
36735 "handle and release all resources used."
36739 #: ../src/guestfs.pod:1332
36741 "For information on using multiple handles and threads, see the section "
36742 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
36746 #: ../src/guestfs.pod:1335
36747 msgid "guestfs_create"
36751 #: ../src/guestfs.pod:1337
36754 " guestfs_h *guestfs_create (void);\n"
36759 #: ../src/guestfs.pod:1339
36760 msgid "Create a connection handle."
36764 #: ../src/guestfs.pod:1341
36766 "On success this returns a non-NULL pointer to a handle. On error it returns"
36771 #: ../src/guestfs.pod:1344
36773 "You have to \"configure\" the handle after creating it. This includes "
36774 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
36775 "handle at least once."
36779 #: ../src/guestfs.pod:1348
36780 msgid "After configuring the handle, you have to call L</guestfs_launch>."
36784 #: ../src/guestfs.pod:1350
36786 "You may also want to configure error handling for the handle. See the "
36787 "L</ERROR HANDLING> section below."
36791 #: ../src/guestfs.pod:1353
36792 msgid "guestfs_close"
36796 #: ../src/guestfs.pod:1355
36799 " void guestfs_close (guestfs_h *g);\n"
36804 #: ../src/guestfs.pod:1357
36805 msgid "This closes the connection handle and frees up all resources used."
36809 #: ../src/guestfs.pod:1359
36811 "If autosync was set on the handle and the handle was launched, then this "
36812 "implicitly calls various functions to unmount filesystems and sync the disk."
36813 " See L</guestfs_set_autosync> for more details."
36817 #: ../src/guestfs.pod:1363
36818 msgid "If a close callback was set on the handle, then it is called."
36822 #: ../src/guestfs.pod:1365
36823 msgid "ERROR HANDLING"
36827 #: ../src/guestfs.pod:1367
36829 "API functions can return errors. For example, almost all functions that "
36830 "return C<int> will return C<-1> to indicate an error."
36834 #: ../src/guestfs.pod:1370
36836 "Additional information is available for errors: an error message string and "
36837 "optionally an error number (errno) if the thing that failed was a system "
36842 #: ../src/guestfs.pod:1374
36844 "You can get at the additional information about the last error on the handle"
36845 " by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by "
36846 "setting up an error handler with L</guestfs_set_error_handler>."
36850 #: ../src/guestfs.pod:1379
36852 "When the handle is created, a default error handler is installed which "
36853 "prints the error message string to C<stderr>. For small short-running "
36854 "command line programs it is sufficient to do:"
36858 #: ../src/guestfs.pod:1383
36861 " if (guestfs_launch (g) == -1)\n"
36862 " exit (EXIT_FAILURE);\n"
36867 #: ../src/guestfs.pod:1386
36869 "since the default error handler will ensure that an error message has been "
36870 "printed to C<stderr> before the program exits."
36874 #: ../src/guestfs.pod:1389
36876 "For other programs the caller will almost certainly want to install an "
36877 "alternate error handler or do error handling in-line like this:"
36881 #: ../src/guestfs.pod:1392
36884 " /* This disables the default behaviour of printing errors\n"
36886 " guestfs_set_error_handler (g, NULL, NULL);\n"
36891 #: ../src/guestfs.pod:1396
36894 " if (guestfs_launch (g) == -1) {\n"
36895 " /* Examine the error message and print it etc. */\n"
36896 " char *msg = guestfs_last_error (g);\n"
36897 " int errnum = guestfs_last_errno (g);\n"
36898 " fprintf (stderr, \"%s\", msg);\n"
36899 " if (errnum != 0)\n"
36900 " fprintf (stderr, \": %s\", strerror (errnum));\n"
36901 " fprintf (stderr, \"\\n\");\n"
36908 #: ../src/guestfs.pod:1407
36910 "Out of memory errors are handled differently. The default action is to call"
36911 " L<abort(3)>. If this is undesirable, then you can set a handler using "
36912 "L</guestfs_set_out_of_memory_handler>."
36916 #: ../src/guestfs.pod:1411
36918 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
36919 "because there is no handle if this happens there is no way to get additional"
36920 " error information. However L</guestfs_create> is supposed to be a "
36921 "lightweight operation which can only fail because of insufficient memory (it"
36922 " returns NULL in this case)."
36926 #: ../src/guestfs.pod:1417
36927 msgid "guestfs_last_error"
36931 #: ../src/guestfs.pod:1419
36934 " const char *guestfs_last_error (guestfs_h *g);\n"
36939 #: ../src/guestfs.pod:1421
36941 "This returns the last error message that happened on C<g>. If there has not"
36942 " been an error since the handle was created, then this returns C<NULL>."
36946 #: ../src/guestfs.pod:1425
36948 "The lifetime of the returned string is until the next error occurs, or "
36949 "L</guestfs_close> is called."
36953 #: ../src/guestfs.pod:1428
36954 msgid "guestfs_last_errno"
36958 #: ../src/guestfs.pod:1430
36961 " int guestfs_last_errno (guestfs_h *g);\n"
36966 #: ../src/guestfs.pod:1432
36967 msgid "This returns the last error number (errno) that happened on C<g>."
36971 #: ../src/guestfs.pod:1434
36972 msgid "If successful, an errno integer not equal to zero is returned."
36976 #: ../src/guestfs.pod:1436
36978 "If no error, this returns 0. This call can return 0 in three situations:"
36982 #: ../src/guestfs.pod:1443
36983 msgid "There has not been any error on the handle."
36987 #: ../src/guestfs.pod:1447
36989 "There has been an error but the errno was meaningless. This corresponds to "
36990 "the case where the error did not come from a failed system call, but for "
36991 "some other reason."
36995 #: ../src/guestfs.pod:1453
36997 "There was an error from a failed system call, but for some reason the errno "
36998 "was not captured and returned. This usually indicates a bug in libguestfs."
37002 #: ../src/guestfs.pod:1459
37004 "Libguestfs tries to convert the errno from inside the applicance into a "
37005 "corresponding errno for the caller (not entirely trivial: the appliance "
37006 "might be running a completely different operating system from the library "
37007 "and error numbers are not standardized across Un*xen). If this could not be"
37008 " done, then the error is translated to C<EINVAL>. In practice this should "
37009 "only happen in very rare circumstances."
37013 #: ../src/guestfs.pod:1467
37014 msgid "guestfs_set_error_handler"
37018 #: ../src/guestfs.pod:1469
37021 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
37023 " const char *msg);\n"
37024 " void guestfs_set_error_handler (guestfs_h *g,\n"
37025 " guestfs_error_handler_cb cb,\n"
37026 " void *opaque);\n"
37031 #: ../src/guestfs.pod:1476
37033 "The callback C<cb> will be called if there is an error. The parameters "
37034 "passed to the callback are an opaque data pointer and the error message "
37039 #: ../src/guestfs.pod:1480
37041 "C<errno> is not passed to the callback. To get that the callback must call "
37042 "L</guestfs_last_errno>."
37046 #: ../src/guestfs.pod:1483
37048 "Note that the message string C<msg> is freed as soon as the callback "
37049 "function returns, so if you want to stash it somewhere you must make your "
37054 #: ../src/guestfs.pod:1487
37055 msgid "The default handler prints messages on C<stderr>."
37059 #: ../src/guestfs.pod:1489
37060 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
37064 #: ../src/guestfs.pod:1491
37065 msgid "guestfs_get_error_handler"
37069 #: ../src/guestfs.pod:1493
37072 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
37073 " void **opaque_rtn);\n"
37078 #: ../src/guestfs.pod:1496
37079 msgid "Returns the current error handler callback."
37083 #: ../src/guestfs.pod:1498
37084 msgid "guestfs_set_out_of_memory_handler"
37088 #: ../src/guestfs.pod:1500
37091 " typedef void (*guestfs_abort_cb) (void);\n"
37092 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
37093 " guestfs_abort_cb);\n"
37098 #: ../src/guestfs.pod:1504
37100 "The callback C<cb> will be called if there is an out of memory situation. "
37101 "I<Note this callback must not return>."
37105 #: ../src/guestfs.pod:1507
37106 msgid "The default is to call L<abort(3)>."
37110 #: ../src/guestfs.pod:1509
37112 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
37116 #: ../src/guestfs.pod:1512
37117 msgid "guestfs_get_out_of_memory_handler"
37121 #: ../src/guestfs.pod:1514
37124 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
37129 #: ../src/guestfs.pod:1516
37130 msgid "This returns the current out of memory handler."
37134 #: ../src/guestfs.pod:1518
37139 #: ../src/guestfs.pod:1522
37144 #: ../src/guestfs.pod:1524
37149 #: ../src/guestfs.pod:1526
37150 msgid "AVAILABILITY"
37154 #: ../src/guestfs.pod:1528
37155 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
37159 #: ../src/guestfs.pod:1530
37161 "Using L</guestfs_available> you can test availability of the following "
37162 "groups of functions. This test queries the appliance to see if the "
37163 "appliance you are currently using supports the functionality."
37167 #: ../src/guestfs.pod:1535
37168 msgid "@AVAILABILITY@"
37172 #: ../src/guestfs.pod:1537
37173 msgid "GUESTFISH supported COMMAND"
37177 #: ../src/guestfs.pod:1539
37179 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
37180 "prints out the available groups and whether they are supported by this build"
37181 " of libguestfs. Note however that you have to do C<run> first."
37185 #: ../src/guestfs.pod:1544
37186 msgid "SINGLE CALLS AT COMPILE TIME"
37190 #: ../src/guestfs.pod:1546
37192 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
37193 "function, such as:"
37197 #: ../src/guestfs.pod:1549
37200 " #define LIBGUESTFS_HAVE_DD 1\n"
37205 #: ../src/guestfs.pod:1551
37206 msgid "if L</guestfs_dd> is available."
37210 #: ../src/guestfs.pod:1553
37212 "Before version 1.5.8, if you needed to test whether a single libguestfs "
37213 "function is available at compile time, we recommended using build tools such"
37214 " as autoconf or cmake. For example in autotools you could use:"
37218 #: ../src/guestfs.pod:1558
37221 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
37222 " AC_CHECK_FUNCS([guestfs_dd])\n"
37227 #: ../src/guestfs.pod:1561
37229 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined"
37230 " in your program."
37234 #: ../src/guestfs.pod:1564
37235 msgid "SINGLE CALLS AT RUN TIME"
37239 #: ../src/guestfs.pod:1566
37241 "Testing at compile time doesn't guarantee that a function really exists in "
37242 "the library. The reason is that you might be dynamically linked against a "
37243 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
37244 "This situation unfortunately results in a segmentation fault, which is a "
37245 "shortcoming of the C dynamic linking system itself."
37249 #: ../src/guestfs.pod:1573
37251 "You can use L<dlopen(3)> to test if a function is available at run time, as "
37252 "in this example program (note that you still need the compile time check as "
37257 #: ../src/guestfs.pod:1577
37260 " #include <stdio.h>\n"
37261 " #include <stdlib.h>\n"
37262 " #include <unistd.h>\n"
37263 " #include <dlfcn.h>\n"
37264 " #include <guestfs.h>\n"
37269 #: ../src/guestfs.pod:1583
37274 " #ifdef LIBGUESTFS_HAVE_DD\n"
37276 " int has_function;\n"
37281 #: ../src/guestfs.pod:1589
37284 " /* Test if the function guestfs_dd is really available. */\n"
37285 " dl = dlopen (NULL, RTLD_LAZY);\n"
37287 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
37288 " exit (EXIT_FAILURE);\n"
37290 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
37296 #: ../src/guestfs.pod:1598
37299 " if (!has_function)\n"
37300 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
37302 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
37303 " /* Now it's safe to call\n"
37304 " guestfs_dd (g, \"foo\", \"bar\");\n"
37308 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37315 #: ../src/guestfs.pod:1611
37317 "You may think the above is an awful lot of hassle, and it is. There are "
37318 "other ways outside of the C linking system to ensure that this kind of "
37319 "incompatibility never arises, such as using package versioning:"
37323 #: ../src/guestfs.pod:1616
37326 " Requires: libguestfs >= 1.0.80\n"
37331 #: ../src/guestfs.pod:1618
37332 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37336 #: ../src/guestfs.pod:1620
37338 "A recent feature of the API is the introduction of calls which take optional"
37339 " arguments. In C these are declared 3 ways. The main way is as a call "
37340 "which takes variable arguments (ie. C<...>), as in this example:"
37344 #: ../src/guestfs.pod:1625
37347 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37352 #: ../src/guestfs.pod:1627
37354 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37355 "call with no optional arguments specified:"
37359 #: ../src/guestfs.pod:1630
37362 " guestfs_add_drive_opts (g, filename, -1);\n"
37367 #: ../src/guestfs.pod:1632
37368 msgid "With a single optional argument:"
37372 #: ../src/guestfs.pod:1634
37375 " guestfs_add_drive_opts (g, filename,\n"
37376 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37382 #: ../src/guestfs.pod:1638
37387 #: ../src/guestfs.pod:1640
37390 " guestfs_add_drive_opts (g, filename,\n"
37391 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37392 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37398 #: ../src/guestfs.pod:1645
37400 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37405 #: ../src/guestfs.pod:1648
37406 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37410 #: ../src/guestfs.pod:1650
37412 "The second variant has the same name with the suffix C<_va>, which works the"
37413 " same way but takes a C<va_list>. See the C manual for details. For the "
37414 "example function, this is declared:"
37418 #: ../src/guestfs.pod:1654
37421 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37422 " va_list args);\n"
37427 #: ../src/guestfs.pod:1657
37428 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37432 #: ../src/guestfs.pod:1659
37434 "The third variant is useful where you need to construct these calls. You "
37435 "pass in a structure where you fill in the optional fields. The structure "
37436 "has a bitmask as the first element which you must set to indicate which "
37437 "fields you have filled in. For our example function the structure and call "
37442 #: ../src/guestfs.pod:1665
37445 " struct guestfs_add_drive_opts_argv {\n"
37446 " uint64_t bitmask;\n"
37448 " const char *format;\n"
37451 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37452 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37457 #: ../src/guestfs.pod:1674
37458 msgid "You could call it like this:"
37462 #: ../src/guestfs.pod:1676
37465 " struct guestfs_add_drive_opts_argv optargs = {\n"
37466 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37467 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37468 " .readonly = 1,\n"
37469 " .format = \"qcow2\"\n"
37475 #: ../src/guestfs.pod:1683
37478 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37483 #: ../src/guestfs.pod:1691
37485 "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37489 #: ../src/guestfs.pod:1696
37490 msgid "You do not need to fill in all fields of the structure."
37494 #: ../src/guestfs.pod:1700
37496 "There must be a one-to-one correspondence between fields of the structure "
37497 "that are filled in, and bits set in the bitmask."
37501 #: ../src/guestfs.pod:1705
37502 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37506 #: ../src/guestfs.pod:1707
37508 "In other languages, optional arguments are expressed in the way that is "
37509 "natural for that language. We refer you to the language-specific "
37510 "documentation for more details on that."
37514 #: ../src/guestfs.pod:1711
37515 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37519 #: ../src/guestfs.pod:1713
37520 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37524 #: ../src/guestfs.pod:1715
37526 "B<Note:> This section documents the generic event mechanism introduced in "
37527 "libguestfs 1.10, which you should use in new code if possible. The old "
37528 "functions C<guestfs_set_log_message_callback>, "
37529 "C<guestfs_set_subprocess_quit_callback>, "
37530 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37531 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37532 "page. Because of the ABI guarantee, the old functions continue to work."
37536 #: ../src/guestfs.pod:1724
37538 "Handles generate events when certain things happen, such as log messages "
37539 "being generated, progress messages during long-running operations, or the "
37540 "handle being closed. The API calls described below let you register a "
37541 "callback to be called when events happen. You can register multiple "
37542 "callbacks (for the same, different or overlapping sets of events), and "
37543 "individually remove callbacks. If callbacks are not removed, then they "
37544 "remain in force until the handle is closed."
37548 #: ../src/guestfs.pod:1732
37550 "In the current implementation, events are only generated synchronously: that"
37551 " means that events (and hence callbacks) can only happen while you are in "
37552 "the middle of making another libguestfs call. The callback is called in the"
37557 #: ../src/guestfs.pod:1737
37559 "Events may contain a payload, usually nothing (void), an array of 64 bit "
37560 "unsigned integers, or a message buffer. Payloads are discussed later on."
37564 #: ../src/guestfs.pod:1741
37565 msgid "CLASSES OF EVENTS"
37569 #: ../src/guestfs.pod:1745
37570 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
37574 #: ../src/guestfs.pod:1748
37576 "The callback function will be called while the handle is being closed "
37577 "(synchronously from L</guestfs_close>)."
37581 #: ../src/guestfs.pod:1751
37583 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
37584 "handles that are open when the program exits. This means that this callback"
37585 " might be called indirectly from L<exit(3)>, which can cause unexpected "
37586 "problems in higher-level languages (eg. if your HLL interpreter has already "
37587 "been cleaned up by the time this is called, and if your callback then jumps "
37588 "into some HLL function)."
37592 #: ../src/guestfs.pod:1758
37594 "If no callback is registered: the handle is closed without any callback "
37599 #: ../src/guestfs.pod:1761
37600 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
37604 #: ../src/guestfs.pod:1764
37606 "The callback function will be called when the child process quits, either "
37607 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
37608 "corresponds to a transition from any state to the CONFIG state)."
37612 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
37613 msgid "If no callback is registered: the event is ignored."
37617 #: ../src/guestfs.pod:1770
37618 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
37622 #: ../src/guestfs.pod:1773
37624 "The callback function will be called when the child process becomes ready "
37625 "first time after it has been launched. (This corresponds to a transition "
37626 "from LAUNCHING to the READY state)."
37630 #: ../src/guestfs.pod:1779
37631 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
37635 #: ../src/guestfs.pod:1782
37637 "Some long-running operations can generate progress messages. If this "
37638 "callback is registered, then it will be called each time a progress message "
37639 "is generated (usually two seconds after the operation started, and three "
37640 "times per second thereafter until it completes, although the frequency may "
37641 "change in future versions)."
37645 #: ../src/guestfs.pod:1788
37647 "The callback receives in the payload four unsigned 64 bit numbers which are "
37648 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
37652 #: ../src/guestfs.pod:1791
37654 "The units of C<total> are not defined, although for some operations C<total>"
37655 " may relate in some way to the amount of data to be transferred (eg. in "
37656 "bytes or megabytes), and C<position> may be the portion which has been "
37661 #: ../src/guestfs.pod:1796
37662 msgid "The only defined and stable parts of the API are:"
37666 #: ../src/guestfs.pod:1802
37668 "The callback can display to the user some type of progress bar or indicator "
37669 "which shows the ratio of C<position>:C<total>."
37673 #: ../src/guestfs.pod:1807
37674 msgid "0 E<lt>= C<position> E<lt>= C<total>"
37678 #: ../src/guestfs.pod:1811
37680 "If any progress notification is sent during a call, then a final progress "
37681 "notification is always sent when C<position> = C<total> (I<unless> the call "
37682 "fails with an error)."
37686 #: ../src/guestfs.pod:1815
37688 "This is to simplify caller code, so callers can easily set the progress "
37689 "indicator to \"100%\" at the end of the operation, without requiring special"
37690 " code to detect this case."
37694 #: ../src/guestfs.pod:1821
37696 "For some calls we are unable to estimate the progress of the call, but we "
37697 "can still generate progress messages to indicate activity. This is known as"
37698 " \"pulse mode\", and is directly supported by certain progress bar "
37699 "implementations (eg. GtkProgressBar)."
37703 #: ../src/guestfs.pod:1826
37705 "For these calls, zero or more progress messages are generated with "
37706 "C<position = 0> and C<total = 1>, followed by a final message with "
37707 "C<position = total = 1>."
37711 #: ../src/guestfs.pod:1830
37713 "As noted above, if the call fails with an error then the final message may "
37714 "not be generated."
37718 #: ../src/guestfs.pod:1835
37720 "The callback also receives the procedure number (C<proc_nr>) and serial "
37721 "number (C<serial>) of the call. These are only useful for debugging "
37722 "protocol issues, and the callback can normally ignore them. The callback "
37723 "may want to print these numbers in error messages or debugging messages."
37727 #: ../src/guestfs.pod:1841
37728 msgid "If no callback is registered: progress messages are discarded."
37732 #: ../src/guestfs.pod:1843
37733 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
37737 #: ../src/guestfs.pod:1846
37739 "The callback function is called whenever a log message is generated by qemu,"
37740 " the appliance kernel, guestfsd (daemon), or utility programs."
37744 #: ../src/guestfs.pod:1849
37746 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
37747 "(L</guestfs_launch>) then additional debug messages are generated."
37751 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
37753 "If no callback is registered: the messages are discarded unless the verbose "
37754 "flag is set in which case they are sent to stderr. You can override the "
37755 "printing of verbose messages to stderr by setting up a callback."
37759 #: ../src/guestfs.pod:1857
37760 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
37764 #: ../src/guestfs.pod:1860
37766 "The callback function is called whenever a log message is generated by the "
37767 "library part of libguestfs."
37771 #: ../src/guestfs.pod:1863
37773 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
37774 "messages are generated."
37778 #: ../src/guestfs.pod:1871
37779 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
37783 #: ../src/guestfs.pod:1874
37785 "The callback function is called whenever a trace message is generated. This"
37786 " only applies if the trace flag (L</guestfs_set_trace>) is set."
37790 #: ../src/guestfs.pod:1877
37792 "If no callback is registered: the messages are sent to stderr. You can "
37793 "override the printing of trace messages to stderr by setting up a callback."
37797 #: ../src/guestfs.pod:1881
37798 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
37802 #: ../src/guestfs.pod:1884
37804 "The callback function is called whenever a libguestfs function is entered."
37808 #: ../src/guestfs.pod:1887
37810 "The payload is a string which contains the name of the function that we are "
37811 "entering (not including C<guestfs_> prefix)."
37815 #: ../src/guestfs.pod:1890
37817 "Note that libguestfs functions can call themselves, so you may see many "
37818 "events from a single call. A few libguestfs functions do not generate this "
37823 #: ../src/guestfs.pod:1898
37824 msgid "guestfs_set_event_callback"
37828 #: ../src/guestfs.pod:1900
37831 " int guestfs_set_event_callback (guestfs_h *g,\n"
37832 " guestfs_event_callback cb,\n"
37833 " uint64_t event_bitmask,\n"
37835 " void *opaque);\n"
37840 #: ../src/guestfs.pod:1906
37842 "This function registers a callback (C<cb>) for all event classes in the "
37843 "C<event_bitmask>."
37847 #: ../src/guestfs.pod:1909
37849 "For example, to register for all log message events, you could call this "
37850 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>."
37851 " To register a single callback for all possible classes of events, use "
37852 "C<GUESTFS_EVENT_ALL>."
37856 #: ../src/guestfs.pod:1915
37857 msgid "C<flags> should always be passed as 0."
37861 #: ../src/guestfs.pod:1917
37863 "C<opaque> is an opaque pointer which is passed to the callback. You can use"
37864 " it for any purpose."
37868 #: ../src/guestfs.pod:1920
37870 "The return value is the event handle (an integer) which you can use to "
37871 "delete the callback (see below)."
37875 #: ../src/guestfs.pod:1923
37877 "If there is an error, this function returns C<-1>, and sets the error in the"
37878 " handle in the usual way (see L</guestfs_last_error> etc.)"
37882 #: ../src/guestfs.pod:1926
37884 "Callbacks remain in effect until they are deleted, or until the handle is "
37889 #: ../src/guestfs.pod:1929
37891 "In the case where multiple callbacks are registered for a particular event "
37892 "class, all of the callbacks are called. The order in which multiple "
37893 "callbacks are called is not defined."
37897 #: ../src/guestfs.pod:1933
37898 msgid "guestfs_delete_event_callback"
37902 #: ../src/guestfs.pod:1935
37905 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
37910 #: ../src/guestfs.pod:1937
37912 "Delete a callback that was previously registered. C<event_handle> should be"
37913 " the integer that was returned by a previous call to "
37914 "C<guestfs_set_event_callback> on the same handle."
37918 #: ../src/guestfs.pod:1941
37919 msgid "guestfs_event_callback"
37923 #: ../src/guestfs.pod:1943
37926 " typedef void (*guestfs_event_callback) (\n"
37929 " uint64_t event,\n"
37930 " int event_handle,\n"
37932 " const char *buf, size_t buf_len,\n"
37933 " const uint64_t *array, size_t array_len);\n"
37938 #: ../src/guestfs.pod:1952
37940 "This is the type of the event callback function that you have to provide."
37944 #: ../src/guestfs.pod:1955
37946 "The basic parameters are: the handle (C<g>), the opaque user pointer "
37947 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
37948 "handle, and C<flags> which in the current API you should ignore."
37952 #: ../src/guestfs.pod:1959
37954 "The remaining parameters contain the event payload (if any). Each event may"
37955 " contain a payload, which usually relates to the event class, but for future"
37956 " proofing your code should be written to handle any payload for any event "
37961 #: ../src/guestfs.pod:1964
37963 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
37964 "there is no message buffer). Note that this message buffer can contain "
37965 "arbitrary 8 bit data, including NUL bytes."
37969 #: ../src/guestfs.pod:1968
37971 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
37972 "moment this is only used for progress messages."
37976 #: ../src/guestfs.pod:1971
37977 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
37981 #: ../src/guestfs.pod:1973
37983 "One motivation for the generic event API was to allow GUI programs to "
37984 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
37985 "unconditionally to C<stderr>."
37989 #: ../src/guestfs.pod:1977
37991 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
37992 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
37993 "messages are not events; you must capture error messages separately)."
37997 #: ../src/guestfs.pod:1982
37999 "Programs have to set up a callback to capture the classes of events of "
38004 #: ../src/guestfs.pod:1985
38008 " guestfs_set_event_callback\n"
38009 " (g, message_callback,\n"
38010 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
38011 " GUESTFS_EVENT_TRACE,\n"
38012 " 0, NULL) == -1)\n"
38013 " if (eh == -1) {\n"
38014 " // handle error in the usual way\n"
38020 #: ../src/guestfs.pod:1995
38022 "The callback can then direct messages to the appropriate place. In this "
38023 "example, messages are directed to syslog:"
38027 #: ../src/guestfs.pod:1998
38031 " message_callback (\n"
38034 " uint64_t event,\n"
38035 " int event_handle,\n"
38037 " const char *buf, size_t buf_len,\n"
38038 " const uint64_t *array, size_t array_len)\n"
38040 " const int priority = LOG_USER|LOG_INFO;\n"
38041 " if (buf_len > 0)\n"
38042 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
38048 #: ../src/guestfs.pod:2013
38049 msgid "CANCELLING LONG TRANSFERS"
38053 #: ../src/guestfs.pod:2015
38055 "Some operations can be cancelled by the caller while they are in progress. "
38056 "Currently only operations that involve uploading or downloading data can be "
38057 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
38058 "parameters in the generator)."
38062 #: ../src/guestfs.pod:2020
38063 msgid "guestfs_user_cancel"
38067 #: ../src/guestfs.pod:2022
38070 " void guestfs_user_cancel (guestfs_h *g);\n"
38075 #: ../src/guestfs.pod:2024
38077 "C<guestfs_user_cancel> cancels the current upload or download operation."
38081 #: ../src/guestfs.pod:2027
38083 "Unlike most other libguestfs calls, this function is signal safe and thread "
38084 "safe. You can call it from a signal handler or from another thread, without"
38085 " needing to do any locking."
38089 #: ../src/guestfs.pod:2031
38091 "The transfer that was in progress (if there is one) will stop shortly "
38092 "afterwards, and will return an error. The errno (see "
38093 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find"
38094 " out if the operation was cancelled or failed because of another error."
38098 #: ../src/guestfs.pod:2037
38100 "No cleanup is performed: for example, if a file was being uploaded then "
38101 "after cancellation there may be a partially uploaded file. It is the "
38102 "caller's responsibility to clean up if necessary."
38106 #: ../src/guestfs.pod:2041
38108 "There are two common places that you might call C<guestfs_user_cancel>."
38112 #: ../src/guestfs.pod:2043
38114 "In an interactive text-based program, you might call it from a C<SIGINT> "
38115 "signal handler so that pressing C<^C> cancels the current operation. (You "
38116 "also need to call L</guestfs_set_pgroup> so that child processes don't "
38117 "receive the C<^C> signal)."
38121 #: ../src/guestfs.pod:2048
38123 "In a graphical program, when the main thread is displaying a progress bar "
38124 "with a cancel button, wire up the cancel button to call this function."
38128 #: ../src/guestfs.pod:2052
38129 msgid "PRIVATE DATA AREA"
38133 #: ../src/guestfs.pod:2054
38135 "You can attach named pieces of private data to the libguestfs handle, fetch "
38136 "them by name, and walk over them, for the lifetime of the handle. This is "
38137 "called the private data area and is only available from the C API."
38141 #: ../src/guestfs.pod:2059
38142 msgid "To attach a named piece of data, use the following call:"
38146 #: ../src/guestfs.pod:2061
38149 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
38154 #: ../src/guestfs.pod:2063
38156 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
38157 "pointer (which can be C<NULL>). Any previous item with the same key is "
38162 #: ../src/guestfs.pod:2067
38164 "You can use any C<key> you want, but your key should I<not> start with an "
38165 "underscore character. Keys beginning with an underscore character are "
38166 "reserved for internal libguestfs purposes (eg. for implementing language "
38167 "bindings). It is recommended that you prefix the key with some unique "
38168 "string to avoid collisions with other users."
38172 #: ../src/guestfs.pod:2073
38173 msgid "To retrieve the pointer, use:"
38177 #: ../src/guestfs.pod:2075
38180 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
38185 #: ../src/guestfs.pod:2077
38187 "This function returns C<NULL> if either no data is found associated with "
38188 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
38193 #: ../src/guestfs.pod:2081
38195 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
38196 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
38197 "all. In particular, libguestfs does I<not> try to free the data when the "
38198 "handle is closed. If the data must be freed, then the caller must either "
38199 "free it before calling L</guestfs_close> or must set up a close callback to "
38200 "do it (see L</GUESTFS_EVENT_CLOSE>)."
38204 #: ../src/guestfs.pod:2088
38205 msgid "To walk over all entries, use these two functions:"
38209 #: ../src/guestfs.pod:2090
38212 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
38217 #: ../src/guestfs.pod:2092
38220 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
38225 #: ../src/guestfs.pod:2094
38227 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does"
38228 " not have any particular meaning -- keys are not returned in any defined "
38229 "order). A pointer to the key is returned in C<*key_rtn> and the "
38230 "corresponding data pointer is returned from the function. C<NULL> is "
38231 "returned if there are no keys stored in the handle."
38235 #: ../src/guestfs.pod:2100
38237 "C<guestfs_next_private> returns the next key, pointer pair. The return "
38238 "value of this function is also C<NULL> is there are no further entries to "
38243 #: ../src/guestfs.pod:2104
38244 msgid "Notes about walking over entries:"
38248 #: ../src/guestfs.pod:2110
38250 "You must not call C<guestfs_set_private> while walking over the entries."
38254 #: ../src/guestfs.pod:2115
38256 "The handle maintains an internal iterator which is reset when you call "
38257 "C<guestfs_first_private>. This internal iterator is invalidated when you "
38258 "call C<guestfs_set_private>."
38262 #: ../src/guestfs.pod:2121
38263 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
38267 #: ../src/guestfs.pod:2123
38270 " guestfs_set_private (g, key, NULL);\n"
38275 #: ../src/guestfs.pod:2125
38276 msgid "then that C<key> is not returned when walking."
38280 #: ../src/guestfs.pod:2129
38282 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
38283 "C<guestfs_next_private> or C<guestfs_set_private>."
38287 #: ../src/guestfs.pod:2135
38289 "The following example code shows how to print all keys and data pointers "
38290 "that are associated with the handle C<g>:"
38294 #: ../src/guestfs.pod:2138
38297 " const char *key;\n"
38298 " void *data = guestfs_first_private (g, &key);\n"
38299 " while (data != NULL)\n"
38301 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38302 " data = guestfs_next_private (g, &key);\n"
38308 #: ../src/guestfs.pod:2146
38310 "More commonly you are only interested in keys that begin with an "
38311 "application-specific prefix C<foo_>. Modify the loop like so:"
38315 #: ../src/guestfs.pod:2149
38318 " const char *key;\n"
38319 " void *data = guestfs_first_private (g, &key);\n"
38320 " while (data != NULL)\n"
38322 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38323 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38324 " data = guestfs_next_private (g, &key);\n"
38330 #: ../src/guestfs.pod:2158
38332 "If you need to modify keys while walking, then you have to jump back to the "
38333 "beginning of the loop. For example, to delete all keys prefixed with "
38338 #: ../src/guestfs.pod:2162
38341 " const char *key;\n"
38344 " data = guestfs_first_private (g, &key);\n"
38345 " while (data != NULL)\n"
38347 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38349 " guestfs_set_private (g, key, NULL);\n"
38350 " /* note that 'key' pointer is now invalid, and so is\n"
38351 " the internal iterator */\n"
38354 " data = guestfs_next_private (g, &key);\n"
38360 #: ../src/guestfs.pod:2178
38362 "Note that the above loop is guaranteed to terminate because the keys are "
38363 "being deleted, but other manipulations of keys within the loop might not "
38364 "terminate unless you also maintain an indication of which keys have been "
38369 #: ../src/guestfs.pod:2183
38374 #: ../src/guestfs.pod:2185
38376 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38377 "true of any library, not just libguestfs. However libguestfs also contains "
38378 "static markers to help in probing internal operations."
38382 #: ../src/guestfs.pod:2189
38383 msgid "You can list all the static markers by doing:"
38387 #: ../src/guestfs.pod:2191
38390 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38391 " .provider(\"guestfs\").mark(\"*\")'\n"
38396 #: ../src/guestfs.pod:2194
38398 "B<Note:> These static markers are I<not> part of the stable API and may "
38399 "change in future versions."
38403 #: ../src/guestfs.pod:2197
38404 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38408 #: ../src/guestfs.pod:2199
38410 "This script contains examples of displaying both the static markers and some"
38411 " ordinary C entry points:"
38415 #: ../src/guestfs.pod:2202
38423 #: ../src/guestfs.pod:2204
38426 " function display_time () {\n"
38427 " now = gettimeofday_us ();\n"
38430 " delta = now - last;\n"
38436 #: ../src/guestfs.pod:2211
38439 " printf (\"%d (+%d):\", now, delta);\n"
38445 #: ../src/guestfs.pod:2214
38450 " printf (\"ready\\n\");\n"
38456 #: ../src/guestfs.pod:2219
38459 " /* Display all calls to static markers. */\n"
38460 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38461 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38462 " display_time();\n"
38463 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38469 #: ../src/guestfs.pod:2226
38472 " /* Display all calls to guestfs_mkfs* functions. */\n"
38473 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38474 " .function(\"guestfs_mkfs*\") ? {\n"
38475 " display_time();\n"
38476 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38482 #: ../src/guestfs.pod:2233
38484 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38485 "program. Note that you either have to be root, or you have to add yourself "
38486 "to several special stap groups. Consult the systemtap documentation for "
38487 "more information."
38491 #: ../src/guestfs.pod:2238
38494 " # stap /tmp/test.stap\n"
38500 #: ../src/guestfs.pod:2241
38501 msgid "In another terminal, run a guestfish command such as this:"
38505 #: ../src/guestfs.pod:2245
38506 msgid "In the first terminal, stap trace output similar to this is shown:"
38510 #: ../src/guestfs.pod:2247
38513 " 1318248056692655 (+0):\tlaunch_start\n"
38514 " 1318248056692850 (+195): launch_build_appliance_start\n"
38515 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38516 " 1318248056838059 (+19774): launch_run_qemu\n"
38517 " 1318248061071167 (+4233108): launch_end\n"
38518 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f device=0x1024e60\n"
38523 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38528 #: ../src/guestfs.pod:2256
38530 "<!-- old anchor for the next section --> <a "
38531 "name=\"state_machine_and_low_level_event_api\"/>"
38535 #: ../src/guestfs.pod:2261
38536 msgid "ARCHITECTURE"
38540 #: ../src/guestfs.pod:2263
38542 "Internally, libguestfs is implemented by running an appliance (a special "
38543 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38544 "process of the main program."
38548 #: ../src/guestfs.pod:2267
38551 " ___________________\n"
38553 " | main program |\n"
38555 " | | child process / appliance\n"
38556 " | | __________________________\n"
38558 " +-------------------+ RPC | +-----------------+ |\n"
38559 " | libguestfs <--------------------> guestfsd | |\n"
38560 " | | | +-----------------+ |\n"
38561 " \\___________________/ | | Linux kernel | |\n"
38562 " | +--^--------------+ |\n"
38563 " \\_________|________________/\n"
38565 " _______v______\n"
38568 " | disk image |\n"
38569 " \\______________/\n"
38574 #: ../src/guestfs.pod:2287
38576 "The library, linked to the main program, creates the child process and hence"
38577 " the appliance in the L</guestfs_launch> function."
38581 #: ../src/guestfs.pod:2290
38583 "Inside the appliance is a Linux kernel and a complete stack of userspace "
38584 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
38585 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
38586 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs"
38587 " API calls and RPC calls to the daemon. Lastly the disk image(s) are "
38588 "attached to the qemu process which translates device access by the "
38589 "appliance's Linux kernel into accesses to the image."
38593 #: ../src/guestfs.pod:2299
38595 "A common misunderstanding is that the appliance \"is\" the virtual machine."
38596 " Although the disk image you are attached to might also be used by some "
38597 "virtual machine, libguestfs doesn't know or care about this. (But you will "
38598 "care if both libguestfs's qemu process and your virtual machine are trying "
38599 "to update the disk image at the same time, since these usually results in "
38600 "massive disk corruption)."
38604 #: ../src/guestfs.pod:2306
38605 msgid "STATE MACHINE"
38609 #: ../src/guestfs.pod:2308
38610 msgid "libguestfs uses a state machine to model the child process:"
38614 #: ../src/guestfs.pod:2310
38618 " guestfs_create\n"
38626 " / | \\ \\ guestfs_launch\n"
38627 " / | _\\__V______\n"
38629 " / | | LAUNCHING |\n"
38630 " / | \\___________/\n"
38632 " / | guestfs_launch\n"
38634 " ______ / __|____V\n"
38635 " / \\ ------> / \\\n"
38636 " | BUSY | | READY |\n"
38637 " \\______/ <------ \\________/\n"
38642 #: ../src/guestfs.pod:2332
38644 "The normal transitions are (1) CONFIG (when the handle is created, but there"
38645 " is no child process), (2) LAUNCHING (when the child process is booting up),"
38646 " (3) alternating between READY and BUSY as commands are issued to, and "
38647 "carried out by, the child process."
38651 #: ../src/guestfs.pod:2337
38653 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
38654 "asynchronously at any time (eg. due to some internal error), and that causes"
38655 " the state to transition back to CONFIG."
38659 #: ../src/guestfs.pod:2341
38661 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
38662 "issued when in the CONFIG state."
38666 #: ../src/guestfs.pod:2344
38668 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
38669 "L</guestfs_launch> blocks until the child process is READY to accept "
38670 "commands (or until some failure or timeout). L</guestfs_launch> internally "
38671 "moves the state from CONFIG to LAUNCHING while it is running."
38675 #: ../src/guestfs.pod:2350
38677 "API actions such as L</guestfs_mount> can only be issued when in the READY "
38678 "state. These API calls block waiting for the command to be carried out (ie."
38679 " the state to transition to BUSY and then back to READY). There are no non-"
38680 "blocking versions, and no way to issue more than one command per handle at "
38685 #: ../src/guestfs.pod:2356
38687 "Finally, the child process sends asynchronous messages back to the main "
38688 "program, such as kernel log messages. You can register a callback to "
38689 "receive these messages."
38693 #: ../src/guestfs.pod:2360
38698 #: ../src/guestfs.pod:2362
38699 msgid "APPLIANCE BOOT PROCESS"
38703 #: ../src/guestfs.pod:2364
38705 "This process has evolved and continues to evolve. The description here "
38706 "corresponds only to the current version of libguestfs and is provided for "
38707 "information only."
38711 #: ../src/guestfs.pod:2368
38713 "In order to follow the stages involved below, enable libguestfs debugging "
38714 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
38718 #: ../src/guestfs.pod:2373
38719 msgid "Create the appliance"
38723 #: ../src/guestfs.pod:2375
38725 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
38726 "initrd and the appliance."
38730 #: ../src/guestfs.pod:2378
38732 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another"
38733 " directory if C<TMPDIR> is set)."
38737 #: ../src/guestfs.pod:2381
38739 "For a complete description of how the appliance is created and cached, read "
38740 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
38744 #: ../src/guestfs.pod:2385
38745 msgid "Start qemu and boot the kernel"
38749 #: ../src/guestfs.pod:2387
38750 msgid "qemu is invoked to boot the kernel."
38754 #: ../src/guestfs.pod:2389
38755 msgid "Run the initrd"
38759 #: ../src/guestfs.pod:2391
38761 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the"
38762 " appliance. The purpose of the initrd is to load enough kernel modules in "
38763 "order that the appliance itself can be mounted and started."
38767 #: ../src/guestfs.pod:2395
38769 "The initrd is a cpio archive called "
38770 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
38774 #: ../src/guestfs.pod:2398
38776 "When the initrd has started you will see messages showing that kernel "
38777 "modules are being loaded, similar to this:"
38781 #: ../src/guestfs.pod:2401
38784 " febootstrap: ext2 mini initrd starting up\n"
38785 " febootstrap: mounting /sys\n"
38786 " febootstrap: internal insmod libcrc32c.ko\n"
38787 " febootstrap: internal insmod crc32c-intel.ko\n"
38792 #: ../src/guestfs.pod:2406
38793 msgid "Find and mount the appliance device"
38797 #: ../src/guestfs.pod:2408
38799 "The appliance is a sparse file containing an ext2 filesystem which contains "
38800 "a familiar (although reduced in size) Linux operating system. It would "
38801 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
38805 #: ../src/guestfs.pod:2412
38807 "The regular disks being inspected by libguestfs are the first devices "
38808 "exposed by qemu (eg. as C</dev/vda>)."
38812 #: ../src/guestfs.pod:2415
38814 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
38815 "there was only one regular disk)."
38819 #: ../src/guestfs.pod:2418
38821 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
38822 "and switch root into the appliance, and run C</init> from the appliance."
38826 #: ../src/guestfs.pod:2422
38827 msgid "If this works successfully you will see messages such as:"
38831 #: ../src/guestfs.pod:2424
38834 " febootstrap: picked /sys/block/vdb/dev as root device\n"
38835 " febootstrap: creating /dev/root as block special 252:16\n"
38836 " febootstrap: mounting new root on /root\n"
38837 " febootstrap: chroot\n"
38838 " Starting /init script ...\n"
38843 #: ../src/guestfs.pod:2430
38845 "Note that C<Starting /init script ...> indicates that the appliance's init "
38846 "script is now running."
38850 #: ../src/guestfs.pod:2433
38851 msgid "Initialize the appliance"
38855 #: ../src/guestfs.pod:2435
38857 "The appliance itself now initializes itself. This involves starting certain"
38858 " processes like C<udev>, possibly printing some debug information, and "
38859 "finally running the daemon (C<guestfsd>)."
38863 #: ../src/guestfs.pod:2439
38868 #: ../src/guestfs.pod:2441
38870 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
38875 #: ../src/guestfs.pod:2444
38878 " verbose daemon enabled\n"
38883 #: ../src/guestfs.pod:2446
38885 "The daemon expects to see a named virtio-serial port exposed by qemu and "
38886 "connected on the other end to the library."
38890 #: ../src/guestfs.pod:2449
38892 "The daemon connects to this port (and hence to the library) and sends a four"
38893 " byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
38894 "protocol (see below)."
38898 #: ../src/guestfs.pod:2455
38899 msgid "COMMUNICATION PROTOCOL"
38903 #: ../src/guestfs.pod:2457
38905 "Don't rely on using this protocol directly. This section documents how it "
38906 "currently works, but it may change at any time."
38910 #: ../src/guestfs.pod:2460
38912 "The protocol used to talk between the library and the daemon running inside "
38913 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
38914 "1014, RFC 1832, RFC 4506)."
38918 #: ../src/guestfs.pod:2464
38920 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
38921 "this file is automatically generated)."
38925 #: ../src/guestfs.pod:2467
38927 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
38928 "and C<FileOut> parameters, which are handled with very simple request/reply "
38929 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
38930 "parameters, which use the same request and reply messages, but they may also"
38931 " be followed by files sent using a chunked encoding."
38935 #: ../src/guestfs.pod:2474
38936 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
38940 #: ../src/guestfs.pod:2476
38941 msgid "For ordinary functions, the request message is:"
38945 #: ../src/guestfs.pod:2478
38948 " total length (header + arguments,\n"
38949 " but not including the length word itself)\n"
38950 " struct guestfs_message_header (encoded as XDR)\n"
38951 " struct guestfs_<foo>_args (encoded as XDR)\n"
38956 #: ../src/guestfs.pod:2483
38958 "The total length field allows the daemon to allocate a fixed size buffer "
38959 "into which it slurps the rest of the message. As a result, the total length"
38960 " is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the"
38961 " effective size of any request is limited to somewhere under this size."
38965 #: ../src/guestfs.pod:2489
38967 "Note also that many functions don't take any arguments, in which case the "
38968 "C<guestfs_I<foo>_args> is completely omitted."
38972 #: ../src/guestfs.pod:2492
38974 "The header contains the procedure number (C<guestfs_proc>) which is how the "
38975 "receiver knows what type of args structure to expect, or none at all."
38979 #: ../src/guestfs.pod:2496
38981 "For functions that take optional arguments, the optional arguments are "
38982 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
38983 "arguments. A bitmask in the header indicates which optional arguments are "
38984 "meaningful. The bitmask is also checked to see if it contains bits set "
38985 "which the daemon does not know about (eg. if more optional arguments were "
38986 "added in a later version of the library), and this causes the call to be "
38991 #: ../src/guestfs.pod:2504
38992 msgid "The reply message for ordinary functions is:"
38996 #: ../src/guestfs.pod:2506
38999 " total length (header + ret,\n"
39000 " but not including the length word itself)\n"
39001 " struct guestfs_message_header (encoded as XDR)\n"
39002 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39007 #: ../src/guestfs.pod:2511
39009 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
39010 "functions that return no formal return values."
39014 #: ../src/guestfs.pod:2514
39016 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
39020 #: ../src/guestfs.pod:2517
39022 "In the case of an error, a flag is set in the header, and the reply message "
39023 "is slightly changed:"
39027 #: ../src/guestfs.pod:2520
39030 " total length (header + error,\n"
39031 " but not including the length word itself)\n"
39032 " struct guestfs_message_header (encoded as XDR)\n"
39033 " struct guestfs_message_error (encoded as XDR)\n"
39038 #: ../src/guestfs.pod:2525
39040 "The C<guestfs_message_error> structure contains the error message as a "
39045 #: ../src/guestfs.pod:2528
39046 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
39050 #: ../src/guestfs.pod:2530
39052 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
39053 "The normal request message is sent (see above). However this is followed by"
39054 " a sequence of file chunks."
39058 #: ../src/guestfs.pod:2534
39061 " total length (header + arguments,\n"
39062 " but not including the length word itself,\n"
39063 " and not including the chunks)\n"
39064 " struct guestfs_message_header (encoded as XDR)\n"
39065 " struct guestfs_<foo>_args (encoded as XDR)\n"
39066 " sequence of chunks for FileIn param #0\n"
39067 " sequence of chunks for FileIn param #1 etc.\n"
39072 #: ../src/guestfs.pod:2542
39073 msgid "The \"sequence of chunks\" is:"
39077 #: ../src/guestfs.pod:2544
39080 " length of chunk (not including length word itself)\n"
39081 " struct guestfs_chunk (encoded as XDR)\n"
39082 " length of chunk\n"
39083 " struct guestfs_chunk (encoded as XDR)\n"
39085 " length of chunk\n"
39086 " struct guestfs_chunk (with data.data_len == 0)\n"
39091 #: ../src/guestfs.pod:2552
39093 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
39094 "is set in the final chunk to indicate either successful completion or early "
39099 #: ../src/guestfs.pod:2556
39101 "At time of writing there are no functions that have more than one FileIn "
39102 "parameter. However this is (theoretically) supported, by sending the "
39103 "sequence of chunks for each FileIn parameter one after another (from left to"
39108 #: ../src/guestfs.pod:2561
39110 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
39111 "transfer. The library does this by sending a chunk with a special flag set "
39112 "to indicate cancellation. When the daemon sees this, it cancels the whole "
39113 "RPC, does I<not> send any reply, and goes back to reading the next request."
39117 #: ../src/guestfs.pod:2567
39119 "The daemon may also cancel. It does this by writing a special word "
39120 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
39121 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
39122 "cancel chunk). The special word is chosen so that even if cancellation "
39123 "happens right at the end of the transfer (after the library has finished "
39124 "writing and has started listening for the reply), the \"spurious\" cancel "
39125 "flag will not be confused with the reply message."
39129 #: ../src/guestfs.pod:2576
39131 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
39132 "limit), and also files where the size is not known in advance (eg. from "
39133 "pipes or sockets). However the chunks are rather small "
39134 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need"
39135 " to keep much in memory."
39139 #: ../src/guestfs.pod:2582
39140 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
39144 #: ../src/guestfs.pod:2584
39146 "The protocol for FileOut parameters is exactly the same as for FileIn "
39147 "parameters, but with the roles of daemon and library reversed."
39151 #: ../src/guestfs.pod:2587
39154 " total length (header + ret,\n"
39155 " but not including the length word itself,\n"
39156 " and not including the chunks)\n"
39157 " struct guestfs_message_header (encoded as XDR)\n"
39158 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39159 " sequence of chunks for FileOut param #0\n"
39160 " sequence of chunks for FileOut param #1 etc.\n"
39165 #: ../src/guestfs.pod:2595
39166 msgid "INITIAL MESSAGE"
39170 #: ../src/guestfs.pod:2597
39172 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
39173 "which indicates that the guest and daemon is alive. This is what "
39174 "L</guestfs_launch> waits for."
39178 #: ../src/guestfs.pod:2601
39179 msgid "PROGRESS NOTIFICATION MESSAGES"
39183 #: ../src/guestfs.pod:2603
39185 "The daemon may send progress notification messages at any time. These are "
39186 "distinguished by the normal length word being replaced by "
39187 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
39191 #: ../src/guestfs.pod:2607
39193 "The library turns them into progress callbacks (see "
39194 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
39199 #: ../src/guestfs.pod:2611
39201 "The daemon self-limits the frequency of progress messages it sends (see "
39202 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
39207 #: ../src/guestfs.pod:2615
39208 msgid "LIBGUESTFS VERSION NUMBERS"
39212 #: ../src/guestfs.pod:2617
39214 "Since April 2010, libguestfs has started to make separate development and "
39215 "stable releases, along with corresponding branches in our git repository. "
39216 "These separate releases can be identified by version number:"
39220 #: ../src/guestfs.pod:2622
39223 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
39224 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
39230 " | `-------- sub-version\n"
39232 " `------ always '1' because we don't change the ABI\n"
39237 #: ../src/guestfs.pod:2633
39238 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
39242 #: ../src/guestfs.pod:2635
39244 "As time passes we cherry pick fixes from the development branch and backport"
39245 " those into the stable branch, the effect being that the stable branch "
39246 "should get more stable and less buggy over time. So the stable releases are"
39247 " ideal for people who don't need new features but would just like the "
39248 "software to work."
39252 #: ../src/guestfs.pod:2641
39253 msgid "Our criteria for backporting changes are:"
39257 #: ../src/guestfs.pod:2647
39259 "Documentation changes which don't affect any code are backported unless the "
39260 "documentation refers to a future feature which is not in stable."
39264 #: ../src/guestfs.pod:2653
39266 "Bug fixes which are not controversial, fix obvious problems, and have been "
39267 "well tested are backported."
39271 #: ../src/guestfs.pod:2658
39273 "Simple rearrangements of code which shouldn't affect how it works get "
39274 "backported. This is so that the code in the two branches doesn't get too "
39275 "far out of step, allowing us to backport future fixes more easily."
39279 #: ../src/guestfs.pod:2664
39281 "We I<don't> backport new features, new APIs, new tools etc, except in one "
39282 "exceptional case: the new feature is required in order to implement an "
39283 "important bug fix."
39287 #: ../src/guestfs.pod:2670
39289 "A new stable branch starts when we think the new features in development are"
39290 " substantial and compelling enough over the current stable branch to warrant"
39291 " it. When that happens we create new stable and development versions 1.N.0 "
39292 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
39293 "stable at this point, but by backporting fixes from development, that branch"
39294 " will stabilize over time."
39298 #: ../src/guestfs.pod:2678
39299 msgid "EXTENDING LIBGUESTFS"
39303 #: ../src/guestfs.pod:2680
39304 msgid "ADDING A NEW API ACTION"
39308 #: ../src/guestfs.pod:2682
39310 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
39311 "documentation) are generated, and this makes it easy to extend the "
39316 #: ../src/guestfs.pod:2686
39317 msgid "To add a new API action there are two changes:"
39321 #: ../src/guestfs.pod:2692
39323 "You need to add a description of the call (name, parameters, return type, "
39324 "tests, documentation) to C<generator/generator_actions.ml>."
39328 #: ../src/guestfs.pod:2695
39330 "There are two sorts of API action, depending on whether the call goes "
39331 "through to the daemon in the appliance, or is serviced entirely by the "
39332 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the"
39333 " former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39334 "an example of the latter, since a trace flag is maintained in the handle and"
39335 " all tracing is done on the library side."
39339 #: ../src/guestfs.pod:2703
39341 "Most new actions are of the first type, and get added to the "
39342 "C<daemon_functions> list. Each function has a unique procedure number used "
39343 "in the RPC protocol which is assigned to that action when we publish "
39344 "libguestfs and cannot be reused. Take the latest procedure number and "
39349 #: ../src/guestfs.pod:2709
39351 "For library-only actions of the second type, add to the "
39352 "C<non_daemon_functions> list. Since these functions are serviced by the "
39353 "library and do not travel over the RPC mechanism to the daemon, these "
39354 "functions do not need a procedure number, and so the procedure number is set"
39359 #: ../src/guestfs.pod:2717
39360 msgid "Implement the action (in C):"
39364 #: ../src/guestfs.pod:2719
39366 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39367 "C<daemon/> directory."
39371 #: ../src/guestfs.pod:2722
39373 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39374 "(note: double underscore) in the C<src/> directory."
39378 #: ../src/guestfs.pod:2725
39379 msgid "In either case, use another function as an example of what to do."
39383 #: ../src/guestfs.pod:2729
39384 msgid "After making these changes, use C<make> to compile."
39388 #: ../src/guestfs.pod:2731
39390 "Note that you don't need to implement the RPC, language bindings, manual "
39391 "pages or anything else. It's all automatically generated from the OCaml "
39396 #: ../src/guestfs.pod:2735
39397 msgid "ADDING TESTS FOR AN API ACTION"
39401 #: ../src/guestfs.pod:2737
39403 "You can supply zero or as many tests as you want per API call. The tests "
39404 "can either be added as part of the API description "
39405 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
39406 "drop a script into C<regressions/>. Note that adding a script to "
39407 "C<regressions/> is slower, so if possible use the first method."
39411 #: ../src/guestfs.pod:2743
39413 "The following describes the test environment used when you add an API test "
39414 "in C<generator_actions.ml>."
39418 #: ../src/guestfs.pod:2746
39419 msgid "The test environment has 4 block devices:"
39423 #: ../src/guestfs.pod:2750
39424 msgid "C</dev/sda> 500MB"
39428 #: ../src/guestfs.pod:2752
39429 msgid "General block device for testing."
39433 #: ../src/guestfs.pod:2754
39434 msgid "C</dev/sdb> 50MB"
39438 #: ../src/guestfs.pod:2756
39440 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39445 #: ../src/guestfs.pod:2759
39446 msgid "C</dev/sdc> 10MB"
39450 #: ../src/guestfs.pod:2761
39451 msgid "Used in a few tests where two block devices are needed."
39455 #: ../src/guestfs.pod:2763
39456 msgid "C</dev/sdd>"
39460 #: ../src/guestfs.pod:2765
39461 msgid "ISO with fixed content (see C<images/test.iso>)."
39465 #: ../src/guestfs.pod:2769
39467 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39468 "appliance and block devices are reused between tests. So don't try testing "
39469 "L</guestfs_kill_subprocess> :-x"
39473 #: ../src/guestfs.pod:2773
39475 "Each test starts with an initial scenario, selected using one of the "
39476 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39477 "initialize the disks mentioned above in a particular way as documented in "
39478 "C<generator_types.ml>. You should not assume anything about the previous "
39479 "contents of other disks that are not initialized."
39483 #: ../src/guestfs.pod:2779
39485 "You can add a prerequisite clause to any individual test. This is a run-"
39486 "time check, which, if it fails, causes the test to be skipped. Useful if "
39487 "testing a command which might not work on all variations of libguestfs "
39488 "builds. A test that has prerequisite of C<Always> means to run "
39493 #: ../src/guestfs.pod:2785
39495 "In addition, packagers can skip individual tests by setting environment "
39496 "variables before running C<make check>."
39500 #: ../src/guestfs.pod:2788
39503 " SKIP_TEST_<CMD>_<NUM>=1\n"
39508 #: ../src/guestfs.pod:2790
39509 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39513 #: ../src/guestfs.pod:2792
39518 #: ../src/guestfs.pod:2794
39521 " SKIP_TEST_<CMD>=1\n"
39526 #: ../src/guestfs.pod:2796
39527 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39531 #: ../src/guestfs.pod:2798
39532 msgid "Packagers can run only certain tests by setting for example:"
39536 #: ../src/guestfs.pod:2800
39539 " TEST_ONLY=\"vfs_type zerofree\"\n"
39544 #: ../src/guestfs.pod:2802
39546 "See C<capitests/tests.c> for more details of how these environment variables"
39551 #: ../src/guestfs.pod:2805
39552 msgid "DEBUGGING NEW API ACTIONS"
39556 #: ../src/guestfs.pod:2807
39557 msgid "Test new actions work before submitting them."
39561 #: ../src/guestfs.pod:2809
39562 msgid "You can use guestfish to try out new commands."
39566 #: ../src/guestfs.pod:2811
39568 "Debugging the daemon is a problem because it runs inside a minimal "
39569 "environment. However you can fprintf messages in the daemon to stderr, and "
39570 "they will show up if you use C<guestfish -v>."
39574 #: ../src/guestfs.pod:2815
39575 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
39579 #: ../src/guestfs.pod:2817
39581 "Our C source code generally adheres to some basic code-formatting "
39582 "conventions. The existing code base is not totally consistent on this "
39583 "front, but we do prefer that contributed code be formatted similarly. In "
39584 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
39585 "indentation level, and other than that, follow the K&R style."
39589 #: ../src/guestfs.pod:2823
39591 "If you use Emacs, add the following to one of one of your start-up files "
39592 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
39596 #: ../src/guestfs.pod:2826
39599 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
39600 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
39601 " (add-hook 'find-file-hook\n"
39602 " '(lambda () (if (and buffer-file-name\n"
39603 " (string-match \"/libguestfs\\\\>\"\n"
39604 " (buffer-file-name))\n"
39605 " (not (string-equal mode-name \"Change Log\"))\n"
39606 " (not (string-equal mode-name \"Makefile\")))\n"
39607 " (setq indent-tabs-mode nil))))\n"
39612 #: ../src/guestfs.pod:2836
39615 " ;;; When editing C sources in libguestfs, use this style.\n"
39616 " (defun libguestfs-c-mode ()\n"
39617 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
39619 " (c-set-style \"K&R\")\n"
39620 " (setq c-indent-level 2)\n"
39621 " (setq c-basic-offset 2))\n"
39622 " (add-hook 'c-mode-hook\n"
39623 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
39624 " (buffer-file-name))\n"
39625 " (libguestfs-c-mode))))\n"
39630 #: ../src/guestfs.pod:2848
39631 msgid "Enable warnings when compiling (and fix any problems this finds):"
39635 #: ../src/guestfs.pod:2851
39638 " ./configure --enable-gcc-warnings\n"
39643 #: ../src/guestfs.pod:2853
39644 msgid "Useful targets are:"
39648 #: ../src/guestfs.pod:2855
39651 " make syntax-check # checks the syntax of the C code\n"
39652 " make check # runs the test suite\n"
39657 #: ../src/guestfs.pod:2858
39658 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
39662 #: ../src/guestfs.pod:2860
39664 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>,"
39665 " which are used to do shell quoting."
39669 #: ../src/guestfs.pod:2865
39674 #: ../src/guestfs.pod:2867
39676 "Simple shell quoted string. Any spaces or other shell characters are "
39681 #: ../src/guestfs.pod:2870
39686 #: ../src/guestfs.pod:2872
39688 "Same as C<%Q> except the string is treated as a path which is prefixed by "
39693 #: ../src/guestfs.pod:2879
39696 " asprintf (&cmd, \"cat %R\", path);\n"
39701 #: ../src/guestfs.pod:2881
39702 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
39706 #: ../src/guestfs.pod:2883
39708 "I<Note:> Do I<not> use these when you are passing parameters to the "
39709 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
39710 "because they are not passed via the shell (instead, straight to exec). You "
39711 "probably want to use the C<sysroot_path()> function however."
39715 #: ../src/guestfs.pod:2889
39716 msgid "SUBMITTING YOUR NEW API ACTIONS"
39720 #: ../src/guestfs.pod:2891
39722 "Submit patches to the mailing list: "
39723 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
39724 "L<rjones@redhat.com>."
39728 #: ../src/guestfs.pod:2895
39729 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
39733 #: ../src/guestfs.pod:2897
39734 msgid "We support i18n (gettext anyhow) in the library."
39738 #: ../src/guestfs.pod:2899
39740 "However many messages come from the daemon, and we don't translate those at "
39741 "the moment. One reason is that the appliance generally has all locale files"
39742 " removed from it, because they take up a lot of space. So we'd have to "
39743 "readd some of those, as well as copying our PO files into the appliance."
39747 #: ../src/guestfs.pod:2905
39749 "Debugging messages are never translated, since they are intended for the "
39754 #: ../src/guestfs.pod:2908
39755 msgid "SOURCE CODE SUBDIRECTORIES"
39759 #: ../src/guestfs.pod:2912
39764 #: ../src/guestfs.pod:2914
39765 msgid "L<virt-alignment-scan(1)> command and documentation."
39769 #: ../src/guestfs.pod:2918
39770 msgid "The libguestfs appliance, build scripts and so on."
39774 #: ../src/guestfs.pod:2920
39775 msgid "C<capitests>"
39779 #: ../src/guestfs.pod:2922
39780 msgid "Automated tests of the C API."
39784 #: ../src/guestfs.pod:2924
39789 #: ../src/guestfs.pod:2926
39791 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
39796 #: ../src/guestfs.pod:2929
39801 #: ../src/guestfs.pod:2931
39803 "Safety and liveness tests of components that libguestfs depends upon (not of"
39804 " libguestfs itself). Mainly this is for qemu and the kernel."
39808 #: ../src/guestfs.pod:2934
39813 #: ../src/guestfs.pod:2936
39815 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
39816 "command and documentation."
39820 #: ../src/guestfs.pod:2939
39825 #: ../src/guestfs.pod:2941
39826 msgid "Outside contributions, experimental parts."
39830 #: ../src/guestfs.pod:2943
39835 #: ../src/guestfs.pod:2945
39837 "The daemon that runs inside the libguestfs appliance and carries out "
39842 #: ../src/guestfs.pod:2948
39847 #: ../src/guestfs.pod:2950
39848 msgid "L<virt-df(1)> command and documentation."
39852 #: ../src/guestfs.pod:2952
39857 #: ../src/guestfs.pod:2954
39858 msgid "L<virt-edit(1)> command and documentation."
39862 #: ../src/guestfs.pod:2956
39863 msgid "C<examples>"
39867 #: ../src/guestfs.pod:2958
39868 msgid "C API example code."
39872 #: ../src/guestfs.pod:2960
39877 #: ../src/guestfs.pod:2962
39879 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
39880 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L"
39881 "<virt-tar-out(1)>."
39885 #: ../src/guestfs.pod:2966
39890 #: ../src/guestfs.pod:2968
39892 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
39896 #: ../src/guestfs.pod:2970
39897 msgid "C<generator>"
39901 #: ../src/guestfs.pod:2972
39903 "The crucially important generator, used to automatically generate large "
39904 "amounts of boilerplate C code for things like RPC and bindings."
39908 #: ../src/guestfs.pod:2975
39913 #: ../src/guestfs.pod:2977
39914 msgid "Files used by the test suite."
39918 #: ../src/guestfs.pod:2979
39919 msgid "Some \"phony\" guest images which we test against."
39923 #: ../src/guestfs.pod:2981
39924 msgid "C<inspector>"
39928 #: ../src/guestfs.pod:2983
39929 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
39933 #: ../src/guestfs.pod:2985
39938 #: ../src/guestfs.pod:2987
39939 msgid "Logo used on the website. The fish is called Arthur by the way."
39943 #: ../src/guestfs.pod:2989
39948 #: ../src/guestfs.pod:2991
39949 msgid "M4 macros used by autoconf."
39953 #: ../src/guestfs.pod:2993
39958 #: ../src/guestfs.pod:2995
39959 msgid "Translations of simple gettext strings."
39963 #: ../src/guestfs.pod:2997
39968 #: ../src/guestfs.pod:2999
39970 "The build infrastructure and PO files for translations of manpages and POD "
39971 "files. Eventually this will be combined with the C<po> directory, but that "
39972 "is rather complicated."
39976 #: ../src/guestfs.pod:3003
39977 msgid "C<regressions>"
39981 #: ../src/guestfs.pod:3005
39982 msgid "Regression tests."
39986 #: ../src/guestfs.pod:3007
39991 #: ../src/guestfs.pod:3009
39992 msgid "L<virt-rescue(1)> command and documentation."
39996 #: ../src/guestfs.pod:3011
40001 #: ../src/guestfs.pod:3013
40002 msgid "L<virt-resize(1)> command and documentation."
40006 #: ../src/guestfs.pod:3015
40007 msgid "C<sparsify>"
40011 #: ../src/guestfs.pod:3017
40012 msgid "L<virt-sparsify(1)> command and documentation."
40016 #: ../src/guestfs.pod:3019
40021 #: ../src/guestfs.pod:3021
40022 msgid "Source code to the C library."
40026 #: ../src/guestfs.pod:3023
40031 #: ../src/guestfs.pod:3025
40033 "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
40037 #: ../src/guestfs.pod:3027
40038 msgid "C<test-tool>"
40042 #: ../src/guestfs.pod:3029
40044 "Test tool for end users to test if their qemu/kernel combination will work "
40049 #: ../src/guestfs.pod:3032
40054 #: ../src/guestfs.pod:3034
40059 #: ../src/guestfs.pod:3036
40064 #: ../src/guestfs.pod:3038
40069 #: ../src/guestfs.pod:3040
40074 #: ../src/guestfs.pod:3042
40079 #: ../src/guestfs.pod:3044
40084 #: ../src/guestfs.pod:3046
40089 #: ../src/guestfs.pod:3048
40094 #: ../src/guestfs.pod:3050
40095 msgid "Language bindings."
40099 #: ../src/guestfs.pod:3054
40100 msgid "MAKING A STABLE RELEASE"
40104 #: ../src/guestfs.pod:3056
40106 "When we make a stable release, there are several steps documented here. See"
40107 " L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
40112 #: ../src/guestfs.pod:3064
40114 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
40118 #: ../src/guestfs.pod:3069
40119 msgid "Finalize RELEASE-NOTES."
40123 #: ../src/guestfs.pod:3073
40124 msgid "Update ROADMAP."
40128 #: ../src/guestfs.pod:3077
40129 msgid "Run C<src/api-support/update-from-tarballs.sh>."
40133 #: ../src/guestfs.pod:3081
40134 msgid "Push and pull from Transifex."
40138 #: ../src/guestfs.pod:3083
40143 #: ../src/guestfs.pod:3085
40151 #: ../src/guestfs.pod:3087
40152 msgid "to push the latest POT files to Transifex. Then run:"
40156 #: ../src/guestfs.pod:3089
40164 #: ../src/guestfs.pod:3091
40165 msgid "which is a wrapper to pull the latest translated C<*.po> files."
40169 #: ../src/guestfs.pod:3095
40171 "Create new stable and development directories under "
40172 "L<http://libguestfs.org/download>."
40176 #: ../src/guestfs.pod:3100
40177 msgid "Create the branch in git:"
40181 #: ../src/guestfs.pod:3102
40184 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
40185 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
40186 " git branch stable-1.XX\n"
40187 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
40192 #: ../src/guestfs.pod:3109
40197 #: ../src/guestfs.pod:3111
40198 msgid "PROTOCOL LIMITS"
40202 #: ../src/guestfs.pod:3113
40204 "Internally libguestfs uses a message-based protocol to pass API calls and "
40205 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
40206 "plenty more detail about this). The maximum message size used by the "
40207 "protocol is slightly less than 4 MB. For some API calls you may need to be "
40208 "aware of this limit. The API calls which may be affected are individually "
40209 "documented, with a link back to this section of the documentation."
40213 #: ../src/guestfs.pod:3121
40215 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
40216 "a simple string. Because this string is at some point internally encoded as"
40217 " a message, the maximum size that it can return is slightly under 4 MB. If "
40218 "the requested file is larger than this then you will get an error."
40222 #: ../src/guestfs.pod:3127
40224 "In order to transfer large files into and out of the guest filesystem, you "
40225 "need to use particular calls that support this. The sections L</UPLOADING> "
40226 "and L</DOWNLOADING> document how to do this."
40230 #: ../src/guestfs.pod:3131
40232 "You might also consider mounting the disk image using our FUSE filesystem "
40233 "support (L<guestmount(1)>)."
40237 #: ../src/guestfs.pod:3134
40238 msgid "MAXIMUM NUMBER OF DISKS"
40242 #: ../src/guestfs.pod:3136
40244 "When using virtio disks (the default) the current limit is B<25> disks."
40248 #: ../src/guestfs.pod:3139
40250 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31"
40251 " slots. However febootstrap only understands disks with names C</dev/vda> "
40252 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
40257 #: ../src/guestfs.pod:3144
40259 "We are working to substantially raise this limit in future versions but it "
40260 "requires complex changes to qemu."
40264 #: ../src/guestfs.pod:3147
40266 "In future versions of libguestfs it should also be possible to \"hot plug\" "
40267 "disks (add and remove disks after calling L</guestfs_launch>). This also "
40268 "requires changes to qemu."
40272 #: ../src/guestfs.pod:3151
40273 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
40277 #: ../src/guestfs.pod:3153
40278 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
40282 #: ../src/guestfs.pod:3155
40284 "This is because it reserves 4 bits for the minor device number (thus "
40285 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
40289 #: ../src/guestfs.pod:3158
40291 "If you attach a disk with more than 15 partitions, the extra partitions are "
40292 "ignored by libguestfs."
40296 #: ../src/guestfs.pod:3161
40297 msgid "MAXIMUM SIZE OF A DISK"
40301 #: ../src/guestfs.pod:3163
40302 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
40306 #: ../src/guestfs.pod:3165
40308 "We have tested block devices up to 1 exabyte (2**60 or "
40309 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
40314 #: ../src/guestfs.pod:3169
40316 "Although libguestfs probably does not impose any limit, the underlying host "
40317 "storage will. If you store disk images on a host ext4 filesystem, then the "
40318 "maximum size will be limited by the maximum ext4 file size (currently 16 "
40319 "TB). If you store disk images as host logical volumes then you are limited "
40320 "by the maximum size of an LV."
40324 #: ../src/guestfs.pod:3175
40326 "For the hugest disk image files, we recommend using XFS on the host for "
40331 #: ../src/guestfs.pod:3178
40332 msgid "MAXIMUM SIZE OF A PARTITION"
40336 #: ../src/guestfs.pod:3180
40338 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector numbers."
40339 " Assuming a 512 byte sector size, this means that MBR cannot address a "
40340 "partition located beyond 2 TB on the disk."
40344 #: ../src/guestfs.pod:3184
40346 "It is recommended that you use GPT partitions on disks which are larger than"
40347 " this size. GPT uses 64 bit sector numbers and so can address partitions "
40348 "which are theoretically larger than the largest disk we could support."
40352 #: ../src/guestfs.pod:3189
40353 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40357 #: ../src/guestfs.pod:3191
40359 "This depends on the filesystem type. libguestfs itself does not impose any "
40360 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40361 "what these limits are."
40365 #: ../src/guestfs.pod:3195
40366 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40370 #: ../src/guestfs.pod:3197
40372 "The API functions L</guestfs_upload>, L</guestfs_download>, "
40373 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40374 "uploads and downloads."
40378 #: ../src/guestfs.pod:3201
40379 msgid "INSPECTION LIMITS"
40383 #: ../src/guestfs.pod:3203
40385 "The inspection code has several arbitrary limits on things like the size of "
40386 "Windows Registry hive it will read, and the length of product name. These "
40387 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40388 "memory and disk space on the host, and should not be reached in practice. "
40389 "See the source code for more information."
40393 #: ../src/guestfs.pod:3229
40395 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40396 "effect as calling C<guestfs_set_verbose (g, 1)>."
40400 #: ../src/guestfs.pod:3241
40402 "Set the path that libguestfs uses to search for a supermin appliance. See "
40403 "the discussion of paths in section L</PATH> above."
40407 #: ../src/guestfs.pod:3250
40408 msgid "See also L</QEMU WRAPPERS> above."
40412 #: ../src/guestfs.pod:3254
40414 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40415 "effect as calling C<guestfs_set_trace (g, 1)>."
40419 #: ../src/guestfs.pod:3272
40421 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
40422 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
40423 "L<guestfish(1)>, L<guestmount(1)>, L<virt-alignment-scan(1)>, L<virt-"
40424 "cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-"
40425 "edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-"
40426 "filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-"
40427 "fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-"
40428 "sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-"
40429 "win-reg(1)>, L<qemu(1)>, L<febootstrap(1)>, L<febootstrap-supermin-"
40430 "helper(8)>, L<hivex(3)>, L<stap(1)>, L<http://libguestfs.org/>."
40434 #: ../src/guestfs.pod:3308
40436 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
40437 "L<lvm(8)>, L<disktype(1)>."
40441 #: ../src/guestfs.pod:3315 ../tools/virt-make-fs.pl:571
40442 #: ../tools/virt-win-reg.pl:772
40447 #: ../src/guestfs.pod:3317
40448 msgid "To get a list of bugs against libguestfs use this link:"
40452 #: ../src/guestfs.pod:3319
40454 "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
40458 #: ../src/guestfs.pod:3321
40459 msgid "To report a new bug against libguestfs use this link:"
40463 #: ../src/guestfs.pod:3323
40465 "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
40469 #: ../src/guestfs.pod:3325
40470 msgid "When reporting a bug, please check:"
40474 #: ../src/guestfs.pod:3331
40475 msgid "That the bug hasn't been reported already."
40479 #: ../src/guestfs.pod:3335
40480 msgid "That you are testing a recent version."
40484 #: ../src/guestfs.pod:3339
40485 msgid "Describe the bug accurately, and give a way to reproduce it."
40489 #: ../src/guestfs.pod:3343
40491 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the"
40496 #: ../test-tool/libguestfs-test-tool.pod:5
40497 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40501 #: ../test-tool/libguestfs-test-tool.pod:9
40504 " libguestfs-test-tool [--options]\n"
40509 #: ../test-tool/libguestfs-test-tool.pod:13
40511 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40512 "to check basic libguestfs functionality is working. This is needed because "
40513 "libguestfs occasionally breaks for reasons beyond our control: usually "
40514 "because of changes in the underlying qemu or kernel packages, or the host "
40519 #: ../test-tool/libguestfs-test-tool.pod:19
40520 msgid "If you suspect a problem in libguestfs, then just run:"
40524 #: ../test-tool/libguestfs-test-tool.pod:21
40527 " libguestfs-test-tool\n"
40532 #: ../test-tool/libguestfs-test-tool.pod:23
40533 msgid "It will print lots of diagnostic messages."
40537 #: ../test-tool/libguestfs-test-tool.pod:25
40538 msgid "If it runs to completion successfully, you will see this near the end:"
40542 #: ../test-tool/libguestfs-test-tool.pod:27
40545 " ===== TEST FINISHED OK =====\n"
40550 #: ../test-tool/libguestfs-test-tool.pod:29
40551 msgid "and the test tool will exit with code 0."
40555 #: ../test-tool/libguestfs-test-tool.pod:31
40557 "If it fails (and/or exits with non-zero error code), please paste the "
40558 "I<complete, unedited> output of the test tool into a bug report. More "
40559 "information about reporting bugs can be found on the "
40560 "L<http://libguestfs.org/> website."
40564 #: ../test-tool/libguestfs-test-tool.pod:42
40565 msgid "Display short usage information and exit."
40569 #: ../test-tool/libguestfs-test-tool.pod:44
40570 msgid "B<--qemu qemu_binary>"
40574 #: ../test-tool/libguestfs-test-tool.pod:46
40576 "If you have downloaded another qemu binary, point this option at the full "
40577 "path of the binary to try it."
40581 #: ../test-tool/libguestfs-test-tool.pod:49
40582 msgid "B<--qemudir qemu_source_dir>"
40586 #: ../test-tool/libguestfs-test-tool.pod:51
40588 "If you have compiled qemu from source, point this option at the source "
40589 "directory to try it."
40593 #: ../test-tool/libguestfs-test-tool.pod:54
40598 #: ../test-tool/libguestfs-test-tool.pod:56
40599 msgid "B<--timeout N>"
40603 #: ../test-tool/libguestfs-test-tool.pod:58
40605 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
40606 "minutes) which does not usually need to be adjusted."
40610 #: ../test-tool/libguestfs-test-tool.pod:63
40611 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
40615 #: ../test-tool/libguestfs-test-tool.pod:65
40617 "If you have compiled another version of qemu from source and would like to "
40618 "try that, then you can use the I<--qemudir> option to point to the qemu "
40619 "source directory."
40623 #: ../test-tool/libguestfs-test-tool.pod:69
40625 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
40626 "option to point to the binary."
40630 #: ../test-tool/libguestfs-test-tool.pod:72
40632 "Note when using these options, you can ignore the business of qemu wrapper "
40633 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
40634 "wrapper script for you if one is needed."
40638 #: ../test-tool/libguestfs-test-tool.pod:76
40639 msgid "TRYING OUT A DIFFERENT KERNEL"
40643 #: ../test-tool/libguestfs-test-tool.pod:78
40645 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
40646 "libguestfs tries. You do this by setting the environment variables "
40647 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
40651 #: ../test-tool/libguestfs-test-tool.pod:82
40653 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further"
40658 #: ../test-tool/libguestfs-test-tool.pod:85
40659 msgid "SELF-DIAGNOSIS"
40663 #: ../test-tool/libguestfs-test-tool.pod:87
40665 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
40666 "produced by libguestfs-test-tool and/or possible errors."
40670 #: ../test-tool/libguestfs-test-tool.pod:92
40672 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
40673 "I<1> if there was an error."
40677 #: ../test-tool/libguestfs-test-tool.pod:97
40679 "For the full list of environment variables which may affect libguestfs, "
40680 "please see the L<guestfs(3)> manual page."
40684 #: ../test-tool/libguestfs-test-tool.pod:102
40685 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
40689 #: ../tools/virt-list-filesystems.pl:32
40691 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
40695 #: ../tools/virt-list-filesystems.pl:36
40698 " virt-list-filesystems [--options] domname\n"
40703 #: ../tools/virt-list-filesystems.pl:38
40706 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
40711 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
40713 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
40718 #: ../tools/virt-list-filesystems.pl:45
40720 "C<virt-list-filesystems> is a command line tool to list the filesystems that"
40721 " are contained in a virtual machine or disk image."
40725 #: ../tools/virt-list-filesystems.pl:49
40727 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
40728 "functionality. For more complex cases you should look at the "
40729 "L<guestfish(1)> tool."
40733 #: ../tools/virt-list-filesystems.pl:112
40735 "With this option, C<virt-list-filesystems> displays the type of each "
40736 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
40740 #: ../tools/virt-list-filesystems.pl:119
40745 #: ../tools/virt-list-filesystems.pl:123
40747 "Normally we only show mountable filesystems. If this option is given then "
40748 "swap devices are shown too."
40752 #: ../tools/virt-list-filesystems.pl:197
40754 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
40755 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
40756 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40760 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
40761 msgid "Copyright (C) 2009 Red Hat Inc."
40765 #: ../tools/virt-list-partitions.pl:32
40767 "virt-list-partitions - List partitions in a virtual machine or disk image"
40771 #: ../tools/virt-list-partitions.pl:36
40774 " virt-list-partitions [--options] domname\n"
40779 #: ../tools/virt-list-partitions.pl:38
40782 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
40787 #: ../tools/virt-list-partitions.pl:45
40789 "C<virt-list-partitions> is a command line tool to list the partitions that "
40790 "are contained in a virtual machine or disk image. It is mainly useful as a "
40791 "first step to using L<virt-resize(1)>."
40795 #: ../tools/virt-list-partitions.pl:50
40797 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
40798 "functionality. For more complex cases you should look at the "
40799 "L<guestfish(1)> tool."
40803 #: ../tools/virt-list-partitions.pl:113
40804 msgid "Show sizes in human-readable form (eg. \"1G\")."
40808 #: ../tools/virt-list-partitions.pl:123
40810 "With this option, C<virt-list-partitions> displays the type and size of each"
40811 " partition too (where \"type\" means C<ext3>, C<pv> etc.)"
40815 #: ../tools/virt-list-partitions.pl:130
40820 #: ../tools/virt-list-partitions.pl:132
40825 #: ../tools/virt-list-partitions.pl:134
40827 "Display the total size of each block device (as a separate row or rows)."
40831 #: ../tools/virt-list-partitions.pl:267
40833 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
40834 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
40835 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40839 #: ../tools/virt-list-partitions.pl:283
40840 msgid "Copyright (C) 2009-2010 Red Hat Inc."
40844 #: ../tools/virt-make-fs.pl:37
40845 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
40849 #: ../tools/virt-make-fs.pl:41
40852 " virt-make-fs [--options] input.tar output.img\n"
40857 #: ../tools/virt-make-fs.pl:43
40860 " virt-make-fs [--options] input.tar.gz output.img\n"
40865 #: ../tools/virt-make-fs.pl:45
40868 " virt-make-fs [--options] directory output.img\n"
40873 #: ../tools/virt-make-fs.pl:49
40875 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
40876 "archive or some files in a directory. It is similar to tools like "
40877 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
40878 "it can create common filesystem types like ext2/3 or NTFS, which can be "
40879 "useful if you want to attach these filesystems to existing virtual machines "
40880 "(eg. to import large amounts of read-only data to a VM)."
40884 #: ../tools/virt-make-fs.pl:57
40885 msgid "Basic usage is:"
40889 #: ../tools/virt-make-fs.pl:59
40892 " virt-make-fs input output.img\n"
40897 #: ../tools/virt-make-fs.pl:61
40899 "where C<input> is either a directory containing files that you want to add, "
40900 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
40901 "C<output.img> is a disk image. The input type is detected automatically. "
40902 "The output disk image defaults to a raw ext2 sparse image unless you specify"
40903 " extra flags (see L</OPTIONS> below)."
40907 #: ../tools/virt-make-fs.pl:67
40908 msgid "FILESYSTEM TYPE"
40912 #: ../tools/virt-make-fs.pl:69
40914 "The default filesystem type is C<ext2>. Just about any filesystem type that"
40915 " libguestfs supports can be used (but I<not> read-only formats like "
40916 "ISO9660). Here are some of the more common choices:"
40920 #: ../tools/virt-make-fs.pl:75
40925 #: ../tools/virt-make-fs.pl:77
40927 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If"
40928 " you are not going to use the filesystem in a way that requires the journal,"
40929 " then this is just wasted overhead."
40933 #: ../tools/virt-make-fs.pl:81
40934 msgid "I<ntfs> or I<vfat>"
40938 #: ../tools/virt-make-fs.pl:83
40939 msgid "Useful if exporting data to a Windows guest."
40943 #: ../tools/virt-make-fs.pl:85
40945 "I<Note for vfat>: The tar archive or local directory must only contain files"
40946 " which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
40947 "program running within libguestfs is unable to change the ownership of non-"
40948 "root files, since vfat itself does not support this."
40952 #: ../tools/virt-make-fs.pl:90
40957 #: ../tools/virt-make-fs.pl:92
40959 "Lower overhead than C<ext2>, but certain limitations on filename length and "
40960 "total filesystem size."
40964 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116
40965 #: ../tools/virt-make-fs.pl:149
40970 #: ../tools/virt-make-fs.pl:99
40973 " virt-make-fs --type=minix input minixfs.img\n"
40978 #: ../tools/virt-make-fs.pl:101
40979 msgid "TO PARTITION OR NOT TO PARTITION"
40983 #: ../tools/virt-make-fs.pl:103
40984 msgid "Optionally virt-make-fs can add a partition table to the output disk."
40988 #: ../tools/virt-make-fs.pl:105
40990 "Adding a partition can make the disk image more compatible with certain "
40991 "virtualized operating systems which don't expect to see a filesystem "
40992 "directly located on a block device (Linux doesn't care and will happily "
40993 "handle both types)."
40997 #: ../tools/virt-make-fs.pl:110
40999 "On the other hand, if you have a partition table then the output image is no"
41000 " longer a straight filesystem. For example you cannot run L<fsck(8)> "
41001 "directly on a partitioned disk image. (However libguestfs tools such as "
41002 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
41006 #: ../tools/virt-make-fs.pl:118
41007 msgid "Add an MBR partition:"
41011 #: ../tools/virt-make-fs.pl:120
41014 " virt-make-fs --partition -- input disk.img\n"
41019 #: ../tools/virt-make-fs.pl:122
41021 "If the output disk image could be terabyte-sized or larger, it's better to "
41022 "use an EFI/GPT-compatible partition table:"
41026 #: ../tools/virt-make-fs.pl:125
41029 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
41034 #: ../tools/virt-make-fs.pl:127
41035 msgid "EXTRA SPACE"
41039 #: ../tools/virt-make-fs.pl:129
41041 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
41042 "the files that it contains, but might have extra space. Depending on how "
41043 "you are going to use the output, you might think this extra space is wasted "
41044 "and want to minimize it, or you might want to leave space so that more files"
41045 " can be added later. Virt-make-fs defaults to minimizing the extra space, "
41046 "but you can use the I<--size> flag to leave space in the filesystem if you "
41051 #: ../tools/virt-make-fs.pl:137
41053 "An alternative way to leave extra space but not make the output image any "
41054 "bigger is to use an alternative disk image format (instead of the default "
41055 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2"
41056 " image format (check your hypervisor supports this before using it). This "
41057 "allows you to choose a large I<--size> but the extra space won't actually be"
41058 " allocated in the image until you try to store something in it."
41062 #: ../tools/virt-make-fs.pl:145
41064 "Don't forget that you can also use local commands including L<resize2fs(8)> "
41065 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
41066 "to build another image from scratch."
41070 #: ../tools/virt-make-fs.pl:151
41073 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
41078 #: ../tools/virt-make-fs.pl:179
41079 msgid "Enable debugging information."
41083 #: ../tools/virt-make-fs.pl:185
41084 msgid "B<--size=E<lt>NE<gt>>"
41088 #: ../tools/virt-make-fs.pl:187
41089 msgid "B<--size=+E<lt>NE<gt>>"
41093 #: ../tools/virt-make-fs.pl:189
41094 msgid "B<-s E<lt>NE<gt>>"
41098 #: ../tools/virt-make-fs.pl:191
41099 msgid "B<-s +E<lt>NE<gt>>"
41103 #: ../tools/virt-make-fs.pl:193
41105 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
41109 #: ../tools/virt-make-fs.pl:196
41111 "If this option is I<not> given, then the output image will be just large "
41112 "enough to contain all the files, with not much wasted space."
41116 #: ../tools/virt-make-fs.pl:199
41118 "To choose a fixed size output disk, specify an absolute number followed by "
41119 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41120 "Petabytes or Exabytes. This must be large enough to contain all the input "
41121 "files, else you will get an error."
41125 #: ../tools/virt-make-fs.pl:204
41127 "To leave extra space, specify C<+> (plus sign) and a number followed by "
41128 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41129 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
41130 "the input files, and (approximately) an extra 200 MB free space."
41134 #: ../tools/virt-make-fs.pl:210
41136 "Note that virt-make-fs estimates free space, and therefore will not produce "
41137 "filesystems containing precisely the free space requested. (It is much more"
41138 " expensive and time-consuming to produce a filesystem which has precisely "
41139 "the desired free space)."
41143 #: ../tools/virt-make-fs.pl:219
41144 msgid "B<--format=E<lt>fmtE<gt>>"
41148 #: ../tools/virt-make-fs.pl:221
41149 msgid "B<-F E<lt>fmtE<gt>>"
41153 #: ../tools/virt-make-fs.pl:223
41154 msgid "Choose the output disk image format."
41158 #: ../tools/virt-make-fs.pl:225
41159 msgid "The default is C<raw> (raw sparse disk image)."
41163 #: ../tools/virt-make-fs.pl:227
41165 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
41166 "that would really make sense here is C<qcow2>."
41170 #: ../tools/virt-make-fs.pl:234
41171 msgid "B<--type=E<lt>fsE<gt>>"
41175 #: ../tools/virt-make-fs.pl:236
41176 msgid "B<-t E<lt>fsE<gt>>"
41180 #: ../tools/virt-make-fs.pl:238
41181 msgid "Choose the output filesystem type."
41185 #: ../tools/virt-make-fs.pl:240
41186 msgid "The default is C<ext2>."
41190 #: ../tools/virt-make-fs.pl:242
41192 "Any filesystem which is supported read-write by libguestfs can be used here."
41196 #: ../tools/virt-make-fs.pl:249
41197 msgid "B<--partition>"
41201 #: ../tools/virt-make-fs.pl:251
41202 msgid "B<--partition=E<lt>parttypeE<gt>>"
41206 #: ../tools/virt-make-fs.pl:253
41208 "If specified, this flag adds an MBR partition table to the output disk "
41213 #: ../tools/virt-make-fs.pl:256
41215 "You can change the partition table type, eg. I<--partition=gpt> for large "
41220 #: ../tools/virt-make-fs.pl:259
41222 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
41223 "might consider the next parameter to be the partition type. For example:"
41227 #: ../tools/virt-make-fs.pl:263
41230 " virt-make-fs --partition input.tar output.img\n"
41235 #: ../tools/virt-make-fs.pl:265
41237 "would cause virt-make-fs to think you wanted to use a partition type of "
41238 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
41239 "dash) between options and the input and output arguments:"
41243 #: ../tools/virt-make-fs.pl:269
41246 " virt-make-fs --partition -- input.tar output.img\n"
41251 #: ../tools/virt-make-fs.pl:271
41252 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
41256 #: ../tools/virt-make-fs.pl:559
41258 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
41259 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
41260 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
41264 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
41266 "When reporting bugs, please enable debugging and capture the I<complete> "
41271 #: ../tools/virt-make-fs.pl:576
41274 " export LIBGUESTFS_DEBUG=1\n"
41275 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
41280 #: ../tools/virt-make-fs.pl:579
41282 "Attach /tmp/virt-make-fs.log to a new bug report at "
41283 "L<https://bugzilla.redhat.com/>"
41287 #: ../tools/virt-tar.pl:33
41288 msgid "virt-tar - Extract or upload files to a virtual machine"
41292 #: ../tools/virt-tar.pl:37
41295 " virt-tar [--options] -x domname directory tarball\n"
41300 #: ../tools/virt-tar.pl:39
41303 " virt-tar [--options] -u domname tarball directory\n"
41308 #: ../tools/virt-tar.pl:41
41311 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
41316 #: ../tools/virt-tar.pl:43
41319 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
41324 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
41329 #: ../tools/virt-tar.pl:47
41331 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
41332 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
41336 #: ../tools/virt-tar.pl:52
41337 msgid "Download C</home> from the VM into a local tarball:"
41341 #: ../tools/virt-tar.pl:54
41344 " virt-tar -x domname /home home.tar\n"
41349 #: ../tools/virt-tar.pl:56
41352 " virt-tar -zx domname /home home.tar.gz\n"
41357 #: ../tools/virt-tar.pl:58
41358 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41362 #: ../tools/virt-tar.pl:60
41365 " virt-tar -u domname uploadstuff.tar /tmp\n"
41370 #: ../tools/virt-tar.pl:62
41373 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41378 #: ../tools/virt-tar.pl:66
41380 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41381 "virtual machines. If you do this, you risk disk corruption in the VM. C"
41382 "<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41386 #: ../tools/virt-tar.pl:71
41388 "You can use I<-x> (extract) on live virtual machines, but you might get "
41389 "inconsistent results or errors if there is filesystem activity inside the "
41390 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41391 "work, but the only way to guarantee consistent results is if the virtual "
41392 "machine is shut down."
41396 #: ../tools/virt-tar.pl:79
41398 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41399 "parts of a guest filesystem. There are many possibilities: making backups, "
41400 "uploading data files, snooping on guest activity, fixing or customizing "
41405 #: ../tools/virt-tar.pl:84
41407 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41408 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you"
41409 " should look at the L<guestfish(1)> tool."
41413 #: ../tools/virt-tar.pl:88
41415 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41416 "its contents (recursively) from the virtual machine into a local tarball. "
41417 "I<-u> uploads from a local tarball, unpacking it into a directory inside the"
41418 " virtual machine. You cannot use these two options together."
41422 #: ../tools/virt-tar.pl:94
41424 "In addition, you may need to use the I<-z> (gZip) option to enable "
41425 "compression. When uploading, you have to specify I<-z> if the upload file "
41426 "is compressed because virt-tar won't detect this on its own."
41430 #: ../tools/virt-tar.pl:98
41432 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41433 "example it cannot do PKZip files or bzip2 compression. If you want that "
41434 "then you'll have to rebuild the tarballs yourself. (This is a limitation of"
41435 " the L<libguestfs(3)> API)."
41439 #: ../tools/virt-tar.pl:160
41440 msgid "B<--extract>"
41444 #: ../tools/virt-tar.pl:162
41445 msgid "B<--download>"
41449 #: ../tools/virt-tar.pl:164
41454 #: ../tools/virt-tar.pl:166
41455 msgid "B<--upload>"
41459 #: ../tools/virt-tar.pl:168
41461 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41466 #: ../tools/virt-tar.pl:171
41468 "Use I<-u> to upload and unpack from a local tarball into a virtual machine."
41469 " Please read the L</WARNING> section above before using this option."
41473 #: ../tools/virt-tar.pl:175
41474 msgid "You must specify exactly one of these options."
41478 #: ../tools/virt-tar.pl:181
41483 #: ../tools/virt-tar.pl:183
41488 #: ../tools/virt-tar.pl:185
41489 msgid "Specify that the input or output tarball is gzip-compressed."
41493 #: ../tools/virt-tar.pl:298
41495 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-"
41496 "copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
41497 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
41498 "L<http://libguestfs.org/>."
41502 #: ../tools/virt-win-reg.pl:37
41504 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
41509 #: ../tools/virt-win-reg.pl:41
41512 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41517 #: ../tools/virt-win-reg.pl:43
41520 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41525 #: ../tools/virt-win-reg.pl:45
41528 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41533 #: ../tools/virt-win-reg.pl:47
41536 " virt-win-reg --merge domname [input.reg ...]\n"
41541 #: ../tools/virt-win-reg.pl:49
41544 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41549 #: ../tools/virt-win-reg.pl:53
41551 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41552 "virtual machines. If you do this, you I<will> get irreversible disk "
41553 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41554 "but doesn't catch all cases."
41558 #: ../tools/virt-win-reg.pl:58
41560 "Modifying the Windows Registry is an inherently risky operation. The format"
41561 " is deliberately obscure and undocumented, and Registry changes can leave "
41562 "the system unbootable. Therefore when using the I<--merge> option, make "
41563 "sure you have a reliable backup first."
41567 #: ../tools/virt-win-reg.pl:65
41569 "This program can export and merge Windows Registry entries from a Windows "
41574 #: ../tools/virt-win-reg.pl:68
41576 "The first parameter is the libvirt guest name or the raw disk image of a "
41581 #: ../tools/virt-win-reg.pl:71
41583 "If I<--merge> is I<not> specified, then the chosen registry key is "
41584 "displayed/exported (recursively). For example:"
41588 #: ../tools/virt-win-reg.pl:74
41591 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
41596 #: ../tools/virt-win-reg.pl:76
41598 "You can also display single values from within registry keys, for example:"
41602 #: ../tools/virt-win-reg.pl:79
41605 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
41606 " $ virt-win-reg Windows7 $cvkey ProductName\n"
41607 " Windows 7 Enterprise\n"
41612 #: ../tools/virt-win-reg.pl:83
41614 "With I<--merge>, you can merge a textual regedit file into the Windows "
41619 #: ../tools/virt-win-reg.pl:86
41622 " $ virt-win-reg --merge Windows7 changes.reg\n"
41627 #: ../tools/virt-win-reg.pl:90
41629 "This program is only meant for simple access to the registry. If you want "
41630 "to do complicated things with the registry, we suggest you download the "
41631 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)>"
41632 " and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
41633 "L<hivexregedit(1)>."
41637 #: ../tools/virt-win-reg.pl:159
41642 #: ../tools/virt-win-reg.pl:161
41644 "In merge mode, this merges a textual regedit file into the Windows Registry "
41645 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
41646 "displays or exports Registry entries instead."
41650 #: ../tools/virt-win-reg.pl:165
41652 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
41653 "result in disk corruption. However exporting (without this flag) is always"
41658 #: ../tools/virt-win-reg.pl:173
41659 msgid "B<--encoding> UTF-16LE|ASCII"
41663 #: ../tools/virt-win-reg.pl:175
41665 "When merging (only), you may need to specify the encoding for strings to be "
41666 "used in the hive file. This is explained in detail in "
41667 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
41671 #: ../tools/virt-win-reg.pl:179
41673 "The default is to use UTF-16LE, which should work with recent versions of "
41678 #: ../tools/virt-win-reg.pl:186
41679 msgid "B<--unsafe-printable-strings>"
41683 #: ../tools/virt-win-reg.pl:188
41685 "When exporting (only), assume strings are UTF-16LE and print them as strings"
41686 " instead of hex sequences. Remove the final zero codepoint from strings if "
41691 #: ../tools/virt-win-reg.pl:192
41693 "This is unsafe and does not preserve the fidelity of strings in the original"
41694 " Registry for various reasons:"
41698 #: ../tools/virt-win-reg.pl:199
41700 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
41701 "other encodings will be corrupted by this transformation."
41705 #: ../tools/virt-win-reg.pl:204
41707 "Assumes that everything which has type 1 or 2 is really a string and that "
41708 "everything else is not a string, but the type field in real Registries is "
41713 #: ../tools/virt-win-reg.pl:210
41715 "Loses information about whether a zero codepoint followed the string in the "
41720 #: ../tools/virt-win-reg.pl:215
41722 "This all happens because the Registry itself contains no information about "
41723 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
41727 #: ../tools/virt-win-reg.pl:219
41729 "You should only use this option for quick hacking and debugging of the "
41730 "Registry contents, and I<never> use it if the output is going to be passed "
41731 "into another program or stored in another Registry."
41735 #: ../tools/virt-win-reg.pl:556
41736 msgid "SUPPORTED SYSTEMS"
41740 #: ../tools/virt-win-reg.pl:558
41742 "The program currently supports Windows NT-derived guests starting with "
41743 "Windows XP through to at least Windows 7."
41747 #: ../tools/virt-win-reg.pl:561
41748 msgid "The following Registry keys are supported:"
41752 #: ../tools/virt-win-reg.pl:565
41753 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
41757 #: ../tools/virt-win-reg.pl:567
41758 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
41762 #: ../tools/virt-win-reg.pl:569
41763 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
41767 #: ../tools/virt-win-reg.pl:571
41768 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
41772 #: ../tools/virt-win-reg.pl:573
41773 msgid "C<HKEY_USERS\\.DEFAULT>"
41777 #: ../tools/virt-win-reg.pl:575
41778 msgid "C<HKEY_USERS\\I<SID>>"
41782 #: ../tools/virt-win-reg.pl:577
41783 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
41787 #: ../tools/virt-win-reg.pl:579
41788 msgid "C<HKEY_USERS\\I<username>>"
41792 #: ../tools/virt-win-reg.pl:581
41794 "where I<username> is a local user name (this is a libguestfs extension)."
41798 #: ../tools/virt-win-reg.pl:585
41800 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for"
41805 #: ../tools/virt-win-reg.pl:588
41807 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
41808 "supported (there is no \"current user\")."
41812 #: ../tools/virt-win-reg.pl:591
41817 #: ../tools/virt-win-reg.pl:593
41819 "C<virt-win-reg> expects that regedit files have already been reencoded in "
41820 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
41821 "style line endings. Since Windows regedit files are often in UTF-16LE with "
41822 "Windows-style line endings, you may need to reencode the whole file before "
41823 "or after processing."
41827 #: ../tools/virt-win-reg.pl:599
41829 "To reencode a file from Windows format to Linux (before processing it with "
41830 "the I<--merge> option), you would do something like this:"
41834 #: ../tools/virt-win-reg.pl:602
41837 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
41842 #: ../tools/virt-win-reg.pl:604
41844 "To go in the opposite direction, after exporting and before sending the file"
41845 " to a Windows user, do something like this:"
41849 #: ../tools/virt-win-reg.pl:607
41852 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
41857 #: ../tools/virt-win-reg.pl:609
41858 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
41862 #: ../tools/virt-win-reg.pl:611
41864 "If you are unsure about the current encoding, use the L<file(1)> command. "
41865 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
41866 "style (CRLF) line endings, like this:"
41870 #: ../tools/virt-win-reg.pl:615
41873 " $ file software.reg\n"
41874 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
41875 " with CRLF line terminators\n"
41880 #: ../tools/virt-win-reg.pl:619
41881 msgid "This file would need conversion before you could I<--merge> it."
41885 #: ../tools/virt-win-reg.pl:621
41886 msgid "CurrentControlSet etc."
41890 #: ../tools/virt-win-reg.pl:623
41892 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
41893 "Registry at the level of the hive file, and therefore you cannot modify "
41898 #: ../tools/virt-win-reg.pl:627
41900 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
41901 "circumstances it might refer to another control set. The way to find out is"
41902 " to look at the C<HKLM\\SYSTEM\\Select> key:"
41906 #: ../tools/virt-win-reg.pl:631
41909 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
41910 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
41911 " \"Current\"=dword:00000001\n"
41912 " \"Default\"=dword:00000001\n"
41913 " \"Failed\"=dword:00000000\n"
41914 " \"LastKnownGood\"=dword:00000002\n"
41919 #: ../tools/virt-win-reg.pl:638
41920 msgid "\"Current\" is the one which Windows will choose when it boots."
41924 #: ../tools/virt-win-reg.pl:640
41926 "Similarly, other C<Current...> keys in the path may need to be replaced."
41930 #: ../tools/virt-win-reg.pl:643
41931 msgid "DELETING REGISTRY KEYS AND VALUES"
41935 #: ../tools/virt-win-reg.pl:645
41936 msgid "To delete a whole registry key, use the syntax:"
41940 #: ../tools/virt-win-reg.pl:647
41943 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
41948 #: ../tools/virt-win-reg.pl:649
41949 msgid "To delete a single value within a key, use the syntax:"
41953 #: ../tools/virt-win-reg.pl:651
41956 " [HKEY_LOCAL_MACHINE\\Foo]\n"
41962 #: ../tools/virt-win-reg.pl:654
41963 msgid "WINDOWS TIPS"
41967 #: ../tools/virt-win-reg.pl:656
41969 "Note that some of these tips modify the guest disk image. The guest I<must>"
41970 " be shut off, else you will get disk corruption."
41974 #: ../tools/virt-win-reg.pl:659
41975 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
41979 #: ../tools/virt-win-reg.pl:661
41981 "Prepare a DOS batch script, VBScript or executable. Upload this using "
41982 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
41983 "is uploaded into C<C:\\>:"
41987 #: ../tools/virt-win-reg.pl:665
41990 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
41995 #: ../tools/virt-win-reg.pl:667
41996 msgid "Prepare a regedit file containing the registry change:"
42000 #: ../tools/virt-win-reg.pl:669
42003 " cat > test.reg <<'EOF'\n"
42004 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
42005 " \"Test\"=\"c:\\\\test.bat\"\n"
42011 #: ../tools/virt-win-reg.pl:674
42013 "In this example we use the key C<RunOnce> which means that the script will "
42014 "run precisely once when the first user logs in. If you want it to run every"
42015 " time a user logs in, replace C<RunOnce> with C<Run>."
42019 #: ../tools/virt-win-reg.pl:678
42020 msgid "Now update the registry:"
42024 #: ../tools/virt-win-reg.pl:680
42027 " virt-win-reg --merge WindowsGuest test.reg\n"
42032 #: ../tools/virt-win-reg.pl:682
42033 msgid "INSTALLING A SERVICE"
42037 #: ../tools/virt-win-reg.pl:684
42039 "This section assumes you are familiar with Windows services, and you either "
42040 "have a program which handles the Windows Service Control Protocol directly "
42041 "or you want to run any program using a service wrapper like SrvAny or the "
42046 #: ../tools/virt-win-reg.pl:689
42048 "First upload the program and optionally the service wrapper. In this case "
42049 "the test program is called C<test.exe> and we are using the RHSrvAny "
42054 #: ../tools/virt-win-reg.pl:693
42057 " guestfish -i -d WindowsGuest <<EOF\n"
42058 " upload rhsrvany.exe /rhsrvany.exe\n"
42059 " upload test.exe /test.exe\n"
42065 #: ../tools/virt-win-reg.pl:698
42067 "Prepare a regedit file containing the registry changes. In this example, "
42068 "the first registry change is needed for the service itself or the service "
42069 "wrapper (if used). The second registry change is only needed because I am "
42070 "using the RHSrvAny service wrapper."
42074 #: ../tools/virt-win-reg.pl:703
42077 " cat > service.reg <<'EOF'\n"
42078 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
42079 " \"Type\"=dword:00000010\n"
42080 " \"Start\"=dword:00000002\n"
42081 " \"ErrorControl\"=dword:00000001\n"
42082 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
42083 " \"DisplayName\"=\"RHSrvAny\"\n"
42084 " \"ObjectName\"=\"NetworkService\"\n"
42089 #: ../tools/virt-win-reg.pl:712
42092 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
42093 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
42094 " \"PWD\"=\"c:\\\\Temp\"\n"
42100 #: ../tools/virt-win-reg.pl:723
42102 "For use of C<ControlSet001> see the section above in this manual page. You "
42103 "may need to adjust this according to the control set that is in use by the "
42108 #: ../tools/virt-win-reg.pl:729
42110 "C<\"ObjectName\"> controls the privileges that the service will have. An "
42111 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
42112 "privileged account."
42116 #: ../tools/virt-win-reg.pl:735
42118 "For the meaning of the magic numbers, see this Microsoft KB article: "
42119 "L<http://support.microsoft.com/kb/103000>."
42123 #: ../tools/virt-win-reg.pl:740
42124 msgid "Update the registry:"
42128 #: ../tools/virt-win-reg.pl:742
42131 " virt-win-reg --merge WindowsGuest service.reg\n"
42136 #: ../tools/virt-win-reg.pl:746
42138 "Be careful when passing parameters containing C<\\> (backslash) in the "
42139 "shell. Usually you will have to use 'single quotes' or double backslashes "
42140 "(but not both) to protect them from the shell."
42144 #: ../tools/virt-win-reg.pl:750
42145 msgid "Paths and value names are case-insensitive."
42149 #: ../tools/virt-win-reg.pl:759
42151 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
42152 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
42153 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
42154 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42158 #: ../tools/virt-win-reg.pl:777
42161 " export LIBGUESTFS_DEBUG=1\n"
42162 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
42167 #: ../tools/virt-win-reg.pl:780
42169 "Attach /tmp/virt-win-reg.log to a new bug report at "
42170 "L<https://bugzilla.redhat.com/>"