1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
6 # rjones <rjones@redhat.com>, 2011.
7 # <www.carrotsoft@gmail.com>, 2011.
10 "Project-Id-Version: libguestfs\n"
11 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
12 "POT-Creation-Date: 2011-11-09 22:24+0000\n"
13 "PO-Revision-Date: 2011-10-27 09:15+0000\n"
14 "Last-Translator: rjones <rjones@redhat.com>\n"
15 "Language-Team: Japanese <trans-ja@lists.fedoraproject.org>\n"
18 "Content-Type: text/plain; charset=UTF-8\n"
19 "Content-Transfer-Encoding: 8bit\n"
20 "Plural-Forms: nplurals=1; plural=0\n"
23 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3
24 #: ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3
25 #: ../clone/virt-sysprep.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3
26 #: ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3
27 #: ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3
28 #: ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3
29 #: ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3
30 #: ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3
31 #: ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3
32 #: ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3
33 #: ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3
34 #: ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3
35 #: ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3
36 #: ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30
37 #: ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31
38 #: ../tools/virt-win-reg.pl:35
43 #: ../align/virt-alignment-scan.pod:5
44 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
48 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7
49 #: ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7
50 #: ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7
51 #: ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7
52 #: ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7
53 #: ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7
54 #: ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7
55 #: ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7
56 #: ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7
57 #: ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7
58 #: ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7
59 #: ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7
60 #: ../test-tool/libguestfs-test-tool.pod:7
61 #: ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34
62 #: ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35
63 #: ../tools/virt-win-reg.pl:39
68 #: ../align/virt-alignment-scan.pod:9
71 " virt-alignment-scan [--options] -d domname\n"
76 #: ../align/virt-alignment-scan.pod:11
79 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
84 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19
85 #: ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19
86 #: ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27
87 #: ../erlang/examples/guestfs-erlang.pod:16
88 #: ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18
89 #: ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19
90 #: ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21
91 #: ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20
92 #: ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15
93 #: ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18
94 #: ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29
95 #: ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15
96 #: ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23
97 #: ../test-tool/libguestfs-test-tool.pod:11
98 #: ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40
99 #: ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77
100 #: ../tools/virt-win-reg.pl:63
105 #: ../align/virt-alignment-scan.pod:15
107 "When older operating systems install themselves, the partitioning tools "
108 "place partitions at a sector misaligned with the underlying storage "
109 "(commonly the first partition starts on sector C<63>). Misaligned "
110 "partitions can result in an operating system issuing more I/O than should be "
115 #: ../align/virt-alignment-scan.pod:21
117 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
118 "machines and disk images and warns you if there are alignment problems."
122 #: ../align/virt-alignment-scan.pod:25
124 "Currently there is no virt tool for fixing alignment problems. You can only "
125 "reinstall the guest operating system. The following NetApp document "
126 "summarises the problem and possible solutions: L<http://media.netapp.com/"
127 "documents/tr-3747.pdf>"
131 #: ../align/virt-alignment-scan.pod:30
136 #: ../align/virt-alignment-scan.pod:32
137 msgid "To run this tool on a disk image directly, use the I<-a> option:"
141 #: ../align/virt-alignment-scan.pod:34
144 " $ virt-alignment-scan -a winxp.img\n"
145 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
150 #: ../align/virt-alignment-scan.pod:37
153 " $ virt-alignment-scan -a fedora16.img\n"
154 " /dev/sda1 1048576 1024K ok\n"
155 " /dev/sda2 2097152 2048K ok\n"
156 " /dev/sda3 526385152 2048K ok\n"
161 #: ../align/virt-alignment-scan.pod:42
163 "To run the tool on a guest known to libvirt, use the I<-d> option and "
164 "possibly the I<-c> option:"
168 #: ../align/virt-alignment-scan.pod:45
171 " # virt-alignment-scan -d RHEL5\n"
172 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
173 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
178 #: ../align/virt-alignment-scan.pod:49
181 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
182 " /dev/sda1 1048576 1024K ok\n"
183 " /dev/sda2 105906176 1024K ok\n"
184 " /dev/sdb1 65536 64K ok\n"
189 #: ../align/virt-alignment-scan.pod:54
191 "The output consists of 4 or more whitespace-separated columns. Only the "
192 "first 4 columns are signficant if you want to parse this from a program. "
197 #: ../align/virt-alignment-scan.pod:60
202 #: ../align/virt-alignment-scan.pod:62
204 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
205 "on the first block device)"
209 #: ../align/virt-alignment-scan.pod:65
214 #: ../align/virt-alignment-scan.pod:67
215 msgid "the start of the partition in bytes"
219 #: ../align/virt-alignment-scan.pod:69
224 #: ../align/virt-alignment-scan.pod:71
225 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
229 #: ../align/virt-alignment-scan.pod:73
234 #: ../align/virt-alignment-scan.pod:75
236 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
237 "can cause performance problems"
241 #: ../align/virt-alignment-scan.pod:78
246 #: ../align/virt-alignment-scan.pod:80
247 msgid "optional free-text explanation."
251 #: ../align/virt-alignment-scan.pod:84
253 "The exit code from the program changes depending on whether poorly aligned "
254 "partitions were found. See L</EXIT STATUS> below."
258 #: ../align/virt-alignment-scan.pod:87
259 msgid "If you just want the exit code with no output, use the I<-q> option."
263 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62
264 #: ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261
265 #: ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62
266 #: ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45
267 #: ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42
268 #: ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92
269 #: ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84
270 #: ../resize/virt-resize.pod: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:351
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 consumer hard drive with 512 byte sectors:"
713 #: ../align/virt-alignment-scan.pod:234
716 " $ cat /sys/block/sda/queue/hw_sector_size\n"
718 " $ cat /sys/block/sda/queue/physical_block_size\n"
720 " $ cat /sys/block/sda/queue/logical_block_size\n"
722 " $ cat /sys/block/sda/queue/minimum_io_size\n"
724 " $ cat /sys/block/sda/queue/optimal_io_size\n"
730 #: ../align/virt-alignment-scan.pod:245
731 msgid "For a new consumer hard drive with 4Kbyte sectors:"
735 #: ../align/virt-alignment-scan.pod:247
738 " $ cat /sys/block/sda/queue/hw_sector_size\n"
740 " $ cat /sys/block/sda/queue/physical_block_size\n"
742 " $ cat /sys/block/sda/queue/logical_block_size\n"
744 " $ cat /sys/block/sda/queue/minimum_io_size\n"
746 " $ cat /sys/block/sda/queue/optimal_io_size\n"
752 #: ../align/virt-alignment-scan.pod:258
753 msgid "For a NetApp LUN:"
757 #: ../align/virt-alignment-scan.pod:260
760 " $ cat /sys/block/sdc/queue/logical_block_size\n"
762 " $ cat /sys/block/sdc/queue/physical_block_size\n"
764 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
766 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
772 #: ../align/virt-alignment-scan.pod:269
774 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
775 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
779 #: ../align/virt-alignment-scan.pod:273
781 "For detailed information about what these numbers mean, see L<http://docs."
782 "redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/"
783 "Storage_Administration_Guide/newstorage-iolimits.html>"
787 #: ../align/virt-alignment-scan.pod:276
789 "[Thanks to Matt Booth for providing 4K drive data. Thanks to Mike Snitzer "
790 "for providing NetApp data and additional information.]"
794 #: ../align/virt-alignment-scan.pod:279
795 msgid "1 MB PARTITION ALIGNMENT"
799 #: ../align/virt-alignment-scan.pod:281
801 "Microsoft picked 1 MB as the default alignment for all partitions starting "
802 "with Windows 2008 Server, and Linux has followed this."
806 #: ../align/virt-alignment-scan.pod:284
808 "Assuming 512 byte sectors in the guest, you will now see the first partition "
809 "starting at sector 2048, and subsequent partitions (if any) will start at a "
810 "multiple of 2048 sectors."
814 #: ../align/virt-alignment-scan.pod:288
816 "1 MB alignment is compatible with all current alignment requirements (4K, "
817 "64K) and provides room for future growth in physical block sizes."
821 #: ../align/virt-alignment-scan.pod:291
822 msgid "SETTING ALIGNMENT"
826 #: ../align/virt-alignment-scan.pod:293
828 "L<virt-resize(1)> can change the alignment of the partitions of some "
829 "guests. Currently it can fully align all the partitions of all Windows "
830 "guests, and it will fix the bootloader where necessary. For Linux guests, "
831 "it can align the second and subsequent partitions, so the majority of OS "
832 "accesses except at boot will be aligned."
836 #: ../align/virt-alignment-scan.pod:299
838 "Another way to correct partition alignment problems is to reinstall your "
839 "guest operating systems. If you install operating systems from templates, "
840 "ensure these have correct partition alignment too."
844 #: ../align/virt-alignment-scan.pod:303
846 "For older versions of Windows, the following NetApp document contains useful "
847 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
851 #: ../align/virt-alignment-scan.pod:306
853 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
854 "an explicit C<%pre> section that creates aligned partitions using L<parted(8)"
855 ">. Do not use the Kickstart C<part> command. The NetApp document above "
856 "contains an example."
860 #: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231
861 #: ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483
862 #: ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215
863 #: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367
864 #: ../rescue/virt-rescue.pod:266 ../resize/virt-resize.pod:676
865 #: ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258
866 #: ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289
867 #: ../tools/virt-win-reg.pl:744
868 msgid "SHELL QUOTING"
872 #: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233
873 #: ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485
874 #: ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217
875 #: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:369
876 #: ../rescue/virt-rescue.pod:268 ../resize/virt-resize.pod:678
877 #: ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260
878 #: ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291
879 #: ../tools/virt-win-reg.pl:752
881 "Libvirt guest names can contain arbitrary characters, some of which have "
882 "meaning to the shell such as C<#> and space. You may need to quote or "
883 "escape these characters on the command line. See the shell manual page L<sh"
888 #: ../align/virt-alignment-scan.pod:318 ../cat/virt-cat.pod:238
889 #: ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490
890 #: ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222
891 #: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114
892 #: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:390
893 #: ../resize/virt-resize.pod:683 ../sparsify/virt-sparsify.pod:227
894 #: ../test-tool/libguestfs-test-tool.pod:90
899 #: ../align/virt-alignment-scan.pod:320
900 msgid "This program returns:"
904 #: ../align/virt-alignment-scan.pod:324 ../align/virt-alignment-scan.pod:330
905 #: ../align/virt-alignment-scan.pod:336 ../align/virt-alignment-scan.pod:343
906 #: ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187
907 #: ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202
908 #: ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287
909 #: ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295
910 #: ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314
911 #: ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322
912 #: ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362
913 #: ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388
914 #: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266
915 #: ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276
916 #: ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291
917 #: ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102
918 #: ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132
919 #: ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227
920 #: ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235
921 #: ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243
922 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
923 #: ../fish/guestfish-actions.pod:441 ../fish/guestfish-actions.pod:449
924 #: ../fish/guestfish-actions.pod:456 ../fish/guestfish-actions.pod:463
925 #: ../fish/guestfish-actions.pod:1262 ../fish/guestfish-actions.pod:1266
926 #: ../fish/guestfish-actions.pod:1270 ../fish/guestfish-actions.pod:1274
927 #: ../fish/guestfish-actions.pod:1282 ../fish/guestfish-actions.pod:1286
928 #: ../fish/guestfish-actions.pod:1290 ../fish/guestfish-actions.pod:1300
929 #: ../fish/guestfish-actions.pod:1304 ../fish/guestfish-actions.pod:1308
930 #: ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:1402
931 #: ../fish/guestfish-actions.pod:1407 ../fish/guestfish-actions.pod:1412
932 #: ../fish/guestfish-actions.pod:1454 ../fish/guestfish-actions.pod:1458
933 #: ../fish/guestfish-actions.pod:1463 ../fish/guestfish-actions.pod:1719
934 #: ../fish/guestfish-actions.pod:1726 ../fish/guestfish-actions.pod:1733
935 #: ../fish/guestfish-actions.pod:2136 ../fish/guestfish-actions.pod:2142
936 #: ../fish/guestfish-actions.pod:2150 ../fish/guestfish-actions.pod:2157
937 #: ../fish/guestfish-actions.pod:2164 ../fish/guestfish.pod:445
938 #: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
939 #: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:408
940 #: ../inspector/virt-inspector.pod:412 ../resize/virt-resize.pod:359
941 #: ../resize/virt-resize.pod:363 ../resize/virt-resize.pod:372
942 #: ../resize/virt-resize.pod:378 ../sparsify/virt-sparsify.pod:32
943 #: ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43
944 #: ../sparsify/virt-sparsify.pod:49 ../sparsify/virt-sparsify.pod:54
945 #: ../sparsify/virt-sparsify.pod:58 ../sparsify/virt-sparsify.pod:64
946 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29
947 #: ../src/guestfs-actions.pod:641 ../src/guestfs-actions.pod:649
948 #: ../src/guestfs-actions.pod:656 ../src/guestfs-actions.pod:663
949 #: ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2083
950 #: ../src/guestfs-actions.pod:2087 ../src/guestfs-actions.pod:2091
951 #: ../src/guestfs-actions.pod:2099 ../src/guestfs-actions.pod:2103
952 #: ../src/guestfs-actions.pod:2107 ../src/guestfs-actions.pod:2117
953 #: ../src/guestfs-actions.pod:2121 ../src/guestfs-actions.pod:2125
954 #: ../src/guestfs-actions.pod:2263 ../src/guestfs-actions.pod:2267
955 #: ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:2277
956 #: ../src/guestfs-actions.pod:2338 ../src/guestfs-actions.pod:2342
957 #: ../src/guestfs-actions.pod:2347 ../src/guestfs-actions.pod:2762
958 #: ../src/guestfs-actions.pod:2769 ../src/guestfs-actions.pod:2776
959 #: ../src/guestfs-actions.pod:3321 ../src/guestfs-actions.pod:3327
960 #: ../src/guestfs-actions.pod:3335 ../src/guestfs-actions.pod:3342
961 #: ../src/guestfs-actions.pod:3349 ../src/guestfs.pod:403
962 #: ../src/guestfs.pod:408 ../src/guestfs.pod:413 ../src/guestfs.pod:417
963 #: ../src/guestfs.pod:422 ../src/guestfs.pod:426 ../src/guestfs.pod:431
964 #: ../src/guestfs.pod:436 ../src/guestfs.pod:1109 ../src/guestfs.pod:1113
965 #: ../src/guestfs.pod:1117 ../src/guestfs.pod:1122 ../src/guestfs.pod:1130
966 #: ../src/guestfs.pod:1149 ../src/guestfs.pod:1157 ../src/guestfs.pod:1179
967 #: ../src/guestfs.pod:1183 ../src/guestfs.pod:1187 ../src/guestfs.pod:1191
968 #: ../src/guestfs.pod:1195 ../src/guestfs.pod:1199 ../src/guestfs.pod:1689
969 #: ../src/guestfs.pod:1694 ../src/guestfs.pod:1698 ../src/guestfs.pod:1800
970 #: ../src/guestfs.pod:1805 ../src/guestfs.pod:1809 ../src/guestfs.pod:1819
971 #: ../src/guestfs.pod:2108 ../src/guestfs.pod:2113 ../src/guestfs.pod:2119
972 #: ../src/guestfs.pod:2127 ../src/guestfs.pod:2645 ../src/guestfs.pod:2651
973 #: ../src/guestfs.pod:2656 ../src/guestfs.pod:2662 ../src/guestfs.pod:3062
974 #: ../src/guestfs.pod:3067 ../src/guestfs.pod:3071 ../src/guestfs.pod:3075
975 #: ../src/guestfs.pod:3079 ../src/guestfs.pod:3093 ../src/guestfs.pod:3098
976 #: ../src/guestfs.pod:3329 ../src/guestfs.pod:3333 ../src/guestfs.pod:3337
977 #: ../src/guestfs.pod:3341 ../tools/virt-win-reg.pl:197
978 #: ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208
979 #: ../tools/virt-win-reg.pl:721 ../tools/virt-win-reg.pl:727
980 #: ../tools/virt-win-reg.pl:733
985 #: ../align/virt-alignment-scan.pod:326
990 #: ../align/virt-alignment-scan.pod:328
992 "successful exit, all partitions are aligned E<ge> 64K for best performance"
996 #: ../align/virt-alignment-scan.pod:332
1001 #: ../align/virt-alignment-scan.pod:334
1002 msgid "an error scanning the disk image or guest"
1006 #: ../align/virt-alignment-scan.pod:338
1011 #: ../align/virt-alignment-scan.pod:340
1013 "successful exit, some partitions have alignment E<lt> 64K which can result "
1014 "in poor performance on high end network storage"
1018 #: ../align/virt-alignment-scan.pod:345
1023 #: ../align/virt-alignment-scan.pod:347
1025 "successful exit, some partitions have alignment E<lt> 4K which can result in "
1026 "poor performance on most hypervisors"
1030 #: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243
1031 #: ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495
1032 #: ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:227
1033 #: ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97
1034 #: ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384
1035 #: ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50
1036 #: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47
1037 #: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317
1038 #: ../inspector/virt-inspector.pod:395 ../java/examples/guestfs-java.pod:45
1039 #: ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39
1040 #: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288
1041 #: ../resize/virt-resize.pod:688 ../ruby/examples/guestfs-ruby.pod:36
1042 #: ../sparsify/virt-sparsify.pod:251 ../src/guestfs.pod:3270
1043 #: ../test-tool/libguestfs-test-tool.pod:100
1044 #: ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265
1045 #: ../tools/virt-make-fs.pl:557 ../tools/virt-tar.pl:296
1046 #: ../tools/virt-win-reg.pl:757
1051 #: ../align/virt-alignment-scan.pod:354
1053 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
1054 "L<virt-resize(1)>, L<http://libguestfs.org/>."
1058 #: ../align/virt-alignment-scan.pod:361 ../cat/virt-cat.pod:252
1059 #: ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:507
1060 #: ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:235
1061 #: ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:296
1062 #: ../resize/virt-resize.pod:711 ../sparsify/virt-sparsify.pod:264
1063 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277
1064 #: ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:311
1065 #: ../tools/virt-win-reg.pl:783
1070 #: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254
1071 #: ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509
1072 #: ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237
1073 #: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410
1074 #: ../rescue/virt-rescue.pod:298 ../resize/virt-resize.pod:713
1075 #: ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210
1076 #: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584
1077 #: ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
1078 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
1082 #: ../align/virt-alignment-scan.pod:365 ../cat/virt-cat.pod:256
1083 #: ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511
1084 #: ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:239
1085 #: ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114
1086 #: ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401
1087 #: ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64
1088 #: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62
1089 #: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332
1090 #: ../inspector/virt-inspector.pod:418 ../java/examples/guestfs-java.pod:62
1091 #: ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56
1092 #: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300
1093 #: ../resize/virt-resize.pod:715 ../ruby/examples/guestfs-ruby.pod:52
1094 #: ../sparsify/virt-sparsify.pod:268 ../src/guestfs.pod:3352
1095 #: ../test-tool/libguestfs-test-tool.pod:110
1096 #: ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281
1097 #: ../tools/virt-make-fs.pl:586 ../tools/virt-tar.pl:315
1098 #: ../tools/virt-win-reg.pl:787
1103 #: ../align/virt-alignment-scan.pod:367 ../clone/virt-sysprep.pod:507
1104 #: ../sparsify/virt-sparsify.pod:270
1105 msgid "Copyright (C) 2011 Red Hat Inc."
1109 #: ../align/virt-alignment-scan.pod:369 ../cat/virt-cat.pod:260
1110 #: ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515
1111 #: ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:243
1112 #: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305
1113 #: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58
1114 #: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60
1115 #: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:422
1116 #: ../rescue/virt-rescue.pod:304 ../resize/virt-resize.pod:719
1117 #: ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115
1118 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
1119 #: ../tools/virt-make-fs.pl:590 ../tools/virt-tar.pl:319
1120 #: ../tools/virt-win-reg.pl:791
1122 "This program is free software; you can redistribute it and/or modify it "
1123 "under the terms of the GNU General Public License as published by the Free "
1124 "Software Foundation; either version 2 of the License, or (at your option) "
1125 "any later version."
1129 #: ../align/virt-alignment-scan.pod:374 ../cat/virt-cat.pod:265
1130 #: ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520
1131 #: ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:248
1132 #: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310
1133 #: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63
1134 #: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65
1135 #: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:427
1136 #: ../rescue/virt-rescue.pod:309 ../resize/virt-resize.pod:724
1137 #: ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120
1138 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
1139 #: ../tools/virt-make-fs.pl:595 ../tools/virt-tar.pl:324
1140 #: ../tools/virt-win-reg.pl:796
1142 "This program is distributed in the hope that it will be useful, but WITHOUT "
1143 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
1144 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
1149 #: ../align/virt-alignment-scan.pod:379 ../cat/virt-cat.pod:270
1150 #: ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525
1151 #: ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:253
1152 #: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315
1153 #: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68
1154 #: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70
1155 #: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:432
1156 #: ../rescue/virt-rescue.pod:314 ../resize/virt-resize.pod:729
1157 #: ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125
1158 #: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
1159 #: ../tools/virt-make-fs.pl:600 ../tools/virt-tar.pl:329
1160 #: ../tools/virt-win-reg.pl:801
1162 "You should have received a copy of the GNU General Public License along with "
1163 "this program; if not, write to the Free Software Foundation, Inc., 51 "
1164 "Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
1168 #: ../cat/virt-cat.pod:5
1169 msgid "virt-cat - Display files in a virtual machine"
1173 #: ../cat/virt-cat.pod:9
1176 " virt-cat [--options] -d domname file [file ...]\n"
1181 #: ../cat/virt-cat.pod:11
1184 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
1189 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15
1190 #: ../inspector/virt-inspector.pod:13
1195 #: ../cat/virt-cat.pod:15
1198 " virt-cat domname file\n"
1203 #: ../cat/virt-cat.pod:17
1206 " virt-cat disk.img file\n"
1211 #: ../cat/virt-cat.pod:21
1213 "C<virt-cat> is a command line tool to display the contents of C<file> where "
1214 "C<file> exists in the named virtual machine (or disk image)."
1218 #: ../cat/virt-cat.pod:24
1220 "Multiple filenames can be given, in which case they are concatenated "
1221 "together. Each filename must be a full path, starting at the root directory "
1222 "(starting with '/')."
1226 #: ../cat/virt-cat.pod:28
1228 "C<virt-cat> can be used to quickly view a file. To edit a file, use C<virt-"
1229 "edit>. For more complex cases you should look at the L<guestfish(1)> tool "
1230 "(see L</USING GUESTFISH> below)."
1234 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43
1235 #: ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41
1236 #: ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29
1237 #: ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30
1238 #: ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39
1239 #: ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75
1240 #: ../tools/virt-tar.pl:50
1245 #: ../cat/virt-cat.pod:34
1247 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
1251 #: ../cat/virt-cat.pod:37
1254 " virt-cat -d mydomain /etc/fstab\n"
1259 #: ../cat/virt-cat.pod:39
1260 msgid "List syslog messages from a VM disk image file:"
1264 #: ../cat/virt-cat.pod:41
1267 " virt-cat -a disk.img /var/log/messages | tail\n"
1272 #: ../cat/virt-cat.pod:43
1273 msgid "Find out what DHCP IP address a VM acquired:"
1277 #: ../cat/virt-cat.pod:45
1280 " virt-cat -d mydomain /var/log/messages | \\\n"
1281 " grep 'dhclient: bound to' | tail\n"
1286 #: ../cat/virt-cat.pod:48
1287 msgid "Find out what packages were recently installed:"
1291 #: ../cat/virt-cat.pod:50
1294 " virt-cat -d mydomain /var/log/yum.log | tail\n"
1299 #: ../cat/virt-cat.pod:52
1300 msgid "Find out who is logged on inside a virtual machine:"
1304 #: ../cat/virt-cat.pod:54
1307 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
1313 #: ../cat/virt-cat.pod:57
1314 msgid "or who was logged on:"
1318 #: ../cat/virt-cat.pod:59
1321 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
1322 " last -f /tmp/wtmp\n"
1327 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103
1328 #: ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74
1329 #: ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
1331 "Add I<file> which should be a disk image from a virtual machine. If the "
1332 "virtual machine has multiple block devices, you must supply all of them with "
1333 "separate I<-a> options."
1337 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148
1338 #: ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217
1339 #: ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
1340 msgid "B<--echo-keys>"
1344 #: ../cat/virt-cat.pod:100
1346 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
1347 "so you cannot see what you are typing. If you are not worried about Tempest "
1348 "attacks and there is no one else in the room you can specify this flag to "
1349 "see what you are typing."
1353 #: ../cat/virt-cat.pod:116
1356 " virt-cat --format=raw -a disk.img file\n"
1361 #: ../cat/virt-cat.pod:120
1364 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
1369 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200
1370 #: ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289
1371 #: ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
1372 msgid "B<--keys-from-stdin>"
1376 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202
1377 #: ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291
1378 #: ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1380 "Read key or passphrase parameters from stdin. The default is to try to read "
1381 "passphrases from the user by opening C</dev/tty>."
1385 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
1386 #: ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:209
1387 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1391 #: ../cat/virt-cat.pod:154
1392 msgid "Previous versions of virt-cat allowed you to write either:"
1396 #: ../cat/virt-cat.pod:156
1399 " virt-cat disk.img [disk.img ...] file\n"
1404 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
1405 #: ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:215
1410 #: ../cat/virt-cat.pod:160
1413 " virt-cat guestname file\n"
1418 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
1419 #: ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:219
1421 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1422 "the confusing case where a disk image might have the same name as a guest."
1426 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
1427 #: ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:223
1428 msgid "For compatibility the old style is still supported."
1432 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
1433 msgid "WINDOWS PATHS"
1437 #: ../cat/virt-cat.pod:170
1439 "C<virt-cat> has a limited ability to understand Windows drive letters and "
1440 "paths (eg. C<E:\\foo\\bar.txt>)."
1444 #: ../cat/virt-cat.pod:173 ../edit/virt-edit.pod:262
1445 msgid "If and only if the guest is running Windows then:"
1449 #: ../cat/virt-cat.pod:179 ../edit/virt-edit.pod:268
1451 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
1452 "to the correct filesystem."
1456 #: ../cat/virt-cat.pod:184 ../edit/virt-edit.pod:273
1458 "Any backslash (C<\\>) characters in the path are replaced with forward "
1459 "slashes so that libguestfs can process it."
1463 #: ../cat/virt-cat.pod:189
1465 "The path is resolved case insensitively to locate the file that should be "
1470 #: ../cat/virt-cat.pod:194 ../edit/virt-edit.pod:283
1471 msgid "There are some known shortcomings:"
1475 #: ../cat/virt-cat.pod:200 ../edit/virt-edit.pod:289
1476 msgid "Some NTFS symbolic links may not be followed correctly."
1480 #: ../cat/virt-cat.pod:204 ../edit/virt-edit.pod:293
1481 msgid "NTFS junction points that cross filesystems are not followed."
1485 #: ../cat/virt-cat.pod:208 ../edit/virt-edit.pod:297
1486 msgid "USING GUESTFISH"
1490 #: ../cat/virt-cat.pod:210
1492 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1493 "C<virt-cat> doesn't work."
1497 #: ../cat/virt-cat.pod:213
1498 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1502 #: ../cat/virt-cat.pod:215
1505 " guestfish --ro -i -d domname download file -\n"
1510 #: ../cat/virt-cat.pod:217
1512 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1513 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1517 #: ../cat/virt-cat.pod:221
1519 "The command above uses libguestfs's guest inspection feature and so does not "
1520 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1521 "disk images that don't contain guests. To display a file from a disk image "
1526 #: ../cat/virt-cat.pod:226
1529 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1534 #: ../cat/virt-cat.pod:228
1536 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1537 "the disk image, and C<file> is the full path to the file."
1541 #: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382
1542 #: ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351
1543 #: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392
1544 #: ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:229
1546 "This program returns 0 if successful, or non-zero if there was an error."
1550 #: ../cat/virt-cat.pod:245
1552 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, L<virt-"
1553 "tar-out(1)>, L<http://libguestfs.org/>."
1557 #: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:420
1558 #: ../resize/virt-resize.pod:717 ../tools/virt-make-fs.pl:588
1559 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1563 #: ../cat/virt-filesystems.pod:5
1565 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1566 "virtual machine or disk image"
1570 #: ../cat/virt-filesystems.pod:9
1573 " virt-filesystems [--options] -d domname\n"
1578 #: ../cat/virt-filesystems.pod:11
1581 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1586 #: ../cat/virt-filesystems.pod:15
1588 "This tool allows you to discover filesystems, partitions, logical volumes, "
1589 "and their sizes in a disk image or virtual machine. It is a replacement for "
1590 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1594 #: ../cat/virt-filesystems.pod:20
1596 "One use for this tool is from shell scripts to iterate over all filesystems "
1597 "from a disk image:"
1601 #: ../cat/virt-filesystems.pod:23
1604 " for fs in $(virt-filesystems -a disk.img); do\n"
1611 #: ../cat/virt-filesystems.pod:27
1613 "Another use is to list partitions before using another tool to modify those "
1614 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1615 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1619 #: ../cat/virt-filesystems.pod:32
1621 "Various command line options control what this program displays. You need "
1622 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1623 "guest respectively. If you just specify that then the program shows "
1624 "filesystems found, one per line, like this:"
1628 #: ../cat/virt-filesystems.pod:37
1631 " $ virt-filesystems -a disk.img\n"
1633 " /dev/vg_guest/lv_root\n"
1638 #: ../cat/virt-filesystems.pod:41
1640 "If you add I<-l> or I<--long> then the output includes extra information:"
1644 #: ../cat/virt-filesystems.pod:44
1647 " $ virt-filesystems -a disk.img -l\n"
1648 " Name Type VFS Label Size\n"
1649 " /dev/sda1 filesystem ext4 boot 524288000\n"
1650 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1655 #: ../cat/virt-filesystems.pod:49
1657 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1662 #: ../cat/virt-filesystems.pod:52
1665 " $ virt-filesystems -a disk.img --extra\n"
1667 " /dev/vg_guest/lv_root\n"
1668 " /dev/vg_guest/lv_swap\n"
1669 " /dev/vg_guest/lv_data\n"
1674 #: ../cat/virt-filesystems.pod:58
1676 "If you add I<--partitions> then partitions are shown instead of filesystems:"
1680 #: ../cat/virt-filesystems.pod:60
1683 " $ virt-filesystems -a disk.img --partitions\n"
1690 #: ../cat/virt-filesystems.pod:64
1692 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, I<--physical-"
1693 "volumes>, I<--block-devices> to list those items."
1697 #: ../cat/virt-filesystems.pod:67
1699 "You can use these options in combination as well (if you want a combination "
1700 "including filesystems, you have to add I<--filesystems>). Notice that some "
1701 "items fall into several categories (eg. C</dev/sda1> might be both a "
1702 "partition and a filesystem). These items are listed several times. To get "
1703 "a list which includes absolutely everything that virt-filesystems knows "
1704 "about, use the I<--all> option."
1708 #: ../cat/virt-filesystems.pod:74
1710 "UUIDs (because they are quite long) are not shown by default. Add the I<--"
1711 "uuid> option to display device and filesystem UUIDs in the long output."
1715 #: ../cat/virt-filesystems.pod:78
1717 "I<--all --long --uuid> is a useful combination to display all possible "
1718 "information about everything."
1722 #: ../cat/virt-filesystems.pod:81
1725 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1726 " Name Type VFS Label Size Parent UUID\n"
1727 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1728 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1729 " /dev/sda1 partition - - 100M /dev/sda -\n"
1730 " /dev/sda2 partition - - 20G /dev/sda -\n"
1731 " /dev/sda device - - 20G - -\n"
1736 #: ../cat/virt-filesystems.pod:89
1738 "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1742 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1747 #: ../cat/virt-filesystems.pod:112
1749 "Display everything. This is currently the same as specifying these options: "
1750 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, I<--"
1751 "logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may be "
1752 "added to this list in future)."
1756 #: ../cat/virt-filesystems.pod:117
1757 msgid "See also I<--long>."
1761 #: ../cat/virt-filesystems.pod:119
1762 msgid "B<--blkdevs>"
1766 #: ../cat/virt-filesystems.pod:121
1767 msgid "B<--block-devices>"
1771 #: ../cat/virt-filesystems.pod:123
1772 msgid "Display block devices."
1776 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1781 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1783 "Write out the results in CSV format (comma-separated values). This format "
1784 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1785 "ABOUT CSV FORMAT> below."
1789 #: ../cat/virt-filesystems.pod:150
1791 "When prompting for keys and passphrases, virt-filesystems normally turns "
1792 "echoing off so you cannot see what you are typing. If you are not worried "
1793 "about Tempest attacks and there is no one else in the room you can specify "
1794 "this flag to see what you are typing."
1798 #: ../cat/virt-filesystems.pod:155
1803 #: ../cat/virt-filesystems.pod:157
1805 "This causes filesystems that are not ordinary, mountable filesystems to be "
1806 "displayed. This category includes swapspace, and filesystems that are empty "
1807 "or contain unknown data."
1811 #: ../cat/virt-filesystems.pod:161
1812 msgid "This option implies I<--filesystems>."
1816 #: ../cat/virt-filesystems.pod:163
1817 msgid "B<--filesystems>"
1821 #: ../cat/virt-filesystems.pod:165
1823 "Display mountable filesystems. If no display option was selected then this "
1824 "option is implied."
1828 #: ../cat/virt-filesystems.pod:168
1829 msgid "With I<--extra>, non-mountable filesystems are shown too."
1833 #: ../cat/virt-filesystems.pod:181
1836 " virt-filesystems --format=raw -a disk.img\n"
1841 #: ../cat/virt-filesystems.pod:185
1844 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1849 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352
1850 #: ../df/virt-df.pod:125 ../fish/guestfish.pod:156
1851 #: ../tools/virt-list-partitions.pl:109
1856 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354
1857 #: ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1858 msgid "B<--human-readable>"
1862 #: ../cat/virt-filesystems.pod:198
1863 msgid "In I<--long> mode, display sizes in human-readable format."
1867 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366
1868 #: ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1873 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368
1874 #: ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1879 #: ../cat/virt-filesystems.pod:209
1880 msgid "Display extra columns of data (\"long format\")."
1884 #: ../cat/virt-filesystems.pod:211
1885 msgid "A title row is added unless you also specify I<--no-title>."
1889 #: ../cat/virt-filesystems.pod:213
1891 "The extra columns displayed depend on what output you select, and the "
1892 "ordering of columns may change in future versions. Use the title row, I<--"
1893 "csv> output and/or L<csvtool(1)> to match columns to data in external "
1898 #: ../cat/virt-filesystems.pod:218
1900 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1901 "default is to show raw numbers of I<bytes>."
1905 #: ../cat/virt-filesystems.pod:221
1906 msgid "Use I<--uuid> to display UUIDs too."
1910 #: ../cat/virt-filesystems.pod:223
1915 #: ../cat/virt-filesystems.pod:225
1916 msgid "B<--logvols>"
1920 #: ../cat/virt-filesystems.pod:227
1921 msgid "B<--logical-volumes>"
1925 #: ../cat/virt-filesystems.pod:229
1927 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1928 "of whether the LVs contain filesystems."
1932 #: ../cat/virt-filesystems.pod:232
1933 msgid "B<--no-title>"
1937 #: ../cat/virt-filesystems.pod:234
1938 msgid "In I<--long> mode, don't add a title row."
1942 #: ../cat/virt-filesystems.pod:236
1944 "Note that the order of the columns is not fixed, and may change in future "
1945 "versions of virt-filesystems, so using this option may give you unexpected "
1950 #: ../cat/virt-filesystems.pod:240
1955 #: ../cat/virt-filesystems.pod:242
1956 msgid "B<--partitions>"
1960 #: ../cat/virt-filesystems.pod:244
1962 "Display partitions. In this mode, these are displayed irrespective of "
1963 "whether the partitions contain filesystems."
1967 #: ../cat/virt-filesystems.pod:247
1972 #: ../cat/virt-filesystems.pod:249
1973 msgid "B<--physvols>"
1977 #: ../cat/virt-filesystems.pod:251
1978 msgid "B<--physical-volumes>"
1982 #: ../cat/virt-filesystems.pod:253
1983 msgid "Display LVM physical volumes."
1987 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1992 #: ../cat/virt-filesystems.pod:257
1997 #: ../cat/virt-filesystems.pod:259
1998 msgid "In I<--long> mode, display UUIDs as well."
2002 #: ../cat/virt-filesystems.pod:273
2007 #: ../cat/virt-filesystems.pod:275
2008 msgid "B<--volgroups>"
2012 #: ../cat/virt-filesystems.pod:277
2013 msgid "B<--volume-groups>"
2017 #: ../cat/virt-filesystems.pod:279
2018 msgid "Display LVM volume groups."
2022 #: ../cat/virt-filesystems.pod:287
2027 #: ../cat/virt-filesystems.pod:289
2029 "Note that columns in the output are subject to reordering and change in "
2030 "future versions of this tool."
2034 #: ../cat/virt-filesystems.pod:294
2039 #: ../cat/virt-filesystems.pod:296
2040 msgid "The filesystem, partition, block device or LVM name."
2044 #: ../cat/virt-filesystems.pod:298
2046 "For device and partition names these are displayed as canonical libguestfs "
2047 "names, so that for example C</dev/sda2> is the second partition on the first "
2052 #: ../cat/virt-filesystems.pod:302
2054 "If the I<--long> option is B<not> specified, then only the name column is "
2055 "shown in the output."
2059 #: ../cat/virt-filesystems.pod:305
2064 #: ../cat/virt-filesystems.pod:307
2065 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
2069 #: ../cat/virt-filesystems.pod:309
2074 #: ../cat/virt-filesystems.pod:311
2076 "If there is a filesystem, then this column displays the filesystem type if "
2077 "one could be detected, eg. C<ext4>."
2081 #: ../cat/virt-filesystems.pod:314
2086 #: ../cat/virt-filesystems.pod:316
2088 "If the object has a label (used for identifying and mounting filesystems) "
2089 "then this column contains the label."
2093 #: ../cat/virt-filesystems.pod:319
2098 #: ../cat/virt-filesystems.pod:321
2100 "The partition type byte, displayed as a two digit hexadecimal number. A "
2101 "comprehensive list of partition types can be found here: L<http://www.win."
2102 "tue.nl/~aeb/partitions/partition_types-1.html>"
2106 #: ../cat/virt-filesystems.pod:325
2107 msgid "This is only applicable for DOS (MBR) partitions."
2111 #: ../cat/virt-filesystems.pod:327
2116 #: ../cat/virt-filesystems.pod:329
2118 "The size of the object in bytes. If the I<--human> option is used then the "
2119 "size is displayed in a human-readable form."
2123 #: ../cat/virt-filesystems.pod:332
2128 #: ../cat/virt-filesystems.pod:334
2130 "The parent column records the parent relationship between objects. For "
2131 "example, if the object is a partition, then this column contains the name of "
2132 "the containing device. If the object is a logical volume, then this column "
2133 "is the name of the volume group."
2137 #: ../cat/virt-filesystems.pod:339
2142 #: ../cat/virt-filesystems.pod:341
2144 "If the object has a UUID (used for identifying and mounting filesystems and "
2145 "block devices) then this column contains the UUID as a string."
2149 #: ../cat/virt-filesystems.pod:345
2150 msgid "The UUID is only displayed if the I<--uuid> option is given."
2154 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:459
2155 #: ../df/virt-df.pod:191
2156 msgid "NOTE ABOUT CSV FORMAT"
2160 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:461
2161 #: ../df/virt-df.pod:193
2163 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
2164 "should be easy to parse, but it is definitely not easy to parse."
2168 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:464
2169 #: ../df/virt-df.pod:196
2171 "Myth: Just split fields at commas. Reality: This does I<not> work "
2172 "reliably. This example has two columns:"
2176 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:467
2177 #: ../df/virt-df.pod:199
2180 " \"foo,bar\",baz\n"
2185 #: ../cat/virt-filesystems.pod:359 ../cat/virt-ls.pod:469
2186 #: ../df/virt-df.pod:201
2188 "Myth: Read the file one line at a time. Reality: This does I<not> work "
2189 "reliably. This example has one row:"
2193 #: ../cat/virt-filesystems.pod:362 ../cat/virt-ls.pod:472
2194 #: ../df/virt-df.pod:204
2203 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:475
2204 #: ../df/virt-df.pod:207
2206 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
2207 "packaged in major Linux distributions)."
2211 #: ../cat/virt-filesystems.pod:368 ../cat/virt-ls.pod:478
2212 #: ../df/virt-df.pod:210
2214 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
2215 "or Python's built-in csv library)."
2219 #: ../cat/virt-filesystems.pod:371 ../cat/virt-ls.pod:481
2220 #: ../df/virt-df.pod:213
2221 msgid "Most spreadsheets and databases can import CSV directly."
2225 #: ../cat/virt-filesystems.pod:387
2227 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-list-"
2228 "filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, L<http://"
2233 #: ../cat/virt-filesystems.pod:402 ../tools/virt-win-reg.pl:789
2234 msgid "Copyright (C) 2010 Red Hat Inc."
2238 #: ../cat/virt-ls.pod:5
2239 msgid "virt-ls - List files in a virtual machine"
2243 #: ../cat/virt-ls.pod:9
2246 " virt-ls [--options] -d domname directory [directory ...]\n"
2251 #: ../cat/virt-ls.pod:11
2254 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory ...]\n"
2259 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
2264 #: ../cat/virt-ls.pod:15
2267 " virt-ls [--options] domname directory\n"
2272 #: ../cat/virt-ls.pod:17
2275 " virt-ls [--options] disk.img [disk.img ...] directory\n"
2280 #: ../cat/virt-ls.pod:21
2282 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
2283 "more from a virtual machine or disk image."
2287 #: ../cat/virt-ls.pod:24
2289 "Multiple directory names can be given, in which case the output from each is "
2294 #: ../cat/virt-ls.pod:27
2296 "To list directories from a libvirt guest use the I<-d> option to specify the "
2297 "name of the guest. For a disk image, use the I<-a> option."
2301 #: ../cat/virt-ls.pod:31
2303 "C<virt-ls> can do many simple file listings. For more complicated cases you "
2304 "may need to use L<guestfish(1)>, or write a program directly to the L<guestfs"
2309 #: ../cat/virt-ls.pod:37
2310 msgid "Get a list of all files and directories in a virtual machine:"
2314 #: ../cat/virt-ls.pod:39
2317 " virt-ls -R -d guest /\n"
2322 #: ../cat/virt-ls.pod:41
2323 msgid "List all setuid or setgid programs in a Linux virtual machine:"
2327 #: ../cat/virt-ls.pod:43
2330 " virt-ls -lR -d guest / | grep '^- [42]'\n"
2335 #: ../cat/virt-ls.pod:45
2336 msgid "List all public-writable directories in a Linux virtual machine:"
2340 #: ../cat/virt-ls.pod:47
2343 " virt-ls -lR -d guest / | grep '^d ...7'\n"
2348 #: ../cat/virt-ls.pod:49
2349 msgid "List all Unix domain sockets in a Linux virtual machine:"
2353 #: ../cat/virt-ls.pod:51
2356 " virt-ls -lR -d guest / | grep '^s'\n"
2361 #: ../cat/virt-ls.pod:53
2362 msgid "List all regular files with filenames ending in '.png':"
2366 #: ../cat/virt-ls.pod:55
2369 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
2374 #: ../cat/virt-ls.pod:57
2375 msgid "To display files larger than 10MB in home directories:"
2379 #: ../cat/virt-ls.pod:59
2382 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
2387 #: ../cat/virt-ls.pod:61
2388 msgid "Find everything modified in the last 7 days:"
2392 #: ../cat/virt-ls.pod:63
2395 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
2400 #: ../cat/virt-ls.pod:65
2401 msgid "Find regular files modified in the last 24 hours:"
2405 #: ../cat/virt-ls.pod:67
2408 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2413 #: ../cat/virt-ls.pod:69
2414 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2418 #: ../cat/virt-ls.pod:71
2420 "Find the differences between files in a guest and an earlier snapshot of the "
2425 #: ../cat/virt-ls.pod:74
2428 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2429 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2430 " diff -u old new | less\n"
2435 #: ../cat/virt-ls.pod:78
2437 "The commands above won't find files where the content has changed but the "
2438 "metadata (eg. file size and modification date) is the same. To do that, you "
2439 "need to add the I<--checksum> parameter to both C<virt-ls> commands. I<--"
2440 "checksum> can be quite slow since it has to read and compute a checksum of "
2441 "every regular file in the virtual machine."
2445 #: ../cat/virt-ls.pod:84
2446 msgid "OUTPUT MODES"
2450 #: ../cat/virt-ls.pod:86
2452 "C<virt-ls> has four output modes, controlled by different combinations of "
2453 "the I<-l> and I<-R> options."
2457 #: ../cat/virt-ls.pod:89
2458 msgid "SIMPLE LISTING"
2462 #: ../cat/virt-ls.pod:91
2463 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2467 #: ../cat/virt-ls.pod:93
2470 " $ virt-ls -d guest /\n"
2478 #: ../cat/virt-ls.pod:98
2479 msgid "LONG LISTING"
2483 #: ../cat/virt-ls.pod:100
2485 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2486 "(more specifically, like the C<guestfs_ll> function)."
2490 #: ../cat/virt-ls.pod:103
2493 " $ virt-ls -l -d guest /\n"
2495 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2496 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2502 #: ../cat/virt-ls.pod:109
2504 "Note that while this is useful for displaying a directory, do not try "
2505 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2510 #: ../cat/virt-ls.pod:113
2511 msgid "RECURSIVE LISTING"
2515 #: ../cat/virt-ls.pod:115
2517 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2518 "and directories recursively:"
2522 #: ../cat/virt-ls.pod:118
2525 " $ virt-ls -R -d guest /tmp\n"
2533 #: ../cat/virt-ls.pod:123
2535 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2536 "converts C<\\0> characters to C<\\n>."
2540 #: ../cat/virt-ls.pod:126
2541 msgid "RECURSIVE LONG LISTING"
2545 #: ../cat/virt-ls.pod:128
2547 "Using I<-lR> options together changes the output to display directories "
2548 "recursively, with file stats, and optionally other features such as "
2549 "checksums and extended attributes."
2553 #: ../cat/virt-ls.pod:132
2555 "Most of the interesting features of C<virt-ls> are only available when using "
2560 #: ../cat/virt-ls.pod:135
2562 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2563 "you cannot use the output in another program (because filenames can contain "
2564 "spaces and other unsafe characters). If the guest was untrusted and someone "
2565 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2566 "on you by creating filenames with embedded newline characters. To B<safely> "
2567 "parse the output in another program, use the I<--csv> (Comma-Separated "
2572 #: ../cat/virt-ls.pod:143
2574 "Note that this output format is completely unrelated to the C<ls -lR> "
2579 #: ../cat/virt-ls.pod:146
2582 " $ virt-ls -lR -d guest /bin\n"
2583 " d 0555 4096 /bin\n"
2584 " - 0755 123 /bin/alsaunmute\n"
2585 " - 0755 28328 /bin/arch\n"
2586 " l 0777 4 /bin/awk -> gawk\n"
2587 " - 0755 27216 /bin/basename\n"
2588 " - 0755 943360 /bin/bash\n"
2594 #: ../cat/virt-ls.pod:155
2595 msgid "These basic fields are always shown:"
2599 #: ../cat/virt-ls.pod:159
2604 #: ../cat/virt-ls.pod:161
2606 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2607 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2608 "link), C<s> (socket) or C<u> (unknown)."
2612 #: ../cat/virt-ls.pod:171
2617 #: ../cat/virt-ls.pod:173
2618 msgid "The Unix permissions, displayed as a 4 digit octal number."
2622 #: ../cat/virt-ls.pod:175
2627 #: ../cat/virt-ls.pod:177
2629 "The size of the file. This is shown in bytes unless I<-h> or I<--human-"
2630 "readable> option is given, in which case this is shown as a human-readable "
2635 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4380
2640 #: ../cat/virt-ls.pod:183
2641 msgid "The full path of the file or directory."
2645 #: ../cat/virt-ls.pod:185
2650 #: ../cat/virt-ls.pod:187
2651 msgid "For symbolic links only, the link target."
2655 #: ../cat/virt-ls.pod:191
2657 "In I<-lR> mode, additional command line options enable the display of more "
2662 #: ../cat/virt-ls.pod:194
2664 "With the I<--uids> flag, these additional fields are displayed before the "
2669 #: ../cat/virt-ls.pod:199
2674 #: ../cat/virt-ls.pod:201
2679 #: ../cat/virt-ls.pod:203
2681 "The UID and GID of the owner of the file (displayed numerically). Note "
2682 "these only make sense in the context of a Unix-like guest."
2686 #: ../cat/virt-ls.pod:208
2687 msgid "With the I<--times> flag, these additional fields are displayed:"
2691 #: ../cat/virt-ls.pod:212
2696 #: ../cat/virt-ls.pod:214
2697 msgid "The time of last access."
2701 #: ../cat/virt-ls.pod:216
2706 #: ../cat/virt-ls.pod:218
2707 msgid "The time of last modification."
2711 #: ../cat/virt-ls.pod:220
2716 #: ../cat/virt-ls.pod:222
2717 msgid "The time of last status change."
2721 #: ../cat/virt-ls.pod:226
2723 "The time fields are displayed as string dates and times, unless one of the "
2724 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2728 #: ../cat/virt-ls.pod:229
2729 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2733 #: ../cat/virt-ls.pod:233
2738 #: ../cat/virt-ls.pod:235
2740 "The device containing the file (displayed as major:minor). This may not "
2741 "match devices as known to the guest."
2745 #: ../cat/virt-ls.pod:238
2750 #: ../cat/virt-ls.pod:240
2751 msgid "The inode number."
2755 #: ../cat/virt-ls.pod:242
2760 #: ../cat/virt-ls.pod:244
2761 msgid "The number of hard links."
2765 #: ../cat/virt-ls.pod:246
2770 #: ../cat/virt-ls.pod:248
2772 "For block and char special files, the device (displayed as major:minor)."
2776 #: ../cat/virt-ls.pod:251
2781 #: ../cat/virt-ls.pod:253
2782 msgid "The number of 512 byte blocks allocated to the file."
2786 #: ../cat/virt-ls.pod:257
2788 "With the I<--checksum> flag, the checksum of the file contents is shown "
2789 "(only for regular files). Computing file checksums can take a considerable "
2794 #: ../cat/virt-ls.pod:280
2795 msgid "B<--checksum>"
2799 #: ../cat/virt-ls.pod:282
2800 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2804 #: ../cat/virt-ls.pod:284
2806 "Display checksum over file contents for regular files. With no argument, "
2807 "this defaults to using I<md5>. Using an argument, you can select the "
2808 "checksum type to use."
2812 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358
2813 #: ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408
2814 #: ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2816 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2821 #: ../cat/virt-ls.pod:316
2823 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2824 "so you cannot see what you are typing. If you are not worried about Tempest "
2825 "attacks and there is no one else in the room you can specify this flag to "
2826 "see what you are typing."
2830 #: ../cat/virt-ls.pod:321
2831 msgid "B<--extra-stats>"
2835 #: ../cat/virt-ls.pod:323
2836 msgid "Display extra stats."
2840 #: ../cat/virt-ls.pod:339
2843 " virt-ls --format=raw -a disk.img /dir\n"
2848 #: ../cat/virt-ls.pod:343
2851 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2856 #: ../cat/virt-ls.pod:356
2857 msgid "Display file sizes in human-readable format."
2861 #: ../cat/virt-ls.pod:370
2866 #: ../cat/virt-ls.pod:372
2867 msgid "B<--recursive>"
2871 #: ../cat/virt-ls.pod:374
2873 "Select the mode. With neither of these options, C<virt-ls> produces a "
2874 "simple, flat list of the files in the named directory. See L</SIMPLE "
2879 #: ../cat/virt-ls.pod:378
2881 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See L</"
2886 #: ../cat/virt-ls.pod:381
2888 "C<virt-ls -R> produces a recursive list of files starting at the named "
2889 "directory. See L</RECURSIVE LISTING>."
2893 #: ../cat/virt-ls.pod:384
2895 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2896 "parsed. See L</RECURSIVE LONG LISTING>."
2900 #: ../cat/virt-ls.pod:387
2905 #: ../cat/virt-ls.pod:389
2906 msgid "Display time fields."
2910 #: ../cat/virt-ls.pod:394
2911 msgid "B<--time-days>"
2915 #: ../cat/virt-ls.pod:396
2916 msgid "Display time fields as days before now (negative if in the future)."
2920 #: ../cat/virt-ls.pod:398
2922 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2923 "of the file is between 0 and 86399 seconds."
2927 #: ../cat/virt-ls.pod:404
2928 msgid "B<--time-relative>"
2932 #: ../cat/virt-ls.pod:406
2933 msgid "Display time fields as seconds before now (negative if in the future)."
2937 #: ../cat/virt-ls.pod:411
2942 #: ../cat/virt-ls.pod:413
2943 msgid "Display time fields as seconds since the Unix epoch."
2947 #: ../cat/virt-ls.pod:418
2952 #: ../cat/virt-ls.pod:420
2953 msgid "Display UID and GID fields."
2957 #: ../cat/virt-ls.pod:445
2958 msgid "Previous versions of virt-ls allowed you to write either:"
2962 #: ../cat/virt-ls.pod:447
2965 " virt-ls disk.img [disk.img ...] /dir\n"
2970 #: ../cat/virt-ls.pod:451
2973 " virt-ls guestname /dir\n"
2978 #: ../cat/virt-ls.pod:497
2980 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-"
2981 "tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
2982 "L<http://libguestfs.org/>."
2986 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374
2987 #: ../rescue/virt-rescue.pod:302
2988 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2992 #: ../clone/virt-sysprep.pod:5
2994 "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2998 #: ../clone/virt-sysprep.pod:9
3001 " virt-sysprep [--options] -d domname\n"
3006 #: ../clone/virt-sysprep.pod:11
3009 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
3014 #: ../clone/virt-sysprep.pod:15
3016 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
3017 "can be made from it. Steps in this process include removing SSH host keys, "
3018 "removing persistent network MAC configuration, and removing user accounts. "
3019 "Each step can be enabled or disabled as required."
3023 #: ../clone/virt-sysprep.pod:21
3025 "Virt-sysprep is a simple shell script, allowing easy inspection or "
3026 "customization by the system administrator."
3030 #: ../clone/virt-sysprep.pod:24
3032 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
3033 "be shut down. If you want to preserve the existing contents of the guest, "
3034 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> below."
3038 #: ../clone/virt-sysprep.pod:29
3040 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
3041 "recommend that you don't. The time you might want to run it as root is when "
3042 "you need root in order to access the disk image, but even in this case it "
3043 "would be better to change the permissions on the disk image to be writable "
3044 "as the non-root user running virt-sysprep."
3048 #: ../clone/virt-sysprep.pod:35
3050 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
3051 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
3052 "machines in preparation for cloning them. Having said that, virt-sysprep "
3053 "does I<not> currently work on Microsoft Windows guests. We plan to support "
3054 "Windows sysprepping in a future version, and we already have code to do it."
3058 #: ../clone/virt-sysprep.pod:76
3059 msgid "B<--enable=...>"
3063 #: ../clone/virt-sysprep.pod:78
3065 "Choose which sysprep operations to perform. Give a comma-separated list of "
3066 "operations, for example:"
3070 #: ../clone/virt-sysprep.pod:81
3073 " --enable=ssh-hostkeys,udev-persistent-net\n"
3078 #: ../clone/virt-sysprep.pod:83
3080 "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
3084 #: ../clone/virt-sysprep.pod:85
3086 "If the I<--enable> option is not given, then we default to trying all "
3087 "possible sysprep operations. But some sysprep operations are skipped for "
3092 #: ../clone/virt-sysprep.pod:89
3094 "Use I<--list-operations> to list operations supported by a particular "
3095 "version of virt-sysprep."
3099 #: ../clone/virt-sysprep.pod:92
3101 "See L</OPERATIONS> below for a list and an explanation of each operation."
3105 #: ../clone/virt-sysprep.pod:106
3108 " virt-sysprep --format=raw -a disk.img\n"
3113 #: ../clone/virt-sysprep.pod:110
3116 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
3121 #: ../clone/virt-sysprep.pod:119
3122 msgid "B<--hostname> newhostname"
3126 #: ../clone/virt-sysprep.pod:121
3128 "Change the hostname. See the L</hostname> operation below. If not given, "
3129 "defaults to C<localhost.localdomain>."
3133 #: ../clone/virt-sysprep.pod:124
3134 msgid "B<--list-operations>"
3138 #: ../clone/virt-sysprep.pod:126
3139 msgid "List the operations supported by the virt-sysprep program."
3143 #: ../clone/virt-sysprep.pod:128
3144 msgid "B<--selinux-relabel>"
3148 #: ../clone/virt-sysprep.pod:130
3149 msgid "B<--no-selinux-relabel>"
3153 #: ../clone/virt-sysprep.pod:132
3155 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
3156 "I<--no-selinux-relabel> disables relabelling."
3160 #: ../clone/virt-sysprep.pod:135
3162 "The default is to try to detect if SELinux relabelling is required. See L</"
3163 "SELINUX RELABELLING> below for more details."
3167 #: ../clone/virt-sysprep.pod:156
3172 #: ../clone/virt-sysprep.pod:158
3174 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
3175 "enabled>, although some are skipped depending on the type of guest."
3179 #: ../clone/virt-sysprep.pod:162
3181 "Operations can be individually enabled using the I<--enable> option. Use a "
3182 "comma-separated list, for example:"
3186 #: ../clone/virt-sysprep.pod:165
3189 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
3194 #: ../clone/virt-sysprep.pod:167
3196 "To list the operations supported by the current version of virt-sysprep, use "
3197 "I<--list-operations>."
3201 #: ../clone/virt-sysprep.pod:170
3203 "Future versions of virt-sysprep may add more operations. If you are using "
3204 "virt-sysprep and want predictable behaviour, specify only the operations "
3205 "that you want to have enabled."
3209 #: ../clone/virt-sysprep.pod:174
3214 #: ../clone/virt-sysprep.pod:176
3215 msgid "Remove user at-jobs and cron-jobs."
3219 #: ../clone/virt-sysprep.pod:178
3220 msgid "dhcp-client-state"
3224 #: ../clone/virt-sysprep.pod:180
3225 msgid "Remove DHCP client leases."
3229 #: ../clone/virt-sysprep.pod:182
3230 msgid "dhcp-server-state"
3234 #: ../clone/virt-sysprep.pod:184
3235 msgid "Remove DHCP server leases."
3239 #: ../clone/virt-sysprep.pod:186
3244 #: ../clone/virt-sysprep.pod:188
3246 "Changes the hostname of the guest to the value given in the I<--hostname> "
3251 #: ../clone/virt-sysprep.pod:191
3253 "If the I<--hostname> parameter is not given, then the hostname is changed to "
3254 "C<localhost.localdomain>."
3258 #: ../clone/virt-sysprep.pod:194
3263 #: ../clone/virt-sysprep.pod:196
3264 msgid "Remove many log files."
3268 #: ../clone/virt-sysprep.pod:198
3273 #: ../clone/virt-sysprep.pod:200
3274 msgid "Remove email from the local mail spool directory."
3278 #: ../clone/virt-sysprep.pod:202
3283 #: ../clone/virt-sysprep.pod:204
3285 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
3286 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
3290 #: ../clone/virt-sysprep.pod:207
3295 #: ../clone/virt-sysprep.pod:209
3297 "Write some random bytes from the host into the random seed file of the guest."
3301 #: ../clone/virt-sysprep.pod:212
3302 msgid "See L</RANDOM SEED> below."
3306 #: ../clone/virt-sysprep.pod:214
3307 msgid "rhn-systemid"
3311 #: ../clone/virt-sysprep.pod:216
3312 msgid "Remove the RHN system ID."
3316 #: ../clone/virt-sysprep.pod:218
3321 #: ../clone/virt-sysprep.pod:220
3322 msgid "Remove the Smolt hardware UUID."
3326 #: ../clone/virt-sysprep.pod:222
3327 msgid "ssh-hostkeys"
3331 #: ../clone/virt-sysprep.pod:224
3332 msgid "Remove the SSH host keys in the guest."
3336 #: ../clone/virt-sysprep.pod:226
3338 "The SSH host keys are regenerated (differently) next time the guest is "
3343 #: ../clone/virt-sysprep.pod:229
3345 "If, after cloning, the guest gets the same IP address, ssh will give you a "
3346 "stark warning about the host key changing:"
3350 #: ../clone/virt-sysprep.pod:232
3353 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3354 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
3355 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3356 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
3361 #: ../clone/virt-sysprep.pod:237
3362 msgid "udev-persistent-net"
3366 #: ../clone/virt-sysprep.pod:239
3368 "Remove udev persistent net rules which map the guest's existing MAC address "
3369 "to a fixed ethernet device (eg. eth0)."
3373 #: ../clone/virt-sysprep.pod:242
3375 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
3376 "address occupies the old name (eg. eth0), this means the fresh MAC address "
3377 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
3378 "Erasing the udev persistent net rules avoids this."
3382 #: ../clone/virt-sysprep.pod:247
3387 #: ../clone/virt-sysprep.pod:249
3388 msgid "Remove the utmp file."
3392 #: ../clone/virt-sysprep.pod:251
3394 "This records who is currently logged in on a machine. In modern Linux "
3395 "distros it is stored in a ramdisk and hence not part of the virtual "
3396 "machine's disk, but it was stored on disk in older distros."
3400 #: ../clone/virt-sysprep.pod:255
3405 #: ../clone/virt-sysprep.pod:257
3406 msgid "Remove the yum UUID."
3410 #: ../clone/virt-sysprep.pod:259
3412 "Yum creates a fresh UUID the next time it runs when it notices that the "
3413 "original UUID has been erased."
3417 #: ../clone/virt-sysprep.pod:262
3418 msgid "COPYING AND CLONING"
3422 #: ../clone/virt-sysprep.pod:264
3424 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3425 "prepare a template from which guests can be cloned. There are many "
3426 "different ways to achieve this using the virt tools, and this section is "
3427 "just an introduction."
3431 #: ../clone/virt-sysprep.pod:269
3432 msgid "A virtual machine (when switched off) consists of two parts:"
3436 #: ../clone/virt-sysprep.pod:273
3437 msgid "I<configuration>"
3441 #: ../clone/virt-sysprep.pod:275
3443 "The configuration or description of the guest. eg. The libvirt XML (see "
3444 "C<virsh dumpxml>), the running configuration of the guest, or another "
3445 "external format like OVF."
3449 #: ../clone/virt-sysprep.pod:279
3450 msgid "Some configuration items that might need to be changed:"
3454 #: ../clone/virt-sysprep.pod:285
3459 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3464 #: ../clone/virt-sysprep.pod:293
3465 msgid "path to block device(s)"
3469 #: ../clone/virt-sysprep.pod:297
3470 msgid "network card MAC address"
3474 #: ../clone/virt-sysprep.pod:301
3475 msgid "I<block device(s)>"
3479 #: ../clone/virt-sysprep.pod:303
3481 "One or more hard disk images, themselves containing files, directories, "
3482 "applications, kernels, configuration, etc."
3486 #: ../clone/virt-sysprep.pod:306
3487 msgid "Some things inside the block devices that might need to be changed:"
3491 #: ../clone/virt-sysprep.pod:312
3492 msgid "hostname and other net configuration"
3496 #: ../clone/virt-sysprep.pod:320
3497 msgid "SSH host keys"
3501 #: ../clone/virt-sysprep.pod:324
3502 msgid "Windows unique security ID (SID)"
3506 #: ../clone/virt-sysprep.pod:328
3507 msgid "Puppet registration"
3511 #: ../clone/virt-sysprep.pod:334
3512 msgid "COPYING THE BLOCK DEVICE"
3516 #: ../clone/virt-sysprep.pod:336
3518 "Starting with an original guest, you probably wish to copy the guest block "
3519 "device and its configuration to make a template. Then once you are happy "
3520 "with the template, you will want to make many clones from it."
3524 #: ../clone/virt-sysprep.pod:341
3530 " original guest --------> template ---------->\n"
3531 " \\------> cloned\n"
3532 " \\-----> guests\n"
3538 #: ../clone/virt-sysprep.pod:349
3540 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3545 #: ../clone/virt-sysprep.pod:352
3549 " original guest --------> template ---------->\n"
3550 " \\------> cloned\n"
3551 " \\-----> guests\n"
3557 #: ../clone/virt-sysprep.pod:358
3558 msgid "There are some smarter (and faster) ways too:"
3562 #: ../clone/virt-sysprep.pod:364
3566 " template ---------->\n"
3567 " \\------> cloned\n"
3568 " \\-----> guests\n"
3574 #: ../clone/virt-sysprep.pod:370
3576 "Use the block device as a backing file and create a snapshot on top for each "
3577 "guest. The advantage is that you don't need to copy the block device (very "
3578 "fast) and only changes are stored (less storage required)."
3582 #: ../clone/virt-sysprep.pod:375
3584 "Note that writing to the backing file once you have created guests on top of "
3585 "it is not possible: you will corrupt the guests."
3589 #: ../clone/virt-sysprep.pod:378
3591 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 -"
3592 "o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3593 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3594 "also create cheap snapshots from files or LUNs."
3598 #: ../clone/virt-sysprep.pod:386
3599 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3603 #: ../clone/virt-sysprep.pod:390
3604 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3608 #: ../clone/virt-sysprep.pod:394
3613 #: ../clone/virt-sysprep.pod:396
3615 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3616 "and/or modify the external libvirt configuration of a guest. It will reset "
3617 "the name, UUID and MAC address of the guest in the libvirt XML."
3621 #: ../clone/virt-sysprep.pod:401
3623 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3624 "image. This was the original motivation to write virt-sysprep."
3628 #: ../clone/virt-sysprep.pod:404
3633 #: ../clone/virt-sysprep.pod:406
3637 " original guest --------> template\n"
3642 #: ../clone/virt-sysprep.pod:409
3644 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3645 "it easier to compress and/or faster to copy."
3649 #: ../clone/virt-sysprep.pod:412
3651 "Notice that since virt-sparsify also copies the image, you can use it to "
3652 "make the initial copy (instead of C<dd>)."
3656 #: ../clone/virt-sysprep.pod:415
3661 #: ../clone/virt-sysprep.pod:417
3665 " template ---------->\n"
3666 " \\------> cloned\n"
3667 " \\-----> guests\n"
3673 #: ../clone/virt-sysprep.pod:423
3675 "If you want to give people cloned guests, but let them pick the size of the "
3676 "guest themselves (eg. depending on how much they are prepared to pay for "
3677 "disk space), then instead of copying the template, you can run L<virt-resize"
3678 "(1)>. Virt-resize performs a copy and resize, and thus is ideal for cloning "
3679 "guests from a template."
3683 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3688 #: ../clone/virt-sysprep.pod:431
3690 "Although virt-sysprep removes some sensitive information from the guest, it "
3691 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3692 "above, and the implementation of the operations in the shell script. You "
3693 "should also examine the guest afterwards."
3697 #: ../clone/virt-sysprep.pod:436
3699 "Sensitive files are simply removed. The data they contained may still exist "
3700 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3701 "L<virt-sparsify(1)> as one way to remove this content. See also the L<scrub"
3702 "(1)> command to get rid of deleted content in directory entries and inodes."
3706 #: ../clone/virt-sysprep.pod:442
3711 #: ../clone/virt-sysprep.pod:444
3712 msgid "I<(This section applies to Linux guests only)>"
3716 #: ../clone/virt-sysprep.pod:446
3718 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3719 "from the host into the guest's random seed file."
3723 #: ../clone/virt-sysprep.pod:449
3725 "If this is just done once and the guest is cloned from the same template, "
3726 "then each guest will start with the same entropy, and things like SSH host "
3727 "keys and TCP sequence numbers may be predictable."
3731 #: ../clone/virt-sysprep.pod:453
3733 "Therefore you should arrange to add more randomness I<after> cloning from a "
3734 "template too, which can be done by just enabling the C<random-seed> "
3739 #: ../clone/virt-sysprep.pod:457
3742 " cp template.img newguest.img\n"
3743 " virt-sysprep --enable=random-seed -a newguest.img\n"
3748 #: ../clone/virt-sysprep.pod:460
3749 msgid "SELINUX RELABELLING"
3753 #: ../clone/virt-sysprep.pod:462
3754 msgid "I<(This section applies to Linux guests using SELinux only)>"
3758 #: ../clone/virt-sysprep.pod:464
3760 "If any new files are created by virt-sysprep, then virt-sysprep touches C</."
3761 "autorelabel> so that these will be correctly labelled by SELinux the next "
3762 "time the guest is booted. This process interrupts boot and can take some "
3767 #: ../clone/virt-sysprep.pod:469
3769 "You can force relabelling for all guests by supplying the I<--selinux-"
3774 #: ../clone/virt-sysprep.pod:472
3776 "You can disable relabelling entirely by supplying the I<--no-selinux-"
3781 #: ../clone/virt-sysprep.pod:484
3782 msgid "This program returns 0 on success, or 1 if there was an error."
3786 #: ../clone/virt-sysprep.pod:488
3788 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, L<virt-"
3789 "resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, L<qemu-img(1)"
3790 ">, L<scrub(1)>, L<http://libguestfs.org/>, L<http://libvirt.org/>."
3794 #: ../df/virt-df.pod:5
3795 msgid "virt-df - Display free space on virtual filesystems"
3799 #: ../df/virt-df.pod:9
3802 " virt-df [--options]\n"
3807 #: ../df/virt-df.pod:11
3810 " virt-df [--options] -d domname\n"
3815 #: ../df/virt-df.pod:13
3818 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3823 #: ../df/virt-df.pod:17
3826 " virt-df [--options] domname\n"
3831 #: ../df/virt-df.pod:19
3834 " virt-df [--options] disk.img [disk.img ...]\n"
3839 #: ../df/virt-df.pod:23
3841 "C<virt-df> is a command line tool to display free space on virtual machine "
3842 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3843 "allocated to a virtual machine, but can look inside disk images to see how "
3844 "much space is really being used."
3848 #: ../df/virt-df.pod:28
3850 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3851 "to get a list of all active and inactive guests, and performs a C<df>-type "
3852 "operation on each one in turn, printing out the results."
3856 #: ../df/virt-df.pod:32
3858 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a C<df>-"
3859 "type operation on either the single named libvirt domain, or on the disk "
3860 "image(s) listed on the command line (which must all belong to a single VM). "
3861 "In this mode (with arguments), C<virt-df> will I<only work for a single "
3862 "guest>. If you want to run on multiple guests, then you have to invoke "
3863 "C<virt-df> multiple times."
3867 #: ../df/virt-df.pod:39
3869 "Use the I<--csv> option to get a format which can be easily parsed by other "
3870 "programs. Other options are similar to the standard L<df(1)> command."
3874 #: ../df/virt-df.pod:45
3876 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3877 "output human-readable:"
3881 #: ../df/virt-df.pod:48
3884 " # virt-df -d F14x64 -h\n"
3885 " Filesystem Size Used Available Use%\n"
3886 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3887 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3892 #: ../df/virt-df.pod:53
3893 msgid "Show disk usage for a disk image file called C<test.img>:"
3897 #: ../df/virt-df.pod:55
3900 " $ virt-df -a test1.img\n"
3901 " Filesystem 1K-blocks Used Available Use%\n"
3902 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3907 #: ../df/virt-df.pod:112
3910 " virt-df --format=raw -a disk.img\n"
3915 #: ../df/virt-df.pod:116
3918 " virt-df --format=raw -a disk.img --format -a another.img\n"
3923 #: ../df/virt-df.pod:129
3924 msgid "Print sizes in human-readable format."
3928 #: ../df/virt-df.pod:131
3929 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3933 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3938 #: ../df/virt-df.pod:135
3943 #: ../df/virt-df.pod:137
3944 msgid "Print inodes instead of blocks."
3948 #: ../df/virt-df.pod:139
3949 msgid "B<--one-per-guest>"
3953 #: ../df/virt-df.pod:141
3955 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3956 "disks from several guests to a single libguestfs appliance."
3960 #: ../df/virt-df.pod:144
3961 msgid "You might use this option in the following circumstances:"
3965 #: ../df/virt-df.pod:150
3967 "If you think an untrusted guest might actively try to exploit the libguestfs "
3968 "appliance kernel, then this prevents one guest from interfering with the "
3969 "stats printed for another guest."
3973 #: ../df/virt-df.pod:156
3975 "If the kernel has a bug which stops it from accessing a filesystem in one "
3976 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3977 "and report stats for further guests."
3981 #: ../df/virt-df.pod:165
3983 "Print UUIDs instead of names. This is useful for following a guest even "
3984 "when the guest is migrated or renamed, or when two guests happen to have the "
3989 #: ../df/virt-df.pod:169
3991 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3992 "images, we still print the disk image name even when this option is "
3997 #: ../df/virt-df.pod:229
3999 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<http://"
4004 #: ../edit/virt-edit.pod:5
4005 msgid "virt-edit - Edit a file in a virtual machine"
4009 #: ../edit/virt-edit.pod:9
4012 " virt-edit [--options] -d domname file [file ...]\n"
4017 #: ../edit/virt-edit.pod:11
4020 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
4025 #: ../edit/virt-edit.pod:13
4028 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
4033 #: ../edit/virt-edit.pod:17
4036 " virt-edit domname file\n"
4041 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
4044 " virt-edit disk.img [disk.img ...] file\n"
4049 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23
4050 #: ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15
4051 #: ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19
4052 #: ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
4057 #: ../edit/virt-edit.pod:23
4059 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
4060 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
4061 "doing this, but doesn't catch all cases."
4065 #: ../edit/virt-edit.pod:29
4067 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
4068 "exists in the named virtual machine (or disk image)."
4072 #: ../edit/virt-edit.pod:32
4074 "Multiple filenames can be given, in which case they are each edited in "
4075 "turn. Each filename must be a full path, starting at the root directory "
4076 "(starting with '/')."
4080 #: ../edit/virt-edit.pod:36
4081 msgid "If you want to just view a file, use L<virt-cat(1)>."
4085 #: ../edit/virt-edit.pod:38
4087 "For more complex cases you should look at the L<guestfish(1)> tool (see L</"
4088 "USING GUESTFISH> below)."
4092 #: ../edit/virt-edit.pod:41
4094 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
4095 "that and much more."
4099 #: ../edit/virt-edit.pod:46
4100 msgid "Edit the named files interactively:"
4104 #: ../edit/virt-edit.pod:48
4107 " virt-edit -d mydomain /boot/grub/grub.conf\n"
4112 #: ../edit/virt-edit.pod:50
4115 " virt-edit -d mydomain /etc/passwd\n"
4120 #: ../edit/virt-edit.pod:52
4121 msgid "For Windows guests, some Windows paths are understood:"
4125 #: ../edit/virt-edit.pod:54
4128 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
4133 #: ../edit/virt-edit.pod:56
4135 "If Perl is installed, you can also edit files non-interactively (see L</NON-"
4136 "INTERACTIVE EDITING> below). To change the init default level to 5:"
4140 #: ../edit/virt-edit.pod:60
4143 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
4148 #: ../edit/virt-edit.pod:81
4149 msgid "B<-b> extension"
4153 #: ../edit/virt-edit.pod:83
4154 msgid "B<--backup> extension"
4158 #: ../edit/virt-edit.pod:85
4160 "Create a backup of the original file I<in the guest disk image>. The backup "
4161 "has the original filename with C<extension> added."
4165 #: ../edit/virt-edit.pod:88
4167 "Usually the first character of C<extension> would be a dot C<.> so you would "
4172 #: ../edit/virt-edit.pod:91
4175 " virt-edit -b .orig [etc]\n"
4180 #: ../edit/virt-edit.pod:93
4181 msgid "By default, no backup file is made."
4185 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181
4186 #: ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74
4187 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78
4188 #: ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
4193 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183
4194 #: ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76
4195 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
4196 #: ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
4197 msgid "B<--connect URI>"
4201 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84
4202 #: ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134
4203 #: ../tools/virt-win-reg.pl:135
4205 "If you specify guest block devices directly, then libvirt is not used at all."
4209 #: ../edit/virt-edit.pod:114
4211 "When prompting for keys and passphrases, virt-edit normally turns echoing "
4212 "off so you cannot see what you are typing. If you are not worried about "
4213 "Tempest attacks and there is no one else in the room you can specify this "
4214 "flag to see what you are typing."
4218 #: ../edit/virt-edit.pod:119
4223 #: ../edit/virt-edit.pod:121
4224 msgid "B<--expr> EXPR"
4228 #: ../edit/virt-edit.pod:123
4230 "Instead of launching the external editor, non-interactively apply the Perl "
4231 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
4236 #: ../edit/virt-edit.pod:127
4238 "Be careful to properly quote the expression to prevent it from being altered "
4243 #: ../edit/virt-edit.pod:130
4244 msgid "Note that this option is only available when Perl 5 is installed."
4248 #: ../edit/virt-edit.pod:132
4249 msgid "B<--format> raw|qcow2|..."
4253 #: ../edit/virt-edit.pod:143
4256 " virt-edit --format=raw -a disk.img file\n"
4261 #: ../edit/virt-edit.pod:147
4264 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
4269 #: ../edit/virt-edit.pod:181
4270 msgid "Previous versions of virt-edit allowed you to write either:"
4274 #: ../edit/virt-edit.pod:187
4277 " virt-edit guestname file\n"
4282 #: ../edit/virt-edit.pod:195
4283 msgid "NON-INTERACTIVE EDITING"
4287 #: ../edit/virt-edit.pod:197
4289 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
4290 "administrator can interactively edit the file."
4294 #: ../edit/virt-edit.pod:200
4296 "There are two ways also to use C<virt-edit> from scripts in order to make "
4297 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
4298 "like this, it's less error-prone to write scripts directly using the "
4299 "libguestfs API and Augeas for configuration file editing.)"
4303 #: ../edit/virt-edit.pod:206
4305 "The first method is to temporarily set C<$EDITOR> to any script or program "
4306 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
4307 "update C<tmpfile> in place however it likes."
4311 #: ../edit/virt-edit.pod:210
4313 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
4314 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
4315 "instances of C<foo> with C<bar> in a file:"
4319 #: ../edit/virt-edit.pod:214
4322 " virt-edit -d domname filename -e 's/foo/bar/'\n"
4327 #: ../edit/virt-edit.pod:216
4329 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
4330 "For example to delete root's password you could do:"
4334 #: ../edit/virt-edit.pod:219
4337 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
4342 #: ../edit/virt-edit.pod:221
4344 "What really happens is that the snippet is evaluated as a Perl expression "
4345 "for each line of the file. The line, including the final C<\\n>, is passed "
4346 "in C<$_> and the expression should update C<$_> or leave it unchanged."
4350 #: ../edit/virt-edit.pod:226
4352 "To delete a line, set C<$_> to the empty string. For example, to delete the "
4353 "C<apache> user account from the password file you can do:"
4357 #: ../edit/virt-edit.pod:229
4360 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
4365 #: ../edit/virt-edit.pod:231
4367 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4368 "the end of the file is rather difficult this way since there is no concept "
4369 "of \"last line of the file\" - your expression just doesn't get called "
4370 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4375 #: ../edit/virt-edit.pod:237
4377 "The variable C<$lineno> contains the current line number. As is "
4378 "traditional, the first line in the file is number C<1>."
4382 #: ../edit/virt-edit.pod:240
4384 "The return value from the expression is ignored, but the expression may call "
4385 "C<die> in order to abort the whole program, leaving the original file "
4390 #: ../edit/virt-edit.pod:244
4392 "Remember when matching the end of a line that C<$_> may contain the final C<"
4393 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4394 "newline then neither of these. Thus to match or substitute some text at the "
4395 "end of a line, use this regular expression:"
4399 #: ../edit/virt-edit.pod:249
4402 " /some text(\\r?\\n)?$/\n"
4407 #: ../edit/virt-edit.pod:251
4409 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
4410 "$_> itself (since that would remove all newlines from the file):"
4414 #: ../edit/virt-edit.pod:255
4417 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4422 #: ../edit/virt-edit.pod:259
4424 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4425 "paths (eg. C<E:\\foo\\bar.txt>)."
4429 #: ../edit/virt-edit.pod:278
4431 "The path is resolved case insensitively to locate the file that should be "
4436 #: ../edit/virt-edit.pod:299
4438 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4439 "C<virt-edit> doesn't work."
4443 #: ../edit/virt-edit.pod:302
4444 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4448 #: ../edit/virt-edit.pod:304
4451 " guestfish --rw -i -d domname edit /file\n"
4456 #: ../edit/virt-edit.pod:306
4458 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4463 #: ../edit/virt-edit.pod:309
4465 "The command above uses libguestfs's guest inspection feature and so does not "
4466 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4467 "disk images that don't contain guests. To edit a file on a disk image "
4472 #: ../edit/virt-edit.pod:314
4475 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4480 #: ../edit/virt-edit.pod:316
4482 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4483 "the disk image to edit, and C</file> is the full path to the file."
4487 #: ../edit/virt-edit.pod:320
4489 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4490 "C<write> or C<upload> instead:"
4494 #: ../edit/virt-edit.pod:323
4497 " guestfish --rw -i -d domname touch /newfile\n"
4502 #: ../edit/virt-edit.pod:325
4505 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4510 #: ../edit/virt-edit.pod:327
4513 " guestfish --rw -i -d domname upload localfile /newfile\n"
4518 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119
4519 #: ../rescue/virt-rescue.pod:261 ../sparsify/virt-sparsify.pod:232
4520 #: ../src/guestfs.pod:3209 ../test-tool/libguestfs-test-tool.pod:95
4521 msgid "ENVIRONMENT VARIABLES"
4525 #: ../edit/virt-edit.pod:333
4530 #: ../edit/virt-edit.pod:335
4532 "If set, this string is used as the editor. It may contain arguments, eg. C<"
4537 #: ../edit/virt-edit.pod:338
4538 msgid "If not set, C<vi> is used."
4542 #: ../edit/virt-edit.pod:356
4544 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-"
4545 "tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
4546 "L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4550 #: ../erlang/examples/guestfs-erlang.pod:5
4551 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4555 #: ../erlang/examples/guestfs-erlang.pod:9
4558 " {ok, G} = guestfs:create(),\n"
4559 " ok = guestfs:add_drive_opts(G, Disk,\n"
4560 " [{format, \"raw\"}, {readonly, true}]),\n"
4561 " ok = guestfs:launch(G),\n"
4562 " [Device] = guestfs:list_devices(G),\n"
4563 " ok = guestfs:close(G).\n"
4568 #: ../erlang/examples/guestfs-erlang.pod:18
4570 "This manual page documents how to call libguestfs from the Erlang "
4571 "programming language. This page just documents the differences from the C "
4572 "API and gives some examples. If you are not familiar with using libguestfs, "
4573 "you also need to read L<guestfs(3)>."
4577 #: ../erlang/examples/guestfs-erlang.pod:23
4578 msgid "OPENING AND CLOSING THE HANDLE"
4582 #: ../erlang/examples/guestfs-erlang.pod:25
4584 "The Erlang bindings are implemented using an external program called C<erl-"
4585 "guestfs>. This program must be on the current PATH, or else you should "
4586 "specify the full path to the program:"
4590 #: ../erlang/examples/guestfs-erlang.pod:29
4593 " {ok, G} = guestfs:create().\n"
4598 #: ../erlang/examples/guestfs-erlang.pod:31
4601 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4606 #: ../erlang/examples/guestfs-erlang.pod:33
4607 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4611 #: ../erlang/examples/guestfs-erlang.pod:36
4612 msgid "To close the handle:"
4616 #: ../erlang/examples/guestfs-erlang.pod:38
4619 " ok = guestfs:close(G).\n"
4624 #: ../erlang/examples/guestfs-erlang.pod:40
4625 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4629 #: ../erlang/examples/guestfs-erlang.pod:42
4631 "For functions that take optional arguments, the first arguments are the non-"
4632 "optional ones. The last argument is a list of tuples supplying the "
4633 "remaining optional arguments."
4637 #: ../erlang/examples/guestfs-erlang.pod:46
4640 " ok = guestfs:add_drive_opts(G, Disk,\n"
4641 " [{format, \"raw\"}, {readonly, true}]).\n"
4646 #: ../erlang/examples/guestfs-erlang.pod:49
4647 msgid "If the last argument would be an empty list, you can also omit it:"
4651 #: ../erlang/examples/guestfs-erlang.pod:51
4654 " ok = guestfs:add_drive_opts(G, Disk).\n"
4659 #: ../erlang/examples/guestfs-erlang.pod:53
4660 msgid "RETURN VALUES AND ERRORS"
4664 #: ../erlang/examples/guestfs-erlang.pod:55
4666 "On success, most functions return a C<Result> term (which could be a list, "
4667 "string, tuple etc.). If there is nothing for the function to return, then "
4668 "the atom C<ok> is returned."
4672 #: ../erlang/examples/guestfs-erlang.pod:59
4673 msgid "On error, you would see one of the following tuples:"
4677 #: ../erlang/examples/guestfs-erlang.pod:63
4678 msgid "C<{error, Msg, Errno}>"
4682 #: ../erlang/examples/guestfs-erlang.pod:65
4683 msgid "This indicates an ordinary error from the function."
4687 #: ../erlang/examples/guestfs-erlang.pod:67
4689 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4694 #: ../erlang/examples/guestfs-erlang.pod:70
4695 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4699 #: ../erlang/examples/guestfs-erlang.pod:72
4700 msgid "C<{unknown, Function}>"
4704 #: ../erlang/examples/guestfs-erlang.pod:74
4706 "This indicates that the function you called is not known. Generally this "
4707 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4708 "which you should not do."
4712 #: ../erlang/examples/guestfs-erlang.pod:78
4713 msgid "C<Function> is the name of the unknown function."
4717 #: ../erlang/examples/guestfs-erlang.pod:80
4718 msgid "C<{unknownarg, Arg}>"
4722 #: ../erlang/examples/guestfs-erlang.pod:82
4724 "This indicates that you called a function with optional arguments, with an "
4725 "unknown argument name."
4729 #: ../erlang/examples/guestfs-erlang.pod:85
4730 msgid "C<Arg> is the name of the unknown argument."
4734 #: ../erlang/examples/guestfs-erlang.pod:89
4735 #: ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37
4736 #: ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31
4737 #: ../python/examples/guestfs-python.pod:34
4738 #: ../ruby/examples/guestfs-ruby.pod:28
4739 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4743 #: ../erlang/examples/guestfs-erlang.pod:91
4744 #: ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39
4745 #: ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33
4746 #: ../python/examples/guestfs-python.pod:36
4747 #: ../ruby/examples/guestfs-ruby.pod:30
4752 #: ../erlang/examples/guestfs-erlang.pod:93
4753 #: ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41
4754 #: ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35
4755 #: ../python/examples/guestfs-python.pod:38
4756 #: ../ruby/examples/guestfs-ruby.pod:32
4757 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4761 #: ../erlang/examples/guestfs-erlang.pod:95
4762 #: ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43
4763 #: ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37
4764 #: ../python/examples/guestfs-python.pod:40
4765 #: ../ruby/examples/guestfs-ruby.pod:34
4770 #: ../erlang/examples/guestfs-erlang.pod:99
4772 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4773 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4774 "L<guestfs-ruby(3)>, L<http://www.erlang.org/>. L<http://libguestfs.org/>."
4778 #: ../erlang/examples/guestfs-erlang.pod:110
4779 #: ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397
4780 #: ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60
4781 #: ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58
4782 #: ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328
4783 #: ../inspector/virt-inspector.pod:404 ../java/examples/guestfs-java.pod:58
4784 #: ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52
4785 #: ../python/examples/guestfs-python.pod:54
4786 #: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3348
4787 #: ../test-tool/libguestfs-test-tool.pod:106
4792 #: ../erlang/examples/guestfs-erlang.pod:112
4793 #: ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399
4794 #: ../fish/guestfish.pod:1298 ../fish/virt-copy-in.pod:62
4795 #: ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60
4796 #: ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:330
4797 #: ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93
4798 #: ../perl/examples/guestfs-perl.pod:54
4799 #: ../python/examples/guestfs-python.pod:56
4800 #: ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3350
4801 #: ../test-tool/libguestfs-test-tool.pod:108
4802 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4806 #: ../erlang/examples/guestfs-erlang.pod:116
4807 #: ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4808 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4812 #: ../erlang/examples/guestfs-erlang.pod:118
4813 #: ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405
4814 #: ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99
4815 #: ../perl/examples/guestfs-perl.pod:60
4816 #: ../python/examples/guestfs-python.pod:62
4817 #: ../ruby/examples/guestfs-ruby.pod:56
4819 "The examples in this manual page may be freely copied, modified and "
4820 "distributed without any restrictions."
4824 #: ../erlang/examples/guestfs-erlang.pod:121
4825 #: ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408
4826 #: ../java/examples/guestfs-java.pod:69
4827 #: ../ocaml/examples/guestfs-ocaml.pod:102
4828 #: ../perl/examples/guestfs-perl.pod:63
4829 #: ../python/examples/guestfs-python.pod:65
4830 #: ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3357
4832 "This library is free software; you can redistribute it and/or modify it "
4833 "under the terms of the GNU Lesser General Public License as published by the "
4834 "Free Software Foundation; either version 2 of the License, or (at your "
4835 "option) any later version."
4839 #: ../erlang/examples/guestfs-erlang.pod:126
4840 #: ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413
4841 #: ../java/examples/guestfs-java.pod:74
4842 #: ../ocaml/examples/guestfs-ocaml.pod:107
4843 #: ../perl/examples/guestfs-perl.pod:68
4844 #: ../python/examples/guestfs-python.pod:70
4845 #: ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3362
4847 "This library is distributed in the hope that it will be useful, but WITHOUT "
4848 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4849 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4854 #: ../erlang/examples/guestfs-erlang.pod:131
4855 #: ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418
4856 #: ../java/examples/guestfs-java.pod:79
4857 #: ../ocaml/examples/guestfs-ocaml.pod:112
4858 #: ../perl/examples/guestfs-perl.pod:73
4859 #: ../python/examples/guestfs-python.pod:75
4860 #: ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3367
4862 "You should have received a copy of the GNU Lesser General Public License "
4863 "along with this library; if not, write to the Free Software Foundation, "
4864 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4868 #: ../examples/guestfs-examples.pod:5
4869 msgid "guestfs-examples - Examples of using libguestfs from C"
4873 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4876 " #include <guestfs.h>\n"
4878 msgstr "#include <guestfs.h>\n"
4881 #: ../examples/guestfs-examples.pod:11
4884 " guestfs_h *g = guestfs_create ();\n"
4885 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4886 " guestfs_launch (g);\n"
4891 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4894 " cc prog.c -o prog -lguestfs\n"
4896 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4899 " cc prog.c -o prog -lguestfs\n"
4901 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4905 #: ../examples/guestfs-examples.pod:21
4907 "This manual page contains examples of calling libguestfs from the C "
4908 "programming language. If you are not familiar with using libguestfs, you "
4909 "also need to read L<guestfs(3)>."
4913 #: ../examples/guestfs-examples.pod:35
4915 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4916 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4917 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4921 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97
4922 #: ../python/examples/guestfs-python.pod:60
4923 #: ../ruby/examples/guestfs-ruby.pod:54
4924 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4928 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4933 #: ../examples/guestfs-recipes.pod:5
4935 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4936 "here. The only way which works for both sorts of output is to just write "
4937 "the URL directly. Do NOT use L<...> for URLs."
4941 #: ../examples/guestfs-recipes.pod:9
4943 "We break with tradition here and don't use ALL CAPS for the section "
4944 "headings, as this makes them much easier to read."
4948 #: ../examples/guestfs-recipes.pod:16
4949 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4953 #: ../examples/guestfs-recipes.pod:20
4955 "This page contains recipes for and links to things you can do using "
4956 "libguestfs, L<guestfish(1)> and the virt tools."
4960 #: ../examples/guestfs-recipes.pod:23
4961 msgid "Audit a virtual machine for setuid files"
4965 #: ../examples/guestfs-recipes.pod:25
4967 "The link below contains a small program which can be used to audit a Linux "
4968 "virtual machine to see what setuid and setgid files it contains."
4972 #: ../examples/guestfs-recipes.pod:28
4974 "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-"
4979 #: ../examples/guestfs-recipes.pod:30
4980 msgid "Change the background image in a Windows XP VM"
4984 #: ../examples/guestfs-recipes.pod:32
4986 "The links below explain how to use L<guestfish(1)> to change the background "
4987 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
4988 "be substantially different for each version of Windows."
4992 #: ../examples/guestfs-recipes.pod:37
4994 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html https://"
4995 "lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4999 #: ../examples/guestfs-recipes.pod:40
5000 msgid "Cloning a virtual machine (Linux)"
5004 #: ../examples/guestfs-recipes.pod:42
5006 "The guestfish technique described in the link below works well for most "
5007 "Linux VMs. Depending on the Linux distro you may need to change the paths "
5012 #: ../examples/guestfs-recipes.pod:46
5014 "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-"
5019 #: ../examples/guestfs-recipes.pod:48
5021 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
5026 #: ../examples/guestfs-recipes.pod:51
5027 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
5031 #: ../examples/guestfs-recipes.pod:53
5032 msgid "Cloning a virtual machine (Windows)"
5036 #: ../examples/guestfs-recipes.pod:55
5038 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
5039 "straightforward. Currently there is code in the Aeolus Oz project which "
5040 "does this (using libguestfs). As part of our review of the virt-clone tool, "
5041 "we may add sysprepping ability."
5045 #: ../examples/guestfs-recipes.pod:60
5047 "https://github.com/clalancette/oz https://www.redhat.com/archives/virt-tools-"
5048 "list/2011-May/msg00019.html"
5052 #: ../examples/guestfs-recipes.pod:63
5053 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
5057 #: ../examples/guestfs-recipes.pod:65
5058 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
5062 #: ../examples/guestfs-recipes.pod:67
5065 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
5070 #: ../examples/guestfs-recipes.pod:69
5071 msgid "To export just a subdirectory, eg. C</files>, do:"
5075 #: ../examples/guestfs-recipes.pod:71
5078 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
5083 #: ../examples/guestfs-recipes.pod:73
5084 msgid "Create empty disk images"
5088 #: ../examples/guestfs-recipes.pod:75
5090 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
5091 "The useful guide below explains the options available."
5095 #: ../examples/guestfs-recipes.pod:78
5097 "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/"
5102 #: ../examples/guestfs-recipes.pod:80
5103 msgid "Dump raw filesystem content from inside a disk image or VM"
5107 #: ../examples/guestfs-recipes.pod:82
5109 "You can use the L<guestfish(1)> C<download> command to extract the raw "
5110 "filesystem content from any filesystem in a disk image or a VM (even one "
5111 "which is encrypted or buried inside an LV):"
5115 #: ../examples/guestfs-recipes.pod:86
5118 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
5123 #: ../examples/guestfs-recipes.pod:88
5126 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
5131 #: ../examples/guestfs-recipes.pod:90
5132 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
5136 #: ../examples/guestfs-recipes.pod:92
5137 msgid "Edit grub configuration in a VM"
5141 #: ../examples/guestfs-recipes.pod:94
5142 msgid "You can use this to:"
5146 #: ../examples/guestfs-recipes.pod:100
5147 msgid "Fix a virtual machine that does not boot."
5151 #: ../examples/guestfs-recipes.pod:104
5152 msgid "Change which kernel is used to boot the VM."
5156 #: ../examples/guestfs-recipes.pod:108
5157 msgid "Change kernel command line options."
5161 #: ../examples/guestfs-recipes.pod:112
5162 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
5166 #: ../examples/guestfs-recipes.pod:114
5169 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
5174 #: ../examples/guestfs-recipes.pod:116
5176 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
5181 #: ../examples/guestfs-recipes.pod:119
5184 " virt-rescue -d BrokenGuest\n"
5189 #: ../examples/guestfs-recipes.pod:121
5190 msgid "Export any directory from a VM"
5194 #: ../examples/guestfs-recipes.pod:123
5196 "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
5200 #: ../examples/guestfs-recipes.pod:126
5203 " virt-copy-out -d Guest /home .\n"
5208 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9
5209 #: ../fish/guestfish-actions.pod:1450 ../fish/guestfish-actions.pod:1715
5210 #: ../fish/guestfish-actions.pod:2132 ../src/guestfs-actions.pod:18
5211 #: ../src/guestfs-actions.pod:2334 ../src/guestfs-actions.pod:2758
5212 #: ../src/guestfs-actions.pod:3317 ../src/guestfs.pod:1685
5213 #: ../tools/virt-win-reg.pl:717
5218 #: ../examples/guestfs-recipes.pod:134
5220 "The final dot of the command is not a printing error. It means we want to "
5221 "copy out to the current directory."
5225 #: ../examples/guestfs-recipes.pod:139
5226 msgid "This creates a directory called C<home> under the current directory."
5230 #: ../examples/guestfs-recipes.pod:143
5232 "If the guest is a Windows guest then you can use drive letters and "
5233 "backslashes, but you must prefix the path with C<win:> and quote it to "
5234 "protect it from the shell, like this:"
5238 #: ../examples/guestfs-recipes.pod:147
5241 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
5246 #: ../examples/guestfs-recipes.pod:149
5247 msgid "To get the output as a compressed tarball, do:"
5251 #: ../examples/guestfs-recipes.pod:151
5254 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
5259 #: ../examples/guestfs-recipes.pod:153
5261 "Although it sounds tempting, this is usually not a reliable way to get a "
5262 "backup from a running guest. See the entry in the FAQ: http://libguestfs."
5263 "org/FAQ.html#backup"
5267 #: ../examples/guestfs-recipes.pod:157
5268 msgid "Find out which user is using the most space"
5272 #: ../examples/guestfs-recipes.pod:159
5274 "This simple script examines a Linux guest to find out which user is using "
5275 "the most space in their home directory:"
5279 #: ../examples/guestfs-recipes.pod:162
5287 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
5295 #: ../examples/guestfs-recipes.pod:166
5304 #: ../examples/guestfs-recipes.pod:169
5307 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
5312 #: ../examples/guestfs-recipes.pod:171
5315 " for d in $(guestfish --remote ls \"$dir\"); do\n"
5316 " echo -n \"$dir/$d\"\n"
5318 " guestfish --remote du \"$dir/$d\";\n"
5319 " done | sort -nr -k 2\n"
5324 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
5327 " guestfish --remote exit\n"
5332 #: ../examples/guestfs-recipes.pod:179
5333 msgid "Get DHCP address from a VM"
5337 #: ../examples/guestfs-recipes.pod:181
5339 "The link below explains the many different possible techniques for getting "
5340 "the last assigned DHCP address of a virtual machine."
5344 #: ../examples/guestfs-recipes.pod:184
5346 "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-"
5347 "a-virtual-machine-disk-image/#content"
5351 #: ../examples/guestfs-recipes.pod:186
5353 "In the libguestfs source examples directory you will find the latest version "
5354 "of the C<virt-dhcp-address.c> program."
5358 #: ../examples/guestfs-recipes.pod:189
5359 msgid "Get the operating system product name string"
5363 #: ../examples/guestfs-recipes.pod:191
5364 msgid "Save the following script into a file called C<product-name.sh>:"
5368 #: ../examples/guestfs-recipes.pod:193
5373 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5374 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5375 " guestfish --remote inspect-get-product-name \"$root\"\n"
5376 " guestfish --remote exit\n"
5381 #: ../examples/guestfs-recipes.pod:200
5382 msgid "Make the script executable and run it on a named guest:"
5386 #: ../examples/guestfs-recipes.pod:202
5389 " # product-name.sh RHEL60x64\n"
5390 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
5395 #: ../examples/guestfs-recipes.pod:205
5397 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
5398 "C<xpath> command line tool or from your favourite programming language:"
5402 #: ../examples/guestfs-recipes.pod:209
5405 " # virt-inspector RHEL60x64 > xml\n"
5406 " # xpath '//product_name' < xml\n"
5409 " <product_name>Red Hat Enterprise Linux Server release 6.0 (Santiago)</product_name>\n"
5414 #: ../examples/guestfs-recipes.pod:215
5415 msgid "Get the default boot kernel for a Linux VM"
5419 #: ../examples/guestfs-recipes.pod:217
5421 "The link below contains a program to print the default boot kernel for a "
5426 #: ../examples/guestfs-recipes.pod:220
5428 "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-"
5429 "kernel-for-a-vm/#content"
5433 #: ../examples/guestfs-recipes.pod:222
5435 "It uses Augeas, and the technique is generally applicable for many different "
5440 #: ../examples/guestfs-recipes.pod:229
5441 msgid "listing the user accounts in the guest"
5445 #: ../examples/guestfs-recipes.pod:233
5446 msgid "what repositories is it configured to use"
5450 #: ../examples/guestfs-recipes.pod:237
5451 msgid "what NTP servers does it connect to"
5455 #: ../examples/guestfs-recipes.pod:241
5456 msgid "what were the boot messages last time it booted"
5460 #: ../examples/guestfs-recipes.pod:245
5461 msgid "listing who was logged in recently"
5465 #: ../examples/guestfs-recipes.pod:249
5466 msgid "http://augeas.net/"
5470 #: ../examples/guestfs-recipes.pod:251
5471 msgid "Install RPMs in a guest"
5475 #: ../examples/guestfs-recipes.pod:253
5477 "The link below contains a method to install RPMs in a guest. In fact the "
5478 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
5479 "installs them next time the guest is booted. You could use this technique "
5480 "to install vital security updates in an offline guest."
5484 #: ../examples/guestfs-recipes.pod:259
5486 "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
5490 #: ../examples/guestfs-recipes.pod:261
5491 msgid "List applications installed in a VM"
5495 #: ../examples/guestfs-recipes.pod:263
5496 msgid "Save the following to a file C<list-apps.sh>:"
5500 #: ../examples/guestfs-recipes.pod:265
5505 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5506 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5507 " guestfish --remote inspect-list-applications \"$root\"\n"
5508 " guestfish --remote exit\n"
5513 #: ../examples/guestfs-recipes.pod:272
5515 "Make the file executable and then you can run it on any named virtual "
5520 #: ../examples/guestfs-recipes.pod:275
5523 " # list-apps.sh WinGuest\n"
5525 " app_name: Mozilla Firefox (3.6.12)\n"
5526 " app_display_name: Mozilla Firefox (3.6.12)\n"
5528 " app_version: 3.6.12 (en-GB)\n"
5530 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5531 " app_trans_path:\n"
5532 " app_publisher: Mozilla\n"
5533 " app_url: http://www.mozilla.com/en-GB/\n"
5534 " app_source_package:\n"
5536 " app_description: Mozilla Firefox\n"
5539 " app_name: VLC media player\n"
5540 " app_display_name: VLC media player 1.1.5\n"
5542 " app_version: 1.1.5\n"
5544 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5545 " app_trans_path:\n"
5546 " app_publisher: VideoLAN\n"
5547 " app_url: http://www.videolan.org/\n"
5548 " app_source_package:\n"
5550 " app_description:\n"
5556 #: ../examples/guestfs-recipes.pod:305
5558 "If you want to run the script on disk images (instead of libvirt virtual "
5559 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also L<virt-inspector(1)"
5564 #: ../examples/guestfs-recipes.pod:309
5565 msgid "List files and directories in a VM"
5569 #: ../examples/guestfs-recipes.pod:311
5570 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5574 #: ../examples/guestfs-recipes.pod:313
5577 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5582 #: ../examples/guestfs-recipes.pod:315
5583 msgid "List services in a Windows VM"
5587 #: ../examples/guestfs-recipes.pod:317
5589 "The link below contains a script that can be used to list out the services "
5590 "from a Windows VM, and whether those services run at boot time or are loaded "
5595 #: ../examples/guestfs-recipes.pod:321
5597 "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/"
5602 #: ../examples/guestfs-recipes.pod:323
5603 msgid "Make a disk image sparse"
5607 #: ../examples/guestfs-recipes.pod:325
5609 "The link below contains some guides for making a disk image sparse (or "
5610 "reintroducing sparseness)."
5614 #: ../examples/guestfs-recipes.pod:328
5616 "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
5620 #: ../examples/guestfs-recipes.pod:330
5621 msgid "Monitor disk usage over time"
5625 #: ../examples/guestfs-recipes.pod:332
5627 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5628 "The link below contains a guide."
5632 #: ../examples/guestfs-recipes.pod:335
5633 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5637 #: ../examples/guestfs-recipes.pod:337
5638 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5642 #: ../examples/guestfs-recipes.pod:339
5644 "L<guestfish(1)> plus the tools described in the link below can be used to "
5645 "read out the Windows Event Log from any virtual machine running Windows "
5646 "Vista or a later version."
5650 #: ../examples/guestfs-recipes.pod:343
5652 "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-"
5653 "guestfish/#content"
5657 #: ../examples/guestfs-recipes.pod:345
5658 msgid "Remove root password (Linux)"
5662 #: ../examples/guestfs-recipes.pod:347
5664 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5665 "files. One use is to remove the root password from a Linux guest:"
5669 #: ../examples/guestfs-recipes.pod:350
5672 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5677 #: ../examples/guestfs-recipes.pod:352
5678 msgid "Remove Administrator password (Windows)"
5682 #: ../examples/guestfs-recipes.pod:354
5684 "The link below contains one technique for removing the Administrator "
5685 "password from a Windows VM, or to be more precise, it gives you a command "
5686 "prompt the next time you log in which you can use to bypass any security:"
5690 #: ../examples/guestfs-recipes.pod:359
5692 "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-"
5693 "administrator-password-with-guestfish/"
5697 #: ../examples/guestfs-recipes.pod:361
5698 msgid "Unpack a live CD"
5702 #: ../examples/guestfs-recipes.pod:363
5704 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5705 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5706 "layers, as outlined in the guide below."
5710 #: ../examples/guestfs-recipes.pod:367
5712 "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-"
5717 #: ../examples/guestfs-recipes.pod:369
5718 msgid "Uploading and downloading files"
5722 #: ../examples/guestfs-recipes.pod:371
5724 "The link below contains general tips on uploading (copying in) and "
5725 "downloading (copying out) files from VMs."
5729 #: ../examples/guestfs-recipes.pod:374
5731 "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5735 #: ../examples/guestfs-recipes.pod:376
5736 msgid "Use libguestfs tools on VMware ESX guests"
5740 #: ../examples/guestfs-recipes.pod:378
5742 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5743 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5747 #: ../examples/guestfs-recipes.pod:382
5749 "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-"
5754 #: ../examples/guestfs-recipes.pod:386
5756 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)"
5757 ">, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-"
5758 "python(3)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
5762 #: ../examples/guestfs-recipes.pod:403
5763 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5767 #: ../fish/guestfish-actions.pod:1
5772 #: ../fish/guestfish-actions.pod:3
5775 " add-cdrom filename\n"
5780 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
5781 msgid "This function adds a virtual CD-ROM disk image to the guest."
5785 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
5786 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
5790 #: ../fish/guestfish-actions.pod:15
5792 "This call checks for the existence of C<filename>. This stops you from "
5793 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5794 "and C<http:> URLs. To specify those, use the general L</config> call "
5799 #: ../fish/guestfish-actions.pod:22
5801 "If you just want to add an ISO file (often you use this as an efficient way "
5802 "to transfer large files into the guest), then you should probably use L</add-"
5803 "drive-ro> instead."
5807 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214
5808 #: ../fish/guestfish-actions.pod:228
5810 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
5815 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:217
5816 #: ../fish/guestfish-actions.pod:231 ../fish/guestfish-actions.pod:941
5817 #: ../fish/guestfish-actions.pod:976 ../fish/guestfish-actions.pod:1149
5818 #: ../fish/guestfish-actions.pod:1509 ../fish/guestfish-actions.pod:1523
5819 #: ../fish/guestfish-actions.pod:3284 ../fish/guestfish-actions.pod:3595
5820 #: ../fish/guestfish-actions.pod:3643 ../fish/guestfish-actions.pod:4561
5821 #: ../fish/guestfish-actions.pod:4581 ../fish/guestfish-actions.pod:4600
5822 #: ../fish/guestfish-actions.pod:4638 ../fish/guestfish-actions.pod:5287
5823 #: ../fish/guestfish-actions.pod:5390 ../src/guestfs-actions.pod:10
5824 #: ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326
5825 #: ../src/guestfs-actions.pod:1580 ../src/guestfs-actions.pod:1637
5826 #: ../src/guestfs-actions.pod:1920 ../src/guestfs-actions.pod:2419
5827 #: ../src/guestfs-actions.pod:2440 ../src/guestfs-actions.pod:5076
5828 #: ../src/guestfs-actions.pod:5598 ../src/guestfs-actions.pod:5698
5829 #: ../src/guestfs-actions.pod:6994 ../src/guestfs-actions.pod:7035
5830 #: ../src/guestfs-actions.pod:7066 ../src/guestfs-actions.pod:7126
5831 #: ../src/guestfs-actions.pod:8058 ../src/guestfs-actions.pod:8167
5832 #: ../src/guestfs-actions.pod:8347
5834 "Deprecated functions will not be removed from the API, but the fact that "
5835 "they are deprecated indicates that there are problems with correct use of "
5840 #: ../fish/guestfish-actions.pod:35
5845 #: ../fish/guestfish-actions.pod:37
5850 #: ../fish/guestfish-actions.pod:39
5853 " add-domain dom [libvirturi:..] [readonly:true|false] [iface:..] [live:true|false] [allowuuid:true|false] [readonlydisk:..]\n"
5858 #: ../fish/guestfish-actions.pod:41
5860 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
5861 "It works by connecting to libvirt, requesting the domain and domain XML from "
5862 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
5866 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
5868 "The number of disks added is returned. This operation is atomic: if an "
5869 "error is returned, then no disks are added."
5873 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
5875 "This function does some minimal checks to make sure the libvirt domain is "
5876 "not running (unless C<readonly> is true). In a future version we will try "
5877 "to acquire the libvirt lock on each disk."
5881 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
5883 "Disks must be accessible locally. This often means that adding disks from a "
5884 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
5885 "unless those disks are accessible via the same device path locally too."
5889 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
5891 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
5892 "libvirt.org/uri.html>). If this is not set then we connect to the default "
5893 "libvirt URI (or one set through an environment variable, see the libvirt "
5894 "documentation for full details)."
5898 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
5900 "The optional C<live> flag controls whether this call will try to connect to "
5901 "a running virtual machine C<guestfsd> process if it sees a suitable "
5902 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
5903 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
5904 "DAEMONS> for more information."
5908 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
5910 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
5911 "passed instead of the domain name. The C<dom> string is treated as a UUID "
5912 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
5917 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
5919 "The optional C<readonlydisk> parameter controls what we do for disks which "
5920 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
5924 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
5925 msgid "readonlydisk = \"error\""
5929 #: ../fish/guestfish-actions.pod:84 ../fish/guestfish-actions.pod:95
5930 #: ../fish/guestfish-actions.pod:106 ../src/guestfs-actions.pod:103
5931 #: ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:125
5932 msgid "If C<readonly> is false:"
5936 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
5938 "The whole call is aborted with an error if any disk with the E<lt>readonly/"
5939 "E<gt> flag is found."
5943 #: ../fish/guestfish-actions.pod:89 ../fish/guestfish-actions.pod:100
5944 #: ../fish/guestfish-actions.pod:110 ../src/guestfs-actions.pod:108
5945 #: ../src/guestfs-actions.pod:119 ../src/guestfs-actions.pod:129
5946 msgid "If C<readonly> is true:"
5950 #: ../fish/guestfish-actions.pod:91 ../fish/guestfish-actions.pod:102
5951 #: ../fish/guestfish-actions.pod:112 ../src/guestfs-actions.pod:110
5952 #: ../src/guestfs-actions.pod:121 ../src/guestfs-actions.pod:131
5953 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
5957 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
5958 msgid "readonlydisk = \"read\""
5962 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
5964 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
5965 "are added read/write."
5969 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
5970 msgid "readonlydisk = \"write\" (default)"
5974 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
5975 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
5979 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
5980 msgid "readonlydisk = \"ignore\""
5984 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
5985 msgid "If C<readonly> is true or false:"
5989 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
5990 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
5994 #: ../fish/guestfish-actions.pod:122
5996 "The other optional parameters are passed directly through to L</add-drive-"
6001 #: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:194
6002 #: ../fish/guestfish-actions.pod:624 ../fish/guestfish-actions.pod:835
6003 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:894
6004 #: ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:912
6005 #: ../fish/guestfish-actions.pod:926 ../fish/guestfish-actions.pod:2171
6006 #: ../fish/guestfish-actions.pod:3333 ../fish/guestfish-actions.pod:3496
6007 #: ../fish/guestfish-actions.pod:3631
6009 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
6013 #: ../fish/guestfish-actions.pod:127
6018 #: ../fish/guestfish-actions.pod:129
6021 " add-drive filename\n"
6026 #: ../fish/guestfish-actions.pod:131
6028 "This function is the equivalent of calling L</add-drive-opts> with no "
6029 "optional parameters, so the disk is added writable, with the format being "
6030 "detected automatically."
6034 #: ../fish/guestfish-actions.pod:135
6036 "Automatic detection of the format opens you up to a potential security hole "
6037 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6038 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6039 "you should think about replacing calls to this function with calls to L</add-"
6040 "drive-opts>, and specifying the format."
6044 #: ../fish/guestfish-actions.pod:142
6045 msgid "add-drive-opts"
6049 #: ../fish/guestfish-actions.pod:144
6054 #: ../fish/guestfish-actions.pod:146
6057 " add-drive-opts filename [readonly:true|false] [format:..] [iface:..] [name:..]\n"
6062 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
6064 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6065 "The first time you call this function, the disk appears as C</dev/sda>, the "
6066 "second time as C</dev/sdb>, and so on."
6070 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
6072 "You don't necessarily need to be root when using libguestfs. However you "
6073 "obviously do need sufficient permissions to access the filename for whatever "
6074 "operations you want to perform (ie. read access if you just want to read the "
6075 "image or write access if you want to modify the image)."
6079 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
6080 msgid "This call checks that C<filename> exists."
6084 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3295
6085 #: ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5113
6086 msgid "The optional arguments are:"
6090 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6095 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6097 "If true then the image is treated as read-only. Writes are still allowed, "
6098 "but they are stored in a temporary snapshot overlay which is discarded at "
6099 "the end. The disk that you add is not modified."
6103 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6108 #: ../fish/guestfish-actions.pod:173
6110 "This forces the image format. If you omit this (or use L</add-drive> or L</"
6111 "add-drive-ro>) then the format is automatically detected. Possible formats "
6112 "include C<raw> and C<qcow2>."
6116 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6118 "Automatic detection of the format opens you up to a potential security hole "
6119 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6120 "RHBZ#642934. Specifying the format closes this security hole."
6124 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6129 #: ../fish/guestfish-actions.pod:184
6131 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
6132 "add-drive-with-if> call (q.v.)"
6136 #: ../fish/guestfish-actions.pod:187 ../src/guestfs-actions.pod:247
6141 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
6143 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
6144 "a hint to the guest inspection process if it is available."
6148 #: ../fish/guestfish-actions.pod:196
6149 msgid "add-drive-ro"
6153 #: ../fish/guestfish-actions.pod:198
6158 #: ../fish/guestfish-actions.pod:200
6161 " add-drive-ro filename\n"
6166 #: ../fish/guestfish-actions.pod:202
6168 "This function is the equivalent of calling L</add-drive-opts> with the "
6169 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6170 "is added read-only, with the format being detected automatically."
6174 #: ../fish/guestfish-actions.pod:207
6175 msgid "add-drive-ro-with-if"
6179 #: ../fish/guestfish-actions.pod:209
6182 " add-drive-ro-with-if filename iface\n"
6187 #: ../fish/guestfish-actions.pod:211
6189 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6190 "interface emulation to use at run time."
6194 #: ../fish/guestfish-actions.pod:221
6195 msgid "add-drive-with-if"
6199 #: ../fish/guestfish-actions.pod:223
6202 " add-drive-with-if filename iface\n"
6207 #: ../fish/guestfish-actions.pod:225
6209 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6210 "interface emulation to use at run time."
6214 #: ../fish/guestfish-actions.pod:235
6219 #: ../fish/guestfish-actions.pod:237
6222 " aug-clear augpath\n"
6227 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
6229 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6230 "L<augtool(1)> C<clear> command."
6234 #: ../fish/guestfish-actions.pod:242
6239 #: ../fish/guestfish-actions.pod:244
6247 #: ../fish/guestfish-actions.pod:246
6249 "Close the current Augeas handle and free up any resources used by it. After "
6250 "calling this, you have to call L</aug-init> again before you can use any "
6251 "other Augeas functions."
6255 #: ../fish/guestfish-actions.pod:251
6260 #: ../fish/guestfish-actions.pod:253
6263 " aug-defnode name expr val\n"
6268 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
6270 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6274 #: ../fish/guestfish-actions.pod:258
6276 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6277 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6278 "containing that single node."
6282 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
6284 "On success this returns a pair containing the number of nodes in the "
6285 "nodeset, and a boolean flag if a node was created."
6289 #: ../fish/guestfish-actions.pod:266
6294 #: ../fish/guestfish-actions.pod:268
6297 " aug-defvar name expr\n"
6302 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
6304 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6305 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6309 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
6311 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6312 "evaluates to something which is not a nodeset."
6316 #: ../fish/guestfish-actions.pod:277
6321 #: ../fish/guestfish-actions.pod:279
6324 " aug-get augpath\n"
6329 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
6331 "Look up the value associated with C<path>. If C<path> matches exactly one "
6332 "node, the C<value> is returned."
6336 #: ../fish/guestfish-actions.pod:284
6341 #: ../fish/guestfish-actions.pod:286
6344 " aug-init root flags\n"
6349 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
6351 "Create a new Augeas handle for editing configuration files. If there was "
6352 "any previous Augeas handle associated with this guestfs session, then it is "
6357 #: ../fish/guestfish-actions.pod:292
6358 msgid "You must call this before using any other L</aug-*> commands."
6362 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
6364 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6368 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
6370 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6371 "logical I<or> of the following integers:"
6375 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
6376 msgid "C<AUG_SAVE_BACKUP> = 1"
6380 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
6381 msgid "Keep the original file with a C<.augsave> extension."
6385 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
6386 msgid "C<AUG_SAVE_NEWFILE> = 2"
6390 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
6392 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6393 "original. Overrides C<AUG_SAVE_BACKUP>."
6397 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
6398 msgid "C<AUG_TYPE_CHECK> = 4"
6402 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
6403 msgid "Typecheck lenses."
6407 #: ../fish/guestfish-actions.pod:317
6409 "This option is only useful when debugging Augeas lenses. Use of this option "
6410 "may require additional memory for the libguestfs appliance. You may need to "
6411 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
6415 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
6416 msgid "C<AUG_NO_STDINC> = 8"
6420 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
6421 msgid "Do not use standard load path for modules."
6425 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
6426 msgid "C<AUG_SAVE_NOOP> = 16"
6430 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
6431 msgid "Make save a no-op, just record what would have been changed."
6435 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
6436 msgid "C<AUG_NO_LOAD> = 32"
6440 #: ../fish/guestfish-actions.pod:332
6441 msgid "Do not load the tree in L</aug-init>."
6445 #: ../fish/guestfish-actions.pod:336
6446 msgid "To close the handle, you can call L</aug-close>."
6450 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
6451 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6455 #: ../fish/guestfish-actions.pod:340
6460 #: ../fish/guestfish-actions.pod:342
6463 " aug-insert augpath label true|false\n"
6468 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
6470 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6471 "or after C<path> (depending on the boolean flag C<before>)."
6475 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
6477 "C<path> must match exactly one existing node in the tree, and C<label> must "
6478 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6482 #: ../fish/guestfish-actions.pod:352
6487 #: ../fish/guestfish-actions.pod:354
6495 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
6496 msgid "Load files into the tree."
6500 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
6501 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6505 #: ../fish/guestfish-actions.pod:361
6510 #: ../fish/guestfish-actions.pod:363
6518 #: ../fish/guestfish-actions.pod:365
6520 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6521 "resulting nodes into alphabetical order."
6525 #: ../fish/guestfish-actions.pod:368
6530 #: ../fish/guestfish-actions.pod:370
6533 " aug-match augpath\n"
6538 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
6540 "Returns a list of paths which match the path expression C<path>. The "
6541 "returned paths are sufficiently qualified so that they match exactly one "
6542 "node in the current tree."
6546 #: ../fish/guestfish-actions.pod:376
6551 #: ../fish/guestfish-actions.pod:378
6554 " aug-mv src dest\n"
6559 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
6561 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6562 "C<dest> is overwritten if it exists."
6566 #: ../fish/guestfish-actions.pod:383
6571 #: ../fish/guestfish-actions.pod:385
6579 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
6580 msgid "Remove C<path> and all of its children."
6584 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
6585 msgid "On success this returns the number of entries which were removed."
6589 #: ../fish/guestfish-actions.pod:391
6594 #: ../fish/guestfish-actions.pod:393
6602 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
6603 msgid "This writes all pending changes to disk."
6607 #: ../fish/guestfish-actions.pod:397
6609 "The flags which were passed to L</aug-init> affect exactly how files are "
6614 #: ../fish/guestfish-actions.pod:400
6619 #: ../fish/guestfish-actions.pod:402
6622 " aug-set augpath val\n"
6627 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
6628 msgid "Set the value associated with C<path> to C<val>."
6632 #: ../fish/guestfish-actions.pod:406
6634 "In the Augeas API, it is possible to clear a node by setting the value to "
6635 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6636 "this call. Instead you must use the L</aug-clear> call."
6640 #: ../fish/guestfish-actions.pod:411
6645 #: ../fish/guestfish-actions.pod:413
6648 " available 'groups ...'\n"
6653 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
6655 "This command is used to check the availability of some groups of "
6656 "functionality in the appliance, which not all builds of the libguestfs "
6657 "appliance will be able to provide."
6661 #: ../fish/guestfish-actions.pod:419
6663 "The libguestfs groups, and the functions that those groups correspond to, "
6664 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6665 "runtime by calling L</available-all-groups>."
6669 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
6671 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
6672 "\"]> would check for the availability of the Linux inotify functions and "
6673 "Augeas (configuration file editing) functions."
6677 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
6678 msgid "The command returns no error if I<all> requested groups are available."
6682 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
6684 "It fails with an error if one or more of the requested groups is unavailable "
6689 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
6691 "If an unknown group name is included in the list of groups then an error is "
6696 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
6701 #: ../fish/guestfish-actions.pod:443
6702 msgid "You must call L</launch> before calling this function."
6706 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
6708 "The reason is because we don't know what groups are supported by the "
6709 "appliance/daemon until it is running and can be queried."
6713 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
6715 "If a group of functions is available, this does not necessarily mean that "
6716 "they will work. You still have to check for errors when calling individual "
6717 "API functions even if they are available."
6721 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
6723 "It is usually the job of distro packagers to build complete functionality "
6724 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6725 "with all requirements satisfied, will support everything."
6729 #: ../fish/guestfish-actions.pod:465
6731 "This call was added in version C<1.0.80>. In previous versions of "
6732 "libguestfs all you could do would be to speculatively execute a command to "
6733 "find out if the daemon implemented it. See also L</version>."
6737 #: ../fish/guestfish-actions.pod:472
6738 msgid "available-all-groups"
6742 #: ../fish/guestfish-actions.pod:474
6745 " available-all-groups\n"
6750 #: ../fish/guestfish-actions.pod:476
6752 "This command returns a list of all optional groups that this daemon knows "
6753 "about. Note this returns both supported and unsupported groups. To find "
6754 "out which ones the daemon can actually support you have to call L</"
6755 "available> on each member of the returned list."
6759 #: ../fish/guestfish-actions.pod:482
6760 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6764 #: ../fish/guestfish-actions.pod:484
6769 #: ../fish/guestfish-actions.pod:486
6772 " base64-in (base64file|-) filename\n"
6777 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
6779 "This command uploads base64-encoded data from C<base64file> to C<filename>."
6783 #: ../fish/guestfish-actions.pod:491 ../fish/guestfish-actions.pod:500
6784 #: ../fish/guestfish-actions.pod:749 ../fish/guestfish-actions.pod:833
6785 #: ../fish/guestfish-actions.pod:854 ../fish/guestfish-actions.pod:1025
6786 #: ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1418
6787 #: ../fish/guestfish-actions.pod:4858 ../fish/guestfish-actions.pod:4870
6788 #: ../fish/guestfish-actions.pod:4881 ../fish/guestfish-actions.pod:4892
6789 #: ../fish/guestfish-actions.pod:4944 ../fish/guestfish-actions.pod:4953
6790 #: ../fish/guestfish-actions.pod:5007 ../fish/guestfish-actions.pod:5030
6791 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6795 #: ../fish/guestfish-actions.pod:493
6800 #: ../fish/guestfish-actions.pod:495
6803 " base64-out filename (base64file|-)\n"
6808 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
6810 "This command downloads the contents of C<filename>, writing it out to local "
6811 "file C<base64file> encoded as base64."
6815 #: ../fish/guestfish-actions.pod:502
6816 msgid "blockdev-flushbufs"
6820 #: ../fish/guestfish-actions.pod:504
6823 " blockdev-flushbufs device\n"
6828 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
6830 "This tells the kernel to flush internal buffers associated with C<device>."
6834 #: ../fish/guestfish-actions.pod:509 ../fish/guestfish-actions.pod:520
6835 #: ../fish/guestfish-actions.pod:529 ../fish/guestfish-actions.pod:539
6836 #: ../fish/guestfish-actions.pod:551 ../fish/guestfish-actions.pod:564
6837 #: ../fish/guestfish-actions.pod:572 ../fish/guestfish-actions.pod:583
6838 #: ../fish/guestfish-actions.pod:591 ../fish/guestfish-actions.pod:599
6839 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:749
6840 #: ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:780
6841 #: ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:817
6842 #: ../src/guestfs-actions.pod:831 ../src/guestfs-actions.pod:849
6843 #: ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:877
6844 msgid "This uses the L<blockdev(8)> command."
6848 #: ../fish/guestfish-actions.pod:511
6849 msgid "blockdev-getbsz"
6853 #: ../fish/guestfish-actions.pod:513
6856 " blockdev-getbsz device\n"
6861 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
6862 msgid "This returns the block size of a device."
6866 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580
6867 #: ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
6869 "(Note this is different from both I<size in blocks> and I<filesystem block "
6874 #: ../fish/guestfish-actions.pod:522
6875 msgid "blockdev-getro"
6879 #: ../fish/guestfish-actions.pod:524
6882 " blockdev-getro device\n"
6887 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
6889 "Returns a boolean indicating if the block device is read-only (true if read-"
6890 "only, false if not)."
6894 #: ../fish/guestfish-actions.pod:531
6895 msgid "blockdev-getsize64"
6899 #: ../fish/guestfish-actions.pod:533
6902 " blockdev-getsize64 device\n"
6907 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
6908 msgid "This returns the size of the device in bytes."
6912 #: ../fish/guestfish-actions.pod:537
6913 msgid "See also L</blockdev-getsz>."
6917 #: ../fish/guestfish-actions.pod:541
6918 msgid "blockdev-getss"
6922 #: ../fish/guestfish-actions.pod:543
6925 " blockdev-getss device\n"
6930 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
6932 "This returns the size of sectors on a block device. Usually 512, but can be "
6933 "larger for modern devices."
6937 #: ../fish/guestfish-actions.pod:548
6939 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
6943 #: ../fish/guestfish-actions.pod:553
6944 msgid "blockdev-getsz"
6948 #: ../fish/guestfish-actions.pod:555
6951 " blockdev-getsz device\n"
6956 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
6958 "This returns the size of the device in units of 512-byte sectors (even if "
6959 "the sectorsize isn't 512 bytes ... weird)."
6963 #: ../fish/guestfish-actions.pod:560
6965 "See also L</blockdev-getss> for the real sector size of the device, and L</"
6966 "blockdev-getsize64> for the more useful I<size in bytes>."
6970 #: ../fish/guestfish-actions.pod:566
6971 msgid "blockdev-rereadpt"
6975 #: ../fish/guestfish-actions.pod:568
6978 " blockdev-rereadpt device\n"
6983 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
6984 msgid "Reread the partition table on C<device>."
6988 #: ../fish/guestfish-actions.pod:574
6989 msgid "blockdev-setbsz"
6993 #: ../fish/guestfish-actions.pod:576
6996 " blockdev-setbsz device blocksize\n"
7001 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
7002 msgid "This sets the block size of a device."
7006 #: ../fish/guestfish-actions.pod:585
7007 msgid "blockdev-setro"
7011 #: ../fish/guestfish-actions.pod:587
7014 " blockdev-setro device\n"
7019 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
7020 msgid "Sets the block device named C<device> to read-only."
7024 #: ../fish/guestfish-actions.pod:593
7025 msgid "blockdev-setrw"
7029 #: ../fish/guestfish-actions.pod:595
7032 " blockdev-setrw device\n"
7037 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
7038 msgid "Sets the block device named C<device> to read-write."
7042 #: ../fish/guestfish-actions.pod:601
7043 msgid "btrfs-filesystem-resize"
7047 #: ../fish/guestfish-actions.pod:603
7050 " btrfs-filesystem-resize mountpoint [size:N]\n"
7055 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
7056 msgid "This command resizes a btrfs filesystem."
7060 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
7062 "Note that unlike other resize calls, the filesystem has to be mounted and "
7063 "the parameter is the mountpoint not the device (this is a requirement of "
7068 #: ../fish/guestfish-actions.pod:611 ../fish/guestfish-actions.pod:3606
7069 #: ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:5637
7070 msgid "The optional parameters are:"
7074 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3610
7075 #: ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5641
7080 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
7082 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7083 "resized to the maximum size."
7087 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
7088 msgid "See also L<btrfs(8)>."
7092 #: ../fish/guestfish-actions.pod:626
7093 msgid "case-sensitive-path"
7097 #: ../fish/guestfish-actions.pod:628
7100 " case-sensitive-path path\n"
7105 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
7107 "This can be used to resolve case insensitive paths on a filesystem which is "
7108 "case sensitive. The use case is to resolve paths which you have read from "
7109 "Windows configuration files or the Windows Registry, to the true path."
7113 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
7115 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7116 "(and probably others), which is that although the underlying filesystem is "
7117 "case-insensitive, the driver exports the filesystem to Linux as case-"
7122 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
7124 "One consequence of this is that special directories such as C<c:\\windows> "
7125 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7126 "precise details of how they were created. In Windows itself this would not "
7131 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
7133 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7138 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
7140 "This function resolves the true case of each element in the path and returns "
7141 "the case-sensitive path."
7145 #: ../fish/guestfish-actions.pod:652
7147 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
7148 "WINDOWS/system32\"> (the exact return value would depend on details of how "
7149 "the directories were originally created under Windows)."
7153 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
7154 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7158 #: ../fish/guestfish-actions.pod:660
7159 msgid "See also L</realpath>."
7163 #: ../fish/guestfish-actions.pod:662
7168 #: ../fish/guestfish-actions.pod:664
7176 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4037
7177 #: ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6297
7178 msgid "Return the contents of the file named C<path>."
7182 #: ../fish/guestfish-actions.pod:668
7184 "Note that this function cannot correctly handle binary files (specifically, "
7185 "files containing C<\\0> character which is treated as end of string). For "
7186 "those you need to use the L</read-file> or L</download> functions which have "
7187 "a more complex interface."
7191 #: ../fish/guestfish-actions.pod:673 ../fish/guestfish-actions.pod:808
7192 #: ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:1103
7193 #: ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1180
7194 #: ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1382
7195 #: ../fish/guestfish-actions.pod:1695 ../fish/guestfish-actions.pod:1705
7196 #: ../fish/guestfish-actions.pod:1755 ../fish/guestfish-actions.pod:1770
7197 #: ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1799
7198 #: ../fish/guestfish-actions.pod:3907 ../fish/guestfish-actions.pod:3922
7199 #: ../fish/guestfish-actions.pod:3998 ../fish/guestfish-actions.pod:4015
7200 #: ../fish/guestfish-actions.pod:4030 ../fish/guestfish-actions.pod:4699
7201 #: ../fish/guestfish-actions.pod:4745 ../fish/guestfish-actions.pod:4830
7202 #: ../fish/guestfish-actions.pod:4845 ../fish/guestfish-actions.pod:5251
7203 #: ../fish/guestfish-actions.pod:5263 ../fish/guestfish-actions.pod:5281
7204 #: ../fish/guestfish-actions.pod:5298 ../fish/guestfish-actions.pod:5308
7205 #: ../fish/guestfish-actions.pod:5362 ../fish/guestfish-actions.pod:5372
7206 #: ../fish/guestfish-actions.pod:5401 ../fish/guestfish-actions.pod:5411
7207 #: ../src/guestfs-actions.pod:1001 ../src/guestfs-actions.pod:1180
7208 #: ../src/guestfs-actions.pod:1200 ../src/guestfs-actions.pod:1855
7209 #: ../src/guestfs-actions.pod:1874 ../src/guestfs-actions.pod:1977
7210 #: ../src/guestfs-actions.pod:1996 ../src/guestfs-actions.pod:2242
7211 #: ../src/guestfs-actions.pod:2724 ../src/guestfs-actions.pod:2743
7212 #: ../src/guestfs-actions.pod:2808 ../src/guestfs-actions.pod:2832
7213 #: ../src/guestfs-actions.pod:2849 ../src/guestfs-actions.pod:2878
7214 #: ../src/guestfs-actions.pod:6079 ../src/guestfs-actions.pod:6105
7215 #: ../src/guestfs-actions.pod:6236 ../src/guestfs-actions.pod:6262
7216 #: ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:7241
7217 #: ../src/guestfs-actions.pod:7296 ../src/guestfs-actions.pod:7442
7218 #: ../src/guestfs-actions.pod:7466 ../src/guestfs-actions.pod:8131
7219 #: ../src/guestfs-actions.pod:8151 ../src/guestfs-actions.pod:8184
7220 #: ../src/guestfs-actions.pod:8203 ../src/guestfs-actions.pod:8222
7221 #: ../src/guestfs-actions.pod:8313 ../src/guestfs-actions.pod:8332
7222 #: ../src/guestfs-actions.pod:8378 ../src/guestfs-actions.pod:8397
7224 "Because of the message protocol, there is a transfer limit of somewhere "
7225 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7229 #: ../fish/guestfish-actions.pod:676
7234 #: ../fish/guestfish-actions.pod:678
7237 " checksum csumtype path\n"
7242 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
7244 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7248 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
7250 "The type of checksum to compute is given by the C<csumtype> parameter which "
7251 "must have one of the following values:"
7255 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
7260 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
7262 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7267 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
7272 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
7273 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7277 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
7282 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
7283 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7287 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
7292 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
7293 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7297 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
7302 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
7303 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7307 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
7312 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
7313 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7317 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
7322 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
7323 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7327 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
7328 msgid "The checksum is returned as a printable string."
7332 #: ../fish/guestfish-actions.pod:721
7333 msgid "To get the checksum for a device, use L</checksum-device>."
7337 #: ../fish/guestfish-actions.pod:723
7338 msgid "To get the checksums for many files, use L</checksums-out>."
7342 #: ../fish/guestfish-actions.pod:725
7343 msgid "checksum-device"
7347 #: ../fish/guestfish-actions.pod:727
7350 " checksum-device csumtype device\n"
7355 #: ../fish/guestfish-actions.pod:729
7357 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7358 "device named C<device>. For the types of checksums supported see the L</"
7359 "checksum> command."
7363 #: ../fish/guestfish-actions.pod:733
7364 msgid "checksums-out"
7368 #: ../fish/guestfish-actions.pod:735
7371 " checksums-out csumtype directory (sumsfile|-)\n"
7376 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
7378 "This command computes the checksums of all regular files in C<directory> and "
7379 "then emits a list of those checksums to the local output file C<sumsfile>."
7383 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
7385 "This can be used for verifying the integrity of a virtual machine. However "
7386 "to be properly secure you should pay attention to the output of the checksum "
7387 "command (it uses the ones from GNU coreutils). In particular when the "
7388 "filename is not printable, coreutils uses a special backslash syntax. For "
7389 "more information, see the GNU coreutils info file."
7393 #: ../fish/guestfish-actions.pod:751
7398 #: ../fish/guestfish-actions.pod:753
7401 " chmod mode path\n"
7406 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
7408 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7413 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
7415 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7416 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7421 #: ../fish/guestfish-actions.pod:762 ../fish/guestfish-actions.pod:3259
7422 #: ../fish/guestfish-actions.pod:3398 ../fish/guestfish-actions.pod:3408
7423 #: ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:1117
7424 #: ../src/guestfs-actions.pod:5044 ../src/guestfs-actions.pod:5253
7425 #: ../src/guestfs-actions.pod:5272 ../src/guestfs-actions.pod:5291
7426 msgid "The mode actually set is affected by the umask."
7430 #: ../fish/guestfish-actions.pod:764
7435 #: ../fish/guestfish-actions.pod:766
7438 " chown owner group path\n"
7443 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
7444 msgid "Change the file owner to C<owner> and group to C<group>."
7448 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2703
7449 #: ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4124
7451 "Only numeric uid and gid are supported. If you want to use names, you will "
7452 "need to locate and parse the password file yourself (Augeas support makes "
7453 "this relatively easy)."
7457 #: ../fish/guestfish-actions.pod:774
7462 #: ../fish/guestfish-actions.pod:776
7465 " command 'arguments ...'\n"
7470 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
7472 "This call runs a command from the guest filesystem. The filesystem must be "
7473 "mounted, and must contain a compatible operating system (ie. something "
7474 "Linux, with the same or compatible processor architecture)."
7478 #: ../fish/guestfish-actions.pod:783
7480 "The single parameter is an argv-style list of arguments. The first element "
7481 "is the name of the program to run. Subsequent elements are parameters. The "
7482 "list must be non-empty (ie. must contain a program name). Note that the "
7483 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7487 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
7488 msgid "The return value is anything printed to I<stdout> by the command."
7492 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
7494 "If the command returns a non-zero exit status, then this function returns an "
7495 "error message. The error message string is the content of I<stderr> from "
7500 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
7502 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
7503 "bin>. If you require a program from another location, you should provide "
7504 "the full path in the first parameter."
7508 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
7510 "Shared libraries and data files required by the program must be available on "
7511 "filesystems which are mounted in the correct places. It is the caller's "
7512 "responsibility to ensure all filesystems that are needed are mounted at the "
7517 #: ../fish/guestfish-actions.pod:811
7518 msgid "command-lines"
7522 #: ../fish/guestfish-actions.pod:813
7525 " command-lines 'arguments ...'\n"
7530 #: ../fish/guestfish-actions.pod:815
7532 "This is the same as L</command>, but splits the result into a list of lines."
7536 #: ../fish/guestfish-actions.pod:818
7537 msgid "See also: L</sh-lines>"
7541 #: ../fish/guestfish-actions.pod:823
7542 msgid "compress-device-out"
7546 #: ../fish/guestfish-actions.pod:825
7549 " compress-device-out ctype device (zdevice|-) [level:N]\n"
7554 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
7556 "This command compresses C<device> and writes it out to the local file "
7561 #: ../fish/guestfish-actions.pod:830
7563 "The C<ctype> and optional C<level> parameters have the same meaning as in L</"
7568 #: ../fish/guestfish-actions.pod:837
7569 msgid "compress-out"
7573 #: ../fish/guestfish-actions.pod:839
7576 " compress-out ctype file (zfile|-) [level:N]\n"
7581 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
7583 "This command compresses C<file> and writes it out to the local file C<zfile>."
7587 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
7589 "The compression program used is controlled by the C<ctype> parameter. "
7590 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7591 "Some compression types may not be supported by particular builds of "
7592 "libguestfs, in which case you will get an error containing the substring "
7593 "\"not supported\"."
7597 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
7599 "The optional C<level> parameter controls compression level. The meaning and "
7600 "default for this parameter depends on the compression program being used."
7604 #: ../fish/guestfish-actions.pod:858
7609 #: ../fish/guestfish-actions.pod:860
7612 " config qemuparam qemuvalue\n"
7617 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
7619 "This can be used to add arbitrary qemu command line parameters of the form "
7620 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7621 "setting some parameters which would interfere with parameters that we use."
7625 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
7626 msgid "The first character of C<param> string must be a C<-> (dash)."
7630 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
7631 msgid "C<value> can be NULL."
7635 #: ../fish/guestfish-actions.pod:871
7636 msgid "copy-device-to-device"
7640 #: ../fish/guestfish-actions.pod:873
7643 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7648 #: ../fish/guestfish-actions.pod:875
7650 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, L</copy-"
7651 "file-to-device>, and L</copy-file-to-file> let you copy from a source "
7652 "(device|file) to a destination (device|file)."
7656 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
7658 "Partial copies can be made since you can specify optionally the source "
7659 "offset, destination offset and size to copy. These values are all specified "
7660 "in bytes. If not given, the offsets both default to zero, and the size "
7661 "defaults to copying as much as possible until we hit the end of the source."
7665 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
7667 "The source and destination may be the same object. However overlapping "
7668 "regions may not be copied correctly."
7672 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
7674 "If the destination is a file, it is created if required. If the destination "
7675 "file is not large enough, it is extended."
7679 #: ../fish/guestfish-actions.pod:896
7680 msgid "copy-device-to-file"
7684 #: ../fish/guestfish-actions.pod:898
7687 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7692 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909
7693 #: ../fish/guestfish-actions.pod:918
7694 msgid "See L</copy-device-to-device> for a general overview of this call."
7698 #: ../fish/guestfish-actions.pod:905
7699 msgid "copy-file-to-device"
7703 #: ../fish/guestfish-actions.pod:907
7706 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7711 #: ../fish/guestfish-actions.pod:914
7712 msgid "copy-file-to-file"
7716 #: ../fish/guestfish-actions.pod:916
7719 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7724 #: ../fish/guestfish-actions.pod:921
7726 "This is B<not> the function you want for copying files. This is for copying "
7727 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7728 "file copying and moving functions."
7732 #: ../fish/guestfish-actions.pod:928
7737 #: ../fish/guestfish-actions.pod:930
7740 " copy-size src dest size\n"
7745 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1584
7747 "This command copies exactly C<size> bytes from one source device or file "
7748 "C<src> to another destination device or file C<dest>."
7752 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1587
7754 "Note this will fail if the source is too short or if the destination is not "
7759 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
7761 "I<This function is deprecated.> In new code, use the L</"
7762 "copy_device_to_device> call instead."
7766 #: ../fish/guestfish-actions.pod:945
7771 #: ../fish/guestfish-actions.pod:947
7779 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1606
7781 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7782 "destination filename or destination directory."
7786 #: ../fish/guestfish-actions.pod:952
7791 #: ../fish/guestfish-actions.pod:954
7799 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1620
7801 "This copies a file or directory from C<src> to C<dest> recursively using the "
7806 #: ../fish/guestfish-actions.pod:959
7811 #: ../fish/guestfish-actions.pod:961
7819 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1641
7821 "This command copies from one source device or file C<src> to another "
7822 "destination device or file C<dest>. Normally you would use this to copy to "
7823 "or from a device or partition, for example to duplicate a filesystem."
7827 #: ../fish/guestfish-actions.pod:968
7829 "If the destination is a device, it must be as large or larger than the "
7830 "source file or device, otherwise the copy will fail. This command cannot do "
7831 "partial copies (see L</copy-device-to-device>)."
7835 #: ../fish/guestfish-actions.pod:980
7840 #: ../fish/guestfish-actions.pod:982
7848 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1660
7849 msgid "This command runs the C<df> command to report disk space used."
7853 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
7855 "This command is mostly useful for interactive sessions. It is I<not> "
7856 "intended that you try to parse the output string. Use L</statvfs> from "
7861 #: ../fish/guestfish-actions.pod:990
7866 #: ../fish/guestfish-actions.pod:992
7874 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1676
7876 "This command runs the C<df -h> command to report disk space used in human-"
7881 #: ../fish/guestfish-actions.pod:1001
7886 #: ../fish/guestfish-actions.pod:1003
7894 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1693
7896 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
7897 "This is sometimes useful for extended debugging of problems."
7901 #: ../fish/guestfish-actions.pod:1009
7903 "Another way to get the same information is to enable verbose messages with "
7904 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
7905 "before running the program."
7909 #: ../fish/guestfish-actions.pod:1014
7914 #: ../fish/guestfish-actions.pod:1016
7917 " download remotefilename (filename|-)\n"
7922 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031
7923 #: ../src/guestfs-actions.pod:1714 ../src/guestfs-actions.pod:1739
7925 "Download file C<remotefilename> and save it as C<filename> on the local "
7930 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5003
7931 #: ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:7701
7932 msgid "C<filename> can also be a named pipe."
7936 #: ../fish/guestfish-actions.pod:1023
7937 msgid "See also L</upload>, L</cat>."
7941 #: ../fish/guestfish-actions.pod:1027
7942 msgid "download-offset"
7946 #: ../fish/guestfish-actions.pod:1029
7949 " download-offset remotefilename (filename|-) offset size\n"
7954 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1742
7956 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
7957 "region must be within the file or device)."
7961 #: ../fish/guestfish-actions.pod:1037
7963 "Note that there is no limit on the amount of data that can be downloaded "
7964 "with this call, unlike with L</pread>, and this call always reads the full "
7965 "amount unless an error occurs."
7969 #: ../fish/guestfish-actions.pod:1042
7970 msgid "See also L</download>, L</pread>."
7974 #: ../fish/guestfish-actions.pod:1046
7979 #: ../fish/guestfish-actions.pod:1048
7982 " drop-caches whattodrop\n"
7987 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1767
7989 "This instructs the guest kernel to drop its page cache, and/or dentries and "
7990 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
7991 "to drop, see L<http://linux-mm.org/Drop_Caches>"
7995 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1772
7996 msgid "Setting C<whattodrop> to 3 should drop everything."
8000 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1774
8002 "This automatically calls L<sync(2)> before the operation, so that the "
8003 "maximum guest memory is freed."
8007 #: ../fish/guestfish-actions.pod:1060
8012 #: ../fish/guestfish-actions.pod:1062
8020 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1787
8022 "This command runs the C<du -s> command to estimate file space usage for "
8027 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1790
8029 "C<path> can be a file or a directory. If C<path> is a directory then the "
8030 "estimate includes the contents of the directory and all subdirectories "
8035 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1794
8037 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8041 #: ../fish/guestfish-actions.pod:1074
8046 #: ../fish/guestfish-actions.pod:1076
8049 " e2fsck-f device\n"
8054 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1812
8056 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8057 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8062 #: ../fish/guestfish-actions.pod:1082
8064 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8065 "should use L</fsck>."
8069 #: ../fish/guestfish-actions.pod:1085
8074 #: ../fish/guestfish-actions.pod:1087
8077 " echo-daemon 'words ...'\n"
8082 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1829
8084 "This command concatenates the list of C<words> passed with single spaces "
8085 "between them and returns the resulting string."
8089 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1832
8090 msgid "You can use this command to test the connection through to the daemon."
8094 #: ../fish/guestfish-actions.pod:1094
8095 msgid "See also L</ping-daemon>."
8099 #: ../fish/guestfish-actions.pod:1096
8104 #: ../fish/guestfish-actions.pod:1098
8107 " egrep regex path\n"
8112 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1848
8114 "This calls the external C<egrep> program and returns the matching lines."
8118 #: ../fish/guestfish-actions.pod:1106
8123 #: ../fish/guestfish-actions.pod:1108
8126 " egrepi regex path\n"
8131 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1867
8133 "This calls the external C<egrep -i> program and returns the matching lines."
8137 #: ../fish/guestfish-actions.pod:1116
8142 #: ../fish/guestfish-actions.pod:1118
8145 " equal file1 file2\n"
8150 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1886
8152 "This compares the two files C<file1> and C<file2> and returns true if their "
8153 "content is exactly equal, or false otherwise."
8157 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1889
8158 msgid "The external L<cmp(1)> program is used for the comparison."
8162 #: ../fish/guestfish-actions.pod:1125
8167 #: ../fish/guestfish-actions.pod:1127
8175 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1901
8177 "This returns C<true> if and only if there is a file, directory (or anything) "
8178 "with the given C<path> name."
8182 #: ../fish/guestfish-actions.pod:1132
8183 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8187 #: ../fish/guestfish-actions.pod:1134
8192 #: ../fish/guestfish-actions.pod:1136
8195 " fallocate path len\n"
8200 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157
8201 #: ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:1943
8203 "This command preallocates a file (containing zero bytes) named C<path> of "
8204 "size C<len> bytes. If the file exists already, it is overwritten."
8208 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1928
8210 "Do not confuse this with the guestfish-specific C<alloc> command which "
8211 "allocates a file in the host and attaches it as a device."
8215 #: ../fish/guestfish-actions.pod:1146
8217 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8222 #: ../fish/guestfish-actions.pod:1153
8227 #: ../fish/guestfish-actions.pod:1155
8230 " fallocate64 path len\n"
8235 #: ../fish/guestfish-actions.pod:1161
8237 "Note that this call allocates disk blocks for the file. To create a sparse "
8238 "file use L</truncate-size> instead."
8242 #: ../fish/guestfish-actions.pod:1164
8244 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8245 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8246 "maximum size of files created through that call to 1GB."
8250 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1955
8252 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8253 "commands which create a file in the host and attach it as a device."
8257 #: ../fish/guestfish-actions.pod:1173
8262 #: ../fish/guestfish-actions.pod:1175
8265 " fgrep pattern path\n"
8270 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1970
8272 "This calls the external C<fgrep> program and returns the matching lines."
8276 #: ../fish/guestfish-actions.pod:1183
8281 #: ../fish/guestfish-actions.pod:1185
8284 " fgrepi pattern path\n"
8289 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1989
8291 "This calls the external C<fgrep -i> program and returns the matching lines."
8295 #: ../fish/guestfish-actions.pod:1193
8300 #: ../fish/guestfish-actions.pod:1195
8308 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:2007
8310 "This call uses the standard L<file(1)> command to determine the type or "
8311 "contents of the file."
8315 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2010
8317 "This call will also transparently look inside various types of compressed "
8322 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2013
8324 "The exact command which runs is C<file -zb path>. Note in particular that "
8325 "the filename is not prepended to the output (the I<-b> option)."
8329 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2017
8331 "The output depends on the output of the underlying L<file(1)> command and it "
8332 "can change in future in ways beyond our control. In other words, the output "
8333 "is not guaranteed by the ABI."
8337 #: ../fish/guestfish-actions.pod:1211
8339 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8340 "(etc), L</is-zero>."
8344 #: ../fish/guestfish-actions.pod:1214
8345 msgid "file-architecture"
8349 #: ../fish/guestfish-actions.pod:1216
8352 " file-architecture filename\n"
8357 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2035
8359 "This detects the architecture of the binary C<filename>, and returns it if "
8364 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2038
8365 msgid "Currently defined architectures are:"
8369 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2042
8374 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2044
8376 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8377 "irrespective of the precise processor requirements of the binary."
8381 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2047
8386 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2049
8387 msgid "64 bit x86-64."
8391 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2051
8396 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2053
8397 msgid "32 bit SPARC."
8401 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2055
8406 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2057
8407 msgid "64 bit SPARC V9 and above."
8411 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2059
8416 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2061
8417 msgid "Intel Itanium."
8421 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2063
8426 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2065
8427 msgid "32 bit Power PC."
8431 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2067
8436 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2069
8437 msgid "64 bit Power PC."
8441 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2073
8442 msgid "Libguestfs may return other architecture strings in future."
8446 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2075
8447 msgid "The function works on at least the following types of files:"
8451 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2081
8452 msgid "many types of Un*x and Linux binary"
8456 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2085
8457 msgid "many types of Un*x and Linux shared library"
8461 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2089
8462 msgid "Windows Win32 and Win64 binaries"
8466 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2093
8467 msgid "Windows Win32 and Win64 DLLs"
8471 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2095
8472 msgid "Win32 binaries and DLLs return C<i386>."
8476 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2097
8477 msgid "Win64 binaries and DLLs return C<x86_64>."
8481 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2101
8482 msgid "Linux kernel modules"
8486 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2105
8487 msgid "Linux new-style initrd images"
8491 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2109
8492 msgid "some non-x86 Linux vmlinuz kernels"
8496 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2113
8497 msgid "What it can't do currently:"
8501 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2119
8502 msgid "static libraries (libfoo.a)"
8506 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2123
8507 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8511 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2127
8512 msgid "x86 Linux vmlinuz kernels"
8516 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2129
8518 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8519 "compressed code, and are horribly hard to unpack. If you want to find the "
8520 "architecture of a kernel, use the architecture of the associated initrd or "
8521 "kernel module(s) instead."
8525 #: ../fish/guestfish-actions.pod:1319
8530 #: ../fish/guestfish-actions.pod:1321
8538 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2147
8539 msgid "This command returns the size of C<file> in bytes."
8543 #: ../fish/guestfish-actions.pod:1325
8545 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
8546 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
8550 #: ../fish/guestfish-actions.pod:1329
8555 #: ../fish/guestfish-actions.pod:1331
8558 " fill c len path\n"
8563 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2165
8565 "This command creates a new file called C<path>. The initial content of the "
8566 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
8571 #: ../fish/guestfish-actions.pod:1337
8573 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8574 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8579 #: ../fish/guestfish-actions.pod:1342
8580 msgid "fill-pattern"
8584 #: ../fish/guestfish-actions.pod:1344
8587 " fill-pattern pattern len path\n"
8592 #: ../fish/guestfish-actions.pod:1346
8594 "This function is like L</fill> except that it creates a new file of length "
8595 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8596 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8601 #: ../fish/guestfish-actions.pod:1351
8606 #: ../fish/guestfish-actions.pod:1353
8614 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2211
8616 "This command lists out all files and directories, recursively, starting at "
8617 "C<directory>. It is essentially equivalent to running the shell command "
8618 "C<find directory -print> but some post-processing happens on the output, "
8623 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2216
8625 "This returns a list of strings I<without any prefix>. Thus if the directory "
8630 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2219
8640 #: ../fish/guestfish-actions.pod:1367
8641 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8645 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2226
8656 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2231
8657 msgid "If C<directory> is not a directory, then this command returns an error."
8661 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2234
8662 msgid "The returned list is sorted."
8666 #: ../fish/guestfish-actions.pod:1380
8667 msgid "See also L</find0>."
8671 #: ../fish/guestfish-actions.pod:1385
8676 #: ../fish/guestfish-actions.pod:1387
8679 " find0 directory (files|-)\n"
8684 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2254
8686 "This command lists out all files and directories, recursively, starting at "
8687 "C<directory>, placing the resulting list in the external file called "
8692 #: ../fish/guestfish-actions.pod:1393
8694 "This command works the same way as L</find> with the following exceptions:"
8698 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2265
8699 msgid "The resulting list is written to an external file."
8703 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2269
8705 "Items (filenames) in the result are separated by C<\\0> characters. See "
8706 "L<find(1)> option I<-print0>."
8710 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2274
8711 msgid "This command is not limited in the number of names that it can return."
8715 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2279
8716 msgid "The result list is not sorted."
8720 #: ../fish/guestfish-actions.pod:1420
8721 msgid "findfs-label"
8725 #: ../fish/guestfish-actions.pod:1422
8728 " findfs-label label\n"
8733 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2293
8735 "This command searches the filesystems and returns the one which has the "
8736 "given label. An error is returned if no such filesystem can be found."
8740 #: ../fish/guestfish-actions.pod:1428
8741 msgid "To find the label of a filesystem, use L</vfs-label>."
8745 #: ../fish/guestfish-actions.pod:1430
8750 #: ../fish/guestfish-actions.pod:1432
8753 " findfs-uuid uuid\n"
8758 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2310
8760 "This command searches the filesystems and returns the one which has the "
8761 "given UUID. An error is returned if no such filesystem can be found."
8765 #: ../fish/guestfish-actions.pod:1438
8766 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8770 #: ../fish/guestfish-actions.pod:1440
8775 #: ../fish/guestfish-actions.pod:1442
8778 " fsck fstype device\n"
8783 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2328
8785 "This runs the filesystem checker (fsck) on C<device> which should have "
8786 "filesystem type C<fstype>."
8790 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2331
8792 "The returned integer is the status. See L<fsck(8)> for the list of status "
8793 "codes from C<fsck>."
8797 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2340
8798 msgid "Multiple status codes can be summed together."
8802 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2344
8804 "A non-zero return code can mean \"success\", for example if errors have been "
8805 "corrected on the filesystem."
8809 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
8810 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8814 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2354
8816 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8820 #: ../fish/guestfish-actions.pod:1472
8825 #: ../fish/guestfish-actions.pod:1474
8833 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2365
8835 "Return the additional kernel options which are added to the guest kernel "
8840 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2368
8841 msgid "If C<NULL> then no options are added."
8845 #: ../fish/guestfish-actions.pod:1481
8846 msgid "get-attach-method"
8850 #: ../fish/guestfish-actions.pod:1483
8853 " get-attach-method\n"
8858 #: ../fish/guestfish-actions.pod:1485
8859 msgid "Return the current attach method. See L</set-attach-method>."
8863 #: ../fish/guestfish-actions.pod:1487
8864 msgid "get-autosync"
8868 #: ../fish/guestfish-actions.pod:1489
8876 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2393
8877 msgid "Get the autosync flag."
8881 #: ../fish/guestfish-actions.pod:1493
8886 #: ../fish/guestfish-actions.pod:1495
8894 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2404
8895 msgid "Return the direct appliance mode flag."
8899 #: ../fish/guestfish-actions.pod:1499
8904 #: ../fish/guestfish-actions.pod:1501
8907 " get-e2label device\n"
8912 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2423
8914 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
8918 #: ../fish/guestfish-actions.pod:1506
8920 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
8925 #: ../fish/guestfish-actions.pod:1513
8930 #: ../fish/guestfish-actions.pod:1515
8933 " get-e2uuid device\n"
8938 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2444
8940 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
8944 #: ../fish/guestfish-actions.pod:1520
8946 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
8951 #: ../fish/guestfish-actions.pod:1527
8956 #: ../fish/guestfish-actions.pod:1529
8964 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2457
8966 "This gets the memory size in megabytes allocated to the qemu subprocess."
8970 #: ../fish/guestfish-actions.pod:1534
8972 "If L</set-memsize> was not called on this handle, and if "
8973 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
8974 "value for memsize."
8978 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:1595
8979 #: ../fish/guestfish-actions.pod:4360 ../fish/guestfish-actions.pod:4462
8980 #: ../src/guestfs-actions.pod:2464 ../src/guestfs-actions.pod:2556
8981 #: ../src/guestfs-actions.pod:6755 ../src/guestfs-actions.pod:6881
8983 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
8987 #: ../fish/guestfish-actions.pod:1541
8992 #: ../fish/guestfish-actions.pod:1543
9000 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2476
9001 msgid "This returns the enable network flag."
9005 #: ../fish/guestfish-actions.pod:1547
9010 #: ../fish/guestfish-actions.pod:1549
9018 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2487
9019 msgid "Return the current search path."
9023 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2489
9025 "This is always non-NULL. If it wasn't set already, then this will return "
9030 #: ../fish/guestfish-actions.pod:1556
9035 #: ../fish/guestfish-actions.pod:1558
9043 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2502
9044 msgid "This returns the process group flag."
9048 #: ../fish/guestfish-actions.pod:1562
9053 #: ../fish/guestfish-actions.pod:1564
9058 #: ../fish/guestfish-actions.pod:1566
9066 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2513
9068 "Return the process ID of the qemu subprocess. If there is no qemu "
9069 "subprocess, then this will return an error."
9073 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2516
9074 msgid "This is an internal call used for debugging and testing."
9078 #: ../fish/guestfish-actions.pod:1573
9083 #: ../fish/guestfish-actions.pod:1575
9091 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2527
9092 msgid "Return the current qemu binary."
9096 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2529
9098 "This is always non-NULL. If it wasn't set already, then this will return "
9099 "the default qemu binary name."
9103 #: ../fish/guestfish-actions.pod:1582
9104 msgid "get-recovery-proc"
9108 #: ../fish/guestfish-actions.pod:1584
9111 " get-recovery-proc\n"
9116 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2542
9117 msgid "Return the recovery process enabled flag."
9121 #: ../fish/guestfish-actions.pod:1588
9126 #: ../fish/guestfish-actions.pod:1590
9134 #: ../fish/guestfish-actions.pod:1592
9136 "This returns the current setting of the selinux flag which is passed to the "
9137 "appliance at boot time. See L</set-selinux>."
9141 #: ../fish/guestfish-actions.pod:1598
9146 #: ../fish/guestfish-actions.pod:1600
9154 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2568
9155 msgid "This returns the number of virtual CPUs assigned to the appliance."
9159 #: ../fish/guestfish-actions.pod:1604
9164 #: ../fish/guestfish-actions.pod:1606
9172 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2579
9174 "This returns the current state as an opaque integer. This is only useful "
9175 "for printing debug and internal error messages."
9179 #: ../fish/guestfish-actions.pod:1611 ../fish/guestfish-actions.pod:2570
9180 #: ../fish/guestfish-actions.pod:2588 ../fish/guestfish-actions.pod:2626
9181 #: ../fish/guestfish-actions.pod:2642 ../src/guestfs-actions.pod:2582
9182 #: ../src/guestfs-actions.pod:3901 ../src/guestfs-actions.pod:3930
9183 #: ../src/guestfs-actions.pod:3991 ../src/guestfs-actions.pod:4018
9184 msgid "For more information on states, see L<guestfs(3)>."
9188 #: ../fish/guestfish-actions.pod:1613
9193 #: ../fish/guestfish-actions.pod:1615
9201 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2593
9202 msgid "Return the command trace flag."
9206 #: ../fish/guestfish-actions.pod:1619
9211 #: ../fish/guestfish-actions.pod:1621
9219 #: ../fish/guestfish-actions.pod:1623
9221 "Return the current umask. By default the umask is C<022> unless it has been "
9222 "set by calling L</umask>."
9226 #: ../fish/guestfish-actions.pod:1626
9231 #: ../fish/guestfish-actions.pod:1628
9239 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2616
9240 msgid "This returns the verbose messages flag."
9244 #: ../fish/guestfish-actions.pod:1632
9249 #: ../fish/guestfish-actions.pod:1634
9257 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2627
9258 msgid "This gets the SELinux security context of the daemon."
9262 #: ../fish/guestfish-actions.pod:1638
9263 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9267 #: ../fish/guestfish-actions.pod:1641
9272 #: ../fish/guestfish-actions.pod:1643
9275 " getxattr path name\n"
9280 #: ../fish/guestfish-actions.pod:1645
9282 "Get a single extended attribute from file C<path> named C<name>. This call "
9283 "follows symlinks. If you want to lookup an extended attribute for the "
9284 "symlink itself, use L</lgetxattr>."
9288 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2715
9290 "Normally it is better to get all extended attributes from a file in one go "
9291 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9292 "buggy and do not provide a way to list out attributes. For these "
9293 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9294 "attributes you want in advance and call this function."
9298 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2722
9299 #: ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:4151
9301 "Extended attribute values are blobs of binary data. If there is no extended "
9302 "attribute named C<name>, this returns an error."
9306 #: ../fish/guestfish-actions.pod:1659
9307 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9311 #: ../fish/guestfish-actions.pod:1661
9316 #: ../fish/guestfish-actions.pod:1663
9324 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2673
9326 "This call lists the extended attributes of the file or directory C<path>."
9330 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2676
9332 "At the system call level, this is a combination of the L<listxattr(2)> and "
9333 "L<getxattr(2)> calls."
9337 #: ../fish/guestfish-actions.pod:1671
9338 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9342 #: ../fish/guestfish-actions.pod:1673
9347 #: ../fish/guestfish-actions.pod:1675
9350 " glob-expand pattern\n"
9355 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2693
9357 "This command searches for all the pathnames matching C<pattern> according to "
9358 "the wildcard expansion rules used by the shell."
9362 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2697
9364 "If no paths match, then this returns an empty list (note: not an error)."
9368 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2700
9370 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
9371 "GLOB_BRACE>. See that manual page for more details."
9375 #: ../fish/guestfish-actions.pod:1688
9380 #: ../fish/guestfish-actions.pod:1690
9383 " grep regex path\n"
9388 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2717
9389 msgid "This calls the external C<grep> program and returns the matching lines."
9393 #: ../fish/guestfish-actions.pod:1698
9398 #: ../fish/guestfish-actions.pod:1700
9401 " grepi regex path\n"
9406 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2736
9408 "This calls the external C<grep -i> program and returns the matching lines."
9412 #: ../fish/guestfish-actions.pod:1708
9413 msgid "grub-install"
9417 #: ../fish/guestfish-actions.pod:1710
9420 " grub-install root device\n"
9425 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2755
9427 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9428 "with the root directory being C<root>."
9432 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2764
9434 "There is currently no way in the API to install grub2, which is used by most "
9435 "modern Linux guests. It is possible to run the grub2 command from the "
9436 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9440 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2771
9442 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9443 "compatible with itself, so this only works in rather narrow circumstances. "
9444 "Careful testing with each guest version is advisable."
9448 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2778
9450 "If grub-install reports the error \"No suitable drive was found in the "
9451 "generated device map.\" it may be that you need to create a C</boot/grub/"
9452 "device.map> file first that contains the mapping between grub device names "
9453 "and Linux device names. It is usually sufficient to create a file "
9458 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2785
9466 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2787
9467 msgid "replacing C</dev/vda> with the name of the installation device."
9471 #: ../fish/guestfish-actions.pod:1748
9476 #: ../fish/guestfish-actions.pod:1750
9484 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2801
9486 "This command returns up to the first 10 lines of a file as a list of strings."
9490 #: ../fish/guestfish-actions.pod:1758
9495 #: ../fish/guestfish-actions.pod:1760
9498 " head-n nrlines path\n"
9503 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2820
9505 "If the parameter C<nrlines> is a positive number, this returns the first "
9506 "C<nrlines> lines of the file C<path>."
9510 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2823
9512 "If the parameter C<nrlines> is a negative number, this returns lines from "
9513 "the file C<path>, excluding the last C<nrlines> lines."
9517 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4843
9518 #: ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:7460
9519 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9523 #: ../fish/guestfish-actions.pod:1773
9528 #: ../fish/guestfish-actions.pod:1775
9536 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2843
9538 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
9539 "readable, canonical hex dump of the file."
9543 #: ../fish/guestfish-actions.pod:1783
9548 #: ../fish/guestfish-actions.pod:1785
9551 " initrd-cat initrdpath filename\n"
9556 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2862
9558 "This command unpacks the file C<filename> from the initrd file called "
9559 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9564 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2866
9566 "For example, in guestfish you could use the following command to examine the "
9567 "boot script (usually called C</init>) contained in a Linux initrd or "
9572 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2870
9575 " initrd-cat /boot/initrd-<version>.img init\n"
9580 #: ../fish/guestfish-actions.pod:1797
9581 msgid "See also L</initrd-list>."
9585 #: ../fish/guestfish-actions.pod:1802
9590 #: ../fish/guestfish-actions.pod:1804
9593 " initrd-list path\n"
9598 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2889
9599 msgid "This command lists out files contained in an initrd."
9603 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2891
9605 "The files are listed without any initial C</> character. The files are "
9606 "listed in the order they appear (not necessarily alphabetical). Directory "
9607 "names are listed as separate items."
9611 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2895
9613 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9614 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9619 #: ../fish/guestfish-actions.pod:1816
9620 msgid "inotify-add-watch"
9624 #: ../fish/guestfish-actions.pod:1818
9627 " inotify-add-watch path mask\n"
9632 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2912
9633 msgid "Watch C<path> for the events listed in C<mask>."
9637 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2914
9639 "Note that if C<path> is a directory then events within that directory are "
9640 "watched, but this does I<not> happen recursively (in subdirectories)."
9644 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2918
9646 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9647 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9651 #: ../fish/guestfish-actions.pod:1830
9652 msgid "inotify-close"
9656 #: ../fish/guestfish-actions.pod:1832
9664 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2931
9666 "This closes the inotify handle which was previously opened by inotify_init. "
9667 "It removes all watches, throws away any pending events, and deallocates all "
9672 #: ../fish/guestfish-actions.pod:1838
9673 msgid "inotify-files"
9677 #: ../fish/guestfish-actions.pod:1840
9685 #: ../fish/guestfish-actions.pod:1842
9687 "This function is a helpful wrapper around L</inotify-read> which just "
9688 "returns a list of pathnames of objects that were touched. The returned "
9689 "pathnames are sorted and deduplicated."
9693 #: ../fish/guestfish-actions.pod:1846
9694 msgid "inotify-init"
9698 #: ../fish/guestfish-actions.pod:1848
9701 " inotify-init maxevents\n"
9706 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2960
9708 "This command creates a new inotify handle. The inotify subsystem can be "
9709 "used to notify events which happen to objects in the guest filesystem."
9713 #: ../fish/guestfish-actions.pod:1854
9715 "C<maxevents> is the maximum number of events which will be queued up between "
9716 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9717 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9718 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9719 "but records the fact that it threw them away by setting a flag "
9720 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9724 #: ../fish/guestfish-actions.pod:1864
9726 "Before any events are generated, you have to add some watches to the "
9727 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9728 "L</inotify-watch-all>."
9732 #: ../fish/guestfish-actions.pod:1870
9734 "Queued up events should be read periodically by calling L</inotify-read> (or "
9735 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9736 "If you don't read the events out often enough then you risk the internal "
9737 "queue overflowing."
9741 #: ../fish/guestfish-actions.pod:1877
9743 "The handle should be closed after use by calling L</inotify-close>. This "
9744 "also removes any watches automatically."
9748 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2991
9750 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9751 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9752 "that there is one global inotify handle per libguestfs instance."
9756 #: ../fish/guestfish-actions.pod:1886
9757 msgid "inotify-read"
9761 #: ../fish/guestfish-actions.pod:1888
9769 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:3005
9771 "Return the complete queue of events that have happened since the previous "
9776 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3008
9777 msgid "If no events have happened, this returns an empty list."
9781 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3010
9783 "I<Note>: In order to make sure that all events have been read, you must call "
9784 "this function repeatedly until it returns an empty list. The reason is that "
9785 "the call will read events up to the maximum appliance-to-host message size "
9786 "and leave remaining events in the queue."
9790 #: ../fish/guestfish-actions.pod:1901
9791 msgid "inotify-rm-watch"
9795 #: ../fish/guestfish-actions.pod:1903
9798 " inotify-rm-watch wd\n"
9803 #: ../fish/guestfish-actions.pod:1905
9804 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9808 #: ../fish/guestfish-actions.pod:1908
9809 msgid "inspect-get-arch"
9813 #: ../fish/guestfish-actions.pod:1910
9816 " inspect-get-arch root\n"
9821 #: ../fish/guestfish-actions.pod:1912
9823 "This returns the architecture of the inspected operating system. The "
9824 "possible return values are listed under L</file-architecture>."
9828 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3045
9830 "If the architecture could not be determined, then the string C<unknown> is "
9835 #: ../fish/guestfish-actions.pod:1919 ../fish/guestfish-actions.pod:2014
9836 #: ../fish/guestfish-actions.pod:2093 ../fish/guestfish-actions.pod:2105
9837 #: ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2251
9838 #: ../fish/guestfish-actions.pod:2272 ../fish/guestfish-actions.pod:2286
9839 #: ../fish/guestfish-actions.pod:2326 ../fish/guestfish-actions.pod:2362
9840 #: ../fish/guestfish-actions.pod:2375 ../fish/guestfish-actions.pod:2388
9841 #: ../fish/guestfish-actions.pod:2398 ../fish/guestfish-actions.pod:2408
9842 #: ../fish/guestfish-actions.pod:2420 ../fish/guestfish-actions.pod:2516
9843 #: ../fish/guestfish-actions.pod:2550 ../src/guestfs-actions.pod:3048
9844 #: ../src/guestfs-actions.pod:3150 ../src/guestfs-actions.pod:3254
9845 #: ../src/guestfs-actions.pod:3273 ../src/guestfs-actions.pod:3404
9846 #: ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3516
9847 #: ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:3590
9848 #: ../src/guestfs-actions.pod:3634 ../src/guestfs-actions.pod:3654
9849 #: ../src/guestfs-actions.pod:3674 ../src/guestfs-actions.pod:3691
9850 #: ../src/guestfs-actions.pod:3707 ../src/guestfs-actions.pod:3725
9851 #: ../src/guestfs-actions.pod:3827 ../src/guestfs-actions.pod:3868
9852 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9856 #: ../fish/guestfish-actions.pod:1921
9857 msgid "inspect-get-distro"
9861 #: ../fish/guestfish-actions.pod:1923
9864 " inspect-get-distro root\n"
9869 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3061
9871 "This returns the distro (distribution) of the inspected operating system."
9875 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3064
9876 msgid "Currently defined distros are:"
9880 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3068
9881 msgid "\"archlinux\""
9885 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3070
9890 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3072
9895 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3074
9900 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3076
9905 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3078
9910 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3080
9915 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3082
9920 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3084
9925 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3086
9930 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3088
9931 msgid "\"linuxmint\""
9935 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3090
9940 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3092
9945 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3094
9950 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3096
9951 msgid "\"mandriva\""
9955 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3098
9960 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3100
9965 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3102
9970 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3104
9971 msgid "\"opensuse\""
9975 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3106
9980 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3108
9985 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3110
9990 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3112
9991 msgid "\"redhat-based\""
9995 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3114
9996 msgid "Some Red Hat-derived distro."
10000 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3116
10005 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3118
10006 msgid "Red Hat Enterprise Linux."
10010 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3120
10011 msgid "\"scientificlinux\""
10015 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3122
10016 msgid "Scientific Linux."
10020 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3124
10021 msgid "\"slackware\""
10025 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3126
10030 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3128
10031 msgid "\"ttylinux\""
10035 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3130
10040 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3132
10045 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3134
10050 #: ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2084
10051 #: ../fish/guestfish-actions.pod:2353 ../src/guestfs-actions.pod:3136
10052 #: ../src/guestfs-actions.pod:3245 ../src/guestfs-actions.pod:3625
10053 msgid "\"unknown\""
10057 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3138
10058 msgid "The distro could not be determined."
10062 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341
10063 #: ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3613
10064 msgid "\"windows\""
10068 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3142
10070 "Windows does not have distributions. This string is returned if the OS type "
10075 #: ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2090
10076 #: ../fish/guestfish-actions.pod:2359 ../src/guestfs-actions.pod:3147
10077 #: ../src/guestfs-actions.pod:3251 ../src/guestfs-actions.pod:3631
10079 "Future versions of libguestfs may return other strings here. The caller "
10080 "should be prepared to handle any string."
10084 #: ../fish/guestfish-actions.pod:2016
10085 msgid "inspect-get-drive-mappings"
10089 #: ../fish/guestfish-actions.pod:2018
10092 " inspect-get-drive-mappings root\n"
10097 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3163
10099 "This call is useful for Windows which uses a primitive system of assigning "
10100 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10101 "Windows Registry to find out how disks/partitions are mapped to drive "
10102 "letters, and returns a hash table as in the example below:"
10106 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3169
10109 " C => /dev/vda2\n"
10110 " E => /dev/vdb1\n"
10111 " F => /dev/vdc1\n"
10116 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3173
10118 "Note that keys are drive letters. For Windows, the key is case insensitive "
10119 "and just contains the drive letter, without the customary colon separator "
10124 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3177
10126 "In future we may support other operating systems that also used drive "
10127 "letters, but the keys for those might not be case insensitive and might be "
10128 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10133 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3182
10135 "For Windows guests, currently only hard drive mappings are returned. "
10136 "Removable disks (eg. DVD-ROMs) are ignored."
10140 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3185
10142 "For guests that do not use drive mappings, or if the drive mappings could "
10143 "not be determined, this returns an empty hash table."
10147 #: ../fish/guestfish-actions.pod:2045
10149 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10150 "get-mountpoints>, L</inspect-get-filesystems>."
10154 #: ../fish/guestfish-actions.pod:2049
10155 msgid "inspect-get-filesystems"
10159 #: ../fish/guestfish-actions.pod:2051
10162 " inspect-get-filesystems root\n"
10167 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3206
10169 "This returns a list of all the filesystems that we think are associated with "
10170 "this operating system. This includes the root filesystem, other ordinary "
10171 "filesystems, and non-mounted devices like swap partitions."
10175 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3211
10177 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10178 "to be shared between operating systems."
10182 #: ../fish/guestfish-actions.pod:2061
10184 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10185 "get-mountpoints>."
10189 #: ../fish/guestfish-actions.pod:2064
10190 msgid "inspect-get-format"
10194 #: ../fish/guestfish-actions.pod:2066
10197 " inspect-get-format root\n"
10202 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3229
10204 "This returns the format of the inspected operating system. You can use it "
10205 "to detect install images, live CDs and similar."
10209 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3232
10210 msgid "Currently defined formats are:"
10214 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3236
10215 msgid "\"installed\""
10219 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3238
10220 msgid "This is an installed operating system."
10224 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3240
10225 msgid "\"installer\""
10229 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3242
10231 "The disk image being inspected is not an installed operating system, but a "
10232 "I<bootable> install disk, live CD, or similar."
10236 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3247
10237 msgid "The format of this disk image is not known."
10241 #: ../fish/guestfish-actions.pod:2095
10242 msgid "inspect-get-hostname"
10246 #: ../fish/guestfish-actions.pod:2097
10249 " inspect-get-hostname root\n"
10254 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3267
10256 "This function returns the hostname of the operating system as found by "
10257 "inspection of the guest's configuration files."
10261 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3270
10263 "If the hostname could not be determined, then the string C<unknown> is "
10268 #: ../fish/guestfish-actions.pod:2107
10269 msgid "inspect-get-icon"
10273 #: ../fish/guestfish-actions.pod:2109
10276 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
10281 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3296
10283 "This function returns an icon corresponding to the inspected operating "
10284 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10285 "to PNG if necessary)."
10289 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3300
10291 "If it was not possible to get an icon this function returns a zero-length "
10292 "(non-NULL) buffer. I<Callers must check for this case>."
10296 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3303
10298 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10299 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10300 "this file will be returned. You can disable favicons by passing the "
10301 "optional C<favicon> boolean as false (default is true)."
10305 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3309
10307 "If finding the favicon fails, then we look in other places in the guest for "
10312 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3312
10314 "If the optional C<highquality> boolean is true then only high quality icons "
10315 "are returned, which means only icons of high resolution with an alpha "
10316 "channel. The default (false) is to return any icon we can, even if it is of "
10317 "substandard quality."
10321 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3323
10323 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10324 "before you call this, since it needs to read information from the guest "
10325 "filesystem during the call."
10329 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3329
10331 "B<Security:> The icon data comes from the untrusted guest, and should be "
10332 "treated with caution. PNG files have been known to contain exploits. "
10333 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10334 "trying to process or display the icon."
10338 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3337
10340 "The PNG image returned can be any size. It might not be square. Libguestfs "
10341 "tries to return the largest, highest quality icon available. The "
10342 "application must scale the icon to the required size."
10346 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3344
10348 "Extracting icons from Windows guests requires the external C<wrestool> "
10349 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10350 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10351 "installed separately."
10355 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3351
10357 "Operating system icons are usually trademarks. Seek legal advice before "
10358 "using trademarks in applications."
10362 #: ../fish/guestfish-actions.pod:2173
10363 msgid "inspect-get-major-version"
10367 #: ../fish/guestfish-actions.pod:2175
10370 " inspect-get-major-version root\n"
10375 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3392
10377 "This returns the major version number of the inspected operating system."
10381 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3395
10383 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10384 "popular public names used by the operating system. Notably the operating "
10385 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10386 "1). You can find out the real versions corresponding to releases of Windows "
10387 "by consulting Wikipedia or MSDN."
10391 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198
10392 #: ../src/guestfs-actions.pod:3402 ../src/guestfs-actions.pod:3419
10393 msgid "If the version could not be determined, then C<0> is returned."
10397 #: ../fish/guestfish-actions.pod:2191
10398 msgid "inspect-get-minor-version"
10402 #: ../fish/guestfish-actions.pod:2193
10405 " inspect-get-minor-version root\n"
10410 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3416
10412 "This returns the minor version number of the inspected operating system."
10416 #: ../fish/guestfish-actions.pod:2200
10418 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10419 "get-major-version>."
10423 #: ../fish/guestfish-actions.pod:2203
10424 msgid "inspect-get-mountpoints"
10428 #: ../fish/guestfish-actions.pod:2205
10431 " inspect-get-mountpoints root\n"
10436 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3434
10438 "This returns a hash of where we think the filesystems associated with this "
10439 "operating system should be mounted. Callers should note that this is at "
10440 "best an educated guess made by reading configuration files such as C</etc/"
10441 "fstab>. I<In particular note> that this may return filesystems which are "
10442 "non-existent or not mountable and callers should be prepared to handle or "
10443 "ignore failures if they try to mount them."
10447 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3443
10449 "Each element in the returned hashtable has a key which is the path of the "
10450 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10451 "mounted there (eg. C</dev/sda1>)."
10455 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3448
10457 "Non-mounted devices such as swap devices are I<not> returned in this list."
10461 #: ../fish/guestfish-actions.pod:2224
10463 "For operating systems like Windows which still use drive letters, this call "
10464 "will only return an entry for the first drive \"mounted on\" C</>. For "
10465 "information about the mapping of drive letters to partitions, see L</inspect-"
10466 "get-drive-mappings>."
10470 #: ../fish/guestfish-actions.pod:2230
10472 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10473 "get-filesystems>."
10477 #: ../fish/guestfish-actions.pod:2233
10478 msgid "inspect-get-package-format"
10482 #: ../fish/guestfish-actions.pod:2235
10485 " inspect-get-package-format root\n"
10490 #: ../fish/guestfish-actions.pod:2237
10492 "This function and L</inspect-get-package-management> return the package "
10493 "format and package management tool used by the inspected operating system. "
10494 "For example for Fedora these functions would return C<rpm> (package format) "
10495 "and C<yum> (package management)."
10499 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3480
10501 "This returns the string C<unknown> if we could not determine the package "
10502 "format I<or> if the operating system does not have a real packaging system "
10507 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3484
10509 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10510 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10514 #: ../fish/guestfish-actions.pod:2253
10515 msgid "inspect-get-package-management"
10519 #: ../fish/guestfish-actions.pod:2255
10522 " inspect-get-package-management root\n"
10527 #: ../fish/guestfish-actions.pod:2257
10529 "L</inspect-get-package-format> and this function return the package format "
10530 "and package management tool used by the inspected operating system. For "
10531 "example for Fedora these functions would return C<rpm> (package format) and "
10532 "C<yum> (package management)."
10536 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3507
10538 "This returns the string C<unknown> if we could not determine the package "
10539 "management tool I<or> if the operating system does not have a real packaging "
10540 "system (eg. Windows)."
10544 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3511
10546 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10547 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10548 "versions of libguestfs may return other strings."
10552 #: ../fish/guestfish-actions.pod:2274
10553 msgid "inspect-get-product-name"
10557 #: ../fish/guestfish-actions.pod:2276
10560 " inspect-get-product-name root\n"
10565 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3529
10567 "This returns the product name of the inspected operating system. The "
10568 "product name is generally some freeform string which can be displayed to the "
10569 "user, but should not be parsed by programs."
10573 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3534
10575 "If the product name could not be determined, then the string C<unknown> is "
10580 #: ../fish/guestfish-actions.pod:2288
10581 msgid "inspect-get-product-variant"
10585 #: ../fish/guestfish-actions.pod:2290
10588 " inspect-get-product-variant root\n"
10593 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3550
10594 msgid "This returns the product variant of the inspected operating system."
10598 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3553
10600 "For Windows guests, this returns the contents of the Registry key C<HKLM"
10601 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
10602 "is usually a string such as C<Client> or C<Server> (other values are "
10603 "possible). This can be used to distinguish consumer and enterprise versions "
10604 "of Windows that have the same version number (for example, Windows 7 and "
10605 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10606 "the latter is C<Server>)."
10610 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3562
10612 "For enterprise Linux guests, in future we intend this to return the product "
10613 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10614 "implemented at present."
10618 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3566
10620 "If the product variant could not be determined, then the string C<unknown> "
10625 #: ../fish/guestfish-actions.pod:2311
10627 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10628 "get-product-name>, L</inspect-get-major-version>."
10632 #: ../fish/guestfish-actions.pod:2315
10633 msgid "inspect-get-roots"
10637 #: ../fish/guestfish-actions.pod:2317
10640 " inspect-get-roots\n"
10645 #: ../fish/guestfish-actions.pod:2319
10647 "This function is a convenient way to get the list of root devices, as "
10648 "returned from a previous call to L</inspect-os>, but without redoing the "
10649 "whole inspection process."
10653 #: ../fish/guestfish-actions.pod:2323
10655 "This returns an empty list if either no root devices were found or the "
10656 "caller has not called L</inspect-os>."
10660 #: ../fish/guestfish-actions.pod:2328
10661 msgid "inspect-get-type"
10665 #: ../fish/guestfish-actions.pod:2330
10668 " inspect-get-type root\n"
10673 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3604
10675 "This returns the type of the inspected operating system. Currently defined "
10680 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3609
10685 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3611
10686 msgid "Any Linux-based operating system."
10690 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3615
10691 msgid "Any Microsoft Windows operating system."
10695 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3617
10696 msgid "\"freebsd\""
10700 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3619
10705 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3621
10710 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3623
10715 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3627
10716 msgid "The operating system type could not be determined."
10720 #: ../fish/guestfish-actions.pod:2364
10721 msgid "inspect-get-windows-current-control-set"
10725 #: ../fish/guestfish-actions.pod:2366
10728 " inspect-get-windows-current-control-set root\n"
10733 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3647
10735 "This returns the Windows CurrentControlSet of the inspected guest. The "
10736 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10740 #: ../fish/guestfish-actions.pod:2371 ../src/guestfs-actions.pod:3650
10742 "This call assumes that the guest is Windows and that the Registry could be "
10743 "examined by inspection. If this is not the case then an error is returned."
10747 #: ../fish/guestfish-actions.pod:2377
10748 msgid "inspect-get-windows-systemroot"
10752 #: ../fish/guestfish-actions.pod:2379
10755 " inspect-get-windows-systemroot root\n"
10760 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3667
10762 "This returns the Windows systemroot of the inspected guest. The systemroot "
10763 "is a directory path such as C</WINDOWS>."
10767 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3670
10769 "This call assumes that the guest is Windows and that the systemroot could be "
10770 "determined by inspection. If this is not the case then an error is returned."
10774 #: ../fish/guestfish-actions.pod:2390
10775 msgid "inspect-is-live"
10779 #: ../fish/guestfish-actions.pod:2392
10782 " inspect-is-live root\n"
10787 #: ../fish/guestfish-actions.pod:2394
10789 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10790 "then this returns true if a live image was detected on the disk."
10794 #: ../fish/guestfish-actions.pod:2400
10795 msgid "inspect-is-multipart"
10799 #: ../fish/guestfish-actions.pod:2402
10802 " inspect-is-multipart root\n"
10807 #: ../fish/guestfish-actions.pod:2404
10809 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10810 "then this returns true if the disk is part of a set."
10814 #: ../fish/guestfish-actions.pod:2410
10815 msgid "inspect-is-netinst"
10819 #: ../fish/guestfish-actions.pod:2412
10822 " inspect-is-netinst root\n"
10827 #: ../fish/guestfish-actions.pod:2414
10829 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10830 "then this returns true if the disk is a network installer, ie. not a self-"
10831 "contained install CD but one which is likely to require network access to "
10832 "complete the install."
10836 #: ../fish/guestfish-actions.pod:2422
10837 msgid "inspect-list-applications"
10841 #: ../fish/guestfish-actions.pod:2424
10844 " inspect-list-applications root\n"
10849 #: ../fish/guestfish-actions.pod:2426 ../src/guestfs-actions.pod:3737
10850 msgid "Return the list of applications installed in the operating system."
10854 #: ../fish/guestfish-actions.pod:2428
10856 "I<Note:> This call works differently from other parts of the inspection "
10857 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10858 "then mount up the disks, before calling this. Listing applications is a "
10859 "significantly more difficult operation which requires access to the full "
10860 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10861 "are just returning data cached in the libguestfs handle, this call actually "
10862 "reads parts of the mounted filesystems during the call."
10866 #: ../fish/guestfish-actions.pod:2438 ../src/guestfs-actions.pod:3749
10868 "This returns an empty list if the inspection code was not able to determine "
10869 "the list of applications."
10873 #: ../fish/guestfish-actions.pod:2441 ../src/guestfs-actions.pod:3752
10874 msgid "The application structure contains the following fields:"
10878 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3756
10879 msgid "C<app_name>"
10883 #: ../fish/guestfish-actions.pod:2447 ../src/guestfs-actions.pod:3758
10885 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10886 "guests, this is the package name."
10890 #: ../fish/guestfish-actions.pod:2450 ../src/guestfs-actions.pod:3761
10891 msgid "C<app_display_name>"
10895 #: ../fish/guestfish-actions.pod:2452 ../src/guestfs-actions.pod:3763
10897 "The display name of the application, sometimes localized to the install "
10898 "language of the guest operating system."
10902 #: ../fish/guestfish-actions.pod:2455 ../src/guestfs-actions.pod:3766
10904 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
10905 "to display something can use C<app_name> instead."
10909 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3769
10910 msgid "C<app_epoch>"
10914 #: ../fish/guestfish-actions.pod:2460 ../src/guestfs-actions.pod:3771
10916 "For package managers which use epochs, this contains the epoch of the "
10917 "package (an integer). If unavailable, this is returned as C<0>."
10921 #: ../fish/guestfish-actions.pod:2463 ../src/guestfs-actions.pod:3774
10922 msgid "C<app_version>"
10926 #: ../fish/guestfish-actions.pod:2465 ../src/guestfs-actions.pod:3776
10928 "The version string of the application or package. If unavailable this is "
10929 "returned as an empty string C<\"\">."
10933 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3779
10934 msgid "C<app_release>"
10938 #: ../fish/guestfish-actions.pod:2470 ../src/guestfs-actions.pod:3781
10940 "The release string of the application or package, for package managers that "
10941 "use this. If unavailable this is returned as an empty string C<\"\">."
10945 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3785
10946 msgid "C<app_install_path>"
10950 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3787
10952 "The installation path of the application (on operating systems such as "
10953 "Windows which use installation paths). This path is in the format used by "
10954 "the guest operating system, it is not a libguestfs path."
10958 #: ../fish/guestfish-actions.pod:2481 ../src/guestfs-actions.pod:3792
10959 msgid "If unavailable this is returned as an empty string C<\"\">."
10963 #: ../fish/guestfish-actions.pod:2483 ../src/guestfs-actions.pod:3794
10964 msgid "C<app_trans_path>"
10968 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3796
10970 "The install path translated into a libguestfs path. If unavailable this is "
10971 "returned as an empty string C<\"\">."
10975 #: ../fish/guestfish-actions.pod:2488 ../src/guestfs-actions.pod:3799
10976 msgid "C<app_publisher>"
10980 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3801
10982 "The name of the publisher of the application, for package managers that use "
10983 "this. If unavailable this is returned as an empty string C<\"\">."
10987 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3805
10992 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3807
10994 "The URL (eg. upstream URL) of the application. If unavailable this is "
10995 "returned as an empty string C<\"\">."
10999 #: ../fish/guestfish-actions.pod:2499 ../src/guestfs-actions.pod:3810
11000 msgid "C<app_source_package>"
11004 #: ../fish/guestfish-actions.pod:2501 ../src/guestfs-actions.pod:3812
11006 "For packaging systems which support this, the name of the source package. "
11007 "If unavailable this is returned as an empty string C<\"\">."
11011 #: ../fish/guestfish-actions.pod:2504 ../src/guestfs-actions.pod:3815
11012 msgid "C<app_summary>"
11016 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:3817
11018 "A short (usually one line) description of the application or package. If "
11019 "unavailable this is returned as an empty string C<\"\">."
11023 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3820
11024 msgid "C<app_description>"
11028 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3822
11030 "A longer description of the application or package. If unavailable this is "
11031 "returned as an empty string C<\"\">."
11035 #: ../fish/guestfish-actions.pod:2518
11040 #: ../fish/guestfish-actions.pod:2520
11048 #: ../fish/guestfish-actions.pod:2522 ../src/guestfs-actions.pod:3840
11050 "This function uses other libguestfs functions and certain heuristics to "
11051 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11052 "for operating systems."
11056 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3844
11057 msgid "The list returned is empty if no operating systems were found."
11061 #: ../fish/guestfish-actions.pod:2528 ../src/guestfs-actions.pod:3846
11063 "If one operating system was found, then this returns a list with a single "
11064 "element, which is the name of the root filesystem of this operating system. "
11065 "It is also possible for this function to return a list containing more than "
11066 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11067 "element being the root filesystem of one of the operating systems."
11071 #: ../fish/guestfish-actions.pod:2535
11073 "You can pass the root string(s) returned to other L</inspect-get-*> "
11074 "functions in order to query further information about each operating system, "
11075 "such as the name and version."
11079 #: ../fish/guestfish-actions.pod:2540
11081 "This function uses other libguestfs features such as L</mount-ro> and L</"
11082 "umount-all> in order to mount and unmount filesystems and look at the "
11083 "contents. This should be called with no disks currently mounted. The "
11084 "function may also use Augeas, so any existing Augeas handle will be closed."
11088 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3864
11090 "This function cannot decrypt encrypted disks. The caller must do that first "
11091 "(supplying the necessary keys) if the disk is encrypted."
11095 #: ../fish/guestfish-actions.pod:2552 ../fish/guestfish-actions.pod:2750
11096 #: ../fish/guestfish-actions.pod:2809
11097 msgid "See also L</list-filesystems>."
11101 #: ../fish/guestfish-actions.pod:2554
11102 msgid "is-blockdev"
11106 #: ../fish/guestfish-actions.pod:2556
11109 " is-blockdev path\n"
11114 #: ../fish/guestfish-actions.pod:2558 ../src/guestfs-actions.pod:3884
11116 "This returns C<true> if and only if there is a block device with the given "
11121 #: ../fish/guestfish-actions.pod:2561 ../fish/guestfish-actions.pod:2579
11122 #: ../fish/guestfish-actions.pod:2598 ../fish/guestfish-actions.pod:2607
11123 #: ../fish/guestfish-actions.pod:2617 ../fish/guestfish-actions.pod:2651
11124 #: ../fish/guestfish-actions.pod:2660
11125 msgid "See also L</stat>."
11129 #: ../fish/guestfish-actions.pod:2563
11134 #: ../fish/guestfish-actions.pod:2565
11142 #: ../fish/guestfish-actions.pod:2567 ../src/guestfs-actions.pod:3898
11144 "This returns true iff this handle is busy processing a command (in the "
11149 #: ../fish/guestfish-actions.pod:2572
11154 #: ../fish/guestfish-actions.pod:2574
11157 " is-chardev path\n"
11162 #: ../fish/guestfish-actions.pod:2576 ../src/guestfs-actions.pod:3913
11164 "This returns C<true> if and only if there is a character device with the "
11165 "given C<path> name."
11169 #: ../fish/guestfish-actions.pod:2581
11174 #: ../fish/guestfish-actions.pod:2583
11182 #: ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3927
11184 "This returns true iff this handle is being configured (in the C<CONFIG> "
11189 #: ../fish/guestfish-actions.pod:2590
11194 #: ../fish/guestfish-actions.pod:2592
11202 #: ../fish/guestfish-actions.pod:2594 ../src/guestfs-actions.pod:3942
11204 "This returns C<true> if and only if there is a directory with the given "
11205 "C<path> name. Note that it returns false for other objects like files."
11209 #: ../fish/guestfish-actions.pod:2600
11214 #: ../fish/guestfish-actions.pod:2602
11222 #: ../fish/guestfish-actions.pod:2604 ../src/guestfs-actions.pod:3958
11224 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11225 "given C<path> name."
11229 #: ../fish/guestfish-actions.pod:2609
11234 #: ../fish/guestfish-actions.pod:2611
11242 #: ../fish/guestfish-actions.pod:2613 ../src/guestfs-actions.pod:3973
11244 "This returns C<true> if and only if there is a regular file with the given "
11245 "C<path> name. Note that it returns false for other objects like directories."
11249 #: ../fish/guestfish-actions.pod:2619
11250 msgid "is-launching"
11254 #: ../fish/guestfish-actions.pod:2621
11262 #: ../fish/guestfish-actions.pod:2623 ../src/guestfs-actions.pod:3988
11264 "This returns true iff this handle is launching the subprocess (in the "
11265 "C<LAUNCHING> state)."
11269 #: ../fish/guestfish-actions.pod:2628
11274 #: ../fish/guestfish-actions.pod:2630
11282 #: ../fish/guestfish-actions.pod:2632 ../src/guestfs-actions.pod:4003
11284 "This command tests whether C<device> is a logical volume, and returns true "
11285 "iff this is the case."
11289 #: ../fish/guestfish-actions.pod:2635
11294 #: ../fish/guestfish-actions.pod:2637
11302 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4015
11304 "This returns true iff this handle is ready to accept commands (in the "
11309 #: ../fish/guestfish-actions.pod:2644
11314 #: ../fish/guestfish-actions.pod:2646
11317 " is-socket path\n"
11322 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4030
11324 "This returns C<true> if and only if there is a Unix domain socket with the "
11325 "given C<path> name."
11329 #: ../fish/guestfish-actions.pod:2653
11334 #: ../fish/guestfish-actions.pod:2655
11337 " is-symlink path\n"
11342 #: ../fish/guestfish-actions.pod:2657 ../src/guestfs-actions.pod:4045
11344 "This returns C<true> if and only if there is a symbolic link with the given "
11349 #: ../fish/guestfish-actions.pod:2662
11354 #: ../fish/guestfish-actions.pod:2664
11362 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:4060
11364 "This returns true iff the file exists and the file is empty or it contains "
11369 #: ../fish/guestfish-actions.pod:2669
11370 msgid "is-zero-device"
11374 #: ../fish/guestfish-actions.pod:2671
11377 " is-zero-device device\n"
11382 #: ../fish/guestfish-actions.pod:2673 ../src/guestfs-actions.pod:4073
11383 msgid "This returns true iff the device exists and contains all zero bytes."
11387 #: ../fish/guestfish-actions.pod:2675 ../src/guestfs-actions.pod:4075
11388 msgid "Note that for large devices this can take a long time to run."
11392 #: ../fish/guestfish-actions.pod:2677
11393 msgid "kill-subprocess"
11397 #: ../fish/guestfish-actions.pod:2679
11400 " kill-subprocess\n"
11405 #: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:4086
11406 msgid "This kills the qemu subprocess. You should never need to call this."
11410 #: ../fish/guestfish-actions.pod:2683
11415 #: ../fish/guestfish-actions.pod:2685
11420 #: ../fish/guestfish-actions.pod:2687
11428 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:4097
11430 "Internally libguestfs is implemented by running a virtual machine using "
11435 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4100
11437 "You should call this after configuring the handle (eg. adding drives) but "
11438 "before performing any actions."
11442 #: ../fish/guestfish-actions.pod:2695
11447 #: ../fish/guestfish-actions.pod:2697
11450 " lchown owner group path\n"
11455 #: ../fish/guestfish-actions.pod:2699
11457 "Change the file owner to C<owner> and group to C<group>. This is like L</"
11458 "chown> but if C<path> is a symlink then the link itself is changed, not the "
11463 #: ../fish/guestfish-actions.pod:2707
11468 #: ../fish/guestfish-actions.pod:2709
11471 " lgetxattr path name\n"
11476 #: ../fish/guestfish-actions.pod:2711 ../src/guestfs-actions.pod:4140
11478 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11479 "is a symlink, then this call returns an extended attribute from the symlink."
11483 #: ../fish/guestfish-actions.pod:2725
11484 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11488 #: ../fish/guestfish-actions.pod:2727
11493 #: ../fish/guestfish-actions.pod:2729
11496 " lgetxattrs path\n"
11501 #: ../fish/guestfish-actions.pod:2731
11503 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11504 "it returns the extended attributes of the link itself."
11508 #: ../fish/guestfish-actions.pod:2735
11513 #: ../fish/guestfish-actions.pod:2737
11521 #: ../fish/guestfish-actions.pod:2739 ../src/guestfs-actions.pod:4183
11523 "List all 9p filesystems attached to the guest. A list of mount tags is "
11528 #: ../fish/guestfish-actions.pod:2742
11529 msgid "list-devices"
11533 #: ../fish/guestfish-actions.pod:2744
11541 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4197
11542 msgid "List all the block devices."
11546 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4199
11547 msgid "The full block device names are returned, eg. C</dev/sda>."
11551 #: ../fish/guestfish-actions.pod:2752
11552 msgid "list-dm-devices"
11556 #: ../fish/guestfish-actions.pod:2754
11559 " list-dm-devices\n"
11564 #: ../fish/guestfish-actions.pod:2756 ../src/guestfs-actions.pod:4214
11565 msgid "List all device mapper devices."
11569 #: ../fish/guestfish-actions.pod:2758
11571 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11572 "previous call to L</luks-open>."
11576 #: ../fish/guestfish-actions.pod:2761
11578 "Device mapper devices which correspond to logical volumes are I<not> "
11579 "returned in this list. Call L</lvs> if you want to list logical volumes."
11583 #: ../fish/guestfish-actions.pod:2765
11584 msgid "list-filesystems"
11588 #: ../fish/guestfish-actions.pod:2767
11591 " list-filesystems\n"
11596 #: ../fish/guestfish-actions.pod:2769 ../src/guestfs-actions.pod:4234
11598 "This inspection command looks for filesystems on partitions, block devices "
11599 "and logical volumes, returning a list of devices containing filesystems and "
11604 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4238
11606 "The return value is a hash, where the keys are the devices containing "
11607 "filesystems, and the values are the filesystem types. For example:"
11611 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4242
11614 " \"/dev/sda1\" => \"ntfs\"\n"
11615 " \"/dev/sda2\" => \"ext2\"\n"
11616 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11617 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11622 #: ../fish/guestfish-actions.pod:2782 ../src/guestfs-actions.pod:4247
11624 "The value can have the special value \"unknown\", meaning the content of the "
11625 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11629 #: ../fish/guestfish-actions.pod:2786
11631 "This command runs other libguestfs commands, which might include L</mount> "
11632 "and L</umount>, and therefore you should use this soon after launch and only "
11633 "when nothing is mounted."
11637 #: ../fish/guestfish-actions.pod:2790
11639 "Not all of the filesystems returned will be mountable. In particular, swap "
11640 "partitions are returned in the list. Also this command does not check that "
11641 "each filesystem found is valid and mountable, and some filesystems might be "
11642 "mountable but require special options. Filesystems may not all belong to a "
11643 "single logical operating system (use L</inspect-os> to look for OSes)."
11647 #: ../fish/guestfish-actions.pod:2798
11648 msgid "list-partitions"
11652 #: ../fish/guestfish-actions.pod:2800
11655 " list-partitions\n"
11660 #: ../fish/guestfish-actions.pod:2802 ../src/guestfs-actions.pod:4276
11661 msgid "List all the partitions detected on all block devices."
11665 #: ../fish/guestfish-actions.pod:2804 ../src/guestfs-actions.pod:4278
11666 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11670 #: ../fish/guestfish-actions.pod:2806
11672 "This does not return logical volumes. For that you will need to call L</"
11677 #: ../fish/guestfish-actions.pod:2811
11682 #: ../fish/guestfish-actions.pod:2813
11690 #: ../fish/guestfish-actions.pod:2815 ../src/guestfs-actions.pod:4297
11692 "List the files in C<directory> (relative to the root directory, there is no "
11693 "cwd) in the format of 'ls -la'."
11697 #: ../fish/guestfish-actions.pod:2818 ../src/guestfs-actions.pod:4300
11699 "This command is mostly useful for interactive sessions. It is I<not> "
11700 "intended that you try to parse the output string."
11704 #: ../fish/guestfish-actions.pod:2821
11709 #: ../fish/guestfish-actions.pod:2823
11712 " ln target linkname\n"
11717 #: ../fish/guestfish-actions.pod:2825 ../src/guestfs-actions.pod:4315
11718 msgid "This command creates a hard link using the C<ln> command."
11722 #: ../fish/guestfish-actions.pod:2827
11727 #: ../fish/guestfish-actions.pod:2829
11730 " ln-f target linkname\n"
11735 #: ../fish/guestfish-actions.pod:2831 ../src/guestfs-actions.pod:4328
11737 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11738 "option removes the link (C<linkname>) if it exists already."
11742 #: ../fish/guestfish-actions.pod:2834
11747 #: ../fish/guestfish-actions.pod:2836
11750 " ln-s target linkname\n"
11755 #: ../fish/guestfish-actions.pod:2838 ../src/guestfs-actions.pod:4342
11756 msgid "This command creates a symbolic link using the C<ln -s> command."
11760 #: ../fish/guestfish-actions.pod:2840
11765 #: ../fish/guestfish-actions.pod:2842
11768 " ln-sf target linkname\n"
11773 #: ../fish/guestfish-actions.pod:2844 ../src/guestfs-actions.pod:4355
11775 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11776 "option removes the link (C<linkname>) if it exists already."
11780 #: ../fish/guestfish-actions.pod:2847
11781 msgid "lremovexattr"
11785 #: ../fish/guestfish-actions.pod:2849
11788 " lremovexattr xattr path\n"
11793 #: ../fish/guestfish-actions.pod:2851
11795 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11796 "it removes an extended attribute of the link itself."
11800 #: ../fish/guestfish-actions.pod:2855
11805 #: ../fish/guestfish-actions.pod:2857
11813 #: ../fish/guestfish-actions.pod:2859 ../src/guestfs-actions.pod:4383
11815 "List the files in C<directory> (relative to the root directory, there is no "
11816 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
11820 #: ../fish/guestfish-actions.pod:2863
11822 "This command is mostly useful for interactive sessions. Programs should "
11823 "probably use L</readdir> instead."
11827 #: ../fish/guestfish-actions.pod:2866
11832 #: ../fish/guestfish-actions.pod:2868
11835 " lsetxattr xattr val vallen path\n"
11840 #: ../fish/guestfish-actions.pod:2870
11842 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11843 "sets an extended attribute of the link itself."
11847 #: ../fish/guestfish-actions.pod:2874
11852 #: ../fish/guestfish-actions.pod:2876
11860 #: ../fish/guestfish-actions.pod:2878 ../fish/guestfish-actions.pod:4678
11861 #: ../src/guestfs-actions.pod:4419 ../src/guestfs-actions.pod:7200
11862 msgid "Returns file information for the given C<path>."
11866 #: ../fish/guestfish-actions.pod:2880
11868 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11869 "the link is stat-ed, not the file it refers to."
11873 #: ../fish/guestfish-actions.pod:2884 ../src/guestfs-actions.pod:4425
11874 msgid "This is the same as the C<lstat(2)> system call."
11878 #: ../fish/guestfish-actions.pod:2886
11883 #: ../fish/guestfish-actions.pod:2888
11886 " lstatlist path 'names ...'\n"
11891 #: ../fish/guestfish-actions.pod:2890
11893 "This call allows you to perform the L</lstat> operation on multiple files, "
11894 "where all files are in the directory C<path>. C<names> is the list of files "
11895 "from this directory."
11899 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4444
11901 "On return you get a list of stat structs, with a one-to-one correspondence "
11902 "to the C<names> list. If any name did not exist or could not be lstat'd, "
11903 "then the C<ino> field of that structure is set to C<-1>."
11907 #: ../fish/guestfish-actions.pod:2899
11909 "This call is intended for programs that want to efficiently list a directory "
11910 "contents without making many round-trips. See also L</lxattrlist> for a "
11911 "similarly efficient call for getting extended attributes. Very long "
11912 "directory listings might cause the protocol message size to be exceeded, "
11913 "causing this call to fail. The caller must split up such requests into "
11914 "smaller groups of names."
11918 #: ../fish/guestfish-actions.pod:2907
11919 msgid "luks-add-key"
11923 #: ../fish/guestfish-actions.pod:2909
11926 " luks-add-key device keyslot\n"
11931 #: ../fish/guestfish-actions.pod:2911 ../src/guestfs-actions.pod:4472
11933 "This command adds a new key on LUKS device C<device>. C<key> is any "
11934 "existing key, and is used to access the device. C<newkey> is the new key to "
11935 "add. C<keyslot> is the key slot that will be replaced."
11939 #: ../fish/guestfish-actions.pod:2916
11941 "Note that if C<keyslot> already contains a key, then this command will "
11942 "fail. You have to use L</luks-kill-slot> first to remove that key."
11946 #: ../fish/guestfish-actions.pod:2920 ../fish/guestfish-actions.pod:2942
11947 #: ../fish/guestfish-actions.pod:2952 ../fish/guestfish-actions.pod:2963
11948 #: ../fish/guestfish-actions.pod:2989 ../fish/guestfish-actions.pod:2999
11950 "This command has one or more key or passphrase parameters. Guestfish will "
11951 "prompt for these separately."
11955 #: ../fish/guestfish-actions.pod:2923
11960 #: ../fish/guestfish-actions.pod:2925
11963 " luks-close device\n"
11968 #: ../fish/guestfish-actions.pod:2927
11970 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
11971 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
11972 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
11977 #: ../fish/guestfish-actions.pod:2933
11978 msgid "luks-format"
11982 #: ../fish/guestfish-actions.pod:2935
11985 " luks-format device keyslot\n"
11990 #: ../fish/guestfish-actions.pod:2937 ../src/guestfs-actions.pod:4513
11992 "This command erases existing data on C<device> and formats the device as a "
11993 "LUKS encrypted device. C<key> is the initial key, which is added to key "
11994 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
11998 #: ../fish/guestfish-actions.pod:2945
11999 msgid "luks-format-cipher"
12003 #: ../fish/guestfish-actions.pod:2947
12006 " luks-format-cipher device keyslot cipher\n"
12011 #: ../fish/guestfish-actions.pod:2949
12013 "This command is the same as L</luks-format> but it also allows you to set "
12014 "the C<cipher> used."
12018 #: ../fish/guestfish-actions.pod:2955
12019 msgid "luks-kill-slot"
12023 #: ../fish/guestfish-actions.pod:2957
12026 " luks-kill-slot device keyslot\n"
12031 #: ../fish/guestfish-actions.pod:2959 ../src/guestfs-actions.pod:4554
12033 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12034 "device C<device>. C<key> must be one of the I<other> keys."
12038 #: ../fish/guestfish-actions.pod:2966
12043 #: ../fish/guestfish-actions.pod:2968
12046 " luks-open device mapname\n"
12051 #: ../fish/guestfish-actions.pod:2970 ../src/guestfs-actions.pod:4574
12053 "This command opens a block device which has been encrypted according to the "
12054 "Linux Unified Key Setup (LUKS) standard."
12058 #: ../fish/guestfish-actions.pod:2973 ../src/guestfs-actions.pod:4577
12059 msgid "C<device> is the encrypted block device or partition."
12063 #: ../fish/guestfish-actions.pod:2975 ../src/guestfs-actions.pod:4579
12065 "The caller must supply one of the keys associated with the LUKS block "
12066 "device, in the C<key> parameter."
12070 #: ../fish/guestfish-actions.pod:2978 ../src/guestfs-actions.pod:4582
12072 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12073 "writes to this block device are decrypted from and encrypted to the "
12074 "underlying C<device> respectively."
12078 #: ../fish/guestfish-actions.pod:2982
12080 "If this block device contains LVM volume groups, then calling L</vgscan> "
12081 "followed by L</vg-activate-all> will make them visible."
12085 #: ../fish/guestfish-actions.pod:2986
12086 msgid "Use L</list-dm-devices> to list all device mapper devices."
12090 #: ../fish/guestfish-actions.pod:2992
12091 msgid "luks-open-ro"
12095 #: ../fish/guestfish-actions.pod:2994
12098 " luks-open-ro device mapname\n"
12103 #: ../fish/guestfish-actions.pod:2996
12105 "This is the same as L</luks-open> except that a read-only mapping is created."
12109 #: ../fish/guestfish-actions.pod:3002
12114 #: ../fish/guestfish-actions.pod:3004
12117 " lvcreate logvol volgroup mbytes\n"
12122 #: ../fish/guestfish-actions.pod:3006 ../src/guestfs-actions.pod:4628
12124 "This creates an LVM logical volume called C<logvol> on the volume group "
12125 "C<volgroup>, with C<size> megabytes."
12129 #: ../fish/guestfish-actions.pod:3009
12130 msgid "lvm-canonical-lv-name"
12134 #: ../fish/guestfish-actions.pod:3011
12137 " lvm-canonical-lv-name lvname\n"
12142 #: ../fish/guestfish-actions.pod:3013 ../src/guestfs-actions.pod:4641
12144 "This converts alternative naming schemes for LVs that you might find to the "
12145 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
12150 #: ../fish/guestfish-actions.pod:3017 ../src/guestfs-actions.pod:4645
12152 "This command returns an error if the C<lvname> parameter does not refer to a "
12157 #: ../fish/guestfish-actions.pod:3020
12158 msgid "See also L</is-lv>."
12162 #: ../fish/guestfish-actions.pod:3022
12163 msgid "lvm-clear-filter"
12167 #: ../fish/guestfish-actions.pod:3024
12170 " lvm-clear-filter\n"
12175 #: ../fish/guestfish-actions.pod:3026
12177 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12182 #: ../fish/guestfish-actions.pod:3029 ../fish/guestfish-actions.pod:3057
12183 #: ../src/guestfs-actions.pod:4663 ../src/guestfs-actions.pod:4702
12185 "This command also clears the LVM cache and performs a volume group scan."
12189 #: ../fish/guestfish-actions.pod:3032
12190 msgid "lvm-remove-all"
12194 #: ../fish/guestfish-actions.pod:3034
12197 " lvm-remove-all\n"
12202 #: ../fish/guestfish-actions.pod:3036 ../src/guestfs-actions.pod:4675
12204 "This command removes all LVM logical volumes, volume groups and physical "
12209 #: ../fish/guestfish-actions.pod:3039
12210 msgid "lvm-set-filter"
12214 #: ../fish/guestfish-actions.pod:3041
12217 " lvm-set-filter 'devices ...'\n"
12222 #: ../fish/guestfish-actions.pod:3043 ../src/guestfs-actions.pod:4688
12224 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12225 "block devices in the list C<devices>, and will ignore all other attached "
12230 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4692
12232 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12233 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12234 "there are two types of duplication possible: either cloned PVs/VGs which "
12235 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12236 "same name. In normal operation you cannot create this situation, but you "
12237 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12238 "inside the LVM metadata."
12242 #: ../fish/guestfish-actions.pod:3060 ../src/guestfs-actions.pod:4705
12243 msgid "You can filter whole block devices or individual partitions."
12247 #: ../fish/guestfish-actions.pod:3062 ../src/guestfs-actions.pod:4707
12249 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12250 "filesystem), even if you are not filtering out that VG."
12254 #: ../fish/guestfish-actions.pod:3066
12259 #: ../fish/guestfish-actions.pod:3068
12262 " lvremove device\n"
12267 #: ../fish/guestfish-actions.pod:3070 ../src/guestfs-actions.pod:4721
12269 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12270 "LV, such as C</dev/VG/LV>."
12274 #: ../fish/guestfish-actions.pod:3073 ../src/guestfs-actions.pod:4724
12276 "You can also remove all LVs in a volume group by specifying the VG name, C</"
12281 #: ../fish/guestfish-actions.pod:3076
12286 #: ../fish/guestfish-actions.pod:3078
12289 " lvrename logvol newlogvol\n"
12294 #: ../fish/guestfish-actions.pod:3080 ../src/guestfs-actions.pod:4738
12295 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12299 #: ../fish/guestfish-actions.pod:3082
12304 #: ../fish/guestfish-actions.pod:3084
12307 " lvresize device mbytes\n"
12312 #: ../fish/guestfish-actions.pod:3086 ../src/guestfs-actions.pod:4751
12314 "This resizes (expands or shrinks) an existing LVM logical volume to "
12315 "C<mbytes>. When reducing, data in the reduced part is lost."
12319 #: ../fish/guestfish-actions.pod:3090
12320 msgid "lvresize-free"
12324 #: ../fish/guestfish-actions.pod:3092
12327 " lvresize-free lv percent\n"
12332 #: ../fish/guestfish-actions.pod:3094 ../src/guestfs-actions.pod:4766
12334 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12335 "remaining free space in the volume group. Commonly you would call this with "
12336 "pc = 100 which expands the logical volume as much as possible, using all "
12337 "remaining free space in the volume group."
12341 #: ../fish/guestfish-actions.pod:3100
12346 #: ../fish/guestfish-actions.pod:3102
12354 #: ../fish/guestfish-actions.pod:3104 ../src/guestfs-actions.pod:4781
12356 "List all the logical volumes detected. This is the equivalent of the L<lvs"
12361 #: ../fish/guestfish-actions.pod:3107 ../src/guestfs-actions.pod:4784
12363 "This returns a list of the logical volume device names (eg. C</dev/"
12364 "VolGroup00/LogVol00>)."
12368 #: ../fish/guestfish-actions.pod:3110
12369 msgid "See also L</lvs-full>, L</list-filesystems>."
12373 #: ../fish/guestfish-actions.pod:3112
12378 #: ../fish/guestfish-actions.pod:3114
12386 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4800
12388 "List all the logical volumes detected. This is the equivalent of the L<lvs"
12389 "(8)> command. The \"full\" version includes all fields."
12393 #: ../fish/guestfish-actions.pod:3119
12398 #: ../fish/guestfish-actions.pod:3121
12406 #: ../fish/guestfish-actions.pod:3123 ../src/guestfs-actions.pod:4815
12407 msgid "This command returns the UUID of the LVM LV C<device>."
12411 #: ../fish/guestfish-actions.pod:3125
12416 #: ../fish/guestfish-actions.pod:3127
12419 " lxattrlist path 'names ...'\n"
12424 #: ../fish/guestfish-actions.pod:3129 ../src/guestfs-actions.pod:4829
12426 "This call allows you to get the extended attributes of multiple files, where "
12427 "all files are in the directory C<path>. C<names> is the list of files from "
12432 #: ../fish/guestfish-actions.pod:3133 ../src/guestfs-actions.pod:4833
12434 "On return you get a flat list of xattr structs which must be interpreted "
12435 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12436 "C<attrval> in this struct is zero-length to indicate there was an error "
12437 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12438 "number (the number of following attributes for this file, which could be C<"
12439 "\"0\">). Then after the first xattr struct are the zero or more attributes "
12440 "for the first named file. This repeats for the second and subsequent files."
12444 #: ../fish/guestfish-actions.pod:3143
12446 "This call is intended for programs that want to efficiently list a directory "
12447 "contents without making many round-trips. See also L</lstatlist> for a "
12448 "similarly efficient call for getting standard stats. Very long directory "
12449 "listings might cause the protocol message size to be exceeded, causing this "
12450 "call to fail. The caller must split up such requests into smaller groups of "
12455 #: ../fish/guestfish-actions.pod:3151
12460 #: ../fish/guestfish-actions.pod:3153
12468 #: ../fish/guestfish-actions.pod:3155 ../src/guestfs-actions.pod:4863
12469 msgid "Create a directory named C<path>."
12473 #: ../fish/guestfish-actions.pod:3157
12478 #: ../fish/guestfish-actions.pod:3159
12481 " mkdir-mode path mode\n"
12486 #: ../fish/guestfish-actions.pod:3161 ../src/guestfs-actions.pod:4876
12488 "This command creates a directory, setting the initial permissions of the "
12489 "directory to C<mode>."
12493 #: ../fish/guestfish-actions.pod:3164 ../src/guestfs-actions.pod:4879
12495 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12496 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12501 #: ../fish/guestfish-actions.pod:3168
12502 msgid "See also L</mkdir>, L</umask>"
12506 #: ../fish/guestfish-actions.pod:3170
12511 #: ../fish/guestfish-actions.pod:3172
12519 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4895
12521 "Create a directory named C<path>, creating any parent directories as "
12522 "necessary. This is like the C<mkdir -p> shell command."
12526 #: ../fish/guestfish-actions.pod:3177
12531 #: ../fish/guestfish-actions.pod:3179
12534 " mkdtemp template\n"
12539 #: ../fish/guestfish-actions.pod:3181 ../src/guestfs-actions.pod:4908
12541 "This command creates a temporary directory. The C<template> parameter "
12542 "should be a full pathname for the temporary directory name with the final "
12543 "six characters being \"XXXXXX\"."
12547 #: ../fish/guestfish-actions.pod:3186 ../src/guestfs-actions.pod:4913
12549 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12550 "being suitable for Windows filesystems."
12554 #: ../fish/guestfish-actions.pod:3189 ../src/guestfs-actions.pod:4916
12555 msgid "The name of the temporary directory that was created is returned."
12559 #: ../fish/guestfish-actions.pod:3192 ../src/guestfs-actions.pod:4919
12560 msgid "The temporary directory is created with mode 0700 and is owned by root."
12564 #: ../fish/guestfish-actions.pod:3195 ../src/guestfs-actions.pod:4922
12566 "The caller is responsible for deleting the temporary directory and its "
12567 "contents after use."
12571 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4925
12572 msgid "See also: L<mkdtemp(3)>"
12576 #: ../fish/guestfish-actions.pod:3200
12581 #: ../fish/guestfish-actions.pod:3202
12584 " mke2fs-J fstype blocksize device journal\n"
12589 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4941
12591 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12592 "C<journal>. It is equivalent to the command:"
12596 #: ../fish/guestfish-actions.pod:3208 ../src/guestfs-actions.pod:4945
12599 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12604 #: ../fish/guestfish-actions.pod:3210
12605 msgid "See also L</mke2journal>."
12609 #: ../fish/guestfish-actions.pod:3212
12614 #: ../fish/guestfish-actions.pod:3214
12617 " mke2fs-JL fstype blocksize device label\n"
12622 #: ../fish/guestfish-actions.pod:3216 ../src/guestfs-actions.pod:4962
12624 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12625 "the journal labeled C<label>."
12629 #: ../fish/guestfish-actions.pod:3219
12630 msgid "See also L</mke2journal-L>."
12634 #: ../fish/guestfish-actions.pod:3221
12639 #: ../fish/guestfish-actions.pod:3223
12642 " mke2fs-JU fstype blocksize device uuid\n"
12647 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4980
12649 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12650 "the journal with UUID C<uuid>."
12654 #: ../fish/guestfish-actions.pod:3228
12655 msgid "See also L</mke2journal-U>."
12659 #: ../fish/guestfish-actions.pod:3230
12660 msgid "mke2journal"
12664 #: ../fish/guestfish-actions.pod:3232
12667 " mke2journal blocksize device\n"
12672 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4996
12674 "This creates an ext2 external journal on C<device>. It is equivalent to the "
12679 #: ../fish/guestfish-actions.pod:3237 ../src/guestfs-actions.pod:4999
12682 " mke2fs -O journal_dev -b blocksize device\n"
12687 #: ../fish/guestfish-actions.pod:3239
12688 msgid "mke2journal-L"
12692 #: ../fish/guestfish-actions.pod:3241
12695 " mke2journal-L blocksize label device\n"
12700 #: ../fish/guestfish-actions.pod:3243 ../src/guestfs-actions.pod:5013
12701 msgid "This creates an ext2 external journal on C<device> with label C<label>."
12705 #: ../fish/guestfish-actions.pod:3245
12706 msgid "mke2journal-U"
12710 #: ../fish/guestfish-actions.pod:3247
12713 " mke2journal-U blocksize uuid device\n"
12718 #: ../fish/guestfish-actions.pod:3249 ../src/guestfs-actions.pod:5027
12719 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12723 #: ../fish/guestfish-actions.pod:3251
12728 #: ../fish/guestfish-actions.pod:3253
12731 " mkfifo mode path\n"
12736 #: ../fish/guestfish-actions.pod:3255
12738 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12739 "is just a convenient wrapper around L</mknod>."
12743 #: ../fish/guestfish-actions.pod:3261
12748 #: ../fish/guestfish-actions.pod:3263
12751 " mkfs fstype device\n"
12756 #: ../fish/guestfish-actions.pod:3265 ../src/guestfs-actions.pod:5057
12758 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12759 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12763 #: ../fish/guestfish-actions.pod:3269
12768 #: ../fish/guestfish-actions.pod:3271
12771 " mkfs-b fstype blocksize device\n"
12776 #: ../fish/guestfish-actions.pod:3273
12778 "This call is similar to L</mkfs>, but it allows you to control the block "
12779 "size of the resulting filesystem. Supported block sizes depend on the "
12780 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12784 #: ../fish/guestfish-actions.pod:3278 ../fish/guestfish-actions.pod:3305
12785 #: ../src/guestfs-actions.pod:5085 ../src/guestfs-actions.pod:5123
12787 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12792 #: ../fish/guestfish-actions.pod:3281
12794 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
12799 #: ../fish/guestfish-actions.pod:3288
12804 #: ../fish/guestfish-actions.pod:3290
12807 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] [sectorsize:N]\n"
12812 #: ../fish/guestfish-actions.pod:3292 ../src/guestfs-actions.pod:5110
12814 "This function creates a filesystem on C<device>. The filesystem type is "
12815 "C<fstype>, for example C<ext3>."
12819 #: ../fish/guestfish-actions.pod:3299 ../src/guestfs-actions.pod:5117
12820 msgid "C<blocksize>"
12824 #: ../fish/guestfish-actions.pod:3301 ../src/guestfs-actions.pod:5119
12826 "The filesystem block size. Supported block sizes depend on the filesystem "
12827 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12832 #: ../fish/guestfish-actions.pod:3308 ../src/guestfs-actions.pod:5126
12833 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
12837 #: ../fish/guestfish-actions.pod:3310 ../src/guestfs-actions.pod:5128
12838 msgid "C<features>"
12842 #: ../fish/guestfish-actions.pod:3312 ../src/guestfs-actions.pod:5130
12843 msgid "This passes the I<-O> parameter to the external mkfs program."
12847 #: ../fish/guestfish-actions.pod:3314 ../src/guestfs-actions.pod:5132
12849 "For certain filesystem types, this allows extra filesystem features to be "
12850 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
12854 #: ../fish/guestfish-actions.pod:3318 ../src/guestfs-actions.pod:5136
12856 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
12861 #: ../fish/guestfish-actions.pod:3321 ../src/guestfs-actions.pod:5139
12866 #: ../fish/guestfish-actions.pod:3323 ../src/guestfs-actions.pod:5141
12868 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
12869 "sets the inode size (only for ext2/3/4 filesystems at present)."
12873 #: ../fish/guestfish-actions.pod:3326 ../src/guestfs-actions.pod:5144
12874 msgid "C<sectorsize>"
12878 #: ../fish/guestfish-actions.pod:3328 ../src/guestfs-actions.pod:5146
12880 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
12881 "sets sector size for ufs filesystem."
12885 #: ../fish/guestfish-actions.pod:3335
12886 msgid "mkmountpoint"
12890 #: ../fish/guestfish-actions.pod:3337
12893 " mkmountpoint exemptpath\n"
12898 #: ../fish/guestfish-actions.pod:3339
12900 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
12901 "to create extra mountpoints before mounting the first filesystem."
12905 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5189
12907 "These calls are I<only> necessary in some very limited circumstances, mainly "
12908 "the case where you want to mount a mix of unrelated and/or read-only "
12909 "filesystems together."
12913 #: ../fish/guestfish-actions.pod:3347 ../src/guestfs-actions.pod:5193
12915 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
12916 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
12917 "inside that. You can unpack this as follows in guestfish:"
12921 #: ../fish/guestfish-actions.pod:3352 ../src/guestfs-actions.pod:5198
12924 " add-ro Fedora-11-i686-Live.iso\n"
12926 " mkmountpoint /cd\n"
12927 " mkmountpoint /sqsh\n"
12928 " mkmountpoint /ext3fs\n"
12929 " mount /dev/sda /cd\n"
12930 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
12931 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
12936 #: ../fish/guestfish-actions.pod:3361 ../src/guestfs-actions.pod:5207
12937 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
12941 #: ../fish/guestfish-actions.pod:3363
12943 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
12944 "unexpected errors if you try to mix these calls. It is safest to manually "
12945 "unmount filesystems and remove mountpoints after use."
12949 #: ../fish/guestfish-actions.pod:3367
12951 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
12952 "for this to work for manual mountpoints, you must ensure that the innermost "
12953 "mountpoints have the longest pathnames, as in the example code above."
12957 #: ../fish/guestfish-actions.pod:3372 ../src/guestfs-actions.pod:5218
12959 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
12963 #: ../fish/guestfish-actions.pod:3374
12965 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
12966 "L</umount-all> to be called when the handle is closed which can also trigger "
12971 #: ../fish/guestfish-actions.pod:3378
12976 #: ../fish/guestfish-actions.pod:3380
12979 " mknod mode devmajor devminor path\n"
12984 #: ../fish/guestfish-actions.pod:3382 ../src/guestfs-actions.pod:5237
12986 "This call creates block or character special devices, or named pipes (FIFOs)."
12990 #: ../fish/guestfish-actions.pod:3385 ../src/guestfs-actions.pod:5240
12992 "The C<mode> parameter should be the mode, using the standard constants. "
12993 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
12994 "used when creating block and character special devices."
12998 #: ../fish/guestfish-actions.pod:3390
13000 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13001 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13002 "regular file). These constants are available in the standard Linux header "
13003 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
13004 "wrappers around this command which bitwise OR in the appropriate constant "
13009 #: ../fish/guestfish-actions.pod:3400
13014 #: ../fish/guestfish-actions.pod:3402
13017 " mknod-b mode devmajor devminor path\n"
13022 #: ../fish/guestfish-actions.pod:3404
13024 "This call creates a block device node called C<path> with mode C<mode> and "
13025 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13026 "wrapper around L</mknod>."
13030 #: ../fish/guestfish-actions.pod:3410
13035 #: ../fish/guestfish-actions.pod:3412
13038 " mknod-c mode devmajor devminor path\n"
13043 #: ../fish/guestfish-actions.pod:3414
13045 "This call creates a char device node called C<path> with mode C<mode> and "
13046 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13047 "wrapper around L</mknod>."
13051 #: ../fish/guestfish-actions.pod:3420
13056 #: ../fish/guestfish-actions.pod:3422
13064 #: ../fish/guestfish-actions.pod:3424 ../src/guestfs-actions.pod:5303
13065 msgid "Create a swap partition on C<device>."
13069 #: ../fish/guestfish-actions.pod:3426
13074 #: ../fish/guestfish-actions.pod:3428
13077 " mkswap-L label device\n"
13082 #: ../fish/guestfish-actions.pod:3430 ../src/guestfs-actions.pod:5316
13083 msgid "Create a swap partition on C<device> with label C<label>."
13087 #: ../fish/guestfish-actions.pod:3432 ../src/guestfs-actions.pod:5318
13089 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
13090 "sda>), just to a partition. This appears to be a limitation of the kernel "
13095 #: ../fish/guestfish-actions.pod:3436
13100 #: ../fish/guestfish-actions.pod:3438
13103 " mkswap-U uuid device\n"
13108 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5333
13109 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13113 #: ../fish/guestfish-actions.pod:3442
13114 msgid "mkswap-file"
13118 #: ../fish/guestfish-actions.pod:3444
13121 " mkswap-file path\n"
13126 #: ../fish/guestfish-actions.pod:3446 ../src/guestfs-actions.pod:5345
13127 msgid "Create a swap file."
13131 #: ../fish/guestfish-actions.pod:3448
13133 "This command just writes a swap file signature to an existing file. To "
13134 "create the file itself, use something like L</fallocate>."
13138 #: ../fish/guestfish-actions.pod:3451
13143 #: ../fish/guestfish-actions.pod:3453
13146 " modprobe modulename\n"
13151 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5360
13152 msgid "This loads a kernel module in the appliance."
13156 #: ../fish/guestfish-actions.pod:3457 ../src/guestfs-actions.pod:5362
13158 "The kernel module must have been whitelisted when libguestfs was built (see "
13159 "C<appliance/kmod.whitelist.in> in the source)."
13163 #: ../fish/guestfish-actions.pod:3460
13168 #: ../fish/guestfish-actions.pod:3462
13171 " mount device mountpoint\n"
13176 #: ../fish/guestfish-actions.pod:3464 ../src/guestfs-actions.pod:5376
13178 "Mount a guest disk at a position in the filesystem. Block devices are named "
13179 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13180 "those block devices contain partitions, they will have the usual names (eg. "
13181 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13185 #: ../fish/guestfish-actions.pod:3470 ../src/guestfs-actions.pod:5382
13187 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13188 "mounted on C</> before others can be mounted. Other filesystems can only be "
13189 "mounted on directories which already exist."
13193 #: ../fish/guestfish-actions.pod:3475 ../src/guestfs-actions.pod:5387
13195 "The mounted filesystem is writable, if we have sufficient permissions on the "
13196 "underlying device."
13200 #: ../fish/guestfish-actions.pod:3478
13202 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13203 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13204 "problems for users. If your program might need to work with older versions "
13205 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13206 "first parameter if you don't want any options)."
13210 #: ../fish/guestfish-actions.pod:3485
13215 #: ../fish/guestfish-actions.pod:3487
13218 " mount-9p mounttag mountpoint [options:..]\n"
13223 #: ../fish/guestfish-actions.pod:3489 ../src/guestfs-actions.pod:5416
13225 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13230 #: ../fish/guestfish-actions.pod:3492 ../src/guestfs-actions.pod:5419
13232 "If required, C<trans=virtio> will be automatically added to the options. "
13233 "Any other options required can be passed in the optional C<options> "
13238 #: ../fish/guestfish-actions.pod:3498
13243 #: ../fish/guestfish-actions.pod:3500
13246 " mount-loop file mountpoint\n"
13251 #: ../fish/guestfish-actions.pod:3502 ../src/guestfs-actions.pod:5458
13253 "This command lets you mount C<file> (a filesystem image in a file) on a "
13254 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13259 #: ../fish/guestfish-actions.pod:3506
13260 msgid "mount-options"
13264 #: ../fish/guestfish-actions.pod:3508
13267 " mount-options options device mountpoint\n"
13272 #: ../fish/guestfish-actions.pod:3510
13274 "This is the same as the L</mount> command, but it allows you to set the "
13275 "mount options as for the L<mount(8)> I<-o> flag."
13279 #: ../fish/guestfish-actions.pod:3514 ../src/guestfs-actions.pod:5478
13281 "If the C<options> parameter is an empty string, then no options are passed "
13282 "(all options default to whatever the filesystem uses)."
13286 #: ../fish/guestfish-actions.pod:3518
13291 #: ../fish/guestfish-actions.pod:3520
13294 " mount-ro device mountpoint\n"
13299 #: ../fish/guestfish-actions.pod:3522
13301 "This is the same as the L</mount> command, but it mounts the filesystem with "
13302 "the read-only (I<-o ro>) flag."
13306 #: ../fish/guestfish-actions.pod:3525
13311 #: ../fish/guestfish-actions.pod:3527
13314 " mount-vfs options vfstype device mountpoint\n"
13319 #: ../fish/guestfish-actions.pod:3529
13321 "This is the same as the L</mount> command, but it allows you to set both the "
13322 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13326 #: ../fish/guestfish-actions.pod:3533
13327 msgid "mountpoints"
13331 #: ../fish/guestfish-actions.pod:3535
13339 #: ../fish/guestfish-actions.pod:3537
13341 "This call is similar to L</mounts>. That call returns a list of devices. "
13342 "This one returns a hash table (map) of device name to directory where the "
13343 "device is mounted."
13347 #: ../fish/guestfish-actions.pod:3541
13352 #: ../fish/guestfish-actions.pod:3543
13360 #: ../fish/guestfish-actions.pod:3545 ../src/guestfs-actions.pod:5539
13362 "This returns the list of currently mounted filesystems. It returns the list "
13363 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13367 #: ../fish/guestfish-actions.pod:3548 ../src/guestfs-actions.pod:5542
13368 msgid "Some internal mounts are not shown."
13372 #: ../fish/guestfish-actions.pod:3550
13373 msgid "See also: L</mountpoints>"
13377 #: ../fish/guestfish-actions.pod:3552
13382 #: ../fish/guestfish-actions.pod:3554
13390 #: ../fish/guestfish-actions.pod:3556 ../src/guestfs-actions.pod:5559
13392 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13393 "destination filename or destination directory."
13397 #: ../fish/guestfish-actions.pod:3559
13398 msgid "ntfs-3g-probe"
13402 #: ../fish/guestfish-actions.pod:3561
13405 " ntfs-3g-probe true|false device\n"
13410 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5573
13412 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13413 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
13414 "write, and some cannot be mounted at all)."
13418 #: ../fish/guestfish-actions.pod:3567 ../src/guestfs-actions.pod:5577
13420 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13421 "can be mounted read-write. Set it to false if you want to test if the "
13422 "volume can be mounted read-only."
13426 #: ../fish/guestfish-actions.pod:3571 ../src/guestfs-actions.pod:5581
13428 "The return value is an integer which C<0> if the operation would succeed, or "
13429 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13433 #: ../fish/guestfish-actions.pod:3575
13438 #: ../fish/guestfish-actions.pod:3577
13441 " ntfsresize device\n"
13446 #: ../fish/guestfish-actions.pod:3579 ../fish/guestfish-actions.pod:3603
13447 #: ../src/guestfs-actions.pod:5602 ../src/guestfs-actions.pod:5634
13449 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13450 "size of the underlying device."
13454 #: ../fish/guestfish-actions.pod:3582 ../src/guestfs-actions.pod:5605
13456 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13457 "consistency check (for safety). You have to boot into Windows to perform "
13458 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13459 "resize filesystems which have been marked in this way. So in effect it is "
13460 "not possible to call ntfsresize multiple times on a single filesystem "
13461 "without booting into Windows between each resize."
13465 #: ../fish/guestfish-actions.pod:3590 ../fish/guestfish-actions.pod:3629
13466 #: ../src/guestfs-actions.pod:5613 ../src/guestfs-actions.pod:5660
13467 msgid "See also L<ntfsresize(8)>."
13471 #: ../fish/guestfish-actions.pod:3592 ../fish/guestfish-actions.pod:3640
13473 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13478 #: ../fish/guestfish-actions.pod:3599
13479 msgid "ntfsresize-opts"
13483 #: ../fish/guestfish-actions.pod:3601
13486 " ntfsresize-opts device [size:N] [force:true|false]\n"
13491 #: ../fish/guestfish-actions.pod:3612 ../src/guestfs-actions.pod:5643
13493 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13494 "resized to fit the container (eg. partition)."
13498 #: ../fish/guestfish-actions.pod:3615 ../src/guestfs-actions.pod:5646
13503 #: ../fish/guestfish-actions.pod:3617 ../src/guestfs-actions.pod:5648
13505 "If this option is true, then force the resize of the filesystem even if the "
13506 "filesystem is marked as requiring a consistency check."
13510 #: ../fish/guestfish-actions.pod:3620
13512 "After the resize operation, the filesystem is always marked as requiring a "
13513 "consistency check (for safety). You have to boot into Windows to perform "
13514 "this check and clear this condition. If you I<don't> set the C<force> "
13515 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13516 "a single filesystem without booting into Windows between each resize."
13520 #: ../fish/guestfish-actions.pod:3633
13521 msgid "ntfsresize-size"
13525 #: ../fish/guestfish-actions.pod:3635
13528 " ntfsresize-size device size\n"
13533 #: ../fish/guestfish-actions.pod:3637
13535 "This command is the same as L</ntfsresize> except that it allows you to "
13536 "specify the new size (in bytes) explicitly."
13540 #: ../fish/guestfish-actions.pod:3647
13545 #: ../fish/guestfish-actions.pod:3649
13548 " part-add device prlogex startsect endsect\n"
13553 #: ../fish/guestfish-actions.pod:3651
13555 "This command adds a partition to C<device>. If there is no partition table "
13556 "on the device, call L</part-init> first."
13560 #: ../fish/guestfish-actions.pod:3654 ../src/guestfs-actions.pod:5721
13562 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13563 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13564 "C<logical>) and C<e> (or C<extended>) partition types."
13568 #: ../fish/guestfish-actions.pod:3659 ../src/guestfs-actions.pod:5726
13570 "C<startsect> and C<endsect> are the start and end of the partition in "
13571 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13572 "from the end of the disk (C<-1> is the last sector)."
13576 #: ../fish/guestfish-actions.pod:3663
13578 "Creating a partition which covers the whole disk is not so easy. Use L</"
13579 "part-disk> to do that."
13583 #: ../fish/guestfish-actions.pod:3666
13588 #: ../fish/guestfish-actions.pod:3668
13591 " part-del device partnum\n"
13596 #: ../fish/guestfish-actions.pod:3670 ../src/guestfs-actions.pod:5744
13597 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13601 #: ../fish/guestfish-actions.pod:3672 ../src/guestfs-actions.pod:5746
13603 "Note that in the case of MBR partitioning, deleting an extended partition "
13604 "also deletes any logical partitions it contains."
13608 #: ../fish/guestfish-actions.pod:3676
13613 #: ../fish/guestfish-actions.pod:3678
13616 " part-disk device parttype\n"
13621 #: ../fish/guestfish-actions.pod:3680
13623 "This command is simply a combination of L</part-init> followed by L</part-"
13624 "add> to create a single primary partition covering the whole disk."
13628 #: ../fish/guestfish-actions.pod:3684
13630 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13631 "possible values are described in L</part-init>."
13635 #: ../fish/guestfish-actions.pod:3687
13636 msgid "part-get-bootable"
13640 #: ../fish/guestfish-actions.pod:3689
13643 " part-get-bootable device partnum\n"
13648 #: ../fish/guestfish-actions.pod:3691 ../src/guestfs-actions.pod:5779
13650 "This command returns true if the partition C<partnum> on C<device> has the "
13651 "bootable flag set."
13655 #: ../fish/guestfish-actions.pod:3694
13656 msgid "See also L</part-set-bootable>."
13660 #: ../fish/guestfish-actions.pod:3696
13661 msgid "part-get-mbr-id"
13665 #: ../fish/guestfish-actions.pod:3698
13668 " part-get-mbr-id device partnum\n"
13673 #: ../fish/guestfish-actions.pod:3700 ../src/guestfs-actions.pod:5795
13675 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13676 "partition C<partnum>."
13680 #: ../fish/guestfish-actions.pod:3703 ../fish/guestfish-actions.pod:3847
13682 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
13683 "undefined results for other partition table types (see L</part-get-"
13688 #: ../fish/guestfish-actions.pod:3707
13689 msgid "part-get-parttype"
13693 #: ../fish/guestfish-actions.pod:3709
13696 " part-get-parttype device\n"
13701 #: ../fish/guestfish-actions.pod:3711 ../src/guestfs-actions.pod:5812
13703 "This command examines the partition table on C<device> and returns the "
13704 "partition table type (format) being used."
13708 #: ../fish/guestfish-actions.pod:3714
13710 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13711 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13712 "possible, although unusual. See L</part-init> for a full list."
13716 #: ../fish/guestfish-actions.pod:3719
13721 #: ../fish/guestfish-actions.pod:3721
13724 " part-init device parttype\n"
13729 #: ../fish/guestfish-actions.pod:3723 ../src/guestfs-actions.pod:5832
13731 "This creates an empty partition table on C<device> of one of the partition "
13732 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13733 "(for large disks)."
13737 #: ../fish/guestfish-actions.pod:3727
13739 "Initially there are no partitions. Following this, you should call L</part-"
13740 "add> for each partition required."
13744 #: ../fish/guestfish-actions.pod:3730 ../src/guestfs-actions.pod:5839
13745 msgid "Possible values for C<parttype> are:"
13749 #: ../fish/guestfish-actions.pod:3734 ../src/guestfs-actions.pod:5843
13754 #: ../fish/guestfish-actions.pod:3736 ../src/guestfs-actions.pod:5845
13759 #: ../fish/guestfish-actions.pod:3738 ../src/guestfs-actions.pod:5847
13760 msgid "Intel EFI / GPT partition table."
13764 #: ../fish/guestfish-actions.pod:3740 ../src/guestfs-actions.pod:5849
13766 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13767 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13768 "the C<mbr> format."
13772 #: ../fish/guestfish-actions.pod:3744 ../src/guestfs-actions.pod:5853
13777 #: ../fish/guestfish-actions.pod:3746 ../src/guestfs-actions.pod:5855
13782 #: ../fish/guestfish-actions.pod:3748 ../src/guestfs-actions.pod:5857
13784 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13785 "Windows. This partition type will B<only> work for device sizes up to 2 "
13786 "TB. For large disks we recommend using C<gpt>."
13790 #: ../fish/guestfish-actions.pod:3755 ../src/guestfs-actions.pod:5864
13792 "Other partition table types that may work but are not supported include:"
13796 #: ../fish/guestfish-actions.pod:3760 ../src/guestfs-actions.pod:5869
13801 #: ../fish/guestfish-actions.pod:3762 ../src/guestfs-actions.pod:5871
13802 msgid "AIX disk labels."
13806 #: ../fish/guestfish-actions.pod:3764 ../src/guestfs-actions.pod:5873
13811 #: ../fish/guestfish-actions.pod:3766 ../src/guestfs-actions.pod:5875
13816 #: ../fish/guestfish-actions.pod:3768 ../src/guestfs-actions.pod:5877
13817 msgid "Amiga \"Rigid Disk Block\" format."
13821 #: ../fish/guestfish-actions.pod:3770 ../src/guestfs-actions.pod:5879
13826 #: ../fish/guestfish-actions.pod:3772 ../src/guestfs-actions.pod:5881
13827 msgid "BSD disk labels."
13831 #: ../fish/guestfish-actions.pod:3774 ../src/guestfs-actions.pod:5883
13836 #: ../fish/guestfish-actions.pod:3776 ../src/guestfs-actions.pod:5885
13837 msgid "DASD, used on IBM mainframes."
13841 #: ../fish/guestfish-actions.pod:3778 ../src/guestfs-actions.pod:5887
13846 #: ../fish/guestfish-actions.pod:3780 ../src/guestfs-actions.pod:5889
13847 msgid "MIPS/SGI volumes."
13851 #: ../fish/guestfish-actions.pod:3782 ../src/guestfs-actions.pod:5891
13856 #: ../fish/guestfish-actions.pod:3784 ../src/guestfs-actions.pod:5893
13857 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13861 #: ../fish/guestfish-actions.pod:3786 ../src/guestfs-actions.pod:5895
13866 #: ../fish/guestfish-actions.pod:3788 ../src/guestfs-actions.pod:5897
13867 msgid "NEC PC-98 format, common in Japan apparently."
13871 #: ../fish/guestfish-actions.pod:3790 ../src/guestfs-actions.pod:5899
13876 #: ../fish/guestfish-actions.pod:3792 ../src/guestfs-actions.pod:5901
13877 msgid "Sun disk labels."
13881 #: ../fish/guestfish-actions.pod:3796
13886 #: ../fish/guestfish-actions.pod:3798
13889 " part-list device\n"
13894 #: ../fish/guestfish-actions.pod:3800 ../src/guestfs-actions.pod:5915
13896 "This command parses the partition table on C<device> and returns the list of "
13897 "partitions found."
13901 #: ../fish/guestfish-actions.pod:3803 ../src/guestfs-actions.pod:5918
13902 msgid "The fields in the returned structure are:"
13906 #: ../fish/guestfish-actions.pod:3807 ../src/guestfs-actions.pod:5922
13907 msgid "B<part_num>"
13911 #: ../fish/guestfish-actions.pod:3809 ../src/guestfs-actions.pod:5924
13912 msgid "Partition number, counting from 1."
13916 #: ../fish/guestfish-actions.pod:3811 ../src/guestfs-actions.pod:5926
13917 msgid "B<part_start>"
13921 #: ../fish/guestfish-actions.pod:3813
13923 "Start of the partition I<in bytes>. To get sectors you have to divide by "
13924 "the device's sector size, see L</blockdev-getss>."
13928 #: ../fish/guestfish-actions.pod:3816 ../src/guestfs-actions.pod:5931
13929 msgid "B<part_end>"
13933 #: ../fish/guestfish-actions.pod:3818 ../src/guestfs-actions.pod:5933
13934 msgid "End of the partition in bytes."
13938 #: ../fish/guestfish-actions.pod:3820 ../src/guestfs-actions.pod:5935
13939 msgid "B<part_size>"
13943 #: ../fish/guestfish-actions.pod:3822 ../src/guestfs-actions.pod:5937
13944 msgid "Size of the partition in bytes."
13948 #: ../fish/guestfish-actions.pod:3826
13949 msgid "part-set-bootable"
13953 #: ../fish/guestfish-actions.pod:3828
13956 " part-set-bootable device partnum true|false\n"
13961 #: ../fish/guestfish-actions.pod:3830 ../src/guestfs-actions.pod:5955
13963 "This sets the bootable flag on partition numbered C<partnum> on device "
13964 "C<device>. Note that partitions are numbered from 1."
13968 #: ../fish/guestfish-actions.pod:3833 ../src/guestfs-actions.pod:5958
13970 "The bootable flag is used by some operating systems (notably Windows) to "
13971 "determine which partition to boot from. It is by no means universally "
13976 #: ../fish/guestfish-actions.pod:3837
13977 msgid "part-set-mbr-id"
13981 #: ../fish/guestfish-actions.pod:3839
13984 " part-set-mbr-id device partnum idbyte\n"
13989 #: ../fish/guestfish-actions.pod:3841 ../src/guestfs-actions.pod:5974
13991 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
13992 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
13993 "documentation are in fact hexadecimal numbers, but usually documented "
13994 "without any leading \"0x\" which might be confusing."
13998 #: ../fish/guestfish-actions.pod:3851
13999 msgid "part-set-name"
14003 #: ../fish/guestfish-actions.pod:3853
14006 " part-set-name device partnum name\n"
14011 #: ../fish/guestfish-actions.pod:3855 ../src/guestfs-actions.pod:5996
14013 "This sets the partition name on partition numbered C<partnum> on device "
14014 "C<device>. Note that partitions are numbered from 1."
14018 #: ../fish/guestfish-actions.pod:3858 ../src/guestfs-actions.pod:5999
14020 "The partition name can only be set on certain types of partition table. "
14021 "This works on C<gpt> but not on C<mbr> partitions."
14025 #: ../fish/guestfish-actions.pod:3861
14026 msgid "part-to-dev"
14030 #: ../fish/guestfish-actions.pod:3863
14033 " part-to-dev partition\n"
14038 #: ../fish/guestfish-actions.pod:3865 ../src/guestfs-actions.pod:6012
14040 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14041 "partition number, returning the device name (eg. \"/dev/sdb\")."
14045 #: ../fish/guestfish-actions.pod:3869 ../fish/guestfish-actions.pod:3881
14047 "The named partition must exist, for example as a string returned from L</"
14048 "list-partitions>."
14052 #: ../fish/guestfish-actions.pod:3872
14053 msgid "See also L</part-to-partnum>."
14057 #: ../fish/guestfish-actions.pod:3874
14058 msgid "part-to-partnum"
14062 #: ../fish/guestfish-actions.pod:3876
14065 " part-to-partnum partition\n"
14070 #: ../fish/guestfish-actions.pod:3878 ../src/guestfs-actions.pod:6032
14072 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14073 "partition number (eg. C<1>)."
14077 #: ../fish/guestfish-actions.pod:3884
14078 msgid "See also L</part-to-dev>."
14082 #: ../fish/guestfish-actions.pod:3886
14083 msgid "ping-daemon"
14087 #: ../fish/guestfish-actions.pod:3888
14095 #: ../fish/guestfish-actions.pod:3890 ../src/guestfs-actions.pod:6049
14097 "This is a test probe into the guestfs daemon running inside the qemu "
14098 "subprocess. Calling this function checks that the daemon responds to the "
14099 "ping message, without affecting the daemon or attached block device(s) in "
14104 #: ../fish/guestfish-actions.pod:3895
14109 #: ../fish/guestfish-actions.pod:3897
14112 " pread path count offset\n"
14117 #: ../fish/guestfish-actions.pod:3899 ../src/guestfs-actions.pod:6067
14119 "This command lets you read part of a file. It reads C<count> bytes of the "
14120 "file, starting at C<offset>, from file C<path>."
14124 #: ../fish/guestfish-actions.pod:3902 ../fish/guestfish-actions.pod:3917
14125 #: ../src/guestfs-actions.pod:6070 ../src/guestfs-actions.pod:6096
14127 "This may read fewer bytes than requested. For further details see the "
14128 "L<pread(2)> system call."
14132 #: ../fish/guestfish-actions.pod:3905
14133 msgid "See also L</pwrite>, L</pread-device>."
14137 #: ../fish/guestfish-actions.pod:3910
14138 msgid "pread-device"
14142 #: ../fish/guestfish-actions.pod:3912
14145 " pread-device device count offset\n"
14150 #: ../fish/guestfish-actions.pod:3914 ../src/guestfs-actions.pod:6093
14152 "This command lets you read part of a file. It reads C<count> bytes of "
14153 "C<device>, starting at C<offset>."
14157 #: ../fish/guestfish-actions.pod:3920
14158 msgid "See also L</pread>."
14162 #: ../fish/guestfish-actions.pod:3925
14167 #: ../fish/guestfish-actions.pod:3927
14170 " pvcreate device\n"
14175 #: ../fish/guestfish-actions.pod:3929 ../src/guestfs-actions.pod:6116
14177 "This creates an LVM physical volume on the named C<device>, where C<device> "
14178 "should usually be a partition name such as C</dev/sda1>."
14182 #: ../fish/guestfish-actions.pod:3933
14187 #: ../fish/guestfish-actions.pod:3935
14190 " pvremove device\n"
14195 #: ../fish/guestfish-actions.pod:3937 ../src/guestfs-actions.pod:6130
14197 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14202 #: ../fish/guestfish-actions.pod:3940 ../src/guestfs-actions.pod:6133
14204 "The implementation uses the C<pvremove> command which refuses to wipe "
14205 "physical volumes that contain any volume groups, so you have to remove those "
14210 #: ../fish/guestfish-actions.pod:3944
14215 #: ../fish/guestfish-actions.pod:3946
14218 " pvresize device\n"
14223 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6147
14225 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14226 "the new size of the underlying device."
14230 #: ../fish/guestfish-actions.pod:3951
14231 msgid "pvresize-size"
14235 #: ../fish/guestfish-actions.pod:3953
14238 " pvresize-size device size\n"
14243 #: ../fish/guestfish-actions.pod:3955
14245 "This command is the same as L</pvresize> except that it allows you to "
14246 "specify the new size (in bytes) explicitly."
14250 #: ../fish/guestfish-actions.pod:3958
14255 #: ../fish/guestfish-actions.pod:3960
14263 #: ../fish/guestfish-actions.pod:3962 ../src/guestfs-actions.pod:6173
14265 "List all the physical volumes detected. This is the equivalent of the L<pvs"
14270 #: ../fish/guestfish-actions.pod:3965 ../src/guestfs-actions.pod:6176
14272 "This returns a list of just the device names that contain PVs (eg. C</dev/"
14277 #: ../fish/guestfish-actions.pod:3968
14278 msgid "See also L</pvs-full>."
14282 #: ../fish/guestfish-actions.pod:3970
14287 #: ../fish/guestfish-actions.pod:3972
14295 #: ../fish/guestfish-actions.pod:3974 ../src/guestfs-actions.pod:6192
14297 "List all the physical volumes detected. This is the equivalent of the L<pvs"
14298 "(8)> command. The \"full\" version includes all fields."
14302 #: ../fish/guestfish-actions.pod:3977
14307 #: ../fish/guestfish-actions.pod:3979
14315 #: ../fish/guestfish-actions.pod:3981 ../src/guestfs-actions.pod:6207
14316 msgid "This command returns the UUID of the LVM PV C<device>."
14320 #: ../fish/guestfish-actions.pod:3983
14325 #: ../fish/guestfish-actions.pod:3985
14328 " pwrite path content offset\n"
14333 #: ../fish/guestfish-actions.pod:3987 ../src/guestfs-actions.pod:6223
14335 "This command writes to part of a file. It writes the data buffer C<content> "
14336 "to the file C<path> starting at offset C<offset>."
14340 #: ../fish/guestfish-actions.pod:3990 ../src/guestfs-actions.pod:6226
14342 "This command implements the L<pwrite(2)> system call, and like that system "
14343 "call it may not write the full data requested. The return value is the "
14344 "number of bytes that were actually written to the file. This could even be "
14345 "0, although short writes are unlikely for regular files in ordinary "
14350 #: ../fish/guestfish-actions.pod:3996
14351 msgid "See also L</pread>, L</pwrite-device>."
14355 #: ../fish/guestfish-actions.pod:4001
14356 msgid "pwrite-device"
14360 #: ../fish/guestfish-actions.pod:4003
14363 " pwrite-device device content offset\n"
14368 #: ../fish/guestfish-actions.pod:4005 ../src/guestfs-actions.pod:6250
14370 "This command writes to part of a device. It writes the data buffer "
14371 "C<content> to C<device> starting at offset C<offset>."
14375 #: ../fish/guestfish-actions.pod:4008 ../src/guestfs-actions.pod:6253
14377 "This command implements the L<pwrite(2)> system call, and like that system "
14378 "call it may not write the full data requested (although short writes to disk "
14379 "devices and partitions are probably impossible with standard Linux kernels)."
14383 #: ../fish/guestfish-actions.pod:4013
14384 msgid "See also L</pwrite>."
14388 #: ../fish/guestfish-actions.pod:4018
14393 #: ../fish/guestfish-actions.pod:4020
14396 " read-file path\n"
14401 #: ../fish/guestfish-actions.pod:4022 ../src/guestfs-actions.pod:6274
14402 msgid "This calls returns the contents of the file C<path> as a buffer."
14406 #: ../fish/guestfish-actions.pod:4025
14408 "Unlike L</cat>, this function can correctly handle files that contain "
14409 "embedded ASCII NUL characters. However unlike L</download>, this function "
14410 "is limited in the total size of file that can be handled."
14414 #: ../fish/guestfish-actions.pod:4033
14419 #: ../fish/guestfish-actions.pod:4035
14422 " read-lines path\n"
14427 #: ../fish/guestfish-actions.pod:4039 ../src/guestfs-actions.pod:6299
14429 "The file contents are returned as a list of lines. Trailing C<LF> and "
14430 "C<CRLF> character sequences are I<not> returned."
14434 #: ../fish/guestfish-actions.pod:4042
14436 "Note that this function cannot correctly handle binary files (specifically, "
14437 "files containing C<\\0> character which is treated as end of line). For "
14438 "those you need to use the L</read-file> function which has a more complex "
14443 #: ../fish/guestfish-actions.pod:4047
14448 #: ../fish/guestfish-actions.pod:4049
14456 #: ../fish/guestfish-actions.pod:4051 ../src/guestfs-actions.pod:6319
14457 msgid "This returns the list of directory entries in directory C<dir>."
14461 #: ../fish/guestfish-actions.pod:4053 ../src/guestfs-actions.pod:6321
14463 "All entries in the directory are returned, including C<.> and C<..>. The "
14464 "entries are I<not> sorted, but returned in the same order as the underlying "
14469 #: ../fish/guestfish-actions.pod:4057 ../src/guestfs-actions.pod:6325
14471 "Also this call returns basic file type information about each file. The "
14472 "C<ftyp> field will contain one of the following characters:"
14476 #: ../fish/guestfish-actions.pod:4062 ../src/guestfs-actions.pod:6330
14481 #: ../fish/guestfish-actions.pod:4064 ../src/guestfs-actions.pod:6332
14482 msgid "Block special"
14486 #: ../fish/guestfish-actions.pod:4066 ../src/guestfs-actions.pod:6334
14491 #: ../fish/guestfish-actions.pod:4068 ../src/guestfs-actions.pod:6336
14492 msgid "Char special"
14496 #: ../fish/guestfish-actions.pod:4070 ../src/guestfs-actions.pod:6338
14501 #: ../fish/guestfish-actions.pod:4072 ../src/guestfs-actions.pod:6340
14506 #: ../fish/guestfish-actions.pod:4074 ../src/guestfs-actions.pod:6342
14511 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6344
14512 msgid "FIFO (named pipe)"
14516 #: ../fish/guestfish-actions.pod:4078 ../src/guestfs-actions.pod:6346
14521 #: ../fish/guestfish-actions.pod:4080 ../src/guestfs-actions.pod:6348
14522 msgid "Symbolic link"
14526 #: ../fish/guestfish-actions.pod:4082 ../src/guestfs-actions.pod:6350
14531 #: ../fish/guestfish-actions.pod:4084 ../src/guestfs-actions.pod:6352
14532 msgid "Regular file"
14536 #: ../fish/guestfish-actions.pod:4086 ../src/guestfs-actions.pod:6354
14541 #: ../fish/guestfish-actions.pod:4088 ../src/guestfs-actions.pod:6356
14546 #: ../fish/guestfish-actions.pod:4090 ../src/guestfs-actions.pod:6358
14551 #: ../fish/guestfish-actions.pod:4092 ../src/guestfs-actions.pod:6360
14552 msgid "Unknown file type"
14556 #: ../fish/guestfish-actions.pod:4094 ../src/guestfs-actions.pod:6362
14561 #: ../fish/guestfish-actions.pod:4096 ../src/guestfs-actions.pod:6364
14563 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14567 #: ../fish/guestfish-actions.pod:4101
14569 "This function is primarily intended for use by programs. To get a simple "
14570 "list of names, use L</ls>. To get a printable directory for human "
14571 "consumption, use L</ll>."
14575 #: ../fish/guestfish-actions.pod:4105
14580 #: ../fish/guestfish-actions.pod:4107
14588 #: ../fish/guestfish-actions.pod:4109 ../src/guestfs-actions.pod:6385
14589 msgid "This command reads the target of a symbolic link."
14593 #: ../fish/guestfish-actions.pod:4111
14594 msgid "readlinklist"
14598 #: ../fish/guestfish-actions.pod:4113
14601 " readlinklist path 'names ...'\n"
14606 #: ../fish/guestfish-actions.pod:4115 ../src/guestfs-actions.pod:6399
14608 "This call allows you to do a C<readlink> operation on multiple files, where "
14609 "all files are in the directory C<path>. C<names> is the list of files from "
14614 #: ../fish/guestfish-actions.pod:4119 ../src/guestfs-actions.pod:6403
14616 "On return you get a list of strings, with a one-to-one correspondence to the "
14617 "C<names> list. Each string is the value of the symbolic link."
14621 #: ../fish/guestfish-actions.pod:4123 ../src/guestfs-actions.pod:6407
14623 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14624 "result string is the empty string C<\"\">. However the whole operation is "
14625 "completed even if there were C<readlink(2)> errors, and so you can call this "
14626 "function with names where you don't know if they are symbolic links already "
14627 "(albeit slightly less efficient)."
14631 #: ../fish/guestfish-actions.pod:4130 ../src/guestfs-actions.pod:6414
14633 "This call is intended for programs that want to efficiently list a directory "
14634 "contents without making many round-trips. Very long directory listings "
14635 "might cause the protocol message size to be exceeded, causing this call to "
14636 "fail. The caller must split up such requests into smaller groups of names."
14640 #: ../fish/guestfish-actions.pod:4137
14645 #: ../fish/guestfish-actions.pod:4139
14653 #: ../fish/guestfish-actions.pod:4141 ../src/guestfs-actions.pod:6433
14655 "Return the canonicalized absolute pathname of C<path>. The returned path "
14656 "has no C<.>, C<..> or symbolic link path elements."
14660 #: ../fish/guestfish-actions.pod:4144
14661 msgid "removexattr"
14665 #: ../fish/guestfish-actions.pod:4146
14668 " removexattr xattr path\n"
14673 #: ../fish/guestfish-actions.pod:4148 ../src/guestfs-actions.pod:6448
14675 "This call removes the extended attribute named C<xattr> of the file C<path>."
14679 #: ../fish/guestfish-actions.pod:4151
14680 msgid "See also: L</lremovexattr>, L<attr(5)>."
14684 #: ../fish/guestfish-actions.pod:4153
14689 #: ../fish/guestfish-actions.pod:4155
14692 " resize2fs device\n"
14697 #: ../fish/guestfish-actions.pod:4157 ../src/guestfs-actions.pod:6463
14699 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14700 "underlying device."
14704 #: ../fish/guestfish-actions.pod:4160
14706 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
14707 "before calling this command. For unknown reasons C<resize2fs> sometimes "
14708 "gives an error about this and sometimes not. In any case, it is always safe "
14709 "to call L</e2fsck-f> before calling this function."
14713 #: ../fish/guestfish-actions.pod:4166
14714 msgid "resize2fs-M"
14718 #: ../fish/guestfish-actions.pod:4168
14721 " resize2fs-M device\n"
14726 #: ../fish/guestfish-actions.pod:4170
14728 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14729 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14734 #: ../fish/guestfish-actions.pod:4174
14736 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14737 "and read the C<Block size> and C<Block count> values. These two numbers, "
14738 "multiplied together, give the resulting size of the minimal filesystem in "
14743 #: ../fish/guestfish-actions.pod:4179
14744 msgid "resize2fs-size"
14748 #: ../fish/guestfish-actions.pod:4181
14751 " resize2fs-size device size\n"
14756 #: ../fish/guestfish-actions.pod:4183
14758 "This command is the same as L</resize2fs> except that it allows you to "
14759 "specify the new size (in bytes) explicitly."
14763 #: ../fish/guestfish-actions.pod:4186
14768 #: ../fish/guestfish-actions.pod:4188
14776 #: ../fish/guestfish-actions.pod:4190 ../src/guestfs-actions.pod:6515
14777 msgid "Remove the single file C<path>."
14781 #: ../fish/guestfish-actions.pod:4192
14786 #: ../fish/guestfish-actions.pod:4194
14794 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6527
14796 "Remove the file or directory C<path>, recursively removing the contents if "
14797 "its a directory. This is like the C<rm -rf> shell command."
14801 #: ../fish/guestfish-actions.pod:4200
14806 #: ../fish/guestfish-actions.pod:4202
14814 #: ../fish/guestfish-actions.pod:4204 ../src/guestfs-actions.pod:6541
14815 msgid "Remove the single directory C<path>."
14819 #: ../fish/guestfish-actions.pod:4206
14820 msgid "rmmountpoint"
14824 #: ../fish/guestfish-actions.pod:4208
14827 " rmmountpoint exemptpath\n"
14832 #: ../fish/guestfish-actions.pod:4210
14834 "This calls removes a mountpoint that was previously created with L</"
14835 "mkmountpoint>. See L</mkmountpoint> for full details."
14839 #: ../fish/guestfish-actions.pod:4214
14840 msgid "scrub-device"
14844 #: ../fish/guestfish-actions.pod:4216
14847 " scrub-device device\n"
14852 #: ../fish/guestfish-actions.pod:4218 ../src/guestfs-actions.pod:6567
14854 "This command writes patterns over C<device> to make data retrieval more "
14859 #: ../fish/guestfish-actions.pod:4221 ../fish/guestfish-actions.pod:4233
14860 #: ../fish/guestfish-actions.pod:4246 ../src/guestfs-actions.pod:6570
14861 #: ../src/guestfs-actions.pod:6588 ../src/guestfs-actions.pod:6607
14863 "It is an interface to the L<scrub(1)> program. See that manual page for "
14868 #: ../fish/guestfish-actions.pod:4224
14873 #: ../fish/guestfish-actions.pod:4226
14876 " scrub-file file\n"
14881 #: ../fish/guestfish-actions.pod:4228 ../src/guestfs-actions.pod:6583
14883 "This command writes patterns over a file to make data retrieval more "
14888 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6586
14889 msgid "The file is I<removed> after scrubbing."
14893 #: ../fish/guestfish-actions.pod:4236
14894 msgid "scrub-freespace"
14898 #: ../fish/guestfish-actions.pod:4238
14901 " scrub-freespace dir\n"
14906 #: ../fish/guestfish-actions.pod:4240
14908 "This command creates the directory C<dir> and then fills it with files until "
14909 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
14910 "deletes them. The intention is to scrub any free space on the partition "
14911 "containing C<dir>."
14915 #: ../fish/guestfish-actions.pod:4249
14920 #: ../fish/guestfish-actions.pod:4251
14925 #: ../fish/guestfish-actions.pod:4253
14928 " set-append append\n"
14933 #: ../fish/guestfish-actions.pod:4255 ../src/guestfs-actions.pod:6620
14935 "This function is used to add additional options to the guest kernel command "
14940 #: ../fish/guestfish-actions.pod:4258 ../src/guestfs-actions.pod:6623
14942 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
14943 "environment variable."
14947 #: ../fish/guestfish-actions.pod:4261 ../src/guestfs-actions.pod:6626
14949 "Setting C<append> to C<NULL> means I<no> additional options are passed "
14950 "(libguestfs always adds a few of its own)."
14954 #: ../fish/guestfish-actions.pod:4264
14955 msgid "set-attach-method"
14959 #: ../fish/guestfish-actions.pod:4266
14960 msgid "attach-method"
14964 #: ../fish/guestfish-actions.pod:4268
14967 " set-attach-method attachmethod\n"
14972 #: ../fish/guestfish-actions.pod:4270 ../src/guestfs-actions.pod:6639
14974 "Set the method that libguestfs uses to connect to the back end guestfsd "
14975 "daemon. Possible methods are:"
14979 #: ../fish/guestfish-actions.pod:4275 ../src/guestfs-actions.pod:6644
14980 #: ../src/guestfs.pod:2916
14981 msgid "C<appliance>"
14985 #: ../fish/guestfish-actions.pod:4277 ../src/guestfs-actions.pod:6646
14987 "Launch an appliance and connect to it. This is the ordinary method and the "
14992 #: ../fish/guestfish-actions.pod:4280 ../src/guestfs-actions.pod:6649
14993 msgid "C<unix:I<path>>"
14997 #: ../fish/guestfish-actions.pod:4282 ../src/guestfs-actions.pod:6651
14998 msgid "Connect to the Unix domain socket I<path>."
15002 #: ../fish/guestfish-actions.pod:4284 ../src/guestfs-actions.pod:6653
15004 "This method lets you connect to an existing daemon or (using virtio-serial) "
15005 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15006 "RUNNING DAEMONS>."
15010 #: ../fish/guestfish-actions.pod:4290
15011 msgid "set-autosync"
15015 #: ../fish/guestfish-actions.pod:4292
15020 #: ../fish/guestfish-actions.pod:4294
15023 " set-autosync true|false\n"
15028 #: ../fish/guestfish-actions.pod:4296 ../src/guestfs-actions.pod:6669
15030 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15031 "effort attempt to make filesystems consistent and synchronized when the "
15032 "handle is closed (also if the program exits without closing handles)."
15036 #: ../fish/guestfish-actions.pod:4301 ../src/guestfs-actions.pod:6674
15038 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15039 "disabled by default)."
15043 #: ../fish/guestfish-actions.pod:4304
15048 #: ../fish/guestfish-actions.pod:4306
15053 #: ../fish/guestfish-actions.pod:4308
15056 " set-direct true|false\n"
15061 #: ../fish/guestfish-actions.pod:4310 ../src/guestfs-actions.pod:6687
15063 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15064 "passed directly through to the appliance once it is launched."
15068 #: ../fish/guestfish-actions.pod:4314
15070 "One consequence of this is that log messages aren't caught by the library "
15071 "and handled by L</set-log-message-callback>, but go straight to stdout."
15075 #: ../fish/guestfish-actions.pod:4318 ../src/guestfs-actions.pod:6695
15076 msgid "You probably don't want to use this unless you know what you are doing."
15080 #: ../fish/guestfish-actions.pod:4321 ../src/guestfs-actions.pod:6698
15081 msgid "The default is disabled."
15085 #: ../fish/guestfish-actions.pod:4323
15086 msgid "set-e2label"
15090 #: ../fish/guestfish-actions.pod:4325
15093 " set-e2label device label\n"
15098 #: ../fish/guestfish-actions.pod:4327 ../src/guestfs-actions.pod:6711
15100 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15101 "C<label>. Filesystem labels are limited to 16 characters."
15105 #: ../fish/guestfish-actions.pod:4331
15107 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15108 "label on a filesystem."
15112 #: ../fish/guestfish-actions.pod:4334
15117 #: ../fish/guestfish-actions.pod:4336
15120 " set-e2uuid device uuid\n"
15125 #: ../fish/guestfish-actions.pod:4338 ../src/guestfs-actions.pod:6729
15127 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15128 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15129 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15133 #: ../fish/guestfish-actions.pod:4343
15135 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15136 "UUID of a filesystem."
15140 #: ../fish/guestfish-actions.pod:4346
15141 msgid "set-memsize"
15145 #: ../fish/guestfish-actions.pod:4348
15150 #: ../fish/guestfish-actions.pod:4350
15153 " set-memsize memsize\n"
15158 #: ../fish/guestfish-actions.pod:4352
15160 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15161 "This only has any effect if called before L</launch>."
15165 #: ../fish/guestfish-actions.pod:4356 ../src/guestfs-actions.pod:6751
15167 "You can also change this by setting the environment variable "
15168 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15172 #: ../fish/guestfish-actions.pod:4363
15173 msgid "set-network"
15177 #: ../fish/guestfish-actions.pod:4365
15182 #: ../fish/guestfish-actions.pod:4367
15185 " set-network true|false\n"
15190 #: ../fish/guestfish-actions.pod:4369 ../src/guestfs-actions.pod:6768
15192 "If C<network> is true, then the network is enabled in the libguestfs "
15193 "appliance. The default is false."
15197 #: ../fish/guestfish-actions.pod:4372 ../src/guestfs-actions.pod:6771
15199 "This affects whether commands are able to access the network (see L<guestfs"
15200 "(3)/RUNNING COMMANDS>)."
15204 #: ../fish/guestfish-actions.pod:4375
15206 "You must call this before calling L</launch>, otherwise it has no effect."
15210 #: ../fish/guestfish-actions.pod:4378
15215 #: ../fish/guestfish-actions.pod:4382
15218 " set-path searchpath\n"
15223 #: ../fish/guestfish-actions.pod:4384 ../src/guestfs-actions.pod:6787
15224 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15228 #: ../fish/guestfish-actions.pod:4386 ../src/guestfs-actions.pod:6789
15230 "The default is C<$libdir/guestfs> unless overridden by setting "
15231 "C<LIBGUESTFS_PATH> environment variable."
15235 #: ../fish/guestfish-actions.pod:4389 ../src/guestfs-actions.pod:6792
15236 msgid "Setting C<path> to C<NULL> restores the default path."
15240 #: ../fish/guestfish-actions.pod:4391
15245 #: ../fish/guestfish-actions.pod:4393
15250 #: ../fish/guestfish-actions.pod:4395
15253 " set-pgroup true|false\n"
15258 #: ../fish/guestfish-actions.pod:4397 ../src/guestfs-actions.pod:6804
15260 "If C<pgroup> is true, child processes are placed into their own process "
15265 #: ../fish/guestfish-actions.pod:4400 ../src/guestfs-actions.pod:6807
15267 "The practical upshot of this is that signals like C<SIGINT> (from users "
15268 "pressing C<^C>) won't be received by the child process."
15272 #: ../fish/guestfish-actions.pod:4403 ../src/guestfs-actions.pod:6810
15274 "The default for this flag is false, because usually you want C<^C> to kill "
15279 #: ../fish/guestfish-actions.pod:4406
15284 #: ../fish/guestfish-actions.pod:4408
15289 #: ../fish/guestfish-actions.pod:4410
15297 #: ../fish/guestfish-actions.pod:4412 ../src/guestfs-actions.pod:6823
15298 msgid "Set the qemu binary that we will use."
15302 #: ../fish/guestfish-actions.pod:4414 ../src/guestfs-actions.pod:6825
15304 "The default is chosen when the library was compiled by the configure script."
15308 #: ../fish/guestfish-actions.pod:4417 ../src/guestfs-actions.pod:6828
15310 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15315 #: ../fish/guestfish-actions.pod:4420 ../src/guestfs-actions.pod:6831
15316 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15320 #: ../fish/guestfish-actions.pod:4422 ../src/guestfs-actions.pod:6833
15322 "Note that you should call this function as early as possible after creating "
15323 "the handle. This is because some pre-launch operations depend on testing "
15324 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15325 "don't retest features, and so you might see inconsistent results. Using the "
15326 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15327 "the qemu binary at the same time as the handle is created."
15331 #: ../fish/guestfish-actions.pod:4430
15332 msgid "set-recovery-proc"
15336 #: ../fish/guestfish-actions.pod:4432
15337 msgid "recovery-proc"
15341 #: ../fish/guestfish-actions.pod:4434
15344 " set-recovery-proc true|false\n"
15349 #: ../fish/guestfish-actions.pod:4436
15351 "If this is called with the parameter C<false> then L</launch> does not "
15352 "create a recovery process. The purpose of the recovery process is to stop "
15353 "runaway qemu processes in the case where the main program aborts abruptly."
15357 #: ../fish/guestfish-actions.pod:4441
15359 "This only has any effect if called before L</launch>, and the default is "
15364 #: ../fish/guestfish-actions.pod:4444 ../src/guestfs-actions.pod:6859
15366 "About the only time when you would want to disable this is if the main "
15367 "process will fork itself into the background (\"daemonize\" itself). In "
15368 "this case the recovery process thinks that the main program has disappeared "
15369 "and so kills qemu, which is not very helpful."
15373 #: ../fish/guestfish-actions.pod:4450
15374 msgid "set-selinux"
15378 #: ../fish/guestfish-actions.pod:4452
15383 #: ../fish/guestfish-actions.pod:4454
15386 " set-selinux true|false\n"
15391 #: ../fish/guestfish-actions.pod:4456 ../src/guestfs-actions.pod:6875
15393 "This sets the selinux flag that is passed to the appliance at boot time. "
15394 "The default is C<selinux=0> (disabled)."
15398 #: ../fish/guestfish-actions.pod:4459 ../src/guestfs-actions.pod:6878
15400 "Note that if SELinux is enabled, it is always in Permissive mode "
15401 "(C<enforcing=0>)."
15405 #: ../fish/guestfish-actions.pod:4465
15410 #: ../fish/guestfish-actions.pod:4467
15415 #: ../fish/guestfish-actions.pod:4469
15423 #: ../fish/guestfish-actions.pod:4471 ../src/guestfs-actions.pod:6894
15425 "Change the number of virtual CPUs assigned to the appliance. The default is "
15426 "C<1>. Increasing this may improve performance, though often it has no "
15431 #: ../fish/guestfish-actions.pod:4475
15432 msgid "This function must be called before L</launch>."
15436 #: ../fish/guestfish-actions.pod:4477
15441 #: ../fish/guestfish-actions.pod:4479
15446 #: ../fish/guestfish-actions.pod:4481
15449 " set-trace true|false\n"
15454 #: ../fish/guestfish-actions.pod:4483 ../src/guestfs-actions.pod:6910
15456 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15457 "return values are traced."
15461 #: ../fish/guestfish-actions.pod:4486 ../src/guestfs-actions.pod:6913
15463 "If you want to trace C API calls into libguestfs (and other libraries) then "
15464 "possibly a better way is to use the external ltrace(1) command."
15468 #: ../fish/guestfish-actions.pod:4490 ../src/guestfs-actions.pod:6917
15470 "Command traces are disabled unless the environment variable "
15471 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15475 #: ../fish/guestfish-actions.pod:4493
15477 "Trace messages are normally sent to C<stderr>, unless you register a "
15478 "callback to send them somewhere else (see L</set-event-callback>)."
15482 #: ../fish/guestfish-actions.pod:4497
15483 msgid "set-verbose"
15487 #: ../fish/guestfish-actions.pod:4499
15492 #: ../fish/guestfish-actions.pod:4501
15495 " set-verbose true|false\n"
15500 #: ../fish/guestfish-actions.pod:4503 ../src/guestfs-actions.pod:6934
15501 msgid "If C<verbose> is true, this turns on verbose messages."
15505 #: ../fish/guestfish-actions.pod:4505 ../src/guestfs-actions.pod:6936
15507 "Verbose messages are disabled unless the environment variable "
15508 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15512 #: ../fish/guestfish-actions.pod:4508
15514 "Verbose messages are normally sent to C<stderr>, unless you register a "
15515 "callback to send them somewhere else (see L</set-event-callback>)."
15519 #: ../fish/guestfish-actions.pod:4512
15524 #: ../fish/guestfish-actions.pod:4514
15527 " setcon context\n"
15532 #: ../fish/guestfish-actions.pod:4516 ../src/guestfs-actions.pod:6953
15534 "This sets the SELinux security context of the daemon to the string "
15539 #: ../fish/guestfish-actions.pod:4519 ../src/guestfs-actions.pod:6956
15540 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15544 #: ../fish/guestfish-actions.pod:4521
15549 #: ../fish/guestfish-actions.pod:4523
15552 " setxattr xattr val vallen path\n"
15557 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6971
15559 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15560 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15564 #: ../fish/guestfish-actions.pod:4529
15565 msgid "See also: L</lsetxattr>, L<attr(5)>."
15569 #: ../fish/guestfish-actions.pod:4531
15574 #: ../fish/guestfish-actions.pod:4533
15577 " sfdisk device cyls heads sectors 'lines ...'\n"
15582 #: ../fish/guestfish-actions.pod:4535 ../src/guestfs-actions.pod:6998
15584 "This is a direct interface to the L<sfdisk(8)> program for creating "
15585 "partitions on block devices."
15589 #: ../fish/guestfish-actions.pod:4538 ../src/guestfs-actions.pod:7001
15590 msgid "C<device> should be a block device, for example C</dev/sda>."
15594 #: ../fish/guestfish-actions.pod:4540 ../src/guestfs-actions.pod:7003
15596 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15597 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
15598 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15599 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15600 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15601 "the kernel) cannot work out the right geometry and you will need to tell it."
15605 #: ../fish/guestfish-actions.pod:4548 ../src/guestfs-actions.pod:7011
15607 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15608 "refer to the L<sfdisk(8)> manpage."
15612 #: ../fish/guestfish-actions.pod:4551 ../src/guestfs-actions.pod:7014
15614 "To create a single partition occupying the whole disk, you would pass "
15615 "C<lines> as a single element list, when the single element being the string "
15620 #: ../fish/guestfish-actions.pod:4555
15621 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15625 #: ../fish/guestfish-actions.pod:4558 ../fish/guestfish-actions.pod:4578
15626 #: ../fish/guestfish-actions.pod:4597
15628 "I<This function is deprecated.> In new code, use the L</part_add> call "
15633 #: ../fish/guestfish-actions.pod:4565
15638 #: ../fish/guestfish-actions.pod:4567
15641 " sfdiskM device 'lines ...'\n"
15646 #: ../fish/guestfish-actions.pod:4569
15648 "This is a simplified interface to the L</sfdisk> command, where partition "
15649 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15650 "you don't need to specify the cyls, heads and sectors parameters which were "
15651 "rarely if ever used anyway."
15655 #: ../fish/guestfish-actions.pod:4575
15656 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15660 #: ../fish/guestfish-actions.pod:4585
15665 #: ../fish/guestfish-actions.pod:4587
15668 " sfdisk-N device partnum cyls heads sectors line\n"
15673 #: ../fish/guestfish-actions.pod:4589 ../src/guestfs-actions.pod:7070
15675 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15676 "(note: C<n> counts from 1)."
15680 #: ../fish/guestfish-actions.pod:4592
15682 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15683 "cyls/heads/sectors parameters."
15687 #: ../fish/guestfish-actions.pod:4595
15688 msgid "See also: L</part-add>"
15692 #: ../fish/guestfish-actions.pod:4604
15693 msgid "sfdisk-disk-geometry"
15697 #: ../fish/guestfish-actions.pod:4606
15700 " sfdisk-disk-geometry device\n"
15705 #: ../fish/guestfish-actions.pod:4608
15707 "This displays the disk geometry of C<device> read from the partition table. "
15708 "Especially in the case where the underlying block device has been resized, "
15709 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
15710 "kernel-geometry>)."
15714 #: ../fish/guestfish-actions.pod:4613 ../fish/guestfish-actions.pod:4622
15715 #: ../src/guestfs-actions.pod:7093 ../src/guestfs-actions.pod:7109
15716 msgid "The result is in human-readable format, and not designed to be parsed."
15720 #: ../fish/guestfish-actions.pod:4616
15721 msgid "sfdisk-kernel-geometry"
15725 #: ../fish/guestfish-actions.pod:4618
15728 " sfdisk-kernel-geometry device\n"
15733 #: ../fish/guestfish-actions.pod:4620 ../src/guestfs-actions.pod:7107
15734 msgid "This displays the kernel's idea of the geometry of C<device>."
15738 #: ../fish/guestfish-actions.pod:4625
15743 #: ../fish/guestfish-actions.pod:4627
15746 " sfdisk-l device\n"
15751 #: ../fish/guestfish-actions.pod:4629 ../src/guestfs-actions.pod:7130
15753 "This displays the partition table on C<device>, in the human-readable output "
15754 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15758 #: ../fish/guestfish-actions.pod:4633
15759 msgid "See also: L</part-list>"
15763 #: ../fish/guestfish-actions.pod:4635
15765 "I<This function is deprecated.> In new code, use the L</part_list> call "
15770 #: ../fish/guestfish-actions.pod:4642
15775 #: ../fish/guestfish-actions.pod:4644
15783 #: ../fish/guestfish-actions.pod:4646 ../src/guestfs-actions.pod:7147
15785 "This call runs a command from the guest filesystem via the guest's C</bin/"
15790 #: ../fish/guestfish-actions.pod:4649
15791 msgid "This is like L</command>, but passes the command to:"
15795 #: ../fish/guestfish-actions.pod:4651 ../src/guestfs-actions.pod:7152
15798 " /bin/sh -c \"command\"\n"
15803 #: ../fish/guestfish-actions.pod:4653 ../src/guestfs-actions.pod:7154
15805 "Depending on the guest's shell, this usually results in wildcards being "
15806 "expanded, shell expressions being interpolated and so on."
15810 #: ../fish/guestfish-actions.pod:4657
15811 msgid "All the provisos about L</command> apply to this call."
15815 #: ../fish/guestfish-actions.pod:4659
15820 #: ../fish/guestfish-actions.pod:4661
15823 " sh-lines command\n"
15828 #: ../fish/guestfish-actions.pod:4663
15829 msgid "This is the same as L</sh>, but splits the result into a list of lines."
15833 #: ../fish/guestfish-actions.pod:4666
15834 msgid "See also: L</command-lines>"
15838 #: ../fish/guestfish-actions.pod:4668
15843 #: ../fish/guestfish-actions.pod:4670
15851 #: ../fish/guestfish-actions.pod:4672 ../src/guestfs-actions.pod:7188
15852 msgid "Sleep for C<secs> seconds."
15856 #: ../fish/guestfish-actions.pod:4674
15861 #: ../fish/guestfish-actions.pod:4676
15869 #: ../fish/guestfish-actions.pod:4680 ../src/guestfs-actions.pod:7202
15870 msgid "This is the same as the C<stat(2)> system call."
15874 #: ../fish/guestfish-actions.pod:4682
15879 #: ../fish/guestfish-actions.pod:4684
15887 #: ../fish/guestfish-actions.pod:4686 ../src/guestfs-actions.pod:7216
15889 "Returns file system statistics for any mounted file system. C<path> should "
15890 "be a file or directory in the mounted file system (typically it is the mount "
15891 "point itself, but it doesn't need to be)."
15895 #: ../fish/guestfish-actions.pod:4690 ../src/guestfs-actions.pod:7220
15896 msgid "This is the same as the C<statvfs(2)> system call."
15900 #: ../fish/guestfish-actions.pod:4692
15905 #: ../fish/guestfish-actions.pod:4694
15913 #: ../fish/guestfish-actions.pod:4696 ../src/guestfs-actions.pod:7234
15915 "This runs the L<strings(1)> command on a file and returns the list of "
15916 "printable strings found."
15920 #: ../fish/guestfish-actions.pod:4702
15925 #: ../fish/guestfish-actions.pod:4704
15928 " strings-e encoding path\n"
15933 #: ../fish/guestfish-actions.pod:4706
15935 "This is like the L</strings> command, but allows you to specify the encoding "
15936 "of strings that are looked for in the source file C<path>."
15940 #: ../fish/guestfish-actions.pod:4710 ../src/guestfs-actions.pod:7257
15941 msgid "Allowed encodings are:"
15945 #: ../fish/guestfish-actions.pod:4714 ../src/guestfs-actions.pod:7261
15950 #: ../fish/guestfish-actions.pod:4716
15952 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
15953 "ISO-8859-X (this is what L</strings> uses)."
15957 #: ../fish/guestfish-actions.pod:4719 ../src/guestfs-actions.pod:7266
15962 #: ../fish/guestfish-actions.pod:4721 ../src/guestfs-actions.pod:7268
15963 msgid "Single 8-bit-byte characters."
15967 #: ../fish/guestfish-actions.pod:4723 ../src/guestfs-actions.pod:7270
15972 #: ../fish/guestfish-actions.pod:4725 ../src/guestfs-actions.pod:7272
15973 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
15977 #: ../fish/guestfish-actions.pod:4728 ../src/guestfs-actions.pod:7275
15978 msgid "l (lower case letter L)"
15982 #: ../fish/guestfish-actions.pod:4730 ../src/guestfs-actions.pod:7277
15984 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
15985 "examining binaries in Windows guests."
15989 #: ../fish/guestfish-actions.pod:4733 ../src/guestfs-actions.pod:7280
15994 #: ../fish/guestfish-actions.pod:4735 ../src/guestfs-actions.pod:7282
15995 msgid "32-bit big endian such as UCS-4BE."
15999 #: ../fish/guestfish-actions.pod:4737 ../src/guestfs-actions.pod:7284
16004 #: ../fish/guestfish-actions.pod:4739 ../src/guestfs-actions.pod:7286
16005 msgid "32-bit little endian such as UCS-4LE."
16009 #: ../fish/guestfish-actions.pod:4743 ../src/guestfs-actions.pod:7290
16010 msgid "The returned strings are transcoded to UTF-8."
16014 #: ../fish/guestfish-actions.pod:4748
16015 msgid "swapoff-device"
16019 #: ../fish/guestfish-actions.pod:4750
16022 " swapoff-device device\n"
16027 #: ../fish/guestfish-actions.pod:4752
16029 "This command disables the libguestfs appliance swap device or partition "
16030 "named C<device>. See L</swapon-device>."
16034 #: ../fish/guestfish-actions.pod:4756
16035 msgid "swapoff-file"
16039 #: ../fish/guestfish-actions.pod:4758
16042 " swapoff-file file\n"
16047 #: ../fish/guestfish-actions.pod:4760 ../src/guestfs-actions.pod:7321
16048 msgid "This command disables the libguestfs appliance swap on file."
16052 #: ../fish/guestfish-actions.pod:4762
16053 msgid "swapoff-label"
16057 #: ../fish/guestfish-actions.pod:4764
16060 " swapoff-label label\n"
16065 #: ../fish/guestfish-actions.pod:4766 ../src/guestfs-actions.pod:7333
16067 "This command disables the libguestfs appliance swap on labeled swap "
16072 #: ../fish/guestfish-actions.pod:4769
16073 msgid "swapoff-uuid"
16077 #: ../fish/guestfish-actions.pod:4771
16080 " swapoff-uuid uuid\n"
16085 #: ../fish/guestfish-actions.pod:4773 ../src/guestfs-actions.pod:7346
16087 "This command disables the libguestfs appliance swap partition with the given "
16092 #: ../fish/guestfish-actions.pod:4776
16093 msgid "swapon-device"
16097 #: ../fish/guestfish-actions.pod:4778
16100 " swapon-device device\n"
16105 #: ../fish/guestfish-actions.pod:4780
16107 "This command enables the libguestfs appliance to use the swap device or "
16108 "partition named C<device>. The increased memory is made available for all "
16109 "commands, for example those run using L</command> or L</sh>."
16113 #: ../fish/guestfish-actions.pod:4785 ../src/guestfs-actions.pod:7364
16115 "Note that you should not swap to existing guest swap partitions unless you "
16116 "know what you are doing. They may contain hibernation information, or other "
16117 "information that the guest doesn't want you to trash. You also risk leaking "
16118 "information about the host to the guest this way. Instead, attach a new "
16119 "host device to the guest and swap on that."
16123 #: ../fish/guestfish-actions.pod:4792
16124 msgid "swapon-file"
16128 #: ../fish/guestfish-actions.pod:4794
16131 " swapon-file file\n"
16136 #: ../fish/guestfish-actions.pod:4796
16138 "This command enables swap to a file. See L</swapon-device> for other notes."
16142 #: ../fish/guestfish-actions.pod:4799
16143 msgid "swapon-label"
16147 #: ../fish/guestfish-actions.pod:4801
16150 " swapon-label label\n"
16155 #: ../fish/guestfish-actions.pod:4803
16157 "This command enables swap to a labeled swap partition. See L</swapon-"
16158 "device> for other notes."
16162 #: ../fish/guestfish-actions.pod:4806
16163 msgid "swapon-uuid"
16167 #: ../fish/guestfish-actions.pod:4808
16170 " swapon-uuid uuid\n"
16175 #: ../fish/guestfish-actions.pod:4810
16177 "This command enables swap to a swap partition with the given UUID. See L</"
16178 "swapon-device> for other notes."
16182 #: ../fish/guestfish-actions.pod:4813
16187 #: ../fish/guestfish-actions.pod:4815
16195 #: ../fish/guestfish-actions.pod:4817 ../src/guestfs-actions.pod:7419
16197 "This syncs the disk, so that any writes are flushed through to the "
16198 "underlying disk image."
16202 #: ../fish/guestfish-actions.pod:4820 ../src/guestfs-actions.pod:7422
16204 "You should always call this if you have modified a disk image, before "
16205 "closing the handle."
16209 #: ../fish/guestfish-actions.pod:4823
16214 #: ../fish/guestfish-actions.pod:4825
16222 #: ../fish/guestfish-actions.pod:4827 ../src/guestfs-actions.pod:7435
16224 "This command returns up to the last 10 lines of a file as a list of strings."
16228 #: ../fish/guestfish-actions.pod:4833
16233 #: ../fish/guestfish-actions.pod:4835
16236 " tail-n nrlines path\n"
16241 #: ../fish/guestfish-actions.pod:4837 ../src/guestfs-actions.pod:7454
16243 "If the parameter C<nrlines> is a positive number, this returns the last "
16244 "C<nrlines> lines of the file C<path>."
16248 #: ../fish/guestfish-actions.pod:4840 ../src/guestfs-actions.pod:7457
16250 "If the parameter C<nrlines> is a negative number, this returns lines from "
16251 "the file C<path>, starting with the C<-nrlines>th line."
16255 #: ../fish/guestfish-actions.pod:4848
16260 #: ../fish/guestfish-actions.pod:4850
16263 " tar-in (tarfile|-) directory\n"
16268 #: ../fish/guestfish-actions.pod:4852 ../src/guestfs-actions.pod:7478
16270 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16271 "tar file) into C<directory>."
16275 #: ../fish/guestfish-actions.pod:4855
16276 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16280 #: ../fish/guestfish-actions.pod:4860
16285 #: ../fish/guestfish-actions.pod:4862
16288 " tar-out directory (tarfile|-)\n"
16293 #: ../fish/guestfish-actions.pod:4864 ../src/guestfs-actions.pod:7495
16295 "This command packs the contents of C<directory> and downloads it to local "
16300 #: ../fish/guestfish-actions.pod:4867
16301 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16305 #: ../fish/guestfish-actions.pod:4872
16310 #: ../fish/guestfish-actions.pod:4874
16313 " tgz-in (tarball|-) directory\n"
16318 #: ../fish/guestfish-actions.pod:4876 ../src/guestfs-actions.pod:7512
16320 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16321 "tar file) into C<directory>."
16325 #: ../fish/guestfish-actions.pod:4879
16326 msgid "To upload an uncompressed tarball, use L</tar-in>."
16330 #: ../fish/guestfish-actions.pod:4883
16335 #: ../fish/guestfish-actions.pod:4885
16338 " tgz-out directory (tarball|-)\n"
16343 #: ../fish/guestfish-actions.pod:4887 ../src/guestfs-actions.pod:7528
16345 "This command packs the contents of C<directory> and downloads it to local "
16350 #: ../fish/guestfish-actions.pod:4890
16351 msgid "To download an uncompressed tarball, use L</tar-out>."
16355 #: ../fish/guestfish-actions.pod:4894
16360 #: ../fish/guestfish-actions.pod:4896
16368 #: ../fish/guestfish-actions.pod:4898 ../src/guestfs-actions.pod:7543
16370 "Touch acts like the L<touch(1)> command. It can be used to update the "
16371 "timestamps on a file, or, if the file does not exist, to create a new zero-"
16376 #: ../fish/guestfish-actions.pod:4902 ../src/guestfs-actions.pod:7547
16378 "This command only works on regular files, and will fail on other file types "
16379 "such as directories, symbolic links, block special etc."
16383 #: ../fish/guestfish-actions.pod:4905
16388 #: ../fish/guestfish-actions.pod:4907
16396 #: ../fish/guestfish-actions.pod:4909 ../src/guestfs-actions.pod:7560
16398 "This command truncates C<path> to a zero-length file. The file must exist "
16403 #: ../fish/guestfish-actions.pod:4912
16404 msgid "truncate-size"
16408 #: ../fish/guestfish-actions.pod:4914
16411 " truncate-size path size\n"
16416 #: ../fish/guestfish-actions.pod:4916 ../src/guestfs-actions.pod:7574
16418 "This command truncates C<path> to size C<size> bytes. The file must exist "
16423 #: ../fish/guestfish-actions.pod:4919
16425 "If the current file size is less than C<size> then the file is extended to "
16426 "the required size with zero bytes. This creates a sparse file (ie. disk "
16427 "blocks are not allocated for the file until you write to it). To create a "
16428 "non-sparse file of zeroes, use L</fallocate64> instead."
16432 #: ../fish/guestfish-actions.pod:4925
16437 #: ../fish/guestfish-actions.pod:4927
16440 " tune2fs-l device\n"
16445 #: ../fish/guestfish-actions.pod:4929 ../src/guestfs-actions.pod:7593
16447 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16452 #: ../fish/guestfish-actions.pod:4932 ../src/guestfs-actions.pod:7596
16454 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16455 "for more details. The list of fields returned isn't clearly defined, and "
16456 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16457 "and the filesystem itself."
16461 #: ../fish/guestfish-actions.pod:4937
16466 #: ../fish/guestfish-actions.pod:4939
16469 " txz-in (tarball|-) directory\n"
16474 #: ../fish/guestfish-actions.pod:4941 ../src/guestfs-actions.pod:7616
16476 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16477 "tar file) into C<directory>."
16481 #: ../fish/guestfish-actions.pod:4946
16486 #: ../fish/guestfish-actions.pod:4948
16489 " txz-out directory (tarball|-)\n"
16494 #: ../fish/guestfish-actions.pod:4950 ../src/guestfs-actions.pod:7630
16496 "This command packs the contents of C<directory> and downloads it to local "
16497 "file C<tarball> (as an xz compressed tar archive)."
16501 #: ../fish/guestfish-actions.pod:4955
16506 #: ../fish/guestfish-actions.pod:4957
16514 #: ../fish/guestfish-actions.pod:4959 ../src/guestfs-actions.pod:7643
16516 "This function sets the mask used for creating new files and device nodes to "
16521 #: ../fish/guestfish-actions.pod:4962 ../src/guestfs-actions.pod:7646
16523 "Typical umask values would be C<022> which creates new files with "
16524 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16525 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16529 #: ../fish/guestfish-actions.pod:4967 ../src/guestfs-actions.pod:7651
16531 "The default umask is C<022>. This is important because it means that "
16532 "directories and device nodes will be created with C<0644> or C<0755> mode "
16533 "even if you specify C<0777>."
16537 #: ../fish/guestfish-actions.pod:4971
16538 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16542 #: ../fish/guestfish-actions.pod:4974 ../src/guestfs-actions.pod:7658
16543 msgid "This call returns the previous umask."
16547 #: ../fish/guestfish-actions.pod:4976
16552 #: ../fish/guestfish-actions.pod:4978
16557 #: ../fish/guestfish-actions.pod:4980
16560 " umount pathordevice\n"
16565 #: ../fish/guestfish-actions.pod:4982 ../src/guestfs-actions.pod:7670
16567 "This unmounts the given filesystem. The filesystem may be specified either "
16568 "by its mountpoint (path) or the device which contains the filesystem."
16572 #: ../fish/guestfish-actions.pod:4986
16577 #: ../fish/guestfish-actions.pod:4988
16578 msgid "unmount-all"
16582 #: ../fish/guestfish-actions.pod:4990
16590 #: ../fish/guestfish-actions.pod:4992 ../src/guestfs-actions.pod:7683
16591 msgid "This unmounts all mounted filesystems."
16595 #: ../fish/guestfish-actions.pod:4994 ../src/guestfs-actions.pod:7685
16596 msgid "Some internal mounts are not unmounted by this call."
16600 #: ../fish/guestfish-actions.pod:4996
16605 #: ../fish/guestfish-actions.pod:4998
16608 " upload (filename|-) remotefilename\n"
16613 #: ../fish/guestfish-actions.pod:5000 ../fish/guestfish-actions.pod:5013
16614 #: ../src/guestfs-actions.pod:7698 ../src/guestfs-actions.pod:7722
16615 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16619 #: ../fish/guestfish-actions.pod:5005
16620 msgid "See also L</download>."
16624 #: ../fish/guestfish-actions.pod:5009
16625 msgid "upload-offset"
16629 #: ../fish/guestfish-actions.pod:5011
16632 " upload-offset (filename|-) remotefilename offset\n"
16637 #: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7725
16639 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
16640 "The intention is to overwrite parts of existing files or devices, although "
16641 "if a non-existant file is specified then it is created with a \"hole\" "
16642 "before C<offset>. The size of the data written is implicit in the size of "
16643 "the source C<filename>."
16647 #: ../fish/guestfish-actions.pod:5023
16649 "Note that there is no limit on the amount of data that can be uploaded with "
16650 "this call, unlike with L</pwrite>, and this call always writes the full "
16651 "amount unless an error occurs."
16655 #: ../fish/guestfish-actions.pod:5028
16656 msgid "See also L</upload>, L</pwrite>."
16660 #: ../fish/guestfish-actions.pod:5032
16665 #: ../fish/guestfish-actions.pod:5034
16668 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
16673 #: ../fish/guestfish-actions.pod:5036 ../src/guestfs-actions.pod:7758
16674 msgid "This command sets the timestamps of a file with nanosecond precision."
16678 #: ../fish/guestfish-actions.pod:5039 ../src/guestfs-actions.pod:7761
16680 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16685 #: ../fish/guestfish-actions.pod:5042 ../src/guestfs-actions.pod:7764
16687 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16688 "nanoseconds from the epoch."
16692 #: ../fish/guestfish-actions.pod:5045 ../src/guestfs-actions.pod:7767
16694 "If the C<*nsecs> field contains the special value C<-1> then the "
16695 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16696 "ignored in this case)."
16700 #: ../fish/guestfish-actions.pod:5049 ../src/guestfs-actions.pod:7771
16702 "If the C<*nsecs> field contains the special value C<-2> then the "
16703 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16708 #: ../fish/guestfish-actions.pod:5053
16713 #: ../fish/guestfish-actions.pod:5055
16721 #: ../fish/guestfish-actions.pod:5057 ../src/guestfs-actions.pod:7784
16723 "Return the libguestfs version number that the program is linked against."
16727 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7787
16729 "Note that because of dynamic linking this is not necessarily the version of "
16730 "libguestfs that you compiled against. You can compile the program, and then "
16731 "at runtime dynamically link against a completely different C<libguestfs.so> "
16736 #: ../fish/guestfish-actions.pod:5065 ../src/guestfs-actions.pod:7792
16738 "This call was added in version C<1.0.58>. In previous versions of "
16739 "libguestfs there was no way to get the version number. From C code you can "
16740 "use dynamic linker functions to find out if this symbol exists (if it "
16741 "doesn't, then it's an earlier version)."
16745 #: ../fish/guestfish-actions.pod:5071 ../src/guestfs-actions.pod:7798
16747 "The call returns a structure with four elements. The first three (C<major>, "
16748 "C<minor> and C<release>) are numbers and correspond to the usual version "
16749 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16750 "but may be used for distro-specific information."
16754 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7804
16756 "To construct the original version string: C<$major.$minor.$release$extra>"
16760 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7807
16761 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16765 #: ../fish/guestfish-actions.pod:5082
16767 "I<Note:> Don't use this call to test for availability of features. In "
16768 "enterprise distributions we backport features from later versions into "
16769 "earlier versions, making this an unreliable way to test for features. Use "
16770 "L</available> instead."
16774 #: ../fish/guestfish-actions.pod:5088
16779 #: ../fish/guestfish-actions.pod:5090
16782 " vfs-label device\n"
16787 #: ../fish/guestfish-actions.pod:5092 ../src/guestfs-actions.pod:7827
16788 msgid "This returns the filesystem label of the filesystem on C<device>."
16792 #: ../fish/guestfish-actions.pod:5095 ../src/guestfs-actions.pod:7830
16793 msgid "If the filesystem is unlabeled, this returns the empty string."
16797 #: ../fish/guestfish-actions.pod:5097
16798 msgid "To find a filesystem from the label, use L</findfs-label>."
16802 #: ../fish/guestfish-actions.pod:5099
16807 #: ../fish/guestfish-actions.pod:5101
16810 " vfs-type device\n"
16815 #: ../fish/guestfish-actions.pod:5103 ../src/guestfs-actions.pod:7845
16817 "This command gets the filesystem type corresponding to the filesystem on "
16822 #: ../fish/guestfish-actions.pod:5106 ../src/guestfs-actions.pod:7848
16824 "For most filesystems, the result is the name of the Linux VFS module which "
16825 "would be used to mount this filesystem if you mounted it without specifying "
16826 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16830 #: ../fish/guestfish-actions.pod:5111
16835 #: ../fish/guestfish-actions.pod:5113
16838 " vfs-uuid device\n"
16843 #: ../fish/guestfish-actions.pod:5115 ../src/guestfs-actions.pod:7864
16844 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16848 #: ../fish/guestfish-actions.pod:5118 ../src/guestfs-actions.pod:7867
16849 msgid "If the filesystem does not have a UUID, this returns the empty string."
16853 #: ../fish/guestfish-actions.pod:5120
16854 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
16858 #: ../fish/guestfish-actions.pod:5122
16859 msgid "vg-activate"
16863 #: ../fish/guestfish-actions.pod:5124
16866 " vg-activate true|false 'volgroups ...'\n"
16871 #: ../fish/guestfish-actions.pod:5126 ../src/guestfs-actions.pod:7883
16873 "This command activates or (if C<activate> is false) deactivates all logical "
16874 "volumes in the listed volume groups C<volgroups>."
16878 #: ../fish/guestfish-actions.pod:5129 ../src/guestfs-actions.pod:7886
16879 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16883 #: ../fish/guestfish-actions.pod:5131 ../src/guestfs-actions.pod:7888
16885 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16886 "activated or deactivated."
16890 #: ../fish/guestfish-actions.pod:5134
16891 msgid "vg-activate-all"
16895 #: ../fish/guestfish-actions.pod:5136
16898 " vg-activate-all true|false\n"
16903 #: ../fish/guestfish-actions.pod:5138 ../src/guestfs-actions.pod:7901
16905 "This command activates or (if C<activate> is false) deactivates all logical "
16906 "volumes in all volume groups."
16910 #: ../fish/guestfish-actions.pod:5141 ../src/guestfs-actions.pod:7904
16911 msgid "This command is the same as running C<vgchange -a y|n>"
16915 #: ../fish/guestfish-actions.pod:5143
16920 #: ../fish/guestfish-actions.pod:5145
16923 " vgcreate volgroup 'physvols ...'\n"
16928 #: ../fish/guestfish-actions.pod:5147 ../src/guestfs-actions.pod:7917
16930 "This creates an LVM volume group called C<volgroup> from the non-empty list "
16931 "of physical volumes C<physvols>."
16935 #: ../fish/guestfish-actions.pod:5150
16940 #: ../fish/guestfish-actions.pod:5152
16943 " vglvuuids vgname\n"
16948 #: ../fish/guestfish-actions.pod:5154 ../src/guestfs-actions.pod:7930
16950 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
16951 "volumes created in this volume group."
16955 #: ../fish/guestfish-actions.pod:5157
16957 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
16958 "logical volumes and volume groups."
16962 #: ../fish/guestfish-actions.pod:5160
16963 msgid "See also L</vgpvuuids>."
16967 #: ../fish/guestfish-actions.pod:5162
16972 #: ../fish/guestfish-actions.pod:5164
16975 " vgpvuuids vgname\n"
16980 #: ../fish/guestfish-actions.pod:5166 ../src/guestfs-actions.pod:7950
16982 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
16983 "volumes that this volume group resides on."
16987 #: ../fish/guestfish-actions.pod:5169
16989 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
16990 "physical volumes and volume groups."
16994 #: ../fish/guestfish-actions.pod:5172
16995 msgid "See also L</vglvuuids>."
16999 #: ../fish/guestfish-actions.pod:5174
17004 #: ../fish/guestfish-actions.pod:5176
17007 " vgremove vgname\n"
17012 #: ../fish/guestfish-actions.pod:5178 ../src/guestfs-actions.pod:7970
17013 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17017 #: ../fish/guestfish-actions.pod:5180 ../src/guestfs-actions.pod:7972
17019 "This also forcibly removes all logical volumes in the volume group (if any)."
17023 #: ../fish/guestfish-actions.pod:5183
17028 #: ../fish/guestfish-actions.pod:5185
17031 " vgrename volgroup newvolgroup\n"
17036 #: ../fish/guestfish-actions.pod:5187 ../src/guestfs-actions.pod:7986
17037 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17041 #: ../fish/guestfish-actions.pod:5189
17046 #: ../fish/guestfish-actions.pod:5191
17054 #: ../fish/guestfish-actions.pod:5193 ../src/guestfs-actions.pod:7997
17056 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
17061 #: ../fish/guestfish-actions.pod:5196 ../src/guestfs-actions.pod:8000
17063 "This returns a list of just the volume group names that were detected (eg. "
17068 #: ../fish/guestfish-actions.pod:5199
17069 msgid "See also L</vgs-full>."
17073 #: ../fish/guestfish-actions.pod:5201
17078 #: ../fish/guestfish-actions.pod:5203
17086 #: ../fish/guestfish-actions.pod:5205 ../src/guestfs-actions.pod:8016
17088 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
17089 "> command. The \"full\" version includes all fields."
17093 #: ../fish/guestfish-actions.pod:5208
17098 #: ../fish/guestfish-actions.pod:5210
17106 #: ../fish/guestfish-actions.pod:5212 ../src/guestfs-actions.pod:8030
17108 "This rescans all block devices and rebuilds the list of LVM physical "
17109 "volumes, volume groups and logical volumes."
17113 #: ../fish/guestfish-actions.pod:5215
17118 #: ../fish/guestfish-actions.pod:5217
17126 #: ../fish/guestfish-actions.pod:5219 ../src/guestfs-actions.pod:8043
17127 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17131 #: ../fish/guestfish-actions.pod:5221
17136 #: ../fish/guestfish-actions.pod:5223
17144 #: ../fish/guestfish-actions.pod:5225 ../src/guestfs-actions.pod:8083
17146 "This command counts the characters in a file, using the C<wc -c> external "
17151 #: ../fish/guestfish-actions.pod:5228
17156 #: ../fish/guestfish-actions.pod:5230
17164 #: ../fish/guestfish-actions.pod:5232 ../src/guestfs-actions.pod:8096
17166 "This command counts the lines in a file, using the C<wc -l> external command."
17170 #: ../fish/guestfish-actions.pod:5235
17175 #: ../fish/guestfish-actions.pod:5237
17183 #: ../fish/guestfish-actions.pod:5239 ../src/guestfs-actions.pod:8109
17185 "This command counts the words in a file, using the C<wc -w> external command."
17189 #: ../fish/guestfish-actions.pod:5242
17194 #: ../fish/guestfish-actions.pod:5244
17197 " write path content\n"
17202 #: ../fish/guestfish-actions.pod:5246 ../src/guestfs-actions.pod:8124
17204 "This call creates a file called C<path>. The content of the file is the "
17205 "string C<content> (which can contain any 8 bit data)."
17209 #: ../fish/guestfish-actions.pod:5249
17210 msgid "See also L</write-append>."
17214 #: ../fish/guestfish-actions.pod:5254
17215 msgid "write-append"
17219 #: ../fish/guestfish-actions.pod:5256
17222 " write-append path content\n"
17227 #: ../fish/guestfish-actions.pod:5258 ../src/guestfs-actions.pod:8144
17229 "This call appends C<content> to the end of file C<path>. If C<path> does "
17230 "not exist, then a new file is created."
17234 #: ../fish/guestfish-actions.pod:5261
17235 msgid "See also L</write>."
17239 #: ../fish/guestfish-actions.pod:5266
17244 #: ../fish/guestfish-actions.pod:5268
17247 " write-file path content size\n"
17252 #: ../fish/guestfish-actions.pod:5270 ../src/guestfs-actions.pod:8171
17254 "This call creates a file called C<path>. The contents of the file is the "
17255 "string C<content> (which can contain any 8 bit data), with length C<size>."
17259 #: ../fish/guestfish-actions.pod:5274 ../src/guestfs-actions.pod:8175
17261 "As a special case, if C<size> is C<0> then the length is calculated using "
17262 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17266 #: ../fish/guestfish-actions.pod:5278 ../src/guestfs-actions.pod:8179
17268 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17269 "I<not> work, even if the length is specified."
17273 #: ../fish/guestfish-actions.pod:5284
17275 "I<This function is deprecated.> In new code, use the L</write> call instead."
17279 #: ../fish/guestfish-actions.pod:5291
17284 #: ../fish/guestfish-actions.pod:5293
17287 " zegrep regex path\n"
17292 #: ../fish/guestfish-actions.pod:5295 ../src/guestfs-actions.pod:8196
17294 "This calls the external C<zegrep> program and returns the matching lines."
17298 #: ../fish/guestfish-actions.pod:5301
17303 #: ../fish/guestfish-actions.pod:5303
17306 " zegrepi regex path\n"
17311 #: ../fish/guestfish-actions.pod:5305 ../src/guestfs-actions.pod:8215
17313 "This calls the external C<zegrep -i> program and returns the matching lines."
17317 #: ../fish/guestfish-actions.pod:5311
17322 #: ../fish/guestfish-actions.pod:5313
17330 #: ../fish/guestfish-actions.pod:5315 ../src/guestfs-actions.pod:8233
17331 msgid "This command writes zeroes over the first few blocks of C<device>."
17335 #: ../fish/guestfish-actions.pod:5317 ../src/guestfs-actions.pod:8235
17337 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17338 "securely wipe the device). It should be sufficient to remove any partition "
17339 "tables, filesystem superblocks and so on."
17343 #: ../fish/guestfish-actions.pod:5321 ../fish/guestfish-actions.pod:5336
17344 #: ../src/guestfs-actions.pod:8239 ../src/guestfs-actions.pod:8265
17346 "If blocks are already zero, then this command avoids writing zeroes. This "
17347 "prevents the underlying device from becoming non-sparse or growing "
17352 #: ../fish/guestfish-actions.pod:5325
17353 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17357 #: ../fish/guestfish-actions.pod:5328
17358 msgid "zero-device"
17362 #: ../fish/guestfish-actions.pod:5330
17365 " zero-device device\n"
17370 #: ../fish/guestfish-actions.pod:5332
17372 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17373 "which just zeroes the first few blocks of a device."
17377 #: ../fish/guestfish-actions.pod:5340
17382 #: ../fish/guestfish-actions.pod:5342
17385 " zerofree device\n"
17390 #: ../fish/guestfish-actions.pod:5344 ../src/guestfs-actions.pod:8284
17392 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17393 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17394 "possible to compress the filesystem more effectively."
17398 #: ../fish/guestfish-actions.pod:5349 ../src/guestfs-actions.pod:8289
17399 msgid "You should B<not> run this program if the filesystem is mounted."
17403 #: ../fish/guestfish-actions.pod:5352 ../src/guestfs-actions.pod:8292
17405 "It is possible that using this program can damage the filesystem or data on "
17410 #: ../fish/guestfish-actions.pod:5355
17415 #: ../fish/guestfish-actions.pod:5357
17418 " zfgrep pattern path\n"
17423 #: ../fish/guestfish-actions.pod:5359 ../src/guestfs-actions.pod:8306
17425 "This calls the external C<zfgrep> program and returns the matching lines."
17429 #: ../fish/guestfish-actions.pod:5365
17434 #: ../fish/guestfish-actions.pod:5367
17437 " zfgrepi pattern path\n"
17442 #: ../fish/guestfish-actions.pod:5369 ../src/guestfs-actions.pod:8325
17444 "This calls the external C<zfgrep -i> program and returns the matching lines."
17448 #: ../fish/guestfish-actions.pod:5375
17453 #: ../fish/guestfish-actions.pod:5377
17456 " zfile meth path\n"
17461 #: ../fish/guestfish-actions.pod:5379 ../src/guestfs-actions.pod:8351
17463 "This command runs C<file> after first decompressing C<path> using C<method>."
17467 #: ../fish/guestfish-actions.pod:5382 ../src/guestfs-actions.pod:8354
17468 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17472 #: ../fish/guestfish-actions.pod:5384
17474 "Since 1.0.63, use L</file> instead which can now process compressed files."
17478 #: ../fish/guestfish-actions.pod:5387
17480 "I<This function is deprecated.> In new code, use the L</file> call instead."
17484 #: ../fish/guestfish-actions.pod:5394
17489 #: ../fish/guestfish-actions.pod:5396
17492 " zgrep regex path\n"
17497 #: ../fish/guestfish-actions.pod:5398 ../src/guestfs-actions.pod:8371
17499 "This calls the external C<zgrep> program and returns the matching lines."
17503 #: ../fish/guestfish-actions.pod:5404
17508 #: ../fish/guestfish-actions.pod:5406
17511 " zgrepi regex path\n"
17516 #: ../fish/guestfish-actions.pod:5408 ../src/guestfs-actions.pod:8390
17518 "This calls the external C<zgrep -i> program and returns the matching lines."
17522 #: ../fish/guestfish-commands.pod:1
17527 #: ../fish/guestfish-commands.pod:3
17532 #: ../fish/guestfish-commands.pod:5
17535 " alloc filename size\n"
17540 #: ../fish/guestfish-commands.pod:7
17542 "This creates an empty (zeroed) file of the given size, and then adds so it "
17543 "can be further examined."
17547 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17548 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17552 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17553 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17557 #: ../fish/guestfish-commands.pod:14
17559 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17560 "image, see L</PREPARED DISK IMAGES>."
17564 #: ../fish/guestfish-commands.pod:17
17569 #: ../fish/guestfish-commands.pod:19
17572 " copy-in local [local ...] /remotedir\n"
17577 #: ../fish/guestfish-commands.pod:21
17579 "C<copy-in> copies local files or directories recursively into the disk "
17580 "image, placing them in the directory called C</remotedir> (which must "
17581 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
17582 "other commands as necessary."
17586 #: ../fish/guestfish-commands.pod:26
17588 "Multiple local files and directories can be specified, but the last "
17589 "parameter must always be a remote directory. Wildcards cannot be used."
17593 #: ../fish/guestfish-commands.pod:30
17598 #: ../fish/guestfish-commands.pod:32
17601 " copy-out remote [remote ...] localdir\n"
17606 #: ../fish/guestfish-commands.pod:34
17608 "C<copy-out> copies remote files or directories recursively out of the disk "
17609 "image, placing them on the host disk in a local directory called C<localdir> "
17610 "(which must exist). This guestfish meta-command turns into a sequence of L</"
17611 "download>, L</tar-out> and other commands as necessary."
17615 #: ../fish/guestfish-commands.pod:40
17617 "Multiple remote files and directories can be specified, but the last "
17618 "parameter must always be a local directory. To download to the current "
17619 "directory, use C<.> as in:"
17623 #: ../fish/guestfish-commands.pod:44
17626 " copy-out /home .\n"
17631 #: ../fish/guestfish-commands.pod:46
17633 "Wildcards cannot be used in the ordinary command, but you can use them with "
17634 "the help of L</glob> like this:"
17638 #: ../fish/guestfish-commands.pod:49
17641 " glob copy-out /home/* .\n"
17646 #: ../fish/guestfish-commands.pod:51
17651 #: ../fish/guestfish-commands.pod:53
17654 " display filename\n"
17659 #: ../fish/guestfish-commands.pod:55
17661 "Use C<display> (a graphical display program) to display an image file. It "
17662 "downloads the file, and runs C<display> on it."
17666 #: ../fish/guestfish-commands.pod:58
17668 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
17669 "environment variable. For example to use the GNOME display program:"
17673 #: ../fish/guestfish-commands.pod:61
17676 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
17681 #: ../fish/guestfish-commands.pod:63
17682 msgid "See also L<display(1)>."
17686 #: ../fish/guestfish-commands.pod:65
17691 #: ../fish/guestfish-commands.pod:67
17694 " echo [params ...]\n"
17699 #: ../fish/guestfish-commands.pod:69
17700 msgid "This echos the parameters to the terminal."
17704 #: ../fish/guestfish-commands.pod:71
17709 #: ../fish/guestfish-commands.pod:73
17714 #: ../fish/guestfish-commands.pod:75
17719 #: ../fish/guestfish-commands.pod:77
17727 #: ../fish/guestfish-commands.pod:79
17729 "This is used to edit a file. It downloads the file, edits it locally using "
17730 "your editor, then uploads the result."
17734 #: ../fish/guestfish-commands.pod:82
17736 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
17737 "or C<emacs> you will get those corresponding editors."
17741 #: ../fish/guestfish-commands.pod:86
17746 #: ../fish/guestfish-commands.pod:88
17749 " glob command args...\n"
17754 #: ../fish/guestfish-commands.pod:90
17756 "Expand wildcards in any paths in the args list, and run C<command> "
17757 "repeatedly on each matching path."
17761 #: ../fish/guestfish-commands.pod:93
17762 msgid "See L</WILDCARDS AND GLOBBING>."
17766 #: ../fish/guestfish-commands.pod:95
17771 #: ../fish/guestfish-commands.pod:97
17774 " hexedit <filename|device>\n"
17775 " hexedit <filename|device> <max>\n"
17776 " hexedit <filename|device> <start> <max>\n"
17781 #: ../fish/guestfish-commands.pod:101
17783 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
17788 #: ../fish/guestfish-commands.pod:104
17790 "This command works by downloading potentially the whole file or device, "
17791 "editing it locally, then uploading it. If the file or device is large, you "
17792 "have to specify which part you wish to edit by using C<max> and/or C<start> "
17793 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
17794 "usual modifiers allowed such as C<1M> (1 megabyte)."
17798 #: ../fish/guestfish-commands.pod:111
17799 msgid "For example to edit the first few sectors of a disk you might do:"
17803 #: ../fish/guestfish-commands.pod:114
17806 " hexedit /dev/sda 1M\n"
17811 #: ../fish/guestfish-commands.pod:116
17813 "which would allow you to edit anywhere within the first megabyte of the disk."
17817 #: ../fish/guestfish-commands.pod:119
17818 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
17822 #: ../fish/guestfish-commands.pod:121
17825 " hexedit /dev/sda1 0x400 0x400\n"
17830 #: ../fish/guestfish-commands.pod:123
17831 msgid "(assuming the superblock is in the standard location)."
17835 #: ../fish/guestfish-commands.pod:125
17837 "This command requires the external L<hexedit(1)> program. You can specify "
17838 "another program to use by setting the C<HEXEDITOR> environment variable."
17842 #: ../fish/guestfish-commands.pod:129
17843 msgid "See also L</hexdump>."
17847 #: ../fish/guestfish-commands.pod:131
17852 #: ../fish/guestfish-commands.pod:133
17860 #: ../fish/guestfish-commands.pod:135
17862 "Change the local directory, ie. the current directory of guestfish itself."
17866 #: ../fish/guestfish-commands.pod:138
17867 msgid "Note that C<!cd> won't do what you might expect."
17871 #: ../fish/guestfish-commands.pod:140
17876 #: ../fish/guestfish-commands.pod:142
17881 #: ../fish/guestfish-commands.pod:144
17889 #: ../fish/guestfish-commands.pod:146
17890 msgid "Opens the manual page for guestfish."
17894 #: ../fish/guestfish-commands.pod:148
17899 #: ../fish/guestfish-commands.pod:150
17904 #: ../fish/guestfish-commands.pod:152
17912 #: ../fish/guestfish-commands.pod:154
17920 #: ../fish/guestfish-commands.pod:156
17921 msgid "This is used to view a file."
17925 #: ../fish/guestfish-commands.pod:158
17927 "The default viewer is C<$PAGER>. However if you use the alternate command "
17928 "C<less> you will get the C<less> command specifically."
17932 #: ../fish/guestfish-commands.pod:161
17937 #: ../fish/guestfish-commands.pod:163
17945 #: ../fish/guestfish-commands.pod:165
17947 "Close and reopen the libguestfs handle. It is not necessary to use this "
17948 "normally, because the handle is closed properly when guestfish exits. "
17949 "However this is occasionally useful for testing."
17953 #: ../fish/guestfish-commands.pod:169
17958 #: ../fish/guestfish-commands.pod:171
17961 " setenv VAR value\n"
17966 #: ../fish/guestfish-commands.pod:173
17967 msgid "Set the environment variable C<VAR> to the string C<value>."
17971 #: ../fish/guestfish-commands.pod:175
17973 "To print the value of an environment variable use a shell command such as:"
17977 #: ../fish/guestfish-commands.pod:178
17985 #: ../fish/guestfish-commands.pod:180
17990 #: ../fish/guestfish-commands.pod:182
17993 " sparse filename size\n"
17998 #: ../fish/guestfish-commands.pod:184
18000 "This creates an empty sparse file of the given size, and then adds so it can "
18001 "be further examined."
18005 #: ../fish/guestfish-commands.pod:187
18007 "In all respects it works the same as the L</alloc> command, except that the "
18008 "image file is allocated sparsely, which means that disk blocks are not "
18009 "assigned to the file until they are needed. Sparse disk files only use "
18010 "space when written to, but they are slower and there is a danger you could "
18011 "run out of real disk space during a write operation."
18015 #: ../fish/guestfish-commands.pod:197
18020 #: ../fish/guestfish-commands.pod:199
18028 #: ../fish/guestfish-commands.pod:201
18030 "This command returns a list of the optional groups known to the daemon, and "
18031 "indicates which ones are supported by this build of the libguestfs appliance."
18035 #: ../fish/guestfish-commands.pod:205
18036 msgid "See also L<guestfs(3)/AVAILABILITY>."
18040 #: ../fish/guestfish-commands.pod:207
18045 #: ../fish/guestfish-commands.pod:209
18048 " time command args...\n"
18053 #: ../fish/guestfish-commands.pod:211
18055 "Run the command as usual, but print the elapsed time afterwards. This can "
18056 "be useful for benchmarking operations."
18060 #: ../fish/guestfish-commands.pod:214
18065 #: ../fish/guestfish-commands.pod:216
18073 #: ../fish/guestfish-commands.pod:218
18074 msgid "Remove C<VAR> from the environment."
18078 #: ../fish/guestfish.pod:5
18079 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18083 #: ../fish/guestfish.pod:9
18086 " guestfish [--options] [commands]\n"
18091 #: ../fish/guestfish.pod:11
18099 #: ../fish/guestfish.pod:13
18102 " guestfish [--ro|--rw] -a disk.img\n"
18107 #: ../fish/guestfish.pod:15
18110 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18115 #: ../fish/guestfish.pod:17
18118 " guestfish -d libvirt-domain\n"
18123 #: ../fish/guestfish.pod:19
18126 " guestfish [--ro|--rw] -a disk.img -i\n"
18131 #: ../fish/guestfish.pod:21
18134 " guestfish -d libvirt-domain -i\n"
18139 #: ../fish/guestfish.pod:25
18141 "Using guestfish in read/write mode on live virtual machines can be "
18142 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
18143 "option to use guestfish safely if the disk image or virtual machine might be "
18148 #: ../fish/guestfish.pod:32
18150 "Guestfish is a shell and command-line tool for examining and modifying "
18151 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18152 "functionality of the guestfs API, see L<guestfs(3)>."
18156 #: ../fish/guestfish.pod:36
18158 "Guestfish gives you structured access to the libguestfs API, from shell "
18159 "scripts or the command line or interactively. If you want to rescue a "
18160 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18165 #: ../fish/guestfish.pod:43
18166 msgid "As an interactive shell"
18170 #: ../fish/guestfish.pod:45
18178 #: ../fish/guestfish.pod:47
18181 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18182 " editing virtual machine filesystems.\n"
18187 #: ../fish/guestfish.pod:50
18190 " Type: 'help' for a list of commands\n"
18191 " 'man' to read the manual\n"
18192 " 'quit' to quit the shell\n"
18197 #: ../fish/guestfish.pod:54
18200 " ><fs> add-ro disk.img\n"
18202 " ><fs> list-filesystems\n"
18203 " /dev/sda1: ext4\n"
18204 " /dev/vg_guest/lv_root: ext4\n"
18205 " /dev/vg_guest/lv_swap: swap\n"
18206 " ><fs> mount /dev/vg_guest/lv_root /\n"
18207 " ><fs> cat /etc/fstab\n"
18209 " # Created by anaconda\n"
18216 #: ../fish/guestfish.pod:67
18217 msgid "From shell scripts"
18221 #: ../fish/guestfish.pod:69
18222 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18226 #: ../fish/guestfish.pod:71
18229 " guestfish <<_EOF_\n"
18232 " mount /dev/vg_guest/lv_root /\n"
18233 " write /etc/motd \"Welcome, new users\"\n"
18239 #: ../fish/guestfish.pod:78
18240 msgid "List the LVM logical volumes in a disk image:"
18244 #: ../fish/guestfish.pod:80
18247 " guestfish -a disk.img --ro <<_EOF_\n"
18255 #: ../fish/guestfish.pod:85
18256 msgid "List all the filesystems in a disk image:"
18260 #: ../fish/guestfish.pod:87
18263 " guestfish -a disk.img --ro <<_EOF_\n"
18265 " list-filesystems\n"
18271 #: ../fish/guestfish.pod:92
18272 msgid "On one command line"
18276 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18277 msgid "Update C</etc/resolv.conf> in a guest:"
18281 #: ../fish/guestfish.pod:96
18285 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18286 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18291 #: ../fish/guestfish.pod:100
18292 msgid "Edit C</boot/grub/grub.conf> interactively:"
18296 #: ../fish/guestfish.pod:102
18299 " guestfish --rw --add disk.img \\\n"
18300 " --mount /dev/vg_guest/lv_root \\\n"
18301 " --mount /dev/sda1:/boot \\\n"
18302 " edit /boot/grub/grub.conf\n"
18307 #: ../fish/guestfish.pod:107
18308 msgid "Mount disks automatically"
18312 #: ../fish/guestfish.pod:109
18314 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
18318 #: ../fish/guestfish.pod:112
18321 " guestfish --ro -a disk.img -i cat /etc/group\n"
18326 #: ../fish/guestfish.pod:114
18329 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18334 #: ../fish/guestfish.pod:116
18335 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18339 #: ../fish/guestfish.pod:118
18342 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18347 #: ../fish/guestfish.pod:120
18348 msgid "As a script interpreter"
18352 #: ../fish/guestfish.pod:122
18353 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18357 #: ../fish/guestfish.pod:124
18360 " #!/usr/bin/guestfish -f\n"
18361 " sparse test1.img 100M\n"
18363 " part-disk /dev/sda mbr\n"
18364 " mkfs ext2 /dev/sda1\n"
18369 #: ../fish/guestfish.pod:130
18370 msgid "Start with a prepared disk"
18374 #: ../fish/guestfish.pod:132
18376 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18377 "single ext2-formatted partition:"
18381 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18384 " guestfish -N fs\n"
18389 #: ../fish/guestfish.pod:137
18390 msgid "To list what is available do:"
18394 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18397 " guestfish -N help | less\n"
18402 #: ../fish/guestfish.pod:141
18403 msgid "Remote control"
18407 #: ../fish/guestfish.pod:143
18410 " eval \"`guestfish --listen`\"\n"
18411 " guestfish --remote add-ro disk.img\n"
18412 " guestfish --remote run\n"
18413 " guestfish --remote lvs\n"
18418 #: ../fish/guestfish.pod:154
18419 msgid "Displays general help on options."
18423 #: ../fish/guestfish.pod:158
18424 msgid "B<--cmd-help>"
18428 #: ../fish/guestfish.pod:160
18429 msgid "Lists all available guestfish commands."
18433 #: ../fish/guestfish.pod:162
18438 #: ../fish/guestfish.pod:164
18439 msgid "B<--cmd-help cmd>"
18443 #: ../fish/guestfish.pod:166
18444 msgid "Displays detailed help on a single command C<cmd>."
18448 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18449 msgid "B<-a image>"
18453 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18454 msgid "B<--add image>"
18458 #: ../fish/guestfish.pod:172
18459 msgid "Add a block device or virtual machine image to the shell."
18463 #: ../fish/guestfish.pod:177
18465 "Using this flag is mostly equivalent to using the C<add> command, with "
18466 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18467 "the I<--format=...> flag was given."
18471 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18473 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18474 "URI to use. The default is to use the default libvirt connection."
18478 #: ../fish/guestfish.pod:189
18483 #: ../fish/guestfish.pod:191
18485 "If using the I<--listen> option and a csh-like shell, use this option. See "
18486 "section L</REMOTE CONTROL AND CSH> below."
18490 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18491 msgid "B<-d libvirt-domain>"
18495 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18496 msgid "B<--domain libvirt-domain>"
18500 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18502 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18503 "used, then any libvirt domain can be used. However in write mode, only "
18504 "libvirt domains which are shut down can be named here."
18508 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18509 msgid "Domain UUIDs can be used instead of names."
18513 #: ../fish/guestfish.pod:204
18515 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18516 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18517 "if the I<--format:...> flag was given."
18521 #: ../fish/guestfish.pod:208
18526 #: ../fish/guestfish.pod:210
18527 msgid "B<--no-dest-paths>"
18531 #: ../fish/guestfish.pod:212
18533 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18534 "to hit the tab key to complete paths on the guest filesystem, but this "
18535 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18536 "allow this feature to be disabled."
18540 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18542 "When prompting for keys and passphrases, guestfish normally turns echoing "
18543 "off so you cannot see what you are typing. If you are not worried about "
18544 "Tempest attacks and there is no one else in the room you can specify this "
18545 "flag to see what you are typing."
18549 #: ../fish/guestfish.pod:224
18554 #: ../fish/guestfish.pod:226
18555 msgid "B<--file file>"
18559 #: ../fish/guestfish.pod:228
18560 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18564 #: ../fish/guestfish.pod:231
18567 " #!/usr/bin/guestfish -f\n"
18572 #: ../fish/guestfish.pod:244
18575 " guestfish --format=raw -a disk.img\n"
18580 #: ../fish/guestfish.pod:248
18583 " guestfish --format=raw -a disk.img --format -a another.img\n"
18588 #: ../fish/guestfish.pod:253
18590 "If you have untrusted raw-format guest disk images, you should use this "
18591 "option to specify the disk format. This avoids a possible security problem "
18592 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18596 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18597 msgid "B<--inspector>"
18601 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18603 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18604 "system and mount filesystems as they would be mounted on the real virtual "
18609 #: ../fish/guestfish.pod:266
18610 msgid "Typical usage is either:"
18614 #: ../fish/guestfish.pod:268
18617 " guestfish -d myguest -i\n"
18622 #: ../fish/guestfish.pod:270
18623 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18627 #: ../fish/guestfish.pod:272
18630 " guestfish --ro -d myguest -i\n"
18635 #: ../fish/guestfish.pod:274
18636 msgid "(for active domains, readonly), or specify the block device directly:"
18640 #: ../fish/guestfish.pod:276
18643 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18648 #: ../fish/guestfish.pod:278
18650 "Note that the command line syntax changed slightly over older versions of "
18651 "guestfish. You can still use the old syntax:"
18655 #: ../fish/guestfish.pod:281
18658 " guestfish [--ro] -i disk.img\n"
18663 #: ../fish/guestfish.pod:283
18666 " guestfish [--ro] -i libvirt-domain\n"
18671 #: ../fish/guestfish.pod:285
18673 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18674 "then using other commands to mount the filesystems that were found."
18678 #: ../fish/guestfish.pod:294
18679 msgid "B<--listen>"
18683 #: ../fish/guestfish.pod:296
18685 "Fork into the background and listen for remote commands. See section L</"
18686 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18690 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
18695 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
18697 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
18698 "ATTACHING TO RUNNING DAEMONS>)."
18702 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
18703 msgid "B<-m dev[:mountpoint[:options]]>"
18707 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
18708 msgid "B<--mount dev[:mountpoint[:options]]>"
18712 #: ../fish/guestfish.pod:308
18713 msgid "Mount the named partition or logical volume on the given mountpoint."
18717 #: ../fish/guestfish.pod:310
18718 msgid "If the mountpoint is omitted, it defaults to C</>."
18722 #: ../fish/guestfish.pod:312
18723 msgid "You have to mount something on C</> before most commands will work."
18727 #: ../fish/guestfish.pod:314
18729 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18734 #: ../fish/guestfish.pod:317
18736 "If you don't know what filesystems a disk image contains, you can either run "
18737 "guestfish without this option, then list the partitions, filesystems and LVs "
18738 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18739 "commands), or you can use the L<virt-filesystems(1)> program."
18743 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
18745 "The third (and rarely used) part of the mount parameter is the list of mount "
18746 "options used to mount the underlying filesystem. If this is not given, then "
18747 "the mount options are either the empty string or C<ro> (the latter if the "
18748 "I<--ro> flag is used). By specifying the mount options, you override this "
18749 "default choice. Probably the only time you would use this is to enable ACLs "
18750 "and/or extended attributes if the filesystem can support them:"
18754 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
18757 " -m /dev/sda1:/:acl,user_xattr\n"
18762 #: ../fish/guestfish.pod:333
18763 msgid "Using this flag is equivalent to using the C<mount-options> command."
18767 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202
18768 #: ../resize/virt-resize.pod:435
18773 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
18774 msgid "B<--no-sync>"
18778 #: ../fish/guestfish.pod:339
18780 "Disable autosync. This is enabled by default. See the discussion of "
18781 "autosync in the L<guestfs(3)> manpage."
18785 #: ../fish/guestfish.pod:342
18790 #: ../fish/guestfish.pod:344
18791 msgid "B<--new type>"
18795 #: ../fish/guestfish.pod:346
18800 #: ../fish/guestfish.pod:348
18802 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
18803 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18804 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18809 #: ../fish/guestfish.pod:353
18810 msgid "B<--progress-bars>"
18814 #: ../fish/guestfish.pod:355
18815 msgid "Enable progress bars, even when guestfish is used non-interactively."
18819 #: ../fish/guestfish.pod:357
18821 "Progress bars are enabled by default when guestfish is used as an "
18822 "interactive shell."
18826 #: ../fish/guestfish.pod:360
18827 msgid "B<--no-progress-bars>"
18831 #: ../fish/guestfish.pod:362
18832 msgid "Disable progress bars."
18836 #: ../fish/guestfish.pod:364
18837 msgid "B<--remote[=pid]>"
18841 #: ../fish/guestfish.pod:366
18843 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18844 "CONTROL GUESTFISH OVER A SOCKET> below."
18848 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248
18849 #: ../rescue/virt-rescue.pod:161
18854 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250
18855 #: ../rescue/virt-rescue.pod:163
18860 #: ../fish/guestfish.pod:373
18862 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18863 "mounts are done read-only."
18867 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
18869 "The option must always be used if the disk image or virtual machine might be "
18870 "running, and is generally recommended in cases where you don't need write "
18871 "access to the disk."
18875 #: ../fish/guestfish.pod:380
18877 "Note that prepared disk images created with I<-N> are not affected by this "
18878 "option. Also commands like C<add> are not affected - you have to specify "
18879 "the C<readonly:true> option explicitly if you need it."
18883 #: ../fish/guestfish.pod:384
18884 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18888 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262
18889 #: ../rescue/virt-rescue.pod:173
18890 msgid "B<--selinux>"
18894 #: ../fish/guestfish.pod:388
18895 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18899 #: ../fish/guestfish.pod:394
18901 "Enable very verbose messages. This is particularly useful if you find a bug."
18905 #: ../fish/guestfish.pod:401
18906 msgid "Display the guestfish / libguestfs version number and exit."
18910 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278
18911 #: ../rescue/virt-rescue.pod:194
18916 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280
18917 #: ../rescue/virt-rescue.pod:196
18922 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
18924 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18925 "mounts are done read-write."
18929 #: ../fish/guestfish.pod:410
18930 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
18934 #: ../fish/guestfish.pod:414
18935 msgid "Echo each command before executing it."
18939 #: ../fish/guestfish.pod:418
18940 msgid "COMMANDS ON COMMAND LINE"
18944 #: ../fish/guestfish.pod:420
18946 "Any additional (non-option) arguments are treated as commands to execute."
18950 #: ../fish/guestfish.pod:423
18952 "Commands to execute should be separated by a colon (C<:>), where the colon "
18953 "is a separate parameter. Thus:"
18957 #: ../fish/guestfish.pod:426
18960 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
18965 #: ../fish/guestfish.pod:428
18967 "If there are no additional arguments, then we enter a shell, either an "
18968 "interactive shell with a prompt (if the input is a terminal) or a non-"
18969 "interactive shell."
18973 #: ../fish/guestfish.pod:432
18975 "In either command line mode or non-interactive shell, the first command that "
18976 "gives an error causes the whole shell to exit. In interactive mode (with a "
18977 "prompt) if a command fails, you can continue to enter commands."
18981 #: ../fish/guestfish.pod:437
18982 msgid "USING launch (OR run)"
18986 #: ../fish/guestfish.pod:439
18988 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
18989 "then launch it, then mount any disks you need, and finally issue actions/"
18990 "commands. So the general order of the day is:"
18994 #: ../fish/guestfish.pod:447
18995 msgid "add or -a/--add"
18999 #: ../fish/guestfish.pod:451
19000 msgid "launch (aka run)"
19004 #: ../fish/guestfish.pod:455
19005 msgid "mount or -m/--mount"
19009 #: ../fish/guestfish.pod:459
19010 msgid "any other commands"
19014 #: ../fish/guestfish.pod:463
19016 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19017 "guest before mounting or performing any other commands."
19021 #: ../fish/guestfish.pod:466
19023 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19024 "I<--new> options were given then C<run> is done automatically, simply "
19025 "because guestfish can't perform the action you asked for without doing this."
19029 #: ../fish/guestfish.pod:471
19030 msgid "OPENING DISKS FOR READ AND WRITE"
19034 #: ../fish/guestfish.pod:473
19036 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19037 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19038 "I<-i> and I<-m> open disk images read-only or for writing."
19042 #: ../fish/guestfish.pod:478
19044 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
19045 "opening disk images supplied on the command line for write. To open a disk "
19046 "image read-only you have to do I<-a image --ro>."
19050 #: ../fish/guestfish.pod:482
19052 "This matters: If you accidentally open a live VM disk image writable then "
19053 "you will cause irreversible disk corruption."
19057 #: ../fish/guestfish.pod:485
19059 "In a future libguestfs we intend to change the default the other way. Disk "
19060 "images will be opened read-only. You will have to either specify "
19061 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19062 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19063 "access for disk images specified by those other command line options."
19067 #: ../fish/guestfish.pod:492
19069 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19070 "which does nothing (it is already the default). However it is highly "
19071 "recommended that you use this option to indicate that you need write access, "
19072 "and prepare your scripts for the day when this option will be required for "
19077 #: ../fish/guestfish.pod:498
19079 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
19080 "other libguestfs program apart from guestfish and guestmount."
19084 #: ../fish/guestfish.pod:501
19089 #: ../fish/guestfish.pod:503
19091 "You can quote ordinary parameters using either single or double quotes. For "
19096 #: ../fish/guestfish.pod:506
19099 " add \"file with a space.img\"\n"
19104 #: ../fish/guestfish.pod:508
19107 " rm '/file name'\n"
19112 #: ../fish/guestfish.pod:510
19120 #: ../fish/guestfish.pod:512
19122 "A few commands require a list of strings to be passed. For these, use a "
19123 "whitespace-separated list, enclosed in quotes. Strings containing "
19124 "whitespace to be passed through must be enclosed in single quotes. A "
19125 "literal single quote must be escaped with a backslash."
19129 #: ../fish/guestfish.pod:517
19132 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19133 " command \"/bin/echo 'foo bar'\"\n"
19134 " command \"/bin/echo \\'foo\\'\"\n"
19139 #: ../fish/guestfish.pod:521
19140 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19144 #: ../fish/guestfish.pod:523
19146 "In double-quoted arguments (only) use backslash to insert special characters:"
19150 #: ../fish/guestfish.pod:528
19155 #: ../fish/guestfish.pod:530
19156 msgid "Alert (bell) character."
19160 #: ../fish/guestfish.pod:532
19165 #: ../fish/guestfish.pod:534
19166 msgid "Backspace character."
19170 #: ../fish/guestfish.pod:536
19175 #: ../fish/guestfish.pod:538
19176 msgid "Form feed character."
19180 #: ../fish/guestfish.pod:540
19185 #: ../fish/guestfish.pod:542
19186 msgid "Newline character."
19190 #: ../fish/guestfish.pod:544
19195 #: ../fish/guestfish.pod:546
19196 msgid "Carriage return character."
19200 #: ../fish/guestfish.pod:548
19205 #: ../fish/guestfish.pod:550
19206 msgid "Horizontal tab character."
19210 #: ../fish/guestfish.pod:552
19215 #: ../fish/guestfish.pod:554
19216 msgid "Vertical tab character."
19220 #: ../fish/guestfish.pod:556
19225 #: ../fish/guestfish.pod:558
19226 msgid "A literal double quote character."
19230 #: ../fish/guestfish.pod:560
19235 #: ../fish/guestfish.pod:562
19237 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
19242 #: ../fish/guestfish.pod:565
19247 #: ../fish/guestfish.pod:567
19249 "A character with hex value I<hh>. There must be precisely 2 hex digits."
19253 #: ../fish/guestfish.pod:570
19255 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19260 #: ../fish/guestfish.pod:573
19265 #: ../fish/guestfish.pod:575
19266 msgid "A literal backslash character."
19270 #: ../fish/guestfish.pod:579
19271 msgid "OPTIONAL ARGUMENTS"
19275 #: ../fish/guestfish.pod:581
19277 "Some commands take optional arguments. These arguments appear in this "
19278 "documentation as C<[argname:..]>. You can use them as in these examples:"
19282 #: ../fish/guestfish.pod:585
19285 " add-drive-opts filename\n"
19290 #: ../fish/guestfish.pod:587
19293 " add-drive-opts filename readonly:true\n"
19298 #: ../fish/guestfish.pod:589
19301 " add-drive-opts filename format:qcow2 readonly:false\n"
19306 #: ../fish/guestfish.pod:591
19308 "Each optional argument can appear at most once. All optional arguments must "
19309 "appear after the required ones."
19313 #: ../fish/guestfish.pod:594
19318 #: ../fish/guestfish.pod:596
19320 "This section applies to all commands which can take integers as parameters."
19324 #: ../fish/guestfish.pod:599
19325 msgid "SIZE SUFFIX"
19329 #: ../fish/guestfish.pod:601
19331 "When the command takes a parameter measured in bytes, you can use one of the "
19332 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19336 #: ../fish/guestfish.pod:607
19337 msgid "B<k> or B<K> or B<KiB>"
19341 #: ../fish/guestfish.pod:609
19342 msgid "The size in kilobytes (multiplied by 1024)."
19346 #: ../fish/guestfish.pod:611
19351 #: ../fish/guestfish.pod:613
19352 msgid "The size in SI 1000 byte units."
19356 #: ../fish/guestfish.pod:615
19357 msgid "B<M> or B<MiB>"
19361 #: ../fish/guestfish.pod:617
19362 msgid "The size in megabytes (multiplied by 1048576)."
19366 #: ../fish/guestfish.pod:619
19371 #: ../fish/guestfish.pod:621
19372 msgid "The size in SI 1000000 byte units."
19376 #: ../fish/guestfish.pod:623
19377 msgid "B<G> or B<GiB>"
19381 #: ../fish/guestfish.pod:625
19382 msgid "The size in gigabytes (multiplied by 2**30)."
19386 #: ../fish/guestfish.pod:627
19391 #: ../fish/guestfish.pod:629
19392 msgid "The size in SI 10**9 byte units."
19396 #: ../fish/guestfish.pod:631
19397 msgid "B<T> or B<TiB>"
19401 #: ../fish/guestfish.pod:633
19402 msgid "The size in terabytes (multiplied by 2**40)."
19406 #: ../fish/guestfish.pod:635
19411 #: ../fish/guestfish.pod:637
19412 msgid "The size in SI 10**12 byte units."
19416 #: ../fish/guestfish.pod:639
19417 msgid "B<P> or B<PiB>"
19421 #: ../fish/guestfish.pod:641
19422 msgid "The size in petabytes (multiplied by 2**50)."
19426 #: ../fish/guestfish.pod:643
19431 #: ../fish/guestfish.pod:645
19432 msgid "The size in SI 10**15 byte units."
19436 #: ../fish/guestfish.pod:647
19437 msgid "B<E> or B<EiB>"
19441 #: ../fish/guestfish.pod:649
19442 msgid "The size in exabytes (multiplied by 2**60)."
19446 #: ../fish/guestfish.pod:651
19451 #: ../fish/guestfish.pod:653
19452 msgid "The size in SI 10**18 byte units."
19456 #: ../fish/guestfish.pod:655
19457 msgid "B<Z> or B<ZiB>"
19461 #: ../fish/guestfish.pod:657
19462 msgid "The size in zettabytes (multiplied by 2**70)."
19466 #: ../fish/guestfish.pod:659
19471 #: ../fish/guestfish.pod:661
19472 msgid "The size in SI 10**21 byte units."
19476 #: ../fish/guestfish.pod:663
19477 msgid "B<Y> or B<YiB>"
19481 #: ../fish/guestfish.pod:665
19482 msgid "The size in yottabytes (multiplied by 2**80)."
19486 #: ../fish/guestfish.pod:667
19491 #: ../fish/guestfish.pod:669
19492 msgid "The size in SI 10**24 byte units."
19496 #: ../fish/guestfish.pod:675
19499 " truncate-size /file 1G\n"
19504 #: ../fish/guestfish.pod:677
19505 msgid "would truncate the file to 1 gigabyte."
19509 #: ../fish/guestfish.pod:679
19511 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
19512 "the parameter to L</memsize> is specified in megabytes already). Adding a "
19513 "suffix will probably not do what you expect."
19517 #: ../fish/guestfish.pod:683
19518 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19522 #: ../fish/guestfish.pod:685
19524 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19525 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19529 #: ../fish/guestfish.pod:688
19532 " 1234 decimal number 1234\n"
19533 " 02322 octal number, equivalent to decimal 1234\n"
19534 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19539 #: ../fish/guestfish.pod:692
19541 "When using the C<chmod> command, you almost always want to specify an octal "
19542 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19543 "L<chmod(1)> program):"
19547 #: ../fish/guestfish.pod:696
19550 " chmod 0777 /public # OK\n"
19551 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19556 #: ../fish/guestfish.pod:699
19558 "Commands that return numbers usually print them in decimal, but some "
19559 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19560 "octal, preceeded by C<0>)."
19564 #: ../fish/guestfish.pod:703
19565 msgid "WILDCARDS AND GLOBBING"
19569 #: ../fish/guestfish.pod:705
19571 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19572 "(globbing) by default. So for example the following will not do what you "
19577 #: ../fish/guestfish.pod:709
19585 #: ../fish/guestfish.pod:711
19587 "Assuming you don't have a directory called literally C</home/*> then the "
19588 "above command will return an error."
19592 #: ../fish/guestfish.pod:714
19593 msgid "To perform wildcard expansion, use the C<glob> command."
19597 #: ../fish/guestfish.pod:716
19600 " glob rm-rf /home/*\n"
19605 #: ../fish/guestfish.pod:718
19607 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19608 "many times), equivalent to:"
19612 #: ../fish/guestfish.pod:721
19615 " rm-rf /home/jim\n"
19616 " rm-rf /home/joe\n"
19617 " rm-rf /home/mary\n"
19622 #: ../fish/guestfish.pod:725
19623 msgid "C<glob> only works on simple guest paths and not on device names."
19627 #: ../fish/guestfish.pod:727
19629 "If you have several parameters, each containing a wildcard, then glob will "
19630 "perform a Cartesian product."
19634 #: ../fish/guestfish.pod:730
19639 #: ../fish/guestfish.pod:732
19641 "Any line which starts with a I<#> character is treated as a comment and "
19642 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19643 "a command. For example:"
19647 #: ../fish/guestfish.pod:736
19650 " # this is a comment\n"
19651 " # this is a comment\n"
19652 " foo # NOT a comment\n"
19657 #: ../fish/guestfish.pod:740
19658 msgid "Blank lines are also ignored."
19662 #: ../fish/guestfish.pod:742
19663 msgid "RUNNING COMMANDS LOCALLY"
19667 #: ../fish/guestfish.pod:744
19669 "Any line which starts with a I<!> character is treated as a command sent to "
19670 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19674 #: ../fish/guestfish.pod:748
19678 " tgz-out /remote local/remote-data.tar.gz\n"
19683 #: ../fish/guestfish.pod:751
19685 "will create a directory C<local> on the host, and then export the contents "
19686 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19687 "(See C<tgz-out>)."
19691 #: ../fish/guestfish.pod:755
19693 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19694 "effect, due to the way that subprocesses work in Unix."
19698 #: ../fish/guestfish.pod:758
19699 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19703 #: ../fish/guestfish.pod:760
19705 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19706 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19707 "and executed as guestfish commands."
19711 #: ../fish/guestfish.pod:764
19713 "Thus you can use shell script to construct arbitrary guestfish commands "
19714 "which are then parsed by guestfish."
19718 #: ../fish/guestfish.pod:767
19720 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19721 "through C</foo.100>) using guestfish commands alone. However this is simple "
19722 "if we use a shell script to create the guestfish commands for us:"
19726 #: ../fish/guestfish.pod:772
19729 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19734 #: ../fish/guestfish.pod:774
19735 msgid "or with names like C</foo.001>:"
19739 #: ../fish/guestfish.pod:776
19742 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19747 #: ../fish/guestfish.pod:778
19749 "When using guestfish interactively it can be helpful to just run the shell "
19750 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19751 "ordinary I<!> local command), see what guestfish commands it would run, and "
19752 "when you are happy with those prepend the C<E<lt>> character to run the "
19753 "guestfish commands for real."
19757 #: ../fish/guestfish.pod:784
19762 #: ../fish/guestfish.pod:786
19764 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19765 "command (a guestfish command) to the second command (any host command). For "
19770 #: ../fish/guestfish.pod:790
19773 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19778 #: ../fish/guestfish.pod:792
19780 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19781 "program). The above command would list all accounts in the guest filesystem "
19782 "which have UID 0, ie. root accounts including backdoors. Other examples:"
19786 #: ../fish/guestfish.pod:797
19789 " hexdump /bin/ls | head\n"
19790 " list-devices | tail -1\n"
19791 " tgz-out / - | tar ztf -\n"
19796 #: ../fish/guestfish.pod:801
19798 "The space before the pipe symbol is required, any space after the pipe "
19799 "symbol is optional. Everything after the pipe symbol is just passed "
19800 "straight to the host shell, so it can contain redirections, globs and "
19801 "anything else that makes sense on the host side."
19805 #: ../fish/guestfish.pod:806
19807 "To use a literal argument which begins with a pipe symbol, you have to quote "
19812 #: ../fish/guestfish.pod:809
19820 #: ../fish/guestfish.pod:811
19821 msgid "HOME DIRECTORIES"
19825 #: ../fish/guestfish.pod:813
19827 "If a parameter starts with the character C<~> then the tilde may be expanded "
19828 "as a home directory path (either C<~> for the current user's home directory, "
19829 "or C<~user> for another user)."
19833 #: ../fish/guestfish.pod:817
19835 "Note that home directory expansion happens for users known I<on the host>, "
19836 "not in the guest filesystem."
19840 #: ../fish/guestfish.pod:820
19842 "To use a literal argument which begins with a tilde, you have to quote it, "
19847 #: ../fish/guestfish.pod:823
19855 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
19856 msgid "ENCRYPTED DISKS"
19860 #: ../fish/guestfish.pod:827
19862 "Libguestfs has some support for Linux guests encrypted according to the "
19863 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19864 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
19865 "LUKS is supported."
19869 #: ../fish/guestfish.pod:832
19870 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19874 #: ../fish/guestfish.pod:834
19877 " ><fs> vfs-type /dev/sda2\n"
19883 #: ../fish/guestfish.pod:837
19885 "Then open those devices using L</luks-open>. This creates a device-mapper "
19886 "device called C</dev/mapper/luksdev>."
19890 #: ../fish/guestfish.pod:840
19893 " ><fs> luks-open /dev/sda2 luksdev\n"
19894 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19899 #: ../fish/guestfish.pod:843
19901 "Finally you have to tell LVM to scan for volume groups on the newly created "
19906 #: ../fish/guestfish.pod:846
19910 " vg-activate-all true\n"
19915 #: ../fish/guestfish.pod:849
19916 msgid "The logical volume(s) can now be mounted in the usual way."
19920 #: ../fish/guestfish.pod:851
19922 "Before closing a LUKS device you must unmount any logical volumes on it and "
19923 "deactivate the volume groups by calling C<vg-activate false VG> on each "
19924 "one. Then you can close the mapper device:"
19928 #: ../fish/guestfish.pod:855
19931 " vg-activate false /dev/VG\n"
19932 " luks-close /dev/mapper/luksdev\n"
19937 #: ../fish/guestfish.pod:860
19939 "If a path is prefixed with C<win:> then you can use Windows-style drive "
19940 "letters and paths (with some limitations). The following commands are "
19945 #: ../fish/guestfish.pod:864
19948 " file /WINDOWS/system32/config/system.LOG\n"
19953 #: ../fish/guestfish.pod:866
19956 " file win:\\windows\\system32\\config\\system.log\n"
19961 #: ../fish/guestfish.pod:868
19964 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
19969 #: ../fish/guestfish.pod:870
19971 "The parameter is rewritten \"behind the scenes\" by looking up the position "
19972 "where the drive is mounted, prepending that to the path, changing all "
19973 "backslash characters to forward slash, then resolving the result using L</"
19974 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
19975 "the parameter might be rewritten like this:"
19979 #: ../fish/guestfish.pod:876
19982 " win:e:\\foo\\bar => /e/FOO/bar\n"
19987 #: ../fish/guestfish.pod:878
19988 msgid "This only works in argument positions that expect a path."
19992 #: ../fish/guestfish.pod:880
19993 msgid "UPLOADING AND DOWNLOADING FILES"
19997 #: ../fish/guestfish.pod:882
19999 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
20000 "others which upload from or download to a local file, you can use the "
20001 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
20005 #: ../fish/guestfish.pod:886
20013 #: ../fish/guestfish.pod:888
20015 "reads stdin and creates from that a file C</foo> in the disk image, and:"
20019 #: ../fish/guestfish.pod:891
20022 " tar-out /etc - | tar tf -\n"
20027 #: ../fish/guestfish.pod:893
20029 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20030 "command (see L</PIPES>)."
20034 #: ../fish/guestfish.pod:896
20036 "When using C<-> to read from stdin, the input is read up to the end of "
20037 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20038 "some arbitrary end marker:"
20042 #: ../fish/guestfish.pod:900
20045 " upload -<<END /foo\n"
20054 #: ../fish/guestfish.pod:906
20056 "Any string of characters can be used instead of C<END>. The end marker must "
20057 "appear on a line of its own, without any preceeding or following characters "
20058 "(not even spaces)."
20062 #: ../fish/guestfish.pod:910
20064 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20065 "upload local files (so-called \"FileIn\" parameters in the generator)."
20069 #: ../fish/guestfish.pod:913
20070 msgid "EXIT ON ERROR BEHAVIOUR"
20074 #: ../fish/guestfish.pod:915
20076 "By default, guestfish will ignore any errors when in interactive mode (ie. "
20077 "taking commands from a human over a tty), and will exit on the first error "
20078 "in non-interactive mode (scripts, commands given on the command line)."
20082 #: ../fish/guestfish.pod:920
20084 "If you prefix a command with a I<-> character, then that command will not "
20085 "cause guestfish to exit, even if that (one) command returns an error."
20089 #: ../fish/guestfish.pod:924
20090 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20094 #: ../fish/guestfish.pod:926
20096 "Guestfish can be remote-controlled over a socket. This is useful "
20097 "particularly in shell scripts where you want to make several different "
20098 "changes to a filesystem, but you don't want the overhead of starting up a "
20099 "guestfish process each time."
20103 #: ../fish/guestfish.pod:931
20104 msgid "Start a guestfish server process using:"
20108 #: ../fish/guestfish.pod:933
20111 " eval \"`guestfish --listen`\"\n"
20116 #: ../fish/guestfish.pod:935
20117 msgid "and then send it commands by doing:"
20121 #: ../fish/guestfish.pod:937
20124 " guestfish --remote cmd [...]\n"
20129 #: ../fish/guestfish.pod:939
20130 msgid "To cause the server to exit, send it the exit command:"
20134 #: ../fish/guestfish.pod:943
20136 "Note that the server will normally exit if there is an error in a command. "
20137 "You can change this in the usual way. See section L</EXIT ON ERROR "
20142 #: ../fish/guestfish.pod:947
20143 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20147 #: ../fish/guestfish.pod:949
20149 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
20150 "is how the I<--remote> option knows where to send the commands. You can "
20151 "have several guestfish listener processes running using:"
20155 #: ../fish/guestfish.pod:953
20158 " eval \"`guestfish --listen`\"\n"
20159 " pid1=$GUESTFISH_PID\n"
20160 " eval \"`guestfish --listen`\"\n"
20161 " pid2=$GUESTFISH_PID\n"
20163 " guestfish --remote=$pid1 cmd\n"
20164 " guestfish --remote=$pid2 cmd\n"
20169 #: ../fish/guestfish.pod:961
20170 msgid "REMOTE CONTROL AND CSH"
20174 #: ../fish/guestfish.pod:963
20176 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20181 #: ../fish/guestfish.pod:966
20184 " eval \"`guestfish --listen --csh`\"\n"
20189 #: ../fish/guestfish.pod:968
20190 msgid "REMOTE CONTROL DETAILS"
20194 #: ../fish/guestfish.pod:970
20196 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
20197 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
20198 "and C<$PID> is the process ID of the server."
20202 #: ../fish/guestfish.pod:974
20203 msgid "Guestfish client and server versions must match exactly."
20207 #: ../fish/guestfish.pod:976
20208 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20212 #: ../fish/guestfish.pod:978
20214 "From Bash, you can use the following code which creates a guestfish "
20215 "instance, correctly quotes the command line, handles failure to start, and "
20216 "cleans up guestfish when the script exits:"
20220 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20228 #: ../fish/guestfish.pod:986
20231 " guestfish[0]=\"guestfish\"\n"
20232 " guestfish[1]=\"--listen\"\n"
20233 " guestfish[2]=\"--ro\"\n"
20234 " guestfish[3]=\"-a\"\n"
20235 " guestfish[4]=\"disk.img\"\n"
20240 #: ../fish/guestfish.pod:992
20243 " GUESTFISH_PID=\n"
20244 " eval $(\"${guestfish[@]}\")\n"
20245 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20246 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20253 #: ../fish/guestfish.pod:999
20256 " cleanup_guestfish ()\n"
20258 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20260 " trap cleanup_guestfish EXIT ERR\n"
20265 #: ../fish/guestfish.pod:1005
20268 " guestfish --remote -- run\n"
20273 #: ../fish/guestfish.pod:1007
20281 #: ../fish/guestfish.pod:1009
20282 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20286 #: ../fish/guestfish.pod:1011
20288 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20289 "context hangs, ie. don't do (note the backquotes):"
20293 #: ../fish/guestfish.pod:1014
20296 " a=`guestfish --remote run`\n"
20301 #: ../fish/guestfish.pod:1016
20303 "Since the C<run> command produces no output on stdout, this is not useful "
20304 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
20309 #: ../fish/guestfish.pod:1020
20310 msgid "PREPARED DISK IMAGES"
20314 #: ../fish/guestfish.pod:1022
20316 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20317 "preformatted disk images that guestfish can make for you to save typing. "
20318 "This is particularly useful for testing purposes. This option is used "
20319 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20320 "can be mixed with I<-a>)."
20324 #: ../fish/guestfish.pod:1028
20326 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20327 "the second and so on. Existing files in the current directory are "
20332 #: ../fish/guestfish.pod:1032
20334 "The type briefly describes how the disk should be sized, partitioned, how "
20335 "filesystem(s) should be created, and how content should be added. "
20336 "Optionally the type can be followed by extra parameters, separated by C<:> "
20337 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
20338 "allocated disk, containing a single partition, with the partition formatted "
20339 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
20344 #: ../fish/guestfish.pod:1040
20345 msgid "To list the available types and any extra parameters they take, run:"
20349 #: ../fish/guestfish.pod:1044
20351 "Note that the prepared filesystem is not mounted. You would usually have to "
20352 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20356 #: ../fish/guestfish.pod:1048
20358 "If any I<-N> or I<--new> options are given, the guest is automatically "
20363 #: ../fish/guestfish.pod:1053
20364 msgid "Create a 100MB disk with an ext4-formatted partition:"
20368 #: ../fish/guestfish.pod:1055
20371 " guestfish -N fs:ext4\n"
20376 #: ../fish/guestfish.pod:1057
20377 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20381 #: ../fish/guestfish.pod:1059
20384 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20389 #: ../fish/guestfish.pod:1061
20390 msgid "Create a blank 200MB disk:"
20394 #: ../fish/guestfish.pod:1063
20397 " guestfish -N disk:200M\n"
20402 #: ../fish/guestfish.pod:1065
20403 msgid "PROGRESS BARS"
20407 #: ../fish/guestfish.pod:1067
20409 "Some (not all) long-running commands send progress notification messages as "
20410 "they are running. Guestfish turns these messages into progress bars."
20414 #: ../fish/guestfish.pod:1071
20416 "When a command that supports progress bars takes longer than two seconds to "
20417 "run, and if progress bars are enabled, then you will see one appearing below "
20422 #: ../fish/guestfish.pod:1075
20425 " ><fs> copy-size /large-file /another-file 2048M\n"
20426 " / 10% [#####-----------------------------------------] 00:30\n"
20431 #: ../fish/guestfish.pod:1078
20433 "The spinner on the left hand side moves round once for every progress "
20434 "notification received from the backend. This is a (reasonably) golden "
20435 "assurance that the command is \"doing something\" even if the progress bar "
20436 "is not moving, because the command is able to send the progress "
20437 "notifications. When the bar reaches 100% and the command finishes, the "
20438 "spinner disappears."
20442 #: ../fish/guestfish.pod:1085
20444 "Progress bars are enabled by default when guestfish is used interactively. "
20445 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20446 "and you can disable them completely using I<--no-progress-bars>."
20450 #: ../fish/guestfish.pod:1090
20451 msgid "GUESTFISH COMMANDS"
20455 #: ../fish/guestfish.pod:1092
20457 "The commands in this section are guestfish convenience commands, in other "
20458 "words, they are not part of the L<guestfs(3)> API."
20462 #: ../fish/guestfish.pod:1095
20467 #: ../fish/guestfish.pod:1097
20476 #: ../fish/guestfish.pod:1100
20477 msgid "Without any parameter, this provides general help."
20481 #: ../fish/guestfish.pod:1102
20482 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20486 #: ../fish/guestfish.pod:1104
20487 msgid "quit | exit"
20491 #: ../fish/guestfish.pod:1106
20492 msgid "This exits guestfish. You can also use C<^D> key."
20496 #: ../fish/guestfish.pod:1108
20497 msgid "@FISH_COMMANDS@"
20501 #: ../fish/guestfish.pod:1110
20506 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20511 #: ../fish/guestfish.pod:1116
20513 "guestfish returns 0 if the commands completed without error, or 1 if there "
20518 #: ../fish/guestfish.pod:1123
20523 #: ../fish/guestfish.pod:1125
20525 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20530 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3213
20531 msgid "FEBOOTSTRAP_KERNEL"
20535 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3215
20536 msgid "FEBOOTSTRAP_MODULES"
20540 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3217
20542 "These two environment variables allow the kernel that libguestfs uses in the "
20543 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20544 "most recent host kernel is chosen. For more information about kernel "
20545 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20546 "available in febootstrap E<ge> 3.8."
20550 #: ../fish/guestfish.pod:1138
20551 msgid "GUESTFISH_DISPLAY_IMAGE"
20555 #: ../fish/guestfish.pod:1140
20557 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20558 "If not set, it uses L<display(1)>."
20562 #: ../fish/guestfish.pod:1143
20563 msgid "GUESTFISH_PID"
20567 #: ../fish/guestfish.pod:1145
20569 "Used with the I<--remote> option to specify the remote guestfish process to "
20570 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20574 #: ../fish/guestfish.pod:1149
20579 #: ../fish/guestfish.pod:1151
20581 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20582 "not specified, the external L<hexedit(1)> program is used."
20586 #: ../fish/guestfish.pod:1155
20591 #: ../fish/guestfish.pod:1157
20593 "If compiled with GNU readline support, various files in the home directory "
20594 "can be used. See L</FILES>."
20598 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3223
20599 msgid "LIBGUESTFS_APPEND"
20603 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3225
20604 msgid "Pass additional options to the guest kernel."
20608 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3227
20609 msgid "LIBGUESTFS_DEBUG"
20613 #: ../fish/guestfish.pod:1166
20615 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20616 "effect as using the B<-v> option."
20620 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3232
20621 msgid "LIBGUESTFS_MEMSIZE"
20625 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3234
20627 "Set the memory allocated to the qemu process, in megabytes. For example:"
20631 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3237
20634 " LIBGUESTFS_MEMSIZE=700\n"
20639 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3239
20640 msgid "LIBGUESTFS_PATH"
20644 #: ../fish/guestfish.pod:1178
20646 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20647 "the discussion of paths in L<guestfs(3)>."
20651 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3244
20652 msgid "LIBGUESTFS_QEMU"
20656 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3246
20658 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
20659 "which was found at compile time by the configure script is used."
20663 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3252
20664 msgid "LIBGUESTFS_TRACE"
20668 #: ../fish/guestfish.pod:1189
20669 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
20673 #: ../fish/guestfish.pod:1191
20678 #: ../fish/guestfish.pod:1193
20680 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
20685 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:236
20686 #: ../src/guestfs.pod:3257
20691 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3259
20693 "Location of temporary directory, defaults to C</tmp> except for the cached "
20694 "supermin appliance which defaults to C</var/tmp>."
20698 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3262
20700 "If libguestfs was compiled to use the supermin appliance then the real "
20701 "appliance is cached in this directory, shared between all handles belonging "
20702 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
20703 "use in case C</var/tmp> is not large enough."
20707 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297
20708 #: ../rescue/virt-rescue.pod:273
20713 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301
20714 #: ../rescue/virt-rescue.pod:277
20715 msgid "$HOME/.libguestfs-tools.rc"
20719 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303
20720 #: ../rescue/virt-rescue.pod:279
20721 msgid "/etc/libguestfs-tools.conf"
20725 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305
20726 #: ../rescue/virt-rescue.pod:281
20728 "This configuration file controls the default read-only or read-write mode "
20729 "(I<--ro> or I<--rw>)."
20733 #: ../fish/guestfish.pod:1220
20734 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
20738 #: ../fish/guestfish.pod:1222
20739 msgid "$HOME/.guestfish"
20743 #: ../fish/guestfish.pod:1224
20745 "If compiled with GNU readline support, then the command history is saved in "
20750 #: ../fish/guestfish.pod:1227
20751 msgid "$HOME/.inputrc"
20755 #: ../fish/guestfish.pod:1229
20756 msgid "/etc/inputrc"
20760 #: ../fish/guestfish.pod:1231
20762 "If compiled with GNU readline support, then these files can be used to "
20763 "configure readline. For further information, please see L<readline(3)/"
20764 "INITIALIZATION FILE>."
20768 #: ../fish/guestfish.pod:1235
20769 msgid "To write rules which only apply to guestfish, use:"
20773 #: ../fish/guestfish.pod:1237
20783 #: ../fish/guestfish.pod:1241
20785 "Variables that you can set in inputrc that change the behaviour of guestfish "
20786 "in useful ways include:"
20790 #: ../fish/guestfish.pod:1246
20791 msgid "completion-ignore-case (default: on)"
20795 #: ../fish/guestfish.pod:1248
20797 "By default, guestfish will ignore case when tab-completing paths on the "
20802 #: ../fish/guestfish.pod:1251
20805 " set completion-ignore-case off\n"
20810 #: ../fish/guestfish.pod:1253
20811 msgid "to make guestfish case sensitive."
20815 #: ../fish/guestfish.pod:1257
20820 #: ../fish/guestfish.pod:1259
20821 msgid "test2.img (etc)"
20825 #: ../fish/guestfish.pod:1261
20827 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
20828 "will be created in the file C<test1.img> in the current directory. The "
20829 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
20830 "the same name will be overwritten."
20834 #: ../fish/guestfish.pod:1270
20836 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, L<virt-"
20837 "cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit"
20838 "(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems"
20839 "(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-"
20840 "rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, "
20841 "L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, "
20842 "L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-helper(8)>."
20846 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3354
20847 #: ../test-tool/libguestfs-test-tool.pod:112
20848 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
20852 #: ../fish/virt-copy-in.pod:5
20854 "virt-copy-in - Copy files and directories into a virtual machine disk image."
20858 #: ../fish/virt-copy-in.pod:9
20861 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
20866 #: ../fish/virt-copy-in.pod:11
20869 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
20874 #: ../fish/virt-copy-in.pod:15
20876 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
20877 "causing disk corruption. The virtual machine must be shut down before you "
20878 "use this command."
20882 #: ../fish/virt-copy-in.pod:21
20884 "C<virt-copy-in> copies files and directories from the local disk into a "
20885 "virtual machine disk image or named libvirt domain."
20889 #: ../fish/virt-copy-in.pod:24
20891 "You can give one of more filenames and directories on the command line. "
20892 "Directories are copied in recursively. The final parameter must be the "
20893 "destination directory in the disk image which must be an absolute path "
20894 "starting with a C</> character."
20898 #: ../fish/virt-copy-in.pod:33
20901 " virt-copy-in -d MyGuest resolv.conf /etc\n"
20906 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
20907 msgid "Upload a home directory to a guest:"
20911 #: ../fish/virt-copy-in.pod:37
20914 " virt-copy-in -d MyGuest skel /home\n"
20919 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
20920 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
20921 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
20925 #: ../fish/virt-copy-in.pod:41
20927 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20928 "> C<copy-in> command. For anything more complex than a trivial copy, you "
20929 "are probably better off using guestfish directly."
20933 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
20934 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
20936 "Since the shell script just passes options straight to guestfish, read "
20937 "L<guestfish(1)> to see the full list of options."
20941 #: ../fish/virt-copy-in.pod:52
20943 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
20944 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20948 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
20949 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
20950 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
20954 #: ../fish/virt-copy-out.pod:5
20956 "virt-copy-out - Copy files and directories out of a virtual machine disk "
20961 #: ../fish/virt-copy-out.pod:9
20964 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
20969 #: ../fish/virt-copy-out.pod:11
20972 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
20977 #: ../fish/virt-copy-out.pod:15
20979 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
20980 "image or named libvirt domain."
20984 #: ../fish/virt-copy-out.pod:18
20986 "You can give one of more filenames and directories on the command line. "
20987 "Directories are copied out recursively."
20991 #: ../fish/virt-copy-out.pod:23
20992 msgid "Download the home directories from a virtual machine:"
20996 #: ../fish/virt-copy-out.pod:25
21000 " virt-copy-out -d MyGuest /home homes\n"
21005 #: ../fish/virt-copy-out.pod:30
21007 "This command is just a simple shell script wrapper around the L<guestfish(1)"
21008 "> C<copy-out> command. For anything more complex than a trivial copy, you "
21009 "are probably better off using guestfish directly."
21013 #: ../fish/virt-copy-out.pod:41
21015 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L<virt-"
21016 "tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21020 #: ../fish/virt-tar-in.pod:5
21021 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21025 #: ../fish/virt-tar-in.pod:9
21028 " virt-tar-in -a disk.img data.tar /destination\n"
21033 #: ../fish/virt-tar-in.pod:11
21036 " virt-tar-in -d domain data.tar /destination\n"
21041 #: ../fish/virt-tar-in.pod:13
21044 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21049 #: ../fish/virt-tar-in.pod:17
21051 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21052 "causing disk corruption. The virtual machine must be shut down before you "
21053 "use this command."
21057 #: ../fish/virt-tar-in.pod:23
21059 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21060 "image or named libvirt domain."
21064 #: ../fish/virt-tar-in.pod:26
21066 "The first parameter is the tar file. Use C<-> to read the tar file from "
21067 "standard input. The second parameter is the absolute target directory to "
21072 #: ../fish/virt-tar-in.pod:34
21075 " virt-tar-in -d MyGuest homes.tar /home\n"
21080 #: ../fish/virt-tar-in.pod:38
21082 "This command is just a simple shell script wrapper around the L<guestfish(1)"
21083 "> C<tar-in> command. For anything more complex than a trivial copy, you are "
21084 "probably better off using guestfish directly."
21088 #: ../fish/virt-tar-in.pod:49
21090 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21091 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, L<http://libguestfs."
21096 #: ../fish/virt-tar-out.pod:5
21098 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21102 #: ../fish/virt-tar-out.pod:9
21105 " virt-tar-out -a disk.img /dir files.tar\n"
21110 #: ../fish/virt-tar-out.pod:11
21113 " virt-tar-out -d domain /dir files.tar\n"
21118 #: ../fish/virt-tar-out.pod:13
21121 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21126 #: ../fish/virt-tar-out.pod:17
21128 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21132 #: ../fish/virt-tar-out.pod:20
21134 "The first parameter is the absolute path of the virtual machine directory. "
21135 "The second parameter is the tar file to write. Use C<-> to write to "
21140 #: ../fish/virt-tar-out.pod:26
21141 msgid "Download the home directories from a guest:"
21145 #: ../fish/virt-tar-out.pod:28
21148 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21153 #: ../fish/virt-tar-out.pod:32
21155 "This command is just a simple shell script wrapper around the L<guestfish(1)"
21156 "> C<tar-out> command. For anything more complex than a trivial copy, you "
21157 "are probably better off using guestfish directly."
21161 #: ../fish/virt-tar-out.pod:43
21163 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21164 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21168 #: ../fuse/guestmount.pod:5
21170 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21174 #: ../fuse/guestmount.pod:9
21177 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21182 #: ../fuse/guestmount.pod:11
21185 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21190 #: ../fuse/guestmount.pod:13
21193 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21198 #: ../fuse/guestmount.pod:17
21200 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21201 "machines. If you do this, you risk disk corruption in the VM."
21205 #: ../fuse/guestmount.pod:22
21207 "The guestmount program can be used to mount virtual machine filesystems and "
21208 "other disk images on the host. It uses libguestfs for access to the guest "
21209 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21210 "a mountable device."
21214 #: ../fuse/guestmount.pod:27
21216 "Along with other options, you have to give at least one device (I<-a> "
21217 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
21218 "option) or use the I<-i> inspection option or the I<--live> option. How "
21219 "this works is better explained in the L<guestfish(1)> manual page, or by "
21220 "looking at the examples below."
21224 #: ../fuse/guestmount.pod:33
21226 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21227 "by you, and the filesystem will not be visible to any other users unless you "
21228 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21229 "the filesystem, use the C<fusermount -u> command."
21233 #: ../fuse/guestmount.pod:41
21235 "For a typical Windows guest which has its main filesystem on the first "
21240 #: ../fuse/guestmount.pod:44
21243 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21248 #: ../fuse/guestmount.pod:46
21250 "For a typical Linux guest which has a /boot filesystem on the first "
21251 "partition, and the root filesystem on a logical volume:"
21255 #: ../fuse/guestmount.pod:49
21258 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21263 #: ../fuse/guestmount.pod:51
21264 msgid "To get libguestfs to detect guest mountpoints for you:"
21268 #: ../fuse/guestmount.pod:53
21271 " guestmount -a guest.img -i --ro /mnt\n"
21276 #: ../fuse/guestmount.pod:55
21277 msgid "For a libvirt guest called \"Guest\" you could do:"
21281 #: ../fuse/guestmount.pod:57
21284 " guestmount -d Guest -i --ro /mnt\n"
21289 #: ../fuse/guestmount.pod:59
21291 "If you don't know what filesystems are contained in a guest or disk image, "
21292 "use L<virt-filesystems(1)> first:"
21296 #: ../fuse/guestmount.pod:62
21299 " virt-filesystems MyGuest\n"
21304 #: ../fuse/guestmount.pod:64
21306 "If you want to trace the libguestfs calls but without excessive debugging "
21307 "information, we recommend:"
21311 #: ../fuse/guestmount.pod:67
21314 " guestmount [...] --trace /mnt\n"
21319 #: ../fuse/guestmount.pod:69
21320 msgid "If you want to debug the program, we recommend:"
21324 #: ../fuse/guestmount.pod:71
21327 " guestmount [...] --trace --verbose /mnt\n"
21332 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68
21333 #: ../resize/virt-resize.pod:621
21338 #: ../fuse/guestmount.pod:75
21339 msgid "Other users cannot see the filesystem by default"
21343 #: ../fuse/guestmount.pod:77
21345 "If you mount a filesystem as one user (eg. root), then other users will not "
21346 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21347 "option when mounting:"
21351 #: ../fuse/guestmount.pod:81
21354 " sudo guestmount [...] -o allow_other /mnt\n"
21359 #: ../fuse/guestmount.pod:83
21360 msgid "Enabling FUSE"
21364 #: ../fuse/guestmount.pod:85
21366 "On some distros, you may need to add yourself to a special group (eg. "
21367 "C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21368 "Debian and derivatives."
21372 #: ../fuse/guestmount.pod:89
21374 "On other distros, no special group is required. It is not necessary on "
21375 "Fedora or Red Hat Enterprise Linux."
21379 #: ../fuse/guestmount.pod:100
21380 msgid "Add a block device or virtual machine image."
21384 #: ../fuse/guestmount.pod:123
21385 msgid "B<--dir-cache-timeout N>"
21389 #: ../fuse/guestmount.pod:125
21391 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21392 "seconds. The readdir cache [actually, there are several semi-independent "
21393 "caches] is populated after a readdir(2) call with the stat and extended "
21394 "attributes of the files in the directory, in anticipation that they will be "
21395 "requested soon after."
21399 #: ../fuse/guestmount.pod:131
21401 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21402 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21403 "requests, only cache existing ones."
21407 #: ../fuse/guestmount.pod:151
21409 "If you have untrusted raw-format guest disk images, you should use this "
21410 "option to specify the disk format. This avoids a possible security problem "
21411 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
21412 "guestfs_add_drive_opts>."
21416 #: ../fuse/guestmount.pod:156
21417 msgid "B<--fuse-help>"
21421 #: ../fuse/guestmount.pod:158
21422 msgid "Display help on special FUSE options (see I<-o> below)."
21426 #: ../fuse/guestmount.pod:162
21427 msgid "Display brief help and exit."
21431 #: ../fuse/guestmount.pod:186
21433 "Mount the named partition or logical volume on the given mountpoint B<in the "
21434 "guest> (this has nothing to do with mountpoints in the host)."
21438 #: ../fuse/guestmount.pod:189
21440 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21441 "something on C</>."
21445 #: ../fuse/guestmount.pod:206
21447 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21448 "unmounted. If you specify this option, then we don't attempt to sync the "
21449 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21453 #: ../fuse/guestmount.pod:211
21454 msgid "B<-o option>"
21458 #: ../fuse/guestmount.pod:213
21459 msgid "B<--option option>"
21463 #: ../fuse/guestmount.pod:215
21464 msgid "Pass extra options to FUSE."
21468 #: ../fuse/guestmount.pod:217
21470 "To get a list of all the extra options supported by FUSE, use the command "
21471 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21472 "of them are a good idea."
21476 #: ../fuse/guestmount.pod:221
21479 " guestmount --fuse-help\n"
21484 #: ../fuse/guestmount.pod:223
21485 msgid "Some potentially useful FUSE options:"
21489 #: ../fuse/guestmount.pod:227
21490 msgid "B<-o allow_other>"
21494 #: ../fuse/guestmount.pod:229
21495 msgid "Allow other users to see the filesystem."
21499 #: ../fuse/guestmount.pod:231
21500 msgid "B<-o attr_timeout=N>"
21504 #: ../fuse/guestmount.pod:233
21505 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21509 #: ../fuse/guestmount.pod:235
21510 msgid "B<-o kernel_cache>"
21514 #: ../fuse/guestmount.pod:237
21516 "Allow the kernel to cache files (reduces the number of reads that have to go "
21517 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21518 "afford the extra memory usage."
21522 #: ../fuse/guestmount.pod:241
21523 msgid "B<-o uid=N> B<-o gid=N>"
21527 #: ../fuse/guestmount.pod:243
21529 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21530 "the chosen values."
21534 #: ../fuse/guestmount.pod:252
21536 "Add devices and mount everything read-only. Also disallow writes and make "
21537 "the disk appear read-only to FUSE."
21541 #: ../fuse/guestmount.pod:255
21543 "This is highly recommended if you are not going to edit the guest disk. If "
21544 "the guest is running and this option is I<not> supplied, then there is a "
21545 "strong risk of disk corruption in the guest. We try to prevent this from "
21546 "happening, but it is not always possible."
21550 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:171
21551 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21555 #: ../fuse/guestmount.pod:264
21556 msgid "Enable SELinux support for the guest."
21560 #: ../fuse/guestmount.pod:270
21561 msgid "Enable verbose messages from underlying libguestfs."
21565 #: ../fuse/guestmount.pod:276
21566 msgid "Display the program version and exit."
21570 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308
21571 #: ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
21572 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21576 #: ../fuse/guestmount.pod:289
21581 #: ../fuse/guestmount.pod:291
21582 msgid "Trace libguestfs calls and entry into each FUSE function."
21586 #: ../fuse/guestmount.pod:293
21587 msgid "This also stops the daemon from forking into the background."
21591 #: ../fuse/guestmount.pod:319
21593 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21594 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
21599 #: ../fuse/guestmount.pod:334
21600 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21604 #: ../inspector/virt-inspector.pod:5
21606 "virt-inspector - Display operating system version and other information "
21607 "about a virtual machine"
21611 #: ../inspector/virt-inspector.pod:9
21614 " virt-inspector [--options] -d domname\n"
21619 #: ../inspector/virt-inspector.pod:11
21622 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21627 #: ../inspector/virt-inspector.pod:15
21630 " virt-inspector domname\n"
21635 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
21638 " virt-inspector disk.img [disk.img ...]\n"
21643 #: ../inspector/virt-inspector.pod:21
21645 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21646 "determine the version of the operating system and other information about "
21647 "the virtual machine."
21651 #: ../inspector/virt-inspector.pod:25
21652 msgid "Virt-inspector produces XML output for feeding into other programs."
21656 #: ../inspector/virt-inspector.pod:27
21658 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21659 "the libvirt domain (see: C<virsh list --all>)."
21663 #: ../inspector/virt-inspector.pod:30
21665 "You can also run virt-inspector directly on disk images from a single "
21666 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
21667 "has several block devices, in which case you should list several I<-a> "
21668 "options one after another, with the first corresponding to the guest's C</"
21669 "dev/sda>, the second to the guest's C</dev/sdb> and so on."
21673 #: ../inspector/virt-inspector.pod:37
21675 "You can also run virt-inspector on install disks, live CDs, bootable USB "
21676 "keys and similar."
21680 #: ../inspector/virt-inspector.pod:40
21682 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
21683 "inspect several virtual machines, you have to run virt-inspector several "
21684 "times (for example, from a shell script for-loop)."
21688 #: ../inspector/virt-inspector.pod:45
21690 "Because virt-inspector needs direct access to guest images, it won't "
21691 "normally work over remote libvirt connections."
21695 #: ../inspector/virt-inspector.pod:48
21697 "All of the information available from virt-inspector is also available "
21698 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
21699 "The same information can also be fetched using guestfish or via libguestfs "
21700 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
21701 "WITH OTHER PROGRAMMING LANGUAGES>)."
21705 #: ../inspector/virt-inspector.pod:81
21707 "Libvirt is only used if you specify a C<domname> on the command line. If "
21708 "you specify guest block devices directly (I<-a>), then libvirt is not used "
21713 #: ../inspector/virt-inspector.pod:94
21715 "When prompting for keys and passphrases, virt-inspector normally turns "
21716 "echoing off so you cannot see what you are typing. If you are not worried "
21717 "about Tempest attacks and there is no one else in the room you can specify "
21718 "this flag to see what you are typing."
21722 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
21723 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
21724 #: ../tools/virt-win-reg.pl:144
21726 "Specify the format of disk images given on the command line. If this is "
21727 "omitted then the format is autodetected from the content of the disk image."
21731 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
21732 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
21733 #: ../tools/virt-win-reg.pl:148
21735 "If disk images are requested from libvirt, then this program asks libvirt "
21736 "for this information. In this case, the value of the format parameter is "
21741 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:391
21742 #: ../resize/virt-resize.pod:483 ../sparsify/virt-sparsify.pod:132
21743 #: ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102
21744 #: ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
21746 "If working with untrusted raw-format guest disk images, you should ensure "
21747 "the format is always specified."
21751 #: ../inspector/virt-inspector.pod:135
21752 msgid "B<--xpath> query"
21756 #: ../inspector/virt-inspector.pod:137
21758 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
21759 "In this mode virt-inspector simply runs an XPath query; all other inspection "
21760 "functions are disabled. See L</XPATH QUERIES> below for some examples."
21764 #: ../inspector/virt-inspector.pod:146
21765 msgid "Previous versions of virt-inspector allowed you to write either:"
21769 #: ../inspector/virt-inspector.pod:152
21772 " virt-inspector guestname\n"
21777 #: ../inspector/virt-inspector.pod:160
21782 #: ../inspector/virt-inspector.pod:162
21784 "The virt-inspector XML is described precisely in a RELAX NG schema file "
21785 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
21786 "just an overview."
21790 #: ../inspector/virt-inspector.pod:166
21792 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
21793 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
21794 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
21795 "which is vanishingly rare in real world VMs."
21799 #: ../inspector/virt-inspector.pod:171
21800 msgid "E<lt>operatingsystemE<gt>"
21804 #: ../inspector/virt-inspector.pod:173
21806 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
21807 "describe the operating system, its architecture, the descriptive \"product "
21808 "name\" string, the type of OS and so on, as in this example:"
21812 #: ../inspector/virt-inspector.pod:177
21815 " <operatingsystems>\n"
21816 " <operatingsystem>\n"
21817 " <root>/dev/sda2</root>\n"
21818 " <name>windows</name>\n"
21819 " <arch>i386</arch>\n"
21820 " <distro>windows</distro>\n"
21821 " <product_name>Windows 7 Enterprise</product_name>\n"
21822 " <product_variant>Client</product_variant>\n"
21823 " <major_version>6</major_version>\n"
21824 " <minor_version>1</minor_version>\n"
21825 " <windows_systemroot>/Windows</windows_systemroot>\n"
21826 " <format>installed</format>\n"
21831 #: ../inspector/virt-inspector.pod:190
21833 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
21834 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
21835 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
21836 "architecture. The other fields are fairly self-explanatory, but because "
21837 "these fields are taken directly from the libguestfs inspection API you can "
21838 "find precise information from L<guestfs(3)/INSPECTION>."
21842 #: ../inspector/virt-inspector.pod:198
21844 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
21845 "of view of libguestfs (block devices may have completely different names "
21846 "inside the VM itself)."
21850 #: ../inspector/virt-inspector.pod:202
21851 msgid "E<lt>mountpointsE<gt>"
21855 #: ../inspector/virt-inspector.pod:204
21857 "Un*x-like guests typically have multiple filesystems which are mounted at "
21858 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
21859 "element which looks like this:"
21863 #: ../inspector/virt-inspector.pod:208
21866 " <operatingsystems>\n"
21867 " <operatingsystem>\n"
21870 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
21871 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
21872 " </mountpoints>\n"
21877 #: ../inspector/virt-inspector.pod:216
21879 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
21880 "and may have completely different names inside the guest. Only mountable "
21881 "filesystems appear in this list, not things like swap devices."
21885 #: ../inspector/virt-inspector.pod:221
21886 msgid "E<lt>filesystemsE<gt>"
21890 #: ../inspector/virt-inspector.pod:223
21892 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
21893 "filesystems belonging to the guest, including swap and empty partitions. "
21894 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
21895 "this OS or shared with this OS and other OSes)."
21899 #: ../inspector/virt-inspector.pod:229
21900 msgid "You might see something like this:"
21904 #: ../inspector/virt-inspector.pod:231
21907 " <operatingsystems>\n"
21908 " <operatingsystem>\n"
21911 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21912 " <type>ext4</type>\n"
21913 " <label>Fedora-13-x86_64</label>\n"
21914 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
21920 #: ../inspector/virt-inspector.pod:241
21922 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
21923 "the label, and the UUID."
21927 #: ../inspector/virt-inspector.pod:244
21928 msgid "E<lt>applicationsE<gt>"
21932 #: ../inspector/virt-inspector.pod:246
21934 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
21935 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
21940 #: ../inspector/virt-inspector.pod:250
21942 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
21943 "Typical values would be C<rpm> and C<deb>."
21947 #: ../inspector/virt-inspector.pod:253
21949 "E<lt>package_managementE<gt>, if present, describes the package manager. "
21950 "Typical values include C<yum>, C<up2date> and C<apt>"
21954 #: ../inspector/virt-inspector.pod:256
21955 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
21959 #: ../inspector/virt-inspector.pod:259
21962 " <operatingsystems>\n"
21963 " <operatingsystem>\n"
21965 " <applications>\n"
21967 " <name>coreutils</name>\n"
21968 " <version>8.5</version>\n"
21969 " <release>1</release>\n"
21970 " </application>\n"
21975 #: ../inspector/virt-inspector.pod:269
21977 "The version and release fields may not be available for some types guests. "
21978 "Other fields are possible, see L<guestfs(3)/"
21979 "guestfs_inspect_list_applications>."
21983 #: ../inspector/virt-inspector.pod:273
21984 msgid "E<lt>drive_mappingsE<gt>"
21988 #: ../inspector/virt-inspector.pod:275
21990 "For operating systems like Windows which use drive letters, virt-inspector "
21991 "is able to find out how drive letters map to filesystems."
21995 #: ../inspector/virt-inspector.pod:279
21998 " <operatingsystems>\n"
21999 " <operatingsystem>\n"
22001 " <drive_mappings>\n"
22002 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
22003 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
22004 " </drive_mappings>\n"
22009 #: ../inspector/virt-inspector.pod:287
22011 "In the example above, drive C maps to the filesystem on the second partition "
22012 "on the first disk, and drive E maps to the filesystem on the first partition "
22013 "on the second disk."
22017 #: ../inspector/virt-inspector.pod:291
22019 "Note that this only covers permanent local filesystem mappings, not things "
22020 "like network shares. Furthermore NTFS volume mount points may not be listed "
22025 #: ../inspector/virt-inspector.pod:295
22026 msgid "E<lt>iconE<gt>"
22030 #: ../inspector/virt-inspector.pod:297
22032 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22033 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22034 "very large and high quality."
22038 #: ../inspector/virt-inspector.pod:301
22041 " <operatingsystems>\n"
22042 " <operatingsystem>\n"
22045 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22046 " [... many lines of base64 data ...]\n"
22052 #: ../inspector/virt-inspector.pod:309
22054 "To display the icon, you have to extract it and convert the base64 data back "
22055 "to a binary file. Use an XPath query or simply an editor to extract the "
22056 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22061 #: ../inspector/virt-inspector.pod:314
22064 " base64 -i -d < icon.data > icon.png\n"
22069 #: ../inspector/virt-inspector.pod:316
22070 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22074 #: ../inspector/virt-inspector.pod:318
22076 "Virt-inspector can detect some operating system installers on install disks, "
22077 "live CDs, bootable USB keys and more."
22081 #: ../inspector/virt-inspector.pod:321
22083 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22084 "fields may be present to indicate a live CD, network installer, or one part "
22085 "of a multipart CD. For example:"
22089 #: ../inspector/virt-inspector.pod:325
22092 " <operatingsystems>\n"
22093 " <operatingsystem>\n"
22094 " <root>/dev/sda</root>\n"
22095 " <name>linux</name>\n"
22096 " <arch>i386</arch>\n"
22097 " <distro>ubuntu</distro>\n"
22098 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
22099 " <major_version>10</major_version>\n"
22100 " <minor_version>10</minor_version>\n"
22101 " <format>installer</format>\n"
22107 #: ../inspector/virt-inspector.pod:337
22108 msgid "XPATH QUERIES"
22112 #: ../inspector/virt-inspector.pod:339
22114 "Virt-inspector includes built in support for running XPath queries. The "
22115 "reason for including XPath support directly in virt-inspector is simply that "
22116 "there are no good and widely available command line programs that can do "
22117 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
22118 "available on Red Hat Enterprise Linux."
22122 #: ../inspector/virt-inspector.pod:346
22124 "To perform an XPath query, use the I<--xpath> option. Note that in this "
22125 "mode, virt-inspector simply reads XML from stdin and outputs the query "
22126 "result on stdout. All other inspection features are disabled in this mode."
22130 #: ../inspector/virt-inspector.pod:353
22133 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
22135 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22136 " <type>ext4</type>\n"
22142 #: ../inspector/virt-inspector.pod:359
22145 " $ virt-inspector -d Guest | \\\n"
22146 " virt-inspector --xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22152 #: ../inspector/virt-inspector.pod:363
22155 " $ virt-inspector -d Guest | \\\n"
22156 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
22157 " [displays the guest icon, if there is one]\n"
22162 #: ../inspector/virt-inspector.pod:374
22163 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22167 #: ../inspector/virt-inspector.pod:376
22169 "Early versions of libguestfs shipped with a different virt-inspector program "
22170 "written in Perl (the current version is written in C). The XML output of "
22171 "the Perl virt-inspector was different and it could also output in other "
22172 "formats like text."
22176 #: ../inspector/virt-inspector.pod:381
22178 "The old virt-inspector is no longer supported or shipped with libguestfs."
22182 #: ../inspector/virt-inspector.pod:384
22184 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22185 "versions of virt-inspector with different names:"
22189 #: ../inspector/virt-inspector.pod:387
22192 " virt-inspector Old Perl version.\n"
22193 " virt-inspector2 New C version.\n"
22198 #: ../inspector/virt-inspector.pod:397
22200 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
22201 ">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22205 #: ../inspector/virt-inspector.pod:414
22206 msgid "Matthew Booth L<mbooth@redhat.com>"
22210 #: ../java/examples/guestfs-java.pod:5
22211 msgid "guestfs-java - How to use libguestfs from Java"
22215 #: ../java/examples/guestfs-java.pod:9
22218 " import com.redhat.et.libguestfs.*;\n"
22223 #: ../java/examples/guestfs-java.pod:11
22226 " GuestFS g = new GuestFS ();\n"
22227 " g.add_drive_opts (\"disk.img\", null);\n"
22233 #: ../java/examples/guestfs-java.pod:17
22235 "This manual page documents how to call libguestfs from the Java programming "
22236 "language. This page just documents the differences from the C API and gives "
22237 "some examples. If you are not familiar with using libguestfs, you also need "
22238 "to read L<guestfs(3)>."
22242 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22243 msgid "CLOSING THE HANDLE"
22247 #: ../java/examples/guestfs-java.pod:24
22249 "The handle is closed when it is reaped by the garbage collector. Because "
22250 "libguestfs handles include a lot of state, it is also possible to close (and "
22251 "hence free) them explicitly by calling the C<close> method."
22255 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
22256 #: ../python/examples/guestfs-python.pod:21
22257 #: ../ruby/examples/guestfs-ruby.pod:22
22262 #: ../java/examples/guestfs-java.pod:31
22264 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22265 "exception. This has a single parameter which is the error message (a "
22270 #: ../java/examples/guestfs-java.pod:35
22271 msgid "Calling any method on a closed handle raises the same exception."
22275 #: ../java/examples/guestfs-java.pod:47
22277 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-ocaml"
22278 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
22279 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22283 #: ../ocaml/examples/guestfs-ocaml.pod:5
22284 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22288 #: ../ocaml/examples/guestfs-ocaml.pod:9
22289 msgid "Module style:"
22293 #: ../ocaml/examples/guestfs-ocaml.pod:11
22296 " let g = Guestfs.create () in\n"
22297 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22298 " Guestfs.launch g;\n"
22303 #: ../ocaml/examples/guestfs-ocaml.pod:15
22304 msgid "Object-oriented style:"
22308 #: ../ocaml/examples/guestfs-ocaml.pod:17
22311 " let g = new Guestfs.guestfs () in\n"
22312 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22318 #: ../ocaml/examples/guestfs-ocaml.pod:21
22321 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22323 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22328 #: ../ocaml/examples/guestfs-ocaml.pod:27
22330 "This manual page documents how to call libguestfs from the OCaml programming "
22331 "language. This page just documents the differences from the C API and gives "
22332 "some examples. If you are not familiar with using libguestfs, you also need "
22333 "to read L<guestfs(3)>."
22337 #: ../ocaml/examples/guestfs-ocaml.pod:32
22338 msgid "PROGRAMMING STYLES"
22342 #: ../ocaml/examples/guestfs-ocaml.pod:34
22344 "There are two different programming styles supported by the OCaml bindings. "
22345 "You can use a module style, with each C function mapped to an OCaml function:"
22349 #: ../ocaml/examples/guestfs-ocaml.pod:38
22352 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22357 #: ../ocaml/examples/guestfs-ocaml.pod:40
22362 #: ../ocaml/examples/guestfs-ocaml.pod:42
22365 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22370 #: ../ocaml/examples/guestfs-ocaml.pod:44
22372 "Alternately you can use an object-oriented style, calling methods on the "
22373 "class C<Guestfs.guestfs>:"
22377 #: ../ocaml/examples/guestfs-ocaml.pod:47
22380 " method set_verbose : bool -> unit\n"
22385 #: ../ocaml/examples/guestfs-ocaml.pod:49
22387 "The object-oriented style is usually briefer, and the minor performance "
22388 "penalty isn't noticable in the general overhead of performing libguestfs "
22393 #: ../ocaml/examples/guestfs-ocaml.pod:55
22395 "The handle is closed when it is reaped by the garbage collector. Because "
22396 "libguestfs handles include a lot of state, it is also possible to close (and "
22397 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22402 #: ../ocaml/examples/guestfs-ocaml.pod:62
22404 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22405 "exception. This has a single parameter which is the error message (a "
22410 #: ../ocaml/examples/guestfs-ocaml.pod:66
22412 "Calling any function/method on a closed handle raises C<Guestfs."
22413 "Handle_closed>. The single parameter is the name of the function that you "
22418 #: ../ocaml/examples/guestfs-ocaml.pod:80
22420 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22421 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
22422 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22426 #: ../perl/examples/guestfs-perl.pod:5
22427 msgid "guestfs-perl - How to use libguestfs from Perl"
22431 #: ../perl/examples/guestfs-perl.pod:9
22434 " use Sys::Guestfs;\n"
22439 #: ../perl/examples/guestfs-perl.pod:11
22442 " my $h = Sys::Guestfs->new ();\n"
22443 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22444 " $h->launch ();\n"
22445 " $h->mount_options ('', '/dev/sda1', '/');\n"
22446 " $h->touch ('/hello');\n"
22452 #: ../perl/examples/guestfs-perl.pod:20
22454 "This manual page documents how to call libguestfs from the Perl programming "
22455 "language. This page just documents the differences from the C API and gives "
22456 "some examples. If you are not familiar with using libguestfs, you also need "
22457 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22461 #: ../perl/examples/guestfs-perl.pod:26
22466 #: ../perl/examples/guestfs-perl.pod:28
22468 "Errors from libguestfs functions turn into calls to C<croak> (see L<Carp(3)"
22473 #: ../perl/examples/guestfs-perl.pod:41
22475 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang"
22476 "(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
22477 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22481 #: ../python/examples/guestfs-python.pod:5
22482 msgid "guestfs-python - How to use libguestfs from Python"
22486 #: ../python/examples/guestfs-python.pod:9
22489 " import guestfs\n"
22490 " g = guestfs.GuestFS ()\n"
22491 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22497 #: ../python/examples/guestfs-python.pod:16
22499 "This manual page documents how to call libguestfs from the Python "
22500 "programming language. This page just documents the differences from the C "
22501 "API and gives some examples. If you are not familiar with using libguestfs, "
22502 "you also need to read L<guestfs(3)>."
22506 #: ../python/examples/guestfs-python.pod:23
22508 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22509 "single string argument which is the error message."
22513 #: ../python/examples/guestfs-python.pod:26
22514 msgid "MORE DOCUMENTATION"
22518 #: ../python/examples/guestfs-python.pod:28
22523 #: ../python/examples/guestfs-python.pod:30
22527 " >>> import guestfs\n"
22528 " >>> help (guestfs)\n"
22533 #: ../python/examples/guestfs-python.pod:44
22535 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22536 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, "
22537 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22541 #: ../rescue/virt-rescue.pod:5
22542 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22546 #: ../rescue/virt-rescue.pod:9
22549 " virt-rescue [--options] -d domname\n"
22554 #: ../rescue/virt-rescue.pod:11
22557 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22562 #: ../rescue/virt-rescue.pod:15
22565 " virt-rescue [--options] domname\n"
22570 #: ../rescue/virt-rescue.pod:17
22573 " virt-rescue [--options] disk.img [disk.img ...]\n"
22578 #: ../rescue/virt-rescue.pod:21
22580 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22581 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22582 "you from doing this, but doesn't catch all cases."
22586 #: ../rescue/virt-rescue.pod:25
22588 "However if you use the I<--ro> (read only) option, then you can attach a "
22589 "shell to a live virtual machine. The results might be strange or "
22590 "inconsistent at times but you won't get disk corruption."
22594 #: ../rescue/virt-rescue.pod:31
22596 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22597 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22598 "recovery tools which you can use to examine or rescue a virtual machine or "
22603 #: ../rescue/virt-rescue.pod:36
22605 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
22606 "on disk image(s):"
22610 #: ../rescue/virt-rescue.pod:39
22613 " virt-rescue -d GuestName\n"
22618 #: ../rescue/virt-rescue.pod:41
22621 " virt-rescue --ro -a /path/to/disk.img\n"
22626 #: ../rescue/virt-rescue.pod:43
22629 " virt-rescue -a /dev/sdc\n"
22634 #: ../rescue/virt-rescue.pod:45
22635 msgid "For live VMs you I<must> use the --ro option."
22639 #: ../rescue/virt-rescue.pod:47
22641 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22642 "in an interactive bash shell where you can use many ordinary Linux "
22643 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
22644 "appliance. You must mount the virtual machine's filesystems by hand. There "
22645 "is an empty directory called C</sysroot> where you can mount filesystems."
22649 #: ../rescue/virt-rescue.pod:54
22651 "In the example below, we list logical volumes, then choose one to mount "
22652 "under C</sysroot>:"
22656 #: ../rescue/virt-rescue.pod:57
22660 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
22661 " lv_root vg_f11x64 -wi-a- 8.83G\n"
22662 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
22663 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
22664 " ><rescue> ls /sysroot\n"
22669 #: ../rescue/virt-rescue.pod:64
22671 "If you don't know what filesystems are available on the virtual machine then "
22672 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
22676 #: ../rescue/virt-rescue.pod:70
22678 "Virt-rescue can be used on I<any> disk image file or device, not just a "
22679 "virtual machine. For example you can use it on a blank file if you want to "
22680 "partition that file (although we would recommend using L<guestfish(1)> "
22681 "instead as it is more suitable for this purpose). You can even use virt-"
22682 "rescue on things like SD cards."
22686 #: ../rescue/virt-rescue.pod:76
22688 "Virt-rescue does not require root. You only need to run it as root if you "
22689 "need root to open the disk image."
22693 #: ../rescue/virt-rescue.pod:79
22695 "This tool is just designed for quick interactive hacking on a virtual "
22696 "machine. For more structured access to a virtual machine disk image, you "
22697 "should use L<guestfs(3)>. To get a structured shell that you can use to "
22698 "make scripted changes to guests, use L<guestfish(1)>."
22702 #: ../rescue/virt-rescue.pod:103
22703 msgid "B<--append kernelopts>"
22707 #: ../rescue/virt-rescue.pod:105
22708 msgid "Pass additional options to the rescue kernel."
22712 #: ../rescue/virt-rescue.pod:135
22715 " virt-rescue --format=raw -a disk.img\n"
22720 #: ../rescue/virt-rescue.pod:139
22723 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
22728 #: ../rescue/virt-rescue.pod:148
22733 #: ../rescue/virt-rescue.pod:150
22734 msgid "B<--memsize MB>"
22738 #: ../rescue/virt-rescue.pod:152
22740 "Change the amount of memory allocated to the rescue system. The default is "
22741 "set by libguestfs and is small but adequate for running system tools. The "
22742 "occasional program might need more memory. The parameter is specified in "
22747 #: ../rescue/virt-rescue.pod:157
22748 msgid "B<--network>"
22752 #: ../rescue/virt-rescue.pod:159
22753 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
22757 #: ../rescue/virt-rescue.pod:165
22758 msgid "Open the image read-only."
22762 #: ../rescue/virt-rescue.pod:175
22764 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
22765 "SELINUX> before using this option."
22769 #: ../rescue/virt-rescue.pod:178
22774 #: ../rescue/virt-rescue.pod:180
22775 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
22779 #: ../rescue/virt-rescue.pod:198
22781 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
22782 "are done read-write."
22786 #: ../rescue/virt-rescue.pod:211
22787 msgid "Previous versions of virt-rescue allowed you to write either:"
22791 #: ../rescue/virt-rescue.pod:213
22794 " virt-rescue disk.img [disk.img ...]\n"
22799 #: ../rescue/virt-rescue.pod:217
22802 " virt-rescue guestname\n"
22807 #: ../rescue/virt-rescue.pod:225
22812 #: ../rescue/virt-rescue.pod:227
22814 "Adding the I<--network> option enables QEMU user networking in the rescue "
22815 "appliance. There are some differences between user networking and ordinary "
22820 #: ../rescue/virt-rescue.pod:233
22821 msgid "ping does not work"
22825 #: ../rescue/virt-rescue.pod:235
22827 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
22828 "send the ping packets, and because virt-rescue must be able to run as non-"
22829 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
22830 "The ping command will appear to resolve addresses but will not be able to "
22831 "send or receive any packets. This does not mean that the network is not "
22836 #: ../rescue/virt-rescue.pod:242
22837 msgid "cannot receive connections"
22841 #: ../rescue/virt-rescue.pod:244
22842 msgid "QEMU user networking cannot receive incoming connections."
22846 #: ../rescue/virt-rescue.pod:246
22847 msgid "making TCP connections"
22851 #: ../rescue/virt-rescue.pod:248
22853 "The virt-rescue appliance needs to be small and so does not include many "
22854 "network tools. In particular there is no L<telnet(1)> command. You can "
22855 "make TCP connections from the shell using the magical C</dev/tcp/"
22856 "E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
22860 #: ../rescue/virt-rescue.pod:253
22863 " exec 3<>/dev/tcp/redhat.com/80\n"
22864 " echo \"GET /\" >&3\n"
22870 #: ../rescue/virt-rescue.pod:257
22871 msgid "See L<bash(1)> for more details."
22875 #: ../rescue/virt-rescue.pod:263
22877 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
22878 "ENVIRONMENT VARIABLES> for the complete list."
22882 #: ../rescue/virt-rescue.pod:290
22884 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<http://"
22885 "libguestfs.org/>."
22889 #: ../resize/virt-resize.pod:5
22890 msgid "virt-resize - Resize a virtual machine disk"
22894 #: ../resize/virt-resize.pod:9
22897 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
22898 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
22899 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
22904 #: ../resize/virt-resize.pod:15
22906 "Virt-resize is a tool which can resize a virtual machine disk, making it "
22907 "larger or smaller overall, and resizing or deleting any partitions contained "
22912 #: ../resize/virt-resize.pod:19
22914 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
22915 "not> be used on live virtual machines - for consistent results, shut the "
22916 "virtual machine down before resizing it."
22920 #: ../resize/virt-resize.pod:23
22922 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
22923 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
22927 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:597
22928 #: ../sparsify/virt-sparsify.pod:203 ../src/guestfs.pod:484
22929 #: ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
22934 #: ../resize/virt-resize.pod:33
22936 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
22937 "fill the extra 5GB of space."
22941 #: ../resize/virt-resize.pod:36
22944 " virt-filesystems --long -h --all -a olddisk\n"
22949 #: ../resize/virt-resize.pod:38
22952 " truncate -r olddisk newdisk\n"
22953 " truncate -s +5G newdisk\n"
22958 #: ../resize/virt-resize.pod:41
22961 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
22962 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
22967 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:604
22968 #: ../sparsify/virt-sparsify.pod:210 ../src/guestfs.pod:490
22969 #: ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
22974 #: ../resize/virt-resize.pod:46
22976 "As above, but make the /boot partition 200MB bigger, while giving the "
22977 "remaining space to /dev/sda2:"
22981 #: ../resize/virt-resize.pod:49
22984 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22985 " olddisk newdisk\n"
22990 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:610
22991 #: ../sparsify/virt-sparsify.pod:216 ../src/guestfs.pod:501
22992 #: ../src/guestfs.pod:1451
22997 #: ../resize/virt-resize.pod:54
22999 "As in the first example, but expand a logical volume as the final step. "
23000 "This is what you would typically use for Linux guests that use LVM:"
23004 #: ../resize/virt-resize.pod:58
23007 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
23008 " olddisk newdisk\n"
23013 #: ../resize/virt-resize.pod:61
23018 #: ../resize/virt-resize.pod:63
23020 "As in the first example, but the output format will be qcow2 instead of a "
23025 #: ../resize/virt-resize.pod:66
23028 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
23029 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23034 #: ../resize/virt-resize.pod:71
23035 msgid "DETAILED USAGE"
23039 #: ../resize/virt-resize.pod:73
23040 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23044 #: ../resize/virt-resize.pod:77
23045 msgid "1. Shut down the virtual machine"
23049 #: ../resize/virt-resize.pod:79
23050 msgid "2. Locate input disk image"
23054 #: ../resize/virt-resize.pod:81
23056 "Locate the input disk image (ie. the file or device on the host containing "
23057 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23058 "dumpxml> like this to find the disk image name:"
23062 #: ../resize/virt-resize.pod:85
23065 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23066 " Found 1 nodes:\n"
23068 " <source dev=\"/dev/vg/lv_guest\" />\n"
23073 #: ../resize/virt-resize.pod:90
23074 msgid "3. Look at current sizing"
23078 #: ../resize/virt-resize.pod:92
23079 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23083 #: ../resize/virt-resize.pod:95
23086 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23087 " Name Type Size Parent\n"
23088 " /dev/sda1 partition 101M /dev/sda\n"
23089 " /dev/sda2 partition 7.9G /dev/sda\n"
23090 " /dev/sda device 8.0G -\n"
23095 #: ../resize/virt-resize.pod:101
23097 "(This example is a virtual machine with an 8 GB disk which we would like to "
23098 "expand up to 10 GB)."
23102 #: ../resize/virt-resize.pod:104
23103 msgid "4. Create output disk"
23107 #: ../resize/virt-resize.pod:106
23109 "Virt-resize cannot do in-place disk modifications. You have to have space "
23110 "to store the resized output disk."
23114 #: ../resize/virt-resize.pod:109
23116 "To store the resized disk image in a file, create a file of a suitable size:"
23120 #: ../resize/virt-resize.pod:112
23123 " # rm -f outdisk\n"
23124 " # truncate -s 10G outdisk\n"
23129 #: ../resize/virt-resize.pod:115
23130 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23134 #: ../resize/virt-resize.pod:117
23137 " # lvcreate -L 10G -n lv_name vg_name\n"
23142 #: ../resize/virt-resize.pod:119
23143 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23147 #: ../resize/virt-resize.pod:121
23150 " # virsh pool-list\n"
23151 " # virsh vol-create-as poolname newvol 10G\n"
23156 #: ../resize/virt-resize.pod:124
23161 #: ../resize/virt-resize.pod:126
23163 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23164 "file) and the output disk. The output disk is the one created in the "
23169 #: ../resize/virt-resize.pod:130
23172 " # virt-resize indisk outdisk\n"
23177 #: ../resize/virt-resize.pod:132
23179 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23180 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23181 "larger, then an extra, empty partition is created at the end of the disk "
23182 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23187 #: ../resize/virt-resize.pod:138
23189 "More realistically you'd want to expand existing partitions in the disk "
23190 "image by passing extra options (for the full list see the L</OPTIONS> "
23195 #: ../resize/virt-resize.pod:142
23197 "L</--expand> is the most useful option. It expands the named partition "
23198 "within the disk to fill any extra space:"
23202 #: ../resize/virt-resize.pod:145
23205 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23210 #: ../resize/virt-resize.pod:147
23212 "(In this case, an extra partition is I<not> created at the end of the disk, "
23213 "because there will be no unused space)."
23217 #: ../resize/virt-resize.pod:150
23219 "L</--resize> is the other commonly used option. The following would "
23220 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23221 "rest of the available space:"
23225 #: ../resize/virt-resize.pod:154
23228 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23229 " indisk outdisk\n"
23234 #: ../resize/virt-resize.pod:157
23236 "If the expanded partition in the image contains a filesystem or LVM PV, then "
23237 "if virt-resize knows how, it will resize the contents, the equivalent of "
23238 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23239 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23240 "filesystems, so you would have to online resize them after booting the guest."
23244 #: ../resize/virt-resize.pod:164
23245 msgid "Other options are covered below."
23249 #: ../resize/virt-resize.pod:166
23254 #: ../resize/virt-resize.pod:168
23255 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23259 #: ../resize/virt-resize.pod:170
23260 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23264 #: ../resize/virt-resize.pod:172
23267 " # virsh edit guestname\n"
23272 #: ../resize/virt-resize.pod:174
23274 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
23275 "html#elementsDisks>"
23279 #: ../resize/virt-resize.pod:177
23280 msgid "Then start up the domain with the new, resized disk:"
23284 #: ../resize/virt-resize.pod:179
23287 " # virsh start guestname\n"
23292 #: ../resize/virt-resize.pod:181
23294 "and check that it still works. See also the L</NOTES> section below for "
23295 "additional information."
23299 #: ../resize/virt-resize.pod:184
23300 msgid "7. Resize LVs etc inside the guest"
23304 #: ../resize/virt-resize.pod:186
23305 msgid "(This can also be done offline using L<guestfish(1)>)"
23309 #: ../resize/virt-resize.pod:188
23311 "Once the guest has booted you should see the new space available, at least "
23312 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23313 "may need to resize LVs inside PVs, and also resize filesystem types that "
23314 "virt-resize does not know how to expand."
23318 #: ../resize/virt-resize.pod:195
23319 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23323 #: ../resize/virt-resize.pod:197
23325 "Shrinking is somewhat more complex than expanding, and only an overview is "
23330 #: ../resize/virt-resize.pod:200
23332 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23333 "filesystems). The user has to shrink content before passing the disk image "
23334 "to virt-resize, and virt-resize will check that the content has been shrunk "
23339 #: ../resize/virt-resize.pod:205
23340 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23344 #: ../resize/virt-resize.pod:207
23346 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23347 "steps 3 and 4 above to allocate a new disk image."
23351 #: ../resize/virt-resize.pod:210
23353 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23357 #: ../resize/virt-resize.pod:213
23358 msgid "IGNORING OR DELETING PARTITIONS"
23362 #: ../resize/virt-resize.pod:215
23364 "virt-resize also gives a convenient way to ignore or delete partitions when "
23365 "copying from the input disk to the output disk. Ignoring a partition speeds "
23366 "up the copy where you don't care about the existing contents of a "
23367 "partition. Deleting a partition removes it completely, but note that it "
23368 "also renumbers any partitions after the one which is deleted, which can "
23369 "leave some guests unbootable."
23373 #: ../resize/virt-resize.pod:222
23374 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23378 #: ../resize/virt-resize.pod:224
23380 "If the input disk is in qcow2 format, then you may prefer that the output is "
23381 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23382 "the fly. The output format is simply determined by the format of the empty "
23383 "output container that you provide. Thus to create qcow2 output, use:"
23387 #: ../resize/virt-resize.pod:230
23390 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23395 #: ../resize/virt-resize.pod:232
23396 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23400 #: ../resize/virt-resize.pod:234
23401 msgid "Similarly, to get non-sparse raw output use:"
23405 #: ../resize/virt-resize.pod:236
23408 " fallocate -l size outdisk\n"
23413 #: ../resize/virt-resize.pod:238
23415 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
23416 "dev/zero of=outdisk bs=1M count=..>)"
23420 #: ../resize/virt-resize.pod:241
23421 msgid "LOGICAL PARTITIONS"
23425 #: ../resize/virt-resize.pod:243
23427 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23428 "tables) cannot be resized."
23432 #: ../resize/virt-resize.pod:246
23434 "To understand what is going on, firstly one of the four partitions C</dev/"
23435 "sda1-4> will have MBR partition type C<05> or C<0f>. This is called the "
23436 "B<extended partition>. Use L<virt-filesystems(1)> to see the MBR partition "
23441 #: ../resize/virt-resize.pod:251
23442 msgid "Logical partitions live inside the extended partition."
23446 #: ../resize/virt-resize.pod:253
23448 "The extended partition can be expanded, but not shrunk (unless you force it, "
23449 "which is not advisable). When the extended partition is copied across, all "
23450 "the logical partitions contained inside are copied over implicitly. Virt-"
23451 "resize does not look inside the extended partition, so it copies the logical "
23452 "partitions blindly."
23456 #: ../resize/virt-resize.pod:259
23458 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
23459 "line. Doing so will give an error."
23463 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23464 msgid "Display help."
23468 #: ../resize/virt-resize.pod:270
23469 msgid "B<--align-first auto>"
23473 #: ../resize/virt-resize.pod:272
23474 msgid "B<--align-first never>"
23478 #: ../resize/virt-resize.pod:274
23479 msgid "B<--align-first always>"
23483 #: ../resize/virt-resize.pod:276
23485 "Align the first partition for improved performance (see also the I<--"
23486 "alignment> option)."
23490 #: ../resize/virt-resize.pod:279
23492 "The default is I<--align-first auto> which only aligns the first partition "
23493 "if it is safe to do so. That is, only when we know how to fix the "
23494 "bootloader automatically, and at the moment that can only be done for "
23499 #: ../resize/virt-resize.pod:284
23501 "I<--align-first never> means we never move the first partition. This is the "
23502 "safest option. Try this if the guest does not boot after resizing."
23506 #: ../resize/virt-resize.pod:288
23508 "I<--align-first always> means we always align the first partition (if it "
23509 "needs to be aligned). For some guests this will break the bootloader, "
23510 "making the guest unbootable."
23514 #: ../resize/virt-resize.pod:292
23515 msgid "B<--alignment N>"
23519 #: ../resize/virt-resize.pod:294
23521 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
23522 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
23526 #: ../resize/virt-resize.pod:298
23528 "Assuming 512 byte sector size inside the guest, here are some suitable "
23533 #: ../resize/virt-resize.pod:303
23534 msgid "I<--alignment 1> (512 bytes)"
23538 #: ../resize/virt-resize.pod:305
23540 "The partitions would be packed together as closely as possible, but would be "
23541 "completely unaligned. In some cases this can cause very poor performance. "
23542 "See L<virt-alignment-scan(1)> for further details."
23546 #: ../resize/virt-resize.pod:309
23547 msgid "I<--alignment 8> (4K)"
23551 #: ../resize/virt-resize.pod:311
23553 "This would be the minimum acceptable alignment for reasonable performance on "
23558 #: ../resize/virt-resize.pod:314
23559 msgid "I<--alignment 128> (64K)"
23563 #: ../resize/virt-resize.pod:316
23565 "This alignment provides good performance when the host is using high end "
23570 #: ../resize/virt-resize.pod:319
23571 msgid "I<--alignment 2048> (1M)"
23575 #: ../resize/virt-resize.pod:321
23577 "This is the standard alignment used by all newly installed guests since "
23582 #: ../resize/virt-resize.pod:326
23587 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177
23588 #: ../tools/virt-win-reg.pl:120
23593 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
23594 msgid "Enable debugging messages."
23598 #: ../resize/virt-resize.pod:332
23599 msgid "B<--delete part>"
23603 #: ../resize/virt-resize.pod:334
23605 "Delete the named partition. It would be more accurate to describe this as "
23606 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
23607 "the original disk image is left intact."
23611 #: ../resize/virt-resize.pod:338
23613 "Note that when you delete a partition, then anything contained in the "
23614 "partition is also deleted. Furthermore, this causes any partitions that "
23615 "come after to be I<renumbered>, which can easily make your guest unbootable."
23619 #: ../resize/virt-resize.pod:343 ../resize/virt-resize.pod:404
23620 #: ../resize/virt-resize.pod:531 ../sparsify/virt-sparsify.pod:145
23621 msgid "You can give this option multiple times."
23625 #: ../resize/virt-resize.pod:345
23626 msgid "B<--expand part>"
23630 #: ../resize/virt-resize.pod:347
23632 "Expand the named partition so it uses up all extra space (space left over "
23633 "after any other resize changes that you request have been done)."
23637 #: ../resize/virt-resize.pod:350
23639 "If virt-resize knows how, it will expand the direct content of the "
23640 "partition. For example, if the partition is an LVM PV, it will expand the "
23641 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
23642 "content it doesn't know about alone."
23646 #: ../resize/virt-resize.pod:355
23647 msgid "Currently virt-resize can resize:"
23651 #: ../resize/virt-resize.pod:361
23652 msgid "ext2, ext3 and ext4 filesystems."
23656 #: ../resize/virt-resize.pod:365
23657 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
23661 #: ../resize/virt-resize.pod:367
23663 "The filesystem must have been shut down consistently last time it was used. "
23664 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
23665 "consistency check, so at the first boot after resizing Windows will check "
23670 #: ../resize/virt-resize.pod:374
23672 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
23673 "inside the PV, but see the I<--LV-expand> option. The user could also "
23674 "resize LVs as desired after boot."
23678 #: ../resize/virt-resize.pod:380
23679 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
23683 #: ../resize/virt-resize.pod:384 ../resize/virt-resize.pod:559
23684 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
23688 #: ../resize/virt-resize.pod:386 ../sparsify/virt-sparsify.pod:125
23689 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92
23690 #: ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
23691 msgid "B<--format> raw"
23695 #: ../resize/virt-resize.pod:388 ../sparsify/virt-sparsify.pod:129
23697 "Specify the format of the input disk image. If this flag is not given then "
23698 "it is auto-detected from the image itself."
23702 #: ../resize/virt-resize.pod:394
23704 "Note that this option I<does not> affect the output format. See L</QCOW2 "
23705 "AND NON-SPARSE RAW FORMATS>."
23709 #: ../resize/virt-resize.pod:397
23710 msgid "B<--ignore part>"
23714 #: ../resize/virt-resize.pod:399
23716 "Ignore the named partition. Effectively this means the partition is "
23717 "allocated on the destination disk, but the content is not copied across from "
23718 "the source disk. The content of the partition will be blank (all zero "
23723 #: ../resize/virt-resize.pod:406
23724 msgid "B<--LV-expand logvol>"
23728 #: ../resize/virt-resize.pod:408
23730 "This takes the logical volume and, as a final step, expands it to fill all "
23731 "the space available in its volume group. A typical usage, assuming a Linux "
23732 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
23733 "lv_root> would be:"
23737 #: ../resize/virt-resize.pod:413
23740 " virt-resize indisk outdisk \\\n"
23741 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
23746 #: ../resize/virt-resize.pod:416
23748 "This would first expand the partition (and PV), and then expand the root "
23749 "device to fill the extra space in the PV."
23753 #: ../resize/virt-resize.pod:419
23755 "The contents of the LV are also resized if virt-resize knows how to do "
23756 "that. You can stop virt-resize from trying to expand the content by using "
23757 "the option I<--no-expand-content>."
23761 #: ../resize/virt-resize.pod:423
23762 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
23766 #: ../resize/virt-resize.pod:425
23768 "You can give this option multiple times, I<but> it doesn't make sense to do "
23769 "this unless the logical volumes you specify are all in different volume "
23774 #: ../resize/virt-resize.pod:429 ../sparsify/virt-sparsify.pod:147
23775 msgid "B<--machine-readable>"
23779 #: ../resize/virt-resize.pod:431 ../sparsify/virt-sparsify.pod:149
23781 "This option is used to make the output more machine friendly when being "
23782 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
23786 #: ../resize/virt-resize.pod:437
23787 msgid "B<--dryrun>"
23791 #: ../resize/virt-resize.pod:439
23792 msgid "Print a summary of what would be done, but don't do anything."
23796 #: ../resize/virt-resize.pod:441
23797 msgid "B<--no-copy-boot-loader>"
23801 #: ../resize/virt-resize.pod:443
23803 "By default, virt-resize copies over some sectors at the start of the disk "
23804 "(up to the beginning of the first partition). Commonly these sectors "
23805 "contain the Master Boot Record (MBR) and the boot loader, and are required "
23806 "in order for the guest to boot correctly."
23810 #: ../resize/virt-resize.pod:448
23812 "If you specify this flag, then this initial copy is not done. You may need "
23813 "to reinstall the boot loader in this case."
23817 #: ../resize/virt-resize.pod:451
23818 msgid "B<--no-extra-partition>"
23822 #: ../resize/virt-resize.pod:453
23824 "By default, virt-resize creates an extra partition if there is any extra, "
23825 "unused space after all resizing has happened. Use this option to prevent "
23826 "the extra partition from being created. If you do this then the extra space "
23827 "will be inaccessible until you run fdisk, parted, or some other partitioning "
23828 "tool in the guest."
23832 #: ../resize/virt-resize.pod:459
23834 "Note that if the surplus space is smaller than 10 MB, no extra partition "
23839 #: ../resize/virt-resize.pod:462
23840 msgid "B<--no-expand-content>"
23844 #: ../resize/virt-resize.pod:464
23846 "By default, virt-resize will try to expand the direct contents of "
23847 "partitions, if it knows how (see I<--expand> option above)."
23851 #: ../resize/virt-resize.pod:467
23853 "If you give the I<--no-expand-content> option then virt-resize will not "
23858 #: ../resize/virt-resize.pod:470
23859 msgid "B<--ntfsresize-force>"
23863 #: ../resize/virt-resize.pod:472
23865 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
23866 "the NTFS disk is marked as needing a consistency check. You have to use "
23867 "this option if you want to resize a Windows guest multiple times without "
23868 "booting into Windows between each resize."
23872 #: ../resize/virt-resize.pod:478
23873 msgid "B<--output-format> raw"
23877 #: ../resize/virt-resize.pod:480
23879 "Specify the format of the output disk image. If this flag is not given then "
23880 "it is auto-detected from the image itself."
23884 #: ../resize/virt-resize.pod:486
23886 "Note that this option I<does not create> the output format. This option "
23887 "just tells libguestfs what it is so it doesn't try to guess it. You still "
23888 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
23889 "SPARSE RAW FORMATS>."
23893 #: ../resize/virt-resize.pod:495
23894 msgid "Don't print the summary."
23898 #: ../resize/virt-resize.pod:497
23899 msgid "B<--resize part=size>"
23903 #: ../resize/virt-resize.pod:499
23905 "Resize the named partition (expanding or shrinking it) so that it has the "
23910 #: ../resize/virt-resize.pod:502
23912 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
23913 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
23914 "size; or as a relative number or percentage. For example:"
23918 #: ../resize/virt-resize.pod:508
23921 " --resize /dev/sda2=10G\n"
23926 #: ../resize/virt-resize.pod:510
23929 " --resize /dev/sda4=90%\n"
23934 #: ../resize/virt-resize.pod:512
23937 " --resize /dev/sda2=+1G\n"
23942 #: ../resize/virt-resize.pod:514
23945 " --resize /dev/sda2=-200M\n"
23950 #: ../resize/virt-resize.pod:516
23953 " --resize /dev/sda1=+128K\n"
23958 #: ../resize/virt-resize.pod:518
23961 " --resize /dev/sda1=+10%\n"
23966 #: ../resize/virt-resize.pod:520
23969 " --resize /dev/sda1=-10%\n"
23974 #: ../resize/virt-resize.pod:522
23976 "You can increase the size of any partition. Virt-resize will expand the "
23977 "direct content of the partition if it knows how (see I<--expand> below)."
23981 #: ../resize/virt-resize.pod:526
23983 "You can only I<decrease> the size of partitions that contain filesystems or "
23984 "PVs which have already been shrunk. Virt-resize will check this has been "
23985 "done before proceeding, or else will print an error (see also I<--resize-"
23990 #: ../resize/virt-resize.pod:533
23991 msgid "B<--resize-force part=size>"
23995 #: ../resize/virt-resize.pod:535
23997 "This is the same as I<--resize> except that it will let you decrease the "
23998 "size of any partition. Generally this means you will lose any data which "
23999 "was at the end of the partition you shrink, but you may not care about that "
24000 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24001 "as a swap partition)."
24005 #: ../resize/virt-resize.pod:541
24006 msgid "See also the I<--ignore> option."
24010 #: ../resize/virt-resize.pod:543
24011 msgid "B<--shrink part>"
24015 #: ../resize/virt-resize.pod:545
24017 "Shrink the named partition until the overall disk image fits in the "
24018 "destination. The named partition B<must> contain a filesystem or PV which "
24019 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24020 "online tools). Virt-resize will check this and give an error if it has not "
24025 #: ../resize/virt-resize.pod:551
24027 "The amount by which the overall disk must be shrunk (after carrying out all "
24028 "other operations requested by the user) is called the \"deficit\". For "
24029 "example, a straight copy (assume no other operations) from a 5GB disk image "
24030 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24031 "would give an error unless the user specified a partition to shrink and that "
24032 "partition had more than a gigabyte of free space."
24036 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:177
24037 msgid "MACHINE READABLE OUTPUT"
24041 #: ../resize/virt-resize.pod:571
24043 "The I<--machine-readable> option can be used to make the output more machine "
24044 "friendly, which is useful when calling virt-resize from other programs, GUIs "
24049 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:183
24050 msgid "There are two ways to use this option."
24054 #: ../resize/virt-resize.pod:577
24056 "Firstly use the option on its own to query the capabilities of the virt-"
24057 "resize binary. Typical output looks like this:"
24061 #: ../resize/virt-resize.pod:580
24064 " $ virt-resize --machine-readable\n"
24066 " ntfsresize-force\n"
24074 #: ../resize/virt-resize.pod:587 ../sparsify/virt-sparsify.pod:193
24076 "A list of features is printed, one per line, and the program exits with "
24081 #: ../resize/virt-resize.pod:590 ../sparsify/virt-sparsify.pod:196
24083 "Secondly use the option in conjunction with other options to make the "
24084 "regular program output more machine friendly."
24088 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:199
24089 msgid "At the moment this means:"
24093 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:205
24095 "Progress bar messages can be parsed from stdout by looking for this regular "
24100 #: ../resize/virt-resize.pod:602 ../sparsify/virt-sparsify.pod:208
24103 " ^[0-9]+/[0-9]+$\n"
24108 #: ../resize/virt-resize.pod:606 ../sparsify/virt-sparsify.pod:212
24110 "The calling program should treat messages sent to stdout (except for "
24111 "progress bar messages) as status messages. They can be logged and/or "
24112 "displayed to the user."
24116 #: ../resize/virt-resize.pod:612
24118 "The calling program should treat messages sent to stderr as error messages. "
24119 "In addition, virt-resize exits with a non-zero status code if there was a "
24124 #: ../resize/virt-resize.pod:618
24126 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
24127 "readable> option and will return an error."
24131 #: ../resize/virt-resize.pod:623
24132 msgid "\"Partition 1 does not end on cylinder boundary.\""
24136 #: ../resize/virt-resize.pod:625
24138 "Virt-resize aligns partitions to multiples of 128 sectors (see the I<--"
24139 "alignment> parameter). Usually this means the partitions will not be "
24140 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24141 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
24142 "drives. Alignment of partitions to cylinders is not required by any modern "
24143 "operating system."
24147 #: ../resize/virt-resize.pod:632
24148 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24152 #: ../resize/virt-resize.pod:634
24154 "In Windows Vista and later versions, Microsoft switched to using a separate "
24155 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24156 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24157 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24158 "the second partition (ie. C: drive) should work."
24162 #: ../resize/virt-resize.pod:641
24164 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24165 "NTFS partitions have been expanded. This is just a safety check and (unless "
24166 "it find errors) is nothing to worry about."
24170 #: ../resize/virt-resize.pod:645
24171 msgid "GUEST BOOT STUCK AT \"GRUB\""
24175 #: ../resize/virt-resize.pod:647
24177 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24178 "printing C<GRUB> on the console, try reinstalling grub."
24182 #: ../resize/virt-resize.pod:650
24185 " guestfish -i -a newdisk\n"
24186 " ><fs> cat /boot/grub/device.map\n"
24187 " # check the contents of this file are sensible or\n"
24188 " # edit the file if necessary\n"
24189 " ><fs> grub-install / /dev/vda\n"
24195 #: ../resize/virt-resize.pod:657
24197 "For more flexible guest reconfiguration, including if you need to specify "
24198 "other parameters to grub-install, use L<virt-rescue(1)>."
24202 #: ../resize/virt-resize.pod:660
24203 msgid "ALTERNATIVE TOOLS"
24207 #: ../resize/virt-resize.pod:662
24209 "There are several proprietary tools for resizing partitions. We won't "
24210 "mention any here."
24214 #: ../resize/virt-resize.pod:665
24216 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24217 "operations on disk images. They can resize and move partitions, but I don't "
24218 "think they can do anything with the contents, and they certainly don't "
24223 #: ../resize/virt-resize.pod:670
24225 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24226 "but at a much lower level. You will probably end up hand-calculating sector "
24227 "offsets, which is something that virt-resize was designed to avoid. If you "
24228 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24233 #: ../resize/virt-resize.pod:690
24235 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
24236 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
24237 "L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, "
24238 "L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<virt-sparsify(1)>, "
24239 "L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24243 #: ../ruby/examples/guestfs-ruby.pod:5
24244 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24248 #: ../ruby/examples/guestfs-ruby.pod:9
24251 " require 'guestfs'\n"
24252 " g = Guestfs::Guestfs.new()\n"
24253 " g.add_drive_opts(\"disk.img\",\n"
24254 " :readonly => 1, :format => \"raw\")\n"
24260 #: ../ruby/examples/guestfs-ruby.pod:17
24262 "This manual page documents how to call libguestfs from the Ruby programming "
24263 "language. This page just documents the differences from the C API and gives "
24264 "some examples. If you are not familiar with using libguestfs, you also need "
24265 "to read L<guestfs(3)>."
24269 #: ../ruby/examples/guestfs-ruby.pod:24
24271 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24272 "This has a single parameter which is the error message (a string)."
24276 #: ../ruby/examples/guestfs-ruby.pod:38
24278 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
24279 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
24280 "L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24284 #: ../sparsify/virt-sparsify.pod:5
24285 msgid "virt-sparsify - Make a virtual machine disk sparse"
24289 #: ../sparsify/virt-sparsify.pod:9
24292 " virt-sparsify [--options] indisk outdisk\n"
24297 #: ../sparsify/virt-sparsify.pod:13
24299 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24300 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24301 "the disk image can be converted back to free space on the host."
24305 #: ../sparsify/virt-sparsify.pod:18
24307 "Virt-sparsify can locate and sparsify free space in most filesystems (eg. "
24308 "ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24312 #: ../sparsify/virt-sparsify.pod:21
24314 "Virt-sparsify can also convert between some disk formats, for example "
24315 "converting a raw disk image to a thin-provisioned qcow2 image."
24319 #: ../sparsify/virt-sparsify.pod:24
24321 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24322 "machines. If a virtual machine has more than one attached disk, you must "
24323 "sparsify each one separately."
24327 #: ../sparsify/virt-sparsify.pod:28
24328 msgid "IMPORTANT LIMITATIONS"
24332 #: ../sparsify/virt-sparsify.pod:34
24334 "Virt-sparsify does not do in-place modifications. It copies from a source "
24335 "image to a destination image, leaving the source unchanged. I<Check that "
24336 "the sparsification was successful before deleting the source image>."
24340 #: ../sparsify/virt-sparsify.pod:41
24341 msgid "The virtual machine I<must be shut down> before using this tool."
24345 #: ../sparsify/virt-sparsify.pod:45
24347 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24348 "(1 temporary copy + 1 destination image). This is in the worst case and "
24349 "usually much less space is required."
24353 #: ../sparsify/virt-sparsify.pod:51
24355 "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24359 #: ../sparsify/virt-sparsify.pod:56
24360 msgid "Virt-sparsify cannot handle encrypted disks."
24364 #: ../sparsify/virt-sparsify.pod:60
24366 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24367 "this space is often used for critical items like bootloaders so it's not "
24372 #: ../sparsify/virt-sparsify.pod:66
24374 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24375 "to do this unless we can be sure there is no hibernation data, so at the "
24376 "moment swap partitions are ignored."
24380 #: ../sparsify/virt-sparsify.pod:72
24382 "You may also want to read the manual pages for the associated tools L<virt-"
24383 "filesystems(1)> and L<virt-df(1)> before starting."
24387 #: ../sparsify/virt-sparsify.pod:77
24388 msgid "Typical usage is:"
24392 #: ../sparsify/virt-sparsify.pod:79
24395 " virt-sparsify indisk outdisk\n"
24400 #: ../sparsify/virt-sparsify.pod:81
24402 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24403 "is created, or overwritten if it already exists. The format of the input "
24404 "disk is detected (eg. qcow2) and the same format is used for the output disk."
24408 #: ../sparsify/virt-sparsify.pod:86
24409 msgid "To convert between formats, use the I<--convert> option:"
24413 #: ../sparsify/virt-sparsify.pod:88
24416 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24421 #: ../sparsify/virt-sparsify.pod:90
24423 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24424 "can find within the source disk image. You can get it to ignore (don't zero "
24425 "free space on) certain filesystems by doing:"
24429 #: ../sparsify/virt-sparsify.pod:94
24432 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24437 #: ../sparsify/virt-sparsify.pod:96
24439 "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24443 #: ../sparsify/virt-sparsify.pod:107
24444 msgid "B<--convert> raw"
24448 #: ../sparsify/virt-sparsify.pod:109
24449 msgid "B<--convert> qcow2"
24453 #: ../sparsify/virt-sparsify.pod:111
24454 msgid "B<--convert> [other formats]"
24458 #: ../sparsify/virt-sparsify.pod:113
24460 "Use C<output-format> as the format for the destination image. If this is "
24461 "not specified, then the input format is used."
24465 #: ../sparsify/virt-sparsify.pod:116
24466 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>."
24470 #: ../sparsify/virt-sparsify.pod:118
24472 "You can also use any format supported by the L<qemu-img(1)> program, eg. "
24473 "C<vdi> or C<vmdk>, but support for other formats is reliant on qemu."
24477 #: ../sparsify/virt-sparsify.pod:122
24479 "Specifying the I<--convert> option is usually a good idea, because then virt-"
24480 "sparsify doesn't need to try to guess the input format."
24484 #: ../sparsify/virt-sparsify.pod:127
24485 msgid "B<--format> qcow2"
24489 #: ../sparsify/virt-sparsify.pod:135
24490 msgid "B<--ignore> filesystem"
24494 #: ../sparsify/virt-sparsify.pod:137
24495 msgid "B<--ignore> volgroup"
24499 #: ../sparsify/virt-sparsify.pod:139
24501 "Ignore the named filesystem. Free space on the filesystem will not be "
24502 "zeroed, but existing blocks of zeroes will still be sparsified."
24506 #: ../sparsify/virt-sparsify.pod:142
24508 "In the second form, this ignores the named volume group. Use the volume "
24509 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24513 #: ../sparsify/virt-sparsify.pod:157
24514 msgid "This disables progress bars and other unnecessary output."
24518 #: ../sparsify/virt-sparsify.pod:179
24520 "The I<--machine-readable> option can be used to make the output more machine "
24521 "friendly, which is useful when calling virt-sparsify from other programs, "
24526 #: ../sparsify/virt-sparsify.pod:185
24528 "Firstly use the option on its own to query the capabilities of the virt-"
24529 "sparsify binary. Typical output looks like this:"
24533 #: ../sparsify/virt-sparsify.pod:188
24536 " $ virt-sparsify --machine-readable\n"
24544 #: ../sparsify/virt-sparsify.pod:218
24546 "The calling program should treat messages sent to stderr as error messages. "
24547 "In addition, virt-sparsify exits with a non-zero status code if there was a "
24552 #: ../sparsify/virt-sparsify.pod:224
24554 "All versions of virt-sparsify have supported the I<--machine-readable> "
24559 #: ../sparsify/virt-sparsify.pod:238
24561 "Location of the temporary directory used for the potentially large temporary "
24566 #: ../sparsify/virt-sparsify.pod:241
24568 "You should ensure there is enough free space in the worst case for a full "
24569 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24570 "to another directory that has enough space."
24574 #: ../sparsify/virt-sparsify.pod:245
24575 msgid "This defaults to C</tmp>."
24579 #: ../sparsify/virt-sparsify.pod:249
24581 "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24585 #: ../sparsify/virt-sparsify.pod:253
24587 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
24588 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, L<qemu-img"
24589 "(1)>, L<http://libguestfs.org/>."
24593 #: ../src/guestfs-actions.pod:1
24594 msgid "guestfs_add_cdrom"
24598 #: ../src/guestfs-actions.pod:3
24602 " guestfs_add_cdrom (guestfs_h *g,\n"
24603 " const char *filename);\n"
24608 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302
24609 #: ../src/guestfs-actions.pod:323
24611 "I<This function is deprecated.> In new code, use the L</"
24612 "guestfs_add_drive_opts> call instead."
24616 #: ../src/guestfs-actions.pod:24
24618 "This call checks for the existence of C<filename>. This stops you from "
24619 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24620 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
24625 #: ../src/guestfs-actions.pod:31
24627 "If you just want to add an ISO file (often you use this as an efficient way "
24628 "to transfer large files into the guest), then you should probably use "
24629 "C<guestfs_add_drive_ro> instead."
24633 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:187
24634 #: ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:291
24635 #: ../src/guestfs-actions.pod:312 ../src/guestfs-actions.pod:333
24636 #: ../src/guestfs-actions.pod:346 ../src/guestfs-actions.pod:360
24637 #: ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:500
24638 #: ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:559
24639 #: ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:605
24640 #: ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:705
24641 #: ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:734
24642 #: ../src/guestfs-actions.pod:833 ../src/guestfs-actions.pod:851
24643 #: ../src/guestfs-actions.pod:865 ../src/guestfs-actions.pod:879
24644 #: ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:1099
24645 #: ../src/guestfs-actions.pod:1119 ../src/guestfs-actions.pod:1137
24646 #: ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:1286
24647 #: ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:1372
24648 #: ../src/guestfs-actions.pod:1425 ../src/guestfs-actions.pod:1478
24649 #: ../src/guestfs-actions.pod:1536 ../src/guestfs-actions.pod:1590
24650 #: ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1623
24651 #: ../src/guestfs-actions.pod:1651 ../src/guestfs-actions.pod:1721
24652 #: ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:1777
24653 #: ../src/guestfs-actions.pod:1819 ../src/guestfs-actions.pod:1932
24654 #: ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2174
24655 #: ../src/guestfs-actions.pod:2196 ../src/guestfs-actions.pod:2283
24656 #: ../src/guestfs-actions.pod:2791 ../src/guestfs-actions.pod:2935
24657 #: ../src/guestfs-actions.pod:2996 ../src/guestfs-actions.pod:3031
24658 #: ../src/guestfs-actions.pod:4088 ../src/guestfs-actions.pod:4103
24659 #: ../src/guestfs-actions.pod:4128 ../src/guestfs-actions.pod:4317
24660 #: ../src/guestfs-actions.pod:4331 ../src/guestfs-actions.pod:4344
24661 #: ../src/guestfs-actions.pod:4358 ../src/guestfs-actions.pod:4373
24662 #: ../src/guestfs-actions.pod:4409 ../src/guestfs-actions.pod:4481
24663 #: ../src/guestfs-actions.pod:4501 ../src/guestfs-actions.pod:4518
24664 #: ../src/guestfs-actions.pod:4538 ../src/guestfs-actions.pod:4558
24665 #: ../src/guestfs-actions.pod:4593 ../src/guestfs-actions.pod:4612
24666 #: ../src/guestfs-actions.pod:4631 ../src/guestfs-actions.pod:4666
24667 #: ../src/guestfs-actions.pod:4678 ../src/guestfs-actions.pod:4711
24668 #: ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:4740
24669 #: ../src/guestfs-actions.pod:4755 ../src/guestfs-actions.pod:4772
24670 #: ../src/guestfs-actions.pod:4865 ../src/guestfs-actions.pod:4885
24671 #: ../src/guestfs-actions.pod:4898 ../src/guestfs-actions.pod:4949
24672 #: ../src/guestfs-actions.pod:4967 ../src/guestfs-actions.pod:4985
24673 #: ../src/guestfs-actions.pod:5001 ../src/guestfs-actions.pod:5015
24674 #: ../src/guestfs-actions.pod:5029 ../src/guestfs-actions.pod:5046
24675 #: ../src/guestfs-actions.pod:5061 ../src/guestfs-actions.pod:5088
24676 #: ../src/guestfs-actions.pod:5151 ../src/guestfs-actions.pod:5224
24677 #: ../src/guestfs-actions.pod:5255 ../src/guestfs-actions.pod:5274
24678 #: ../src/guestfs-actions.pod:5293 ../src/guestfs-actions.pod:5305
24679 #: ../src/guestfs-actions.pod:5322 ../src/guestfs-actions.pod:5335
24680 #: ../src/guestfs-actions.pod:5350 ../src/guestfs-actions.pod:5365
24681 #: ../src/guestfs-actions.pod:5397 ../src/guestfs-actions.pod:5423
24682 #: ../src/guestfs-actions.pod:5462 ../src/guestfs-actions.pod:5482
24683 #: ../src/guestfs-actions.pod:5496 ../src/guestfs-actions.pod:5513
24684 #: ../src/guestfs-actions.pod:5562 ../src/guestfs-actions.pod:5615
24685 #: ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5705
24686 #: ../src/guestfs-actions.pod:5733 ../src/guestfs-actions.pod:5750
24687 #: ../src/guestfs-actions.pod:5768 ../src/guestfs-actions.pod:5905
24688 #: ../src/guestfs-actions.pod:5962 ../src/guestfs-actions.pod:5984
24689 #: ../src/guestfs-actions.pod:6002 ../src/guestfs-actions.pod:6054
24690 #: ../src/guestfs-actions.pod:6120 ../src/guestfs-actions.pod:6137
24691 #: ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6164
24692 #: ../src/guestfs-actions.pod:6453 ../src/guestfs-actions.pod:6472
24693 #: ../src/guestfs-actions.pod:6491 ../src/guestfs-actions.pod:6505
24694 #: ../src/guestfs-actions.pod:6517 ../src/guestfs-actions.pod:6531
24695 #: ../src/guestfs-actions.pod:6543 ../src/guestfs-actions.pod:6557
24696 #: ../src/guestfs-actions.pod:6573 ../src/guestfs-actions.pod:6591
24697 #: ../src/guestfs-actions.pod:6610 ../src/guestfs-actions.pod:6629
24698 #: ../src/guestfs-actions.pod:6659 ../src/guestfs-actions.pod:6677
24699 #: ../src/guestfs-actions.pod:6700 ../src/guestfs-actions.pod:6718
24700 #: ../src/guestfs-actions.pod:6737 ../src/guestfs-actions.pod:6758
24701 #: ../src/guestfs-actions.pod:6777 ../src/guestfs-actions.pod:6794
24702 #: ../src/guestfs-actions.pod:6813 ../src/guestfs-actions.pod:6841
24703 #: ../src/guestfs-actions.pod:6865 ../src/guestfs-actions.pod:6884
24704 #: ../src/guestfs-actions.pod:6900 ../src/guestfs-actions.pod:6924
24705 #: ../src/guestfs-actions.pod:6943 ../src/guestfs-actions.pod:6958
24706 #: ../src/guestfs-actions.pod:6977 ../src/guestfs-actions.pod:7021
24707 #: ../src/guestfs-actions.pod:7048 ../src/guestfs-actions.pod:7078
24708 #: ../src/guestfs-actions.pod:7190 ../src/guestfs-actions.pod:7311
24709 #: ../src/guestfs-actions.pod:7323 ../src/guestfs-actions.pod:7336
24710 #: ../src/guestfs-actions.pod:7349 ../src/guestfs-actions.pod:7371
24711 #: ../src/guestfs-actions.pod:7384 ../src/guestfs-actions.pod:7397
24712 #: ../src/guestfs-actions.pod:7410 ../src/guestfs-actions.pod:7425
24713 #: ../src/guestfs-actions.pod:7484 ../src/guestfs-actions.pod:7501
24714 #: ../src/guestfs-actions.pod:7517 ../src/guestfs-actions.pod:7533
24715 #: ../src/guestfs-actions.pod:7550 ../src/guestfs-actions.pod:7563
24716 #: ../src/guestfs-actions.pod:7583 ../src/guestfs-actions.pod:7619
24717 #: ../src/guestfs-actions.pod:7633 ../src/guestfs-actions.pod:7674
24718 #: ../src/guestfs-actions.pod:7687 ../src/guestfs-actions.pod:7705
24719 #: ../src/guestfs-actions.pod:7739 ../src/guestfs-actions.pod:7775
24720 #: ../src/guestfs-actions.pod:7891 ../src/guestfs-actions.pod:7906
24721 #: ../src/guestfs-actions.pod:7920 ../src/guestfs-actions.pod:7975
24722 #: ../src/guestfs-actions.pod:7988 ../src/guestfs-actions.pod:8033
24723 #: ../src/guestfs-actions.pod:8073 ../src/guestfs-actions.pod:8129
24724 #: ../src/guestfs-actions.pod:8149 ../src/guestfs-actions.pod:8182
24725 #: ../src/guestfs-actions.pod:8246 ../src/guestfs-actions.pod:8269
24726 #: ../src/guestfs-actions.pod:8295
24727 msgid "This function returns 0 on success or -1 on error."
24731 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189
24732 #: ../src/guestfs-actions.pod:1334 ../src/guestfs-actions.pod:2397
24733 #: ../src/guestfs-actions.pod:2495 ../src/guestfs-actions.pod:2620
24734 #: ../src/guestfs-actions.pod:4090 ../src/guestfs-actions.pod:4110
24735 #: ../src/guestfs-actions.pod:5399 ../src/guestfs-actions.pod:6679
24736 #: ../src/guestfs-actions.pod:6796 ../src/guestfs-actions.pod:6945
24737 #: ../src/guestfs-actions.pod:7427 ../src/guestfs-actions.pod:7552
24738 #: ../src/guestfs-actions.pod:8075
24739 msgid "(Added in 0.3)"
24743 #: ../src/guestfs-actions.pod:41
24744 msgid "guestfs_add_domain"
24748 #: ../src/guestfs-actions.pod:43
24752 " guestfs_add_domain (guestfs_h *g,\n"
24753 " const char *dom,\n"
24759 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198
24760 #: ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:1214
24761 #: ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1344
24762 #: ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1466
24763 #: ../src/guestfs-actions.pod:1519 ../src/guestfs-actions.pod:3288
24764 #: ../src/guestfs-actions.pod:5100 ../src/guestfs-actions.pod:5409
24765 #: ../src/guestfs-actions.pod:5626
24767 "You may supply a list of optional arguments to this call. Use zero or more "
24768 "of the following pairs of parameters, and terminate the list with C<-1> on "
24769 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
24773 #: ../src/guestfs-actions.pod:53
24776 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
24777 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
24778 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
24779 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
24780 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
24781 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
24786 #: ../src/guestfs-actions.pod:60
24788 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24789 "It works by connecting to libvirt, requesting the domain and domain XML from "
24790 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
24795 #: ../src/guestfs-actions.pod:141
24797 "The other optional parameters are passed directly through to "
24798 "C<guestfs_add_drive_opts>."
24802 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403
24803 #: ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:751
24804 #: ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800
24805 #: ../src/guestfs-actions.pod:819 ../src/guestfs-actions.pod:1797
24806 #: ../src/guestfs-actions.pod:2153 ../src/guestfs-actions.pod:2356
24807 #: ../src/guestfs-actions.pod:2467 ../src/guestfs-actions.pod:2518
24808 #: ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2584
24809 #: ../src/guestfs-actions.pod:2607 ../src/guestfs-actions.pod:2922
24810 #: ../src/guestfs-actions.pod:3406 ../src/guestfs-actions.pod:3424
24811 #: ../src/guestfs-actions.pod:5585 ../src/guestfs-actions.pod:5802
24812 #: ../src/guestfs-actions.pod:6040 ../src/guestfs-actions.pod:6234
24813 #: ../src/guestfs-actions.pod:6260 ../src/guestfs-actions.pod:7660
24814 #: ../src/guestfs-actions.pod:8086 ../src/guestfs-actions.pod:8099
24815 #: ../src/guestfs-actions.pod:8112
24816 msgid "On error this function returns -1."
24820 #: ../src/guestfs-actions.pod:146
24821 msgid "(Added in 1.7.4)"
24825 #: ../src/guestfs-actions.pod:148
24826 msgid "guestfs_add_domain_va"
24830 #: ../src/guestfs-actions.pod:150
24834 " guestfs_add_domain_va (guestfs_h *g,\n"
24835 " const char *dom,\n"
24836 " va_list args);\n"
24841 #: ../src/guestfs-actions.pod:155
24842 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
24846 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168
24847 #: ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278
24848 #: ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:940
24849 #: ../src/guestfs-actions.pod:1242 ../src/guestfs-actions.pod:1255
24850 #: ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1314
24851 #: ../src/guestfs-actions.pod:1391 ../src/guestfs-actions.pod:1403
24852 #: ../src/guestfs-actions.pod:1444 ../src/guestfs-actions.pod:1456
24853 #: ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1509
24854 #: ../src/guestfs-actions.pod:1555 ../src/guestfs-actions.pod:1567
24855 #: ../src/guestfs-actions.pod:3372 ../src/guestfs-actions.pod:3384
24856 #: ../src/guestfs-actions.pod:5165 ../src/guestfs-actions.pod:5177
24857 #: ../src/guestfs-actions.pod:5437 ../src/guestfs-actions.pod:5449
24858 #: ../src/guestfs-actions.pod:5675 ../src/guestfs-actions.pod:5686
24859 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
24863 #: ../src/guestfs-actions.pod:159
24864 msgid "guestfs_add_domain_argv"
24868 #: ../src/guestfs-actions.pod:161
24872 " guestfs_add_domain_argv (guestfs_h *g,\n"
24873 " const char *dom,\n"
24874 " const struct guestfs_add_domain_argv *optargs);\n"
24879 #: ../src/guestfs-actions.pod:166
24880 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
24884 #: ../src/guestfs-actions.pod:170
24885 msgid "guestfs_add_drive"
24889 #: ../src/guestfs-actions.pod:172
24893 " guestfs_add_drive (guestfs_h *g,\n"
24894 " const char *filename);\n"
24899 #: ../src/guestfs-actions.pod:176
24901 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
24902 "optional parameters, so the disk is added writable, with the format being "
24903 "detected automatically."
24907 #: ../src/guestfs-actions.pod:180
24909 "Automatic detection of the format opens you up to a potential security hole "
24910 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24911 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24912 "you should think about replacing calls to this function with calls to "
24913 "C<guestfs_add_drive_opts>, and specifying the format."
24917 #: ../src/guestfs-actions.pod:191
24918 msgid "guestfs_add_drive_opts"
24922 #: ../src/guestfs-actions.pod:193
24926 " guestfs_add_drive_opts (guestfs_h *g,\n"
24927 " const char *filename,\n"
24933 #: ../src/guestfs-actions.pod:203
24936 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
24937 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
24938 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
24939 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
24944 #: ../src/guestfs-actions.pod:233
24946 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
24947 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
24948 "Possible formats include C<raw> and C<qcow2>."
24952 #: ../src/guestfs-actions.pod:244
24954 "This rarely-used option lets you emulate the behaviour of the deprecated "
24955 "C<guestfs_add_drive_with_if> call (q.v.)"
24959 #: ../src/guestfs-actions.pod:256
24960 msgid "(Added in 1.5.23)"
24964 #: ../src/guestfs-actions.pod:258
24965 msgid "guestfs_add_drive_opts_va"
24969 #: ../src/guestfs-actions.pod:260
24973 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
24974 " const char *filename,\n"
24975 " va_list args);\n"
24980 #: ../src/guestfs-actions.pod:265
24981 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
24985 #: ../src/guestfs-actions.pod:269
24986 msgid "guestfs_add_drive_opts_argv"
24990 #: ../src/guestfs-actions.pod:271
24994 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
24995 " const char *filename,\n"
24996 " const struct guestfs_add_drive_opts_argv *optargs);\n"
25001 #: ../src/guestfs-actions.pod:276
25002 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
25006 #: ../src/guestfs-actions.pod:280
25007 msgid "guestfs_add_drive_ro"
25011 #: ../src/guestfs-actions.pod:282
25015 " guestfs_add_drive_ro (guestfs_h *g,\n"
25016 " const char *filename);\n"
25021 #: ../src/guestfs-actions.pod:286
25023 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
25024 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
25025 "disk is added read-only, with the format being detected automatically."
25029 #: ../src/guestfs-actions.pod:293
25030 msgid "(Added in 1.0.38)"
25034 #: ../src/guestfs-actions.pod:295
25035 msgid "guestfs_add_drive_ro_with_if"
25039 #: ../src/guestfs-actions.pod:297
25043 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
25044 " const char *filename,\n"
25045 " const char *iface);\n"
25050 #: ../src/guestfs-actions.pod:309
25052 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
25053 "QEMU interface emulation to use at run time."
25057 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335
25058 #: ../src/guestfs-actions.pod:2881
25059 msgid "(Added in 1.0.84)"
25063 #: ../src/guestfs-actions.pod:316
25064 msgid "guestfs_add_drive_with_if"
25068 #: ../src/guestfs-actions.pod:318
25072 " guestfs_add_drive_with_if (guestfs_h *g,\n"
25073 " const char *filename,\n"
25074 " const char *iface);\n"
25079 #: ../src/guestfs-actions.pod:330
25081 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
25082 "QEMU interface emulation to use at run time."
25086 #: ../src/guestfs-actions.pod:337
25087 msgid "guestfs_aug_clear"
25091 #: ../src/guestfs-actions.pod:339
25095 " guestfs_aug_clear (guestfs_h *g,\n"
25096 " const char *augpath);\n"
25101 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2609
25102 msgid "(Added in 1.3.4)"
25106 #: ../src/guestfs-actions.pod:350
25107 msgid "guestfs_aug_close"
25111 #: ../src/guestfs-actions.pod:352
25115 " guestfs_aug_close (guestfs_h *g);\n"
25120 #: ../src/guestfs-actions.pod:355
25122 "Close the current Augeas handle and free up any resources used by it. After "
25123 "calling this, you have to call C<guestfs_aug_init> again before you can use "
25124 "any other Augeas functions."
25128 #: ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:387
25129 #: ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:419
25130 #: ../src/guestfs-actions.pod:482 ../src/guestfs-actions.pod:502
25131 #: ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:547
25132 #: ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:575
25133 #: ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:607
25134 #: ../src/guestfs-actions.pod:6311
25135 msgid "(Added in 0.7)"
25139 #: ../src/guestfs-actions.pod:364
25140 msgid "guestfs_aug_defnode"
25144 #: ../src/guestfs-actions.pod:366
25147 " struct guestfs_int_bool *\n"
25148 " guestfs_aug_defnode (guestfs_h *g,\n"
25149 " const char *name,\n"
25150 " const char *expr,\n"
25151 " const char *val);\n"
25156 #: ../src/guestfs-actions.pod:375
25158 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25159 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25160 "containing that single node."
25164 #: ../src/guestfs-actions.pod:383
25166 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25167 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25171 #: ../src/guestfs-actions.pod:389
25172 msgid "guestfs_aug_defvar"
25176 #: ../src/guestfs-actions.pod:391
25180 " guestfs_aug_defvar (guestfs_h *g,\n"
25181 " const char *name,\n"
25182 " const char *expr);\n"
25187 #: ../src/guestfs-actions.pod:407
25188 msgid "guestfs_aug_get"
25192 #: ../src/guestfs-actions.pod:409
25196 " guestfs_aug_get (guestfs_h *g,\n"
25197 " const char *augpath);\n"
25202 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:980
25203 #: ../src/guestfs-actions.pod:998 ../src/guestfs-actions.pod:1058
25204 #: ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1177
25205 #: ../src/guestfs-actions.pod:1666 ../src/guestfs-actions.pod:1683
25206 #: ../src/guestfs-actions.pod:1702 ../src/guestfs-actions.pod:1836
25207 #: ../src/guestfs-actions.pod:2024 ../src/guestfs-actions.pod:2136
25208 #: ../src/guestfs-actions.pod:2299 ../src/guestfs-actions.pod:2316
25209 #: ../src/guestfs-actions.pod:2383 ../src/guestfs-actions.pod:2426
25210 #: ../src/guestfs-actions.pod:2447 ../src/guestfs-actions.pod:2632
25211 #: ../src/guestfs-actions.pod:2846 ../src/guestfs-actions.pod:3050
25212 #: ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3256
25213 #: ../src/guestfs-actions.pod:3275 ../src/guestfs-actions.pod:3490
25214 #: ../src/guestfs-actions.pod:3518 ../src/guestfs-actions.pod:3539
25215 #: ../src/guestfs-actions.pod:3573 ../src/guestfs-actions.pod:3636
25216 #: ../src/guestfs-actions.pod:3656 ../src/guestfs-actions.pod:3676
25217 #: ../src/guestfs-actions.pod:4303 ../src/guestfs-actions.pod:4650
25218 #: ../src/guestfs-actions.pod:4817 ../src/guestfs-actions.pod:4927
25219 #: ../src/guestfs-actions.pod:5820 ../src/guestfs-actions.pod:6021
25220 #: ../src/guestfs-actions.pod:6209 ../src/guestfs-actions.pod:6387
25221 #: ../src/guestfs-actions.pod:6436 ../src/guestfs-actions.pod:7096
25222 #: ../src/guestfs-actions.pod:7112 ../src/guestfs-actions.pod:7136
25223 #: ../src/guestfs-actions.pod:7160 ../src/guestfs-actions.pod:7834
25224 #: ../src/guestfs-actions.pod:7853 ../src/guestfs-actions.pod:7871
25225 #: ../src/guestfs-actions.pod:8045 ../src/guestfs-actions.pod:8359
25227 "This function returns a string, or NULL on error. I<The caller must free "
25228 "the returned string after use>."
25232 #: ../src/guestfs-actions.pod:421
25233 msgid "guestfs_aug_init"
25237 #: ../src/guestfs-actions.pod:423
25241 " guestfs_aug_init (guestfs_h *g,\n"
25242 " const char *root,\n"
25248 #: ../src/guestfs-actions.pod:432
25249 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25253 #: ../src/guestfs-actions.pod:457
25255 "This option is only useful when debugging Augeas lenses. Use of this option "
25256 "may require additional memory for the libguestfs appliance. You may need to "
25257 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25258 "C<guestfs_set_memsize>."
25262 #: ../src/guestfs-actions.pod:472
25263 msgid "Do not load the tree in C<guestfs_aug_init>."
25267 #: ../src/guestfs-actions.pod:476
25268 msgid "To close the handle, you can call C<guestfs_aug_close>."
25272 #: ../src/guestfs-actions.pod:484
25273 msgid "guestfs_aug_insert"
25277 #: ../src/guestfs-actions.pod:486
25281 " guestfs_aug_insert (guestfs_h *g,\n"
25282 " const char *augpath,\n"
25283 " const char *label,\n"
25289 #: ../src/guestfs-actions.pod:504
25290 msgid "guestfs_aug_load"
25294 #: ../src/guestfs-actions.pod:506
25298 " guestfs_aug_load (guestfs_h *g);\n"
25303 #: ../src/guestfs-actions.pod:518
25304 msgid "guestfs_aug_ls"
25308 #: ../src/guestfs-actions.pod:520
25312 " guestfs_aug_ls (guestfs_h *g,\n"
25313 " const char *augpath);\n"
25318 #: ../src/guestfs-actions.pod:524
25320 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25321 "sorting the resulting nodes into alphabetical order."
25325 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543
25326 #: ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1196
25327 #: ../src/guestfs-actions.pod:1851 ../src/guestfs-actions.pod:1870
25328 #: ../src/guestfs-actions.pod:1973 ../src/guestfs-actions.pod:1992
25329 #: ../src/guestfs-actions.pod:2238 ../src/guestfs-actions.pod:2704
25330 #: ../src/guestfs-actions.pod:2720 ../src/guestfs-actions.pod:2739
25331 #: ../src/guestfs-actions.pod:2804 ../src/guestfs-actions.pod:2828
25332 #: ../src/guestfs-actions.pod:2899 ../src/guestfs-actions.pod:2948
25333 #: ../src/guestfs-actions.pod:3217 ../src/guestfs-actions.pod:3592
25334 #: ../src/guestfs-actions.pod:3872 ../src/guestfs-actions.pod:4186
25335 #: ../src/guestfs-actions.pod:4203 ../src/guestfs-actions.pod:4223
25336 #: ../src/guestfs-actions.pod:4285 ../src/guestfs-actions.pod:4390
25337 #: ../src/guestfs-actions.pod:4789 ../src/guestfs-actions.pod:5546
25338 #: ../src/guestfs-actions.pod:6181 ../src/guestfs-actions.pod:6307
25339 #: ../src/guestfs-actions.pod:6421 ../src/guestfs-actions.pod:7176
25340 #: ../src/guestfs-actions.pod:7237 ../src/guestfs-actions.pod:7292
25341 #: ../src/guestfs-actions.pod:7438 ../src/guestfs-actions.pod:7462
25342 #: ../src/guestfs-actions.pod:7938 ../src/guestfs-actions.pod:7958
25343 #: ../src/guestfs-actions.pod:8005 ../src/guestfs-actions.pod:8199
25344 #: ../src/guestfs-actions.pod:8218 ../src/guestfs-actions.pod:8309
25345 #: ../src/guestfs-actions.pod:8328 ../src/guestfs-actions.pod:8374
25346 #: ../src/guestfs-actions.pod:8393
25348 "This function returns a NULL-terminated array of strings (like L<environ(3)"
25349 ">), or NULL if there was an error. I<The caller must free the strings and "
25350 "the array after use>."
25354 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1121
25355 #: ../src/guestfs-actions.pod:1139 ../src/guestfs-actions.pod:1908
25356 #: ../src/guestfs-actions.pod:3950 ../src/guestfs-actions.pod:3981
25357 #: ../src/guestfs-actions.pod:4633 ../src/guestfs-actions.pod:4680
25358 #: ../src/guestfs-actions.pod:4867 ../src/guestfs-actions.pod:4900
25359 #: ../src/guestfs-actions.pod:5063 ../src/guestfs-actions.pod:5550
25360 #: ../src/guestfs-actions.pod:6122 ../src/guestfs-actions.pod:6519
25361 #: ../src/guestfs-actions.pod:6533 ../src/guestfs-actions.pod:6545
25362 #: ../src/guestfs-actions.pod:7023 ../src/guestfs-actions.pod:7676
25363 #: ../src/guestfs-actions.pod:7689 ../src/guestfs-actions.pod:7922
25364 #: ../src/guestfs-actions.pod:8187
25365 msgid "(Added in 0.8)"
25369 #: ../src/guestfs-actions.pod:533
25370 msgid "guestfs_aug_match"
25374 #: ../src/guestfs-actions.pod:535
25378 " guestfs_aug_match (guestfs_h *g,\n"
25379 " const char *augpath);\n"
25384 #: ../src/guestfs-actions.pod:549
25385 msgid "guestfs_aug_mv"
25389 #: ../src/guestfs-actions.pod:551
25393 " guestfs_aug_mv (guestfs_h *g,\n"
25394 " const char *src,\n"
25395 " const char *dest);\n"
25400 #: ../src/guestfs-actions.pod:563
25401 msgid "guestfs_aug_rm"
25405 #: ../src/guestfs-actions.pod:565
25409 " guestfs_aug_rm (guestfs_h *g,\n"
25410 " const char *augpath);\n"
25415 #: ../src/guestfs-actions.pod:577
25416 msgid "guestfs_aug_save"
25420 #: ../src/guestfs-actions.pod:579
25424 " guestfs_aug_save (guestfs_h *g);\n"
25429 #: ../src/guestfs-actions.pod:584
25431 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25436 #: ../src/guestfs-actions.pod:591
25437 msgid "guestfs_aug_set"
25441 #: ../src/guestfs-actions.pod:593
25445 " guestfs_aug_set (guestfs_h *g,\n"
25446 " const char *augpath,\n"
25447 " const char *val);\n"
25452 #: ../src/guestfs-actions.pod:600
25454 "In the Augeas API, it is possible to clear a node by setting the value to "
25455 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25456 "this call. Instead you must use the C<guestfs_aug_clear> call."
25460 #: ../src/guestfs-actions.pod:609
25461 msgid "guestfs_available"
25465 #: ../src/guestfs-actions.pod:611
25469 " guestfs_available (guestfs_h *g,\n"
25470 " char *const *groups);\n"
25475 #: ../src/guestfs-actions.pod:619
25477 "The libguestfs groups, and the functions that those groups correspond to, "
25478 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25479 "runtime by calling C<guestfs_available_all_groups>."
25483 #: ../src/guestfs-actions.pod:643
25484 msgid "You must call C<guestfs_launch> before calling this function."
25488 #: ../src/guestfs-actions.pod:665
25490 "This call was added in version C<1.0.80>. In previous versions of "
25491 "libguestfs all you could do would be to speculatively execute a command to "
25492 "find out if the daemon implemented it. See also C<guestfs_version>."
25496 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1653
25497 msgid "(Added in 1.0.80)"
25501 #: ../src/guestfs-actions.pod:676
25502 msgid "guestfs_available_all_groups"
25506 #: ../src/guestfs-actions.pod:678
25510 " guestfs_available_all_groups (guestfs_h *g);\n"
25515 #: ../src/guestfs-actions.pod:681
25517 "This command returns a list of all optional groups that this daemon knows "
25518 "about. Note this returns both supported and unsupported groups. To find "
25519 "out which ones the daemon can actually support you have to call "
25520 "C<guestfs_available> on each member of the returned list."
25524 #: ../src/guestfs-actions.pod:687
25525 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25529 #: ../src/guestfs-actions.pod:693
25530 msgid "(Added in 1.3.15)"
25534 #: ../src/guestfs-actions.pod:695
25535 msgid "guestfs_base64_in"
25539 #: ../src/guestfs-actions.pod:697
25543 " guestfs_base64_in (guestfs_h *g,\n"
25544 " const char *base64file,\n"
25545 " const char *filename);\n"
25550 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25551 msgid "(Added in 1.3.5)"
25555 #: ../src/guestfs-actions.pod:709
25556 msgid "guestfs_base64_out"
25560 #: ../src/guestfs-actions.pod:711
25564 " guestfs_base64_out (guestfs_h *g,\n"
25565 " const char *filename,\n"
25566 " const char *base64file);\n"
25571 #: ../src/guestfs-actions.pod:723
25572 msgid "guestfs_blockdev_flushbufs"
25576 #: ../src/guestfs-actions.pod:725
25580 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25581 " const char *device);\n"
25586 #: ../src/guestfs-actions.pod:736 ../src/guestfs-actions.pod:753
25587 #: ../src/guestfs-actions.pod:768 ../src/guestfs-actions.pod:784
25588 #: ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:821
25589 #: ../src/guestfs-actions.pod:835 ../src/guestfs-actions.pod:853
25590 #: ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:881
25591 msgid "(Added in 0.9.3)"
25595 #: ../src/guestfs-actions.pod:738
25596 msgid "guestfs_blockdev_getbsz"
25600 #: ../src/guestfs-actions.pod:740
25604 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25605 " const char *device);\n"
25610 #: ../src/guestfs-actions.pod:755
25611 msgid "guestfs_blockdev_getro"
25615 #: ../src/guestfs-actions.pod:757
25619 " guestfs_blockdev_getro (guestfs_h *g,\n"
25620 " const char *device);\n"
25625 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1891
25626 #: ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:2395
25627 #: ../src/guestfs-actions.pod:2406 ../src/guestfs-actions.pod:2478
25628 #: ../src/guestfs-actions.pod:2504 ../src/guestfs-actions.pod:2544
25629 #: ../src/guestfs-actions.pod:2559 ../src/guestfs-actions.pod:2595
25630 #: ../src/guestfs-actions.pod:2618 ../src/guestfs-actions.pod:3693
25631 #: ../src/guestfs-actions.pod:3709 ../src/guestfs-actions.pod:3727
25632 #: ../src/guestfs-actions.pod:3889 ../src/guestfs-actions.pod:3903
25633 #: ../src/guestfs-actions.pod:3918 ../src/guestfs-actions.pod:3932
25634 #: ../src/guestfs-actions.pod:3948 ../src/guestfs-actions.pod:3963
25635 #: ../src/guestfs-actions.pod:3979 ../src/guestfs-actions.pod:3993
25636 #: ../src/guestfs-actions.pod:4006 ../src/guestfs-actions.pod:4020
25637 #: ../src/guestfs-actions.pod:4035 ../src/guestfs-actions.pod:4050
25638 #: ../src/guestfs-actions.pod:4063 ../src/guestfs-actions.pod:4077
25639 #: ../src/guestfs-actions.pod:5784
25640 msgid "This function returns a C truth value on success or -1 on error."
25644 #: ../src/guestfs-actions.pod:770
25645 msgid "guestfs_blockdev_getsize64"
25649 #: ../src/guestfs-actions.pod:772
25653 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25654 " const char *device);\n"
25659 #: ../src/guestfs-actions.pod:778
25660 msgid "See also C<guestfs_blockdev_getsz>."
25664 #: ../src/guestfs-actions.pod:786
25665 msgid "guestfs_blockdev_getss"
25669 #: ../src/guestfs-actions.pod:788
25673 " guestfs_blockdev_getss (guestfs_h *g,\n"
25674 " const char *device);\n"
25679 #: ../src/guestfs-actions.pod:795
25681 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25686 #: ../src/guestfs-actions.pod:804
25687 msgid "guestfs_blockdev_getsz"
25691 #: ../src/guestfs-actions.pod:806
25695 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25696 " const char *device);\n"
25701 #: ../src/guestfs-actions.pod:813
25703 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25704 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25708 #: ../src/guestfs-actions.pod:823
25709 msgid "guestfs_blockdev_rereadpt"
25713 #: ../src/guestfs-actions.pod:825
25717 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25718 " const char *device);\n"
25723 #: ../src/guestfs-actions.pod:837
25724 msgid "guestfs_blockdev_setbsz"
25728 #: ../src/guestfs-actions.pod:839
25732 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25733 " const char *device,\n"
25734 " int blocksize);\n"
25739 #: ../src/guestfs-actions.pod:855
25740 msgid "guestfs_blockdev_setro"
25744 #: ../src/guestfs-actions.pod:857
25748 " guestfs_blockdev_setro (guestfs_h *g,\n"
25749 " const char *device);\n"
25754 #: ../src/guestfs-actions.pod:869
25755 msgid "guestfs_blockdev_setrw"
25759 #: ../src/guestfs-actions.pod:871
25763 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25764 " const char *device);\n"
25769 #: ../src/guestfs-actions.pod:883
25770 msgid "guestfs_btrfs_filesystem_resize"
25774 #: ../src/guestfs-actions.pod:885
25778 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25779 " const char *mountpoint,\n"
25785 #: ../src/guestfs-actions.pod:895
25788 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25793 #: ../src/guestfs-actions.pod:918
25794 msgid "(Added in 1.11.17)"
25798 #: ../src/guestfs-actions.pod:920
25799 msgid "guestfs_btrfs_filesystem_resize_va"
25803 #: ../src/guestfs-actions.pod:922
25807 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
25808 " const char *mountpoint,\n"
25809 " va_list args);\n"
25814 #: ../src/guestfs-actions.pod:927
25815 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
25819 #: ../src/guestfs-actions.pod:931
25820 msgid "guestfs_btrfs_filesystem_resize_argv"
25824 #: ../src/guestfs-actions.pod:933
25828 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
25829 " const char *mountpoint,\n"
25830 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
25835 #: ../src/guestfs-actions.pod:938
25836 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
25840 #: ../src/guestfs-actions.pod:942
25841 msgid "guestfs_case_sensitive_path"
25845 #: ../src/guestfs-actions.pod:944
25849 " guestfs_case_sensitive_path (guestfs_h *g,\n"
25850 " const char *path);\n"
25855 #: ../src/guestfs-actions.pod:970
25857 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
25858 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
25859 "how the directories were originally created under Windows)."
25863 #: ../src/guestfs-actions.pod:978
25864 msgid "See also C<guestfs_realpath>."
25868 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:7856
25869 msgid "(Added in 1.0.75)"
25873 #: ../src/guestfs-actions.pod:985
25874 msgid "guestfs_cat"
25878 #: ../src/guestfs-actions.pod:987
25882 " guestfs_cat (guestfs_h *g,\n"
25883 " const char *path);\n"
25888 #: ../src/guestfs-actions.pod:993
25890 "Note that this function cannot correctly handle binary files (specifically, "
25891 "files containing C<\\0> character which is treated as end of string). For "
25892 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
25893 "functions which have a more complex interface."
25897 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4207
25898 #: ../src/guestfs-actions.pod:4289 ../src/guestfs-actions.pod:4306
25899 #: ../src/guestfs-actions.pod:4394 ../src/guestfs-actions.pod:4793
25900 #: ../src/guestfs-actions.pod:4807 ../src/guestfs-actions.pod:6185
25901 #: ../src/guestfs-actions.pod:6199 ../src/guestfs-actions.pod:8009
25902 #: ../src/guestfs-actions.pod:8023
25903 msgid "(Added in 0.4)"
25907 #: ../src/guestfs-actions.pod:1006
25908 msgid "guestfs_checksum"
25912 #: ../src/guestfs-actions.pod:1008
25916 " guestfs_checksum (guestfs_h *g,\n"
25917 " const char *csumtype,\n"
25918 " const char *path);\n"
25923 #: ../src/guestfs-actions.pod:1054
25924 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
25928 #: ../src/guestfs-actions.pod:1056
25929 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
25933 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1728
25934 #: ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:3905
25935 #: ../src/guestfs-actions.pod:3934 ../src/guestfs-actions.pod:3995
25936 #: ../src/guestfs-actions.pod:4022 ../src/guestfs-actions.pod:7712
25937 msgid "(Added in 1.0.2)"
25941 #: ../src/guestfs-actions.pod:1063
25942 msgid "guestfs_checksum_device"
25946 #: ../src/guestfs-actions.pod:1065
25950 " guestfs_checksum_device (guestfs_h *g,\n"
25951 " const char *csumtype,\n"
25952 " const char *device);\n"
25957 #: ../src/guestfs-actions.pod:1070
25959 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25960 "device named C<device>. For the types of checksums supported see the "
25961 "C<guestfs_checksum> command."
25965 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5617
25966 #: ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5786
25967 #: ../src/guestfs-actions.pod:5804 ../src/guestfs-actions.pod:5986
25968 #: ../src/guestfs-actions.pod:7621 ../src/guestfs-actions.pod:7635
25969 #: ../src/guestfs-actions.pod:8035
25970 msgid "(Added in 1.3.2)"
25974 #: ../src/guestfs-actions.pod:1079
25975 msgid "guestfs_checksums_out"
25979 #: ../src/guestfs-actions.pod:1081
25983 " guestfs_checksums_out (guestfs_h *g,\n"
25984 " const char *csumtype,\n"
25985 " const char *directory,\n"
25986 " const char *sumsfile);\n"
25991 #: ../src/guestfs-actions.pod:1101
25992 msgid "(Added in 1.3.7)"
25996 #: ../src/guestfs-actions.pod:1103
25997 msgid "guestfs_chmod"
26001 #: ../src/guestfs-actions.pod:1105
26005 " guestfs_chmod (guestfs_h *g,\n"
26007 " const char *path);\n"
26012 #: ../src/guestfs-actions.pod:1123
26013 msgid "guestfs_chown"
26017 #: ../src/guestfs-actions.pod:1125
26021 " guestfs_chown (guestfs_h *g,\n"
26024 " const char *path);\n"
26029 #: ../src/guestfs-actions.pod:1141
26030 msgid "guestfs_command"
26034 #: ../src/guestfs-actions.pod:1143
26038 " guestfs_command (guestfs_h *g,\n"
26039 " char *const *arguments);\n"
26044 #: ../src/guestfs-actions.pod:1152
26046 "The single parameter is an argv-style list of arguments. The first element "
26047 "is the name of the program to run. Subsequent elements are parameters. The "
26048 "list must be non-empty (ie. must contain a program name). Note that the "
26049 "command runs directly, and is I<not> invoked via the shell (see "
26054 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203
26055 #: ../src/guestfs-actions.pod:2027
26056 msgid "(Added in 0.9.1)"
26060 #: ../src/guestfs-actions.pod:1185
26061 msgid "guestfs_command_lines"
26065 #: ../src/guestfs-actions.pod:1187
26069 " guestfs_command_lines (guestfs_h *g,\n"
26070 " char *const *arguments);\n"
26075 #: ../src/guestfs-actions.pod:1191
26077 "This is the same as C<guestfs_command>, but splits the result into a list of "
26082 #: ../src/guestfs-actions.pod:1194
26083 msgid "See also: C<guestfs_sh_lines>"
26087 #: ../src/guestfs-actions.pod:1205
26088 msgid "guestfs_compress_device_out"
26092 #: ../src/guestfs-actions.pod:1207
26096 " guestfs_compress_device_out (guestfs_h *g,\n"
26097 " const char *ctype,\n"
26098 " const char *device,\n"
26099 " const char *zdevice,\n"
26105 #: ../src/guestfs-actions.pod:1219
26108 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
26113 #: ../src/guestfs-actions.pod:1224
26115 "The C<ctype> and optional C<level> parameters have the same meaning as in "
26116 "C<guestfs_compress_out>."
26120 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288
26121 #: ../src/guestfs-actions.pod:2572 ../src/guestfs-actions.pod:6902
26122 msgid "(Added in 1.13.15)"
26126 #: ../src/guestfs-actions.pod:1231
26127 msgid "guestfs_compress_device_out_va"
26131 #: ../src/guestfs-actions.pod:1233
26135 " guestfs_compress_device_out_va (guestfs_h *g,\n"
26136 " const char *ctype,\n"
26137 " const char *device,\n"
26138 " const char *zdevice,\n"
26139 " va_list args);\n"
26144 #: ../src/guestfs-actions.pod:1240
26145 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
26149 #: ../src/guestfs-actions.pod:1244
26150 msgid "guestfs_compress_device_out_argv"
26154 #: ../src/guestfs-actions.pod:1246
26158 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
26159 " const char *ctype,\n"
26160 " const char *device,\n"
26161 " const char *zdevice,\n"
26162 " const struct guestfs_compress_device_out_argv *optargs);\n"
26167 #: ../src/guestfs-actions.pod:1253
26168 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
26172 #: ../src/guestfs-actions.pod:1257
26173 msgid "guestfs_compress_out"
26177 #: ../src/guestfs-actions.pod:1259
26181 " guestfs_compress_out (guestfs_h *g,\n"
26182 " const char *ctype,\n"
26183 " const char *file,\n"
26184 " const char *zfile,\n"
26190 #: ../src/guestfs-actions.pod:1271
26193 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26198 #: ../src/guestfs-actions.pod:1290
26199 msgid "guestfs_compress_out_va"
26203 #: ../src/guestfs-actions.pod:1292
26207 " guestfs_compress_out_va (guestfs_h *g,\n"
26208 " const char *ctype,\n"
26209 " const char *file,\n"
26210 " const char *zfile,\n"
26211 " va_list args);\n"
26216 #: ../src/guestfs-actions.pod:1299
26217 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26221 #: ../src/guestfs-actions.pod:1303
26222 msgid "guestfs_compress_out_argv"
26226 #: ../src/guestfs-actions.pod:1305
26230 " guestfs_compress_out_argv (guestfs_h *g,\n"
26231 " const char *ctype,\n"
26232 " const char *file,\n"
26233 " const char *zfile,\n"
26234 " const struct guestfs_compress_out_argv *optargs);\n"
26239 #: ../src/guestfs-actions.pod:1312
26240 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26244 #: ../src/guestfs-actions.pod:1316
26245 msgid "guestfs_config"
26249 #: ../src/guestfs-actions.pod:1318
26253 " guestfs_config (guestfs_h *g,\n"
26254 " const char *qemuparam,\n"
26255 " const char *qemuvalue);\n"
26260 #: ../src/guestfs-actions.pod:1336
26261 msgid "guestfs_copy_device_to_device"
26265 #: ../src/guestfs-actions.pod:1338
26269 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26270 " const char *src,\n"
26271 " const char *dest,\n"
26277 #: ../src/guestfs-actions.pod:1349
26280 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26281 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26282 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26287 #: ../src/guestfs-actions.pod:1353
26289 "The four calls C<guestfs_copy_device_to_device>, "
26290 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26291 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26292 "destination (device|file)."
26296 #: ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1427
26297 #: ../src/guestfs-actions.pod:1480 ../src/guestfs-actions.pod:1538
26298 #: ../src/guestfs-actions.pod:1592 ../src/guestfs-actions.pod:1723
26299 #: ../src/guestfs-actions.pod:1754 ../src/guestfs-actions.pod:1799
26300 #: ../src/guestfs-actions.pod:2176 ../src/guestfs-actions.pod:2198
26301 #: ../src/guestfs-actions.pod:4105 ../src/guestfs-actions.pod:7707
26302 #: ../src/guestfs-actions.pod:7741 ../src/guestfs-actions.pod:8248
26303 #: ../src/guestfs-actions.pod:8271
26305 "This long-running command can generate progress notification messages so "
26306 "that the caller can display a progress bar or indicator. To receive these "
26307 "messages, the caller must register a progress event callback. See L<guestfs"
26308 "(3)/GUESTFS_EVENT_PROGRESS>."
26312 #: ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1432
26313 #: ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1543
26314 #: ../src/guestfs-actions.pod:6042
26315 msgid "(Added in 1.13.25)"
26319 #: ../src/guestfs-actions.pod:1381
26320 msgid "guestfs_copy_device_to_device_va"
26324 #: ../src/guestfs-actions.pod:1383
26328 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26329 " const char *src,\n"
26330 " const char *dest,\n"
26331 " va_list args);\n"
26336 #: ../src/guestfs-actions.pod:1389
26337 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26341 #: ../src/guestfs-actions.pod:1393
26342 msgid "guestfs_copy_device_to_device_argv"
26346 #: ../src/guestfs-actions.pod:1395
26350 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26351 " const char *src,\n"
26352 " const char *dest,\n"
26353 " const struct guestfs_copy_device_to_device_argv *optargs);\n"
26358 #: ../src/guestfs-actions.pod:1401
26359 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26363 #: ../src/guestfs-actions.pod:1405
26364 msgid "guestfs_copy_device_to_file"
26368 #: ../src/guestfs-actions.pod:1407
26372 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26373 " const char *src,\n"
26374 " const char *dest,\n"
26380 #: ../src/guestfs-actions.pod:1418
26383 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26384 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26385 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26390 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1475
26391 #: ../src/guestfs-actions.pod:1528
26393 "See C<guestfs_copy_device_to_device> for a general overview of this call."
26397 #: ../src/guestfs-actions.pod:1434
26398 msgid "guestfs_copy_device_to_file_va"
26402 #: ../src/guestfs-actions.pod:1436
26406 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26407 " const char *src,\n"
26408 " const char *dest,\n"
26409 " va_list args);\n"
26414 #: ../src/guestfs-actions.pod:1442
26415 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26419 #: ../src/guestfs-actions.pod:1446
26420 msgid "guestfs_copy_device_to_file_argv"
26424 #: ../src/guestfs-actions.pod:1448
26428 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26429 " const char *src,\n"
26430 " const char *dest,\n"
26431 " const struct guestfs_copy_device_to_file_argv *optargs);\n"
26436 #: ../src/guestfs-actions.pod:1454
26437 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26441 #: ../src/guestfs-actions.pod:1458
26442 msgid "guestfs_copy_file_to_device"
26446 #: ../src/guestfs-actions.pod:1460
26450 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26451 " const char *src,\n"
26452 " const char *dest,\n"
26458 #: ../src/guestfs-actions.pod:1471
26461 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26462 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26463 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26468 #: ../src/guestfs-actions.pod:1487
26469 msgid "guestfs_copy_file_to_device_va"
26473 #: ../src/guestfs-actions.pod:1489
26477 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26478 " const char *src,\n"
26479 " const char *dest,\n"
26480 " va_list args);\n"
26485 #: ../src/guestfs-actions.pod:1495
26486 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26490 #: ../src/guestfs-actions.pod:1499
26491 msgid "guestfs_copy_file_to_device_argv"
26495 #: ../src/guestfs-actions.pod:1501
26499 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26500 " const char *src,\n"
26501 " const char *dest,\n"
26502 " const struct guestfs_copy_file_to_device_argv *optargs);\n"
26507 #: ../src/guestfs-actions.pod:1507
26508 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26512 #: ../src/guestfs-actions.pod:1511
26513 msgid "guestfs_copy_file_to_file"
26517 #: ../src/guestfs-actions.pod:1513
26521 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26522 " const char *src,\n"
26523 " const char *dest,\n"
26529 #: ../src/guestfs-actions.pod:1524
26532 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26533 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26534 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26539 #: ../src/guestfs-actions.pod:1531
26541 "This is B<not> the function you want for copying files. This is for copying "
26542 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26543 "C<guestfs_mv> for general file copying and moving functions."
26547 #: ../src/guestfs-actions.pod:1545
26548 msgid "guestfs_copy_file_to_file_va"
26552 #: ../src/guestfs-actions.pod:1547
26556 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26557 " const char *src,\n"
26558 " const char *dest,\n"
26559 " va_list args);\n"
26564 #: ../src/guestfs-actions.pod:1553
26565 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26569 #: ../src/guestfs-actions.pod:1557
26570 msgid "guestfs_copy_file_to_file_argv"
26574 #: ../src/guestfs-actions.pod:1559
26578 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26579 " const char *src,\n"
26580 " const char *dest,\n"
26581 " const struct guestfs_copy_file_to_file_argv *optargs);\n"
26586 #: ../src/guestfs-actions.pod:1565
26587 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26591 #: ../src/guestfs-actions.pod:1569
26592 msgid "guestfs_copy_size"
26596 #: ../src/guestfs-actions.pod:1571
26600 " guestfs_copy_size (guestfs_h *g,\n"
26601 " const char *src,\n"
26602 " const char *dest,\n"
26603 " int64_t size);\n"
26608 #: ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1634
26610 "I<This function is deprecated.> In new code, use the L</"
26611 "guestfs_copy_device_to_device> call instead."
26615 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:4820
26616 #: ../src/guestfs-actions.pod:6212 ../src/guestfs-actions.pod:7942
26617 #: ../src/guestfs-actions.pod:7962 ../src/guestfs-actions.pod:8048
26618 msgid "(Added in 1.0.87)"
26622 #: ../src/guestfs-actions.pod:1599
26627 #: ../src/guestfs-actions.pod:1601
26631 " guestfs_cp (guestfs_h *g,\n"
26632 " const char *src,\n"
26633 " const char *dest);\n"
26638 #: ../src/guestfs-actions.pod:1611 ../src/guestfs-actions.pod:1625
26639 #: ../src/guestfs-actions.pod:1705 ../src/guestfs-actions.pod:1779
26640 #: ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:5564
26641 #: ../src/guestfs-actions.pod:6056
26642 msgid "(Added in 1.0.18)"
26646 #: ../src/guestfs-actions.pod:1613
26647 msgid "guestfs_cp_a"
26651 #: ../src/guestfs-actions.pod:1615
26655 " guestfs_cp_a (guestfs_h *g,\n"
26656 " const char *src,\n"
26657 " const char *dest);\n"
26662 #: ../src/guestfs-actions.pod:1627
26667 #: ../src/guestfs-actions.pod:1629
26671 " guestfs_dd (guestfs_h *g,\n"
26672 " const char *src,\n"
26673 " const char *dest);\n"
26678 #: ../src/guestfs-actions.pod:1646
26680 "If the destination is a device, it must be as large or larger than the "
26681 "source file or device, otherwise the copy will fail. This command cannot do "
26682 "partial copies (see C<guestfs_copy_device_to_device>)."
26686 #: ../src/guestfs-actions.pod:1655
26691 #: ../src/guestfs-actions.pod:1657
26695 " guestfs_df (guestfs_h *g);\n"
26700 #: ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1679
26702 "This command is mostly useful for interactive sessions. It is I<not> "
26703 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
26708 #: ../src/guestfs-actions.pod:1669 ../src/guestfs-actions.pod:1686
26709 #: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:2811
26710 #: ../src/guestfs-actions.pod:2835 ../src/guestfs-actions.pod:2903
26711 #: ../src/guestfs-actions.pod:4930 ../src/guestfs-actions.pod:5464
26712 #: ../src/guestfs-actions.pod:7445 ../src/guestfs-actions.pod:7469
26713 #: ../src/guestfs-actions.pod:8088 ../src/guestfs-actions.pod:8101
26714 #: ../src/guestfs-actions.pod:8114
26715 msgid "(Added in 1.0.54)"
26719 #: ../src/guestfs-actions.pod:1671
26720 msgid "guestfs_df_h"
26724 #: ../src/guestfs-actions.pod:1673
26728 " guestfs_df_h (guestfs_h *g);\n"
26733 #: ../src/guestfs-actions.pod:1688
26734 msgid "guestfs_dmesg"
26738 #: ../src/guestfs-actions.pod:1690
26742 " guestfs_dmesg (guestfs_h *g);\n"
26747 #: ../src/guestfs-actions.pod:1697
26749 "Another way to get the same information is to enable verbose messages with "
26750 "C<guestfs_set_verbose> or by setting the environment variable "
26751 "C<LIBGUESTFS_DEBUG=1> before running the program."
26755 #: ../src/guestfs-actions.pod:1707
26756 msgid "guestfs_download"
26760 #: ../src/guestfs-actions.pod:1709
26764 " guestfs_download (guestfs_h *g,\n"
26765 " const char *remotefilename,\n"
26766 " const char *filename);\n"
26771 #: ../src/guestfs-actions.pod:1719
26772 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
26776 #: ../src/guestfs-actions.pod:1730
26777 msgid "guestfs_download_offset"
26781 #: ../src/guestfs-actions.pod:1732
26785 " guestfs_download_offset (guestfs_h *g,\n"
26786 " const char *remotefilename,\n"
26787 " const char *filename,\n"
26788 " int64_t offset,\n"
26789 " int64_t size);\n"
26794 #: ../src/guestfs-actions.pod:1745
26796 "Note that there is no limit on the amount of data that can be downloaded "
26797 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
26798 "full amount unless an error occurs."
26802 #: ../src/guestfs-actions.pod:1750
26803 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26807 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:7746
26808 msgid "(Added in 1.5.17)"
26812 #: ../src/guestfs-actions.pod:1761
26813 msgid "guestfs_drop_caches"
26817 #: ../src/guestfs-actions.pod:1763
26821 " guestfs_drop_caches (guestfs_h *g,\n"
26822 " int whattodrop);\n"
26827 #: ../src/guestfs-actions.pod:1781
26832 #: ../src/guestfs-actions.pod:1783
26836 " guestfs_du (guestfs_h *g,\n"
26837 " const char *path);\n"
26842 #: ../src/guestfs-actions.pod:1806
26843 msgid "guestfs_e2fsck_f"
26847 #: ../src/guestfs-actions.pod:1808
26851 " guestfs_e2fsck_f (guestfs_h *g,\n"
26852 " const char *device);\n"
26857 #: ../src/guestfs-actions.pod:1816
26859 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
26860 "Normally you should use C<guestfs_fsck>."
26864 #: ../src/guestfs-actions.pod:1821
26865 msgid "(Added in 1.0.29)"
26869 #: ../src/guestfs-actions.pod:1823
26870 msgid "guestfs_echo_daemon"
26874 #: ../src/guestfs-actions.pod:1825
26878 " guestfs_echo_daemon (guestfs_h *g,\n"
26879 " char *const *words);\n"
26884 #: ../src/guestfs-actions.pod:1834
26885 msgid "See also C<guestfs_ping_daemon>."
26889 #: ../src/guestfs-actions.pod:1839 ../src/guestfs-actions.pod:2597
26890 #: ../src/guestfs-actions.pod:6926
26891 msgid "(Added in 1.0.69)"
26895 #: ../src/guestfs-actions.pod:1841
26896 msgid "guestfs_egrep"
26900 #: ../src/guestfs-actions.pod:1843
26904 " guestfs_egrep (guestfs_h *g,\n"
26905 " const char *regex,\n"
26906 " const char *path);\n"
26911 #: ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:1877
26912 #: ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:1980
26913 #: ../src/guestfs-actions.pod:1999 ../src/guestfs-actions.pod:2727
26914 #: ../src/guestfs-actions.pod:2746 ../src/guestfs-actions.pod:2924
26915 #: ../src/guestfs-actions.pod:2937 ../src/guestfs-actions.pod:2952
26916 #: ../src/guestfs-actions.pod:2998 ../src/guestfs-actions.pod:3020
26917 #: ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:4319
26918 #: ../src/guestfs-actions.pod:4333 ../src/guestfs-actions.pod:4346
26919 #: ../src/guestfs-actions.pod:4360 ../src/guestfs-actions.pod:5352
26920 #: ../src/guestfs-actions.pod:6390 ../src/guestfs-actions.pod:6439
26921 #: ../src/guestfs-actions.pod:7313 ../src/guestfs-actions.pod:7325
26922 #: ../src/guestfs-actions.pod:7338 ../src/guestfs-actions.pod:7351
26923 #: ../src/guestfs-actions.pod:7373 ../src/guestfs-actions.pod:7386
26924 #: ../src/guestfs-actions.pod:7399 ../src/guestfs-actions.pod:7412
26925 #: ../src/guestfs-actions.pod:8206 ../src/guestfs-actions.pod:8225
26926 #: ../src/guestfs-actions.pod:8316 ../src/guestfs-actions.pod:8335
26927 #: ../src/guestfs-actions.pod:8381 ../src/guestfs-actions.pod:8400
26928 msgid "(Added in 1.0.66)"
26932 #: ../src/guestfs-actions.pod:1860
26933 msgid "guestfs_egrepi"
26937 #: ../src/guestfs-actions.pod:1862
26941 " guestfs_egrepi (guestfs_h *g,\n"
26942 " const char *regex,\n"
26943 " const char *path);\n"
26948 #: ../src/guestfs-actions.pod:1879
26949 msgid "guestfs_equal"
26953 #: ../src/guestfs-actions.pod:1881
26957 " guestfs_equal (guestfs_h *g,\n"
26958 " const char *file1,\n"
26959 " const char *file2);\n"
26964 #: ../src/guestfs-actions.pod:1895
26965 msgid "guestfs_exists"
26969 #: ../src/guestfs-actions.pod:1897
26973 " guestfs_exists (guestfs_h *g,\n"
26974 " const char *path);\n"
26979 #: ../src/guestfs-actions.pod:1904
26980 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
26984 #: ../src/guestfs-actions.pod:1910
26985 msgid "guestfs_fallocate"
26989 #: ../src/guestfs-actions.pod:1912
26993 " guestfs_fallocate (guestfs_h *g,\n"
26994 " const char *path,\n"
27000 #: ../src/guestfs-actions.pod:1917
27002 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
27007 #: ../src/guestfs-actions.pod:1936
27008 msgid "guestfs_fallocate64"
27012 #: ../src/guestfs-actions.pod:1938
27016 " guestfs_fallocate64 (guestfs_h *g,\n"
27017 " const char *path,\n"
27023 #: ../src/guestfs-actions.pod:1947
27025 "Note that this call allocates disk blocks for the file. To create a sparse "
27026 "file use C<guestfs_truncate_size> instead."
27030 #: ../src/guestfs-actions.pod:1950
27032 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
27033 "oversight it only allowed 30 bit lengths to be specified, effectively "
27034 "limiting the maximum size of files created through that call to 1GB."
27038 #: ../src/guestfs-actions.pod:1961
27039 msgid "(Added in 1.3.17)"
27043 #: ../src/guestfs-actions.pod:1963
27044 msgid "guestfs_fgrep"
27048 #: ../src/guestfs-actions.pod:1965
27052 " guestfs_fgrep (guestfs_h *g,\n"
27053 " const char *pattern,\n"
27054 " const char *path);\n"
27059 #: ../src/guestfs-actions.pod:1982
27060 msgid "guestfs_fgrepi"
27064 #: ../src/guestfs-actions.pod:1984
27068 " guestfs_fgrepi (guestfs_h *g,\n"
27069 " const char *pattern,\n"
27070 " const char *path);\n"
27075 #: ../src/guestfs-actions.pod:2001
27076 msgid "guestfs_file"
27080 #: ../src/guestfs-actions.pod:2003
27084 " guestfs_file (guestfs_h *g,\n"
27085 " const char *path);\n"
27090 #: ../src/guestfs-actions.pod:2021
27092 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
27093 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
27097 #: ../src/guestfs-actions.pod:2029
27098 msgid "guestfs_file_architecture"
27102 #: ../src/guestfs-actions.pod:2031
27106 " guestfs_file_architecture (guestfs_h *g,\n"
27107 " const char *filename);\n"
27112 #: ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:2302
27113 #: ../src/guestfs-actions.pod:2319 ../src/guestfs-actions.pod:3053
27114 #: ../src/guestfs-actions.pod:3155 ../src/guestfs-actions.pod:3221
27115 #: ../src/guestfs-actions.pod:3408 ../src/guestfs-actions.pod:3426
27116 #: ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3542
27117 #: ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3876
27118 #: ../src/guestfs-actions.pod:4008
27119 msgid "(Added in 1.5.3)"
27123 #: ../src/guestfs-actions.pod:2141
27124 msgid "guestfs_filesize"
27128 #: ../src/guestfs-actions.pod:2143
27132 " guestfs_filesize (guestfs_h *g,\n"
27133 " const char *file);\n"
27138 #: ../src/guestfs-actions.pod:2149
27140 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
27141 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
27142 "devices, use C<guestfs_blockdev_getsize64>."
27146 #: ../src/guestfs-actions.pod:2155
27147 msgid "(Added in 1.0.82)"
27151 #: ../src/guestfs-actions.pod:2157
27152 msgid "guestfs_fill"
27156 #: ../src/guestfs-actions.pod:2159
27160 " guestfs_fill (guestfs_h *g,\n"
27163 " const char *path);\n"
27168 #: ../src/guestfs-actions.pod:2169
27170 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
27171 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
27172 "bytes use C<guestfs_fill_pattern>."
27176 #: ../src/guestfs-actions.pod:2181
27177 msgid "(Added in 1.0.79)"
27181 #: ../src/guestfs-actions.pod:2183
27182 msgid "guestfs_fill_pattern"
27186 #: ../src/guestfs-actions.pod:2185
27190 " guestfs_fill_pattern (guestfs_h *g,\n"
27191 " const char *pattern,\n"
27193 " const char *path);\n"
27198 #: ../src/guestfs-actions.pod:2191
27200 "This function is like C<guestfs_fill> except that it creates a new file of "
27201 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
27202 "pattern is truncated if necessary to ensure the length of the file is "
27203 "exactly C<len> bytes."
27207 #: ../src/guestfs-actions.pod:2203
27208 msgid "(Added in 1.3.12)"
27212 #: ../src/guestfs-actions.pod:2205
27213 msgid "guestfs_find"
27217 #: ../src/guestfs-actions.pod:2207
27221 " guestfs_find (guestfs_h *g,\n"
27222 " const char *directory);\n"
27227 #: ../src/guestfs-actions.pod:2223
27229 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27233 #: ../src/guestfs-actions.pod:2236
27234 msgid "See also C<guestfs_find0>."
27238 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:4757
27239 #: ../src/guestfs-actions.pod:6474
27240 msgid "(Added in 1.0.27)"
27244 #: ../src/guestfs-actions.pod:2247
27245 msgid "guestfs_find0"
27249 #: ../src/guestfs-actions.pod:2249
27253 " guestfs_find0 (guestfs_h *g,\n"
27254 " const char *directory,\n"
27255 " const char *files);\n"
27260 #: ../src/guestfs-actions.pod:2258
27262 "This command works the same way as C<guestfs_find> with the following "
27267 #: ../src/guestfs-actions.pod:2285
27268 msgid "(Added in 1.0.74)"
27272 #: ../src/guestfs-actions.pod:2287
27273 msgid "guestfs_findfs_label"
27277 #: ../src/guestfs-actions.pod:2289
27281 " guestfs_findfs_label (guestfs_h *g,\n"
27282 " const char *label);\n"
27287 #: ../src/guestfs-actions.pod:2297
27288 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27292 #: ../src/guestfs-actions.pod:2304
27293 msgid "guestfs_findfs_uuid"
27297 #: ../src/guestfs-actions.pod:2306
27301 " guestfs_findfs_uuid (guestfs_h *g,\n"
27302 " const char *uuid);\n"
27307 #: ../src/guestfs-actions.pod:2314
27308 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27312 #: ../src/guestfs-actions.pod:2321
27313 msgid "guestfs_fsck"
27317 #: ../src/guestfs-actions.pod:2323
27321 " guestfs_fsck (guestfs_h *g,\n"
27322 " const char *fstype,\n"
27323 " const char *device);\n"
27328 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:8253
27329 msgid "(Added in 1.0.16)"
27333 #: ../src/guestfs-actions.pod:2360
27334 msgid "guestfs_get_append"
27338 #: ../src/guestfs-actions.pod:2362
27342 " guestfs_get_append (guestfs_h *g);\n"
27347 #: ../src/guestfs-actions.pod:2370
27349 "This function returns a string which may be NULL. There is no way to return "
27350 "an error from this function. The string is owned by the guest handle and "
27351 "must I<not> be freed."
27355 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:6152
27356 #: ../src/guestfs-actions.pod:6631 ../src/guestfs-actions.pod:7080
27357 #: ../src/guestfs-actions.pod:7099 ../src/guestfs-actions.pod:7115
27358 #: ../src/guestfs-actions.pod:7139 ../src/guestfs-actions.pod:7893
27359 #: ../src/guestfs-actions.pod:7908 ../src/guestfs-actions.pod:8297
27360 msgid "(Added in 1.0.26)"
27364 #: ../src/guestfs-actions.pod:2376
27365 msgid "guestfs_get_attach_method"
27369 #: ../src/guestfs-actions.pod:2378
27373 " guestfs_get_attach_method (guestfs_h *g);\n"
27378 #: ../src/guestfs-actions.pod:2381
27379 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27383 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:6661
27384 msgid "(Added in 1.9.8)"
27388 #: ../src/guestfs-actions.pod:2388
27389 msgid "guestfs_get_autosync"
27393 #: ../src/guestfs-actions.pod:2390
27397 " guestfs_get_autosync (guestfs_h *g);\n"
27402 #: ../src/guestfs-actions.pod:2399
27403 msgid "guestfs_get_direct"
27407 #: ../src/guestfs-actions.pod:2401
27411 " guestfs_get_direct (guestfs_h *g);\n"
27416 #: ../src/guestfs-actions.pod:2408 ../src/guestfs-actions.pod:6702
27417 msgid "(Added in 1.0.72)"
27421 #: ../src/guestfs-actions.pod:2410
27422 msgid "guestfs_get_e2label"
27426 #: ../src/guestfs-actions.pod:2412
27430 " guestfs_get_e2label (guestfs_h *g,\n"
27431 " const char *device);\n"
27436 #: ../src/guestfs-actions.pod:2416
27438 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27443 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2450
27444 #: ../src/guestfs-actions.pod:6720 ../src/guestfs-actions.pod:6739
27445 msgid "(Added in 1.0.15)"
27449 #: ../src/guestfs-actions.pod:2431
27450 msgid "guestfs_get_e2uuid"
27454 #: ../src/guestfs-actions.pod:2433
27458 " guestfs_get_e2uuid (guestfs_h *g,\n"
27459 " const char *device);\n"
27464 #: ../src/guestfs-actions.pod:2437
27466 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27471 #: ../src/guestfs-actions.pod:2452
27472 msgid "guestfs_get_memsize"
27476 #: ../src/guestfs-actions.pod:2454
27480 " guestfs_get_memsize (guestfs_h *g);\n"
27485 #: ../src/guestfs-actions.pod:2460
27487 "If C<guestfs_set_memsize> was not called on this handle, and if "
27488 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27489 "value for memsize."
27493 #: ../src/guestfs-actions.pod:2469 ../src/guestfs-actions.pod:5048
27494 #: ../src/guestfs-actions.pod:5257 ../src/guestfs-actions.pod:5276
27495 #: ../src/guestfs-actions.pod:5295 ../src/guestfs-actions.pod:5307
27496 #: ../src/guestfs-actions.pod:5324 ../src/guestfs-actions.pod:5337
27497 #: ../src/guestfs-actions.pod:6377 ../src/guestfs-actions.pod:6760
27498 #: ../src/guestfs-actions.pod:7050 ../src/guestfs-actions.pod:7662
27499 msgid "(Added in 1.0.55)"
27503 #: ../src/guestfs-actions.pod:2471
27504 msgid "guestfs_get_network"
27508 #: ../src/guestfs-actions.pod:2473
27512 " guestfs_get_network (guestfs_h *g);\n"
27517 #: ../src/guestfs-actions.pod:2480 ../src/guestfs-actions.pod:6779
27518 msgid "(Added in 1.5.4)"
27522 #: ../src/guestfs-actions.pod:2482
27523 msgid "guestfs_get_path"
27527 #: ../src/guestfs-actions.pod:2484
27531 " guestfs_get_path (guestfs_h *g);\n"
27536 #: ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2532
27538 "This function returns a string, or NULL on error. The string is owned by "
27539 "the guest handle and must I<not> be freed."
27543 #: ../src/guestfs-actions.pod:2497
27544 msgid "guestfs_get_pgroup"
27548 #: ../src/guestfs-actions.pod:2499
27552 " guestfs_get_pgroup (guestfs_h *g);\n"
27557 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:6815
27558 #: ../src/guestfs-actions.pod:8154
27559 msgid "(Added in 1.11.18)"
27563 #: ../src/guestfs-actions.pod:2508
27564 msgid "guestfs_get_pid"
27568 #: ../src/guestfs-actions.pod:2510
27572 " guestfs_get_pid (guestfs_h *g);\n"
27577 #: ../src/guestfs-actions.pod:2520
27578 msgid "(Added in 1.0.56)"
27582 #: ../src/guestfs-actions.pod:2522
27583 msgid "guestfs_get_qemu"
27587 #: ../src/guestfs-actions.pod:2524
27591 " guestfs_get_qemu (guestfs_h *g);\n"
27596 #: ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:6843
27597 msgid "(Added in 1.0.6)"
27601 #: ../src/guestfs-actions.pod:2537
27602 msgid "guestfs_get_recovery_proc"
27606 #: ../src/guestfs-actions.pod:2539
27610 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27615 #: ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:4130
27616 #: ../src/guestfs-actions.pod:4461 ../src/guestfs-actions.pod:4855
27617 #: ../src/guestfs-actions.pod:4887 ../src/guestfs-actions.pod:6082
27618 #: ../src/guestfs-actions.pod:6425 ../src/guestfs-actions.pod:6867
27619 #: ../src/guestfs-actions.pod:7565 ../src/guestfs-actions.pod:7585
27620 #: ../src/guestfs-actions.pod:7777
27621 msgid "(Added in 1.0.77)"
27625 #: ../src/guestfs-actions.pod:2548
27626 msgid "guestfs_get_selinux"
27630 #: ../src/guestfs-actions.pod:2550
27634 " guestfs_get_selinux (guestfs_h *g);\n"
27639 #: ../src/guestfs-actions.pod:2553
27641 "This returns the current setting of the selinux flag which is passed to the "
27642 "appliance at boot time. See C<guestfs_set_selinux>."
27646 #: ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2635
27647 #: ../src/guestfs-actions.pod:6886 ../src/guestfs-actions.pod:6960
27648 msgid "(Added in 1.0.67)"
27652 #: ../src/guestfs-actions.pod:2563
27653 msgid "guestfs_get_smp"
27657 #: ../src/guestfs-actions.pod:2565
27661 " guestfs_get_smp (guestfs_h *g);\n"
27666 #: ../src/guestfs-actions.pod:2574
27667 msgid "guestfs_get_state"
27671 #: ../src/guestfs-actions.pod:2576
27675 " guestfs_get_state (guestfs_h *g);\n"
27680 #: ../src/guestfs-actions.pod:2588
27681 msgid "guestfs_get_trace"
27685 #: ../src/guestfs-actions.pod:2590
27689 " guestfs_get_trace (guestfs_h *g);\n"
27694 #: ../src/guestfs-actions.pod:2599
27695 msgid "guestfs_get_umask"
27699 #: ../src/guestfs-actions.pod:2601
27703 " guestfs_get_umask (guestfs_h *g);\n"
27708 #: ../src/guestfs-actions.pod:2604
27710 "Return the current umask. By default the umask is C<022> unless it has been "
27711 "set by calling C<guestfs_umask>."
27715 #: ../src/guestfs-actions.pod:2611
27716 msgid "guestfs_get_verbose"
27720 #: ../src/guestfs-actions.pod:2613
27724 " guestfs_get_verbose (guestfs_h *g);\n"
27729 #: ../src/guestfs-actions.pod:2622
27730 msgid "guestfs_getcon"
27734 #: ../src/guestfs-actions.pod:2624
27738 " guestfs_getcon (guestfs_h *g);\n"
27743 #: ../src/guestfs-actions.pod:2629
27745 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
27749 #: ../src/guestfs-actions.pod:2637
27750 msgid "guestfs_getxattr"
27754 #: ../src/guestfs-actions.pod:2639
27758 " guestfs_getxattr (guestfs_h *g,\n"
27759 " const char *path,\n"
27760 " const char *name,\n"
27761 " size_t *size_r);\n"
27766 #: ../src/guestfs-actions.pod:2645
27768 "Get a single extended attribute from file C<path> named C<name>. This call "
27769 "follows symlinks. If you want to lookup an extended attribute for the "
27770 "symlink itself, use C<guestfs_lgetxattr>."
27774 #: ../src/guestfs-actions.pod:2649 ../src/guestfs-actions.pod:4144
27776 "Normally it is better to get all extended attributes from a file in one go "
27777 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
27778 "implementations are buggy and do not provide a way to list out attributes. "
27779 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27780 "extended attributes you want in advance and call this function."
27784 #: ../src/guestfs-actions.pod:2659
27785 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27789 #: ../src/guestfs-actions.pod:2661 ../src/guestfs-actions.pod:2874
27790 #: ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4156
27791 #: ../src/guestfs-actions.pod:6075 ../src/guestfs-actions.pod:6101
27792 #: ../src/guestfs-actions.pod:6282
27794 "This function returns a buffer, or NULL on error. The size of the returned "
27795 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
27800 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4160
27801 msgid "(Added in 1.7.24)"
27805 #: ../src/guestfs-actions.pod:2667
27806 msgid "guestfs_getxattrs"
27810 #: ../src/guestfs-actions.pod:2669
27813 " struct guestfs_xattr_list *\n"
27814 " guestfs_getxattrs (guestfs_h *g,\n"
27815 " const char *path);\n"
27820 #: ../src/guestfs-actions.pod:2679
27821 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27825 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:4172
27826 #: ../src/guestfs-actions.pod:4851
27828 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
27829 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27833 #: ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:4176
27834 #: ../src/guestfs-actions.pod:4375 ../src/guestfs-actions.pod:4411
27835 #: ../src/guestfs-actions.pod:6455 ../src/guestfs-actions.pod:6979
27836 #: ../src/guestfs-actions.pod:8362
27837 msgid "(Added in 1.0.59)"
27841 #: ../src/guestfs-actions.pod:2687
27842 msgid "guestfs_glob_expand"
27846 #: ../src/guestfs-actions.pod:2689
27850 " guestfs_glob_expand (guestfs_h *g,\n"
27851 " const char *pattern);\n"
27856 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:7163
27857 #: ../src/guestfs-actions.pod:7180
27858 msgid "(Added in 1.0.50)"
27862 #: ../src/guestfs-actions.pod:2710
27863 msgid "guestfs_grep"
27867 #: ../src/guestfs-actions.pod:2712
27871 " guestfs_grep (guestfs_h *g,\n"
27872 " const char *regex,\n"
27873 " const char *path);\n"
27878 #: ../src/guestfs-actions.pod:2729
27879 msgid "guestfs_grepi"
27883 #: ../src/guestfs-actions.pod:2731
27887 " guestfs_grepi (guestfs_h *g,\n"
27888 " const char *regex,\n"
27889 " const char *path);\n"
27894 #: ../src/guestfs-actions.pod:2748
27895 msgid "guestfs_grub_install"
27899 #: ../src/guestfs-actions.pod:2750
27903 " guestfs_grub_install (guestfs_h *g,\n"
27904 " const char *root,\n"
27905 " const char *device);\n"
27910 #: ../src/guestfs-actions.pod:2793
27911 msgid "(Added in 1.0.17)"
27915 #: ../src/guestfs-actions.pod:2795
27916 msgid "guestfs_head"
27920 #: ../src/guestfs-actions.pod:2797
27924 " guestfs_head (guestfs_h *g,\n"
27925 " const char *path);\n"
27930 #: ../src/guestfs-actions.pod:2813
27931 msgid "guestfs_head_n"
27935 #: ../src/guestfs-actions.pod:2815
27939 " guestfs_head_n (guestfs_h *g,\n"
27941 " const char *path);\n"
27946 #: ../src/guestfs-actions.pod:2837
27947 msgid "guestfs_hexdump"
27951 #: ../src/guestfs-actions.pod:2839
27955 " guestfs_hexdump (guestfs_h *g,\n"
27956 " const char *path);\n"
27961 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:7244
27962 #: ../src/guestfs-actions.pod:7299
27963 msgid "(Added in 1.0.22)"
27967 #: ../src/guestfs-actions.pod:2854
27968 msgid "guestfs_initrd_cat"
27972 #: ../src/guestfs-actions.pod:2856
27976 " guestfs_initrd_cat (guestfs_h *g,\n"
27977 " const char *initrdpath,\n"
27978 " const char *filename,\n"
27979 " size_t *size_r);\n"
27984 #: ../src/guestfs-actions.pod:2872
27985 msgid "See also C<guestfs_initrd_list>."
27989 #: ../src/guestfs-actions.pod:2883
27990 msgid "guestfs_initrd_list"
27994 #: ../src/guestfs-actions.pod:2885
27998 " guestfs_initrd_list (guestfs_h *g,\n"
27999 " const char *path);\n"
28004 #: ../src/guestfs-actions.pod:2905
28005 msgid "guestfs_inotify_add_watch"
28009 #: ../src/guestfs-actions.pod:2907
28013 " guestfs_inotify_add_watch (guestfs_h *g,\n"
28014 " const char *path,\n"
28020 #: ../src/guestfs-actions.pod:2926
28021 msgid "guestfs_inotify_close"
28025 #: ../src/guestfs-actions.pod:2928
28029 " guestfs_inotify_close (guestfs_h *g);\n"
28034 #: ../src/guestfs-actions.pod:2939
28035 msgid "guestfs_inotify_files"
28039 #: ../src/guestfs-actions.pod:2941
28043 " guestfs_inotify_files (guestfs_h *g);\n"
28048 #: ../src/guestfs-actions.pod:2944
28050 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
28051 "returns a list of pathnames of objects that were touched. The returned "
28052 "pathnames are sorted and deduplicated."
28056 #: ../src/guestfs-actions.pod:2954
28057 msgid "guestfs_inotify_init"
28061 #: ../src/guestfs-actions.pod:2956
28065 " guestfs_inotify_init (guestfs_h *g,\n"
28066 " int maxevents);\n"
28071 #: ../src/guestfs-actions.pod:2964
28073 "C<maxevents> is the maximum number of events which will be queued up between "
28074 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
28075 "passed as C<0>, then the kernel (or previously set) default is used. For "
28076 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
28077 "throws away events, but records the fact that it threw them away by setting "
28078 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
28079 "C<guestfs_inotify_read>)."
28083 #: ../src/guestfs-actions.pod:2974
28085 "Before any events are generated, you have to add some watches to the "
28086 "internal watch list. See: C<guestfs_inotify_add_watch>, "
28087 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
28091 #: ../src/guestfs-actions.pod:2980
28093 "Queued up events should be read periodically by calling "
28094 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
28095 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
28096 "often enough then you risk the internal queue overflowing."
28100 #: ../src/guestfs-actions.pod:2987
28102 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
28103 "This also removes any watches automatically."
28107 #: ../src/guestfs-actions.pod:3000
28108 msgid "guestfs_inotify_read"
28112 #: ../src/guestfs-actions.pod:3002
28115 " struct guestfs_inotify_event_list *\n"
28116 " guestfs_inotify_read (guestfs_h *g);\n"
28121 #: ../src/guestfs-actions.pod:3016
28123 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
28124 "there was an error. I<The caller must call "
28125 "C<guestfs_free_inotify_event_list> after use>."
28129 #: ../src/guestfs-actions.pod:3022
28130 msgid "guestfs_inotify_rm_watch"
28134 #: ../src/guestfs-actions.pod:3024
28138 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
28144 #: ../src/guestfs-actions.pod:3028
28146 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
28150 #: ../src/guestfs-actions.pod:3035
28151 msgid "guestfs_inspect_get_arch"
28155 #: ../src/guestfs-actions.pod:3037
28159 " guestfs_inspect_get_arch (guestfs_h *g,\n"
28160 " const char *root);\n"
28165 #: ../src/guestfs-actions.pod:3041
28167 "This returns the architecture of the inspected operating system. The "
28168 "possible return values are listed under C<guestfs_file_architecture>."
28172 #: ../src/guestfs-actions.pod:3055
28173 msgid "guestfs_inspect_get_distro"
28177 #: ../src/guestfs-actions.pod:3057
28181 " guestfs_inspect_get_distro (guestfs_h *g,\n"
28182 " const char *root);\n"
28187 #: ../src/guestfs-actions.pod:3157
28188 msgid "guestfs_inspect_get_drive_mappings"
28192 #: ../src/guestfs-actions.pod:3159
28196 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
28197 " const char *root);\n"
28202 #: ../src/guestfs-actions.pod:3188
28204 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28205 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
28209 #: ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3460
28210 #: ../src/guestfs-actions.pod:4263 ../src/guestfs-actions.pod:5526
28211 #: ../src/guestfs-actions.pod:7601
28213 "This function returns a NULL-terminated array of strings, or NULL if there "
28214 "was an error. The array of strings will always have length C<2n+1>, where "
28215 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
28216 "caller must free the strings and the array after use>."
28220 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3659
28221 msgid "(Added in 1.9.17)"
28225 #: ../src/guestfs-actions.pod:3200
28226 msgid "guestfs_inspect_get_filesystems"
28230 #: ../src/guestfs-actions.pod:3202
28234 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
28235 " const char *root);\n"
28240 #: ../src/guestfs-actions.pod:3214
28242 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28243 "C<guestfs_inspect_get_mountpoints>."
28247 #: ../src/guestfs-actions.pod:3223
28248 msgid "guestfs_inspect_get_format"
28252 #: ../src/guestfs-actions.pod:3225
28256 " guestfs_inspect_get_format (guestfs_h *g,\n"
28257 " const char *root);\n"
28262 #: ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3695
28263 #: ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3729
28264 #: ../src/guestfs-actions.pod:6493
28265 msgid "(Added in 1.9.4)"
28269 #: ../src/guestfs-actions.pod:3261
28270 msgid "guestfs_inspect_get_hostname"
28274 #: ../src/guestfs-actions.pod:3263
28278 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28279 " const char *root);\n"
28284 #: ../src/guestfs-actions.pod:3278
28285 msgid "(Added in 1.7.9)"
28289 #: ../src/guestfs-actions.pod:3280
28290 msgid "guestfs_inspect_get_icon"
28294 #: ../src/guestfs-actions.pod:3282
28298 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28299 " const char *root,\n"
28300 " size_t *size_r,\n"
28306 #: ../src/guestfs-actions.pod:3293
28309 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28310 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28315 #: ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:4190
28316 #: ../src/guestfs-actions.pod:5425
28317 msgid "(Added in 1.11.12)"
28321 #: ../src/guestfs-actions.pod:3362
28322 msgid "guestfs_inspect_get_icon_va"
28326 #: ../src/guestfs-actions.pod:3364
28330 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28331 " const char *root,\n"
28332 " size_t *size_r,\n"
28333 " va_list args);\n"
28338 #: ../src/guestfs-actions.pod:3370
28339 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28343 #: ../src/guestfs-actions.pod:3374
28344 msgid "guestfs_inspect_get_icon_argv"
28348 #: ../src/guestfs-actions.pod:3376
28352 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28353 " const char *root,\n"
28354 " size_t *size_r,\n"
28355 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
28360 #: ../src/guestfs-actions.pod:3382
28361 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28365 #: ../src/guestfs-actions.pod:3386
28366 msgid "guestfs_inspect_get_major_version"
28370 #: ../src/guestfs-actions.pod:3388
28374 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28375 " const char *root);\n"
28380 #: ../src/guestfs-actions.pod:3410
28381 msgid "guestfs_inspect_get_minor_version"
28385 #: ../src/guestfs-actions.pod:3412
28389 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28390 " const char *root);\n"
28395 #: ../src/guestfs-actions.pod:3421
28397 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28398 "C<guestfs_inspect_get_major_version>."
28402 #: ../src/guestfs-actions.pod:3428
28403 msgid "guestfs_inspect_get_mountpoints"
28407 #: ../src/guestfs-actions.pod:3430
28411 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28412 " const char *root);\n"
28417 #: ../src/guestfs-actions.pod:3451
28419 "For operating systems like Windows which still use drive letters, this call "
28420 "will only return an entry for the first drive \"mounted on\" C</>. For "
28421 "information about the mapping of drive letters to partitions, see "
28422 "C<guestfs_inspect_get_drive_mappings>."
28426 #: ../src/guestfs-actions.pod:3457
28428 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28429 "C<guestfs_inspect_get_filesystems>."
28433 #: ../src/guestfs-actions.pod:3468
28434 msgid "guestfs_inspect_get_package_format"
28438 #: ../src/guestfs-actions.pod:3470
28442 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28443 " const char *root);\n"
28448 #: ../src/guestfs-actions.pod:3474
28450 "This function and C<guestfs_inspect_get_package_management> return the "
28451 "package format and package management tool used by the inspected operating "
28452 "system. For example for Fedora these functions would return C<rpm> (package "
28453 "format) and C<yum> (package management)."
28457 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3521
28458 msgid "(Added in 1.7.5)"
28462 #: ../src/guestfs-actions.pod:3495
28463 msgid "guestfs_inspect_get_package_management"
28467 #: ../src/guestfs-actions.pod:3497
28471 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28472 " const char *root);\n"
28477 #: ../src/guestfs-actions.pod:3501
28479 "C<guestfs_inspect_get_package_format> and this function return the package "
28480 "format and package management tool used by the inspected operating system. "
28481 "For example for Fedora these functions would return C<rpm> (package format) "
28482 "and C<yum> (package management)."
28486 #: ../src/guestfs-actions.pod:3523
28487 msgid "guestfs_inspect_get_product_name"
28491 #: ../src/guestfs-actions.pod:3525
28495 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28496 " const char *root);\n"
28501 #: ../src/guestfs-actions.pod:3544
28502 msgid "guestfs_inspect_get_product_variant"
28506 #: ../src/guestfs-actions.pod:3546
28510 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28511 " const char *root);\n"
28516 #: ../src/guestfs-actions.pod:3569
28518 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28519 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28523 #: ../src/guestfs-actions.pod:3576
28524 msgid "(Added in 1.9.13)"
28528 #: ../src/guestfs-actions.pod:3578
28529 msgid "guestfs_inspect_get_roots"
28533 #: ../src/guestfs-actions.pod:3580
28537 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28542 #: ../src/guestfs-actions.pod:3583
28544 "This function is a convenient way to get the list of root devices, as "
28545 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28546 "the whole inspection process."
28550 #: ../src/guestfs-actions.pod:3587
28552 "This returns an empty list if either no root devices were found or the "
28553 "caller has not called C<guestfs_inspect_os>."
28557 #: ../src/guestfs-actions.pod:3596
28558 msgid "(Added in 1.7.3)"
28562 #: ../src/guestfs-actions.pod:3598
28563 msgid "guestfs_inspect_get_type"
28567 #: ../src/guestfs-actions.pod:3600
28571 " guestfs_inspect_get_type (guestfs_h *g,\n"
28572 " const char *root);\n"
28577 #: ../src/guestfs-actions.pod:3641
28578 msgid "guestfs_inspect_get_windows_current_control_set"
28582 #: ../src/guestfs-actions.pod:3643
28586 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28587 " const char *root);\n"
28592 #: ../src/guestfs-actions.pod:3661
28593 msgid "guestfs_inspect_get_windows_systemroot"
28597 #: ../src/guestfs-actions.pod:3663
28601 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28602 " const char *root);\n"
28607 #: ../src/guestfs-actions.pod:3679
28608 msgid "(Added in 1.5.25)"
28612 #: ../src/guestfs-actions.pod:3681
28613 msgid "guestfs_inspect_is_live"
28617 #: ../src/guestfs-actions.pod:3683
28621 " guestfs_inspect_is_live (guestfs_h *g,\n"
28622 " const char *root);\n"
28627 #: ../src/guestfs-actions.pod:3687
28629 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28630 "disk), then this returns true if a live image was detected on the disk."
28634 #: ../src/guestfs-actions.pod:3697
28635 msgid "guestfs_inspect_is_multipart"
28639 #: ../src/guestfs-actions.pod:3699
28643 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28644 " const char *root);\n"
28649 #: ../src/guestfs-actions.pod:3703
28651 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28652 "disk), then this returns true if the disk is part of a set."
28656 #: ../src/guestfs-actions.pod:3713
28657 msgid "guestfs_inspect_is_netinst"
28661 #: ../src/guestfs-actions.pod:3715
28665 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28666 " const char *root);\n"
28671 #: ../src/guestfs-actions.pod:3719
28673 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28674 "disk), then this returns true if the disk is a network installer, ie. not a "
28675 "self-contained install CD but one which is likely to require network access "
28676 "to complete the install."
28680 #: ../src/guestfs-actions.pod:3731
28681 msgid "guestfs_inspect_list_applications"
28685 #: ../src/guestfs-actions.pod:3733
28688 " struct guestfs_application_list *\n"
28689 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28690 " const char *root);\n"
28695 #: ../src/guestfs-actions.pod:3739
28697 "I<Note:> This call works differently from other parts of the inspection "
28698 "API. You have to call C<guestfs_inspect_os>, then "
28699 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28700 "this. Listing applications is a significantly more difficult operation "
28701 "which requires access to the full filesystem. Also note that unlike the "
28702 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28703 "the libguestfs handle, this call actually reads parts of the mounted "
28704 "filesystems during the call."
28708 #: ../src/guestfs-actions.pod:3829
28710 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28711 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28716 #: ../src/guestfs-actions.pod:3833
28717 msgid "(Added in 1.7.8)"
28721 #: ../src/guestfs-actions.pod:3835
28722 msgid "guestfs_inspect_os"
28726 #: ../src/guestfs-actions.pod:3837
28730 " guestfs_inspect_os (guestfs_h *g);\n"
28735 #: ../src/guestfs-actions.pod:3853
28737 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28738 "functions in order to query further information about each operating system, "
28739 "such as the name and version."
28743 #: ../src/guestfs-actions.pod:3858
28745 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
28746 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
28747 "the contents. This should be called with no disks currently mounted. The "
28748 "function may also use Augeas, so any existing Augeas handle will be closed."
28752 #: ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:4201
28753 #: ../src/guestfs-actions.pod:4283
28754 msgid "See also C<guestfs_list_filesystems>."
28758 #: ../src/guestfs-actions.pod:3878
28759 msgid "guestfs_is_blockdev"
28763 #: ../src/guestfs-actions.pod:3880
28767 " guestfs_is_blockdev (guestfs_h *g,\n"
28768 " const char *path);\n"
28773 #: ../src/guestfs-actions.pod:3887 ../src/guestfs-actions.pod:3916
28774 #: ../src/guestfs-actions.pod:3946 ../src/guestfs-actions.pod:3961
28775 #: ../src/guestfs-actions.pod:3977 ../src/guestfs-actions.pod:4033
28776 #: ../src/guestfs-actions.pod:4048
28777 msgid "See also C<guestfs_stat>."
28781 #: ../src/guestfs-actions.pod:3891 ../src/guestfs-actions.pod:3920
28782 #: ../src/guestfs-actions.pod:3965 ../src/guestfs-actions.pod:4037
28783 #: ../src/guestfs-actions.pod:4052
28784 msgid "(Added in 1.5.10)"
28788 #: ../src/guestfs-actions.pod:3893
28789 msgid "guestfs_is_busy"
28793 #: ../src/guestfs-actions.pod:3895
28797 " guestfs_is_busy (guestfs_h *g);\n"
28802 #: ../src/guestfs-actions.pod:3907
28803 msgid "guestfs_is_chardev"
28807 #: ../src/guestfs-actions.pod:3909
28811 " guestfs_is_chardev (guestfs_h *g,\n"
28812 " const char *path);\n"
28817 #: ../src/guestfs-actions.pod:3922
28818 msgid "guestfs_is_config"
28822 #: ../src/guestfs-actions.pod:3924
28826 " guestfs_is_config (guestfs_h *g);\n"
28831 #: ../src/guestfs-actions.pod:3936
28832 msgid "guestfs_is_dir"
28836 #: ../src/guestfs-actions.pod:3938
28840 " guestfs_is_dir (guestfs_h *g,\n"
28841 " const char *path);\n"
28846 #: ../src/guestfs-actions.pod:3952
28847 msgid "guestfs_is_fifo"
28851 #: ../src/guestfs-actions.pod:3954
28855 " guestfs_is_fifo (guestfs_h *g,\n"
28856 " const char *path);\n"
28861 #: ../src/guestfs-actions.pod:3967
28862 msgid "guestfs_is_file"
28866 #: ../src/guestfs-actions.pod:3969
28870 " guestfs_is_file (guestfs_h *g,\n"
28871 " const char *path);\n"
28876 #: ../src/guestfs-actions.pod:3983
28877 msgid "guestfs_is_launching"
28881 #: ../src/guestfs-actions.pod:3985
28885 " guestfs_is_launching (guestfs_h *g);\n"
28890 #: ../src/guestfs-actions.pod:3997
28891 msgid "guestfs_is_lv"
28895 #: ../src/guestfs-actions.pod:3999
28899 " guestfs_is_lv (guestfs_h *g,\n"
28900 " const char *device);\n"
28905 #: ../src/guestfs-actions.pod:4010
28906 msgid "guestfs_is_ready"
28910 #: ../src/guestfs-actions.pod:4012
28914 " guestfs_is_ready (guestfs_h *g);\n"
28919 #: ../src/guestfs-actions.pod:4024
28920 msgid "guestfs_is_socket"
28924 #: ../src/guestfs-actions.pod:4026
28928 " guestfs_is_socket (guestfs_h *g,\n"
28929 " const char *path);\n"
28934 #: ../src/guestfs-actions.pod:4039
28935 msgid "guestfs_is_symlink"
28939 #: ../src/guestfs-actions.pod:4041
28943 " guestfs_is_symlink (guestfs_h *g,\n"
28944 " const char *path);\n"
28949 #: ../src/guestfs-actions.pod:4054
28950 msgid "guestfs_is_zero"
28954 #: ../src/guestfs-actions.pod:4056
28958 " guestfs_is_zero (guestfs_h *g,\n"
28959 " const char *path);\n"
28964 #: ../src/guestfs-actions.pod:4065 ../src/guestfs-actions.pod:4079
28965 msgid "(Added in 1.11.8)"
28969 #: ../src/guestfs-actions.pod:4067
28970 msgid "guestfs_is_zero_device"
28974 #: ../src/guestfs-actions.pod:4069
28978 " guestfs_is_zero_device (guestfs_h *g,\n"
28979 " const char *device);\n"
28984 #: ../src/guestfs-actions.pod:4081
28985 msgid "guestfs_kill_subprocess"
28989 #: ../src/guestfs-actions.pod:4083
28993 " guestfs_kill_subprocess (guestfs_h *g);\n"
28998 #: ../src/guestfs-actions.pod:4092
28999 msgid "guestfs_launch"
29003 #: ../src/guestfs-actions.pod:4094
29007 " guestfs_launch (guestfs_h *g);\n"
29012 #: ../src/guestfs-actions.pod:4112
29013 msgid "guestfs_lchown"
29017 #: ../src/guestfs-actions.pod:4114
29021 " guestfs_lchown (guestfs_h *g,\n"
29024 " const char *path);\n"
29029 #: ../src/guestfs-actions.pod:4120
29031 "Change the file owner to C<owner> and group to C<group>. This is like "
29032 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
29033 "changed, not the target."
29037 #: ../src/guestfs-actions.pod:4132
29038 msgid "guestfs_lgetxattr"
29042 #: ../src/guestfs-actions.pod:4134
29046 " guestfs_lgetxattr (guestfs_h *g,\n"
29047 " const char *path,\n"
29048 " const char *name,\n"
29049 " size_t *size_r);\n"
29054 #: ../src/guestfs-actions.pod:4154
29055 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
29059 #: ../src/guestfs-actions.pod:4162
29060 msgid "guestfs_lgetxattrs"
29064 #: ../src/guestfs-actions.pod:4164
29067 " struct guestfs_xattr_list *\n"
29068 " guestfs_lgetxattrs (guestfs_h *g,\n"
29069 " const char *path);\n"
29074 #: ../src/guestfs-actions.pod:4168
29076 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
29077 "then it returns the extended attributes of the link itself."
29081 #: ../src/guestfs-actions.pod:4178
29082 msgid "guestfs_list_9p"
29086 #: ../src/guestfs-actions.pod:4180
29090 " guestfs_list_9p (guestfs_h *g);\n"
29095 #: ../src/guestfs-actions.pod:4192
29096 msgid "guestfs_list_devices"
29100 #: ../src/guestfs-actions.pod:4194
29104 " guestfs_list_devices (guestfs_h *g);\n"
29109 #: ../src/guestfs-actions.pod:4209
29110 msgid "guestfs_list_dm_devices"
29114 #: ../src/guestfs-actions.pod:4211
29118 " guestfs_list_dm_devices (guestfs_h *g);\n"
29123 #: ../src/guestfs-actions.pod:4216
29125 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
29126 "previous call to C<guestfs_luks_open>."
29130 #: ../src/guestfs-actions.pod:4219
29132 "Device mapper devices which correspond to logical volumes are I<not> "
29133 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
29138 #: ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:5664
29139 msgid "(Added in 1.11.15)"
29143 #: ../src/guestfs-actions.pod:4229
29144 msgid "guestfs_list_filesystems"
29148 #: ../src/guestfs-actions.pod:4231
29152 " guestfs_list_filesystems (guestfs_h *g);\n"
29157 #: ../src/guestfs-actions.pod:4251
29159 "This command runs other libguestfs commands, which might include "
29160 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
29161 "soon after launch and only when nothing is mounted."
29165 #: ../src/guestfs-actions.pod:4255
29167 "Not all of the filesystems returned will be mountable. In particular, swap "
29168 "partitions are returned in the list. Also this command does not check that "
29169 "each filesystem found is valid and mountable, and some filesystems might be "
29170 "mountable but require special options. Filesystems may not all belong to a "
29171 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
29175 #: ../src/guestfs-actions.pod:4269 ../src/guestfs-actions.pod:6024
29176 msgid "(Added in 1.5.15)"
29180 #: ../src/guestfs-actions.pod:4271
29181 msgid "guestfs_list_partitions"
29185 #: ../src/guestfs-actions.pod:4273
29189 " guestfs_list_partitions (guestfs_h *g);\n"
29194 #: ../src/guestfs-actions.pod:4280
29196 "This does not return logical volumes. For that you will need to call "
29201 #: ../src/guestfs-actions.pod:4291
29206 #: ../src/guestfs-actions.pod:4293
29210 " guestfs_ll (guestfs_h *g,\n"
29211 " const char *directory);\n"
29216 #: ../src/guestfs-actions.pod:4308
29221 #: ../src/guestfs-actions.pod:4310
29225 " guestfs_ln (guestfs_h *g,\n"
29226 " const char *target,\n"
29227 " const char *linkname);\n"
29232 #: ../src/guestfs-actions.pod:4321
29233 msgid "guestfs_ln_f"
29237 #: ../src/guestfs-actions.pod:4323
29241 " guestfs_ln_f (guestfs_h *g,\n"
29242 " const char *target,\n"
29243 " const char *linkname);\n"
29248 #: ../src/guestfs-actions.pod:4335
29249 msgid "guestfs_ln_s"
29253 #: ../src/guestfs-actions.pod:4337
29257 " guestfs_ln_s (guestfs_h *g,\n"
29258 " const char *target,\n"
29259 " const char *linkname);\n"
29264 #: ../src/guestfs-actions.pod:4348
29265 msgid "guestfs_ln_sf"
29269 #: ../src/guestfs-actions.pod:4350
29273 " guestfs_ln_sf (guestfs_h *g,\n"
29274 " const char *target,\n"
29275 " const char *linkname);\n"
29280 #: ../src/guestfs-actions.pod:4362
29281 msgid "guestfs_lremovexattr"
29285 #: ../src/guestfs-actions.pod:4364
29289 " guestfs_lremovexattr (guestfs_h *g,\n"
29290 " const char *xattr,\n"
29291 " const char *path);\n"
29296 #: ../src/guestfs-actions.pod:4369
29298 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29299 "link, then it removes an extended attribute of the link itself."
29303 #: ../src/guestfs-actions.pod:4377
29308 #: ../src/guestfs-actions.pod:4379
29312 " guestfs_ls (guestfs_h *g,\n"
29313 " const char *directory);\n"
29318 #: ../src/guestfs-actions.pod:4387
29320 "This command is mostly useful for interactive sessions. Programs should "
29321 "probably use C<guestfs_readdir> instead."
29325 #: ../src/guestfs-actions.pod:4396
29326 msgid "guestfs_lsetxattr"
29330 #: ../src/guestfs-actions.pod:4398
29334 " guestfs_lsetxattr (guestfs_h *g,\n"
29335 " const char *xattr,\n"
29336 " const char *val,\n"
29338 " const char *path);\n"
29343 #: ../src/guestfs-actions.pod:4405
29345 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29346 "then it sets an extended attribute of the link itself."
29350 #: ../src/guestfs-actions.pod:4413
29351 msgid "guestfs_lstat"
29355 #: ../src/guestfs-actions.pod:4415
29358 " struct guestfs_stat *\n"
29359 " guestfs_lstat (guestfs_h *g,\n"
29360 " const char *path);\n"
29365 #: ../src/guestfs-actions.pod:4421
29367 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29368 "link, then the link is stat-ed, not the file it refers to."
29372 #: ../src/guestfs-actions.pod:4427 ../src/guestfs-actions.pod:7204
29374 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29375 "error. I<The caller must call C<guestfs_free_stat> after use>."
29379 #: ../src/guestfs-actions.pod:4431 ../src/guestfs-actions.pod:7208
29380 #: ../src/guestfs-actions.pod:7226 ../src/guestfs-actions.pod:7607
29381 msgid "(Added in 0.9.2)"
29385 #: ../src/guestfs-actions.pod:4433
29386 msgid "guestfs_lstatlist"
29390 #: ../src/guestfs-actions.pod:4435
29393 " struct guestfs_stat_list *\n"
29394 " guestfs_lstatlist (guestfs_h *g,\n"
29395 " const char *path,\n"
29396 " char *const *names);\n"
29401 #: ../src/guestfs-actions.pod:4440
29403 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29404 "files, where all files are in the directory C<path>. C<names> is the list "
29405 "of files from this directory."
29409 #: ../src/guestfs-actions.pod:4449
29411 "This call is intended for programs that want to efficiently list a directory "
29412 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
29413 "for a similarly efficient call for getting extended attributes. Very long "
29414 "directory listings might cause the protocol message size to be exceeded, "
29415 "causing this call to fail. The caller must split up such requests into "
29416 "smaller groups of names."
29420 #: ../src/guestfs-actions.pod:4457
29422 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29423 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29427 #: ../src/guestfs-actions.pod:4463
29428 msgid "guestfs_luks_add_key"
29432 #: ../src/guestfs-actions.pod:4465
29436 " guestfs_luks_add_key (guestfs_h *g,\n"
29437 " const char *device,\n"
29438 " const char *key,\n"
29439 " const char *newkey,\n"
29445 #: ../src/guestfs-actions.pod:4477
29447 "Note that if C<keyslot> already contains a key, then this command will "
29448 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
29452 #: ../src/guestfs-actions.pod:4483 ../src/guestfs-actions.pod:4520
29453 #: ../src/guestfs-actions.pod:4540 ../src/guestfs-actions.pod:4560
29454 #: ../src/guestfs-actions.pod:4595 ../src/guestfs-actions.pod:4614
29456 "This function takes a key or passphrase parameter which could contain "
29457 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29462 #: ../src/guestfs-actions.pod:4487 ../src/guestfs-actions.pod:4524
29463 #: ../src/guestfs-actions.pod:4544 ../src/guestfs-actions.pod:4564
29464 msgid "(Added in 1.5.2)"
29468 #: ../src/guestfs-actions.pod:4489
29469 msgid "guestfs_luks_close"
29473 #: ../src/guestfs-actions.pod:4491
29477 " guestfs_luks_close (guestfs_h *g,\n"
29478 " const char *device);\n"
29483 #: ../src/guestfs-actions.pod:4495
29485 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29486 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
29487 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
29488 "underlying block device."
29492 #: ../src/guestfs-actions.pod:4503 ../src/guestfs-actions.pod:4599
29493 #: ../src/guestfs-actions.pod:4618 ../src/guestfs-actions.pod:4668
29494 #: ../src/guestfs-actions.pod:4713
29495 msgid "(Added in 1.5.1)"
29499 #: ../src/guestfs-actions.pod:4505
29500 msgid "guestfs_luks_format"
29504 #: ../src/guestfs-actions.pod:4507
29508 " guestfs_luks_format (guestfs_h *g,\n"
29509 " const char *device,\n"
29510 " const char *key,\n"
29516 #: ../src/guestfs-actions.pod:4526
29517 msgid "guestfs_luks_format_cipher"
29521 #: ../src/guestfs-actions.pod:4528
29525 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29526 " const char *device,\n"
29527 " const char *key,\n"
29529 " const char *cipher);\n"
29534 #: ../src/guestfs-actions.pod:4535
29536 "This command is the same as C<guestfs_luks_format> but it also allows you to "
29537 "set the C<cipher> used."
29541 #: ../src/guestfs-actions.pod:4546
29542 msgid "guestfs_luks_kill_slot"
29546 #: ../src/guestfs-actions.pod:4548
29550 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29551 " const char *device,\n"
29552 " const char *key,\n"
29558 #: ../src/guestfs-actions.pod:4566
29559 msgid "guestfs_luks_open"
29563 #: ../src/guestfs-actions.pod:4568
29567 " guestfs_luks_open (guestfs_h *g,\n"
29568 " const char *device,\n"
29569 " const char *key,\n"
29570 " const char *mapname);\n"
29575 #: ../src/guestfs-actions.pod:4586
29577 "If this block device contains LVM volume groups, then calling "
29578 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29583 #: ../src/guestfs-actions.pod:4590
29584 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29588 #: ../src/guestfs-actions.pod:4601
29589 msgid "guestfs_luks_open_ro"
29593 #: ../src/guestfs-actions.pod:4603
29597 " guestfs_luks_open_ro (guestfs_h *g,\n"
29598 " const char *device,\n"
29599 " const char *key,\n"
29600 " const char *mapname);\n"
29605 #: ../src/guestfs-actions.pod:4609
29607 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29612 #: ../src/guestfs-actions.pod:4620
29613 msgid "guestfs_lvcreate"
29617 #: ../src/guestfs-actions.pod:4622
29621 " guestfs_lvcreate (guestfs_h *g,\n"
29622 " const char *logvol,\n"
29623 " const char *volgroup,\n"
29629 #: ../src/guestfs-actions.pod:4635
29630 msgid "guestfs_lvm_canonical_lv_name"
29634 #: ../src/guestfs-actions.pod:4637
29638 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29639 " const char *lvname);\n"
29644 #: ../src/guestfs-actions.pod:4648
29645 msgid "See also C<guestfs_is_lv>."
29649 #: ../src/guestfs-actions.pod:4653
29650 msgid "(Added in 1.5.24)"
29654 #: ../src/guestfs-actions.pod:4655
29655 msgid "guestfs_lvm_clear_filter"
29659 #: ../src/guestfs-actions.pod:4657
29663 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29668 #: ../src/guestfs-actions.pod:4660
29670 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29671 "see every block device."
29675 #: ../src/guestfs-actions.pod:4670
29676 msgid "guestfs_lvm_remove_all"
29680 #: ../src/guestfs-actions.pod:4672
29684 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29689 #: ../src/guestfs-actions.pod:4682
29690 msgid "guestfs_lvm_set_filter"
29694 #: ../src/guestfs-actions.pod:4684
29698 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29699 " char *const *devices);\n"
29704 #: ../src/guestfs-actions.pod:4715
29705 msgid "guestfs_lvremove"
29709 #: ../src/guestfs-actions.pod:4717
29713 " guestfs_lvremove (guestfs_h *g,\n"
29714 " const char *device);\n"
29719 #: ../src/guestfs-actions.pod:4729 ../src/guestfs-actions.pod:6139
29720 #: ../src/guestfs-actions.pod:7977
29721 msgid "(Added in 1.0.13)"
29725 #: ../src/guestfs-actions.pod:4731
29726 msgid "guestfs_lvrename"
29730 #: ../src/guestfs-actions.pod:4733
29734 " guestfs_lvrename (guestfs_h *g,\n"
29735 " const char *logvol,\n"
29736 " const char *newlogvol);\n"
29741 #: ../src/guestfs-actions.pod:4742 ../src/guestfs-actions.pod:7990
29742 msgid "(Added in 1.0.83)"
29746 #: ../src/guestfs-actions.pod:4744
29747 msgid "guestfs_lvresize"
29751 #: ../src/guestfs-actions.pod:4746
29755 " guestfs_lvresize (guestfs_h *g,\n"
29756 " const char *device,\n"
29762 #: ../src/guestfs-actions.pod:4759
29763 msgid "guestfs_lvresize_free"
29767 #: ../src/guestfs-actions.pod:4761
29771 " guestfs_lvresize_free (guestfs_h *g,\n"
29772 " const char *lv,\n"
29778 #: ../src/guestfs-actions.pod:4774
29779 msgid "(Added in 1.3.3)"
29783 #: ../src/guestfs-actions.pod:4776
29784 msgid "guestfs_lvs"
29788 #: ../src/guestfs-actions.pod:4778
29792 " guestfs_lvs (guestfs_h *g);\n"
29797 #: ../src/guestfs-actions.pod:4787
29798 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29802 #: ../src/guestfs-actions.pod:4795
29803 msgid "guestfs_lvs_full"
29807 #: ../src/guestfs-actions.pod:4797
29810 " struct guestfs_lvm_lv_list *\n"
29811 " guestfs_lvs_full (guestfs_h *g);\n"
29816 #: ../src/guestfs-actions.pod:4803
29818 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29819 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
29823 #: ../src/guestfs-actions.pod:4809
29824 msgid "guestfs_lvuuid"
29828 #: ../src/guestfs-actions.pod:4811
29832 " guestfs_lvuuid (guestfs_h *g,\n"
29833 " const char *device);\n"
29838 #: ../src/guestfs-actions.pod:4822
29839 msgid "guestfs_lxattrlist"
29843 #: ../src/guestfs-actions.pod:4824
29846 " struct guestfs_xattr_list *\n"
29847 " guestfs_lxattrlist (guestfs_h *g,\n"
29848 " const char *path,\n"
29849 " char *const *names);\n"
29854 #: ../src/guestfs-actions.pod:4843
29856 "This call is intended for programs that want to efficiently list a directory "
29857 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
29858 "a similarly efficient call for getting standard stats. Very long directory "
29859 "listings might cause the protocol message size to be exceeded, causing this "
29860 "call to fail. The caller must split up such requests into smaller groups of "
29865 #: ../src/guestfs-actions.pod:4857
29866 msgid "guestfs_mkdir"
29870 #: ../src/guestfs-actions.pod:4859
29874 " guestfs_mkdir (guestfs_h *g,\n"
29875 " const char *path);\n"
29880 #: ../src/guestfs-actions.pod:4869
29881 msgid "guestfs_mkdir_mode"
29885 #: ../src/guestfs-actions.pod:4871
29889 " guestfs_mkdir_mode (guestfs_h *g,\n"
29890 " const char *path,\n"
29896 #: ../src/guestfs-actions.pod:4883
29897 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
29901 #: ../src/guestfs-actions.pod:4889
29902 msgid "guestfs_mkdir_p"
29906 #: ../src/guestfs-actions.pod:4891
29910 " guestfs_mkdir_p (guestfs_h *g,\n"
29911 " const char *path);\n"
29916 #: ../src/guestfs-actions.pod:4902
29917 msgid "guestfs_mkdtemp"
29921 #: ../src/guestfs-actions.pod:4904
29925 " guestfs_mkdtemp (guestfs_h *g,\n"
29926 " const char *template);\n"
29931 #: ../src/guestfs-actions.pod:4932
29932 msgid "guestfs_mke2fs_J"
29936 #: ../src/guestfs-actions.pod:4934
29940 " guestfs_mke2fs_J (guestfs_h *g,\n"
29941 " const char *fstype,\n"
29942 " int blocksize,\n"
29943 " const char *device,\n"
29944 " const char *journal);\n"
29949 #: ../src/guestfs-actions.pod:4947
29950 msgid "See also C<guestfs_mke2journal>."
29954 #: ../src/guestfs-actions.pod:4951 ../src/guestfs-actions.pod:4969
29955 #: ../src/guestfs-actions.pod:4987 ../src/guestfs-actions.pod:5003
29956 #: ../src/guestfs-actions.pod:5017 ../src/guestfs-actions.pod:5031
29957 #: ../src/guestfs-actions.pod:5090 ../src/guestfs-actions.pod:5367
29958 msgid "(Added in 1.0.68)"
29962 #: ../src/guestfs-actions.pod:4953
29963 msgid "guestfs_mke2fs_JL"
29967 #: ../src/guestfs-actions.pod:4955
29971 " guestfs_mke2fs_JL (guestfs_h *g,\n"
29972 " const char *fstype,\n"
29973 " int blocksize,\n"
29974 " const char *device,\n"
29975 " const char *label);\n"
29980 #: ../src/guestfs-actions.pod:4965
29981 msgid "See also C<guestfs_mke2journal_L>."
29985 #: ../src/guestfs-actions.pod:4971
29986 msgid "guestfs_mke2fs_JU"
29990 #: ../src/guestfs-actions.pod:4973
29994 " guestfs_mke2fs_JU (guestfs_h *g,\n"
29995 " const char *fstype,\n"
29996 " int blocksize,\n"
29997 " const char *device,\n"
29998 " const char *uuid);\n"
30003 #: ../src/guestfs-actions.pod:4983
30004 msgid "See also C<guestfs_mke2journal_U>."
30008 #: ../src/guestfs-actions.pod:4989
30009 msgid "guestfs_mke2journal"
30013 #: ../src/guestfs-actions.pod:4991
30017 " guestfs_mke2journal (guestfs_h *g,\n"
30018 " int blocksize,\n"
30019 " const char *device);\n"
30024 #: ../src/guestfs-actions.pod:5005
30025 msgid "guestfs_mke2journal_L"
30029 #: ../src/guestfs-actions.pod:5007
30033 " guestfs_mke2journal_L (guestfs_h *g,\n"
30034 " int blocksize,\n"
30035 " const char *label,\n"
30036 " const char *device);\n"
30041 #: ../src/guestfs-actions.pod:5019
30042 msgid "guestfs_mke2journal_U"
30046 #: ../src/guestfs-actions.pod:5021
30050 " guestfs_mke2journal_U (guestfs_h *g,\n"
30051 " int blocksize,\n"
30052 " const char *uuid,\n"
30053 " const char *device);\n"
30058 #: ../src/guestfs-actions.pod:5033
30059 msgid "guestfs_mkfifo"
30063 #: ../src/guestfs-actions.pod:5035
30067 " guestfs_mkfifo (guestfs_h *g,\n"
30069 " const char *path);\n"
30074 #: ../src/guestfs-actions.pod:5040
30076 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
30077 "is just a convenient wrapper around C<guestfs_mknod>."
30081 #: ../src/guestfs-actions.pod:5050
30082 msgid "guestfs_mkfs"
30086 #: ../src/guestfs-actions.pod:5052
30090 " guestfs_mkfs (guestfs_h *g,\n"
30091 " const char *fstype,\n"
30092 " const char *device);\n"
30097 #: ../src/guestfs-actions.pod:5065
30098 msgid "guestfs_mkfs_b"
30102 #: ../src/guestfs-actions.pod:5067
30106 " guestfs_mkfs_b (guestfs_h *g,\n"
30107 " const char *fstype,\n"
30108 " int blocksize,\n"
30109 " const char *device);\n"
30114 #: ../src/guestfs-actions.pod:5073
30116 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
30121 #: ../src/guestfs-actions.pod:5080
30123 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
30124 "block size of the resulting filesystem. Supported block sizes depend on the "
30125 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
30129 #: ../src/guestfs-actions.pod:5092
30130 msgid "guestfs_mkfs_opts"
30134 #: ../src/guestfs-actions.pod:5094
30138 " guestfs_mkfs_opts (guestfs_h *g,\n"
30139 " const char *fstype,\n"
30140 " const char *device,\n"
30146 #: ../src/guestfs-actions.pod:5105
30149 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
30150 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
30151 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
30152 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
30157 #: ../src/guestfs-actions.pod:5153
30158 msgid "(Added in 1.7.19)"
30162 #: ../src/guestfs-actions.pod:5155
30163 msgid "guestfs_mkfs_opts_va"
30167 #: ../src/guestfs-actions.pod:5157
30171 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
30172 " const char *fstype,\n"
30173 " const char *device,\n"
30174 " va_list args);\n"
30179 #: ../src/guestfs-actions.pod:5163
30180 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
30184 #: ../src/guestfs-actions.pod:5167
30185 msgid "guestfs_mkfs_opts_argv"
30189 #: ../src/guestfs-actions.pod:5169
30193 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
30194 " const char *fstype,\n"
30195 " const char *device,\n"
30196 " const struct guestfs_mkfs_opts_argv *optargs);\n"
30201 #: ../src/guestfs-actions.pod:5175
30202 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
30206 #: ../src/guestfs-actions.pod:5179
30207 msgid "guestfs_mkmountpoint"
30211 #: ../src/guestfs-actions.pod:5181
30215 " guestfs_mkmountpoint (guestfs_h *g,\n"
30216 " const char *exemptpath);\n"
30221 #: ../src/guestfs-actions.pod:5185
30223 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
30224 "that can be used to create extra mountpoints before mounting the first "
30229 #: ../src/guestfs-actions.pod:5209
30231 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
30232 "may get unexpected errors if you try to mix these calls. It is safest to "
30233 "manually unmount filesystems and remove mountpoints after use."
30237 #: ../src/guestfs-actions.pod:5213
30239 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
30240 "first, so for this to work for manual mountpoints, you must ensure that the "
30241 "innermost mountpoints have the longest pathnames, as in the example code "
30246 #: ../src/guestfs-actions.pod:5220
30248 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
30249 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
30250 "can also trigger these issues."
30254 #: ../src/guestfs-actions.pod:5226 ../src/guestfs-actions.pod:5532
30255 #: ../src/guestfs-actions.pod:6559
30256 msgid "(Added in 1.0.62)"
30260 #: ../src/guestfs-actions.pod:5228
30261 msgid "guestfs_mknod"
30265 #: ../src/guestfs-actions.pod:5230
30269 " guestfs_mknod (guestfs_h *g,\n"
30273 " const char *path);\n"
30278 #: ../src/guestfs-actions.pod:5245
30280 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30281 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30282 "regular file). These constants are available in the standard Linux header "
30283 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30284 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
30285 "the appropriate constant for you."
30289 #: ../src/guestfs-actions.pod:5259
30290 msgid "guestfs_mknod_b"
30294 #: ../src/guestfs-actions.pod:5261
30298 " guestfs_mknod_b (guestfs_h *g,\n"
30302 " const char *path);\n"
30307 #: ../src/guestfs-actions.pod:5268
30309 "This call creates a block device node called C<path> with mode C<mode> and "
30310 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30311 "wrapper around C<guestfs_mknod>."
30315 #: ../src/guestfs-actions.pod:5278
30316 msgid "guestfs_mknod_c"
30320 #: ../src/guestfs-actions.pod:5280
30324 " guestfs_mknod_c (guestfs_h *g,\n"
30328 " const char *path);\n"
30333 #: ../src/guestfs-actions.pod:5287
30335 "This call creates a char device node called C<path> with mode C<mode> and "
30336 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30337 "wrapper around C<guestfs_mknod>."
30341 #: ../src/guestfs-actions.pod:5297
30342 msgid "guestfs_mkswap"
30346 #: ../src/guestfs-actions.pod:5299
30350 " guestfs_mkswap (guestfs_h *g,\n"
30351 " const char *device);\n"
30356 #: ../src/guestfs-actions.pod:5309
30357 msgid "guestfs_mkswap_L"
30361 #: ../src/guestfs-actions.pod:5311
30365 " guestfs_mkswap_L (guestfs_h *g,\n"
30366 " const char *label,\n"
30367 " const char *device);\n"
30372 #: ../src/guestfs-actions.pod:5326
30373 msgid "guestfs_mkswap_U"
30377 #: ../src/guestfs-actions.pod:5328
30381 " guestfs_mkswap_U (guestfs_h *g,\n"
30382 " const char *uuid,\n"
30383 " const char *device);\n"
30388 #: ../src/guestfs-actions.pod:5339
30389 msgid "guestfs_mkswap_file"
30393 #: ../src/guestfs-actions.pod:5341
30397 " guestfs_mkswap_file (guestfs_h *g,\n"
30398 " const char *path);\n"
30403 #: ../src/guestfs-actions.pod:5347
30405 "This command just writes a swap file signature to an existing file. To "
30406 "create the file itself, use something like C<guestfs_fallocate>."
30410 #: ../src/guestfs-actions.pod:5354
30411 msgid "guestfs_modprobe"
30415 #: ../src/guestfs-actions.pod:5356
30419 " guestfs_modprobe (guestfs_h *g,\n"
30420 " const char *modulename);\n"
30425 #: ../src/guestfs-actions.pod:5369
30426 msgid "guestfs_mount"
30430 #: ../src/guestfs-actions.pod:5371
30434 " guestfs_mount (guestfs_h *g,\n"
30435 " const char *device,\n"
30436 " const char *mountpoint);\n"
30441 #: ../src/guestfs-actions.pod:5390
30443 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30444 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30445 "problems for users. If your program might need to work with older versions "
30446 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30447 "for the first parameter if you don't want any options)."
30451 #: ../src/guestfs-actions.pod:5401
30452 msgid "guestfs_mount_9p"
30456 #: ../src/guestfs-actions.pod:5403
30460 " guestfs_mount_9p (guestfs_h *g,\n"
30461 " const char *mounttag,\n"
30462 " const char *mountpoint,\n"
30468 #: ../src/guestfs-actions.pod:5414
30471 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30476 #: ../src/guestfs-actions.pod:5427
30477 msgid "guestfs_mount_9p_va"
30481 #: ../src/guestfs-actions.pod:5429
30485 " guestfs_mount_9p_va (guestfs_h *g,\n"
30486 " const char *mounttag,\n"
30487 " const char *mountpoint,\n"
30488 " va_list args);\n"
30493 #: ../src/guestfs-actions.pod:5435
30494 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30498 #: ../src/guestfs-actions.pod:5439
30499 msgid "guestfs_mount_9p_argv"
30503 #: ../src/guestfs-actions.pod:5441
30507 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30508 " const char *mounttag,\n"
30509 " const char *mountpoint,\n"
30510 " const struct guestfs_mount_9p_argv *optargs);\n"
30515 #: ../src/guestfs-actions.pod:5447
30516 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30520 #: ../src/guestfs-actions.pod:5451
30521 msgid "guestfs_mount_loop"
30525 #: ../src/guestfs-actions.pod:5453
30529 " guestfs_mount_loop (guestfs_h *g,\n"
30530 " const char *file,\n"
30531 " const char *mountpoint);\n"
30536 #: ../src/guestfs-actions.pod:5466
30537 msgid "guestfs_mount_options"
30541 #: ../src/guestfs-actions.pod:5468
30545 " guestfs_mount_options (guestfs_h *g,\n"
30546 " const char *options,\n"
30547 " const char *device,\n"
30548 " const char *mountpoint);\n"
30553 #: ../src/guestfs-actions.pod:5474
30555 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30556 "the mount options as for the L<mount(8)> I<-o> flag."
30560 #: ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:5498
30561 #: ../src/guestfs-actions.pod:5515
30562 msgid "(Added in 1.0.10)"
30566 #: ../src/guestfs-actions.pod:5486
30567 msgid "guestfs_mount_ro"
30571 #: ../src/guestfs-actions.pod:5488
30575 " guestfs_mount_ro (guestfs_h *g,\n"
30576 " const char *device,\n"
30577 " const char *mountpoint);\n"
30582 #: ../src/guestfs-actions.pod:5493
30584 "This is the same as the C<guestfs_mount> command, but it mounts the "
30585 "filesystem with the read-only (I<-o ro>) flag."
30589 #: ../src/guestfs-actions.pod:5500
30590 msgid "guestfs_mount_vfs"
30594 #: ../src/guestfs-actions.pod:5502
30598 " guestfs_mount_vfs (guestfs_h *g,\n"
30599 " const char *options,\n"
30600 " const char *vfstype,\n"
30601 " const char *device,\n"
30602 " const char *mountpoint);\n"
30607 #: ../src/guestfs-actions.pod:5509
30609 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30610 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
30615 #: ../src/guestfs-actions.pod:5517
30616 msgid "guestfs_mountpoints"
30620 #: ../src/guestfs-actions.pod:5519
30624 " guestfs_mountpoints (guestfs_h *g);\n"
30629 #: ../src/guestfs-actions.pod:5522
30631 "This call is similar to C<guestfs_mounts>. That call returns a list of "
30632 "devices. This one returns a hash table (map) of device name to directory "
30633 "where the device is mounted."
30637 #: ../src/guestfs-actions.pod:5534
30638 msgid "guestfs_mounts"
30642 #: ../src/guestfs-actions.pod:5536
30646 " guestfs_mounts (guestfs_h *g);\n"
30651 #: ../src/guestfs-actions.pod:5544
30652 msgid "See also: C<guestfs_mountpoints>"
30656 #: ../src/guestfs-actions.pod:5552
30661 #: ../src/guestfs-actions.pod:5554
30665 " guestfs_mv (guestfs_h *g,\n"
30666 " const char *src,\n"
30667 " const char *dest);\n"
30672 #: ../src/guestfs-actions.pod:5566
30673 msgid "guestfs_ntfs_3g_probe"
30677 #: ../src/guestfs-actions.pod:5568
30681 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
30683 " const char *device);\n"
30688 #: ../src/guestfs-actions.pod:5587
30689 msgid "(Added in 1.0.43)"
30693 #: ../src/guestfs-actions.pod:5589
30694 msgid "guestfs_ntfsresize"
30698 #: ../src/guestfs-actions.pod:5591
30702 " guestfs_ntfsresize (guestfs_h *g,\n"
30703 " const char *device);\n"
30708 #: ../src/guestfs-actions.pod:5595 ../src/guestfs-actions.pod:5695
30710 "I<This function is deprecated.> In new code, use the L</"
30711 "guestfs_ntfsresize_opts> call instead."
30715 #: ../src/guestfs-actions.pod:5619
30716 msgid "guestfs_ntfsresize_opts"
30720 #: ../src/guestfs-actions.pod:5621
30724 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
30725 " const char *device,\n"
30731 #: ../src/guestfs-actions.pod:5631
30734 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
30735 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
30740 #: ../src/guestfs-actions.pod:5651
30742 "After the resize operation, the filesystem is always marked as requiring a "
30743 "consistency check (for safety). You have to boot into Windows to perform "
30744 "this check and clear this condition. If you I<don't> set the C<force> "
30745 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
30746 "times on a single filesystem without booting into Windows between each "
30751 #: ../src/guestfs-actions.pod:5666
30752 msgid "guestfs_ntfsresize_opts_va"
30756 #: ../src/guestfs-actions.pod:5668
30760 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
30761 " const char *device,\n"
30762 " va_list args);\n"
30767 #: ../src/guestfs-actions.pod:5673
30768 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
30772 #: ../src/guestfs-actions.pod:5677
30773 msgid "guestfs_ntfsresize_opts_argv"
30777 #: ../src/guestfs-actions.pod:5679
30781 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30782 " const char *device,\n"
30783 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
30788 #: ../src/guestfs-actions.pod:5684
30789 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30793 #: ../src/guestfs-actions.pod:5688
30794 msgid "guestfs_ntfsresize_size"
30798 #: ../src/guestfs-actions.pod:5690
30802 " guestfs_ntfsresize_size (guestfs_h *g,\n"
30803 " const char *device,\n"
30804 " int64_t size);\n"
30809 #: ../src/guestfs-actions.pod:5702
30811 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
30812 "to specify the new size (in bytes) explicitly."
30816 #: ../src/guestfs-actions.pod:5707 ../src/guestfs-actions.pod:6166
30817 #: ../src/guestfs-actions.pod:6239 ../src/guestfs-actions.pod:6507
30818 #: ../src/guestfs-actions.pod:8134
30819 msgid "(Added in 1.3.14)"
30823 #: ../src/guestfs-actions.pod:5709
30824 msgid "guestfs_part_add"
30828 #: ../src/guestfs-actions.pod:5711
30832 " guestfs_part_add (guestfs_h *g,\n"
30833 " const char *device,\n"
30834 " const char *prlogex,\n"
30835 " int64_t startsect,\n"
30836 " int64_t endsect);\n"
30841 #: ../src/guestfs-actions.pod:5718
30843 "This command adds a partition to C<device>. If there is no partition table "
30844 "on the device, call C<guestfs_part_init> first."
30848 #: ../src/guestfs-actions.pod:5730
30850 "Creating a partition which covers the whole disk is not so easy. Use "
30851 "C<guestfs_part_disk> to do that."
30855 #: ../src/guestfs-actions.pod:5735 ../src/guestfs-actions.pod:5770
30856 #: ../src/guestfs-actions.pod:5823 ../src/guestfs-actions.pod:5907
30857 #: ../src/guestfs-actions.pod:5945 ../src/guestfs-actions.pod:5964
30858 #: ../src/guestfs-actions.pod:6004
30859 msgid "(Added in 1.0.78)"
30863 #: ../src/guestfs-actions.pod:5737
30864 msgid "guestfs_part_del"
30868 #: ../src/guestfs-actions.pod:5739
30872 " guestfs_part_del (guestfs_h *g,\n"
30873 " const char *device,\n"
30879 #: ../src/guestfs-actions.pod:5754
30880 msgid "guestfs_part_disk"
30884 #: ../src/guestfs-actions.pod:5756
30888 " guestfs_part_disk (guestfs_h *g,\n"
30889 " const char *device,\n"
30890 " const char *parttype);\n"
30895 #: ../src/guestfs-actions.pod:5761
30897 "This command is simply a combination of C<guestfs_part_init> followed by "
30898 "C<guestfs_part_add> to create a single primary partition covering the whole "
30903 #: ../src/guestfs-actions.pod:5765
30905 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
30906 "possible values are described in C<guestfs_part_init>."
30910 #: ../src/guestfs-actions.pod:5772
30911 msgid "guestfs_part_get_bootable"
30915 #: ../src/guestfs-actions.pod:5774
30919 " guestfs_part_get_bootable (guestfs_h *g,\n"
30920 " const char *device,\n"
30926 #: ../src/guestfs-actions.pod:5782
30927 msgid "See also C<guestfs_part_set_bootable>."
30931 #: ../src/guestfs-actions.pod:5788
30932 msgid "guestfs_part_get_mbr_id"
30936 #: ../src/guestfs-actions.pod:5790
30940 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
30941 " const char *device,\n"
30947 #: ../src/guestfs-actions.pod:5798 ../src/guestfs-actions.pod:5980
30949 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
30950 "undefined results for other partition table types (see "
30951 "C<guestfs_part_get_parttype>)."
30955 #: ../src/guestfs-actions.pod:5806
30956 msgid "guestfs_part_get_parttype"
30960 #: ../src/guestfs-actions.pod:5808
30964 " guestfs_part_get_parttype (guestfs_h *g,\n"
30965 " const char *device);\n"
30970 #: ../src/guestfs-actions.pod:5815
30972 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30973 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30974 "possible, although unusual. See C<guestfs_part_init> for a full list."
30978 #: ../src/guestfs-actions.pod:5825
30979 msgid "guestfs_part_init"
30983 #: ../src/guestfs-actions.pod:5827
30987 " guestfs_part_init (guestfs_h *g,\n"
30988 " const char *device,\n"
30989 " const char *parttype);\n"
30994 #: ../src/guestfs-actions.pod:5836
30996 "Initially there are no partitions. Following this, you should call "
30997 "C<guestfs_part_add> for each partition required."
31001 #: ../src/guestfs-actions.pod:5909
31002 msgid "guestfs_part_list"
31006 #: ../src/guestfs-actions.pod:5911
31009 " struct guestfs_partition_list *\n"
31010 " guestfs_part_list (guestfs_h *g,\n"
31011 " const char *device);\n"
31016 #: ../src/guestfs-actions.pod:5928
31018 "Start of the partition I<in bytes>. To get sectors you have to divide by "
31019 "the device's sector size, see C<guestfs_blockdev_getss>."
31023 #: ../src/guestfs-actions.pod:5941
31025 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
31026 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
31031 #: ../src/guestfs-actions.pod:5947
31032 msgid "guestfs_part_set_bootable"
31036 #: ../src/guestfs-actions.pod:5949
31040 " guestfs_part_set_bootable (guestfs_h *g,\n"
31041 " const char *device,\n"
31043 " int bootable);\n"
31048 #: ../src/guestfs-actions.pod:5966
31049 msgid "guestfs_part_set_mbr_id"
31053 #: ../src/guestfs-actions.pod:5968
31057 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
31058 " const char *device,\n"
31065 #: ../src/guestfs-actions.pod:5988
31066 msgid "guestfs_part_set_name"
31070 #: ../src/guestfs-actions.pod:5990
31074 " guestfs_part_set_name (guestfs_h *g,\n"
31075 " const char *device,\n"
31077 " const char *name);\n"
31082 #: ../src/guestfs-actions.pod:6006
31083 msgid "guestfs_part_to_dev"
31087 #: ../src/guestfs-actions.pod:6008
31091 " guestfs_part_to_dev (guestfs_h *g,\n"
31092 " const char *partition);\n"
31097 #: ../src/guestfs-actions.pod:6016 ../src/guestfs-actions.pod:6035
31099 "The named partition must exist, for example as a string returned from "
31100 "C<guestfs_list_partitions>."
31104 #: ../src/guestfs-actions.pod:6019
31105 msgid "See also C<guestfs_part_to_partnum>."
31109 #: ../src/guestfs-actions.pod:6026
31110 msgid "guestfs_part_to_partnum"
31114 #: ../src/guestfs-actions.pod:6028
31118 " guestfs_part_to_partnum (guestfs_h *g,\n"
31119 " const char *partition);\n"
31124 #: ../src/guestfs-actions.pod:6038
31125 msgid "See also C<guestfs_part_to_dev>."
31129 #: ../src/guestfs-actions.pod:6044
31130 msgid "guestfs_ping_daemon"
31134 #: ../src/guestfs-actions.pod:6046
31138 " guestfs_ping_daemon (guestfs_h *g);\n"
31143 #: ../src/guestfs-actions.pod:6058
31144 msgid "guestfs_pread"
31148 #: ../src/guestfs-actions.pod:6060
31152 " guestfs_pread (guestfs_h *g,\n"
31153 " const char *path,\n"
31155 " int64_t offset,\n"
31156 " size_t *size_r);\n"
31161 #: ../src/guestfs-actions.pod:6073
31162 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
31166 #: ../src/guestfs-actions.pod:6084
31167 msgid "guestfs_pread_device"
31171 #: ../src/guestfs-actions.pod:6086
31175 " guestfs_pread_device (guestfs_h *g,\n"
31176 " const char *device,\n"
31178 " int64_t offset,\n"
31179 " size_t *size_r);\n"
31184 #: ../src/guestfs-actions.pod:6099
31185 msgid "See also C<guestfs_pread>."
31189 #: ../src/guestfs-actions.pod:6108
31190 msgid "(Added in 1.5.21)"
31194 #: ../src/guestfs-actions.pod:6110
31195 msgid "guestfs_pvcreate"
31199 #: ../src/guestfs-actions.pod:6112
31203 " guestfs_pvcreate (guestfs_h *g,\n"
31204 " const char *device);\n"
31209 #: ../src/guestfs-actions.pod:6124
31210 msgid "guestfs_pvremove"
31214 #: ../src/guestfs-actions.pod:6126
31218 " guestfs_pvremove (guestfs_h *g,\n"
31219 " const char *device);\n"
31224 #: ../src/guestfs-actions.pod:6141
31225 msgid "guestfs_pvresize"
31229 #: ../src/guestfs-actions.pod:6143
31233 " guestfs_pvresize (guestfs_h *g,\n"
31234 " const char *device);\n"
31239 #: ../src/guestfs-actions.pod:6154
31240 msgid "guestfs_pvresize_size"
31244 #: ../src/guestfs-actions.pod:6156
31248 " guestfs_pvresize_size (guestfs_h *g,\n"
31249 " const char *device,\n"
31250 " int64_t size);\n"
31255 #: ../src/guestfs-actions.pod:6161
31257 "This command is the same as C<guestfs_pvresize> except that it allows you to "
31258 "specify the new size (in bytes) explicitly."
31262 #: ../src/guestfs-actions.pod:6168
31263 msgid "guestfs_pvs"
31267 #: ../src/guestfs-actions.pod:6170
31271 " guestfs_pvs (guestfs_h *g);\n"
31276 #: ../src/guestfs-actions.pod:6179
31277 msgid "See also C<guestfs_pvs_full>."
31281 #: ../src/guestfs-actions.pod:6187
31282 msgid "guestfs_pvs_full"
31286 #: ../src/guestfs-actions.pod:6189
31289 " struct guestfs_lvm_pv_list *\n"
31290 " guestfs_pvs_full (guestfs_h *g);\n"
31295 #: ../src/guestfs-actions.pod:6195
31297 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31298 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
31302 #: ../src/guestfs-actions.pod:6201
31303 msgid "guestfs_pvuuid"
31307 #: ../src/guestfs-actions.pod:6203
31311 " guestfs_pvuuid (guestfs_h *g,\n"
31312 " const char *device);\n"
31317 #: ../src/guestfs-actions.pod:6214
31318 msgid "guestfs_pwrite"
31322 #: ../src/guestfs-actions.pod:6216
31326 " guestfs_pwrite (guestfs_h *g,\n"
31327 " const char *path,\n"
31328 " const char *content,\n"
31329 " size_t content_size,\n"
31330 " int64_t offset);\n"
31335 #: ../src/guestfs-actions.pod:6232
31336 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31340 #: ../src/guestfs-actions.pod:6241
31341 msgid "guestfs_pwrite_device"
31345 #: ../src/guestfs-actions.pod:6243
31349 " guestfs_pwrite_device (guestfs_h *g,\n"
31350 " const char *device,\n"
31351 " const char *content,\n"
31352 " size_t content_size,\n"
31353 " int64_t offset);\n"
31358 #: ../src/guestfs-actions.pod:6258
31359 msgid "See also C<guestfs_pwrite>."
31363 #: ../src/guestfs-actions.pod:6265
31364 msgid "(Added in 1.5.20)"
31368 #: ../src/guestfs-actions.pod:6267
31369 msgid "guestfs_read_file"
31373 #: ../src/guestfs-actions.pod:6269
31377 " guestfs_read_file (guestfs_h *g,\n"
31378 " const char *path,\n"
31379 " size_t *size_r);\n"
31384 #: ../src/guestfs-actions.pod:6277
31386 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
31387 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31388 "function is limited in the total size of file that can be handled."
31392 #: ../src/guestfs-actions.pod:6289
31393 msgid "(Added in 1.0.63)"
31397 #: ../src/guestfs-actions.pod:6291
31398 msgid "guestfs_read_lines"
31402 #: ../src/guestfs-actions.pod:6293
31406 " guestfs_read_lines (guestfs_h *g,\n"
31407 " const char *path);\n"
31412 #: ../src/guestfs-actions.pod:6302
31414 "Note that this function cannot correctly handle binary files (specifically, "
31415 "files containing C<\\0> character which is treated as end of line). For "
31416 "those you need to use the C<guestfs_read_file> function which has a more "
31417 "complex interface."
31421 #: ../src/guestfs-actions.pod:6313
31422 msgid "guestfs_readdir"
31426 #: ../src/guestfs-actions.pod:6315
31429 " struct guestfs_dirent_list *\n"
31430 " guestfs_readdir (guestfs_h *g,\n"
31431 " const char *dir);\n"
31436 #: ../src/guestfs-actions.pod:6369
31438 "This function is primarily intended for use by programs. To get a simple "
31439 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31440 "consumption, use C<guestfs_ll>."
31444 #: ../src/guestfs-actions.pod:6373
31446 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31447 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
31451 #: ../src/guestfs-actions.pod:6379
31452 msgid "guestfs_readlink"
31456 #: ../src/guestfs-actions.pod:6381
31460 " guestfs_readlink (guestfs_h *g,\n"
31461 " const char *path);\n"
31466 #: ../src/guestfs-actions.pod:6392
31467 msgid "guestfs_readlinklist"
31471 #: ../src/guestfs-actions.pod:6394
31475 " guestfs_readlinklist (guestfs_h *g,\n"
31476 " const char *path,\n"
31477 " char *const *names);\n"
31482 #: ../src/guestfs-actions.pod:6427
31483 msgid "guestfs_realpath"
31487 #: ../src/guestfs-actions.pod:6429
31491 " guestfs_realpath (guestfs_h *g,\n"
31492 " const char *path);\n"
31497 #: ../src/guestfs-actions.pod:6441
31498 msgid "guestfs_removexattr"
31502 #: ../src/guestfs-actions.pod:6443
31506 " guestfs_removexattr (guestfs_h *g,\n"
31507 " const char *xattr,\n"
31508 " const char *path);\n"
31513 #: ../src/guestfs-actions.pod:6451
31514 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31518 #: ../src/guestfs-actions.pod:6457
31519 msgid "guestfs_resize2fs"
31523 #: ../src/guestfs-actions.pod:6459
31527 " guestfs_resize2fs (guestfs_h *g,\n"
31528 " const char *device);\n"
31533 #: ../src/guestfs-actions.pod:6466
31535 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31536 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31537 "sometimes gives an error about this and sometimes not. In any case, it is "
31538 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31542 #: ../src/guestfs-actions.pod:6476
31543 msgid "guestfs_resize2fs_M"
31547 #: ../src/guestfs-actions.pod:6478
31551 " guestfs_resize2fs_M (guestfs_h *g,\n"
31552 " const char *device);\n"
31557 #: ../src/guestfs-actions.pod:6482
31559 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31560 "resized to its minimum size. This works like the I<-M> option to the "
31561 "C<resize2fs> command."
31565 #: ../src/guestfs-actions.pod:6486
31567 "To get the resulting size of the filesystem you should call "
31568 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31569 "These two numbers, multiplied together, give the resulting size of the "
31570 "minimal filesystem in bytes."
31574 #: ../src/guestfs-actions.pod:6495
31575 msgid "guestfs_resize2fs_size"
31579 #: ../src/guestfs-actions.pod:6497
31583 " guestfs_resize2fs_size (guestfs_h *g,\n"
31584 " const char *device,\n"
31585 " int64_t size);\n"
31590 #: ../src/guestfs-actions.pod:6502
31592 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31593 "to specify the new size (in bytes) explicitly."
31597 #: ../src/guestfs-actions.pod:6509
31602 #: ../src/guestfs-actions.pod:6511
31606 " guestfs_rm (guestfs_h *g,\n"
31607 " const char *path);\n"
31612 #: ../src/guestfs-actions.pod:6521
31613 msgid "guestfs_rm_rf"
31617 #: ../src/guestfs-actions.pod:6523
31621 " guestfs_rm_rf (guestfs_h *g,\n"
31622 " const char *path);\n"
31627 #: ../src/guestfs-actions.pod:6535
31628 msgid "guestfs_rmdir"
31632 #: ../src/guestfs-actions.pod:6537
31636 " guestfs_rmdir (guestfs_h *g,\n"
31637 " const char *path);\n"
31642 #: ../src/guestfs-actions.pod:6547
31643 msgid "guestfs_rmmountpoint"
31647 #: ../src/guestfs-actions.pod:6549
31651 " guestfs_rmmountpoint (guestfs_h *g,\n"
31652 " const char *exemptpath);\n"
31657 #: ../src/guestfs-actions.pod:6553
31659 "This calls removes a mountpoint that was previously created with "
31660 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
31664 #: ../src/guestfs-actions.pod:6561
31665 msgid "guestfs_scrub_device"
31669 #: ../src/guestfs-actions.pod:6563
31673 " guestfs_scrub_device (guestfs_h *g,\n"
31674 " const char *device);\n"
31679 #: ../src/guestfs-actions.pod:6575 ../src/guestfs-actions.pod:6593
31680 #: ../src/guestfs-actions.pod:6612
31681 msgid "(Added in 1.0.52)"
31685 #: ../src/guestfs-actions.pod:6577
31686 msgid "guestfs_scrub_file"
31690 #: ../src/guestfs-actions.pod:6579
31694 " guestfs_scrub_file (guestfs_h *g,\n"
31695 " const char *file);\n"
31700 #: ../src/guestfs-actions.pod:6595
31701 msgid "guestfs_scrub_freespace"
31705 #: ../src/guestfs-actions.pod:6597
31709 " guestfs_scrub_freespace (guestfs_h *g,\n"
31710 " const char *dir);\n"
31715 #: ../src/guestfs-actions.pod:6601
31717 "This command creates the directory C<dir> and then fills it with files until "
31718 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
31719 "and deletes them. The intention is to scrub any free space on the partition "
31720 "containing C<dir>."
31724 #: ../src/guestfs-actions.pod:6614
31725 msgid "guestfs_set_append"
31729 #: ../src/guestfs-actions.pod:6616
31733 " guestfs_set_append (guestfs_h *g,\n"
31734 " const char *append);\n"
31739 #: ../src/guestfs-actions.pod:6633
31740 msgid "guestfs_set_attach_method"
31744 #: ../src/guestfs-actions.pod:6635
31748 " guestfs_set_attach_method (guestfs_h *g,\n"
31749 " const char *attachmethod);\n"
31754 #: ../src/guestfs-actions.pod:6663
31755 msgid "guestfs_set_autosync"
31759 #: ../src/guestfs-actions.pod:6665
31763 " guestfs_set_autosync (guestfs_h *g,\n"
31764 " int autosync);\n"
31769 #: ../src/guestfs-actions.pod:6681
31770 msgid "guestfs_set_direct"
31774 #: ../src/guestfs-actions.pod:6683
31778 " guestfs_set_direct (guestfs_h *g,\n"
31784 #: ../src/guestfs-actions.pod:6691
31786 "One consequence of this is that log messages aren't caught by the library "
31787 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
31792 #: ../src/guestfs-actions.pod:6704
31793 msgid "guestfs_set_e2label"
31797 #: ../src/guestfs-actions.pod:6706
31801 " guestfs_set_e2label (guestfs_h *g,\n"
31802 " const char *device,\n"
31803 " const char *label);\n"
31808 #: ../src/guestfs-actions.pod:6715
31810 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
31811 "the existing label on a filesystem."
31815 #: ../src/guestfs-actions.pod:6722
31816 msgid "guestfs_set_e2uuid"
31820 #: ../src/guestfs-actions.pod:6724
31824 " guestfs_set_e2uuid (guestfs_h *g,\n"
31825 " const char *device,\n"
31826 " const char *uuid);\n"
31831 #: ../src/guestfs-actions.pod:6734
31833 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
31834 "the existing UUID of a filesystem."
31838 #: ../src/guestfs-actions.pod:6741
31839 msgid "guestfs_set_memsize"
31843 #: ../src/guestfs-actions.pod:6743
31847 " guestfs_set_memsize (guestfs_h *g,\n"
31853 #: ../src/guestfs-actions.pod:6747
31855 "This sets the memory size in megabytes allocated to the qemu subprocess. "
31856 "This only has any effect if called before C<guestfs_launch>."
31860 #: ../src/guestfs-actions.pod:6762
31861 msgid "guestfs_set_network"
31865 #: ../src/guestfs-actions.pod:6764
31869 " guestfs_set_network (guestfs_h *g,\n"
31875 #: ../src/guestfs-actions.pod:6774
31877 "You must call this before calling C<guestfs_launch>, otherwise it has no "
31882 #: ../src/guestfs-actions.pod:6781
31883 msgid "guestfs_set_path"
31887 #: ../src/guestfs-actions.pod:6783
31891 " guestfs_set_path (guestfs_h *g,\n"
31892 " const char *searchpath);\n"
31897 #: ../src/guestfs-actions.pod:6798
31898 msgid "guestfs_set_pgroup"
31902 #: ../src/guestfs-actions.pod:6800
31906 " guestfs_set_pgroup (guestfs_h *g,\n"
31912 #: ../src/guestfs-actions.pod:6817
31913 msgid "guestfs_set_qemu"
31917 #: ../src/guestfs-actions.pod:6819
31921 " guestfs_set_qemu (guestfs_h *g,\n"
31922 " const char *qemu);\n"
31927 #: ../src/guestfs-actions.pod:6845
31928 msgid "guestfs_set_recovery_proc"
31932 #: ../src/guestfs-actions.pod:6847
31936 " guestfs_set_recovery_proc (guestfs_h *g,\n"
31937 " int recoveryproc);\n"
31942 #: ../src/guestfs-actions.pod:6851
31944 "If this is called with the parameter C<false> then C<guestfs_launch> does "
31945 "not create a recovery process. The purpose of the recovery process is to "
31946 "stop runaway qemu processes in the case where the main program aborts "
31951 #: ../src/guestfs-actions.pod:6856
31953 "This only has any effect if called before C<guestfs_launch>, and the default "
31958 #: ../src/guestfs-actions.pod:6869
31959 msgid "guestfs_set_selinux"
31963 #: ../src/guestfs-actions.pod:6871
31967 " guestfs_set_selinux (guestfs_h *g,\n"
31973 #: ../src/guestfs-actions.pod:6888
31974 msgid "guestfs_set_smp"
31978 #: ../src/guestfs-actions.pod:6890
31982 " guestfs_set_smp (guestfs_h *g,\n"
31988 #: ../src/guestfs-actions.pod:6898
31989 msgid "This function must be called before C<guestfs_launch>."
31993 #: ../src/guestfs-actions.pod:6904
31994 msgid "guestfs_set_trace"
31998 #: ../src/guestfs-actions.pod:6906
32002 " guestfs_set_trace (guestfs_h *g,\n"
32008 #: ../src/guestfs-actions.pod:6920
32010 "Trace messages are normally sent to C<stderr>, unless you register a "
32011 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32015 #: ../src/guestfs-actions.pod:6928
32016 msgid "guestfs_set_verbose"
32020 #: ../src/guestfs-actions.pod:6930
32024 " guestfs_set_verbose (guestfs_h *g,\n"
32030 #: ../src/guestfs-actions.pod:6939
32032 "Verbose messages are normally sent to C<stderr>, unless you register a "
32033 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32037 #: ../src/guestfs-actions.pod:6947
32038 msgid "guestfs_setcon"
32042 #: ../src/guestfs-actions.pod:6949
32046 " guestfs_setcon (guestfs_h *g,\n"
32047 " const char *context);\n"
32052 #: ../src/guestfs-actions.pod:6962
32053 msgid "guestfs_setxattr"
32057 #: ../src/guestfs-actions.pod:6964
32061 " guestfs_setxattr (guestfs_h *g,\n"
32062 " const char *xattr,\n"
32063 " const char *val,\n"
32065 " const char *path);\n"
32070 #: ../src/guestfs-actions.pod:6975
32071 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
32075 #: ../src/guestfs-actions.pod:6981
32076 msgid "guestfs_sfdisk"
32080 #: ../src/guestfs-actions.pod:6983
32084 " guestfs_sfdisk (guestfs_h *g,\n"
32085 " const char *device,\n"
32089 " char *const *lines);\n"
32094 #: ../src/guestfs-actions.pod:6991 ../src/guestfs-actions.pod:7032
32095 #: ../src/guestfs-actions.pod:7063
32097 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
32102 #: ../src/guestfs-actions.pod:7018
32104 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
32108 #: ../src/guestfs-actions.pod:7025
32109 msgid "guestfs_sfdiskM"
32113 #: ../src/guestfs-actions.pod:7027
32117 " guestfs_sfdiskM (guestfs_h *g,\n"
32118 " const char *device,\n"
32119 " char *const *lines);\n"
32124 #: ../src/guestfs-actions.pod:7039
32126 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
32127 "partition sizes are specified in megabytes only (rounded to the nearest "
32128 "cylinder) and you don't need to specify the cyls, heads and sectors "
32129 "parameters which were rarely if ever used anyway."
32133 #: ../src/guestfs-actions.pod:7045
32135 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
32136 "C<guestfs_part_disk>"
32140 #: ../src/guestfs-actions.pod:7052
32141 msgid "guestfs_sfdisk_N"
32145 #: ../src/guestfs-actions.pod:7054
32149 " guestfs_sfdisk_N (guestfs_h *g,\n"
32150 " const char *device,\n"
32155 " const char *line);\n"
32160 #: ../src/guestfs-actions.pod:7073
32162 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
32163 "for the cyls/heads/sectors parameters."
32167 #: ../src/guestfs-actions.pod:7076
32168 msgid "See also: C<guestfs_part_add>"
32172 #: ../src/guestfs-actions.pod:7082
32173 msgid "guestfs_sfdisk_disk_geometry"
32177 #: ../src/guestfs-actions.pod:7084
32181 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
32182 " const char *device);\n"
32187 #: ../src/guestfs-actions.pod:7088
32189 "This displays the disk geometry of C<device> read from the partition table. "
32190 "Especially in the case where the underlying block device has been resized, "
32191 "this can be different from the kernel's idea of the geometry (see "
32192 "C<guestfs_sfdisk_kernel_geometry>)."
32196 #: ../src/guestfs-actions.pod:7101
32197 msgid "guestfs_sfdisk_kernel_geometry"
32201 #: ../src/guestfs-actions.pod:7103
32205 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
32206 " const char *device);\n"
32211 #: ../src/guestfs-actions.pod:7117
32212 msgid "guestfs_sfdisk_l"
32216 #: ../src/guestfs-actions.pod:7119
32220 " guestfs_sfdisk_l (guestfs_h *g,\n"
32221 " const char *device);\n"
32226 #: ../src/guestfs-actions.pod:7123
32228 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
32233 #: ../src/guestfs-actions.pod:7134
32234 msgid "See also: C<guestfs_part_list>"
32238 #: ../src/guestfs-actions.pod:7141
32243 #: ../src/guestfs-actions.pod:7143
32247 " guestfs_sh (guestfs_h *g,\n"
32248 " const char *command);\n"
32253 #: ../src/guestfs-actions.pod:7150
32254 msgid "This is like C<guestfs_command>, but passes the command to:"
32258 #: ../src/guestfs-actions.pod:7158
32259 msgid "All the provisos about C<guestfs_command> apply to this call."
32263 #: ../src/guestfs-actions.pod:7165
32264 msgid "guestfs_sh_lines"
32268 #: ../src/guestfs-actions.pod:7167
32272 " guestfs_sh_lines (guestfs_h *g,\n"
32273 " const char *command);\n"
32278 #: ../src/guestfs-actions.pod:7171
32280 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32285 #: ../src/guestfs-actions.pod:7174
32286 msgid "See also: C<guestfs_command_lines>"
32290 #: ../src/guestfs-actions.pod:7182
32291 msgid "guestfs_sleep"
32295 #: ../src/guestfs-actions.pod:7184
32299 " guestfs_sleep (guestfs_h *g,\n"
32305 #: ../src/guestfs-actions.pod:7192
32306 msgid "(Added in 1.0.41)"
32310 #: ../src/guestfs-actions.pod:7194 ../src/guestfs-structs.pod:109
32311 msgid "guestfs_stat"
32315 #: ../src/guestfs-actions.pod:7196
32318 " struct guestfs_stat *\n"
32319 " guestfs_stat (guestfs_h *g,\n"
32320 " const char *path);\n"
32325 #: ../src/guestfs-actions.pod:7210 ../src/guestfs-structs.pod:135
32326 msgid "guestfs_statvfs"
32330 #: ../src/guestfs-actions.pod:7212
32333 " struct guestfs_statvfs *\n"
32334 " guestfs_statvfs (guestfs_h *g,\n"
32335 " const char *path);\n"
32340 #: ../src/guestfs-actions.pod:7222
32342 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
32343 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
32347 #: ../src/guestfs-actions.pod:7228
32348 msgid "guestfs_strings"
32352 #: ../src/guestfs-actions.pod:7230
32356 " guestfs_strings (guestfs_h *g,\n"
32357 " const char *path);\n"
32362 #: ../src/guestfs-actions.pod:7246
32363 msgid "guestfs_strings_e"
32367 #: ../src/guestfs-actions.pod:7248
32371 " guestfs_strings_e (guestfs_h *g,\n"
32372 " const char *encoding,\n"
32373 " const char *path);\n"
32378 #: ../src/guestfs-actions.pod:7253
32380 "This is like the C<guestfs_strings> command, but allows you to specify the "
32381 "encoding of strings that are looked for in the source file C<path>."
32385 #: ../src/guestfs-actions.pod:7263
32387 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32388 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32392 #: ../src/guestfs-actions.pod:7301
32393 msgid "guestfs_swapoff_device"
32397 #: ../src/guestfs-actions.pod:7303
32401 " guestfs_swapoff_device (guestfs_h *g,\n"
32402 " const char *device);\n"
32407 #: ../src/guestfs-actions.pod:7307
32409 "This command disables the libguestfs appliance swap device or partition "
32410 "named C<device>. See C<guestfs_swapon_device>."
32414 #: ../src/guestfs-actions.pod:7315
32415 msgid "guestfs_swapoff_file"
32419 #: ../src/guestfs-actions.pod:7317
32423 " guestfs_swapoff_file (guestfs_h *g,\n"
32424 " const char *file);\n"
32429 #: ../src/guestfs-actions.pod:7327
32430 msgid "guestfs_swapoff_label"
32434 #: ../src/guestfs-actions.pod:7329
32438 " guestfs_swapoff_label (guestfs_h *g,\n"
32439 " const char *label);\n"
32444 #: ../src/guestfs-actions.pod:7340
32445 msgid "guestfs_swapoff_uuid"
32449 #: ../src/guestfs-actions.pod:7342
32453 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32454 " const char *uuid);\n"
32459 #: ../src/guestfs-actions.pod:7353
32460 msgid "guestfs_swapon_device"
32464 #: ../src/guestfs-actions.pod:7355
32468 " guestfs_swapon_device (guestfs_h *g,\n"
32469 " const char *device);\n"
32474 #: ../src/guestfs-actions.pod:7359
32476 "This command enables the libguestfs appliance to use the swap device or "
32477 "partition named C<device>. The increased memory is made available for all "
32478 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32482 #: ../src/guestfs-actions.pod:7375
32483 msgid "guestfs_swapon_file"
32487 #: ../src/guestfs-actions.pod:7377
32491 " guestfs_swapon_file (guestfs_h *g,\n"
32492 " const char *file);\n"
32497 #: ../src/guestfs-actions.pod:7381
32499 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32504 #: ../src/guestfs-actions.pod:7388
32505 msgid "guestfs_swapon_label"
32509 #: ../src/guestfs-actions.pod:7390
32513 " guestfs_swapon_label (guestfs_h *g,\n"
32514 " const char *label);\n"
32519 #: ../src/guestfs-actions.pod:7394
32521 "This command enables swap to a labeled swap partition. See "
32522 "C<guestfs_swapon_device> for other notes."
32526 #: ../src/guestfs-actions.pod:7401
32527 msgid "guestfs_swapon_uuid"
32531 #: ../src/guestfs-actions.pod:7403
32535 " guestfs_swapon_uuid (guestfs_h *g,\n"
32536 " const char *uuid);\n"
32541 #: ../src/guestfs-actions.pod:7407
32543 "This command enables swap to a swap partition with the given UUID. See "
32544 "C<guestfs_swapon_device> for other notes."
32548 #: ../src/guestfs-actions.pod:7414
32549 msgid "guestfs_sync"
32553 #: ../src/guestfs-actions.pod:7416
32557 " guestfs_sync (guestfs_h *g);\n"
32562 #: ../src/guestfs-actions.pod:7429
32563 msgid "guestfs_tail"
32567 #: ../src/guestfs-actions.pod:7431
32571 " guestfs_tail (guestfs_h *g,\n"
32572 " const char *path);\n"
32577 #: ../src/guestfs-actions.pod:7447
32578 msgid "guestfs_tail_n"
32582 #: ../src/guestfs-actions.pod:7449
32586 " guestfs_tail_n (guestfs_h *g,\n"
32588 " const char *path);\n"
32593 #: ../src/guestfs-actions.pod:7471
32594 msgid "guestfs_tar_in"
32598 #: ../src/guestfs-actions.pod:7473
32602 " guestfs_tar_in (guestfs_h *g,\n"
32603 " const char *tarfile,\n"
32604 " const char *directory);\n"
32609 #: ../src/guestfs-actions.pod:7481
32611 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32615 #: ../src/guestfs-actions.pod:7486 ../src/guestfs-actions.pod:7503
32616 #: ../src/guestfs-actions.pod:7519 ../src/guestfs-actions.pod:7535
32617 msgid "(Added in 1.0.3)"
32621 #: ../src/guestfs-actions.pod:7488
32622 msgid "guestfs_tar_out"
32626 #: ../src/guestfs-actions.pod:7490
32630 " guestfs_tar_out (guestfs_h *g,\n"
32631 " const char *directory,\n"
32632 " const char *tarfile);\n"
32637 #: ../src/guestfs-actions.pod:7498
32639 "To download a compressed tarball, use C<guestfs_tgz_out> or "
32640 "C<guestfs_txz_out>."
32644 #: ../src/guestfs-actions.pod:7505
32645 msgid "guestfs_tgz_in"
32649 #: ../src/guestfs-actions.pod:7507
32653 " guestfs_tgz_in (guestfs_h *g,\n"
32654 " const char *tarball,\n"
32655 " const char *directory);\n"
32660 #: ../src/guestfs-actions.pod:7515
32661 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
32665 #: ../src/guestfs-actions.pod:7521
32666 msgid "guestfs_tgz_out"
32670 #: ../src/guestfs-actions.pod:7523
32674 " guestfs_tgz_out (guestfs_h *g,\n"
32675 " const char *directory,\n"
32676 " const char *tarball);\n"
32681 #: ../src/guestfs-actions.pod:7531
32682 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
32686 #: ../src/guestfs-actions.pod:7537
32687 msgid "guestfs_touch"
32691 #: ../src/guestfs-actions.pod:7539
32695 " guestfs_touch (guestfs_h *g,\n"
32696 " const char *path);\n"
32701 #: ../src/guestfs-actions.pod:7554
32702 msgid "guestfs_truncate"
32706 #: ../src/guestfs-actions.pod:7556
32710 " guestfs_truncate (guestfs_h *g,\n"
32711 " const char *path);\n"
32716 #: ../src/guestfs-actions.pod:7567
32717 msgid "guestfs_truncate_size"
32721 #: ../src/guestfs-actions.pod:7569
32725 " guestfs_truncate_size (guestfs_h *g,\n"
32726 " const char *path,\n"
32727 " int64_t size);\n"
32732 #: ../src/guestfs-actions.pod:7577
32734 "If the current file size is less than C<size> then the file is extended to "
32735 "the required size with zero bytes. This creates a sparse file (ie. disk "
32736 "blocks are not allocated for the file until you write to it). To create a "
32737 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
32741 #: ../src/guestfs-actions.pod:7587
32742 msgid "guestfs_tune2fs_l"
32746 #: ../src/guestfs-actions.pod:7589
32750 " guestfs_tune2fs_l (guestfs_h *g,\n"
32751 " const char *device);\n"
32756 #: ../src/guestfs-actions.pod:7609
32757 msgid "guestfs_txz_in"
32761 #: ../src/guestfs-actions.pod:7611
32765 " guestfs_txz_in (guestfs_h *g,\n"
32766 " const char *tarball,\n"
32767 " const char *directory);\n"
32772 #: ../src/guestfs-actions.pod:7623
32773 msgid "guestfs_txz_out"
32777 #: ../src/guestfs-actions.pod:7625
32781 " guestfs_txz_out (guestfs_h *g,\n"
32782 " const char *directory,\n"
32783 " const char *tarball);\n"
32788 #: ../src/guestfs-actions.pod:7637
32789 msgid "guestfs_umask"
32793 #: ../src/guestfs-actions.pod:7639
32797 " guestfs_umask (guestfs_h *g,\n"
32803 #: ../src/guestfs-actions.pod:7655
32805 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
32806 "C<guestfs_mkdir>."
32810 #: ../src/guestfs-actions.pod:7664
32811 msgid "guestfs_umount"
32815 #: ../src/guestfs-actions.pod:7666
32819 " guestfs_umount (guestfs_h *g,\n"
32820 " const char *pathordevice);\n"
32825 #: ../src/guestfs-actions.pod:7678
32826 msgid "guestfs_umount_all"
32830 #: ../src/guestfs-actions.pod:7680
32834 " guestfs_umount_all (guestfs_h *g);\n"
32839 #: ../src/guestfs-actions.pod:7691
32840 msgid "guestfs_upload"
32844 #: ../src/guestfs-actions.pod:7693
32848 " guestfs_upload (guestfs_h *g,\n"
32849 " const char *filename,\n"
32850 " const char *remotefilename);\n"
32855 #: ../src/guestfs-actions.pod:7703
32856 msgid "See also C<guestfs_download>."
32860 #: ../src/guestfs-actions.pod:7714
32861 msgid "guestfs_upload_offset"
32865 #: ../src/guestfs-actions.pod:7716
32869 " guestfs_upload_offset (guestfs_h *g,\n"
32870 " const char *filename,\n"
32871 " const char *remotefilename,\n"
32872 " int64_t offset);\n"
32877 #: ../src/guestfs-actions.pod:7732
32879 "Note that there is no limit on the amount of data that can be uploaded with "
32880 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
32881 "full amount unless an error occurs."
32885 #: ../src/guestfs-actions.pod:7737
32886 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
32890 #: ../src/guestfs-actions.pod:7748
32891 msgid "guestfs_utimens"
32895 #: ../src/guestfs-actions.pod:7750
32899 " guestfs_utimens (guestfs_h *g,\n"
32900 " const char *path,\n"
32901 " int64_t atsecs,\n"
32902 " int64_t atnsecs,\n"
32903 " int64_t mtsecs,\n"
32904 " int64_t mtnsecs);\n"
32909 #: ../src/guestfs-actions.pod:7779 ../src/guestfs-structs.pod:175
32910 msgid "guestfs_version"
32914 #: ../src/guestfs-actions.pod:7781
32917 " struct guestfs_version *\n"
32918 " guestfs_version (guestfs_h *g);\n"
32923 #: ../src/guestfs-actions.pod:7809
32925 "I<Note:> Don't use this call to test for availability of features. In "
32926 "enterprise distributions we backport features from later versions into "
32927 "earlier versions, making this an unreliable way to test for features. Use "
32928 "C<guestfs_available> instead."
32932 #: ../src/guestfs-actions.pod:7815
32934 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
32935 "error. I<The caller must call C<guestfs_free_version> after use>."
32939 #: ../src/guestfs-actions.pod:7819
32940 msgid "(Added in 1.0.58)"
32944 #: ../src/guestfs-actions.pod:7821
32945 msgid "guestfs_vfs_label"
32949 #: ../src/guestfs-actions.pod:7823
32953 " guestfs_vfs_label (guestfs_h *g,\n"
32954 " const char *device);\n"
32959 #: ../src/guestfs-actions.pod:7832
32960 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
32964 #: ../src/guestfs-actions.pod:7837 ../src/guestfs-actions.pod:7874
32965 msgid "(Added in 1.3.18)"
32969 #: ../src/guestfs-actions.pod:7839
32970 msgid "guestfs_vfs_type"
32974 #: ../src/guestfs-actions.pod:7841
32978 " guestfs_vfs_type (guestfs_h *g,\n"
32979 " const char *device);\n"
32984 #: ../src/guestfs-actions.pod:7858
32985 msgid "guestfs_vfs_uuid"
32989 #: ../src/guestfs-actions.pod:7860
32993 " guestfs_vfs_uuid (guestfs_h *g,\n"
32994 " const char *device);\n"
32999 #: ../src/guestfs-actions.pod:7869
33000 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
33004 #: ../src/guestfs-actions.pod:7876
33005 msgid "guestfs_vg_activate"
33009 #: ../src/guestfs-actions.pod:7878
33013 " guestfs_vg_activate (guestfs_h *g,\n"
33015 " char *const *volgroups);\n"
33020 #: ../src/guestfs-actions.pod:7895
33021 msgid "guestfs_vg_activate_all"
33025 #: ../src/guestfs-actions.pod:7897
33029 " guestfs_vg_activate_all (guestfs_h *g,\n"
33030 " int activate);\n"
33035 #: ../src/guestfs-actions.pod:7910
33036 msgid "guestfs_vgcreate"
33040 #: ../src/guestfs-actions.pod:7912
33044 " guestfs_vgcreate (guestfs_h *g,\n"
33045 " const char *volgroup,\n"
33046 " char *const *physvols);\n"
33051 #: ../src/guestfs-actions.pod:7924
33052 msgid "guestfs_vglvuuids"
33056 #: ../src/guestfs-actions.pod:7926
33060 " guestfs_vglvuuids (guestfs_h *g,\n"
33061 " const char *vgname);\n"
33066 #: ../src/guestfs-actions.pod:7933
33068 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
33069 "associate logical volumes and volume groups."
33073 #: ../src/guestfs-actions.pod:7936
33074 msgid "See also C<guestfs_vgpvuuids>."
33078 #: ../src/guestfs-actions.pod:7944
33079 msgid "guestfs_vgpvuuids"
33083 #: ../src/guestfs-actions.pod:7946
33087 " guestfs_vgpvuuids (guestfs_h *g,\n"
33088 " const char *vgname);\n"
33093 #: ../src/guestfs-actions.pod:7953
33095 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
33096 "associate physical volumes and volume groups."
33100 #: ../src/guestfs-actions.pod:7956
33101 msgid "See also C<guestfs_vglvuuids>."
33105 #: ../src/guestfs-actions.pod:7964
33106 msgid "guestfs_vgremove"
33110 #: ../src/guestfs-actions.pod:7966
33114 " guestfs_vgremove (guestfs_h *g,\n"
33115 " const char *vgname);\n"
33120 #: ../src/guestfs-actions.pod:7979
33121 msgid "guestfs_vgrename"
33125 #: ../src/guestfs-actions.pod:7981
33129 " guestfs_vgrename (guestfs_h *g,\n"
33130 " const char *volgroup,\n"
33131 " const char *newvolgroup);\n"
33136 #: ../src/guestfs-actions.pod:7992
33137 msgid "guestfs_vgs"
33141 #: ../src/guestfs-actions.pod:7994
33145 " guestfs_vgs (guestfs_h *g);\n"
33150 #: ../src/guestfs-actions.pod:8003
33151 msgid "See also C<guestfs_vgs_full>."
33155 #: ../src/guestfs-actions.pod:8011
33156 msgid "guestfs_vgs_full"
33160 #: ../src/guestfs-actions.pod:8013
33163 " struct guestfs_lvm_vg_list *\n"
33164 " guestfs_vgs_full (guestfs_h *g);\n"
33169 #: ../src/guestfs-actions.pod:8019
33171 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
33172 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
33176 #: ../src/guestfs-actions.pod:8025
33177 msgid "guestfs_vgscan"
33181 #: ../src/guestfs-actions.pod:8027
33185 " guestfs_vgscan (guestfs_h *g);\n"
33190 #: ../src/guestfs-actions.pod:8037
33191 msgid "guestfs_vguuid"
33195 #: ../src/guestfs-actions.pod:8039
33199 " guestfs_vguuid (guestfs_h *g,\n"
33200 " const char *vgname);\n"
33205 #: ../src/guestfs-actions.pod:8050
33206 msgid "guestfs_wait_ready"
33210 #: ../src/guestfs-actions.pod:8052
33214 " guestfs_wait_ready (guestfs_h *g);\n"
33219 #: ../src/guestfs-actions.pod:8055
33221 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
33226 #: ../src/guestfs-actions.pod:8062
33227 msgid "This function is a no op."
33231 #: ../src/guestfs-actions.pod:8064
33233 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
33234 "calling C<guestfs_launch> to wait for the launch to complete. However this "
33235 "is no longer necessary because C<guestfs_launch> now does the waiting."
33239 #: ../src/guestfs-actions.pod:8069
33241 "If you see any calls to this function in code then you can just remove them, "
33242 "unless you want to retain compatibility with older versions of the API."
33246 #: ../src/guestfs-actions.pod:8077
33247 msgid "guestfs_wc_c"
33251 #: ../src/guestfs-actions.pod:8079
33255 " guestfs_wc_c (guestfs_h *g,\n"
33256 " const char *path);\n"
33261 #: ../src/guestfs-actions.pod:8090
33262 msgid "guestfs_wc_l"
33266 #: ../src/guestfs-actions.pod:8092
33270 " guestfs_wc_l (guestfs_h *g,\n"
33271 " const char *path);\n"
33276 #: ../src/guestfs-actions.pod:8103
33277 msgid "guestfs_wc_w"
33281 #: ../src/guestfs-actions.pod:8105
33285 " guestfs_wc_w (guestfs_h *g,\n"
33286 " const char *path);\n"
33291 #: ../src/guestfs-actions.pod:8116
33292 msgid "guestfs_write"
33296 #: ../src/guestfs-actions.pod:8118
33300 " guestfs_write (guestfs_h *g,\n"
33301 " const char *path,\n"
33302 " const char *content,\n"
33303 " size_t content_size);\n"
33308 #: ../src/guestfs-actions.pod:8127
33309 msgid "See also C<guestfs_write_append>."
33313 #: ../src/guestfs-actions.pod:8136
33314 msgid "guestfs_write_append"
33318 #: ../src/guestfs-actions.pod:8138
33322 " guestfs_write_append (guestfs_h *g,\n"
33323 " const char *path,\n"
33324 " const char *content,\n"
33325 " size_t content_size);\n"
33330 #: ../src/guestfs-actions.pod:8147
33331 msgid "See also C<guestfs_write>."
33335 #: ../src/guestfs-actions.pod:8156
33336 msgid "guestfs_write_file"
33340 #: ../src/guestfs-actions.pod:8158
33344 " guestfs_write_file (guestfs_h *g,\n"
33345 " const char *path,\n"
33346 " const char *content,\n"
33352 #: ../src/guestfs-actions.pod:8164
33354 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33359 #: ../src/guestfs-actions.pod:8189
33360 msgid "guestfs_zegrep"
33364 #: ../src/guestfs-actions.pod:8191
33368 " guestfs_zegrep (guestfs_h *g,\n"
33369 " const char *regex,\n"
33370 " const char *path);\n"
33375 #: ../src/guestfs-actions.pod:8208
33376 msgid "guestfs_zegrepi"
33380 #: ../src/guestfs-actions.pod:8210
33384 " guestfs_zegrepi (guestfs_h *g,\n"
33385 " const char *regex,\n"
33386 " const char *path);\n"
33391 #: ../src/guestfs-actions.pod:8227
33392 msgid "guestfs_zero"
33396 #: ../src/guestfs-actions.pod:8229
33400 " guestfs_zero (guestfs_h *g,\n"
33401 " const char *device);\n"
33406 #: ../src/guestfs-actions.pod:8243
33408 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33409 "C<guestfs_is_zero_device>"
33413 #: ../src/guestfs-actions.pod:8255
33414 msgid "guestfs_zero_device"
33418 #: ../src/guestfs-actions.pod:8257
33422 " guestfs_zero_device (guestfs_h *g,\n"
33423 " const char *device);\n"
33428 #: ../src/guestfs-actions.pod:8261
33430 "This command writes zeroes over the entire C<device>. Compare with "
33431 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33435 #: ../src/guestfs-actions.pod:8276
33436 msgid "(Added in 1.3.1)"
33440 #: ../src/guestfs-actions.pod:8278
33441 msgid "guestfs_zerofree"
33445 #: ../src/guestfs-actions.pod:8280
33449 " guestfs_zerofree (guestfs_h *g,\n"
33450 " const char *device);\n"
33455 #: ../src/guestfs-actions.pod:8299
33456 msgid "guestfs_zfgrep"
33460 #: ../src/guestfs-actions.pod:8301
33464 " guestfs_zfgrep (guestfs_h *g,\n"
33465 " const char *pattern,\n"
33466 " const char *path);\n"
33471 #: ../src/guestfs-actions.pod:8318
33472 msgid "guestfs_zfgrepi"
33476 #: ../src/guestfs-actions.pod:8320
33480 " guestfs_zfgrepi (guestfs_h *g,\n"
33481 " const char *pattern,\n"
33482 " const char *path);\n"
33487 #: ../src/guestfs-actions.pod:8337
33488 msgid "guestfs_zfile"
33492 #: ../src/guestfs-actions.pod:8339
33496 " guestfs_zfile (guestfs_h *g,\n"
33497 " const char *meth,\n"
33498 " const char *path);\n"
33503 #: ../src/guestfs-actions.pod:8344
33505 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33510 #: ../src/guestfs-actions.pod:8356
33512 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33517 #: ../src/guestfs-actions.pod:8364
33518 msgid "guestfs_zgrep"
33522 #: ../src/guestfs-actions.pod:8366
33526 " guestfs_zgrep (guestfs_h *g,\n"
33527 " const char *regex,\n"
33528 " const char *path);\n"
33533 #: ../src/guestfs-actions.pod:8383
33534 msgid "guestfs_zgrepi"
33538 #: ../src/guestfs-actions.pod:8385
33542 " guestfs_zgrepi (guestfs_h *g,\n"
33543 " const char *regex,\n"
33544 " const char *path);\n"
33549 #: ../src/guestfs-availability.pod:3
33554 #: ../src/guestfs-availability.pod:5
33556 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
33557 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
33558 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
33559 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
33560 "L</guestfs_aug_save> L</guestfs_aug_set>"
33564 #: ../src/guestfs-availability.pod:21
33569 #: ../src/guestfs-availability.pod:23
33570 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
33574 #: ../src/guestfs-availability.pod:26
33579 #: ../src/guestfs-availability.pod:28
33580 msgid "The following functions: L</guestfs_grub_install>"
33584 #: ../src/guestfs-availability.pod:31
33589 #: ../src/guestfs-availability.pod:33
33591 "The following functions: L</guestfs_inotify_add_watch> L</"
33592 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
33593 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
33597 #: ../src/guestfs-availability.pod:41
33598 msgid "B<linuxfsuuid>"
33602 #: ../src/guestfs-availability.pod:43
33604 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
33605 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
33609 #: ../src/guestfs-availability.pod:50
33610 msgid "B<linuxmodules>"
33614 #: ../src/guestfs-availability.pod:52
33615 msgid "The following functions: L</guestfs_modprobe>"
33619 #: ../src/guestfs-availability.pod:55
33620 msgid "B<linuxxattrs>"
33624 #: ../src/guestfs-availability.pod:57
33626 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
33627 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
33628 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
33629 "guestfs_setxattr>"
33633 #: ../src/guestfs-availability.pod:68
33638 #: ../src/guestfs-availability.pod:70
33640 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
33641 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
33642 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
33646 #: ../src/guestfs-availability.pod:79
33651 #: ../src/guestfs-availability.pod:81
33653 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
33654 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
33655 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
33656 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
33657 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
33658 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
33659 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
33663 #: ../src/guestfs-availability.pod:104
33668 #: ../src/guestfs-availability.pod:106
33670 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
33671 "guestfs_mknod_b> L</guestfs_mknod_c>"
33675 #: ../src/guestfs-availability.pod:112
33680 #: ../src/guestfs-availability.pod:114
33681 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
33685 #: ../src/guestfs-availability.pod:117
33686 msgid "B<ntfsprogs>"
33690 #: ../src/guestfs-availability.pod:119
33692 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
33693 "L</guestfs_ntfsresize_size>"
33697 #: ../src/guestfs-availability.pod:124
33698 msgid "B<realpath>"
33702 #: ../src/guestfs-availability.pod:126
33703 msgid "The following functions: L</guestfs_realpath>"
33707 #: ../src/guestfs-availability.pod:129
33712 #: ../src/guestfs-availability.pod:131
33714 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
33715 "guestfs_scrub_freespace>"
33719 #: ../src/guestfs-availability.pod:136
33724 #: ../src/guestfs-availability.pod:138
33725 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
33729 #: ../src/guestfs-availability.pod:142
33734 #: ../src/guestfs-availability.pod:144
33735 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
33739 #: ../src/guestfs-availability.pod:148
33740 msgid "B<zerofree>"
33744 #: ../src/guestfs-availability.pod:150
33745 msgid "The following functions: L</guestfs_zerofree>"
33749 #: ../src/guestfs-structs.pod:1
33750 msgid "guestfs_int_bool"
33754 #: ../src/guestfs-structs.pod:3
33757 " struct guestfs_int_bool {\n"
33765 #: ../src/guestfs-structs.pod:8
33768 " struct guestfs_int_bool_list {\n"
33769 " uint32_t len; /* Number of elements in list. */\n"
33770 " struct guestfs_int_bool *val; /* Elements. */\n"
33776 #: ../src/guestfs-structs.pod:13
33779 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
33780 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
33785 #: ../src/guestfs-structs.pod:16
33786 msgid "guestfs_lvm_pv"
33790 #: ../src/guestfs-structs.pod:18
33793 " struct guestfs_lvm_pv {\n"
33794 " char *pv_name;\n"
33795 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33796 " char pv_uuid[32];\n"
33798 " uint64_t pv_size;\n"
33799 " uint64_t dev_size;\n"
33800 " uint64_t pv_free;\n"
33801 " uint64_t pv_used;\n"
33802 " char *pv_attr;\n"
33803 " int64_t pv_pe_count;\n"
33804 " int64_t pv_pe_alloc_count;\n"
33805 " char *pv_tags;\n"
33806 " uint64_t pe_start;\n"
33807 " int64_t pv_mda_count;\n"
33808 " uint64_t pv_mda_free;\n"
33814 #: ../src/guestfs-structs.pod:36
33817 " struct guestfs_lvm_pv_list {\n"
33818 " uint32_t len; /* Number of elements in list. */\n"
33819 " struct guestfs_lvm_pv *val; /* Elements. */\n"
33825 #: ../src/guestfs-structs.pod:41
33828 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
33829 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
33834 #: ../src/guestfs-structs.pod:44
33835 msgid "guestfs_lvm_vg"
33839 #: ../src/guestfs-structs.pod:46
33842 " struct guestfs_lvm_vg {\n"
33843 " char *vg_name;\n"
33844 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33845 " char vg_uuid[32];\n"
33847 " char *vg_attr;\n"
33848 " uint64_t vg_size;\n"
33849 " uint64_t vg_free;\n"
33850 " char *vg_sysid;\n"
33851 " uint64_t vg_extent_size;\n"
33852 " int64_t vg_extent_count;\n"
33853 " int64_t vg_free_count;\n"
33854 " int64_t max_lv;\n"
33855 " int64_t max_pv;\n"
33856 " int64_t pv_count;\n"
33857 " int64_t lv_count;\n"
33858 " int64_t snap_count;\n"
33859 " int64_t vg_seqno;\n"
33860 " char *vg_tags;\n"
33861 " int64_t vg_mda_count;\n"
33862 " uint64_t vg_mda_free;\n"
33868 #: ../src/guestfs-structs.pod:69
33871 " struct guestfs_lvm_vg_list {\n"
33872 " uint32_t len; /* Number of elements in list. */\n"
33873 " struct guestfs_lvm_vg *val; /* Elements. */\n"
33879 #: ../src/guestfs-structs.pod:74
33882 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
33883 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
33888 #: ../src/guestfs-structs.pod:77
33889 msgid "guestfs_lvm_lv"
33893 #: ../src/guestfs-structs.pod:79
33896 " struct guestfs_lvm_lv {\n"
33897 " char *lv_name;\n"
33898 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33899 " char lv_uuid[32];\n"
33900 " char *lv_attr;\n"
33901 " int64_t lv_major;\n"
33902 " int64_t lv_minor;\n"
33903 " int64_t lv_kernel_major;\n"
33904 " int64_t lv_kernel_minor;\n"
33905 " uint64_t lv_size;\n"
33906 " int64_t seg_count;\n"
33908 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33909 " float snap_percent;\n"
33910 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33911 " float copy_percent;\n"
33912 " char *move_pv;\n"
33913 " char *lv_tags;\n"
33914 " char *mirror_log;\n"
33915 " char *modules;\n"
33921 #: ../src/guestfs-structs.pod:101
33924 " struct guestfs_lvm_lv_list {\n"
33925 " uint32_t len; /* Number of elements in list. */\n"
33926 " struct guestfs_lvm_lv *val; /* Elements. */\n"
33932 #: ../src/guestfs-structs.pod:106
33935 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
33936 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
33941 #: ../src/guestfs-structs.pod:111
33944 " struct guestfs_stat {\n"
33948 " int64_t nlink;\n"
33953 " int64_t blksize;\n"
33954 " int64_t blocks;\n"
33955 " int64_t atime;\n"
33956 " int64_t mtime;\n"
33957 " int64_t ctime;\n"
33963 #: ../src/guestfs-structs.pod:127
33966 " struct guestfs_stat_list {\n"
33967 " uint32_t len; /* Number of elements in list. */\n"
33968 " struct guestfs_stat *val; /* Elements. */\n"
33974 #: ../src/guestfs-structs.pod:132
33977 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
33978 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
33983 #: ../src/guestfs-structs.pod:137
33986 " struct guestfs_statvfs {\n"
33987 " int64_t bsize;\n"
33988 " int64_t frsize;\n"
33989 " int64_t blocks;\n"
33990 " int64_t bfree;\n"
33991 " int64_t bavail;\n"
33992 " int64_t files;\n"
33993 " int64_t ffree;\n"
33994 " int64_t favail;\n"
33997 " int64_t namemax;\n"
34003 #: ../src/guestfs-structs.pod:151
34006 " struct guestfs_statvfs_list {\n"
34007 " uint32_t len; /* Number of elements in list. */\n"
34008 " struct guestfs_statvfs *val; /* Elements. */\n"
34014 #: ../src/guestfs-structs.pod:156
34017 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
34018 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
34023 #: ../src/guestfs-structs.pod:159
34024 msgid "guestfs_dirent"
34028 #: ../src/guestfs-structs.pod:161
34031 " struct guestfs_dirent {\n"
34040 #: ../src/guestfs-structs.pod:167
34043 " struct guestfs_dirent_list {\n"
34044 " uint32_t len; /* Number of elements in list. */\n"
34045 " struct guestfs_dirent *val; /* Elements. */\n"
34051 #: ../src/guestfs-structs.pod:172
34054 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
34055 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
34060 #: ../src/guestfs-structs.pod:177
34063 " struct guestfs_version {\n"
34064 " int64_t major;\n"
34065 " int64_t minor;\n"
34066 " int64_t release;\n"
34073 #: ../src/guestfs-structs.pod:184
34076 " struct guestfs_version_list {\n"
34077 " uint32_t len; /* Number of elements in list. */\n"
34078 " struct guestfs_version *val; /* Elements. */\n"
34084 #: ../src/guestfs-structs.pod:189
34087 " void guestfs_free_version (struct guestfs_free_version *);\n"
34088 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
34093 #: ../src/guestfs-structs.pod:192
34094 msgid "guestfs_xattr"
34098 #: ../src/guestfs-structs.pod:194
34101 " struct guestfs_xattr {\n"
34102 " char *attrname;\n"
34103 " /* The next two fields describe a byte array. */\n"
34104 " uint32_t attrval_len;\n"
34105 " char *attrval;\n"
34111 #: ../src/guestfs-structs.pod:201
34114 " struct guestfs_xattr_list {\n"
34115 " uint32_t len; /* Number of elements in list. */\n"
34116 " struct guestfs_xattr *val; /* Elements. */\n"
34122 #: ../src/guestfs-structs.pod:206
34125 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
34126 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
34131 #: ../src/guestfs-structs.pod:209
34132 msgid "guestfs_inotify_event"
34136 #: ../src/guestfs-structs.pod:211
34139 " struct guestfs_inotify_event {\n"
34140 " int64_t in_wd;\n"
34141 " uint32_t in_mask;\n"
34142 " uint32_t in_cookie;\n"
34143 " char *in_name;\n"
34149 #: ../src/guestfs-structs.pod:218
34152 " struct guestfs_inotify_event_list {\n"
34153 " uint32_t len; /* Number of elements in list. */\n"
34154 " struct guestfs_inotify_event *val; /* Elements. */\n"
34160 #: ../src/guestfs-structs.pod:223
34163 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
34164 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
34169 #: ../src/guestfs-structs.pod:226
34170 msgid "guestfs_partition"
34174 #: ../src/guestfs-structs.pod:228
34177 " struct guestfs_partition {\n"
34178 " int32_t part_num;\n"
34179 " uint64_t part_start;\n"
34180 " uint64_t part_end;\n"
34181 " uint64_t part_size;\n"
34187 #: ../src/guestfs-structs.pod:235
34190 " struct guestfs_partition_list {\n"
34191 " uint32_t len; /* Number of elements in list. */\n"
34192 " struct guestfs_partition *val; /* Elements. */\n"
34198 #: ../src/guestfs-structs.pod:240
34201 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
34202 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
34207 #: ../src/guestfs-structs.pod:243
34208 msgid "guestfs_application"
34212 #: ../src/guestfs-structs.pod:245
34215 " struct guestfs_application {\n"
34216 " char *app_name;\n"
34217 " char *app_display_name;\n"
34218 " int32_t app_epoch;\n"
34219 " char *app_version;\n"
34220 " char *app_release;\n"
34221 " char *app_install_path;\n"
34222 " char *app_trans_path;\n"
34223 " char *app_publisher;\n"
34224 " char *app_url;\n"
34225 " char *app_source_package;\n"
34226 " char *app_summary;\n"
34227 " char *app_description;\n"
34233 #: ../src/guestfs-structs.pod:260
34236 " struct guestfs_application_list {\n"
34237 " uint32_t len; /* Number of elements in list. */\n"
34238 " struct guestfs_application *val; /* Elements. */\n"
34244 #: ../src/guestfs-structs.pod:265
34247 " void guestfs_free_application (struct guestfs_free_application *);\n"
34248 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
34253 #: ../src/guestfs.pod:5
34254 msgid "guestfs - Library for accessing and modifying virtual machine images"
34258 #: ../src/guestfs.pod:11
34261 " guestfs_h *g = guestfs_create ();\n"
34262 " guestfs_add_drive (g, \"guest.img\");\n"
34263 " guestfs_launch (g);\n"
34264 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34265 " guestfs_touch (g, \"/hello\");\n"
34266 " guestfs_umount (g, \"/\");\n"
34267 " guestfs_close (g);\n"
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"
34280 #: ../src/guestfs.pod:25
34282 "Libguestfs is a library for accessing and modifying guest disk images. "
34283 "Amongst the things this is good for: making batch configuration changes to "
34284 "guests, getting disk used/free statistics (see also: virt-df), migrating "
34285 "between virtualization systems (see also: virt-p2v), performing partial "
34286 "backups, performing partial guest clones, cloning guests and changing "
34287 "registry/UUID/hostname info, and much else besides."
34291 #: ../src/guestfs.pod:33
34293 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
34294 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
34295 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34300 #: ../src/guestfs.pod:38
34302 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34303 "what filesystem is in each LV, etc.). It can also run commands in the "
34304 "context of the guest. Also you can access filesystems over FUSE."
34308 #: ../src/guestfs.pod:43
34310 "Libguestfs is a library that can be linked with C and C++ management "
34311 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
34312 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
34317 #: ../src/guestfs.pod:48
34319 "You don't need to be root to use libguestfs, although obviously you do need "
34320 "enough permissions to access the disk images."
34324 #: ../src/guestfs.pod:51
34326 "Libguestfs is a large API because it can do many things. For a gentle "
34327 "introduction, please read the L</API OVERVIEW> section next."
34331 #: ../src/guestfs.pod:54
34333 "There are also some example programs in the L<guestfs-examples(3)> manual "
34338 #: ../src/guestfs.pod:57
34339 msgid "API OVERVIEW"
34343 #: ../src/guestfs.pod:59
34345 "This section provides a gentler overview of the libguestfs API. We also try "
34346 "to group API calls together, where that may not be obvious from reading "
34347 "about the individual calls in the main section of this manual."
34351 #: ../src/guestfs.pod:64
34356 #: ../src/guestfs.pod:66
34358 "Before you can use libguestfs calls, you have to create a handle. Then you "
34359 "must add at least one disk image to the handle, followed by launching the "
34360 "handle, then performing whatever operations you want, and finally closing "
34361 "the handle. By convention we use the single letter C<g> for the name of the "
34362 "handle variable, although of course you can use any name you want."
34366 #: ../src/guestfs.pod:73
34367 msgid "The general structure of all libguestfs-using programs looks like this:"
34371 #: ../src/guestfs.pod:76
34374 " guestfs_h *g = guestfs_create ();\n"
34379 #: ../src/guestfs.pod:78
34382 " /* Call guestfs_add_drive additional times if there are\n"
34383 " * multiple disk images.\n"
34385 " guestfs_add_drive (g, \"guest.img\");\n"
34390 #: ../src/guestfs.pod:83
34393 " /* Most manipulation calls won't work until you've launched\n"
34394 " * the handle 'g'. You have to do this _after_ adding drives\n"
34395 " * and _before_ other commands.\n"
34397 " guestfs_launch (g);\n"
34402 #: ../src/guestfs.pod:89
34405 " /* Now you can examine what partitions, LVs etc are available.\n"
34407 " char **partitions = guestfs_list_partitions (g);\n"
34408 " char **logvols = guestfs_lvs (g);\n"
34413 #: ../src/guestfs.pod:94
34416 " /* To access a filesystem in the image, you must mount it.\n"
34418 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34423 #: ../src/guestfs.pod:98
34426 " /* Now you can perform filesystem actions on the guest\n"
34429 " guestfs_touch (g, \"/hello\");\n"
34434 #: ../src/guestfs.pod:103
34437 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34438 " * it is done automatically when you close the handle. See\n"
34439 " * discussion of autosync in this page.\n"
34441 " guestfs_sync (g);\n"
34446 #: ../src/guestfs.pod:109
34449 " /* Close the handle 'g'. */\n"
34450 " guestfs_close (g);\n"
34455 #: ../src/guestfs.pod:112
34457 "The code above doesn't include any error checking. In real code you should "
34458 "check return values carefully for errors. In general all functions that "
34459 "return integers return C<-1> on error, and all functions that return "
34460 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34461 "how to handle errors, and consult the documentation for each function call "
34462 "below to see precisely how they return error indications. See L<guestfs-"
34463 "examples(3)> for fully worked examples."
34467 #: ../src/guestfs.pod:121
34468 msgid "DISK IMAGES"
34472 #: ../src/guestfs.pod:123
34474 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34475 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34476 "actual block device, or simply an empty file of zeroes that you have created "
34477 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
34482 #: ../src/guestfs.pod:129
34484 "The call you should use in modern code for adding drives is L</"
34485 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34486 "specifying that the format is raw, do:"
34490 #: ../src/guestfs.pod:133
34493 " guestfs_add_drive_opts (g, filename,\n"
34494 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34500 #: ../src/guestfs.pod:137
34501 msgid "You can add a disk read-only using:"
34505 #: ../src/guestfs.pod:139
34508 " guestfs_add_drive_opts (g, filename,\n"
34509 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34510 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34516 #: ../src/guestfs.pod:144
34518 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34519 "libguestfs won't modify the file."
34523 #: ../src/guestfs.pod:147
34525 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34526 "by a virtual machine. Adding it read-write will almost certainly cause disk "
34527 "corruption, but adding it read-only is safe."
34531 #: ../src/guestfs.pod:151
34533 "You must add at least one disk image, and you may add multiple disk images. "
34534 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
34535 "first one you added), C</dev/sdb> (for the second one you added), etc."
34539 #: ../src/guestfs.pod:156
34541 "Once L</guestfs_launch> has been called you cannot add any more images. You "
34542 "can call L</guestfs_list_devices> to get a list of the device names, in the "
34543 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
34547 #: ../src/guestfs.pod:161
34552 #: ../src/guestfs.pod:163
34554 "Before you can read or write files, create directories and so on in a disk "
34555 "image that contains filesystems, you have to mount those filesystems using "
34556 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
34557 "a disk image contains (for example) one partition with a filesystem on that "
34558 "partition, then you can mount it directly:"
34562 #: ../src/guestfs.pod:170
34565 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
34570 #: ../src/guestfs.pod:172
34572 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
34573 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
34574 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
34575 "that these are libguestfs virtual devices, and are nothing to do with host "
34580 #: ../src/guestfs.pod:178
34582 "If you are given a disk image and you don't know what it contains then you "
34583 "have to find out. Libguestfs can do that too: use L</"
34584 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
34585 "LVs, and either try mounting each to see what is mountable, or else examine "
34586 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
34587 "filesystems, use L</guestfs_list_filesystems>."
34591 #: ../src/guestfs.pod:186
34593 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
34594 "L</INSPECTION> below). But you might find it easier to look at higher level "
34595 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
34599 #: ../src/guestfs.pod:191
34601 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
34602 "several other variations of the C<guestfs_mount_*> call."
34606 #: ../src/guestfs.pod:194
34607 msgid "FILESYSTEM ACCESS AND MODIFICATION"
34611 #: ../src/guestfs.pod:196
34613 "The majority of the libguestfs API consists of fairly low-level calls for "
34614 "accessing and modifying the files, directories, symlinks etc on mounted "
34615 "filesystems. There are over a hundred such calls which you can find listed "
34616 "in detail below in this man page, and we don't even pretend to cover them "
34617 "all in this overview."
34621 #: ../src/guestfs.pod:202
34623 "Specify filenames as full paths, starting with C<\"/\"> and including the "
34628 #: ../src/guestfs.pod:205
34630 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
34631 "the file called C<\"etc/passwd\"> then you could do:"
34635 #: ../src/guestfs.pod:208
34638 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
34643 #: ../src/guestfs.pod:210
34645 "This would return C<data> as a newly allocated buffer containing the full "
34646 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
34647 "or C<NULL> if there was an error."
34651 #: ../src/guestfs.pod:214
34653 "As another example, to create a top-level directory on that filesystem "
34654 "called C<\"var\"> you would do:"
34658 #: ../src/guestfs.pod:217
34661 " guestfs_mkdir (g, \"/var\");\n"
34666 #: ../src/guestfs.pod:219
34667 msgid "To create a symlink you could do:"
34671 #: ../src/guestfs.pod:221
34674 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
34675 " \"/etc/rc3.d/S30portmap\");\n"
34680 #: ../src/guestfs.pod:224
34682 "Libguestfs will reject attempts to use relative paths and there is no "
34683 "concept of a current working directory."
34687 #: ../src/guestfs.pod:227
34689 "Libguestfs can return errors in many situations: for example if the "
34690 "filesystem isn't writable, or if a file or directory that you requested "
34691 "doesn't exist. If you are using the C API (documented here) you have to "
34692 "check for those error conditions after each call. (Other language bindings "
34693 "turn these errors into exceptions)."
34697 #: ../src/guestfs.pod:233
34699 "File writes are affected by the per-handle umask, set by calling L</"
34700 "guestfs_umask> and defaulting to 022. See L</UMASK>."
34704 #: ../src/guestfs.pod:236
34705 msgid "PARTITIONING"
34709 #: ../src/guestfs.pod:238
34711 "Libguestfs contains API calls to read, create and modify partition tables on "
34716 #: ../src/guestfs.pod:241
34718 "In the common case where you want to create a single partition covering the "
34719 "whole disk, you should use the L</guestfs_part_disk> call:"
34723 #: ../src/guestfs.pod:245
34726 " const char *parttype = \"mbr\";\n"
34727 " if (disk_is_larger_than_2TB)\n"
34728 " parttype = \"gpt\";\n"
34729 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
34734 #: ../src/guestfs.pod:250
34736 "Obviously this effectively wipes anything that was on that disk image before."
34740 #: ../src/guestfs.pod:253
34745 #: ../src/guestfs.pod:255
34747 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
34748 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
34749 "you familiarize yourself with the concepts of physical volumes, volume "
34750 "groups and logical volumes."
34754 #: ../src/guestfs.pod:260
34756 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
34757 "tldp.org/HOWTO/LVM-HOWTO/>."
34761 #: ../src/guestfs.pod:263
34762 msgid "DOWNLOADING"
34766 #: ../src/guestfs.pod:265
34768 "Use L</guestfs_cat> to download small, text only files. This call is "
34769 "limited to files which are less than 2 MB and which cannot contain any ASCII "
34770 "NUL (C<\\0>) characters. However the API is very simple to use."
34774 #: ../src/guestfs.pod:269
34776 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
34777 "bit data, since it returns a (pointer, size) pair. However it is still "
34778 "limited to \"small\" files, less than 2 MB."
34782 #: ../src/guestfs.pod:273
34784 "L</guestfs_download> can be used to download any file, with no limits on "
34785 "content or size (even files larger than 4 GB)."
34789 #: ../src/guestfs.pod:276
34791 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
34795 #: ../src/guestfs.pod:279
34800 #: ../src/guestfs.pod:281
34802 "It's often the case that you want to write a file or files to the disk image."
34806 #: ../src/guestfs.pod:284
34808 "To write a small file with fixed content, use L</guestfs_write>. To create "
34809 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
34810 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
34811 "of other functions for creating test files, for example L</guestfs_fill> and "
34812 "L</guestfs_fill_pattern>."
34816 #: ../src/guestfs.pod:290
34818 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
34819 "file content or size (even files larger than 4 GB)."
34823 #: ../src/guestfs.pod:293
34825 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
34829 #: ../src/guestfs.pod:295
34831 "However the fastest way to upload I<large numbers of arbitrary files> is to "
34832 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
34833 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
34834 "in a predictable way (eg. adding it last after all other drives) then you "
34835 "can get the device name from L</guestfs_list_devices> and mount it directly "
34836 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
34837 "portable between kernel versions, and they don't support labels or UUIDs. "
34838 "If you want to pre-build an image or you need to mount it using a label or "
34839 "UUID, use an ISO image instead."
34843 #: ../src/guestfs.pod:306
34848 #: ../src/guestfs.pod:308
34850 "There are various different commands for copying between files and devices "
34851 "and in and out of the guest filesystem. These are summarised in the table "
34856 #: ../src/guestfs.pod:314
34857 msgid "B<file> to B<file>"
34861 #: ../src/guestfs.pod:316
34863 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
34864 "directories recursively."
34868 #: ../src/guestfs.pod:319
34870 "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
34874 #: ../src/guestfs.pod:322
34875 msgid "B<file> to B<device>"
34879 #: ../src/guestfs.pod:324
34880 msgid "B<device> to B<file>"
34884 #: ../src/guestfs.pod:326
34885 msgid "B<device> to B<device>"
34889 #: ../src/guestfs.pod:328
34891 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or L</"
34892 "guestfs_copy_device_to_device>."
34896 #: ../src/guestfs.pod:331
34897 msgid "Example: duplicate the contents of an LV:"
34901 #: ../src/guestfs.pod:333
34904 " guestfs_copy_device_to_device (g,\n"
34905 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34906 " /* -1 marks the end of the list of optional parameters */\n"
34912 #: ../src/guestfs.pod:338
34914 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
34915 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
34916 "optional C<size> parameter:"
34920 #: ../src/guestfs.pod:342
34923 " guestfs_copy_device_to_device (g,\n"
34924 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34925 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
34931 #: ../src/guestfs.pod:347
34932 msgid "B<file on the host> to B<file or device>"
34936 #: ../src/guestfs.pod:349
34937 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
34941 #: ../src/guestfs.pod:351
34942 msgid "B<file or device> to B<file on the host>"
34946 #: ../src/guestfs.pod:353
34947 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
34951 #: ../src/guestfs.pod:357
34952 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
34956 #: ../src/guestfs.pod:359
34958 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
34959 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
34960 "appears you can only upload and download to files. However many Un*x-like "
34961 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
34962 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
34963 "and arbitrary file descriptor N."
34967 #: ../src/guestfs.pod:367
34968 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
34972 #: ../src/guestfs.pod:370
34975 " guestfs_download (g, filename, \"/dev/stdout\");\n"
34980 #: ../src/guestfs.pod:372
34981 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
34985 #: ../src/guestfs.pod:374
34988 " char devfd[64];\n"
34989 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
34990 " guestfs_tar_out (g, \"/\", devfd);\n"
34995 #: ../src/guestfs.pod:378
34996 msgid "LISTING FILES"
35000 #: ../src/guestfs.pod:380
35002 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
35003 "L<guestfish(1)>-equivalent command C<ll>)."
35007 #: ../src/guestfs.pod:383
35009 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
35010 "programs, as a flat list of strings."
35014 #: ../src/guestfs.pod:386
35016 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
35017 "directory, plus additional information about each one. It is more "
35018 "equivalent to using the L<readdir(3)> call on a local filesystem."
35022 #: ../src/guestfs.pod:390
35024 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
35028 #: ../src/guestfs.pod:393
35029 msgid "RUNNING COMMANDS"
35033 #: ../src/guestfs.pod:395
35035 "Although libguestfs is primarily an API for manipulating files inside guest "
35036 "images, we also provide some limited facilities for running commands inside "
35041 #: ../src/guestfs.pod:399
35042 msgid "There are many limitations to this:"
35046 #: ../src/guestfs.pod:405
35048 "The kernel version that the command runs under will be different from what "
35053 #: ../src/guestfs.pod:410
35055 "If the command needs to communicate with daemons, then most likely they "
35056 "won't be running."
35060 #: ../src/guestfs.pod:415
35061 msgid "The command will be running in limited memory."
35065 #: ../src/guestfs.pod:419
35067 "The network may not be available unless you enable it (see L</"
35068 "guestfs_set_network>)."
35072 #: ../src/guestfs.pod:424
35073 msgid "Only supports Linux guests (not Windows, BSD, etc)."
35077 #: ../src/guestfs.pod:428
35079 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
35083 #: ../src/guestfs.pod:433
35085 "For SELinux guests, you may need to enable SELinux and load policy first. "
35086 "See L</SELINUX> in this manpage."
35090 #: ../src/guestfs.pod:438
35092 "I<Security:> It is not safe to run commands from untrusted, possibly "
35093 "malicious guests. These commands may attempt to exploit your program by "
35094 "sending unexpected output. They could also try to exploit the Linux kernel "
35095 "or qemu provided by the libguestfs appliance. They could use the network "
35096 "provided by the libguestfs appliance to bypass ordinary network partitions "
35097 "and firewalls. They could use the elevated privileges or different SELinux "
35098 "context of your program to their advantage."
35102 #: ../src/guestfs.pod:447
35104 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
35105 "(a script which runs when the guest next boots normally), and to have this "
35106 "script run the commands you want in the normal context of the running guest, "
35107 "network security and so on. For information about other security issues, "
35108 "see L</SECURITY>."
35112 #: ../src/guestfs.pod:455
35114 "The two main API calls to run commands are L</guestfs_command> and L</"
35115 "guestfs_sh> (there are also variations)."
35119 #: ../src/guestfs.pod:458
35121 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
35122 "shell globs, redirections, etc will work."
35126 #: ../src/guestfs.pod:461
35127 msgid "CONFIGURATION FILES"
35131 #: ../src/guestfs.pod:463
35133 "To read and write configuration files in Linux guest filesystems, we "
35134 "strongly recommend using Augeas. For example, Augeas understands how to "
35135 "read and write, say, a Linux shadow password file or X.org configuration "
35136 "file, and so avoids you having to write that code."
35140 #: ../src/guestfs.pod:468
35142 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
35143 "document Augeas itself here because there is excellent documentation on the "
35144 "L<http://augeas.net/> website."
35148 #: ../src/guestfs.pod:472
35150 "If you don't want to use Augeas (you fool!) then try calling L</"
35151 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
35156 #: ../src/guestfs.pod:476
35161 #: ../src/guestfs.pod:478
35163 "We support SELinux guests. To ensure that labeling happens correctly in "
35164 "SELinux guests, you need to enable SELinux and load the guest's policy:"
35168 #: ../src/guestfs.pod:486
35169 msgid "Before launching, do:"
35173 #: ../src/guestfs.pod:488
35176 " guestfs_set_selinux (g, 1);\n"
35181 #: ../src/guestfs.pod:492
35183 "After mounting the guest's filesystem(s), load the policy. This is best "
35184 "done by running the L<load_policy(8)> command in the guest itself:"
35188 #: ../src/guestfs.pod:496
35191 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
35196 #: ../src/guestfs.pod:498
35198 "(Older versions of C<load_policy> require you to specify the name of the "
35203 #: ../src/guestfs.pod:503
35205 "Optionally, set the security context for the API. The correct security "
35206 "context to use can only be known by inspecting the guest. As an example:"
35210 #: ../src/guestfs.pod:507
35213 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
35218 #: ../src/guestfs.pod:511
35219 msgid "This will work for running commands and editing existing files."
35223 #: ../src/guestfs.pod:513
35225 "When new files are created, you may need to label them explicitly, for "
35226 "example by running the external command C<restorecon pathname>."
35230 #: ../src/guestfs.pod:517
35235 #: ../src/guestfs.pod:519
35237 "Certain calls are affected by the current file mode creation mask (the "
35238 "\"umask\"). In particular ones which create files or directories, such as "
35239 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
35240 "either the default mode that the file is created with or modifies the mode "
35245 #: ../src/guestfs.pod:525
35247 "The default umask is C<022>, so files are created with modes such as C<0644> "
35248 "and directories with C<0755>."
35252 #: ../src/guestfs.pod:528
35254 "There are two ways to avoid being affected by umask. Either set umask to 0 "
35255 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
35256 "guestfs_chmod> after creating each file or directory."
35260 #: ../src/guestfs.pod:532
35261 msgid "For more information about umask, see L<umask(2)>."
35265 #: ../src/guestfs.pod:536
35267 "Libguestfs allows you to access Linux guests which have been encrypted using "
35268 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
35269 "standard. This includes nearly all whole disk encryption systems used by "
35270 "modern Linux guests."
35274 #: ../src/guestfs.pod:542
35276 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
35277 "returns the string C<crypto_LUKS>)."
35281 #: ../src/guestfs.pod:545
35283 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
35284 "will require the passphrase!"
35288 #: ../src/guestfs.pod:548
35290 "Opening a LUKS device creates a new device mapper device called C</dev/"
35291 "mapper/mapname> (where C<mapname> is the string you supply to L</"
35292 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
35293 "from and encrypted to the underlying block device respectively."
35297 #: ../src/guestfs.pod:554
35299 "LVM volume groups on the device can be made visible by calling L</"
35300 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
35301 "(s) can now be mounted in the usual way."
35305 #: ../src/guestfs.pod:558
35307 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
35308 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35309 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
35310 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35311 "underlying encrypted block device)."
35315 #: ../src/guestfs.pod:565
35320 #: ../src/guestfs.pod:567
35322 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35323 "contains operating systems, an install CD or a live CD. (These APIs used to "
35324 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
35325 "version 1.5.3 the most frequently used part of this library has been "
35326 "rewritten in C and moved into the core code)."
35330 #: ../src/guestfs.pod:574
35332 "Add all disks belonging to the unknown virtual machine and call L</"
35333 "guestfs_launch> in the usual way."
35337 #: ../src/guestfs.pod:577
35339 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
35340 "and certain heuristics, and returns a list of operating systems that were "
35341 "found. An empty list means none were found. A single element is the root "
35342 "filesystem of the operating system. For dual- or multi-boot guests, "
35343 "multiple roots can be returned, each one corresponding to a separate "
35344 "operating system. (Multi-boot virtual machines are extremely rare in the "
35345 "world of virtualization, but since this scenario can happen, we have built "
35346 "libguestfs to deal with it.)"
35350 #: ../src/guestfs.pod:586
35352 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35353 "to get additional details about that operating system. For example, call L</"
35354 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
35355 "Windows and Linux-based operating systems respectively."
35359 #: ../src/guestfs.pod:592
35361 "Un*x-like and Linux-based operating systems usually consist of several "
35362 "filesystems which are mounted at boot time (for example, a separate boot "
35363 "partition mounted on C</boot>). The inspection rules are able to detect how "
35364 "filesystems correspond to mount points. Call "
35365 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35366 "hash table like this example:"
35370 #: ../src/guestfs.pod:599
35373 " /boot => /dev/sda1\n"
35374 " / => /dev/vg_guest/lv_root\n"
35375 " /usr => /dev/vg_guest/lv_usr\n"
35380 #: ../src/guestfs.pod:603
35382 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35383 "filesystems as suggested."
35387 #: ../src/guestfs.pod:606
35389 "Be careful to mount filesystems in the right order (eg. C</> before C</"
35390 "usr>). Sorting the keys of the hash by length, shortest first, should work."
35394 #: ../src/guestfs.pod:610
35396 "Inspection currently only works for some common operating systems. "
35397 "Contributors are welcome to send patches for other operating systems that we "
35398 "currently cannot detect."
35402 #: ../src/guestfs.pod:614
35404 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35405 "for more details. The L</guestfs_inspect_os> function just ignores any "
35406 "encrypted devices."
35410 #: ../src/guestfs.pod:618
35412 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35413 "inspection and caches the results in the guest handle. Subsequent calls to "
35414 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
35415 "read the disks. If you change the content of the guest disks, you can redo "
35416 "inspection by calling L</guestfs_inspect_os> again. (L</"
35417 "guestfs_inspect_list_applications> works a little differently from the other "
35418 "calls and does read the disks. See documentation for that function for "
35423 #: ../src/guestfs.pod:627
35424 msgid "INSPECTING INSTALL DISKS"
35428 #: ../src/guestfs.pod:629
35430 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35435 #: ../src/guestfs.pod:632
35437 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35438 "system, which currently can be C<installed> (a regular operating system) or "
35439 "C<installer> (some sort of install disk)."
35443 #: ../src/guestfs.pod:636
35445 "Further information is available about the operating system that can be "
35446 "installed using the regular inspection APIs like L</"
35447 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
35451 #: ../src/guestfs.pod:641
35453 "Some additional information specific to installer disks is also available "
35454 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
35455 "guestfs_inspect_is_multipart> calls."
35459 #: ../src/guestfs.pod:646
35460 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35464 #: ../src/guestfs.pod:648
35466 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
35467 "ntfs-3g.org/> driver."
35471 #: ../src/guestfs.pod:651
35472 msgid "DRIVE LETTERS AND PATHS"
35476 #: ../src/guestfs.pod:653
35478 "DOS and Windows still use drive letters, and the filesystems are always "
35479 "treated as case insensitive by Windows itself, and therefore you might find "
35480 "a Windows configuration file referring to a path like C<c:\\windows"
35481 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
35482 "might be referred to as C</WINDOWS/System32>."
35486 #: ../src/guestfs.pod:659
35488 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35489 "L</guestfs_inspect_get_drive_mappings>)"
35493 #: ../src/guestfs.pod:662
35495 "Dealing with separator characters (backslash vs forward slash) is outside "
35496 "the scope of libguestfs, but usually a simple character replacement will "
35501 #: ../src/guestfs.pod:666
35503 "To resolve the case insensitivity of paths, call L</"
35504 "guestfs_case_sensitive_path>."
35508 #: ../src/guestfs.pod:669
35509 msgid "ACCESSING THE WINDOWS REGISTRY"
35513 #: ../src/guestfs.pod:671
35515 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35516 "files, through the library C<hivex> which is part of the libguestfs project "
35517 "although ships as a separate tarball. You have to locate and download the "
35518 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35519 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
35520 "reg(1)> for more help on this issue."
35524 #: ../src/guestfs.pod:679
35525 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
35529 #: ../src/guestfs.pod:681
35531 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
35532 "provide something which looks like a Linux symlink. The way it tries to do "
35533 "the rewriting is described here:"
35537 #: ../src/guestfs.pod:685
35539 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
35544 #: ../src/guestfs.pod:687
35546 "The essential problem is that ntfs-3g simply does not have enough "
35547 "information to do a correct job. NTFS links can contain drive letters and "
35548 "references to external device GUIDs that ntfs-3g has no way of resolving. "
35549 "It is almost certainly the case that libguestfs callers should ignore what "
35550 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
35554 #: ../src/guestfs.pod:694
35556 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
35557 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
35558 "attribute, and read the raw reparse data from that (you can find the format "
35559 "documented in various places around the web)."
35563 #: ../src/guestfs.pod:699
35564 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
35568 #: ../src/guestfs.pod:701
35570 "There are other useful extended attributes that can be read from ntfs-3g "
35571 "filesystems (using L</guestfs_getxattr>). See:"
35575 #: ../src/guestfs.pod:704
35577 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
35581 #: ../src/guestfs.pod:706
35582 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
35586 #: ../src/guestfs.pod:708
35588 "Although we don't want to discourage you from using the C API, we will "
35589 "mention here that the same API is also available in other languages."
35593 #: ../src/guestfs.pod:711
35595 "The API is broadly identical in all supported languages. This means that "
35596 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
35597 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
35598 "OCaml. In other words, a straightforward, predictable isomorphism between "
35603 #: ../src/guestfs.pod:717
35605 "Error messages are automatically transformed into exceptions if the language "
35610 #: ../src/guestfs.pod:720
35612 "We don't try to \"object orientify\" parts of the API in OO languages, "
35613 "although contributors are welcome to write higher level APIs above what we "
35614 "provide in their favourite languages if they wish."
35618 #: ../src/guestfs.pod:726
35623 #: ../src/guestfs.pod:728
35625 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
35626 "identical to the C API. C++ classes and exceptions are not used."
35630 #: ../src/guestfs.pod:732
35635 #: ../src/guestfs.pod:734
35637 "The C# bindings are highly experimental. Please read the warnings at the "
35638 "top of C<csharp/Libguestfs.cs>."
35642 #: ../src/guestfs.pod:737
35647 #: ../src/guestfs.pod:739
35648 msgid "See L<guestfs-erlang(3)>."
35652 #: ../src/guestfs.pod:741
35657 #: ../src/guestfs.pod:743
35659 "This is the only language binding that is working but incomplete. Only "
35660 "calls which return simple integers have been bound in Haskell, and we are "
35661 "looking for help to complete this binding."
35665 #: ../src/guestfs.pod:747
35670 #: ../src/guestfs.pod:749
35672 "Full documentation is contained in the Javadoc which is distributed with "
35673 "libguestfs. For examples, see L<guestfs-java(3)>."
35677 #: ../src/guestfs.pod:752
35682 #: ../src/guestfs.pod:754
35683 msgid "See L<guestfs-ocaml(3)>."
35687 #: ../src/guestfs.pod:756
35692 #: ../src/guestfs.pod:758
35693 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
35697 #: ../src/guestfs.pod:760
35702 #: ../src/guestfs.pod:762
35704 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
35705 "the php-libguestfs package for your distribution."
35709 #: ../src/guestfs.pod:765
35710 msgid "The PHP binding only works correctly on 64 bit machines."
35714 #: ../src/guestfs.pod:767
35719 #: ../src/guestfs.pod:769
35720 msgid "See L<guestfs-python(3)>."
35724 #: ../src/guestfs.pod:771
35729 #: ../src/guestfs.pod:773
35730 msgid "See L<guestfs-ruby(3)>."
35734 #: ../src/guestfs.pod:775
35735 msgid "B<shell scripts>"
35739 #: ../src/guestfs.pod:777
35740 msgid "See L<guestfish(1)>."
35744 #: ../src/guestfs.pod:781
35745 msgid "LIBGUESTFS GOTCHAS"
35749 #: ../src/guestfs.pod:783
35751 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
35752 "system [...] that works in the way it is documented but is counterintuitive "
35753 "and almost invites mistakes.\""
35757 #: ../src/guestfs.pod:787
35759 "Since we developed libguestfs and the associated tools, there are several "
35760 "things we would have designed differently, but are now stuck with for "
35761 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
35762 "release, you can expect these to change. Beware of them."
35766 #: ../src/guestfs.pod:795
35767 msgid "Autosync / forgetting to sync."
35771 #: ../src/guestfs.pod:797
35773 "I<Update:> Autosync is enabled by default for all API users starting from "
35774 "libguestfs 1.5.24. This section only applies to older versions."
35778 #: ../src/guestfs.pod:800
35780 "When modifying a filesystem from C or another language, you B<must> unmount "
35781 "all filesystems and call L</guestfs_sync> explicitly before you close the "
35782 "libguestfs handle. You can also call:"
35786 #: ../src/guestfs.pod:804
35789 " guestfs_set_autosync (g, 1);\n"
35794 #: ../src/guestfs.pod:806
35796 "to have the unmount/sync done automatically for you when the handle 'g' is "
35797 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
35801 #: ../src/guestfs.pod:810
35803 "If you forget to do this, then it is entirely possible that your changes "
35804 "won't be written out, or will be partially written, or (very rarely) that "
35805 "you'll get disk corruption."
35809 #: ../src/guestfs.pod:814
35811 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
35812 "guestfish scripts that forget to sync will work just fine, which can make "
35813 "this very puzzling if you are trying to debug a problem."
35817 #: ../src/guestfs.pod:818
35818 msgid "Mount option C<-o sync> should not be the default."
35822 #: ../src/guestfs.pod:820
35824 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
35825 "libguestfs 1.13.16. This section only applies to older versions."
35829 #: ../src/guestfs.pod:823
35831 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
35832 "However C<-o sync> does not add any reliability benefit, but does have a "
35833 "very large performance impact."
35837 #: ../src/guestfs.pod:827
35839 "The work around is to use L</guestfs_mount_options> and set the mount "
35840 "options that you actually want to use."
35844 #: ../src/guestfs.pod:830
35845 msgid "Read-only should be the default."
35849 #: ../src/guestfs.pod:832
35851 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
35852 "specify I<--rw> if you want to make changes to the image."
35856 #: ../src/guestfs.pod:835
35857 msgid "This would reduce the potential to corrupt live VM images."
35861 #: ../src/guestfs.pod:837
35863 "Note that many filesystems change the disk when you just mount and unmount, "
35864 "even if you didn't perform any writes. You need to use L</"
35865 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
35869 #: ../src/guestfs.pod:841
35870 msgid "guestfish command line is hard to use."
35874 #: ../src/guestfs.pod:843
35876 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
35877 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
35878 "exist, so it fails. In earlier versions of guestfish the error message was "
35879 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
35880 "we should have used C<guestfish -c command> to run commands."
35884 #: ../src/guestfs.pod:850
35885 msgid "guestfish megabyte modifiers don't work right on all commands"
35889 #: ../src/guestfs.pod:852
35891 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
35892 "other modifiers). What guestfish actually does is to multiply the number "
35893 "part by the modifier part and pass the result to the C API. However this "
35894 "doesn't work for a few APIs which aren't expecting bytes, but are already "
35895 "expecting some other unit (eg. megabytes)."
35899 #: ../src/guestfs.pod:859
35900 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
35904 #: ../src/guestfs.pod:861
35907 " lvcreate LV VG 100M\n"
35912 #: ../src/guestfs.pod:863
35914 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
35915 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
35916 "megabytes * megabytes) logical volume. The error message you get from this "
35917 "is also a little obscure."
35921 #: ../src/guestfs.pod:868
35923 "This could be fixed in the generator by specially marking parameters and "
35924 "return values which take bytes or other units."
35928 #: ../src/guestfs.pod:871
35929 msgid "Ambiguity between devices and paths"
35933 #: ../src/guestfs.pod:873
35935 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
35936 "sdb2>) and a similar pathname. A file might just happen to be called "
35937 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
35941 #: ../src/guestfs.pod:878
35943 "In the current API we usually resolve this ambiguity by having two separate "
35944 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
35945 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
35946 "detecting if the path supplied begins with C</dev/>."
35950 #: ../src/guestfs.pod:884
35952 "To avoid both the ambiguity and the need to duplicate some calls, we could "
35953 "make paths/devices into structured names. One way to do this would be to "
35954 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
35955 "aspect of grub. Another way would be to use a structured type, equivalent "
35956 "to this OCaml type:"
35960 #: ../src/guestfs.pod:890
35963 " type path = Path of string | Device of int | Partition of int * int\n"
35968 #: ../src/guestfs.pod:892
35969 msgid "which would allow you to pass arguments like:"
35973 #: ../src/guestfs.pod:894
35976 " Path \"/foo/bar\"\n"
35977 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
35978 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
35979 " Path \"/dev/sdb2\" (* not a device *)\n"
35984 #: ../src/guestfs.pod:899
35986 "As you can see there are still problems to resolve even with this "
35987 "representation. Also consider how it might work in guestfish."
35991 #: ../src/guestfs.pod:904
35992 msgid "KEYS AND PASSPHRASES"
35996 #: ../src/guestfs.pod:906
35998 "Certain libguestfs calls take a parameter that contains sensitive key "
35999 "material, passed in as a C string."
36003 #: ../src/guestfs.pod:909
36005 "In the future we would hope to change the libguestfs implementation so that "
36006 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
36007 "swap. However this is I<not> done at the moment, because of the complexity "
36008 "of such an implementation."
36012 #: ../src/guestfs.pod:914
36014 "Therefore you should be aware that any key parameter you pass to libguestfs "
36015 "might end up being written out to the swap partition. If this is a concern, "
36016 "scrub the swap partition or don't use libguestfs on encrypted devices."
36020 #: ../src/guestfs.pod:919
36021 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
36025 #: ../src/guestfs.pod:921
36027 "All high-level libguestfs actions are synchronous. If you want to use "
36028 "libguestfs asynchronously then you must create a thread."
36032 #: ../src/guestfs.pod:924
36034 "Only use the handle from a single thread. Either use the handle exclusively "
36035 "from one thread, or provide your own mutex so that two threads cannot issue "
36036 "calls on the same handle at the same time."
36040 #: ../src/guestfs.pod:928
36042 "See the graphical program guestfs-browser for one possible architecture for "
36043 "multithreaded programs using libvirt and libguestfs."
36047 #: ../src/guestfs.pod:931
36052 #: ../src/guestfs.pod:933
36054 "Libguestfs needs a supermin appliance, which it finds by looking along an "
36059 #: ../src/guestfs.pod:936
36061 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
36062 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
36066 #: ../src/guestfs.pod:939
36068 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
36069 "to change the directories that libguestfs will search in. The value is a "
36070 "colon-separated list of paths. The current directory is I<not> searched "
36071 "unless the path contains an empty element or C<.>. For example "
36072 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
36073 "then C</usr/lib/guestfs>."
36077 #: ../src/guestfs.pod:946
36078 msgid "QEMU WRAPPERS"
36082 #: ../src/guestfs.pod:948
36084 "If you want to compile your own qemu, run qemu from a non-standard location, "
36085 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
36090 #: ../src/guestfs.pod:952
36092 "There is one important rule to remember: you I<must C<exec qemu>> as the "
36093 "last command in the shell script (so that qemu replaces the shell and "
36094 "becomes the direct child of the libguestfs-using program). If you don't do "
36095 "this, then the qemu process won't be cleaned up correctly."
36099 #: ../src/guestfs.pod:957
36101 "Here is an example of a wrapper, where I have built my own copy of qemu from "
36106 #: ../src/guestfs.pod:960
36110 " qemudir=/home/rjones/d/qemu\n"
36111 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
36116 #: ../src/guestfs.pod:964
36118 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
36119 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
36124 #: ../src/guestfs.pod:968
36127 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
36132 #: ../src/guestfs.pod:970
36134 "Note that libguestfs also calls qemu with the -help and -version options in "
36135 "order to determine features."
36139 #: ../src/guestfs.pod:973
36141 "Wrappers can also be used to edit the options passed to qemu. In the "
36142 "following example, the C<-machine ...> option (C<-machine> and the following "
36143 "argument) are removed from the command line and replaced with C<-machine pc,"
36144 "accel=tcg>. The while loop iterates over the options until it finds the "
36145 "right one to remove, putting the remaining options into the C<args> array."
36149 #: ../src/guestfs.pod:982
36153 " while [ $# -gt 0 ]; do\n"
36154 " case \"$1\" in\n"
36158 " args[i]=\"$1\"\n"
36167 #: ../src/guestfs.pod:994
36170 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
36175 #: ../src/guestfs.pod:996
36176 msgid "ATTACHING TO RUNNING DAEMONS"
36180 #: ../src/guestfs.pod:998
36182 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
36183 "babies. Use with caution."
36187 #: ../src/guestfs.pod:1001
36189 "I<Note (2):> This section explains how to attach to a running daemon from a "
36190 "low level perspective. For most users, simply using virt tools such as "
36191 "L<guestfish(1)> with the I<--live> option will \"just work\"."
36195 #: ../src/guestfs.pod:1005
36196 msgid "Using guestfs_set_attach_method"
36200 #: ../src/guestfs.pod:1007
36202 "By calling L</guestfs_set_attach_method> you can change how the library "
36203 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
36204 "ARCHITECTURE> for some background)."
36208 #: ../src/guestfs.pod:1011
36210 "The normal attach method is C<appliance>, where a small appliance is created "
36211 "containing the daemon, and then the library connects to this."
36215 #: ../src/guestfs.pod:1014
36217 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
36218 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
36219 "daemon over the Unix domain socket."
36223 #: ../src/guestfs.pod:1018
36225 "The normal use for this is to connect to a running virtual machine that "
36226 "contains a C<guestfsd> daemon, and send commands so you can read and write "
36227 "files inside the live virtual machine."
36231 #: ../src/guestfs.pod:1022
36232 msgid "Using guestfs_add_domain with live flag"
36236 #: ../src/guestfs.pod:1024
36238 "L</guestfs_add_domain> provides some help for getting the correct attach "
36239 "method. If you pass the C<live> option to this function, then (if the "
36240 "virtual machine is running) it will examine the libvirt XML looking for a "
36241 "virtio-serial channel to connect to:"
36245 #: ../src/guestfs.pod:1030
36252 " <channel type='unix'>\n"
36253 " <source mode='bind' path='/path/to/socket'/>\n"
36254 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
36263 #: ../src/guestfs.pod:1042
36265 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
36266 "method to C<unix:/path/to/socket>."
36270 #: ../src/guestfs.pod:1045
36272 "Some of the libguestfs tools (including guestfish) support a I<--live> "
36273 "option which is passed through to L</guestfs_add_domain> thus allowing you "
36274 "to attach to and modify live virtual machines."
36278 #: ../src/guestfs.pod:1049
36280 "The virtual machine needs to have been set up beforehand so that it has the "
36281 "virtio-serial channel and so that guestfsd is running inside it."
36285 #: ../src/guestfs.pod:1053
36286 msgid "ABI GUARANTEE"
36290 #: ../src/guestfs.pod:1055
36292 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36293 "actions as outlined in this section. Although we will deprecate some "
36294 "actions, for example if they get replaced by newer calls, we will keep the "
36295 "old actions forever. This allows you the developer to program in confidence "
36296 "against the libguestfs API."
36300 #: ../src/guestfs.pod:1061
36301 msgid "BLOCK DEVICE NAMING"
36305 #: ../src/guestfs.pod:1063
36307 "In the kernel there is now quite a profusion of schemata for naming block "
36308 "devices (in this context, by I<block device> I mean a physical or virtual "
36309 "hard drive). The original Linux IDE driver used names starting with C</dev/"
36310 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
36311 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
36312 "for the old IDE driver (particularly for SATA devices) those devices also "
36313 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
36314 "paravirtualized drivers. This has created several different naming systems, "
36315 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
36319 #: ../src/guestfs.pod:1075
36321 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36322 "Linux kernel to access block devices. We can run a variety of appliances "
36323 "based on a variety of Linux kernels."
36327 #: ../src/guestfs.pod:1079
36329 "This causes a problem for libguestfs because many API calls use device or "
36330 "partition names. Working scripts and the recipe (example) scripts that we "
36331 "make available over the internet could fail if the naming scheme changes."
36335 #: ../src/guestfs.pod:1084
36337 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36338 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
36339 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
36340 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36344 #: ../src/guestfs.pod:1090
36346 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
36347 "L</guestfs_list_partitions> and similar calls return the true names of the "
36348 "devices and partitions as known to the appliance."
36352 #: ../src/guestfs.pod:1095
36353 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36357 #: ../src/guestfs.pod:1097
36359 "Usually this translation is transparent. However in some (very rare) cases "
36360 "you may need to know the exact algorithm. Such cases include where you use "
36361 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
36362 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
36366 #: ../src/guestfs.pod:1103
36368 "The algorithm is applied only to I<parameters> which are known to be either "
36369 "device or partition names. Return values from functions such as L</"
36370 "guestfs_list_devices> are never changed."
36374 #: ../src/guestfs.pod:1111
36375 msgid "Is the string a parameter which is a device or partition name?"
36379 #: ../src/guestfs.pod:1115
36380 msgid "Does the string begin with C</dev/sd>?"
36384 #: ../src/guestfs.pod:1119
36386 "Does the named device exist? If so, we use that device. However if I<not> "
36387 "then we continue with this algorithm."
36391 #: ../src/guestfs.pod:1124
36392 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36396 #: ../src/guestfs.pod:1126
36397 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36401 #: ../src/guestfs.pod:1128
36402 msgid "If that named device exists, use it. If not, continue."
36406 #: ../src/guestfs.pod:1132
36407 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36411 #: ../src/guestfs.pod:1134
36412 msgid "If that named device exists, use it. If not, return an error."
36416 #: ../src/guestfs.pod:1138
36417 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36421 #: ../src/guestfs.pod:1140
36423 "Although the standard naming scheme and automatic translation is useful for "
36424 "simple programs and guestfish scripts, for larger programs it is best not to "
36425 "rely on this mechanism."
36429 #: ../src/guestfs.pod:1144
36431 "Where possible for maximum future portability programs using libguestfs "
36432 "should use these future-proof techniques:"
36436 #: ../src/guestfs.pod:1151
36438 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36439 "device names, and then use those names directly."
36443 #: ../src/guestfs.pod:1154
36445 "Since those device names exist by definition, they will never be translated."
36449 #: ../src/guestfs.pod:1159
36451 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36452 "filesystem labels."
36456 #: ../src/guestfs.pod:1166
36458 "This section discusses security implications of using libguestfs, "
36459 "particularly with untrusted or malicious guests or disk images."
36463 #: ../src/guestfs.pod:1169
36464 msgid "GENERAL SECURITY CONSIDERATIONS"
36468 #: ../src/guestfs.pod:1171
36470 "Be careful with any files or data that you download from a guest (by "
36471 "\"download\" we mean not just the L</guestfs_download> command but any "
36472 "command that reads files, filenames, directories or anything else from a "
36473 "disk image). An attacker could manipulate the data to fool your program "
36474 "into doing the wrong thing. Consider cases such as:"
36478 #: ../src/guestfs.pod:1181
36479 msgid "the data (file etc) not being present"
36483 #: ../src/guestfs.pod:1185
36484 msgid "being present but empty"
36488 #: ../src/guestfs.pod:1189
36489 msgid "being much larger than normal"
36493 #: ../src/guestfs.pod:1193
36494 msgid "containing arbitrary 8 bit data"
36498 #: ../src/guestfs.pod:1197
36499 msgid "being in an unexpected character encoding"
36503 #: ../src/guestfs.pod:1201
36504 msgid "containing homoglyphs."
36508 #: ../src/guestfs.pod:1205
36509 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36513 #: ../src/guestfs.pod:1207
36515 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36516 "(VFS) module can sometimes be escalated into exploits by deliberately "
36517 "creating a malicious, malformed filesystem. These exploits are very severe "
36518 "for two reasons. Firstly there are very many filesystem drivers in the "
36519 "kernel, and many of them are infrequently used and not much developer "
36520 "attention has been paid to the code. Linux userspace helps potential "
36521 "crackers by detecting the filesystem type and automatically choosing the "
36522 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36523 "the administrator. Secondly, a kernel-level exploit is like a local root "
36524 "exploit (worse in some ways), giving immediate and total access to the "
36525 "system right down to the hardware level."
36529 #: ../src/guestfs.pod:1220
36531 "That explains why you should never mount a filesystem from an untrusted "
36532 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
36533 "inside a qemu virtual machine, usually running as a non-root user. The "
36534 "attacker would need to write a filesystem which first exploited the kernel, "
36535 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
36536 "the libguestfs protocol, and finally to be as serious as the host kernel "
36537 "exploit it would need to escalate its privileges to root. This multi-step "
36538 "escalation, performed by a static piece of data, is thought to be extremely "
36539 "hard to do, although we never say 'never' about security issues."
36543 #: ../src/guestfs.pod:1231
36545 "In any case callers can reduce the attack surface by forcing the filesystem "
36546 "type when mounting (use L</guestfs_mount_vfs>)."
36550 #: ../src/guestfs.pod:1234
36551 msgid "PROTOCOL SECURITY"
36555 #: ../src/guestfs.pod:1236
36557 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
36558 "defined upper message size. However a program that uses libguestfs must "
36559 "also take care - for example you can write a program that downloads a binary "
36560 "from a disk image and executes it locally, and no amount of protocol "
36561 "security will save you from the consequences."
36565 #: ../src/guestfs.pod:1242
36566 msgid "INSPECTION SECURITY"
36570 #: ../src/guestfs.pod:1244
36572 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
36573 "directly from the guest, and these could contain any 8 bit data. Callers "
36574 "should be careful to escape these before printing them to a structured file "
36575 "(for example, use HTML escaping if creating a web page)."
36579 #: ../src/guestfs.pod:1250
36581 "Guest configuration may be altered in unusual ways by the administrator of "
36582 "the virtual machine, and may not reflect reality (particularly for untrusted "
36583 "or actively malicious guests). For example we parse the hostname from "
36584 "configuration files like C</etc/sysconfig/network> that we find in the "
36585 "guest, but the guest administrator can easily manipulate these files to "
36586 "provide the wrong hostname."
36590 #: ../src/guestfs.pod:1258
36592 "The inspection API parses guest configuration using two external libraries: "
36593 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
36594 "designed to be robust in the face of malicious data, although denial of "
36595 "service attacks are still possible, for example with oversized configuration "
36600 #: ../src/guestfs.pod:1264
36601 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
36605 #: ../src/guestfs.pod:1266
36607 "Be very cautious about running commands from the guest. By running a "
36608 "command in the guest, you are giving CPU time to a binary that you do not "
36609 "control, under the same user account as the library, albeit wrapped in qemu "
36610 "virtualization. More information and alternatives can be found in the "
36611 "section L</RUNNING COMMANDS>."
36615 #: ../src/guestfs.pod:1272
36616 msgid "CVE-2010-3851"
36620 #: ../src/guestfs.pod:1274
36621 msgid "https://bugzilla.redhat.com/642934"
36625 #: ../src/guestfs.pod:1276
36627 "This security bug concerns the automatic disk format detection that qemu "
36628 "does on disk images."
36632 #: ../src/guestfs.pod:1279
36634 "A raw disk image is just the raw bytes, there is no header. Other disk "
36635 "images like qcow2 contain a special header. Qemu deals with this by looking "
36636 "for one of the known headers, and if none is found then assuming the disk "
36637 "image must be raw."
36641 #: ../src/guestfs.pod:1284
36643 "This allows a guest which has been given a raw disk image to write some "
36644 "other header. At next boot (or when the disk image is accessed by "
36645 "libguestfs) qemu would do autodetection and think the disk image format was, "
36646 "say, qcow2 based on the header written by the guest."
36650 #: ../src/guestfs.pod:1289
36652 "This in itself would not be a problem, but qcow2 offers many features, one "
36653 "of which is to allow a disk image to refer to another image (called the "
36654 "\"backing disk\"). It does this by placing the path to the backing disk "
36655 "into the qcow2 header. This path is not validated and could point to any "
36656 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
36657 "\"holes\" in the qcow2 disk image, which of course is completely under the "
36658 "control of the attacker."
36662 #: ../src/guestfs.pod:1297
36664 "In libguestfs this is rather hard to exploit except under two circumstances:"
36668 #: ../src/guestfs.pod:1304
36669 msgid "You have enabled the network or have opened the disk in write mode."
36673 #: ../src/guestfs.pod:1308
36675 "You are also running untrusted code from the guest (see L</RUNNING "
36680 #: ../src/guestfs.pod:1313
36682 "The way to avoid this is to specify the expected disk format when adding "
36683 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
36684 "should always do this if the disk is raw format, and it's a good idea for "
36689 #: ../src/guestfs.pod:1318
36691 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
36692 "format is fetched from libvirt and passed through."
36696 #: ../src/guestfs.pod:1321
36698 "For libguestfs tools, use the I<--format> command line parameter as "
36703 #: ../src/guestfs.pod:1324
36704 msgid "CONNECTION MANAGEMENT"
36708 #: ../src/guestfs.pod:1326
36709 msgid "guestfs_h *"
36713 #: ../src/guestfs.pod:1328
36715 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
36716 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
36717 "handle and release all resources used."
36721 #: ../src/guestfs.pod:1332
36723 "For information on using multiple handles and threads, see the section L</"
36724 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
36728 #: ../src/guestfs.pod:1335
36729 msgid "guestfs_create"
36733 #: ../src/guestfs.pod:1337
36736 " guestfs_h *guestfs_create (void);\n"
36741 #: ../src/guestfs.pod:1339
36742 msgid "Create a connection handle."
36746 #: ../src/guestfs.pod:1341
36748 "On success this returns a non-NULL pointer to a handle. On error it returns "
36753 #: ../src/guestfs.pod:1344
36755 "You have to \"configure\" the handle after creating it. This includes "
36756 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
36757 "handle at least once."
36761 #: ../src/guestfs.pod:1348
36762 msgid "After configuring the handle, you have to call L</guestfs_launch>."
36766 #: ../src/guestfs.pod:1350
36768 "You may also want to configure error handling for the handle. See the L</"
36769 "ERROR HANDLING> section below."
36773 #: ../src/guestfs.pod:1353
36774 msgid "guestfs_close"
36778 #: ../src/guestfs.pod:1355
36781 " void guestfs_close (guestfs_h *g);\n"
36786 #: ../src/guestfs.pod:1357
36787 msgid "This closes the connection handle and frees up all resources used."
36791 #: ../src/guestfs.pod:1359
36793 "If autosync was set on the handle and the handle was launched, then this "
36794 "implicitly calls various functions to unmount filesystems and sync the "
36795 "disk. See L</guestfs_set_autosync> for more details."
36799 #: ../src/guestfs.pod:1363
36800 msgid "If a close callback was set on the handle, then it is called."
36804 #: ../src/guestfs.pod:1365
36805 msgid "ERROR HANDLING"
36809 #: ../src/guestfs.pod:1367
36811 "API functions can return errors. For example, almost all functions that "
36812 "return C<int> will return C<-1> to indicate an error."
36816 #: ../src/guestfs.pod:1370
36818 "Additional information is available for errors: an error message string and "
36819 "optionally an error number (errno) if the thing that failed was a system "
36824 #: ../src/guestfs.pod:1374
36826 "You can get at the additional information about the last error on the handle "
36827 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
36828 "up an error handler with L</guestfs_set_error_handler>."
36832 #: ../src/guestfs.pod:1379
36834 "When the handle is created, a default error handler is installed which "
36835 "prints the error message string to C<stderr>. For small short-running "
36836 "command line programs it is sufficient to do:"
36840 #: ../src/guestfs.pod:1383
36843 " if (guestfs_launch (g) == -1)\n"
36844 " exit (EXIT_FAILURE);\n"
36849 #: ../src/guestfs.pod:1386
36851 "since the default error handler will ensure that an error message has been "
36852 "printed to C<stderr> before the program exits."
36856 #: ../src/guestfs.pod:1389
36858 "For other programs the caller will almost certainly want to install an "
36859 "alternate error handler or do error handling in-line like this:"
36863 #: ../src/guestfs.pod:1392
36866 " /* This disables the default behaviour of printing errors\n"
36868 " guestfs_set_error_handler (g, NULL, NULL);\n"
36873 #: ../src/guestfs.pod:1396
36876 " if (guestfs_launch (g) == -1) {\n"
36877 " /* Examine the error message and print it etc. */\n"
36878 " char *msg = guestfs_last_error (g);\n"
36879 " int errnum = guestfs_last_errno (g);\n"
36880 " fprintf (stderr, \"%s\", msg);\n"
36881 " if (errnum != 0)\n"
36882 " fprintf (stderr, \": %s\", strerror (errnum));\n"
36883 " fprintf (stderr, \"\\n\");\n"
36890 #: ../src/guestfs.pod:1407
36892 "Out of memory errors are handled differently. The default action is to call "
36893 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
36894 "guestfs_set_out_of_memory_handler>."
36898 #: ../src/guestfs.pod:1411
36900 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
36901 "because there is no handle if this happens there is no way to get additional "
36902 "error information. However L</guestfs_create> is supposed to be a "
36903 "lightweight operation which can only fail because of insufficient memory (it "
36904 "returns NULL in this case)."
36908 #: ../src/guestfs.pod:1417
36909 msgid "guestfs_last_error"
36913 #: ../src/guestfs.pod:1419
36916 " const char *guestfs_last_error (guestfs_h *g);\n"
36921 #: ../src/guestfs.pod:1421
36923 "This returns the last error message that happened on C<g>. If there has not "
36924 "been an error since the handle was created, then this returns C<NULL>."
36928 #: ../src/guestfs.pod:1425
36930 "The lifetime of the returned string is until the next error occurs, or L</"
36931 "guestfs_close> is called."
36935 #: ../src/guestfs.pod:1428
36936 msgid "guestfs_last_errno"
36940 #: ../src/guestfs.pod:1430
36943 " int guestfs_last_errno (guestfs_h *g);\n"
36948 #: ../src/guestfs.pod:1432
36949 msgid "This returns the last error number (errno) that happened on C<g>."
36953 #: ../src/guestfs.pod:1434
36954 msgid "If successful, an errno integer not equal to zero is returned."
36958 #: ../src/guestfs.pod:1436
36960 "If no error, this returns 0. This call can return 0 in three situations:"
36964 #: ../src/guestfs.pod:1443
36965 msgid "There has not been any error on the handle."
36969 #: ../src/guestfs.pod:1447
36971 "There has been an error but the errno was meaningless. This corresponds to "
36972 "the case where the error did not come from a failed system call, but for "
36973 "some other reason."
36977 #: ../src/guestfs.pod:1453
36979 "There was an error from a failed system call, but for some reason the errno "
36980 "was not captured and returned. This usually indicates a bug in libguestfs."
36984 #: ../src/guestfs.pod:1459
36986 "Libguestfs tries to convert the errno from inside the applicance into a "
36987 "corresponding errno for the caller (not entirely trivial: the appliance "
36988 "might be running a completely different operating system from the library "
36989 "and error numbers are not standardized across Un*xen). If this could not be "
36990 "done, then the error is translated to C<EINVAL>. In practice this should "
36991 "only happen in very rare circumstances."
36995 #: ../src/guestfs.pod:1467
36996 msgid "guestfs_set_error_handler"
37000 #: ../src/guestfs.pod:1469
37003 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
37005 " const char *msg);\n"
37006 " void guestfs_set_error_handler (guestfs_h *g,\n"
37007 " guestfs_error_handler_cb cb,\n"
37008 " void *opaque);\n"
37013 #: ../src/guestfs.pod:1476
37015 "The callback C<cb> will be called if there is an error. The parameters "
37016 "passed to the callback are an opaque data pointer and the error message "
37021 #: ../src/guestfs.pod:1480
37023 "C<errno> is not passed to the callback. To get that the callback must call "
37024 "L</guestfs_last_errno>."
37028 #: ../src/guestfs.pod:1483
37030 "Note that the message string C<msg> is freed as soon as the callback "
37031 "function returns, so if you want to stash it somewhere you must make your "
37036 #: ../src/guestfs.pod:1487
37037 msgid "The default handler prints messages on C<stderr>."
37041 #: ../src/guestfs.pod:1489
37042 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
37046 #: ../src/guestfs.pod:1491
37047 msgid "guestfs_get_error_handler"
37051 #: ../src/guestfs.pod:1493
37054 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
37055 " void **opaque_rtn);\n"
37060 #: ../src/guestfs.pod:1496
37061 msgid "Returns the current error handler callback."
37065 #: ../src/guestfs.pod:1498
37066 msgid "guestfs_set_out_of_memory_handler"
37070 #: ../src/guestfs.pod:1500
37073 " typedef void (*guestfs_abort_cb) (void);\n"
37074 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
37075 " guestfs_abort_cb);\n"
37080 #: ../src/guestfs.pod:1504
37082 "The callback C<cb> will be called if there is an out of memory situation. "
37083 "I<Note this callback must not return>."
37087 #: ../src/guestfs.pod:1507
37088 msgid "The default is to call L<abort(3)>."
37092 #: ../src/guestfs.pod:1509
37094 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
37098 #: ../src/guestfs.pod:1512
37099 msgid "guestfs_get_out_of_memory_handler"
37103 #: ../src/guestfs.pod:1514
37106 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
37111 #: ../src/guestfs.pod:1516
37112 msgid "This returns the current out of memory handler."
37116 #: ../src/guestfs.pod:1518
37121 #: ../src/guestfs.pod:1522
37126 #: ../src/guestfs.pod:1524
37131 #: ../src/guestfs.pod:1526
37132 msgid "AVAILABILITY"
37136 #: ../src/guestfs.pod:1528
37137 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
37141 #: ../src/guestfs.pod:1530
37143 "Using L</guestfs_available> you can test availability of the following "
37144 "groups of functions. This test queries the appliance to see if the "
37145 "appliance you are currently using supports the functionality."
37149 #: ../src/guestfs.pod:1535
37150 msgid "@AVAILABILITY@"
37154 #: ../src/guestfs.pod:1537
37155 msgid "GUESTFISH supported COMMAND"
37159 #: ../src/guestfs.pod:1539
37161 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
37162 "prints out the available groups and whether they are supported by this build "
37163 "of libguestfs. Note however that you have to do C<run> first."
37167 #: ../src/guestfs.pod:1544
37168 msgid "SINGLE CALLS AT COMPILE TIME"
37172 #: ../src/guestfs.pod:1546
37174 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
37175 "function, such as:"
37179 #: ../src/guestfs.pod:1549
37182 " #define LIBGUESTFS_HAVE_DD 1\n"
37187 #: ../src/guestfs.pod:1551
37188 msgid "if L</guestfs_dd> is available."
37192 #: ../src/guestfs.pod:1553
37194 "Before version 1.5.8, if you needed to test whether a single libguestfs "
37195 "function is available at compile time, we recommended using build tools such "
37196 "as autoconf or cmake. For example in autotools you could use:"
37200 #: ../src/guestfs.pod:1558
37203 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
37204 " AC_CHECK_FUNCS([guestfs_dd])\n"
37209 #: ../src/guestfs.pod:1561
37211 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
37216 #: ../src/guestfs.pod:1564
37217 msgid "SINGLE CALLS AT RUN TIME"
37221 #: ../src/guestfs.pod:1566
37223 "Testing at compile time doesn't guarantee that a function really exists in "
37224 "the library. The reason is that you might be dynamically linked against a "
37225 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
37226 "This situation unfortunately results in a segmentation fault, which is a "
37227 "shortcoming of the C dynamic linking system itself."
37231 #: ../src/guestfs.pod:1573
37233 "You can use L<dlopen(3)> to test if a function is available at run time, as "
37234 "in this example program (note that you still need the compile time check as "
37239 #: ../src/guestfs.pod:1577
37242 " #include <stdio.h>\n"
37243 " #include <stdlib.h>\n"
37244 " #include <unistd.h>\n"
37245 " #include <dlfcn.h>\n"
37246 " #include <guestfs.h>\n"
37251 #: ../src/guestfs.pod:1583
37256 " #ifdef LIBGUESTFS_HAVE_DD\n"
37258 " int has_function;\n"
37263 #: ../src/guestfs.pod:1589
37266 " /* Test if the function guestfs_dd is really available. */\n"
37267 " dl = dlopen (NULL, RTLD_LAZY);\n"
37269 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
37270 " exit (EXIT_FAILURE);\n"
37272 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
37278 #: ../src/guestfs.pod:1598
37281 " if (!has_function)\n"
37282 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
37284 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
37285 " /* Now it's safe to call\n"
37286 " guestfs_dd (g, \"foo\", \"bar\");\n"
37290 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37297 #: ../src/guestfs.pod:1611
37299 "You may think the above is an awful lot of hassle, and it is. There are "
37300 "other ways outside of the C linking system to ensure that this kind of "
37301 "incompatibility never arises, such as using package versioning:"
37305 #: ../src/guestfs.pod:1616
37308 " Requires: libguestfs >= 1.0.80\n"
37313 #: ../src/guestfs.pod:1618
37314 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37318 #: ../src/guestfs.pod:1620
37320 "A recent feature of the API is the introduction of calls which take optional "
37321 "arguments. In C these are declared 3 ways. The main way is as a call which "
37322 "takes variable arguments (ie. C<...>), as in this example:"
37326 #: ../src/guestfs.pod:1625
37329 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37334 #: ../src/guestfs.pod:1627
37336 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37337 "call with no optional arguments specified:"
37341 #: ../src/guestfs.pod:1630
37344 " guestfs_add_drive_opts (g, filename, -1);\n"
37349 #: ../src/guestfs.pod:1632
37350 msgid "With a single optional argument:"
37354 #: ../src/guestfs.pod:1634
37357 " guestfs_add_drive_opts (g, filename,\n"
37358 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37364 #: ../src/guestfs.pod:1638
37369 #: ../src/guestfs.pod:1640
37372 " guestfs_add_drive_opts (g, filename,\n"
37373 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37374 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37380 #: ../src/guestfs.pod:1645
37382 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37387 #: ../src/guestfs.pod:1648
37388 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37392 #: ../src/guestfs.pod:1650
37394 "The second variant has the same name with the suffix C<_va>, which works the "
37395 "same way but takes a C<va_list>. See the C manual for details. For the "
37396 "example function, this is declared:"
37400 #: ../src/guestfs.pod:1654
37403 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37404 " va_list args);\n"
37409 #: ../src/guestfs.pod:1657
37410 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37414 #: ../src/guestfs.pod:1659
37416 "The third variant is useful where you need to construct these calls. You "
37417 "pass in a structure where you fill in the optional fields. The structure "
37418 "has a bitmask as the first element which you must set to indicate which "
37419 "fields you have filled in. For our example function the structure and call "
37424 #: ../src/guestfs.pod:1665
37427 " struct guestfs_add_drive_opts_argv {\n"
37428 " uint64_t bitmask;\n"
37430 " const char *format;\n"
37433 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37434 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37439 #: ../src/guestfs.pod:1674
37440 msgid "You could call it like this:"
37444 #: ../src/guestfs.pod:1676
37447 " struct guestfs_add_drive_opts_argv optargs = {\n"
37448 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37449 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37450 " .readonly = 1,\n"
37451 " .format = \"qcow2\"\n"
37457 #: ../src/guestfs.pod:1683
37460 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37465 #: ../src/guestfs.pod:1691
37466 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37470 #: ../src/guestfs.pod:1696
37471 msgid "You do not need to fill in all fields of the structure."
37475 #: ../src/guestfs.pod:1700
37477 "There must be a one-to-one correspondence between fields of the structure "
37478 "that are filled in, and bits set in the bitmask."
37482 #: ../src/guestfs.pod:1705
37483 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37487 #: ../src/guestfs.pod:1707
37489 "In other languages, optional arguments are expressed in the way that is "
37490 "natural for that language. We refer you to the language-specific "
37491 "documentation for more details on that."
37495 #: ../src/guestfs.pod:1711
37496 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37500 #: ../src/guestfs.pod:1713
37501 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37505 #: ../src/guestfs.pod:1715
37507 "B<Note:> This section documents the generic event mechanism introduced in "
37508 "libguestfs 1.10, which you should use in new code if possible. The old "
37509 "functions C<guestfs_set_log_message_callback>, "
37510 "C<guestfs_set_subprocess_quit_callback>, "
37511 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37512 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37513 "page. Because of the ABI guarantee, the old functions continue to work."
37517 #: ../src/guestfs.pod:1724
37519 "Handles generate events when certain things happen, such as log messages "
37520 "being generated, progress messages during long-running operations, or the "
37521 "handle being closed. The API calls described below let you register a "
37522 "callback to be called when events happen. You can register multiple "
37523 "callbacks (for the same, different or overlapping sets of events), and "
37524 "individually remove callbacks. If callbacks are not removed, then they "
37525 "remain in force until the handle is closed."
37529 #: ../src/guestfs.pod:1732
37531 "In the current implementation, events are only generated synchronously: that "
37532 "means that events (and hence callbacks) can only happen while you are in the "
37533 "middle of making another libguestfs call. The callback is called in the "
37538 #: ../src/guestfs.pod:1737
37540 "Events may contain a payload, usually nothing (void), an array of 64 bit "
37541 "unsigned integers, or a message buffer. Payloads are discussed later on."
37545 #: ../src/guestfs.pod:1741
37546 msgid "CLASSES OF EVENTS"
37550 #: ../src/guestfs.pod:1745
37551 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
37555 #: ../src/guestfs.pod:1748
37557 "The callback function will be called while the handle is being closed "
37558 "(synchronously from L</guestfs_close>)."
37562 #: ../src/guestfs.pod:1751
37564 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
37565 "handles that are open when the program exits. This means that this callback "
37566 "might be called indirectly from L<exit(3)>, which can cause unexpected "
37567 "problems in higher-level languages (eg. if your HLL interpreter has already "
37568 "been cleaned up by the time this is called, and if your callback then jumps "
37569 "into some HLL function)."
37573 #: ../src/guestfs.pod:1758
37575 "If no callback is registered: the handle is closed without any callback "
37580 #: ../src/guestfs.pod:1761
37581 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
37585 #: ../src/guestfs.pod:1764
37587 "The callback function will be called when the child process quits, either "
37588 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
37589 "corresponds to a transition from any state to the CONFIG state)."
37593 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
37594 msgid "If no callback is registered: the event is ignored."
37598 #: ../src/guestfs.pod:1770
37599 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
37603 #: ../src/guestfs.pod:1773
37605 "The callback function will be called when the child process becomes ready "
37606 "first time after it has been launched. (This corresponds to a transition "
37607 "from LAUNCHING to the READY state)."
37611 #: ../src/guestfs.pod:1779
37612 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
37616 #: ../src/guestfs.pod:1782
37618 "Some long-running operations can generate progress messages. If this "
37619 "callback is registered, then it will be called each time a progress message "
37620 "is generated (usually two seconds after the operation started, and three "
37621 "times per second thereafter until it completes, although the frequency may "
37622 "change in future versions)."
37626 #: ../src/guestfs.pod:1788
37628 "The callback receives in the payload four unsigned 64 bit numbers which are "
37629 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
37633 #: ../src/guestfs.pod:1791
37635 "The units of C<total> are not defined, although for some operations C<total> "
37636 "may relate in some way to the amount of data to be transferred (eg. in bytes "
37637 "or megabytes), and C<position> may be the portion which has been transferred."
37641 #: ../src/guestfs.pod:1796
37642 msgid "The only defined and stable parts of the API are:"
37646 #: ../src/guestfs.pod:1802
37648 "The callback can display to the user some type of progress bar or indicator "
37649 "which shows the ratio of C<position>:C<total>."
37653 #: ../src/guestfs.pod:1807
37654 msgid "0 E<lt>= C<position> E<lt>= C<total>"
37658 #: ../src/guestfs.pod:1811
37660 "If any progress notification is sent during a call, then a final progress "
37661 "notification is always sent when C<position> = C<total> (I<unless> the call "
37662 "fails with an error)."
37666 #: ../src/guestfs.pod:1815
37668 "This is to simplify caller code, so callers can easily set the progress "
37669 "indicator to \"100%\" at the end of the operation, without requiring special "
37670 "code to detect this case."
37674 #: ../src/guestfs.pod:1821
37676 "For some calls we are unable to estimate the progress of the call, but we "
37677 "can still generate progress messages to indicate activity. This is known as "
37678 "\"pulse mode\", and is directly supported by certain progress bar "
37679 "implementations (eg. GtkProgressBar)."
37683 #: ../src/guestfs.pod:1826
37685 "For these calls, zero or more progress messages are generated with "
37686 "C<position = 0> and C<total = 1>, followed by a final message with "
37687 "C<position = total = 1>."
37691 #: ../src/guestfs.pod:1830
37693 "As noted above, if the call fails with an error then the final message may "
37694 "not be generated."
37698 #: ../src/guestfs.pod:1835
37700 "The callback also receives the procedure number (C<proc_nr>) and serial "
37701 "number (C<serial>) of the call. These are only useful for debugging "
37702 "protocol issues, and the callback can normally ignore them. The callback "
37703 "may want to print these numbers in error messages or debugging messages."
37707 #: ../src/guestfs.pod:1841
37708 msgid "If no callback is registered: progress messages are discarded."
37712 #: ../src/guestfs.pod:1843
37713 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
37717 #: ../src/guestfs.pod:1846
37719 "The callback function is called whenever a log message is generated by qemu, "
37720 "the appliance kernel, guestfsd (daemon), or utility programs."
37724 #: ../src/guestfs.pod:1849
37726 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
37727 "guestfs_launch>) then additional debug messages are generated."
37731 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
37733 "If no callback is registered: the messages are discarded unless the verbose "
37734 "flag is set in which case they are sent to stderr. You can override the "
37735 "printing of verbose messages to stderr by setting up a callback."
37739 #: ../src/guestfs.pod:1857
37740 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
37744 #: ../src/guestfs.pod:1860
37746 "The callback function is called whenever a log message is generated by the "
37747 "library part of libguestfs."
37751 #: ../src/guestfs.pod:1863
37753 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
37754 "messages are generated."
37758 #: ../src/guestfs.pod:1871
37759 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
37763 #: ../src/guestfs.pod:1874
37765 "The callback function is called whenever a trace message is generated. This "
37766 "only applies if the trace flag (L</guestfs_set_trace>) is set."
37770 #: ../src/guestfs.pod:1877
37772 "If no callback is registered: the messages are sent to stderr. You can "
37773 "override the printing of trace messages to stderr by setting up a callback."
37777 #: ../src/guestfs.pod:1881
37778 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
37782 #: ../src/guestfs.pod:1884
37784 "The callback function is called whenever a libguestfs function is entered."
37788 #: ../src/guestfs.pod:1887
37790 "The payload is a string which contains the name of the function that we are "
37791 "entering (not including C<guestfs_> prefix)."
37795 #: ../src/guestfs.pod:1890
37797 "Note that libguestfs functions can call themselves, so you may see many "
37798 "events from a single call. A few libguestfs functions do not generate this "
37803 #: ../src/guestfs.pod:1898
37804 msgid "guestfs_set_event_callback"
37808 #: ../src/guestfs.pod:1900
37811 " int guestfs_set_event_callback (guestfs_h *g,\n"
37812 " guestfs_event_callback cb,\n"
37813 " uint64_t event_bitmask,\n"
37815 " void *opaque);\n"
37820 #: ../src/guestfs.pod:1906
37822 "This function registers a callback (C<cb>) for all event classes in the "
37823 "C<event_bitmask>."
37827 #: ../src/guestfs.pod:1909
37829 "For example, to register for all log message events, you could call this "
37830 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
37831 "To register a single callback for all possible classes of events, use "
37832 "C<GUESTFS_EVENT_ALL>."
37836 #: ../src/guestfs.pod:1915
37837 msgid "C<flags> should always be passed as 0."
37841 #: ../src/guestfs.pod:1917
37843 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
37844 "it for any purpose."
37848 #: ../src/guestfs.pod:1920
37850 "The return value is the event handle (an integer) which you can use to "
37851 "delete the callback (see below)."
37855 #: ../src/guestfs.pod:1923
37857 "If there is an error, this function returns C<-1>, and sets the error in the "
37858 "handle in the usual way (see L</guestfs_last_error> etc.)"
37862 #: ../src/guestfs.pod:1926
37864 "Callbacks remain in effect until they are deleted, or until the handle is "
37869 #: ../src/guestfs.pod:1929
37871 "In the case where multiple callbacks are registered for a particular event "
37872 "class, all of the callbacks are called. The order in which multiple "
37873 "callbacks are called is not defined."
37877 #: ../src/guestfs.pod:1933
37878 msgid "guestfs_delete_event_callback"
37882 #: ../src/guestfs.pod:1935
37885 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
37890 #: ../src/guestfs.pod:1937
37892 "Delete a callback that was previously registered. C<event_handle> should be "
37893 "the integer that was returned by a previous call to "
37894 "C<guestfs_set_event_callback> on the same handle."
37898 #: ../src/guestfs.pod:1941
37899 msgid "guestfs_event_callback"
37903 #: ../src/guestfs.pod:1943
37906 " typedef void (*guestfs_event_callback) (\n"
37909 " uint64_t event,\n"
37910 " int event_handle,\n"
37912 " const char *buf, size_t buf_len,\n"
37913 " const uint64_t *array, size_t array_len);\n"
37918 #: ../src/guestfs.pod:1952
37920 "This is the type of the event callback function that you have to provide."
37924 #: ../src/guestfs.pod:1955
37926 "The basic parameters are: the handle (C<g>), the opaque user pointer "
37927 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
37928 "handle, and C<flags> which in the current API you should ignore."
37932 #: ../src/guestfs.pod:1959
37934 "The remaining parameters contain the event payload (if any). Each event may "
37935 "contain a payload, which usually relates to the event class, but for future "
37936 "proofing your code should be written to handle any payload for any event "
37941 #: ../src/guestfs.pod:1964
37943 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
37944 "there is no message buffer). Note that this message buffer can contain "
37945 "arbitrary 8 bit data, including NUL bytes."
37949 #: ../src/guestfs.pod:1968
37951 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
37952 "moment this is only used for progress messages."
37956 #: ../src/guestfs.pod:1971
37957 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
37961 #: ../src/guestfs.pod:1973
37963 "One motivation for the generic event API was to allow GUI programs to "
37964 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
37965 "unconditionally to C<stderr>."
37969 #: ../src/guestfs.pod:1977
37971 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
37972 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
37973 "messages are not events; you must capture error messages separately)."
37977 #: ../src/guestfs.pod:1982
37979 "Programs have to set up a callback to capture the classes of events of "
37984 #: ../src/guestfs.pod:1985
37988 " guestfs_set_event_callback\n"
37989 " (g, message_callback,\n"
37990 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
37991 " GUESTFS_EVENT_TRACE,\n"
37992 " 0, NULL) == -1)\n"
37993 " if (eh == -1) {\n"
37994 " // handle error in the usual way\n"
38000 #: ../src/guestfs.pod:1995
38002 "The callback can then direct messages to the appropriate place. In this "
38003 "example, messages are directed to syslog:"
38007 #: ../src/guestfs.pod:1998
38011 " message_callback (\n"
38014 " uint64_t event,\n"
38015 " int event_handle,\n"
38017 " const char *buf, size_t buf_len,\n"
38018 " const uint64_t *array, size_t array_len)\n"
38020 " const int priority = LOG_USER|LOG_INFO;\n"
38021 " if (buf_len > 0)\n"
38022 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
38028 #: ../src/guestfs.pod:2013
38029 msgid "CANCELLING LONG TRANSFERS"
38033 #: ../src/guestfs.pod:2015
38035 "Some operations can be cancelled by the caller while they are in progress. "
38036 "Currently only operations that involve uploading or downloading data can be "
38037 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
38038 "parameters in the generator)."
38042 #: ../src/guestfs.pod:2020
38043 msgid "guestfs_user_cancel"
38047 #: ../src/guestfs.pod:2022
38050 " void guestfs_user_cancel (guestfs_h *g);\n"
38055 #: ../src/guestfs.pod:2024
38057 "C<guestfs_user_cancel> cancels the current upload or download operation."
38061 #: ../src/guestfs.pod:2027
38063 "Unlike most other libguestfs calls, this function is signal safe and thread "
38064 "safe. You can call it from a signal handler or from another thread, without "
38065 "needing to do any locking."
38069 #: ../src/guestfs.pod:2031
38071 "The transfer that was in progress (if there is one) will stop shortly "
38072 "afterwards, and will return an error. The errno (see L</"
38073 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
38074 "out if the operation was cancelled or failed because of another error."
38078 #: ../src/guestfs.pod:2037
38080 "No cleanup is performed: for example, if a file was being uploaded then "
38081 "after cancellation there may be a partially uploaded file. It is the "
38082 "caller's responsibility to clean up if necessary."
38086 #: ../src/guestfs.pod:2041
38087 msgid "There are two common places that you might call C<guestfs_user_cancel>."
38091 #: ../src/guestfs.pod:2043
38093 "In an interactive text-based program, you might call it from a C<SIGINT> "
38094 "signal handler so that pressing C<^C> cancels the current operation. (You "
38095 "also need to call L</guestfs_set_pgroup> so that child processes don't "
38096 "receive the C<^C> signal)."
38100 #: ../src/guestfs.pod:2048
38102 "In a graphical program, when the main thread is displaying a progress bar "
38103 "with a cancel button, wire up the cancel button to call this function."
38107 #: ../src/guestfs.pod:2052
38108 msgid "PRIVATE DATA AREA"
38112 #: ../src/guestfs.pod:2054
38114 "You can attach named pieces of private data to the libguestfs handle, fetch "
38115 "them by name, and walk over them, for the lifetime of the handle. This is "
38116 "called the private data area and is only available from the C API."
38120 #: ../src/guestfs.pod:2059
38121 msgid "To attach a named piece of data, use the following call:"
38125 #: ../src/guestfs.pod:2061
38128 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
38133 #: ../src/guestfs.pod:2063
38135 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
38136 "pointer (which can be C<NULL>). Any previous item with the same key is "
38141 #: ../src/guestfs.pod:2067
38143 "You can use any C<key> you want, but your key should I<not> start with an "
38144 "underscore character. Keys beginning with an underscore character are "
38145 "reserved for internal libguestfs purposes (eg. for implementing language "
38146 "bindings). It is recommended that you prefix the key with some unique "
38147 "string to avoid collisions with other users."
38151 #: ../src/guestfs.pod:2073
38152 msgid "To retrieve the pointer, use:"
38156 #: ../src/guestfs.pod:2075
38159 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
38164 #: ../src/guestfs.pod:2077
38166 "This function returns C<NULL> if either no data is found associated with "
38167 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
38172 #: ../src/guestfs.pod:2081
38174 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
38175 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
38176 "all. In particular, libguestfs does I<not> try to free the data when the "
38177 "handle is closed. If the data must be freed, then the caller must either "
38178 "free it before calling L</guestfs_close> or must set up a close callback to "
38179 "do it (see L</GUESTFS_EVENT_CLOSE>)."
38183 #: ../src/guestfs.pod:2088
38184 msgid "To walk over all entries, use these two functions:"
38188 #: ../src/guestfs.pod:2090
38191 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
38196 #: ../src/guestfs.pod:2092
38199 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
38204 #: ../src/guestfs.pod:2094
38206 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
38207 "not have any particular meaning -- keys are not returned in any defined "
38208 "order). A pointer to the key is returned in C<*key_rtn> and the "
38209 "corresponding data pointer is returned from the function. C<NULL> is "
38210 "returned if there are no keys stored in the handle."
38214 #: ../src/guestfs.pod:2100
38216 "C<guestfs_next_private> returns the next key, pointer pair. The return "
38217 "value of this function is also C<NULL> is there are no further entries to "
38222 #: ../src/guestfs.pod:2104
38223 msgid "Notes about walking over entries:"
38227 #: ../src/guestfs.pod:2110
38229 "You must not call C<guestfs_set_private> while walking over the entries."
38233 #: ../src/guestfs.pod:2115
38235 "The handle maintains an internal iterator which is reset when you call "
38236 "C<guestfs_first_private>. This internal iterator is invalidated when you "
38237 "call C<guestfs_set_private>."
38241 #: ../src/guestfs.pod:2121
38242 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
38246 #: ../src/guestfs.pod:2123
38249 " guestfs_set_private (g, key, NULL);\n"
38254 #: ../src/guestfs.pod:2125
38255 msgid "then that C<key> is not returned when walking."
38259 #: ../src/guestfs.pod:2129
38261 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
38262 "C<guestfs_next_private> or C<guestfs_set_private>."
38266 #: ../src/guestfs.pod:2135
38268 "The following example code shows how to print all keys and data pointers "
38269 "that are associated with the handle C<g>:"
38273 #: ../src/guestfs.pod:2138
38276 " const char *key;\n"
38277 " void *data = guestfs_first_private (g, &key);\n"
38278 " while (data != NULL)\n"
38280 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38281 " data = guestfs_next_private (g, &key);\n"
38287 #: ../src/guestfs.pod:2146
38289 "More commonly you are only interested in keys that begin with an application-"
38290 "specific prefix C<foo_>. Modify the loop like so:"
38294 #: ../src/guestfs.pod:2149
38297 " const char *key;\n"
38298 " void *data = guestfs_first_private (g, &key);\n"
38299 " while (data != NULL)\n"
38301 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38302 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38303 " data = guestfs_next_private (g, &key);\n"
38309 #: ../src/guestfs.pod:2158
38311 "If you need to modify keys while walking, then you have to jump back to the "
38312 "beginning of the loop. For example, to delete all keys prefixed with "
38317 #: ../src/guestfs.pod:2162
38320 " const char *key;\n"
38323 " data = guestfs_first_private (g, &key);\n"
38324 " while (data != NULL)\n"
38326 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38328 " guestfs_set_private (g, key, NULL);\n"
38329 " /* note that 'key' pointer is now invalid, and so is\n"
38330 " the internal iterator */\n"
38333 " data = guestfs_next_private (g, &key);\n"
38339 #: ../src/guestfs.pod:2178
38341 "Note that the above loop is guaranteed to terminate because the keys are "
38342 "being deleted, but other manipulations of keys within the loop might not "
38343 "terminate unless you also maintain an indication of which keys have been "
38348 #: ../src/guestfs.pod:2183
38353 #: ../src/guestfs.pod:2185
38355 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38356 "true of any library, not just libguestfs. However libguestfs also contains "
38357 "static markers to help in probing internal operations."
38361 #: ../src/guestfs.pod:2189
38362 msgid "You can list all the static markers by doing:"
38366 #: ../src/guestfs.pod:2191
38369 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38370 " .provider(\"guestfs\").mark(\"*\")'\n"
38375 #: ../src/guestfs.pod:2194
38377 "B<Note:> These static markers are I<not> part of the stable API and may "
38378 "change in future versions."
38382 #: ../src/guestfs.pod:2197
38383 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38387 #: ../src/guestfs.pod:2199
38389 "This script contains examples of displaying both the static markers and some "
38390 "ordinary C entry points:"
38394 #: ../src/guestfs.pod:2202
38402 #: ../src/guestfs.pod:2204
38405 " function display_time () {\n"
38406 " now = gettimeofday_us ();\n"
38409 " delta = now - last;\n"
38415 #: ../src/guestfs.pod:2211
38418 " printf (\"%d (+%d):\", now, delta);\n"
38424 #: ../src/guestfs.pod:2214
38429 " printf (\"ready\\n\");\n"
38435 #: ../src/guestfs.pod:2219
38438 " /* Display all calls to static markers. */\n"
38439 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38440 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38441 " display_time();\n"
38442 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38448 #: ../src/guestfs.pod:2226
38451 " /* Display all calls to guestfs_mkfs* functions. */\n"
38452 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38453 " .function(\"guestfs_mkfs*\") ? {\n"
38454 " display_time();\n"
38455 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38461 #: ../src/guestfs.pod:2233
38463 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38464 "program. Note that you either have to be root, or you have to add yourself "
38465 "to several special stap groups. Consult the systemtap documentation for "
38466 "more information."
38470 #: ../src/guestfs.pod:2238
38473 " # stap /tmp/test.stap\n"
38479 #: ../src/guestfs.pod:2241
38480 msgid "In another terminal, run a guestfish command such as this:"
38484 #: ../src/guestfs.pod:2245
38485 msgid "In the first terminal, stap trace output similar to this is shown:"
38489 #: ../src/guestfs.pod:2247
38492 " 1318248056692655 (+0):\tlaunch_start\n"
38493 " 1318248056692850 (+195): launch_build_appliance_start\n"
38494 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38495 " 1318248056838059 (+19774): launch_run_qemu\n"
38496 " 1318248061071167 (+4233108): launch_end\n"
38497 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f device=0x1024e60\n"
38502 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38507 #: ../src/guestfs.pod:2256
38509 "<!-- old anchor for the next section --> <a name="
38510 "\"state_machine_and_low_level_event_api\"/>"
38514 #: ../src/guestfs.pod:2261
38515 msgid "ARCHITECTURE"
38519 #: ../src/guestfs.pod:2263
38521 "Internally, libguestfs is implemented by running an appliance (a special "
38522 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38523 "process of the main program."
38527 #: ../src/guestfs.pod:2267
38530 " ___________________\n"
38532 " | main program |\n"
38534 " | | child process / appliance\n"
38535 " | | __________________________\n"
38537 " +-------------------+ RPC | +-----------------+ |\n"
38538 " | libguestfs <--------------------> guestfsd | |\n"
38539 " | | | +-----------------+ |\n"
38540 " \\___________________/ | | Linux kernel | |\n"
38541 " | +--^--------------+ |\n"
38542 " \\_________|________________/\n"
38544 " _______v______\n"
38547 " | disk image |\n"
38548 " \\______________/\n"
38553 #: ../src/guestfs.pod:2287
38555 "The library, linked to the main program, creates the child process and hence "
38556 "the appliance in the L</guestfs_launch> function."
38560 #: ../src/guestfs.pod:2290
38562 "Inside the appliance is a Linux kernel and a complete stack of userspace "
38563 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
38564 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
38565 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
38566 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
38567 "attached to the qemu process which translates device access by the "
38568 "appliance's Linux kernel into accesses to the image."
38572 #: ../src/guestfs.pod:2299
38574 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
38575 "Although the disk image you are attached to might also be used by some "
38576 "virtual machine, libguestfs doesn't know or care about this. (But you will "
38577 "care if both libguestfs's qemu process and your virtual machine are trying "
38578 "to update the disk image at the same time, since these usually results in "
38579 "massive disk corruption)."
38583 #: ../src/guestfs.pod:2306
38584 msgid "STATE MACHINE"
38588 #: ../src/guestfs.pod:2308
38589 msgid "libguestfs uses a state machine to model the child process:"
38593 #: ../src/guestfs.pod:2310
38597 " guestfs_create\n"
38605 " / | \\ \\ guestfs_launch\n"
38606 " / | _\\__V______\n"
38608 " / | | LAUNCHING |\n"
38609 " / | \\___________/\n"
38611 " / | guestfs_launch\n"
38613 " ______ / __|____V\n"
38614 " / \\ ------> / \\\n"
38615 " | BUSY | | READY |\n"
38616 " \\______/ <------ \\________/\n"
38621 #: ../src/guestfs.pod:2332
38623 "The normal transitions are (1) CONFIG (when the handle is created, but there "
38624 "is no child process), (2) LAUNCHING (when the child process is booting up), "
38625 "(3) alternating between READY and BUSY as commands are issued to, and "
38626 "carried out by, the child process."
38630 #: ../src/guestfs.pod:2337
38632 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
38633 "asynchronously at any time (eg. due to some internal error), and that causes "
38634 "the state to transition back to CONFIG."
38638 #: ../src/guestfs.pod:2341
38640 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
38641 "issued when in the CONFIG state."
38645 #: ../src/guestfs.pod:2344
38647 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
38648 "L</guestfs_launch> blocks until the child process is READY to accept "
38649 "commands (or until some failure or timeout). L</guestfs_launch> internally "
38650 "moves the state from CONFIG to LAUNCHING while it is running."
38654 #: ../src/guestfs.pod:2350
38656 "API actions such as L</guestfs_mount> can only be issued when in the READY "
38657 "state. These API calls block waiting for the command to be carried out (ie. "
38658 "the state to transition to BUSY and then back to READY). There are no non-"
38659 "blocking versions, and no way to issue more than one command per handle at "
38664 #: ../src/guestfs.pod:2356
38666 "Finally, the child process sends asynchronous messages back to the main "
38667 "program, such as kernel log messages. You can register a callback to "
38668 "receive these messages."
38672 #: ../src/guestfs.pod:2360
38677 #: ../src/guestfs.pod:2362
38678 msgid "APPLIANCE BOOT PROCESS"
38682 #: ../src/guestfs.pod:2364
38684 "This process has evolved and continues to evolve. The description here "
38685 "corresponds only to the current version of libguestfs and is provided for "
38686 "information only."
38690 #: ../src/guestfs.pod:2368
38692 "In order to follow the stages involved below, enable libguestfs debugging "
38693 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
38697 #: ../src/guestfs.pod:2373
38698 msgid "Create the appliance"
38702 #: ../src/guestfs.pod:2375
38704 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
38705 "initrd and the appliance."
38709 #: ../src/guestfs.pod:2378
38711 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
38712 "directory if C<TMPDIR> is set)."
38716 #: ../src/guestfs.pod:2381
38718 "For a complete description of how the appliance is created and cached, read "
38719 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
38723 #: ../src/guestfs.pod:2385
38724 msgid "Start qemu and boot the kernel"
38728 #: ../src/guestfs.pod:2387
38729 msgid "qemu is invoked to boot the kernel."
38733 #: ../src/guestfs.pod:2389
38734 msgid "Run the initrd"
38738 #: ../src/guestfs.pod:2391
38740 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
38741 "appliance. The purpose of the initrd is to load enough kernel modules in "
38742 "order that the appliance itself can be mounted and started."
38746 #: ../src/guestfs.pod:2395
38748 "The initrd is a cpio archive called C</var/tmp/.guestfs-E<lt>UIDE<gt>/"
38753 #: ../src/guestfs.pod:2398
38755 "When the initrd has started you will see messages showing that kernel "
38756 "modules are being loaded, similar to this:"
38760 #: ../src/guestfs.pod:2401
38763 " febootstrap: ext2 mini initrd starting up\n"
38764 " febootstrap: mounting /sys\n"
38765 " febootstrap: internal insmod libcrc32c.ko\n"
38766 " febootstrap: internal insmod crc32c-intel.ko\n"
38771 #: ../src/guestfs.pod:2406
38772 msgid "Find and mount the appliance device"
38776 #: ../src/guestfs.pod:2408
38778 "The appliance is a sparse file containing an ext2 filesystem which contains "
38779 "a familiar (although reduced in size) Linux operating system. It would "
38780 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
38784 #: ../src/guestfs.pod:2412
38786 "The regular disks being inspected by libguestfs are the first devices "
38787 "exposed by qemu (eg. as C</dev/vda>)."
38791 #: ../src/guestfs.pod:2415
38793 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
38794 "there was only one regular disk)."
38798 #: ../src/guestfs.pod:2418
38800 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
38801 "and switch root into the appliance, and run C</init> from the appliance."
38805 #: ../src/guestfs.pod:2422
38806 msgid "If this works successfully you will see messages such as:"
38810 #: ../src/guestfs.pod:2424
38813 " febootstrap: picked /sys/block/vdb/dev as root device\n"
38814 " febootstrap: creating /dev/root as block special 252:16\n"
38815 " febootstrap: mounting new root on /root\n"
38816 " febootstrap: chroot\n"
38817 " Starting /init script ...\n"
38822 #: ../src/guestfs.pod:2430
38824 "Note that C<Starting /init script ...> indicates that the appliance's init "
38825 "script is now running."
38829 #: ../src/guestfs.pod:2433
38830 msgid "Initialize the appliance"
38834 #: ../src/guestfs.pod:2435
38836 "The appliance itself now initializes itself. This involves starting certain "
38837 "processes like C<udev>, possibly printing some debug information, and "
38838 "finally running the daemon (C<guestfsd>)."
38842 #: ../src/guestfs.pod:2439
38847 #: ../src/guestfs.pod:2441
38849 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
38854 #: ../src/guestfs.pod:2444
38857 " verbose daemon enabled\n"
38862 #: ../src/guestfs.pod:2446
38864 "The daemon expects to see a named virtio-serial port exposed by qemu and "
38865 "connected on the other end to the library."
38869 #: ../src/guestfs.pod:2449
38871 "The daemon connects to this port (and hence to the library) and sends a four "
38872 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
38873 "protocol (see below)."
38877 #: ../src/guestfs.pod:2455
38878 msgid "COMMUNICATION PROTOCOL"
38882 #: ../src/guestfs.pod:2457
38884 "Don't rely on using this protocol directly. This section documents how it "
38885 "currently works, but it may change at any time."
38889 #: ../src/guestfs.pod:2460
38891 "The protocol used to talk between the library and the daemon running inside "
38892 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
38893 "1014, RFC 1832, RFC 4506)."
38897 #: ../src/guestfs.pod:2464
38899 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
38900 "this file is automatically generated)."
38904 #: ../src/guestfs.pod:2467
38906 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
38907 "and C<FileOut> parameters, which are handled with very simple request/reply "
38908 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
38909 "parameters, which use the same request and reply messages, but they may also "
38910 "be followed by files sent using a chunked encoding."
38914 #: ../src/guestfs.pod:2474
38915 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
38919 #: ../src/guestfs.pod:2476
38920 msgid "For ordinary functions, the request message is:"
38924 #: ../src/guestfs.pod:2478
38927 " total length (header + arguments,\n"
38928 " but not including the length word itself)\n"
38929 " struct guestfs_message_header (encoded as XDR)\n"
38930 " struct guestfs_<foo>_args (encoded as XDR)\n"
38935 #: ../src/guestfs.pod:2483
38937 "The total length field allows the daemon to allocate a fixed size buffer "
38938 "into which it slurps the rest of the message. As a result, the total length "
38939 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
38940 "effective size of any request is limited to somewhere under this size."
38944 #: ../src/guestfs.pod:2489
38946 "Note also that many functions don't take any arguments, in which case the "
38947 "C<guestfs_I<foo>_args> is completely omitted."
38951 #: ../src/guestfs.pod:2492
38953 "The header contains the procedure number (C<guestfs_proc>) which is how the "
38954 "receiver knows what type of args structure to expect, or none at all."
38958 #: ../src/guestfs.pod:2496
38960 "For functions that take optional arguments, the optional arguments are "
38961 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
38962 "arguments. A bitmask in the header indicates which optional arguments are "
38963 "meaningful. The bitmask is also checked to see if it contains bits set "
38964 "which the daemon does not know about (eg. if more optional arguments were "
38965 "added in a later version of the library), and this causes the call to be "
38970 #: ../src/guestfs.pod:2504
38971 msgid "The reply message for ordinary functions is:"
38975 #: ../src/guestfs.pod:2506
38978 " total length (header + ret,\n"
38979 " but not including the length word itself)\n"
38980 " struct guestfs_message_header (encoded as XDR)\n"
38981 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38986 #: ../src/guestfs.pod:2511
38988 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
38989 "functions that return no formal return values."
38993 #: ../src/guestfs.pod:2514
38995 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
38999 #: ../src/guestfs.pod:2517
39001 "In the case of an error, a flag is set in the header, and the reply message "
39002 "is slightly changed:"
39006 #: ../src/guestfs.pod:2520
39009 " total length (header + error,\n"
39010 " but not including the length word itself)\n"
39011 " struct guestfs_message_header (encoded as XDR)\n"
39012 " struct guestfs_message_error (encoded as XDR)\n"
39017 #: ../src/guestfs.pod:2525
39019 "The C<guestfs_message_error> structure contains the error message as a "
39024 #: ../src/guestfs.pod:2528
39025 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
39029 #: ../src/guestfs.pod:2530
39031 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
39032 "The normal request message is sent (see above). However this is followed by "
39033 "a sequence of file chunks."
39037 #: ../src/guestfs.pod:2534
39040 " total length (header + arguments,\n"
39041 " but not including the length word itself,\n"
39042 " and not including the chunks)\n"
39043 " struct guestfs_message_header (encoded as XDR)\n"
39044 " struct guestfs_<foo>_args (encoded as XDR)\n"
39045 " sequence of chunks for FileIn param #0\n"
39046 " sequence of chunks for FileIn param #1 etc.\n"
39051 #: ../src/guestfs.pod:2542
39052 msgid "The \"sequence of chunks\" is:"
39056 #: ../src/guestfs.pod:2544
39059 " length of chunk (not including length word itself)\n"
39060 " struct guestfs_chunk (encoded as XDR)\n"
39061 " length of chunk\n"
39062 " struct guestfs_chunk (encoded as XDR)\n"
39064 " length of chunk\n"
39065 " struct guestfs_chunk (with data.data_len == 0)\n"
39070 #: ../src/guestfs.pod:2552
39072 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
39073 "is set in the final chunk to indicate either successful completion or early "
39078 #: ../src/guestfs.pod:2556
39080 "At time of writing there are no functions that have more than one FileIn "
39081 "parameter. However this is (theoretically) supported, by sending the "
39082 "sequence of chunks for each FileIn parameter one after another (from left to "
39087 #: ../src/guestfs.pod:2561
39089 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
39090 "transfer. The library does this by sending a chunk with a special flag set "
39091 "to indicate cancellation. When the daemon sees this, it cancels the whole "
39092 "RPC, does I<not> send any reply, and goes back to reading the next request."
39096 #: ../src/guestfs.pod:2567
39098 "The daemon may also cancel. It does this by writing a special word "
39099 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
39100 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
39101 "cancel chunk). The special word is chosen so that even if cancellation "
39102 "happens right at the end of the transfer (after the library has finished "
39103 "writing and has started listening for the reply), the \"spurious\" cancel "
39104 "flag will not be confused with the reply message."
39108 #: ../src/guestfs.pod:2576
39110 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
39111 "limit), and also files where the size is not known in advance (eg. from "
39112 "pipes or sockets). However the chunks are rather small "
39113 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
39114 "to keep much in memory."
39118 #: ../src/guestfs.pod:2582
39119 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
39123 #: ../src/guestfs.pod:2584
39125 "The protocol for FileOut parameters is exactly the same as for FileIn "
39126 "parameters, but with the roles of daemon and library reversed."
39130 #: ../src/guestfs.pod:2587
39133 " total length (header + ret,\n"
39134 " but not including the length word itself,\n"
39135 " and not including the chunks)\n"
39136 " struct guestfs_message_header (encoded as XDR)\n"
39137 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39138 " sequence of chunks for FileOut param #0\n"
39139 " sequence of chunks for FileOut param #1 etc.\n"
39144 #: ../src/guestfs.pod:2595
39145 msgid "INITIAL MESSAGE"
39149 #: ../src/guestfs.pod:2597
39151 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
39152 "which indicates that the guest and daemon is alive. This is what L</"
39153 "guestfs_launch> waits for."
39157 #: ../src/guestfs.pod:2601
39158 msgid "PROGRESS NOTIFICATION MESSAGES"
39162 #: ../src/guestfs.pod:2603
39164 "The daemon may send progress notification messages at any time. These are "
39165 "distinguished by the normal length word being replaced by "
39166 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
39170 #: ../src/guestfs.pod:2607
39172 "The library turns them into progress callbacks (see L</"
39173 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
39178 #: ../src/guestfs.pod:2611
39180 "The daemon self-limits the frequency of progress messages it sends (see "
39181 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
39186 #: ../src/guestfs.pod:2615
39187 msgid "LIBGUESTFS VERSION NUMBERS"
39191 #: ../src/guestfs.pod:2617
39193 "Since April 2010, libguestfs has started to make separate development and "
39194 "stable releases, along with corresponding branches in our git repository. "
39195 "These separate releases can be identified by version number:"
39199 #: ../src/guestfs.pod:2622
39202 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
39203 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
39209 " | `-------- sub-version\n"
39211 " `------ always '1' because we don't change the ABI\n"
39216 #: ../src/guestfs.pod:2633
39217 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
39221 #: ../src/guestfs.pod:2635
39223 "As time passes we cherry pick fixes from the development branch and backport "
39224 "those into the stable branch, the effect being that the stable branch should "
39225 "get more stable and less buggy over time. So the stable releases are ideal "
39226 "for people who don't need new features but would just like the software to "
39231 #: ../src/guestfs.pod:2641
39232 msgid "Our criteria for backporting changes are:"
39236 #: ../src/guestfs.pod:2647
39238 "Documentation changes which don't affect any code are backported unless the "
39239 "documentation refers to a future feature which is not in stable."
39243 #: ../src/guestfs.pod:2653
39245 "Bug fixes which are not controversial, fix obvious problems, and have been "
39246 "well tested are backported."
39250 #: ../src/guestfs.pod:2658
39252 "Simple rearrangements of code which shouldn't affect how it works get "
39253 "backported. This is so that the code in the two branches doesn't get too "
39254 "far out of step, allowing us to backport future fixes more easily."
39258 #: ../src/guestfs.pod:2664
39260 "We I<don't> backport new features, new APIs, new tools etc, except in one "
39261 "exceptional case: the new feature is required in order to implement an "
39262 "important bug fix."
39266 #: ../src/guestfs.pod:2670
39268 "A new stable branch starts when we think the new features in development are "
39269 "substantial and compelling enough over the current stable branch to warrant "
39270 "it. When that happens we create new stable and development versions 1.N.0 "
39271 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
39272 "stable at this point, but by backporting fixes from development, that branch "
39273 "will stabilize over time."
39277 #: ../src/guestfs.pod:2678
39278 msgid "EXTENDING LIBGUESTFS"
39282 #: ../src/guestfs.pod:2680
39283 msgid "ADDING A NEW API ACTION"
39287 #: ../src/guestfs.pod:2682
39289 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
39290 "documentation) are generated, and this makes it easy to extend the "
39295 #: ../src/guestfs.pod:2686
39296 msgid "To add a new API action there are two changes:"
39300 #: ../src/guestfs.pod:2692
39302 "You need to add a description of the call (name, parameters, return type, "
39303 "tests, documentation) to C<generator/generator_actions.ml>."
39307 #: ../src/guestfs.pod:2695
39309 "There are two sorts of API action, depending on whether the call goes "
39310 "through to the daemon in the appliance, or is serviced entirely by the "
39311 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
39312 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39313 "an example of the latter, since a trace flag is maintained in the handle and "
39314 "all tracing is done on the library side."
39318 #: ../src/guestfs.pod:2703
39320 "Most new actions are of the first type, and get added to the "
39321 "C<daemon_functions> list. Each function has a unique procedure number used "
39322 "in the RPC protocol which is assigned to that action when we publish "
39323 "libguestfs and cannot be reused. Take the latest procedure number and "
39328 #: ../src/guestfs.pod:2709
39330 "For library-only actions of the second type, add to the "
39331 "C<non_daemon_functions> list. Since these functions are serviced by the "
39332 "library and do not travel over the RPC mechanism to the daemon, these "
39333 "functions do not need a procedure number, and so the procedure number is set "
39338 #: ../src/guestfs.pod:2717
39339 msgid "Implement the action (in C):"
39343 #: ../src/guestfs.pod:2719
39345 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39346 "C<daemon/> directory."
39350 #: ../src/guestfs.pod:2722
39352 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39353 "(note: double underscore) in the C<src/> directory."
39357 #: ../src/guestfs.pod:2725
39358 msgid "In either case, use another function as an example of what to do."
39362 #: ../src/guestfs.pod:2729
39363 msgid "After making these changes, use C<make> to compile."
39367 #: ../src/guestfs.pod:2731
39369 "Note that you don't need to implement the RPC, language bindings, manual "
39370 "pages or anything else. It's all automatically generated from the OCaml "
39375 #: ../src/guestfs.pod:2735
39376 msgid "ADDING TESTS FOR AN API ACTION"
39380 #: ../src/guestfs.pod:2737
39382 "You can supply zero or as many tests as you want per API call. The tests "
39383 "can either be added as part of the API description (C<generator/"
39384 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
39385 "into C<regressions/>. Note that adding a script to C<regressions/> is "
39386 "slower, so if possible use the first method."
39390 #: ../src/guestfs.pod:2743
39392 "The following describes the test environment used when you add an API test "
39393 "in C<generator_actions.ml>."
39397 #: ../src/guestfs.pod:2746
39398 msgid "The test environment has 4 block devices:"
39402 #: ../src/guestfs.pod:2750
39403 msgid "C</dev/sda> 500MB"
39407 #: ../src/guestfs.pod:2752
39408 msgid "General block device for testing."
39412 #: ../src/guestfs.pod:2754
39413 msgid "C</dev/sdb> 50MB"
39417 #: ../src/guestfs.pod:2756
39419 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39424 #: ../src/guestfs.pod:2759
39425 msgid "C</dev/sdc> 10MB"
39429 #: ../src/guestfs.pod:2761
39430 msgid "Used in a few tests where two block devices are needed."
39434 #: ../src/guestfs.pod:2763
39435 msgid "C</dev/sdd>"
39439 #: ../src/guestfs.pod:2765
39440 msgid "ISO with fixed content (see C<images/test.iso>)."
39444 #: ../src/guestfs.pod:2769
39446 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39447 "appliance and block devices are reused between tests. So don't try testing "
39448 "L</guestfs_kill_subprocess> :-x"
39452 #: ../src/guestfs.pod:2773
39454 "Each test starts with an initial scenario, selected using one of the "
39455 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39456 "initialize the disks mentioned above in a particular way as documented in "
39457 "C<generator_types.ml>. You should not assume anything about the previous "
39458 "contents of other disks that are not initialized."
39462 #: ../src/guestfs.pod:2779
39464 "You can add a prerequisite clause to any individual test. This is a run-"
39465 "time check, which, if it fails, causes the test to be skipped. Useful if "
39466 "testing a command which might not work on all variations of libguestfs "
39467 "builds. A test that has prerequisite of C<Always> means to run "
39472 #: ../src/guestfs.pod:2785
39474 "In addition, packagers can skip individual tests by setting environment "
39475 "variables before running C<make check>."
39479 #: ../src/guestfs.pod:2788
39482 " SKIP_TEST_<CMD>_<NUM>=1\n"
39487 #: ../src/guestfs.pod:2790
39488 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39492 #: ../src/guestfs.pod:2792
39497 #: ../src/guestfs.pod:2794
39500 " SKIP_TEST_<CMD>=1\n"
39505 #: ../src/guestfs.pod:2796
39506 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39510 #: ../src/guestfs.pod:2798
39511 msgid "Packagers can run only certain tests by setting for example:"
39515 #: ../src/guestfs.pod:2800
39518 " TEST_ONLY=\"vfs_type zerofree\"\n"
39523 #: ../src/guestfs.pod:2802
39525 "See C<capitests/tests.c> for more details of how these environment variables "
39530 #: ../src/guestfs.pod:2805
39531 msgid "DEBUGGING NEW API ACTIONS"
39535 #: ../src/guestfs.pod:2807
39536 msgid "Test new actions work before submitting them."
39540 #: ../src/guestfs.pod:2809
39541 msgid "You can use guestfish to try out new commands."
39545 #: ../src/guestfs.pod:2811
39547 "Debugging the daemon is a problem because it runs inside a minimal "
39548 "environment. However you can fprintf messages in the daemon to stderr, and "
39549 "they will show up if you use C<guestfish -v>."
39553 #: ../src/guestfs.pod:2815
39554 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
39558 #: ../src/guestfs.pod:2817
39560 "Our C source code generally adheres to some basic code-formatting "
39561 "conventions. The existing code base is not totally consistent on this "
39562 "front, but we do prefer that contributed code be formatted similarly. In "
39563 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
39564 "indentation level, and other than that, follow the K&R style."
39568 #: ../src/guestfs.pod:2823
39570 "If you use Emacs, add the following to one of one of your start-up files (e."
39571 "g., ~/.emacs), to help ensure that you get indentation right:"
39575 #: ../src/guestfs.pod:2826
39578 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
39579 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
39580 " (add-hook 'find-file-hook\n"
39581 " '(lambda () (if (and buffer-file-name\n"
39582 " (string-match \"/libguestfs\\\\>\"\n"
39583 " (buffer-file-name))\n"
39584 " (not (string-equal mode-name \"Change Log\"))\n"
39585 " (not (string-equal mode-name \"Makefile\")))\n"
39586 " (setq indent-tabs-mode nil))))\n"
39591 #: ../src/guestfs.pod:2836
39594 " ;;; When editing C sources in libguestfs, use this style.\n"
39595 " (defun libguestfs-c-mode ()\n"
39596 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
39598 " (c-set-style \"K&R\")\n"
39599 " (setq c-indent-level 2)\n"
39600 " (setq c-basic-offset 2))\n"
39601 " (add-hook 'c-mode-hook\n"
39602 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
39603 " (buffer-file-name))\n"
39604 " (libguestfs-c-mode))))\n"
39609 #: ../src/guestfs.pod:2848
39610 msgid "Enable warnings when compiling (and fix any problems this finds):"
39614 #: ../src/guestfs.pod:2851
39617 " ./configure --enable-gcc-warnings\n"
39622 #: ../src/guestfs.pod:2853
39623 msgid "Useful targets are:"
39627 #: ../src/guestfs.pod:2855
39630 " make syntax-check # checks the syntax of the C code\n"
39631 " make check # runs the test suite\n"
39636 #: ../src/guestfs.pod:2858
39637 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
39641 #: ../src/guestfs.pod:2860
39643 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
39644 "which are used to do shell quoting."
39648 #: ../src/guestfs.pod:2865
39653 #: ../src/guestfs.pod:2867
39655 "Simple shell quoted string. Any spaces or other shell characters are "
39660 #: ../src/guestfs.pod:2870
39665 #: ../src/guestfs.pod:2872
39667 "Same as C<%Q> except the string is treated as a path which is prefixed by "
39672 #: ../src/guestfs.pod:2879
39675 " asprintf (&cmd, \"cat %R\", path);\n"
39680 #: ../src/guestfs.pod:2881
39681 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
39685 #: ../src/guestfs.pod:2883
39687 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
39688 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
39689 "they are not passed via the shell (instead, straight to exec). You probably "
39690 "want to use the C<sysroot_path()> function however."
39694 #: ../src/guestfs.pod:2889
39695 msgid "SUBMITTING YOUR NEW API ACTIONS"
39699 #: ../src/guestfs.pod:2891
39701 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
39702 "libguestfs> and CC to L<rjones@redhat.com>."
39706 #: ../src/guestfs.pod:2895
39707 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
39711 #: ../src/guestfs.pod:2897
39712 msgid "We support i18n (gettext anyhow) in the library."
39716 #: ../src/guestfs.pod:2899
39718 "However many messages come from the daemon, and we don't translate those at "
39719 "the moment. One reason is that the appliance generally has all locale files "
39720 "removed from it, because they take up a lot of space. So we'd have to readd "
39721 "some of those, as well as copying our PO files into the appliance."
39725 #: ../src/guestfs.pod:2905
39727 "Debugging messages are never translated, since they are intended for the "
39732 #: ../src/guestfs.pod:2908
39733 msgid "SOURCE CODE SUBDIRECTORIES"
39737 #: ../src/guestfs.pod:2912
39742 #: ../src/guestfs.pod:2914
39743 msgid "L<virt-alignment-scan(1)> command and documentation."
39747 #: ../src/guestfs.pod:2918
39748 msgid "The libguestfs appliance, build scripts and so on."
39752 #: ../src/guestfs.pod:2920
39753 msgid "C<capitests>"
39757 #: ../src/guestfs.pod:2922
39758 msgid "Automated tests of the C API."
39762 #: ../src/guestfs.pod:2924
39767 #: ../src/guestfs.pod:2926
39769 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
39774 #: ../src/guestfs.pod:2929
39779 #: ../src/guestfs.pod:2931
39781 "Safety and liveness tests of components that libguestfs depends upon (not of "
39782 "libguestfs itself). Mainly this is for qemu and the kernel."
39786 #: ../src/guestfs.pod:2934
39791 #: ../src/guestfs.pod:2936
39793 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
39794 "command and documentation."
39798 #: ../src/guestfs.pod:2939
39803 #: ../src/guestfs.pod:2941
39804 msgid "Outside contributions, experimental parts."
39808 #: ../src/guestfs.pod:2943
39813 #: ../src/guestfs.pod:2945
39815 "The daemon that runs inside the libguestfs appliance and carries out actions."
39819 #: ../src/guestfs.pod:2948
39824 #: ../src/guestfs.pod:2950
39825 msgid "L<virt-df(1)> command and documentation."
39829 #: ../src/guestfs.pod:2952
39834 #: ../src/guestfs.pod:2954
39835 msgid "L<virt-edit(1)> command and documentation."
39839 #: ../src/guestfs.pod:2956
39840 msgid "C<examples>"
39844 #: ../src/guestfs.pod:2958
39845 msgid "C API example code."
39849 #: ../src/guestfs.pod:2960
39854 #: ../src/guestfs.pod:2962
39856 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
39857 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
39858 "L<virt-tar-out(1)>."
39862 #: ../src/guestfs.pod:2966
39867 #: ../src/guestfs.pod:2968
39869 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
39873 #: ../src/guestfs.pod:2970
39874 msgid "C<generator>"
39878 #: ../src/guestfs.pod:2972
39880 "The crucially important generator, used to automatically generate large "
39881 "amounts of boilerplate C code for things like RPC and bindings."
39885 #: ../src/guestfs.pod:2975
39890 #: ../src/guestfs.pod:2977
39891 msgid "Files used by the test suite."
39895 #: ../src/guestfs.pod:2979
39896 msgid "Some \"phony\" guest images which we test against."
39900 #: ../src/guestfs.pod:2981
39901 msgid "C<inspector>"
39905 #: ../src/guestfs.pod:2983
39906 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
39910 #: ../src/guestfs.pod:2985
39915 #: ../src/guestfs.pod:2987
39916 msgid "Logo used on the website. The fish is called Arthur by the way."
39920 #: ../src/guestfs.pod:2989
39925 #: ../src/guestfs.pod:2991
39926 msgid "M4 macros used by autoconf."
39930 #: ../src/guestfs.pod:2993
39935 #: ../src/guestfs.pod:2995
39936 msgid "Translations of simple gettext strings."
39940 #: ../src/guestfs.pod:2997
39945 #: ../src/guestfs.pod:2999
39947 "The build infrastructure and PO files for translations of manpages and POD "
39948 "files. Eventually this will be combined with the C<po> directory, but that "
39949 "is rather complicated."
39953 #: ../src/guestfs.pod:3003
39954 msgid "C<regressions>"
39958 #: ../src/guestfs.pod:3005
39959 msgid "Regression tests."
39963 #: ../src/guestfs.pod:3007
39968 #: ../src/guestfs.pod:3009
39969 msgid "L<virt-rescue(1)> command and documentation."
39973 #: ../src/guestfs.pod:3011
39978 #: ../src/guestfs.pod:3013
39979 msgid "L<virt-resize(1)> command and documentation."
39983 #: ../src/guestfs.pod:3015
39984 msgid "C<sparsify>"
39988 #: ../src/guestfs.pod:3017
39989 msgid "L<virt-sparsify(1)> command and documentation."
39993 #: ../src/guestfs.pod:3019
39998 #: ../src/guestfs.pod:3021
39999 msgid "Source code to the C library."
40003 #: ../src/guestfs.pod:3023
40008 #: ../src/guestfs.pod:3025
40010 "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
40014 #: ../src/guestfs.pod:3027
40015 msgid "C<test-tool>"
40019 #: ../src/guestfs.pod:3029
40021 "Test tool for end users to test if their qemu/kernel combination will work "
40026 #: ../src/guestfs.pod:3032
40031 #: ../src/guestfs.pod:3034
40036 #: ../src/guestfs.pod:3036
40041 #: ../src/guestfs.pod:3038
40046 #: ../src/guestfs.pod:3040
40051 #: ../src/guestfs.pod:3042
40056 #: ../src/guestfs.pod:3044
40061 #: ../src/guestfs.pod:3046
40066 #: ../src/guestfs.pod:3048
40071 #: ../src/guestfs.pod:3050
40072 msgid "Language bindings."
40076 #: ../src/guestfs.pod:3054
40077 msgid "MAKING A STABLE RELEASE"
40081 #: ../src/guestfs.pod:3056
40083 "When we make a stable release, there are several steps documented here. See "
40084 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
40089 #: ../src/guestfs.pod:3064
40091 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
40095 #: ../src/guestfs.pod:3069
40096 msgid "Finalize RELEASE-NOTES."
40100 #: ../src/guestfs.pod:3073
40101 msgid "Update ROADMAP."
40105 #: ../src/guestfs.pod:3077
40106 msgid "Run C<src/api-support/update-from-tarballs.sh>."
40110 #: ../src/guestfs.pod:3081
40111 msgid "Push and pull from Transifex."
40115 #: ../src/guestfs.pod:3083
40120 #: ../src/guestfs.pod:3085
40128 #: ../src/guestfs.pod:3087
40129 msgid "to push the latest POT files to Transifex. Then run:"
40133 #: ../src/guestfs.pod:3089
40141 #: ../src/guestfs.pod:3091
40142 msgid "which is a wrapper to pull the latest translated C<*.po> files."
40146 #: ../src/guestfs.pod:3095
40148 "Create new stable and development directories under L<http://libguestfs.org/"
40153 #: ../src/guestfs.pod:3100
40154 msgid "Create the branch in git:"
40158 #: ../src/guestfs.pod:3102
40161 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
40162 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
40163 " git branch stable-1.XX\n"
40164 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
40169 #: ../src/guestfs.pod:3109
40174 #: ../src/guestfs.pod:3111
40175 msgid "PROTOCOL LIMITS"
40179 #: ../src/guestfs.pod:3113
40181 "Internally libguestfs uses a message-based protocol to pass API calls and "
40182 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
40183 "plenty more detail about this). The maximum message size used by the "
40184 "protocol is slightly less than 4 MB. For some API calls you may need to be "
40185 "aware of this limit. The API calls which may be affected are individually "
40186 "documented, with a link back to this section of the documentation."
40190 #: ../src/guestfs.pod:3121
40192 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
40193 "a simple string. Because this string is at some point internally encoded as "
40194 "a message, the maximum size that it can return is slightly under 4 MB. If "
40195 "the requested file is larger than this then you will get an error."
40199 #: ../src/guestfs.pod:3127
40201 "In order to transfer large files into and out of the guest filesystem, you "
40202 "need to use particular calls that support this. The sections L</UPLOADING> "
40203 "and L</DOWNLOADING> document how to do this."
40207 #: ../src/guestfs.pod:3131
40209 "You might also consider mounting the disk image using our FUSE filesystem "
40210 "support (L<guestmount(1)>)."
40214 #: ../src/guestfs.pod:3134
40215 msgid "MAXIMUM NUMBER OF DISKS"
40219 #: ../src/guestfs.pod:3136
40220 msgid "When using virtio disks (the default) the current limit is B<25> disks."
40224 #: ../src/guestfs.pod:3139
40226 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
40227 "slots. However febootstrap only understands disks with names C</dev/vda> "
40228 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
40233 #: ../src/guestfs.pod:3144
40235 "We are working to substantially raise this limit in future versions but it "
40236 "requires complex changes to qemu."
40240 #: ../src/guestfs.pod:3147
40242 "In future versions of libguestfs it should also be possible to \"hot plug\" "
40243 "disks (add and remove disks after calling L</guestfs_launch>). This also "
40244 "requires changes to qemu."
40248 #: ../src/guestfs.pod:3151
40249 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
40253 #: ../src/guestfs.pod:3153
40254 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
40258 #: ../src/guestfs.pod:3155
40260 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
40261 "vda>, and C</dev/vda1> through C</dev/vda15>)."
40265 #: ../src/guestfs.pod:3158
40267 "If you attach a disk with more than 15 partitions, the extra partitions are "
40268 "ignored by libguestfs."
40272 #: ../src/guestfs.pod:3161
40273 msgid "MAXIMUM SIZE OF A DISK"
40277 #: ../src/guestfs.pod:3163
40278 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
40282 #: ../src/guestfs.pod:3165
40284 "We have tested block devices up to 1 exabyte (2**60 or "
40285 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
40290 #: ../src/guestfs.pod:3169
40292 "Although libguestfs probably does not impose any limit, the underlying host "
40293 "storage will. If you store disk images on a host ext4 filesystem, then the "
40294 "maximum size will be limited by the maximum ext4 file size (currently 16 "
40295 "TB). If you store disk images as host logical volumes then you are limited "
40296 "by the maximum size of an LV."
40300 #: ../src/guestfs.pod:3175
40302 "For the hugest disk image files, we recommend using XFS on the host for "
40307 #: ../src/guestfs.pod:3178
40308 msgid "MAXIMUM SIZE OF A PARTITION"
40312 #: ../src/guestfs.pod:3180
40314 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
40315 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
40316 "address a partition located beyond 2 TB on the disk."
40320 #: ../src/guestfs.pod:3184
40322 "It is recommended that you use GPT partitions on disks which are larger than "
40323 "this size. GPT uses 64 bit sector numbers and so can address partitions "
40324 "which are theoretically larger than the largest disk we could support."
40328 #: ../src/guestfs.pod:3189
40329 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40333 #: ../src/guestfs.pod:3191
40335 "This depends on the filesystem type. libguestfs itself does not impose any "
40336 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40337 "what these limits are."
40341 #: ../src/guestfs.pod:3195
40342 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40346 #: ../src/guestfs.pod:3197
40348 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
40349 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40350 "uploads and downloads."
40354 #: ../src/guestfs.pod:3201
40355 msgid "INSPECTION LIMITS"
40359 #: ../src/guestfs.pod:3203
40361 "The inspection code has several arbitrary limits on things like the size of "
40362 "Windows Registry hive it will read, and the length of product name. These "
40363 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40364 "memory and disk space on the host, and should not be reached in practice. "
40365 "See the source code for more information."
40369 #: ../src/guestfs.pod:3229
40371 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40372 "effect as calling C<guestfs_set_verbose (g, 1)>."
40376 #: ../src/guestfs.pod:3241
40378 "Set the path that libguestfs uses to search for a supermin appliance. See "
40379 "the discussion of paths in section L</PATH> above."
40383 #: ../src/guestfs.pod:3250
40384 msgid "See also L</QEMU WRAPPERS> above."
40388 #: ../src/guestfs.pod:3254
40390 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40391 "effect as calling C<guestfs_set_trace (g, 1)>."
40395 #: ../src/guestfs.pod:3272
40397 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
40398 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
40399 "L<guestfish(1)>, L<guestmount(1)>, L<virt-alignment-scan(1)>, L<virt-cat(1)"
40400 ">, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, "
40401 "L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40402 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue"
40403 "(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar"
40404 "(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
40405 "L<febootstrap(1)>, L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)"
40406 ">, L<http://libguestfs.org/>."
40410 #: ../src/guestfs.pod:3308
40412 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
40413 "(8)>, L<disktype(1)>."
40417 #: ../src/guestfs.pod:3315 ../tools/virt-make-fs.pl:571
40418 #: ../tools/virt-win-reg.pl:772
40423 #: ../src/guestfs.pod:3317
40424 msgid "To get a list of bugs against libguestfs use this link:"
40428 #: ../src/guestfs.pod:3319
40430 "L<https://bugzilla.redhat.com/buglist.cgi?"
40431 "component=libguestfs&product=Virtualization+Tools>"
40435 #: ../src/guestfs.pod:3321
40436 msgid "To report a new bug against libguestfs use this link:"
40440 #: ../src/guestfs.pod:3323
40442 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
40443 "component=libguestfs&product=Virtualization+Tools>"
40447 #: ../src/guestfs.pod:3325
40448 msgid "When reporting a bug, please check:"
40452 #: ../src/guestfs.pod:3331
40453 msgid "That the bug hasn't been reported already."
40457 #: ../src/guestfs.pod:3335
40458 msgid "That you are testing a recent version."
40462 #: ../src/guestfs.pod:3339
40463 msgid "Describe the bug accurately, and give a way to reproduce it."
40467 #: ../src/guestfs.pod:3343
40469 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
40474 #: ../test-tool/libguestfs-test-tool.pod:5
40475 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40479 #: ../test-tool/libguestfs-test-tool.pod:9
40482 " libguestfs-test-tool [--options]\n"
40487 #: ../test-tool/libguestfs-test-tool.pod:13
40489 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40490 "to check basic libguestfs functionality is working. This is needed because "
40491 "libguestfs occasionally breaks for reasons beyond our control: usually "
40492 "because of changes in the underlying qemu or kernel packages, or the host "
40497 #: ../test-tool/libguestfs-test-tool.pod:19
40498 msgid "If you suspect a problem in libguestfs, then just run:"
40502 #: ../test-tool/libguestfs-test-tool.pod:21
40505 " libguestfs-test-tool\n"
40510 #: ../test-tool/libguestfs-test-tool.pod:23
40511 msgid "It will print lots of diagnostic messages."
40515 #: ../test-tool/libguestfs-test-tool.pod:25
40516 msgid "If it runs to completion successfully, you will see this near the end:"
40520 #: ../test-tool/libguestfs-test-tool.pod:27
40523 " ===== TEST FINISHED OK =====\n"
40528 #: ../test-tool/libguestfs-test-tool.pod:29
40529 msgid "and the test tool will exit with code 0."
40533 #: ../test-tool/libguestfs-test-tool.pod:31
40535 "If it fails (and/or exits with non-zero error code), please paste the "
40536 "I<complete, unedited> output of the test tool into a bug report. More "
40537 "information about reporting bugs can be found on the L<http://libguestfs.org/"
40542 #: ../test-tool/libguestfs-test-tool.pod:42
40543 msgid "Display short usage information and exit."
40547 #: ../test-tool/libguestfs-test-tool.pod:44
40548 msgid "B<--qemu qemu_binary>"
40552 #: ../test-tool/libguestfs-test-tool.pod:46
40554 "If you have downloaded another qemu binary, point this option at the full "
40555 "path of the binary to try it."
40559 #: ../test-tool/libguestfs-test-tool.pod:49
40560 msgid "B<--qemudir qemu_source_dir>"
40564 #: ../test-tool/libguestfs-test-tool.pod:51
40566 "If you have compiled qemu from source, point this option at the source "
40567 "directory to try it."
40571 #: ../test-tool/libguestfs-test-tool.pod:54
40576 #: ../test-tool/libguestfs-test-tool.pod:56
40577 msgid "B<--timeout N>"
40581 #: ../test-tool/libguestfs-test-tool.pod:58
40583 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
40584 "minutes) which does not usually need to be adjusted."
40588 #: ../test-tool/libguestfs-test-tool.pod:63
40589 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
40593 #: ../test-tool/libguestfs-test-tool.pod:65
40595 "If you have compiled another version of qemu from source and would like to "
40596 "try that, then you can use the I<--qemudir> option to point to the qemu "
40597 "source directory."
40601 #: ../test-tool/libguestfs-test-tool.pod:69
40603 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
40604 "option to point to the binary."
40608 #: ../test-tool/libguestfs-test-tool.pod:72
40610 "Note when using these options, you can ignore the business of qemu wrapper "
40611 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
40612 "wrapper script for you if one is needed."
40616 #: ../test-tool/libguestfs-test-tool.pod:76
40617 msgid "TRYING OUT A DIFFERENT KERNEL"
40621 #: ../test-tool/libguestfs-test-tool.pod:78
40623 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
40624 "libguestfs tries. You do this by setting the environment variables "
40625 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
40629 #: ../test-tool/libguestfs-test-tool.pod:82
40631 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
40636 #: ../test-tool/libguestfs-test-tool.pod:85
40637 msgid "SELF-DIAGNOSIS"
40641 #: ../test-tool/libguestfs-test-tool.pod:87
40643 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
40644 "produced by libguestfs-test-tool and/or possible errors."
40648 #: ../test-tool/libguestfs-test-tool.pod:92
40650 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
40651 "I<1> if there was an error."
40655 #: ../test-tool/libguestfs-test-tool.pod:97
40657 "For the full list of environment variables which may affect libguestfs, "
40658 "please see the L<guestfs(3)> manual page."
40662 #: ../test-tool/libguestfs-test-tool.pod:102
40663 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
40667 #: ../tools/virt-list-filesystems.pl:32
40669 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
40673 #: ../tools/virt-list-filesystems.pl:36
40676 " virt-list-filesystems [--options] domname\n"
40681 #: ../tools/virt-list-filesystems.pl:38
40684 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
40689 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
40691 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
40696 #: ../tools/virt-list-filesystems.pl:45
40698 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
40699 "are contained in a virtual machine or disk image."
40703 #: ../tools/virt-list-filesystems.pl:49
40705 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
40706 "functionality. For more complex cases you should look at the L<guestfish(1)"
40711 #: ../tools/virt-list-filesystems.pl:112
40713 "With this option, C<virt-list-filesystems> displays the type of each "
40714 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
40718 #: ../tools/virt-list-filesystems.pl:119
40723 #: ../tools/virt-list-filesystems.pl:123
40725 "Normally we only show mountable filesystems. If this option is given then "
40726 "swap devices are shown too."
40730 #: ../tools/virt-list-filesystems.pl:197
40732 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
40733 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
40734 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40738 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
40739 msgid "Copyright (C) 2009 Red Hat Inc."
40743 #: ../tools/virt-list-partitions.pl:32
40745 "virt-list-partitions - List partitions in a virtual machine or disk image"
40749 #: ../tools/virt-list-partitions.pl:36
40752 " virt-list-partitions [--options] domname\n"
40757 #: ../tools/virt-list-partitions.pl:38
40760 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
40765 #: ../tools/virt-list-partitions.pl:45
40767 "C<virt-list-partitions> is a command line tool to list the partitions that "
40768 "are contained in a virtual machine or disk image. It is mainly useful as a "
40769 "first step to using L<virt-resize(1)>."
40773 #: ../tools/virt-list-partitions.pl:50
40775 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
40776 "functionality. For more complex cases you should look at the L<guestfish(1)"
40781 #: ../tools/virt-list-partitions.pl:113
40782 msgid "Show sizes in human-readable form (eg. \"1G\")."
40786 #: ../tools/virt-list-partitions.pl:123
40788 "With this option, C<virt-list-partitions> displays the type and size of each "
40789 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
40793 #: ../tools/virt-list-partitions.pl:130
40798 #: ../tools/virt-list-partitions.pl:132
40803 #: ../tools/virt-list-partitions.pl:134
40805 "Display the total size of each block device (as a separate row or rows)."
40809 #: ../tools/virt-list-partitions.pl:267
40811 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
40812 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
40813 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40817 #: ../tools/virt-list-partitions.pl:283
40818 msgid "Copyright (C) 2009-2010 Red Hat Inc."
40822 #: ../tools/virt-make-fs.pl:37
40823 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
40827 #: ../tools/virt-make-fs.pl:41
40830 " virt-make-fs [--options] input.tar output.img\n"
40835 #: ../tools/virt-make-fs.pl:43
40838 " virt-make-fs [--options] input.tar.gz output.img\n"
40843 #: ../tools/virt-make-fs.pl:45
40846 " virt-make-fs [--options] directory output.img\n"
40851 #: ../tools/virt-make-fs.pl:49
40853 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
40854 "archive or some files in a directory. It is similar to tools like L<mkisofs"
40855 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
40856 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
40857 "you want to attach these filesystems to existing virtual machines (eg. to "
40858 "import large amounts of read-only data to a VM)."
40862 #: ../tools/virt-make-fs.pl:57
40863 msgid "Basic usage is:"
40867 #: ../tools/virt-make-fs.pl:59
40870 " virt-make-fs input output.img\n"
40875 #: ../tools/virt-make-fs.pl:61
40877 "where C<input> is either a directory containing files that you want to add, "
40878 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
40879 "C<output.img> is a disk image. The input type is detected automatically. "
40880 "The output disk image defaults to a raw ext2 sparse image unless you specify "
40881 "extra flags (see L</OPTIONS> below)."
40885 #: ../tools/virt-make-fs.pl:67
40886 msgid "FILESYSTEM TYPE"
40890 #: ../tools/virt-make-fs.pl:69
40892 "The default filesystem type is C<ext2>. Just about any filesystem type that "
40893 "libguestfs supports can be used (but I<not> read-only formats like "
40894 "ISO9660). Here are some of the more common choices:"
40898 #: ../tools/virt-make-fs.pl:75
40903 #: ../tools/virt-make-fs.pl:77
40905 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
40906 "you are not going to use the filesystem in a way that requires the journal, "
40907 "then this is just wasted overhead."
40911 #: ../tools/virt-make-fs.pl:81
40912 msgid "I<ntfs> or I<vfat>"
40916 #: ../tools/virt-make-fs.pl:83
40917 msgid "Useful if exporting data to a Windows guest."
40921 #: ../tools/virt-make-fs.pl:85
40923 "I<Note for vfat>: The tar archive or local directory must only contain files "
40924 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
40925 "program running within libguestfs is unable to change the ownership of non-"
40926 "root files, since vfat itself does not support this."
40930 #: ../tools/virt-make-fs.pl:90
40935 #: ../tools/virt-make-fs.pl:92
40937 "Lower overhead than C<ext2>, but certain limitations on filename length and "
40938 "total filesystem size."
40942 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116
40943 #: ../tools/virt-make-fs.pl:149
40948 #: ../tools/virt-make-fs.pl:99
40951 " virt-make-fs --type=minix input minixfs.img\n"
40956 #: ../tools/virt-make-fs.pl:101
40957 msgid "TO PARTITION OR NOT TO PARTITION"
40961 #: ../tools/virt-make-fs.pl:103
40962 msgid "Optionally virt-make-fs can add a partition table to the output disk."
40966 #: ../tools/virt-make-fs.pl:105
40968 "Adding a partition can make the disk image more compatible with certain "
40969 "virtualized operating systems which don't expect to see a filesystem "
40970 "directly located on a block device (Linux doesn't care and will happily "
40971 "handle both types)."
40975 #: ../tools/virt-make-fs.pl:110
40977 "On the other hand, if you have a partition table then the output image is no "
40978 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
40979 "directly on a partitioned disk image. (However libguestfs tools such as "
40980 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
40984 #: ../tools/virt-make-fs.pl:118
40985 msgid "Add an MBR partition:"
40989 #: ../tools/virt-make-fs.pl:120
40992 " virt-make-fs --partition -- input disk.img\n"
40997 #: ../tools/virt-make-fs.pl:122
40999 "If the output disk image could be terabyte-sized or larger, it's better to "
41000 "use an EFI/GPT-compatible partition table:"
41004 #: ../tools/virt-make-fs.pl:125
41007 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
41012 #: ../tools/virt-make-fs.pl:127
41013 msgid "EXTRA SPACE"
41017 #: ../tools/virt-make-fs.pl:129
41019 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
41020 "the files that it contains, but might have extra space. Depending on how "
41021 "you are going to use the output, you might think this extra space is wasted "
41022 "and want to minimize it, or you might want to leave space so that more files "
41023 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
41024 "but you can use the I<--size> flag to leave space in the filesystem if you "
41029 #: ../tools/virt-make-fs.pl:137
41031 "An alternative way to leave extra space but not make the output image any "
41032 "bigger is to use an alternative disk image format (instead of the default "
41033 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
41034 "image format (check your hypervisor supports this before using it). This "
41035 "allows you to choose a large I<--size> but the extra space won't actually be "
41036 "allocated in the image until you try to store something in it."
41040 #: ../tools/virt-make-fs.pl:145
41042 "Don't forget that you can also use local commands including L<resize2fs(8)> "
41043 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
41044 "to build another image from scratch."
41048 #: ../tools/virt-make-fs.pl:151
41051 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
41056 #: ../tools/virt-make-fs.pl:179
41057 msgid "Enable debugging information."
41061 #: ../tools/virt-make-fs.pl:185
41062 msgid "B<--size=E<lt>NE<gt>>"
41066 #: ../tools/virt-make-fs.pl:187
41067 msgid "B<--size=+E<lt>NE<gt>>"
41071 #: ../tools/virt-make-fs.pl:189
41072 msgid "B<-s E<lt>NE<gt>>"
41076 #: ../tools/virt-make-fs.pl:191
41077 msgid "B<-s +E<lt>NE<gt>>"
41081 #: ../tools/virt-make-fs.pl:193
41083 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
41087 #: ../tools/virt-make-fs.pl:196
41089 "If this option is I<not> given, then the output image will be just large "
41090 "enough to contain all the files, with not much wasted space."
41094 #: ../tools/virt-make-fs.pl:199
41096 "To choose a fixed size output disk, specify an absolute number followed by b/"
41097 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41098 "Petabytes or Exabytes. This must be large enough to contain all the input "
41099 "files, else you will get an error."
41103 #: ../tools/virt-make-fs.pl:204
41105 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
41106 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41107 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
41108 "the input files, and (approximately) an extra 200 MB free space."
41112 #: ../tools/virt-make-fs.pl:210
41114 "Note that virt-make-fs estimates free space, and therefore will not produce "
41115 "filesystems containing precisely the free space requested. (It is much more "
41116 "expensive and time-consuming to produce a filesystem which has precisely the "
41117 "desired free space)."
41121 #: ../tools/virt-make-fs.pl:219
41122 msgid "B<--format=E<lt>fmtE<gt>>"
41126 #: ../tools/virt-make-fs.pl:221
41127 msgid "B<-F E<lt>fmtE<gt>>"
41131 #: ../tools/virt-make-fs.pl:223
41132 msgid "Choose the output disk image format."
41136 #: ../tools/virt-make-fs.pl:225
41137 msgid "The default is C<raw> (raw sparse disk image)."
41141 #: ../tools/virt-make-fs.pl:227
41143 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
41144 "that would really make sense here is C<qcow2>."
41148 #: ../tools/virt-make-fs.pl:234
41149 msgid "B<--type=E<lt>fsE<gt>>"
41153 #: ../tools/virt-make-fs.pl:236
41154 msgid "B<-t E<lt>fsE<gt>>"
41158 #: ../tools/virt-make-fs.pl:238
41159 msgid "Choose the output filesystem type."
41163 #: ../tools/virt-make-fs.pl:240
41164 msgid "The default is C<ext2>."
41168 #: ../tools/virt-make-fs.pl:242
41170 "Any filesystem which is supported read-write by libguestfs can be used here."
41174 #: ../tools/virt-make-fs.pl:249
41175 msgid "B<--partition>"
41179 #: ../tools/virt-make-fs.pl:251
41180 msgid "B<--partition=E<lt>parttypeE<gt>>"
41184 #: ../tools/virt-make-fs.pl:253
41186 "If specified, this flag adds an MBR partition table to the output disk image."
41190 #: ../tools/virt-make-fs.pl:256
41192 "You can change the partition table type, eg. I<--partition=gpt> for large "
41197 #: ../tools/virt-make-fs.pl:259
41199 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
41200 "might consider the next parameter to be the partition type. For example:"
41204 #: ../tools/virt-make-fs.pl:263
41207 " virt-make-fs --partition input.tar output.img\n"
41212 #: ../tools/virt-make-fs.pl:265
41214 "would cause virt-make-fs to think you wanted to use a partition type of "
41215 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
41216 "dash) between options and the input and output arguments:"
41220 #: ../tools/virt-make-fs.pl:269
41223 " virt-make-fs --partition -- input.tar output.img\n"
41228 #: ../tools/virt-make-fs.pl:271
41229 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
41233 #: ../tools/virt-make-fs.pl:559
41235 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
41236 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
41237 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
41241 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
41243 "When reporting bugs, please enable debugging and capture the I<complete> "
41248 #: ../tools/virt-make-fs.pl:576
41251 " export LIBGUESTFS_DEBUG=1\n"
41252 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
41257 #: ../tools/virt-make-fs.pl:579
41259 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
41264 #: ../tools/virt-tar.pl:33
41265 msgid "virt-tar - Extract or upload files to a virtual machine"
41269 #: ../tools/virt-tar.pl:37
41272 " virt-tar [--options] -x domname directory tarball\n"
41277 #: ../tools/virt-tar.pl:39
41280 " virt-tar [--options] -u domname tarball directory\n"
41285 #: ../tools/virt-tar.pl:41
41288 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
41293 #: ../tools/virt-tar.pl:43
41296 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
41301 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
41306 #: ../tools/virt-tar.pl:47
41308 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
41309 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
41313 #: ../tools/virt-tar.pl:52
41314 msgid "Download C</home> from the VM into a local tarball:"
41318 #: ../tools/virt-tar.pl:54
41321 " virt-tar -x domname /home home.tar\n"
41326 #: ../tools/virt-tar.pl:56
41329 " virt-tar -zx domname /home home.tar.gz\n"
41334 #: ../tools/virt-tar.pl:58
41335 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41339 #: ../tools/virt-tar.pl:60
41342 " virt-tar -u domname uploadstuff.tar /tmp\n"
41347 #: ../tools/virt-tar.pl:62
41350 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41355 #: ../tools/virt-tar.pl:66
41357 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41358 "virtual machines. If you do this, you risk disk corruption in the VM. "
41359 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41363 #: ../tools/virt-tar.pl:71
41365 "You can use I<-x> (extract) on live virtual machines, but you might get "
41366 "inconsistent results or errors if there is filesystem activity inside the "
41367 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41368 "work, but the only way to guarantee consistent results is if the virtual "
41369 "machine is shut down."
41373 #: ../tools/virt-tar.pl:79
41375 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41376 "parts of a guest filesystem. There are many possibilities: making backups, "
41377 "uploading data files, snooping on guest activity, fixing or customizing "
41382 #: ../tools/virt-tar.pl:84
41384 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41385 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
41386 "should look at the L<guestfish(1)> tool."
41390 #: ../tools/virt-tar.pl:88
41392 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41393 "its contents (recursively) from the virtual machine into a local tarball. "
41394 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
41395 "virtual machine. You cannot use these two options together."
41399 #: ../tools/virt-tar.pl:94
41401 "In addition, you may need to use the I<-z> (gZip) option to enable "
41402 "compression. When uploading, you have to specify I<-z> if the upload file "
41403 "is compressed because virt-tar won't detect this on its own."
41407 #: ../tools/virt-tar.pl:98
41409 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41410 "example it cannot do PKZip files or bzip2 compression. If you want that "
41411 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41412 "the L<libguestfs(3)> API)."
41416 #: ../tools/virt-tar.pl:160
41417 msgid "B<--extract>"
41421 #: ../tools/virt-tar.pl:162
41422 msgid "B<--download>"
41426 #: ../tools/virt-tar.pl:164
41431 #: ../tools/virt-tar.pl:166
41432 msgid "B<--upload>"
41436 #: ../tools/virt-tar.pl:168
41438 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41443 #: ../tools/virt-tar.pl:171
41445 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41446 "Please read the L</WARNING> section above before using this option."
41450 #: ../tools/virt-tar.pl:175
41451 msgid "You must specify exactly one of these options."
41455 #: ../tools/virt-tar.pl:181
41460 #: ../tools/virt-tar.pl:183
41465 #: ../tools/virt-tar.pl:185
41466 msgid "Specify that the input or output tarball is gzip-compressed."
41470 #: ../tools/virt-tar.pl:298
41472 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
41473 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
41474 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
41479 #: ../tools/virt-win-reg.pl:37
41481 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
41485 #: ../tools/virt-win-reg.pl:41
41488 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41493 #: ../tools/virt-win-reg.pl:43
41496 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41501 #: ../tools/virt-win-reg.pl:45
41504 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41509 #: ../tools/virt-win-reg.pl:47
41512 " virt-win-reg --merge domname [input.reg ...]\n"
41517 #: ../tools/virt-win-reg.pl:49
41520 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41525 #: ../tools/virt-win-reg.pl:53
41527 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41528 "virtual machines. If you do this, you I<will> get irreversible disk "
41529 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41530 "but doesn't catch all cases."
41534 #: ../tools/virt-win-reg.pl:58
41536 "Modifying the Windows Registry is an inherently risky operation. The format "
41537 "is deliberately obscure and undocumented, and Registry changes can leave the "
41538 "system unbootable. Therefore when using the I<--merge> option, make sure "
41539 "you have a reliable backup first."
41543 #: ../tools/virt-win-reg.pl:65
41545 "This program can export and merge Windows Registry entries from a Windows "
41550 #: ../tools/virt-win-reg.pl:68
41552 "The first parameter is the libvirt guest name or the raw disk image of a "
41557 #: ../tools/virt-win-reg.pl:71
41559 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
41560 "exported (recursively). For example:"
41564 #: ../tools/virt-win-reg.pl:74
41567 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
41572 #: ../tools/virt-win-reg.pl:76
41574 "You can also display single values from within registry keys, for example:"
41578 #: ../tools/virt-win-reg.pl:79
41581 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
41582 " $ virt-win-reg Windows7 $cvkey ProductName\n"
41583 " Windows 7 Enterprise\n"
41588 #: ../tools/virt-win-reg.pl:83
41590 "With I<--merge>, you can merge a textual regedit file into the Windows "
41595 #: ../tools/virt-win-reg.pl:86
41598 " $ virt-win-reg --merge Windows7 changes.reg\n"
41603 #: ../tools/virt-win-reg.pl:90
41605 "This program is only meant for simple access to the registry. If you want "
41606 "to do complicated things with the registry, we suggest you download the "
41607 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
41608 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
41609 "L<hivexregedit(1)>."
41613 #: ../tools/virt-win-reg.pl:159
41618 #: ../tools/virt-win-reg.pl:161
41620 "In merge mode, this merges a textual regedit file into the Windows Registry "
41621 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
41622 "displays or exports Registry entries instead."
41626 #: ../tools/virt-win-reg.pl:165
41628 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
41629 "result in disk corruption. However exporting (without this flag) is always "
41634 #: ../tools/virt-win-reg.pl:173
41635 msgid "B<--encoding> UTF-16LE|ASCII"
41639 #: ../tools/virt-win-reg.pl:175
41641 "When merging (only), you may need to specify the encoding for strings to be "
41642 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
41643 "(3)/ENCODING STRINGS>."
41647 #: ../tools/virt-win-reg.pl:179
41649 "The default is to use UTF-16LE, which should work with recent versions of "
41654 #: ../tools/virt-win-reg.pl:186
41655 msgid "B<--unsafe-printable-strings>"
41659 #: ../tools/virt-win-reg.pl:188
41661 "When exporting (only), assume strings are UTF-16LE and print them as strings "
41662 "instead of hex sequences. Remove the final zero codepoint from strings if "
41667 #: ../tools/virt-win-reg.pl:192
41669 "This is unsafe and does not preserve the fidelity of strings in the original "
41670 "Registry for various reasons:"
41674 #: ../tools/virt-win-reg.pl:199
41676 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
41677 "other encodings will be corrupted by this transformation."
41681 #: ../tools/virt-win-reg.pl:204
41683 "Assumes that everything which has type 1 or 2 is really a string and that "
41684 "everything else is not a string, but the type field in real Registries is "
41689 #: ../tools/virt-win-reg.pl:210
41691 "Loses information about whether a zero codepoint followed the string in the "
41696 #: ../tools/virt-win-reg.pl:215
41698 "This all happens because the Registry itself contains no information about "
41699 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
41703 #: ../tools/virt-win-reg.pl:219
41705 "You should only use this option for quick hacking and debugging of the "
41706 "Registry contents, and I<never> use it if the output is going to be passed "
41707 "into another program or stored in another Registry."
41711 #: ../tools/virt-win-reg.pl:556
41712 msgid "SUPPORTED SYSTEMS"
41716 #: ../tools/virt-win-reg.pl:558
41718 "The program currently supports Windows NT-derived guests starting with "
41719 "Windows XP through to at least Windows 7."
41723 #: ../tools/virt-win-reg.pl:561
41724 msgid "The following Registry keys are supported:"
41728 #: ../tools/virt-win-reg.pl:565
41729 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
41733 #: ../tools/virt-win-reg.pl:567
41734 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
41738 #: ../tools/virt-win-reg.pl:569
41739 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
41743 #: ../tools/virt-win-reg.pl:571
41744 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
41748 #: ../tools/virt-win-reg.pl:573
41749 msgid "C<HKEY_USERS\\.DEFAULT>"
41753 #: ../tools/virt-win-reg.pl:575
41754 msgid "C<HKEY_USERS\\I<SID>>"
41758 #: ../tools/virt-win-reg.pl:577
41759 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
41763 #: ../tools/virt-win-reg.pl:579
41764 msgid "C<HKEY_USERS\\I<username>>"
41768 #: ../tools/virt-win-reg.pl:581
41770 "where I<username> is a local user name (this is a libguestfs extension)."
41774 #: ../tools/virt-win-reg.pl:585
41776 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
41781 #: ../tools/virt-win-reg.pl:588
41783 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
41784 "supported (there is no \"current user\")."
41788 #: ../tools/virt-win-reg.pl:591
41793 #: ../tools/virt-win-reg.pl:593
41795 "C<virt-win-reg> expects that regedit files have already been reencoded in "
41796 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
41797 "style line endings. Since Windows regedit files are often in UTF-16LE with "
41798 "Windows-style line endings, you may need to reencode the whole file before "
41799 "or after processing."
41803 #: ../tools/virt-win-reg.pl:599
41805 "To reencode a file from Windows format to Linux (before processing it with "
41806 "the I<--merge> option), you would do something like this:"
41810 #: ../tools/virt-win-reg.pl:602
41813 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
41818 #: ../tools/virt-win-reg.pl:604
41820 "To go in the opposite direction, after exporting and before sending the file "
41821 "to a Windows user, do something like this:"
41825 #: ../tools/virt-win-reg.pl:607
41828 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
41833 #: ../tools/virt-win-reg.pl:609
41834 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
41838 #: ../tools/virt-win-reg.pl:611
41840 "If you are unsure about the current encoding, use the L<file(1)> command. "
41841 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
41842 "style (CRLF) line endings, like this:"
41846 #: ../tools/virt-win-reg.pl:615
41849 " $ file software.reg\n"
41850 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
41851 " with CRLF line terminators\n"
41856 #: ../tools/virt-win-reg.pl:619
41857 msgid "This file would need conversion before you could I<--merge> it."
41861 #: ../tools/virt-win-reg.pl:621
41862 msgid "CurrentControlSet etc."
41866 #: ../tools/virt-win-reg.pl:623
41868 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
41869 "Registry at the level of the hive file, and therefore you cannot modify "
41874 #: ../tools/virt-win-reg.pl:627
41876 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
41877 "circumstances it might refer to another control set. The way to find out is "
41878 "to look at the C<HKLM\\SYSTEM\\Select> key:"
41882 #: ../tools/virt-win-reg.pl:631
41885 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
41886 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
41887 " \"Current\"=dword:00000001\n"
41888 " \"Default\"=dword:00000001\n"
41889 " \"Failed\"=dword:00000000\n"
41890 " \"LastKnownGood\"=dword:00000002\n"
41895 #: ../tools/virt-win-reg.pl:638
41896 msgid "\"Current\" is the one which Windows will choose when it boots."
41900 #: ../tools/virt-win-reg.pl:640
41902 "Similarly, other C<Current...> keys in the path may need to be replaced."
41906 #: ../tools/virt-win-reg.pl:643
41907 msgid "DELETING REGISTRY KEYS AND VALUES"
41911 #: ../tools/virt-win-reg.pl:645
41912 msgid "To delete a whole registry key, use the syntax:"
41916 #: ../tools/virt-win-reg.pl:647
41919 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
41924 #: ../tools/virt-win-reg.pl:649
41925 msgid "To delete a single value within a key, use the syntax:"
41929 #: ../tools/virt-win-reg.pl:651
41932 " [HKEY_LOCAL_MACHINE\\Foo]\n"
41938 #: ../tools/virt-win-reg.pl:654
41939 msgid "WINDOWS TIPS"
41943 #: ../tools/virt-win-reg.pl:656
41945 "Note that some of these tips modify the guest disk image. The guest I<must> "
41946 "be shut off, else you will get disk corruption."
41950 #: ../tools/virt-win-reg.pl:659
41951 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
41955 #: ../tools/virt-win-reg.pl:661
41957 "Prepare a DOS batch script, VBScript or executable. Upload this using "
41958 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
41959 "is uploaded into C<C:\\>:"
41963 #: ../tools/virt-win-reg.pl:665
41966 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
41971 #: ../tools/virt-win-reg.pl:667
41972 msgid "Prepare a regedit file containing the registry change:"
41976 #: ../tools/virt-win-reg.pl:669
41979 " cat > test.reg <<'EOF'\n"
41980 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
41981 " \"Test\"=\"c:\\\\test.bat\"\n"
41987 #: ../tools/virt-win-reg.pl:674
41989 "In this example we use the key C<RunOnce> which means that the script will "
41990 "run precisely once when the first user logs in. If you want it to run every "
41991 "time a user logs in, replace C<RunOnce> with C<Run>."
41995 #: ../tools/virt-win-reg.pl:678
41996 msgid "Now update the registry:"
42000 #: ../tools/virt-win-reg.pl:680
42003 " virt-win-reg --merge WindowsGuest test.reg\n"
42008 #: ../tools/virt-win-reg.pl:682
42009 msgid "INSTALLING A SERVICE"
42013 #: ../tools/virt-win-reg.pl:684
42015 "This section assumes you are familiar with Windows services, and you either "
42016 "have a program which handles the Windows Service Control Protocol directly "
42017 "or you want to run any program using a service wrapper like SrvAny or the "
42022 #: ../tools/virt-win-reg.pl:689
42024 "First upload the program and optionally the service wrapper. In this case "
42025 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
42029 #: ../tools/virt-win-reg.pl:693
42032 " guestfish -i -d WindowsGuest <<EOF\n"
42033 " upload rhsrvany.exe /rhsrvany.exe\n"
42034 " upload test.exe /test.exe\n"
42040 #: ../tools/virt-win-reg.pl:698
42042 "Prepare a regedit file containing the registry changes. In this example, "
42043 "the first registry change is needed for the service itself or the service "
42044 "wrapper (if used). The second registry change is only needed because I am "
42045 "using the RHSrvAny service wrapper."
42049 #: ../tools/virt-win-reg.pl:703
42052 " cat > service.reg <<'EOF'\n"
42053 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
42054 " \"Type\"=dword:00000010\n"
42055 " \"Start\"=dword:00000002\n"
42056 " \"ErrorControl\"=dword:00000001\n"
42057 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
42058 " \"DisplayName\"=\"RHSrvAny\"\n"
42059 " \"ObjectName\"=\"NetworkService\"\n"
42064 #: ../tools/virt-win-reg.pl:712
42067 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
42068 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
42069 " \"PWD\"=\"c:\\\\Temp\"\n"
42075 #: ../tools/virt-win-reg.pl:723
42077 "For use of C<ControlSet001> see the section above in this manual page. You "
42078 "may need to adjust this according to the control set that is in use by the "
42083 #: ../tools/virt-win-reg.pl:729
42085 "C<\"ObjectName\"> controls the privileges that the service will have. An "
42086 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
42087 "privileged account."
42091 #: ../tools/virt-win-reg.pl:735
42093 "For the meaning of the magic numbers, see this Microsoft KB article: "
42094 "L<http://support.microsoft.com/kb/103000>."
42098 #: ../tools/virt-win-reg.pl:740
42099 msgid "Update the registry:"
42103 #: ../tools/virt-win-reg.pl:742
42106 " virt-win-reg --merge WindowsGuest service.reg\n"
42111 #: ../tools/virt-win-reg.pl:746
42113 "Be careful when passing parameters containing C<\\> (backslash) in the "
42114 "shell. Usually you will have to use 'single quotes' or double backslashes "
42115 "(but not both) to protect them from the shell."
42119 #: ../tools/virt-win-reg.pl:750
42120 msgid "Paths and value names are case-insensitive."
42124 #: ../tools/virt-win-reg.pl:759
42126 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
42127 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
42128 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42132 #: ../tools/virt-win-reg.pl:777
42135 " export LIBGUESTFS_DEBUG=1\n"
42136 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
42141 #: ../tools/virt-win-reg.pl:780
42143 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."