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-10-26 21:10+0200\n"
13 "PO-Revision-Date: 2011-10-19 15:46+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:336
437 #: ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2877
442 #: ../align/virt-alignment-scan.pod:134
445 " virt-alignment-scan --format=raw -a disk.img\n"
450 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118
451 #: ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341
452 #: ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114
453 #: ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246
454 #: ../rescue/virt-rescue.pod:137
455 msgid "forces raw format (no auto-detection) for C<disk.img>."
459 #: ../align/virt-alignment-scan.pod:138
462 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
467 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122
468 #: ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345
469 #: ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118
470 #: ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250
471 #: ../rescue/virt-rescue.pod:141
473 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
474 "detection for C<another.img>."
478 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125
479 #: ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348
480 #: ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121
481 #: ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144
483 "If you have untrusted raw-format guest disk images, you should use this "
484 "option to specify the disk format. This avoids a possible security problem "
485 "with malicious guests (CVE-2010-3851)."
489 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:491
490 #: ../sparsify/virt-sparsify.pod:153
495 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:493
496 #: ../sparsify/virt-sparsify.pod:155
501 #: ../align/virt-alignment-scan.pod:151
503 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
508 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134
509 #: ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425
510 #: ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173
511 #: ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390
512 #: ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119
513 #: ../rescue/virt-rescue.pod:182 ../sparsify/virt-sparsify.pod:159
518 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136
519 #: ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427
520 #: ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175
521 #: ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392
522 #: ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121
523 #: ../rescue/virt-rescue.pod:184 ../sparsify/virt-sparsify.pod:161
528 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138
529 #: ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429
530 #: ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177
531 #: ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123
532 #: ../rescue/virt-rescue.pod:186 ../sparsify/virt-sparsify.pod:163
533 msgid "Enable verbose messages for debugging."
537 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140
538 #: ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431
539 #: ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179
540 #: ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397
541 #: ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125
542 #: ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:561
543 #: ../sparsify/virt-sparsify.pod:165
548 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142
549 #: ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433
550 #: ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181
551 #: ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399
552 #: ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127
553 #: ../rescue/virt-rescue.pod:190 ../resize/virt-resize.pod:563
554 #: ../sparsify/virt-sparsify.pod:167 ../tools/virt-list-filesystems.pl:69
555 #: ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169
556 #: ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
561 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144
562 #: ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435
563 #: ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183
564 #: ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129
565 #: ../rescue/virt-rescue.pod:192 ../resize/virt-resize.pod:565
566 #: ../sparsify/virt-sparsify.pod:169 ../tools/virt-list-filesystems.pl:71
567 #: ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171
568 #: ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
569 msgid "Display version number and exit."
573 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146
574 #: ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437
575 #: ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185
576 #: ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412
577 #: ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131
578 #: ../rescue/virt-rescue.pod:203 ../sparsify/virt-sparsify.pod:171
579 #: ../tools/virt-tar.pl:158
584 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148
585 #: ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439
586 #: ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187
587 #: ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133
588 #: ../rescue/virt-rescue.pod:205 ../sparsify/virt-sparsify.pod:173
589 msgid "Enable tracing of libguestfs API calls."
593 #: ../align/virt-alignment-scan.pod:172
594 msgid "RECOMMENDED ALIGNMENT"
598 #: ../align/virt-alignment-scan.pod:174
600 "Operating systems older than Windows 2008 and Linux before ca.2010 place the "
601 "first sector of the first partition at sector 63, with a 512 byte sector "
602 "size. This happens because of a historical accident. Drives have to report "
603 "a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
604 "completely meaningless on modern drives, but it happens that the geometry "
605 "reported always has 63 sectors per track. The operating system therefore "
606 "places the first partition at the start of the second \"track\", at sector "
611 #: ../align/virt-alignment-scan.pod:183
613 "When the guest OS is virtualized, the host operating system and hypervisor "
614 "may prefer accesses aligned to one of:"
618 #: ../align/virt-alignment-scan.pod:188
623 #: ../align/virt-alignment-scan.pod:190
625 "if the host OS uses local storage directly on hard drive partitions, and the "
626 "hard drive has 512 byte physical sectors."
630 #: ../align/virt-alignment-scan.pod:193
635 #: ../align/virt-alignment-scan.pod:195
637 "for local storage on new hard drives with 4Kbyte physical sectors; for file-"
638 "backed storage on filesystems with 4Kbyte block size; or for some types of "
639 "network-attached storage."
643 #: ../align/virt-alignment-scan.pod:199
648 #: ../align/virt-alignment-scan.pod:201
650 "for high-end network-attached storage. This is the optimal block size for "
651 "some NetApp hardware."
655 #: ../align/virt-alignment-scan.pod:204
660 #: ../align/virt-alignment-scan.pod:206
661 msgid "see L</1 MB PARTITION ALIGNMENT> below."
665 #: ../align/virt-alignment-scan.pod:210
667 "Partitions which are not aligned correctly to the underlying storage cause "
668 "extra I/O. For example:"
672 #: ../align/virt-alignment-scan.pod:213
676 " +--------------------------+------\n"
678 " | filesystem block |\n"
679 " ---+------------------+------+-------------------+-----+---\n"
680 " | host block | host block |\n"
682 " ---+-------------------------+-------------------------+---\n"
687 #: ../align/virt-alignment-scan.pod:222
689 "In this example, each time a 4K guest block is read, two blocks on the host "
690 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
691 "written, two host blocks must first be read, the old and new data combined, "
692 "and the two blocks written back (4x I/O)."
696 #: ../align/virt-alignment-scan.pod:227
697 msgid "LINUX HOST BLOCK AND I/O SIZE"
701 #: ../align/virt-alignment-scan.pod:229
703 "New versions of the Linux kernel expose the physical and logical block size, "
704 "and minimum and recommended I/O size."
708 #: ../align/virt-alignment-scan.pod:232
709 msgid "For a typical hard drive with 512 byte sectors:"
713 #: ../align/virt-alignment-scan.pod:234
716 " $ cat /sys/block/sda/queue/physical_block_size\n"
718 " $ cat /sys/block/sda/queue/logical_block_size\n"
720 " $ cat /sys/block/sda/queue/minimum_io_size\n"
722 " $ cat /sys/block/sda/queue/optimal_io_size\n"
728 #: ../align/virt-alignment-scan.pod:243
729 msgid "For a NetApp LUN:"
733 #: ../align/virt-alignment-scan.pod:245
736 " $ cat /sys/block/sdc/queue/logical_block_size\n"
738 " $ cat /sys/block/sdc/queue/physical_block_size\n"
740 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
742 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
748 #: ../align/virt-alignment-scan.pod:254
750 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
751 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
755 #: ../align/virt-alignment-scan.pod:258
757 "For detailed information about what these numbers mean, see L<http://docs."
758 "redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/"
759 "Storage_Administration_Guide/newstorage-iolimits.html>"
763 #: ../align/virt-alignment-scan.pod:261
765 "[Thanks to Mike Snitzer for providing NetApp data and additional "
770 #: ../align/virt-alignment-scan.pod:264
771 msgid "1 MB PARTITION ALIGNMENT"
775 #: ../align/virt-alignment-scan.pod:266
777 "Microsoft picked 1 MB as the default alignment for all partitions starting "
778 "with Windows 2008 Server, and Linux has followed this."
782 #: ../align/virt-alignment-scan.pod:269
784 "Assuming 512 byte sectors in the guest, you will now see the first partition "
785 "starting at sector 2048, and subsequent partitions (if any) will start at a "
786 "multiple of 2048 sectors."
790 #: ../align/virt-alignment-scan.pod:273
792 "1 MB alignment is compatible with all current alignment requirements (4K, "
793 "64K) and provides room for future growth in physical block sizes."
797 #: ../align/virt-alignment-scan.pod:276
798 msgid "SETTING ALIGNMENT"
802 #: ../align/virt-alignment-scan.pod:278
804 "L<virt-resize(1)> can change the alignment of the partitions of some "
805 "guests. Currently it can fully align all the partitions of all Windows "
806 "guests, and it will fix the bootloader where necessary. For Linux guests, "
807 "it can align the second and subsequent partitions, so the majority of OS "
808 "accesses except at boot will be aligned."
812 #: ../align/virt-alignment-scan.pod:284
814 "Another way to correct partition alignment problems is to reinstall your "
815 "guest operating systems. If you install operating systems from templates, "
816 "ensure these have correct partition alignment too."
820 #: ../align/virt-alignment-scan.pod:288
822 "For older versions of Windows, the following NetApp document contains useful "
823 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
827 #: ../align/virt-alignment-scan.pod:291
829 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
830 "an explicit C<%pre> section that creates aligned partitions using L<parted(8)"
831 ">. Do not use the Kickstart C<part> command. The NetApp document above "
832 "contains an example."
836 #: ../align/virt-alignment-scan.pod:296 ../cat/virt-cat.pod:231
837 #: ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483
838 #: ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215
839 #: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352
840 #: ../rescue/virt-rescue.pod:266 ../resize/virt-resize.pod:676
841 #: ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258
842 #: ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289
843 #: ../tools/virt-win-reg.pl:744
844 msgid "SHELL QUOTING"
848 #: ../align/virt-alignment-scan.pod:298 ../cat/virt-cat.pod:233
849 #: ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485
850 #: ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217
851 #: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354
852 #: ../rescue/virt-rescue.pod:268 ../resize/virt-resize.pod:678
853 #: ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260
854 #: ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291
855 #: ../tools/virt-win-reg.pl:752
857 "Libvirt guest names can contain arbitrary characters, some of which have "
858 "meaning to the shell such as C<#> and space. You may need to quote or "
859 "escape these characters on the command line. See the shell manual page L<sh"
864 #: ../align/virt-alignment-scan.pod:303 ../cat/virt-cat.pod:238
865 #: ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490
866 #: ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222
867 #: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114
868 #: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:375
869 #: ../resize/virt-resize.pod:683 ../sparsify/virt-sparsify.pod:227
870 #: ../test-tool/libguestfs-test-tool.pod:90
875 #: ../align/virt-alignment-scan.pod:305
876 msgid "This program returns:"
880 #: ../align/virt-alignment-scan.pod:309 ../align/virt-alignment-scan.pod:315
881 #: ../align/virt-alignment-scan.pod:321 ../align/virt-alignment-scan.pod:328
882 #: ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187
883 #: ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202
884 #: ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287
885 #: ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295
886 #: ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314
887 #: ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322
888 #: ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362
889 #: ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388
890 #: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266
891 #: ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276
892 #: ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291
893 #: ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102
894 #: ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132
895 #: ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227
896 #: ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235
897 #: ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243
898 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
899 #: ../fish/guestfish-actions.pod:441 ../fish/guestfish-actions.pod:449
900 #: ../fish/guestfish-actions.pod:456 ../fish/guestfish-actions.pod:463
901 #: ../fish/guestfish-actions.pod:1262 ../fish/guestfish-actions.pod:1266
902 #: ../fish/guestfish-actions.pod:1270 ../fish/guestfish-actions.pod:1274
903 #: ../fish/guestfish-actions.pod:1282 ../fish/guestfish-actions.pod:1286
904 #: ../fish/guestfish-actions.pod:1290 ../fish/guestfish-actions.pod:1300
905 #: ../fish/guestfish-actions.pod:1304 ../fish/guestfish-actions.pod:1308
906 #: ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:1402
907 #: ../fish/guestfish-actions.pod:1407 ../fish/guestfish-actions.pod:1412
908 #: ../fish/guestfish-actions.pod:1454 ../fish/guestfish-actions.pod:1458
909 #: ../fish/guestfish-actions.pod:1463 ../fish/guestfish-actions.pod:1719
910 #: ../fish/guestfish-actions.pod:1726 ../fish/guestfish-actions.pod:1733
911 #: ../fish/guestfish-actions.pod:2136 ../fish/guestfish-actions.pod:2142
912 #: ../fish/guestfish-actions.pod:2150 ../fish/guestfish-actions.pod:2157
913 #: ../fish/guestfish-actions.pod:2164 ../fish/guestfish.pod:445
914 #: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
915 #: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393
916 #: ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:359
917 #: ../resize/virt-resize.pod:363 ../resize/virt-resize.pod:372
918 #: ../resize/virt-resize.pod:378 ../sparsify/virt-sparsify.pod:32
919 #: ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43
920 #: ../sparsify/virt-sparsify.pod:49 ../sparsify/virt-sparsify.pod:54
921 #: ../sparsify/virt-sparsify.pod:58 ../sparsify/virt-sparsify.pod:64
922 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29
923 #: ../src/guestfs-actions.pod:641 ../src/guestfs-actions.pod:649
924 #: ../src/guestfs-actions.pod:656 ../src/guestfs-actions.pod:663
925 #: ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2075
926 #: ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2083
927 #: ../src/guestfs-actions.pod:2091 ../src/guestfs-actions.pod:2095
928 #: ../src/guestfs-actions.pod:2099 ../src/guestfs-actions.pod:2109
929 #: ../src/guestfs-actions.pod:2113 ../src/guestfs-actions.pod:2117
930 #: ../src/guestfs-actions.pod:2255 ../src/guestfs-actions.pod:2259
931 #: ../src/guestfs-actions.pod:2264 ../src/guestfs-actions.pod:2269
932 #: ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:2334
933 #: ../src/guestfs-actions.pod:2339 ../src/guestfs-actions.pod:2754
934 #: ../src/guestfs-actions.pod:2761 ../src/guestfs-actions.pod:2768
935 #: ../src/guestfs-actions.pod:3313 ../src/guestfs-actions.pod:3319
936 #: ../src/guestfs-actions.pod:3327 ../src/guestfs-actions.pod:3334
937 #: ../src/guestfs-actions.pod:3341 ../src/guestfs.pod:403
938 #: ../src/guestfs.pod:408 ../src/guestfs.pod:413 ../src/guestfs.pod:417
939 #: ../src/guestfs.pod:422 ../src/guestfs.pod:426 ../src/guestfs.pod:431
940 #: ../src/guestfs.pod:436 ../src/guestfs.pod:1109 ../src/guestfs.pod:1113
941 #: ../src/guestfs.pod:1117 ../src/guestfs.pod:1122 ../src/guestfs.pod:1130
942 #: ../src/guestfs.pod:1149 ../src/guestfs.pod:1157 ../src/guestfs.pod:1179
943 #: ../src/guestfs.pod:1183 ../src/guestfs.pod:1187 ../src/guestfs.pod:1191
944 #: ../src/guestfs.pod:1195 ../src/guestfs.pod:1199 ../src/guestfs.pod:1689
945 #: ../src/guestfs.pod:1694 ../src/guestfs.pod:1698 ../src/guestfs.pod:1800
946 #: ../src/guestfs.pod:1805 ../src/guestfs.pod:1809 ../src/guestfs.pod:1819
947 #: ../src/guestfs.pod:2108 ../src/guestfs.pod:2113 ../src/guestfs.pod:2119
948 #: ../src/guestfs.pod:2127 ../src/guestfs.pod:2645 ../src/guestfs.pod:2651
949 #: ../src/guestfs.pod:2656 ../src/guestfs.pod:2662 ../src/guestfs.pod:3062
950 #: ../src/guestfs.pod:3067 ../src/guestfs.pod:3071 ../src/guestfs.pod:3075
951 #: ../src/guestfs.pod:3079 ../src/guestfs.pod:3093 ../src/guestfs.pod:3098
952 #: ../src/guestfs.pod:3329 ../src/guestfs.pod:3333 ../src/guestfs.pod:3337
953 #: ../src/guestfs.pod:3341 ../tools/virt-win-reg.pl:197
954 #: ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208
955 #: ../tools/virt-win-reg.pl:721 ../tools/virt-win-reg.pl:727
956 #: ../tools/virt-win-reg.pl:733
961 #: ../align/virt-alignment-scan.pod:311
966 #: ../align/virt-alignment-scan.pod:313
968 "successful exit, all partitions are aligned E<ge> 64K for best performance"
972 #: ../align/virt-alignment-scan.pod:317
977 #: ../align/virt-alignment-scan.pod:319
978 msgid "an error scanning the disk image or guest"
982 #: ../align/virt-alignment-scan.pod:323
987 #: ../align/virt-alignment-scan.pod:325
989 "successful exit, some partitions have alignment E<lt> 64K which can result "
990 "in poor performance on high end network storage"
994 #: ../align/virt-alignment-scan.pod:330
999 #: ../align/virt-alignment-scan.pod:332
1001 "successful exit, some partitions have alignment E<lt> 4K which can result in "
1002 "poor performance on most hypervisors"
1006 #: ../align/virt-alignment-scan.pod:337 ../cat/virt-cat.pod:243
1007 #: ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495
1008 #: ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:227
1009 #: ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97
1010 #: ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384
1011 #: ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50
1012 #: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47
1013 #: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317
1014 #: ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45
1015 #: ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39
1016 #: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288
1017 #: ../resize/virt-resize.pod:688 ../ruby/examples/guestfs-ruby.pod:36
1018 #: ../sparsify/virt-sparsify.pod:251 ../src/guestfs.pod:3270
1019 #: ../test-tool/libguestfs-test-tool.pod:100
1020 #: ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265
1021 #: ../tools/virt-make-fs.pl:557 ../tools/virt-tar.pl:296
1022 #: ../tools/virt-win-reg.pl:757
1027 #: ../align/virt-alignment-scan.pod:339
1029 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
1030 "L<virt-resize(1)>, L<http://libguestfs.org/>."
1034 #: ../align/virt-alignment-scan.pod:346 ../cat/virt-cat.pod:252
1035 #: ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:507
1036 #: ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:235
1037 #: ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:296
1038 #: ../resize/virt-resize.pod:711 ../sparsify/virt-sparsify.pod:264
1039 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277
1040 #: ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:311
1041 #: ../tools/virt-win-reg.pl:783
1046 #: ../align/virt-alignment-scan.pod:348 ../cat/virt-cat.pod:254
1047 #: ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509
1048 #: ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237
1049 #: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395
1050 #: ../rescue/virt-rescue.pod:298 ../resize/virt-resize.pod:713
1051 #: ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210
1052 #: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584
1053 #: ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
1054 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
1058 #: ../align/virt-alignment-scan.pod:350 ../cat/virt-cat.pod:256
1059 #: ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511
1060 #: ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:239
1061 #: ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114
1062 #: ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401
1063 #: ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64
1064 #: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62
1065 #: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332
1066 #: ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62
1067 #: ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56
1068 #: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300
1069 #: ../resize/virt-resize.pod:715 ../ruby/examples/guestfs-ruby.pod:52
1070 #: ../sparsify/virt-sparsify.pod:268 ../src/guestfs.pod:3352
1071 #: ../test-tool/libguestfs-test-tool.pod:110
1072 #: ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281
1073 #: ../tools/virt-make-fs.pl:586 ../tools/virt-tar.pl:315
1074 #: ../tools/virt-win-reg.pl:787
1079 #: ../align/virt-alignment-scan.pod:352 ../clone/virt-sysprep.pod:507
1080 #: ../sparsify/virt-sparsify.pod:270
1081 msgid "Copyright (C) 2011 Red Hat Inc."
1085 #: ../align/virt-alignment-scan.pod:354 ../cat/virt-cat.pod:260
1086 #: ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515
1087 #: ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:243
1088 #: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305
1089 #: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58
1090 #: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60
1091 #: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:407
1092 #: ../rescue/virt-rescue.pod:304 ../resize/virt-resize.pod:719
1093 #: ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115
1094 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
1095 #: ../tools/virt-make-fs.pl:590 ../tools/virt-tar.pl:319
1096 #: ../tools/virt-win-reg.pl:791
1098 "This program is free software; you can redistribute it and/or modify it "
1099 "under the terms of the GNU General Public License as published by the Free "
1100 "Software Foundation; either version 2 of the License, or (at your option) "
1101 "any later version."
1105 #: ../align/virt-alignment-scan.pod:359 ../cat/virt-cat.pod:265
1106 #: ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520
1107 #: ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:248
1108 #: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310
1109 #: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63
1110 #: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65
1111 #: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:412
1112 #: ../rescue/virt-rescue.pod:309 ../resize/virt-resize.pod:724
1113 #: ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120
1114 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
1115 #: ../tools/virt-make-fs.pl:595 ../tools/virt-tar.pl:324
1116 #: ../tools/virt-win-reg.pl:796
1118 "This program is distributed in the hope that it will be useful, but WITHOUT "
1119 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
1120 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
1125 #: ../align/virt-alignment-scan.pod:364 ../cat/virt-cat.pod:270
1126 #: ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525
1127 #: ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:253
1128 #: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315
1129 #: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68
1130 #: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70
1131 #: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:417
1132 #: ../rescue/virt-rescue.pod:314 ../resize/virt-resize.pod:729
1133 #: ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125
1134 #: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
1135 #: ../tools/virt-make-fs.pl:600 ../tools/virt-tar.pl:329
1136 #: ../tools/virt-win-reg.pl:801
1138 "You should have received a copy of the GNU General Public License along with "
1139 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
1140 "Ave, Cambridge, MA 02139, USA."
1144 #: ../cat/virt-cat.pod:5
1145 msgid "virt-cat - Display files in a virtual machine"
1149 #: ../cat/virt-cat.pod:9
1152 " virt-cat [--options] -d domname file [file ...]\n"
1157 #: ../cat/virt-cat.pod:11
1160 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
1165 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15
1166 #: ../inspector/virt-inspector.pod:13
1171 #: ../cat/virt-cat.pod:15
1174 " virt-cat domname file\n"
1179 #: ../cat/virt-cat.pod:17
1182 " virt-cat disk.img file\n"
1187 #: ../cat/virt-cat.pod:21
1189 "C<virt-cat> is a command line tool to display the contents of C<file> where "
1190 "C<file> exists in the named virtual machine (or disk image)."
1194 #: ../cat/virt-cat.pod:24
1196 "Multiple filenames can be given, in which case they are concatenated "
1197 "together. Each filename must be a full path, starting at the root directory "
1198 "(starting with '/')."
1202 #: ../cat/virt-cat.pod:28
1204 "C<virt-cat> can be used to quickly view a file. To edit a file, use C<virt-"
1205 "edit>. For more complex cases you should look at the L<guestfish(1)> tool "
1206 "(see L</USING GUESTFISH> below)."
1210 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43
1211 #: ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41
1212 #: ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29
1213 #: ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30
1214 #: ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39
1215 #: ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75
1216 #: ../tools/virt-tar.pl:50
1221 #: ../cat/virt-cat.pod:34
1223 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
1227 #: ../cat/virt-cat.pod:37
1230 " virt-cat -d mydomain /etc/fstab\n"
1235 #: ../cat/virt-cat.pod:39
1236 msgid "List syslog messages from a VM disk image file:"
1240 #: ../cat/virt-cat.pod:41
1243 " virt-cat -a disk.img /var/log/messages | tail\n"
1248 #: ../cat/virt-cat.pod:43
1249 msgid "Find out what DHCP IP address a VM acquired:"
1253 #: ../cat/virt-cat.pod:45
1256 " virt-cat -d mydomain /var/log/messages | \\\n"
1257 " grep 'dhclient: bound to' | tail\n"
1262 #: ../cat/virt-cat.pod:48
1263 msgid "Find out what packages were recently installed:"
1267 #: ../cat/virt-cat.pod:50
1270 " virt-cat -d mydomain /var/log/yum.log | tail\n"
1275 #: ../cat/virt-cat.pod:52
1276 msgid "Find out who is logged on inside a virtual machine:"
1280 #: ../cat/virt-cat.pod:54
1283 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
1289 #: ../cat/virt-cat.pod:57
1290 msgid "or who was logged on:"
1294 #: ../cat/virt-cat.pod:59
1297 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
1298 " last -f /tmp/wtmp\n"
1303 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103
1304 #: ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74
1305 #: ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
1307 "Add I<file> which should be a disk image from a virtual machine. If the "
1308 "virtual machine has multiple block devices, you must supply all of them with "
1309 "separate I<-a> options."
1313 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148
1314 #: ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217
1315 #: ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
1316 msgid "B<--echo-keys>"
1320 #: ../cat/virt-cat.pod:100
1322 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
1323 "so you cannot see what you are typing. If you are not worried about Tempest "
1324 "attacks and there is no one else in the room you can specify this flag to "
1325 "see what you are typing."
1329 #: ../cat/virt-cat.pod:116
1332 " virt-cat --format=raw -a disk.img file\n"
1337 #: ../cat/virt-cat.pod:120
1340 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
1345 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200
1346 #: ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289
1347 #: ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
1348 msgid "B<--keys-from-stdin>"
1352 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202
1353 #: ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291
1354 #: ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1356 "Read key or passphrase parameters from stdin. The default is to try to read "
1357 "passphrases from the user by opening C</dev/tty>."
1361 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
1362 #: ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:209
1363 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1367 #: ../cat/virt-cat.pod:154
1368 msgid "Previous versions of virt-cat allowed you to write either:"
1372 #: ../cat/virt-cat.pod:156
1375 " virt-cat disk.img [disk.img ...] file\n"
1380 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
1381 #: ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:215
1386 #: ../cat/virt-cat.pod:160
1389 " virt-cat guestname file\n"
1394 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
1395 #: ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:219
1397 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1398 "the confusing case where a disk image might have the same name as a guest."
1402 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
1403 #: ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:223
1404 msgid "For compatibility the old style is still supported."
1408 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
1409 msgid "WINDOWS PATHS"
1413 #: ../cat/virt-cat.pod:170
1415 "C<virt-cat> has a limited ability to understand Windows drive letters and "
1416 "paths (eg. C<E:\\foo\\bar.txt>)."
1420 #: ../cat/virt-cat.pod:173 ../edit/virt-edit.pod:262
1421 msgid "If and only if the guest is running Windows then:"
1425 #: ../cat/virt-cat.pod:179 ../edit/virt-edit.pod:268
1427 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
1428 "to the correct filesystem."
1432 #: ../cat/virt-cat.pod:184 ../edit/virt-edit.pod:273
1434 "Any backslash (C<\\>) characters in the path are replaced with forward "
1435 "slashes so that libguestfs can process it."
1439 #: ../cat/virt-cat.pod:189
1441 "The path is resolved case insensitively to locate the file that should be "
1446 #: ../cat/virt-cat.pod:194 ../edit/virt-edit.pod:283
1447 msgid "There are some known shortcomings:"
1451 #: ../cat/virt-cat.pod:200 ../edit/virt-edit.pod:289
1452 msgid "Some NTFS symbolic links may not be followed correctly."
1456 #: ../cat/virt-cat.pod:204 ../edit/virt-edit.pod:293
1457 msgid "NTFS junction points that cross filesystems are not followed."
1461 #: ../cat/virt-cat.pod:208 ../edit/virt-edit.pod:297
1462 msgid "USING GUESTFISH"
1466 #: ../cat/virt-cat.pod:210
1468 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1469 "C<virt-cat> doesn't work."
1473 #: ../cat/virt-cat.pod:213
1474 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1478 #: ../cat/virt-cat.pod:215
1481 " guestfish --ro -i -d domname download file -\n"
1486 #: ../cat/virt-cat.pod:217
1488 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1489 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1493 #: ../cat/virt-cat.pod:221
1495 "The command above uses libguestfs's guest inspection feature and so does not "
1496 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1497 "disk images that don't contain guests. To display a file from a disk image "
1502 #: ../cat/virt-cat.pod:226
1505 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1510 #: ../cat/virt-cat.pod:228
1512 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1513 "the disk image, and C<file> is the full path to the file."
1517 #: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382
1518 #: ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351
1519 #: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:377
1520 #: ../resize/virt-resize.pod:685 ../sparsify/virt-sparsify.pod:229
1522 "This program returns 0 if successful, or non-zero if there was an error."
1526 #: ../cat/virt-cat.pod:245
1528 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, L<virt-"
1529 "tar-out(1)>, L<http://libguestfs.org/>."
1533 #: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:405
1534 #: ../resize/virt-resize.pod:717 ../tools/virt-make-fs.pl:588
1535 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1539 #: ../cat/virt-filesystems.pod:5
1541 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1542 "virtual machine or disk image"
1546 #: ../cat/virt-filesystems.pod:9
1549 " virt-filesystems [--options] -d domname\n"
1554 #: ../cat/virt-filesystems.pod:11
1557 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1562 #: ../cat/virt-filesystems.pod:15
1564 "This tool allows you to discover filesystems, partitions, logical volumes, "
1565 "and their sizes in a disk image or virtual machine. It is a replacement for "
1566 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1570 #: ../cat/virt-filesystems.pod:20
1572 "One use for this tool is from shell scripts to iterate over all filesystems "
1573 "from a disk image:"
1577 #: ../cat/virt-filesystems.pod:23
1580 " for fs in $(virt-filesystems -a disk.img); do\n"
1587 #: ../cat/virt-filesystems.pod:27
1589 "Another use is to list partitions before using another tool to modify those "
1590 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1591 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1595 #: ../cat/virt-filesystems.pod:32
1597 "Various command line options control what this program displays. You need "
1598 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1599 "guest respectively. If you just specify that then the program shows "
1600 "filesystems found, one per line, like this:"
1604 #: ../cat/virt-filesystems.pod:37
1607 " $ virt-filesystems -a disk.img\n"
1609 " /dev/vg_guest/lv_root\n"
1614 #: ../cat/virt-filesystems.pod:41
1616 "If you add I<-l> or I<--long> then the output includes extra information:"
1620 #: ../cat/virt-filesystems.pod:44
1623 " $ virt-filesystems -a disk.img -l\n"
1624 " Name Type VFS Label Size\n"
1625 " /dev/sda1 filesystem ext4 boot 524288000\n"
1626 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1631 #: ../cat/virt-filesystems.pod:49
1633 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1638 #: ../cat/virt-filesystems.pod:52
1641 " $ virt-filesystems -a disk.img --extra\n"
1643 " /dev/vg_guest/lv_root\n"
1644 " /dev/vg_guest/lv_swap\n"
1645 " /dev/vg_guest/lv_data\n"
1650 #: ../cat/virt-filesystems.pod:58
1652 "If you add I<--partitions> then partitions are shown instead of filesystems:"
1656 #: ../cat/virt-filesystems.pod:60
1659 " $ virt-filesystems -a disk.img --partitions\n"
1666 #: ../cat/virt-filesystems.pod:64
1668 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, I<--physical-"
1669 "volumes>, I<--block-devices> to list those items."
1673 #: ../cat/virt-filesystems.pod:67
1675 "You can use these options in combination as well (if you want a combination "
1676 "including filesystems, you have to add I<--filesystems>). Notice that some "
1677 "items fall into several categories (eg. C</dev/sda1> might be both a "
1678 "partition and a filesystem). These items are listed several times. To get "
1679 "a list which includes absolutely everything that virt-filesystems knows "
1680 "about, use the I<--all> option."
1684 #: ../cat/virt-filesystems.pod:74
1686 "UUIDs (because they are quite long) are not shown by default. Add the I<--"
1687 "uuid> option to display device and filesystem UUIDs in the long output."
1691 #: ../cat/virt-filesystems.pod:78
1693 "I<--all --long --uuid> is a useful combination to display all possible "
1694 "information about everything."
1698 #: ../cat/virt-filesystems.pod:81
1701 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1702 " Name Type VFS Label Size Parent UUID\n"
1703 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1704 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1705 " /dev/sda1 partition - - 100M /dev/sda -\n"
1706 " /dev/sda2 partition - - 20G /dev/sda -\n"
1707 " /dev/sda device - - 20G - -\n"
1712 #: ../cat/virt-filesystems.pod:89
1714 "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1718 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1723 #: ../cat/virt-filesystems.pod:112
1725 "Display everything. This is currently the same as specifying these options: "
1726 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, I<--"
1727 "logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may be "
1728 "added to this list in future)."
1732 #: ../cat/virt-filesystems.pod:117
1733 msgid "See also I<--long>."
1737 #: ../cat/virt-filesystems.pod:119
1738 msgid "B<--blkdevs>"
1742 #: ../cat/virt-filesystems.pod:121
1743 msgid "B<--block-devices>"
1747 #: ../cat/virt-filesystems.pod:123
1748 msgid "Display block devices."
1752 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1757 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1759 "Write out the results in CSV format (comma-separated values). This format "
1760 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1761 "ABOUT CSV FORMAT> below."
1765 #: ../cat/virt-filesystems.pod:150
1767 "When prompting for keys and passphrases, virt-filesystems normally turns "
1768 "echoing off so you cannot see what you are typing. If you are not worried "
1769 "about Tempest attacks and there is no one else in the room you can specify "
1770 "this flag to see what you are typing."
1774 #: ../cat/virt-filesystems.pod:155
1779 #: ../cat/virt-filesystems.pod:157
1781 "This causes filesystems that are not ordinary, mountable filesystems to be "
1782 "displayed. This category includes swapspace, and filesystems that are empty "
1783 "or contain unknown data."
1787 #: ../cat/virt-filesystems.pod:161
1788 msgid "This option implies I<--filesystems>."
1792 #: ../cat/virt-filesystems.pod:163
1793 msgid "B<--filesystems>"
1797 #: ../cat/virt-filesystems.pod:165
1799 "Display mountable filesystems. If no display option was selected then this "
1800 "option is implied."
1804 #: ../cat/virt-filesystems.pod:168
1805 msgid "With I<--extra>, non-mountable filesystems are shown too."
1809 #: ../cat/virt-filesystems.pod:181
1812 " virt-filesystems --format=raw -a disk.img\n"
1817 #: ../cat/virt-filesystems.pod:185
1820 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1825 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352
1826 #: ../df/virt-df.pod:125 ../fish/guestfish.pod:156
1827 #: ../tools/virt-list-partitions.pl:109
1832 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354
1833 #: ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1834 msgid "B<--human-readable>"
1838 #: ../cat/virt-filesystems.pod:198
1839 msgid "In I<--long> mode, display sizes in human-readable format."
1843 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366
1844 #: ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1849 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368
1850 #: ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1855 #: ../cat/virt-filesystems.pod:209
1856 msgid "Display extra columns of data (\"long format\")."
1860 #: ../cat/virt-filesystems.pod:211
1861 msgid "A title row is added unless you also specify I<--no-title>."
1865 #: ../cat/virt-filesystems.pod:213
1867 "The extra columns displayed depend on what output you select, and the "
1868 "ordering of columns may change in future versions. Use the title row, I<--"
1869 "csv> output and/or L<csvtool(1)> to match columns to data in external "
1874 #: ../cat/virt-filesystems.pod:218
1876 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1877 "default is to show raw numbers of I<bytes>."
1881 #: ../cat/virt-filesystems.pod:221
1882 msgid "Use I<--uuid> to display UUIDs too."
1886 #: ../cat/virt-filesystems.pod:223
1891 #: ../cat/virt-filesystems.pod:225
1892 msgid "B<--logvols>"
1896 #: ../cat/virt-filesystems.pod:227
1897 msgid "B<--logical-volumes>"
1901 #: ../cat/virt-filesystems.pod:229
1903 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1904 "of whether the LVs contain filesystems."
1908 #: ../cat/virt-filesystems.pod:232
1909 msgid "B<--no-title>"
1913 #: ../cat/virt-filesystems.pod:234
1914 msgid "In I<--long> mode, don't add a title row."
1918 #: ../cat/virt-filesystems.pod:236
1920 "Note that the order of the columns is not fixed, and may change in future "
1921 "versions of virt-filesystems, so using this option may give you unexpected "
1926 #: ../cat/virt-filesystems.pod:240
1931 #: ../cat/virt-filesystems.pod:242
1932 msgid "B<--partitions>"
1936 #: ../cat/virt-filesystems.pod:244
1938 "Display partitions. In this mode, these are displayed irrespective of "
1939 "whether the partitions contain filesystems."
1943 #: ../cat/virt-filesystems.pod:247
1948 #: ../cat/virt-filesystems.pod:249
1949 msgid "B<--physvols>"
1953 #: ../cat/virt-filesystems.pod:251
1954 msgid "B<--physical-volumes>"
1958 #: ../cat/virt-filesystems.pod:253
1959 msgid "Display LVM physical volumes."
1963 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1968 #: ../cat/virt-filesystems.pod:257
1973 #: ../cat/virt-filesystems.pod:259
1974 msgid "In I<--long> mode, display UUIDs as well."
1978 #: ../cat/virt-filesystems.pod:273
1983 #: ../cat/virt-filesystems.pod:275
1984 msgid "B<--volgroups>"
1988 #: ../cat/virt-filesystems.pod:277
1989 msgid "B<--volume-groups>"
1993 #: ../cat/virt-filesystems.pod:279
1994 msgid "Display LVM volume groups."
1998 #: ../cat/virt-filesystems.pod:287
2003 #: ../cat/virt-filesystems.pod:289
2005 "Note that columns in the output are subject to reordering and change in "
2006 "future versions of this tool."
2010 #: ../cat/virt-filesystems.pod:294
2015 #: ../cat/virt-filesystems.pod:296
2016 msgid "The filesystem, partition, block device or LVM name."
2020 #: ../cat/virt-filesystems.pod:298
2022 "For device and partition names these are displayed as canonical libguestfs "
2023 "names, so that for example C</dev/sda2> is the second partition on the first "
2028 #: ../cat/virt-filesystems.pod:302
2030 "If the I<--long> option is B<not> specified, then only the name column is "
2031 "shown in the output."
2035 #: ../cat/virt-filesystems.pod:305
2040 #: ../cat/virt-filesystems.pod:307
2041 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
2045 #: ../cat/virt-filesystems.pod:309
2050 #: ../cat/virt-filesystems.pod:311
2052 "If there is a filesystem, then this column displays the filesystem type if "
2053 "one could be detected, eg. C<ext4>."
2057 #: ../cat/virt-filesystems.pod:314
2062 #: ../cat/virt-filesystems.pod:316
2064 "If the object has a label (used for identifying and mounting filesystems) "
2065 "then this column contains the label."
2069 #: ../cat/virt-filesystems.pod:319
2074 #: ../cat/virt-filesystems.pod:321
2076 "The partition type byte, displayed as a two digit hexadecimal number. A "
2077 "comprehensive list of partition types can be found here: L<http://www.win."
2078 "tue.nl/~aeb/partitions/partition_types-1.html>"
2082 #: ../cat/virt-filesystems.pod:325
2083 msgid "This is only applicable for DOS (MBR) partitions."
2087 #: ../cat/virt-filesystems.pod:327
2092 #: ../cat/virt-filesystems.pod:329
2094 "The size of the object in bytes. If the I<--human> option is used then the "
2095 "size is displayed in a human-readable form."
2099 #: ../cat/virt-filesystems.pod:332
2104 #: ../cat/virt-filesystems.pod:334
2106 "The parent column records the parent relationship between objects. For "
2107 "example, if the object is a partition, then this column contains the name of "
2108 "the containing device. If the object is a logical volume, then this column "
2109 "is the name of the volume group."
2113 #: ../cat/virt-filesystems.pod:339
2118 #: ../cat/virt-filesystems.pod:341
2120 "If the object has a UUID (used for identifying and mounting filesystems and "
2121 "block devices) then this column contains the UUID as a string."
2125 #: ../cat/virt-filesystems.pod:345
2126 msgid "The UUID is only displayed if the I<--uuid> option is given."
2130 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:459
2131 #: ../df/virt-df.pod:191
2132 msgid "NOTE ABOUT CSV FORMAT"
2136 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:461
2137 #: ../df/virt-df.pod:193
2139 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
2140 "should be easy to parse, but it is definitely not easy to parse."
2144 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:464
2145 #: ../df/virt-df.pod:196
2147 "Myth: Just split fields at commas. Reality: This does I<not> work "
2148 "reliably. This example has two columns:"
2152 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:467
2153 #: ../df/virt-df.pod:199
2156 " \"foo,bar\",baz\n"
2161 #: ../cat/virt-filesystems.pod:359 ../cat/virt-ls.pod:469
2162 #: ../df/virt-df.pod:201
2164 "Myth: Read the file one line at a time. Reality: This does I<not> work "
2165 "reliably. This example has one row:"
2169 #: ../cat/virt-filesystems.pod:362 ../cat/virt-ls.pod:472
2170 #: ../df/virt-df.pod:204
2179 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:475
2180 #: ../df/virt-df.pod:207
2182 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
2183 "packaged in major Linux distributions)."
2187 #: ../cat/virt-filesystems.pod:368 ../cat/virt-ls.pod:478
2188 #: ../df/virt-df.pod:210
2190 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
2191 "or Python's built-in csv library)."
2195 #: ../cat/virt-filesystems.pod:371 ../cat/virt-ls.pod:481
2196 #: ../df/virt-df.pod:213
2197 msgid "Most spreadsheets and databases can import CSV directly."
2201 #: ../cat/virt-filesystems.pod:387
2203 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-list-"
2204 "filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, L<http://"
2209 #: ../cat/virt-filesystems.pod:402 ../tools/virt-win-reg.pl:789
2210 msgid "Copyright (C) 2010 Red Hat Inc."
2214 #: ../cat/virt-ls.pod:5
2215 msgid "virt-ls - List files in a virtual machine"
2219 #: ../cat/virt-ls.pod:9
2222 " virt-ls [--options] -d domname directory [directory ...]\n"
2227 #: ../cat/virt-ls.pod:11
2230 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory ...]\n"
2235 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
2240 #: ../cat/virt-ls.pod:15
2243 " virt-ls [--options] domname directory\n"
2248 #: ../cat/virt-ls.pod:17
2251 " virt-ls [--options] disk.img [disk.img ...] directory\n"
2256 #: ../cat/virt-ls.pod:21
2258 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
2259 "more from a virtual machine or disk image."
2263 #: ../cat/virt-ls.pod:24
2265 "Multiple directory names can be given, in which case the output from each is "
2270 #: ../cat/virt-ls.pod:27
2272 "To list directories from a libvirt guest use the I<-d> option to specify the "
2273 "name of the guest. For a disk image, use the I<-a> option."
2277 #: ../cat/virt-ls.pod:31
2279 "C<virt-ls> can do many simple file listings. For more complicated cases you "
2280 "may need to use L<guestfish(1)>, or write a program directly to the L<guestfs"
2285 #: ../cat/virt-ls.pod:37
2286 msgid "Get a list of all files and directories in a virtual machine:"
2290 #: ../cat/virt-ls.pod:39
2293 " virt-ls -R -d guest /\n"
2298 #: ../cat/virt-ls.pod:41
2299 msgid "List all setuid or setgid programs in a Linux virtual machine:"
2303 #: ../cat/virt-ls.pod:43
2306 " virt-ls -lR -d guest / | grep '^- [42]'\n"
2311 #: ../cat/virt-ls.pod:45
2312 msgid "List all public-writable directories in a Linux virtual machine:"
2316 #: ../cat/virt-ls.pod:47
2319 " virt-ls -lR -d guest / | grep '^d ...7'\n"
2324 #: ../cat/virt-ls.pod:49
2325 msgid "List all Unix domain sockets in a Linux virtual machine:"
2329 #: ../cat/virt-ls.pod:51
2332 " virt-ls -lR -d guest / | grep '^s'\n"
2337 #: ../cat/virt-ls.pod:53
2338 msgid "List all regular files with filenames ending in '.png':"
2342 #: ../cat/virt-ls.pod:55
2345 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
2350 #: ../cat/virt-ls.pod:57
2351 msgid "To display files larger than 10MB in home directories:"
2355 #: ../cat/virt-ls.pod:59
2358 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
2363 #: ../cat/virt-ls.pod:61
2364 msgid "Find everything modified in the last 7 days:"
2368 #: ../cat/virt-ls.pod:63
2371 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
2376 #: ../cat/virt-ls.pod:65
2377 msgid "Find regular files modified in the last 24 hours:"
2381 #: ../cat/virt-ls.pod:67
2384 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2389 #: ../cat/virt-ls.pod:69
2390 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2394 #: ../cat/virt-ls.pod:71
2396 "Find the differences between files in a guest and an earlier snapshot of the "
2401 #: ../cat/virt-ls.pod:74
2404 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2405 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2406 " diff -u old new | less\n"
2411 #: ../cat/virt-ls.pod:78
2413 "The commands above won't find files where the content has changed but the "
2414 "metadata (eg. file size and modification date) is the same. To do that, you "
2415 "need to add the I<--checksum> parameter to both C<virt-ls> commands. I<--"
2416 "checksum> can be quite slow since it has to read and compute a checksum of "
2417 "every regular file in the virtual machine."
2421 #: ../cat/virt-ls.pod:84
2422 msgid "OUTPUT MODES"
2426 #: ../cat/virt-ls.pod:86
2428 "C<virt-ls> has four output modes, controlled by different combinations of "
2429 "the I<-l> and I<-R> options."
2433 #: ../cat/virt-ls.pod:89
2434 msgid "SIMPLE LISTING"
2438 #: ../cat/virt-ls.pod:91
2439 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2443 #: ../cat/virt-ls.pod:93
2446 " $ virt-ls -d guest /\n"
2454 #: ../cat/virt-ls.pod:98
2455 msgid "LONG LISTING"
2459 #: ../cat/virt-ls.pod:100
2461 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2462 "(more specifically, like the C<guestfs_ll> function)."
2466 #: ../cat/virt-ls.pod:103
2469 " $ virt-ls -l -d guest /\n"
2471 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2472 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2478 #: ../cat/virt-ls.pod:109
2480 "Note that while this is useful for displaying a directory, do not try "
2481 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2486 #: ../cat/virt-ls.pod:113
2487 msgid "RECURSIVE LISTING"
2491 #: ../cat/virt-ls.pod:115
2493 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2494 "and directories recursively:"
2498 #: ../cat/virt-ls.pod:118
2501 " $ virt-ls -R -d guest /tmp\n"
2509 #: ../cat/virt-ls.pod:123
2511 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2512 "converts C<\\0> characters to C<\\n>."
2516 #: ../cat/virt-ls.pod:126
2517 msgid "RECURSIVE LONG LISTING"
2521 #: ../cat/virt-ls.pod:128
2523 "Using I<-lR> options together changes the output to display directories "
2524 "recursively, with file stats, and optionally other features such as "
2525 "checksums and extended attributes."
2529 #: ../cat/virt-ls.pod:132
2531 "Most of the interesting features of C<virt-ls> are only available when using "
2536 #: ../cat/virt-ls.pod:135
2538 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2539 "you cannot use the output in another program (because filenames can contain "
2540 "spaces and other unsafe characters). If the guest was untrusted and someone "
2541 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2542 "on you by creating filenames with embedded newline characters. To B<safely> "
2543 "parse the output in another program, use the I<--csv> (Comma-Separated "
2548 #: ../cat/virt-ls.pod:143
2550 "Note that this output format is completely unrelated to the C<ls -lR> "
2555 #: ../cat/virt-ls.pod:146
2558 " $ virt-ls -lR -d guest /bin\n"
2559 " d 0555 4096 /bin\n"
2560 " - 0755 123 /bin/alsaunmute\n"
2561 " - 0755 28328 /bin/arch\n"
2562 " l 0777 4 /bin/awk -> gawk\n"
2563 " - 0755 27216 /bin/basename\n"
2564 " - 0755 943360 /bin/bash\n"
2570 #: ../cat/virt-ls.pod:155
2571 msgid "These basic fields are always shown:"
2575 #: ../cat/virt-ls.pod:159
2580 #: ../cat/virt-ls.pod:161
2582 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2583 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2584 "link), C<s> (socket) or C<u> (unknown)."
2588 #: ../cat/virt-ls.pod:171
2593 #: ../cat/virt-ls.pod:173
2594 msgid "The Unix permissions, displayed as a 4 digit octal number."
2598 #: ../cat/virt-ls.pod:175
2603 #: ../cat/virt-ls.pod:177
2605 "The size of the file. This is shown in bytes unless I<-h> or I<--human-"
2606 "readable> option is given, in which case this is shown as a human-readable "
2611 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4395
2616 #: ../cat/virt-ls.pod:183
2617 msgid "The full path of the file or directory."
2621 #: ../cat/virt-ls.pod:185
2626 #: ../cat/virt-ls.pod:187
2627 msgid "For symbolic links only, the link target."
2631 #: ../cat/virt-ls.pod:191
2633 "In I<-lR> mode, additional command line options enable the display of more "
2638 #: ../cat/virt-ls.pod:194
2640 "With the I<--uids> flag, these additional fields are displayed before the "
2645 #: ../cat/virt-ls.pod:199
2650 #: ../cat/virt-ls.pod:201
2655 #: ../cat/virt-ls.pod:203
2657 "The UID and GID of the owner of the file (displayed numerically). Note "
2658 "these only make sense in the context of a Unix-like guest."
2662 #: ../cat/virt-ls.pod:208
2663 msgid "With the I<--times> flag, these additional fields are displayed:"
2667 #: ../cat/virt-ls.pod:212
2672 #: ../cat/virt-ls.pod:214
2673 msgid "The time of last access."
2677 #: ../cat/virt-ls.pod:216
2682 #: ../cat/virt-ls.pod:218
2683 msgid "The time of last modification."
2687 #: ../cat/virt-ls.pod:220
2692 #: ../cat/virt-ls.pod:222
2693 msgid "The time of last status change."
2697 #: ../cat/virt-ls.pod:226
2699 "The time fields are displayed as string dates and times, unless one of the "
2700 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2704 #: ../cat/virt-ls.pod:229
2705 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2709 #: ../cat/virt-ls.pod:233
2714 #: ../cat/virt-ls.pod:235
2716 "The device containing the file (displayed as major:minor). This may not "
2717 "match devices as known to the guest."
2721 #: ../cat/virt-ls.pod:238
2726 #: ../cat/virt-ls.pod:240
2727 msgid "The inode number."
2731 #: ../cat/virt-ls.pod:242
2736 #: ../cat/virt-ls.pod:244
2737 msgid "The number of hard links."
2741 #: ../cat/virt-ls.pod:246
2746 #: ../cat/virt-ls.pod:248
2748 "For block and char special files, the device (displayed as major:minor)."
2752 #: ../cat/virt-ls.pod:251
2757 #: ../cat/virt-ls.pod:253
2758 msgid "The number of 512 byte blocks allocated to the file."
2762 #: ../cat/virt-ls.pod:257
2764 "With the I<--checksum> flag, the checksum of the file contents is shown "
2765 "(only for regular files). Computing file checksums can take a considerable "
2770 #: ../cat/virt-ls.pod:280
2771 msgid "B<--checksum>"
2775 #: ../cat/virt-ls.pod:282
2776 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2780 #: ../cat/virt-ls.pod:284
2782 "Display checksum over file contents for regular files. With no argument, "
2783 "this defaults to using I<md5>. Using an argument, you can select the "
2784 "checksum type to use."
2788 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358
2789 #: ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408
2790 #: ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2792 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2797 #: ../cat/virt-ls.pod:316
2799 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2800 "so you cannot see what you are typing. If you are not worried about Tempest "
2801 "attacks and there is no one else in the room you can specify this flag to "
2802 "see what you are typing."
2806 #: ../cat/virt-ls.pod:321
2807 msgid "B<--extra-stats>"
2811 #: ../cat/virt-ls.pod:323
2812 msgid "Display extra stats."
2816 #: ../cat/virt-ls.pod:339
2819 " virt-ls --format=raw -a disk.img /dir\n"
2824 #: ../cat/virt-ls.pod:343
2827 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2832 #: ../cat/virt-ls.pod:356
2833 msgid "Display file sizes in human-readable format."
2837 #: ../cat/virt-ls.pod:370
2842 #: ../cat/virt-ls.pod:372
2843 msgid "B<--recursive>"
2847 #: ../cat/virt-ls.pod:374
2849 "Select the mode. With neither of these options, C<virt-ls> produces a "
2850 "simple, flat list of the files in the named directory. See L</SIMPLE "
2855 #: ../cat/virt-ls.pod:378
2857 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See L</"
2862 #: ../cat/virt-ls.pod:381
2864 "C<virt-ls -R> produces a recursive list of files starting at the named "
2865 "directory. See L</RECURSIVE LISTING>."
2869 #: ../cat/virt-ls.pod:384
2871 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2872 "parsed. See L</RECURSIVE LONG LISTING>."
2876 #: ../cat/virt-ls.pod:387
2881 #: ../cat/virt-ls.pod:389
2882 msgid "Display time fields."
2886 #: ../cat/virt-ls.pod:394
2887 msgid "B<--time-days>"
2891 #: ../cat/virt-ls.pod:396
2892 msgid "Display time fields as days before now (negative if in the future)."
2896 #: ../cat/virt-ls.pod:398
2898 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2899 "of the file is between 0 and 86399 seconds."
2903 #: ../cat/virt-ls.pod:404
2904 msgid "B<--time-relative>"
2908 #: ../cat/virt-ls.pod:406
2909 msgid "Display time fields as seconds before now (negative if in the future)."
2913 #: ../cat/virt-ls.pod:411
2918 #: ../cat/virt-ls.pod:413
2919 msgid "Display time fields as seconds since the Unix epoch."
2923 #: ../cat/virt-ls.pod:418
2928 #: ../cat/virt-ls.pod:420
2929 msgid "Display UID and GID fields."
2933 #: ../cat/virt-ls.pod:445
2934 msgid "Previous versions of virt-ls allowed you to write either:"
2938 #: ../cat/virt-ls.pod:447
2941 " virt-ls disk.img [disk.img ...] /dir\n"
2946 #: ../cat/virt-ls.pod:451
2949 " virt-ls guestname /dir\n"
2954 #: ../cat/virt-ls.pod:497
2956 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-"
2957 "tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
2958 "L<http://libguestfs.org/>."
2962 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374
2963 #: ../rescue/virt-rescue.pod:302
2964 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2968 #: ../clone/virt-sysprep.pod:5
2970 "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2974 #: ../clone/virt-sysprep.pod:9
2977 " virt-sysprep [--options] -d domname\n"
2982 #: ../clone/virt-sysprep.pod:11
2985 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2990 #: ../clone/virt-sysprep.pod:15
2992 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2993 "can be made from it. Steps in this process include removing SSH host keys, "
2994 "removing persistent network MAC configuration, and removing user accounts. "
2995 "Each step can be enabled or disabled as required."
2999 #: ../clone/virt-sysprep.pod:21
3001 "Virt-sysprep is a simple shell script, allowing easy inspection or "
3002 "customization by the system administrator."
3006 #: ../clone/virt-sysprep.pod:24
3008 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
3009 "be shut down. If you want to preserve the existing contents of the guest, "
3010 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> below."
3014 #: ../clone/virt-sysprep.pod:29
3016 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
3017 "recommend that you don't. The time you might want to run it as root is when "
3018 "you need root in order to access the disk image, but even in this case it "
3019 "would be better to change the permissions on the disk image to be writable "
3020 "as the non-root user running virt-sysprep."
3024 #: ../clone/virt-sysprep.pod:35
3026 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
3027 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
3028 "machines in preparation for cloning them. Having said that, virt-sysprep "
3029 "does I<not> currently work on Microsoft Windows guests. We plan to support "
3030 "Windows sysprepping in a future version, and we already have code to do it."
3034 #: ../clone/virt-sysprep.pod:76
3035 msgid "B<--enable=...>"
3039 #: ../clone/virt-sysprep.pod:78
3041 "Choose which sysprep operations to perform. Give a comma-separated list of "
3042 "operations, for example:"
3046 #: ../clone/virt-sysprep.pod:81
3049 " --enable=ssh-hostkeys,udev-persistent-net\n"
3054 #: ../clone/virt-sysprep.pod:83
3056 "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
3060 #: ../clone/virt-sysprep.pod:85
3062 "If the I<--enable> option is not given, then we default to trying all "
3063 "possible sysprep operations. But some sysprep operations are skipped for "
3068 #: ../clone/virt-sysprep.pod:89
3070 "Use I<--list-operations> to list operations supported by a particular "
3071 "version of virt-sysprep."
3075 #: ../clone/virt-sysprep.pod:92
3077 "See L</OPERATIONS> below for a list and an explanation of each operation."
3081 #: ../clone/virt-sysprep.pod:106
3084 " virt-sysprep --format=raw -a disk.img\n"
3089 #: ../clone/virt-sysprep.pod:110
3092 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
3097 #: ../clone/virt-sysprep.pod:119
3098 msgid "B<--hostname> newhostname"
3102 #: ../clone/virt-sysprep.pod:121
3104 "Change the hostname. See the L</hostname> operation below. If not given, "
3105 "defaults to C<localhost.localdomain>."
3109 #: ../clone/virt-sysprep.pod:124
3110 msgid "B<--list-operations>"
3114 #: ../clone/virt-sysprep.pod:126
3115 msgid "List the operations supported by the virt-sysprep program."
3119 #: ../clone/virt-sysprep.pod:128
3120 msgid "B<--selinux-relabel>"
3124 #: ../clone/virt-sysprep.pod:130
3125 msgid "B<--no-selinux-relabel>"
3129 #: ../clone/virt-sysprep.pod:132
3131 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
3132 "I<--no-selinux-relabel> disables relabelling."
3136 #: ../clone/virt-sysprep.pod:135
3138 "The default is to try to detect if SELinux relabelling is required. See L</"
3139 "SELINUX RELABELLING> below for more details."
3143 #: ../clone/virt-sysprep.pod:156
3148 #: ../clone/virt-sysprep.pod:158
3150 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
3151 "enabled>, although some are skipped depending on the type of guest."
3155 #: ../clone/virt-sysprep.pod:162
3157 "Operations can be individually enabled using the I<--enable> option. Use a "
3158 "comma-separated list, for example:"
3162 #: ../clone/virt-sysprep.pod:165
3165 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
3170 #: ../clone/virt-sysprep.pod:167
3172 "To list the operations supported by the current version of virt-sysprep, use "
3173 "I<--list-operations>."
3177 #: ../clone/virt-sysprep.pod:170
3179 "Future versions of virt-sysprep may add more operations. If you are using "
3180 "virt-sysprep and want predictable behaviour, specify only the operations "
3181 "that you want to have enabled."
3185 #: ../clone/virt-sysprep.pod:174
3190 #: ../clone/virt-sysprep.pod:176
3191 msgid "Remove user at-jobs and cron-jobs."
3195 #: ../clone/virt-sysprep.pod:178
3196 msgid "dhcp-client-state"
3200 #: ../clone/virt-sysprep.pod:180
3201 msgid "Remove DHCP client leases."
3205 #: ../clone/virt-sysprep.pod:182
3206 msgid "dhcp-server-state"
3210 #: ../clone/virt-sysprep.pod:184
3211 msgid "Remove DHCP server leases."
3215 #: ../clone/virt-sysprep.pod:186
3220 #: ../clone/virt-sysprep.pod:188
3222 "Changes the hostname of the guest to the value given in the I<--hostname> "
3227 #: ../clone/virt-sysprep.pod:191
3229 "If the I<--hostname> parameter is not given, then the hostname is changed to "
3230 "C<localhost.localdomain>."
3234 #: ../clone/virt-sysprep.pod:194
3239 #: ../clone/virt-sysprep.pod:196
3240 msgid "Remove many log files."
3244 #: ../clone/virt-sysprep.pod:198
3249 #: ../clone/virt-sysprep.pod:200
3250 msgid "Remove email from the local mail spool directory."
3254 #: ../clone/virt-sysprep.pod:202
3259 #: ../clone/virt-sysprep.pod:204
3261 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
3262 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
3266 #: ../clone/virt-sysprep.pod:207
3271 #: ../clone/virt-sysprep.pod:209
3273 "Write some random bytes from the host into the random seed file of the guest."
3277 #: ../clone/virt-sysprep.pod:212
3278 msgid "See L</RANDOM SEED> below."
3282 #: ../clone/virt-sysprep.pod:214
3283 msgid "rhn-systemid"
3287 #: ../clone/virt-sysprep.pod:216
3288 msgid "Remove the RHN system ID."
3292 #: ../clone/virt-sysprep.pod:218
3297 #: ../clone/virt-sysprep.pod:220
3298 msgid "Remove the Smolt hardware UUID."
3302 #: ../clone/virt-sysprep.pod:222
3303 msgid "ssh-hostkeys"
3307 #: ../clone/virt-sysprep.pod:224
3308 msgid "Remove the SSH host keys in the guest."
3312 #: ../clone/virt-sysprep.pod:226
3314 "The SSH host keys are regenerated (differently) next time the guest is "
3319 #: ../clone/virt-sysprep.pod:229
3321 "If, after cloning, the guest gets the same IP address, ssh will give you a "
3322 "stark warning about the host key changing:"
3326 #: ../clone/virt-sysprep.pod:232
3329 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3330 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
3331 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3332 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
3337 #: ../clone/virt-sysprep.pod:237
3338 msgid "udev-persistent-net"
3342 #: ../clone/virt-sysprep.pod:239
3344 "Remove udev persistent net rules which map the guest's existing MAC address "
3345 "to a fixed ethernet device (eg. eth0)."
3349 #: ../clone/virt-sysprep.pod:242
3351 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
3352 "address occupies the old name (eg. eth0), this means the fresh MAC address "
3353 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
3354 "Erasing the udev persistent net rules avoids this."
3358 #: ../clone/virt-sysprep.pod:247
3363 #: ../clone/virt-sysprep.pod:249
3364 msgid "Remove the utmp file."
3368 #: ../clone/virt-sysprep.pod:251
3370 "This records who is currently logged in on a machine. In modern Linux "
3371 "distros it is stored in a ramdisk and hence not part of the virtual "
3372 "machine's disk, but it was stored on disk in older distros."
3376 #: ../clone/virt-sysprep.pod:255
3381 #: ../clone/virt-sysprep.pod:257
3382 msgid "Remove the yum UUID."
3386 #: ../clone/virt-sysprep.pod:259
3388 "Yum creates a fresh UUID the next time it runs when it notices that the "
3389 "original UUID has been erased."
3393 #: ../clone/virt-sysprep.pod:262
3394 msgid "COPYING AND CLONING"
3398 #: ../clone/virt-sysprep.pod:264
3400 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3401 "prepare a template from which guests can be cloned. There are many "
3402 "different ways to achieve this using the virt tools, and this section is "
3403 "just an introduction."
3407 #: ../clone/virt-sysprep.pod:269
3408 msgid "A virtual machine (when switched off) consists of two parts:"
3412 #: ../clone/virt-sysprep.pod:273
3413 msgid "I<configuration>"
3417 #: ../clone/virt-sysprep.pod:275
3419 "The configuration or description of the guest. eg. The libvirt XML (see "
3420 "C<virsh dumpxml>), the running configuration of the guest, or another "
3421 "external format like OVF."
3425 #: ../clone/virt-sysprep.pod:279
3426 msgid "Some configuration items that might need to be changed:"
3430 #: ../clone/virt-sysprep.pod:285
3435 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3440 #: ../clone/virt-sysprep.pod:293
3441 msgid "path to block device(s)"
3445 #: ../clone/virt-sysprep.pod:297
3446 msgid "network card MAC address"
3450 #: ../clone/virt-sysprep.pod:301
3451 msgid "I<block device(s)>"
3455 #: ../clone/virt-sysprep.pod:303
3457 "One or more hard disk images, themselves containing files, directories, "
3458 "applications, kernels, configuration, etc."
3462 #: ../clone/virt-sysprep.pod:306
3463 msgid "Some things inside the block devices that might need to be changed:"
3467 #: ../clone/virt-sysprep.pod:312
3468 msgid "hostname and other net configuration"
3472 #: ../clone/virt-sysprep.pod:320
3473 msgid "SSH host keys"
3477 #: ../clone/virt-sysprep.pod:324
3478 msgid "Windows unique security ID (SID)"
3482 #: ../clone/virt-sysprep.pod:328
3483 msgid "Puppet registration"
3487 #: ../clone/virt-sysprep.pod:334
3488 msgid "COPYING THE BLOCK DEVICE"
3492 #: ../clone/virt-sysprep.pod:336
3494 "Starting with an original guest, you probably wish to copy the guest block "
3495 "device and its configuration to make a template. Then once you are happy "
3496 "with the template, you will want to make many clones from it."
3500 #: ../clone/virt-sysprep.pod:341
3506 " original guest --------> template ---------->\n"
3507 " \\------> cloned\n"
3508 " \\-----> guests\n"
3514 #: ../clone/virt-sysprep.pod:349
3516 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3521 #: ../clone/virt-sysprep.pod:352
3525 " original guest --------> template ---------->\n"
3526 " \\------> cloned\n"
3527 " \\-----> guests\n"
3533 #: ../clone/virt-sysprep.pod:358
3534 msgid "There are some smarter (and faster) ways too:"
3538 #: ../clone/virt-sysprep.pod:364
3542 " template ---------->\n"
3543 " \\------> cloned\n"
3544 " \\-----> guests\n"
3550 #: ../clone/virt-sysprep.pod:370
3552 "Use the block device as a backing file and create a snapshot on top for each "
3553 "guest. The advantage is that you don't need to copy the block device (very "
3554 "fast) and only changes are stored (less storage required)."
3558 #: ../clone/virt-sysprep.pod:375
3560 "Note that writing to the backing file once you have created guests on top of "
3561 "it is not possible: you will corrupt the guests."
3565 #: ../clone/virt-sysprep.pod:378
3567 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 -"
3568 "o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3569 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3570 "also create cheap snapshots from files or LUNs."
3574 #: ../clone/virt-sysprep.pod:386
3575 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3579 #: ../clone/virt-sysprep.pod:390
3580 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3584 #: ../clone/virt-sysprep.pod:394
3589 #: ../clone/virt-sysprep.pod:396
3591 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3592 "and/or modify the external libvirt configuration of a guest. It will reset "
3593 "the name, UUID and MAC address of the guest in the libvirt XML."
3597 #: ../clone/virt-sysprep.pod:401
3599 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3600 "image. This was the original motivation to write virt-sysprep."
3604 #: ../clone/virt-sysprep.pod:404
3609 #: ../clone/virt-sysprep.pod:406
3613 " original guest --------> template\n"
3618 #: ../clone/virt-sysprep.pod:409
3620 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3621 "it easier to compress and/or faster to copy."
3625 #: ../clone/virt-sysprep.pod:412
3627 "Notice that since virt-sparsify also copies the image, you can use it to "
3628 "make the initial copy (instead of C<dd>)."
3632 #: ../clone/virt-sysprep.pod:415
3637 #: ../clone/virt-sysprep.pod:417
3641 " template ---------->\n"
3642 " \\------> cloned\n"
3643 " \\-----> guests\n"
3649 #: ../clone/virt-sysprep.pod:423
3651 "If you want to give people cloned guests, but let them pick the size of the "
3652 "guest themselves (eg. depending on how much they are prepared to pay for "
3653 "disk space), then instead of copying the template, you can run L<virt-resize"
3654 "(1)>. Virt-resize performs a copy and resize, and thus is ideal for cloning "
3655 "guests from a template."
3659 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3664 #: ../clone/virt-sysprep.pod:431
3666 "Although virt-sysprep removes some sensitive information from the guest, it "
3667 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3668 "above, and the implementation of the operations in the shell script. You "
3669 "should also examine the guest afterwards."
3673 #: ../clone/virt-sysprep.pod:436
3675 "Sensitive files are simply removed. The data they contained may still exist "
3676 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3677 "L<virt-sparsify(1)> as one way to remove this content. See also the L<scrub"
3678 "(1)> command to get rid of deleted content in directory entries and inodes."
3682 #: ../clone/virt-sysprep.pod:442
3687 #: ../clone/virt-sysprep.pod:444
3688 msgid "I<(This section applies to Linux guests only)>"
3692 #: ../clone/virt-sysprep.pod:446
3694 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3695 "from the host into the guest's random seed file."
3699 #: ../clone/virt-sysprep.pod:449
3701 "If this is just done once and the guest is cloned from the same template, "
3702 "then each guest will start with the same entropy, and things like SSH host "
3703 "keys and TCP sequence numbers may be predictable."
3707 #: ../clone/virt-sysprep.pod:453
3709 "Therefore you should arrange to add more randomness I<after> cloning from a "
3710 "template too, which can be done by just enabling the C<random-seed> "
3715 #: ../clone/virt-sysprep.pod:457
3718 " cp template.img newguest.img\n"
3719 " virt-sysprep --enable=random-seed -a newguest.img\n"
3724 #: ../clone/virt-sysprep.pod:460
3725 msgid "SELINUX RELABELLING"
3729 #: ../clone/virt-sysprep.pod:462
3730 msgid "I<(This section applies to Linux guests using SELinux only)>"
3734 #: ../clone/virt-sysprep.pod:464
3736 "If any new files are created by virt-sysprep, then virt-sysprep touches C</."
3737 "autorelabel> so that these will be correctly labelled by SELinux the next "
3738 "time the guest is booted. This process interrupts boot and can take some "
3743 #: ../clone/virt-sysprep.pod:469
3745 "You can force relabelling for all guests by supplying the I<--selinux-"
3750 #: ../clone/virt-sysprep.pod:472
3752 "You can disable relabelling entirely by supplying the I<--no-selinux-"
3757 #: ../clone/virt-sysprep.pod:484
3758 msgid "This program returns 0 on success, or 1 if there was an error."
3762 #: ../clone/virt-sysprep.pod:488
3764 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, L<virt-"
3765 "resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, L<qemu-img(1)"
3766 ">, L<scrub(1)>, L<http://libguestfs.org/>, L<http://libvirt.org/>."
3770 #: ../df/virt-df.pod:5
3771 msgid "virt-df - Display free space on virtual filesystems"
3775 #: ../df/virt-df.pod:9
3778 " virt-df [--options]\n"
3783 #: ../df/virt-df.pod:11
3786 " virt-df [--options] -d domname\n"
3791 #: ../df/virt-df.pod:13
3794 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3799 #: ../df/virt-df.pod:17
3802 " virt-df [--options] domname\n"
3807 #: ../df/virt-df.pod:19
3810 " virt-df [--options] disk.img [disk.img ...]\n"
3815 #: ../df/virt-df.pod:23
3817 "C<virt-df> is a command line tool to display free space on virtual machine "
3818 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3819 "allocated to a virtual machine, but can look inside disk images to see how "
3820 "much space is really being used."
3824 #: ../df/virt-df.pod:28
3826 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3827 "to get a list of all active and inactive guests, and performs a C<df>-type "
3828 "operation on each one in turn, printing out the results."
3832 #: ../df/virt-df.pod:32
3834 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a C<df>-"
3835 "type operation on either the single named libvirt domain, or on the disk "
3836 "image(s) listed on the command line (which must all belong to a single VM). "
3837 "In this mode (with arguments), C<virt-df> will I<only work for a single "
3838 "guest>. If you want to run on multiple guests, then you have to invoke "
3839 "C<virt-df> multiple times."
3843 #: ../df/virt-df.pod:39
3845 "Use the I<--csv> option to get a format which can be easily parsed by other "
3846 "programs. Other options are similar to the standard L<df(1)> command."
3850 #: ../df/virt-df.pod:45
3852 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3853 "output human-readable:"
3857 #: ../df/virt-df.pod:48
3860 " # virt-df -d F14x64 -h\n"
3861 " Filesystem Size Used Available Use%\n"
3862 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3863 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3868 #: ../df/virt-df.pod:53
3869 msgid "Show disk usage for a disk image file called C<test.img>:"
3873 #: ../df/virt-df.pod:55
3876 " $ virt-df -a test1.img\n"
3877 " Filesystem 1K-blocks Used Available Use%\n"
3878 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3883 #: ../df/virt-df.pod:112
3886 " virt-df --format=raw -a disk.img\n"
3891 #: ../df/virt-df.pod:116
3894 " virt-df --format=raw -a disk.img --format -a another.img\n"
3899 #: ../df/virt-df.pod:129
3900 msgid "Print sizes in human-readable format."
3904 #: ../df/virt-df.pod:131
3905 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3909 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3914 #: ../df/virt-df.pod:135
3919 #: ../df/virt-df.pod:137
3920 msgid "Print inodes instead of blocks."
3924 #: ../df/virt-df.pod:139
3925 msgid "B<--one-per-guest>"
3929 #: ../df/virt-df.pod:141
3931 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3932 "disks from several guests to a single libguestfs appliance."
3936 #: ../df/virt-df.pod:144
3937 msgid "You might use this option in the following circumstances:"
3941 #: ../df/virt-df.pod:150
3943 "If you think an untrusted guest might actively try to exploit the libguestfs "
3944 "appliance kernel, then this prevents one guest from interfering with the "
3945 "stats printed for another guest."
3949 #: ../df/virt-df.pod:156
3951 "If the kernel has a bug which stops it from accessing a filesystem in one "
3952 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3953 "and report stats for further guests."
3957 #: ../df/virt-df.pod:165
3959 "Print UUIDs instead of names. This is useful for following a guest even "
3960 "when the guest is migrated or renamed, or when two guests happen to have the "
3965 #: ../df/virt-df.pod:169
3967 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3968 "images, we still print the disk image name even when this option is "
3973 #: ../df/virt-df.pod:229
3975 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<http://"
3980 #: ../edit/virt-edit.pod:5
3981 msgid "virt-edit - Edit a file in a virtual machine"
3985 #: ../edit/virt-edit.pod:9
3988 " virt-edit [--options] -d domname file [file ...]\n"
3993 #: ../edit/virt-edit.pod:11
3996 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
4001 #: ../edit/virt-edit.pod:13
4004 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
4009 #: ../edit/virt-edit.pod:17
4012 " virt-edit domname file\n"
4017 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
4020 " virt-edit disk.img [disk.img ...] file\n"
4025 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23
4026 #: ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15
4027 #: ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19
4028 #: ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
4033 #: ../edit/virt-edit.pod:23
4035 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
4036 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
4037 "doing this, but doesn't catch all cases."
4041 #: ../edit/virt-edit.pod:29
4043 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
4044 "exists in the named virtual machine (or disk image)."
4048 #: ../edit/virt-edit.pod:32
4050 "Multiple filenames can be given, in which case they are each edited in "
4051 "turn. Each filename must be a full path, starting at the root directory "
4052 "(starting with '/')."
4056 #: ../edit/virt-edit.pod:36
4057 msgid "If you want to just view a file, use L<virt-cat(1)>."
4061 #: ../edit/virt-edit.pod:38
4063 "For more complex cases you should look at the L<guestfish(1)> tool (see L</"
4064 "USING GUESTFISH> below)."
4068 #: ../edit/virt-edit.pod:41
4070 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
4071 "that and much more."
4075 #: ../edit/virt-edit.pod:46
4076 msgid "Edit the named files interactively:"
4080 #: ../edit/virt-edit.pod:48
4083 " virt-edit -d mydomain /boot/grub/grub.conf\n"
4088 #: ../edit/virt-edit.pod:50
4091 " virt-edit -d mydomain /etc/passwd\n"
4096 #: ../edit/virt-edit.pod:52
4097 msgid "For Windows guests, some Windows paths are understood:"
4101 #: ../edit/virt-edit.pod:54
4104 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
4109 #: ../edit/virt-edit.pod:56
4111 "If Perl is installed, you can also edit files non-interactively (see L</NON-"
4112 "INTERACTIVE EDITING> below). To change the init default level to 5:"
4116 #: ../edit/virt-edit.pod:60
4119 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
4124 #: ../edit/virt-edit.pod:81
4125 msgid "B<-b> extension"
4129 #: ../edit/virt-edit.pod:83
4130 msgid "B<--backup> extension"
4134 #: ../edit/virt-edit.pod:85
4136 "Create a backup of the original file I<in the guest disk image>. The backup "
4137 "has the original filename with C<extension> added."
4141 #: ../edit/virt-edit.pod:88
4143 "Usually the first character of C<extension> would be a dot C<.> so you would "
4148 #: ../edit/virt-edit.pod:91
4151 " virt-edit -b .orig [etc]\n"
4156 #: ../edit/virt-edit.pod:93
4157 msgid "By default, no backup file is made."
4161 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181
4162 #: ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74
4163 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78
4164 #: ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
4169 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183
4170 #: ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76
4171 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
4172 #: ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
4173 msgid "B<--connect URI>"
4177 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84
4178 #: ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134
4179 #: ../tools/virt-win-reg.pl:135
4181 "If you specify guest block devices directly, then libvirt is not used at all."
4185 #: ../edit/virt-edit.pod:114
4187 "When prompting for keys and passphrases, virt-edit normally turns echoing "
4188 "off so you cannot see what you are typing. If you are not worried about "
4189 "Tempest attacks and there is no one else in the room you can specify this "
4190 "flag to see what you are typing."
4194 #: ../edit/virt-edit.pod:119
4199 #: ../edit/virt-edit.pod:121
4200 msgid "B<--expr> EXPR"
4204 #: ../edit/virt-edit.pod:123
4206 "Instead of launching the external editor, non-interactively apply the Perl "
4207 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
4212 #: ../edit/virt-edit.pod:127
4214 "Be careful to properly quote the expression to prevent it from being altered "
4219 #: ../edit/virt-edit.pod:130
4220 msgid "Note that this option is only available when Perl 5 is installed."
4224 #: ../edit/virt-edit.pod:132
4225 msgid "B<--format> raw|qcow2|..."
4229 #: ../edit/virt-edit.pod:143
4232 " virt-edit --format=raw -a disk.img file\n"
4237 #: ../edit/virt-edit.pod:147
4240 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
4245 #: ../edit/virt-edit.pod:181
4246 msgid "Previous versions of virt-edit allowed you to write either:"
4250 #: ../edit/virt-edit.pod:187
4253 " virt-edit guestname file\n"
4258 #: ../edit/virt-edit.pod:195
4259 msgid "NON-INTERACTIVE EDITING"
4263 #: ../edit/virt-edit.pod:197
4265 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
4266 "administrator can interactively edit the file."
4270 #: ../edit/virt-edit.pod:200
4272 "There are two ways also to use C<virt-edit> from scripts in order to make "
4273 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
4274 "like this, it's less error-prone to write scripts directly using the "
4275 "libguestfs API and Augeas for configuration file editing.)"
4279 #: ../edit/virt-edit.pod:206
4281 "The first method is to temporarily set C<$EDITOR> to any script or program "
4282 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
4283 "update C<tmpfile> in place however it likes."
4287 #: ../edit/virt-edit.pod:210
4289 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
4290 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
4291 "instances of C<foo> with C<bar> in a file:"
4295 #: ../edit/virt-edit.pod:214
4298 " virt-edit -d domname filename -e 's/foo/bar/'\n"
4303 #: ../edit/virt-edit.pod:216
4305 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
4306 "For example to delete root's password you could do:"
4310 #: ../edit/virt-edit.pod:219
4313 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
4318 #: ../edit/virt-edit.pod:221
4320 "What really happens is that the snippet is evaluated as a Perl expression "
4321 "for each line of the file. The line, including the final C<\\n>, is passed "
4322 "in C<$_> and the expression should update C<$_> or leave it unchanged."
4326 #: ../edit/virt-edit.pod:226
4328 "To delete a line, set C<$_> to the empty string. For example, to delete the "
4329 "C<apache> user account from the password file you can do:"
4333 #: ../edit/virt-edit.pod:229
4336 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
4341 #: ../edit/virt-edit.pod:231
4343 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4344 "the end of the file is rather difficult this way since there is no concept "
4345 "of \"last line of the file\" - your expression just doesn't get called "
4346 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4351 #: ../edit/virt-edit.pod:237
4353 "The variable C<$lineno> contains the current line number. As is "
4354 "traditional, the first line in the file is number C<1>."
4358 #: ../edit/virt-edit.pod:240
4360 "The return value from the expression is ignored, but the expression may call "
4361 "C<die> in order to abort the whole program, leaving the original file "
4366 #: ../edit/virt-edit.pod:244
4368 "Remember when matching the end of a line that C<$_> may contain the final C<"
4369 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4370 "newline then neither of these. Thus to match or substitute some text at the "
4371 "end of a line, use this regular expression:"
4375 #: ../edit/virt-edit.pod:249
4378 " /some text(\\r?\\n)?$/\n"
4383 #: ../edit/virt-edit.pod:251
4385 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
4386 "$_> itself (since that would remove all newlines from the file):"
4390 #: ../edit/virt-edit.pod:255
4393 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4398 #: ../edit/virt-edit.pod:259
4400 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4401 "paths (eg. C<E:\\foo\\bar.txt>)."
4405 #: ../edit/virt-edit.pod:278
4407 "The path is resolved case insensitively to locate the file that should be "
4412 #: ../edit/virt-edit.pod:299
4414 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4415 "C<virt-edit> doesn't work."
4419 #: ../edit/virt-edit.pod:302
4420 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4424 #: ../edit/virt-edit.pod:304
4427 " guestfish --rw -i -d domname edit /file\n"
4432 #: ../edit/virt-edit.pod:306
4434 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4439 #: ../edit/virt-edit.pod:309
4441 "The command above uses libguestfs's guest inspection feature and so does not "
4442 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4443 "disk images that don't contain guests. To edit a file on a disk image "
4448 #: ../edit/virt-edit.pod:314
4451 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4456 #: ../edit/virt-edit.pod:316
4458 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4459 "the disk image to edit, and C</file> is the full path to the file."
4463 #: ../edit/virt-edit.pod:320
4465 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4466 "C<write> or C<upload> instead:"
4470 #: ../edit/virt-edit.pod:323
4473 " guestfish --rw -i -d domname touch /newfile\n"
4478 #: ../edit/virt-edit.pod:325
4481 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4486 #: ../edit/virt-edit.pod:327
4489 " guestfish --rw -i -d domname upload localfile /newfile\n"
4494 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119
4495 #: ../rescue/virt-rescue.pod:261 ../sparsify/virt-sparsify.pod:232
4496 #: ../src/guestfs.pod:3209 ../test-tool/libguestfs-test-tool.pod:95
4497 msgid "ENVIRONMENT VARIABLES"
4501 #: ../edit/virt-edit.pod:333
4506 #: ../edit/virt-edit.pod:335
4508 "If set, this string is used as the editor. It may contain arguments, eg. C<"
4513 #: ../edit/virt-edit.pod:338
4514 msgid "If not set, C<vi> is used."
4518 #: ../edit/virt-edit.pod:356
4520 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-"
4521 "tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
4522 "L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4526 #: ../erlang/examples/guestfs-erlang.pod:5
4527 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4531 #: ../erlang/examples/guestfs-erlang.pod:9
4534 " {ok, G} = guestfs:create(),\n"
4535 " ok = guestfs:add_drive_opts(G, Disk,\n"
4536 " [{format, \"raw\"}, {readonly, true}]),\n"
4537 " ok = guestfs:launch(G),\n"
4538 " [Device] = guestfs:list_devices(G),\n"
4539 " ok = guestfs:close(G).\n"
4544 #: ../erlang/examples/guestfs-erlang.pod:18
4546 "This manual page documents how to call libguestfs from the Erlang "
4547 "programming language. This page just documents the differences from the C "
4548 "API and gives some examples. If you are not familiar with using libguestfs, "
4549 "you also need to read L<guestfs(3)>."
4553 #: ../erlang/examples/guestfs-erlang.pod:23
4554 msgid "OPENING AND CLOSING THE HANDLE"
4558 #: ../erlang/examples/guestfs-erlang.pod:25
4560 "The Erlang bindings are implemented using an external program called C<erl-"
4561 "guestfs>. This program must be on the current PATH, or else you should "
4562 "specify the full path to the program:"
4566 #: ../erlang/examples/guestfs-erlang.pod:29
4569 " {ok, G} = guestfs:create().\n"
4574 #: ../erlang/examples/guestfs-erlang.pod:31
4577 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4582 #: ../erlang/examples/guestfs-erlang.pod:33
4583 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4587 #: ../erlang/examples/guestfs-erlang.pod:36
4588 msgid "To close the handle:"
4592 #: ../erlang/examples/guestfs-erlang.pod:38
4595 " ok = guestfs:close(G).\n"
4600 #: ../erlang/examples/guestfs-erlang.pod:40
4601 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4605 #: ../erlang/examples/guestfs-erlang.pod:42
4607 "For functions that take optional arguments, the first arguments are the non-"
4608 "optional ones. The last argument is a list of tuples supplying the "
4609 "remaining optional arguments."
4613 #: ../erlang/examples/guestfs-erlang.pod:46
4616 " ok = guestfs:add_drive_opts(G, Disk,\n"
4617 " [{format, \"raw\"}, {readonly, true}]).\n"
4622 #: ../erlang/examples/guestfs-erlang.pod:49
4623 msgid "If the last argument would be an empty list, you can also omit it:"
4627 #: ../erlang/examples/guestfs-erlang.pod:51
4630 " ok = guestfs:add_drive_opts(G, Disk).\n"
4635 #: ../erlang/examples/guestfs-erlang.pod:53
4636 msgid "RETURN VALUES AND ERRORS"
4640 #: ../erlang/examples/guestfs-erlang.pod:55
4642 "On success, most functions return a C<Result> term (which could be a list, "
4643 "string, tuple etc.). If there is nothing for the function to return, then "
4644 "the atom C<ok> is returned."
4648 #: ../erlang/examples/guestfs-erlang.pod:59
4649 msgid "On error, you would see one of the following tuples:"
4653 #: ../erlang/examples/guestfs-erlang.pod:63
4654 msgid "C<{error, Msg, Errno}>"
4658 #: ../erlang/examples/guestfs-erlang.pod:65
4659 msgid "This indicates an ordinary error from the function."
4663 #: ../erlang/examples/guestfs-erlang.pod:67
4665 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4670 #: ../erlang/examples/guestfs-erlang.pod:70
4671 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4675 #: ../erlang/examples/guestfs-erlang.pod:72
4676 msgid "C<{unknown, Function}>"
4680 #: ../erlang/examples/guestfs-erlang.pod:74
4682 "This indicates that the function you called is not known. Generally this "
4683 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4684 "which you should not do."
4688 #: ../erlang/examples/guestfs-erlang.pod:78
4689 msgid "C<Function> is the name of the unknown function."
4693 #: ../erlang/examples/guestfs-erlang.pod:80
4694 msgid "C<{unknownarg, Arg}>"
4698 #: ../erlang/examples/guestfs-erlang.pod:82
4700 "This indicates that you called a function with optional arguments, with an "
4701 "unknown argument name."
4705 #: ../erlang/examples/guestfs-erlang.pod:85
4706 msgid "C<Arg> is the name of the unknown argument."
4710 #: ../erlang/examples/guestfs-erlang.pod:89
4711 #: ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37
4712 #: ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31
4713 #: ../python/examples/guestfs-python.pod:34
4714 #: ../ruby/examples/guestfs-ruby.pod:28
4715 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4719 #: ../erlang/examples/guestfs-erlang.pod:91
4720 #: ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39
4721 #: ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33
4722 #: ../python/examples/guestfs-python.pod:36
4723 #: ../ruby/examples/guestfs-ruby.pod:30
4728 #: ../erlang/examples/guestfs-erlang.pod:93
4729 #: ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41
4730 #: ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35
4731 #: ../python/examples/guestfs-python.pod:38
4732 #: ../ruby/examples/guestfs-ruby.pod:32
4733 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4737 #: ../erlang/examples/guestfs-erlang.pod:95
4738 #: ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43
4739 #: ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37
4740 #: ../python/examples/guestfs-python.pod:40
4741 #: ../ruby/examples/guestfs-ruby.pod:34
4746 #: ../erlang/examples/guestfs-erlang.pod:99
4748 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4749 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4750 "L<guestfs-ruby(3)>, L<http://www.erlang.org/>. L<http://libguestfs.org/>."
4754 #: ../erlang/examples/guestfs-erlang.pod:110
4755 #: ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397
4756 #: ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60
4757 #: ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58
4758 #: ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328
4759 #: ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58
4760 #: ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52
4761 #: ../python/examples/guestfs-python.pod:54
4762 #: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3348
4763 #: ../test-tool/libguestfs-test-tool.pod:106
4768 #: ../erlang/examples/guestfs-erlang.pod:112
4769 #: ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399
4770 #: ../fish/guestfish.pod:1298 ../fish/virt-copy-in.pod:62
4771 #: ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60
4772 #: ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:330
4773 #: ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93
4774 #: ../perl/examples/guestfs-perl.pod:54
4775 #: ../python/examples/guestfs-python.pod:56
4776 #: ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3350
4777 #: ../test-tool/libguestfs-test-tool.pod:108
4778 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4782 #: ../erlang/examples/guestfs-erlang.pod:116
4783 #: ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4784 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4788 #: ../erlang/examples/guestfs-erlang.pod:118
4789 #: ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405
4790 #: ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99
4791 #: ../perl/examples/guestfs-perl.pod:60
4792 #: ../python/examples/guestfs-python.pod:62
4793 #: ../ruby/examples/guestfs-ruby.pod:56
4795 "The examples in this manual page may be freely copied, modified and "
4796 "distributed without any restrictions."
4800 #: ../erlang/examples/guestfs-erlang.pod:121
4801 #: ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408
4802 #: ../java/examples/guestfs-java.pod:69
4803 #: ../ocaml/examples/guestfs-ocaml.pod:102
4804 #: ../perl/examples/guestfs-perl.pod:63
4805 #: ../python/examples/guestfs-python.pod:65
4806 #: ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3357
4808 "This library is free software; you can redistribute it and/or modify it "
4809 "under the terms of the GNU Lesser General Public License as published by the "
4810 "Free Software Foundation; either version 2 of the License, or (at your "
4811 "option) any later version."
4815 #: ../erlang/examples/guestfs-erlang.pod:126
4816 #: ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413
4817 #: ../java/examples/guestfs-java.pod:74
4818 #: ../ocaml/examples/guestfs-ocaml.pod:107
4819 #: ../perl/examples/guestfs-perl.pod:68
4820 #: ../python/examples/guestfs-python.pod:70
4821 #: ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3362
4823 "This library is distributed in the hope that it will be useful, but WITHOUT "
4824 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4825 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4830 #: ../erlang/examples/guestfs-erlang.pod:131
4831 #: ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418
4832 #: ../java/examples/guestfs-java.pod:79
4833 #: ../ocaml/examples/guestfs-ocaml.pod:112
4834 #: ../perl/examples/guestfs-perl.pod:73
4835 #: ../python/examples/guestfs-python.pod:75
4836 #: ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3367
4838 "You should have received a copy of the GNU Lesser General Public License "
4839 "along with this library; if not, write to the Free Software Foundation, "
4840 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4844 #: ../examples/guestfs-examples.pod:5
4845 msgid "guestfs-examples - Examples of using libguestfs from C"
4849 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4852 " #include <guestfs.h>\n"
4854 msgstr "#include <guestfs.h>\n"
4857 #: ../examples/guestfs-examples.pod:11
4860 " guestfs_h *g = guestfs_create ();\n"
4861 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4862 " guestfs_launch (g);\n"
4867 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4870 " cc prog.c -o prog -lguestfs\n"
4872 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4875 " cc prog.c -o prog -lguestfs\n"
4877 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4881 #: ../examples/guestfs-examples.pod:21
4883 "This manual page contains examples of calling libguestfs from the C "
4884 "programming language. If you are not familiar with using libguestfs, you "
4885 "also need to read L<guestfs(3)>."
4889 #: ../examples/guestfs-examples.pod:35
4891 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4892 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4893 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4897 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97
4898 #: ../python/examples/guestfs-python.pod:60
4899 #: ../ruby/examples/guestfs-ruby.pod:54
4900 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4904 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4909 #: ../examples/guestfs-recipes.pod:5
4911 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4912 "here. The only way which works for both sorts of output is to just write "
4913 "the URL directly. Do NOT use L<...> for URLs."
4917 #: ../examples/guestfs-recipes.pod:9
4919 "We break with tradition here and don't use ALL CAPS for the section "
4920 "headings, as this makes them much easier to read."
4924 #: ../examples/guestfs-recipes.pod:16
4925 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4929 #: ../examples/guestfs-recipes.pod:20
4931 "This page contains recipes for and links to things you can do using "
4932 "libguestfs, L<guestfish(1)> and the virt tools."
4936 #: ../examples/guestfs-recipes.pod:23
4937 msgid "Audit a virtual machine for setuid files"
4941 #: ../examples/guestfs-recipes.pod:25
4943 "The link below contains a small program which can be used to audit a Linux "
4944 "virtual machine to see what setuid and setgid files it contains."
4948 #: ../examples/guestfs-recipes.pod:28
4950 "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-"
4955 #: ../examples/guestfs-recipes.pod:30
4956 msgid "Change the background image in a Windows XP VM"
4960 #: ../examples/guestfs-recipes.pod:32
4962 "The links below explain how to use L<guestfish(1)> to change the background "
4963 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
4964 "be substantially different for each version of Windows."
4968 #: ../examples/guestfs-recipes.pod:37
4970 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html https://"
4971 "lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4975 #: ../examples/guestfs-recipes.pod:40
4976 msgid "Cloning a virtual machine (Linux)"
4980 #: ../examples/guestfs-recipes.pod:42
4982 "The guestfish technique described in the link below works well for most "
4983 "Linux VMs. Depending on the Linux distro you may need to change the paths "
4988 #: ../examples/guestfs-recipes.pod:46
4990 "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-"
4995 #: ../examples/guestfs-recipes.pod:48
4997 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
5002 #: ../examples/guestfs-recipes.pod:51
5003 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
5007 #: ../examples/guestfs-recipes.pod:53
5008 msgid "Cloning a virtual machine (Windows)"
5012 #: ../examples/guestfs-recipes.pod:55
5014 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
5015 "straightforward. Currently there is code in the Aeolus Oz project which "
5016 "does this (using libguestfs). As part of our review of the virt-clone tool, "
5017 "we may add sysprepping ability."
5021 #: ../examples/guestfs-recipes.pod:60
5023 "https://github.com/clalancette/oz https://www.redhat.com/archives/virt-tools-"
5024 "list/2011-May/msg00019.html"
5028 #: ../examples/guestfs-recipes.pod:63
5029 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
5033 #: ../examples/guestfs-recipes.pod:65
5034 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
5038 #: ../examples/guestfs-recipes.pod:67
5041 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
5046 #: ../examples/guestfs-recipes.pod:69
5047 msgid "To export just a subdirectory, eg. C</files>, do:"
5051 #: ../examples/guestfs-recipes.pod:71
5054 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
5059 #: ../examples/guestfs-recipes.pod:73
5060 msgid "Create empty disk images"
5064 #: ../examples/guestfs-recipes.pod:75
5066 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
5067 "The useful guide below explains the options available."
5071 #: ../examples/guestfs-recipes.pod:78
5073 "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/"
5078 #: ../examples/guestfs-recipes.pod:80
5079 msgid "Dump raw filesystem content from inside a disk image or VM"
5083 #: ../examples/guestfs-recipes.pod:82
5085 "You can use the L<guestfish(1)> C<download> command to extract the raw "
5086 "filesystem content from any filesystem in a disk image or a VM (even one "
5087 "which is encrypted or buried inside an LV):"
5091 #: ../examples/guestfs-recipes.pod:86
5094 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
5099 #: ../examples/guestfs-recipes.pod:88
5102 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
5107 #: ../examples/guestfs-recipes.pod:90
5108 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
5112 #: ../examples/guestfs-recipes.pod:92
5113 msgid "Edit grub configuration in a VM"
5117 #: ../examples/guestfs-recipes.pod:94
5118 msgid "You can use this to:"
5122 #: ../examples/guestfs-recipes.pod:100
5123 msgid "Fix a virtual machine that does not boot."
5127 #: ../examples/guestfs-recipes.pod:104
5128 msgid "Change which kernel is used to boot the VM."
5132 #: ../examples/guestfs-recipes.pod:108
5133 msgid "Change kernel command line options."
5137 #: ../examples/guestfs-recipes.pod:112
5138 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
5142 #: ../examples/guestfs-recipes.pod:114
5145 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
5150 #: ../examples/guestfs-recipes.pod:116
5152 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
5157 #: ../examples/guestfs-recipes.pod:119
5160 " virt-rescue -d BrokenGuest\n"
5165 #: ../examples/guestfs-recipes.pod:121
5166 msgid "Export any directory from a VM"
5170 #: ../examples/guestfs-recipes.pod:123
5172 "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
5176 #: ../examples/guestfs-recipes.pod:126
5179 " virt-copy-out -d Guest /home .\n"
5184 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9
5185 #: ../fish/guestfish-actions.pod:1450 ../fish/guestfish-actions.pod:1715
5186 #: ../fish/guestfish-actions.pod:2132 ../src/guestfs-actions.pod:18
5187 #: ../src/guestfs-actions.pod:2326 ../src/guestfs-actions.pod:2750
5188 #: ../src/guestfs-actions.pod:3309 ../src/guestfs.pod:1685
5189 #: ../tools/virt-win-reg.pl:717
5194 #: ../examples/guestfs-recipes.pod:134
5196 "The final dot of the command is not a printing error. It means we want to "
5197 "copy out to the current directory."
5201 #: ../examples/guestfs-recipes.pod:139
5202 msgid "This creates a directory called C<home> under the current directory."
5206 #: ../examples/guestfs-recipes.pod:143
5208 "If the guest is a Windows guest then you can use drive letters and "
5209 "backslashes, but you must prefix the path with C<win:> and quote it to "
5210 "protect it from the shell, like this:"
5214 #: ../examples/guestfs-recipes.pod:147
5217 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
5222 #: ../examples/guestfs-recipes.pod:149
5223 msgid "To get the output as a compressed tarball, do:"
5227 #: ../examples/guestfs-recipes.pod:151
5230 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
5235 #: ../examples/guestfs-recipes.pod:153
5237 "Although it sounds tempting, this is usually not a reliable way to get a "
5238 "backup from a running guest. See the entry in the FAQ: http://libguestfs."
5239 "org/FAQ.html#backup"
5243 #: ../examples/guestfs-recipes.pod:157
5244 msgid "Find out which user is using the most space"
5248 #: ../examples/guestfs-recipes.pod:159
5250 "This simple script examines a Linux guest to find out which user is using "
5251 "the most space in their home directory:"
5255 #: ../examples/guestfs-recipes.pod:162
5263 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
5271 #: ../examples/guestfs-recipes.pod:166
5280 #: ../examples/guestfs-recipes.pod:169
5283 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
5288 #: ../examples/guestfs-recipes.pod:171
5291 " for d in $(guestfish --remote ls \"$dir\"); do\n"
5292 " echo -n \"$dir/$d\"\n"
5294 " guestfish --remote du \"$dir/$d\";\n"
5295 " done | sort -nr -k 2\n"
5300 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
5303 " guestfish --remote exit\n"
5308 #: ../examples/guestfs-recipes.pod:179
5309 msgid "Get DHCP address from a VM"
5313 #: ../examples/guestfs-recipes.pod:181
5315 "The link below explains the many different possible techniques for getting "
5316 "the last assigned DHCP address of a virtual machine."
5320 #: ../examples/guestfs-recipes.pod:184
5322 "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-"
5323 "a-virtual-machine-disk-image/#content"
5327 #: ../examples/guestfs-recipes.pod:186
5329 "In the libguestfs source examples directory you will find the latest version "
5330 "of the C<virt-dhcp-address.c> program."
5334 #: ../examples/guestfs-recipes.pod:189
5335 msgid "Get the operating system product name string"
5339 #: ../examples/guestfs-recipes.pod:191
5340 msgid "Save the following script into a file called C<product-name.sh>:"
5344 #: ../examples/guestfs-recipes.pod:193
5349 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5350 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5351 " guestfish --remote inspect-get-product-name \"$root\"\n"
5352 " guestfish --remote exit\n"
5357 #: ../examples/guestfs-recipes.pod:200
5358 msgid "Make the script executable and run it on a named guest:"
5362 #: ../examples/guestfs-recipes.pod:202
5365 " # product-name.sh RHEL60x64\n"
5366 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
5371 #: ../examples/guestfs-recipes.pod:205
5373 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
5374 "C<xpath> command line tool or from your favourite programming language:"
5378 #: ../examples/guestfs-recipes.pod:209
5381 " # virt-inspector RHEL60x64 > xml\n"
5382 " # xpath '//product_name' < xml\n"
5385 " <product_name>Red Hat Enterprise Linux Server release 6.0 (Santiago)</product_name>\n"
5390 #: ../examples/guestfs-recipes.pod:215
5391 msgid "Get the default boot kernel for a Linux VM"
5395 #: ../examples/guestfs-recipes.pod:217
5397 "The link below contains a program to print the default boot kernel for a "
5402 #: ../examples/guestfs-recipes.pod:220
5404 "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-"
5405 "kernel-for-a-vm/#content"
5409 #: ../examples/guestfs-recipes.pod:222
5411 "It uses Augeas, and the technique is generally applicable for many different "
5416 #: ../examples/guestfs-recipes.pod:229
5417 msgid "listing the user accounts in the guest"
5421 #: ../examples/guestfs-recipes.pod:233
5422 msgid "what repositories is it configured to use"
5426 #: ../examples/guestfs-recipes.pod:237
5427 msgid "what NTP servers does it connect to"
5431 #: ../examples/guestfs-recipes.pod:241
5432 msgid "what were the boot messages last time it booted"
5436 #: ../examples/guestfs-recipes.pod:245
5437 msgid "listing who was logged in recently"
5441 #: ../examples/guestfs-recipes.pod:249
5442 msgid "http://augeas.net/"
5446 #: ../examples/guestfs-recipes.pod:251
5447 msgid "Install RPMs in a guest"
5451 #: ../examples/guestfs-recipes.pod:253
5453 "The link below contains a method to install RPMs in a guest. In fact the "
5454 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
5455 "installs them next time the guest is booted. You could use this technique "
5456 "to install vital security updates in an offline guest."
5460 #: ../examples/guestfs-recipes.pod:259
5462 "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
5466 #: ../examples/guestfs-recipes.pod:261
5467 msgid "List applications installed in a VM"
5471 #: ../examples/guestfs-recipes.pod:263
5472 msgid "Save the following to a file C<list-apps.sh>:"
5476 #: ../examples/guestfs-recipes.pod:265
5481 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5482 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5483 " guestfish --remote inspect-list-applications \"$root\"\n"
5484 " guestfish --remote exit\n"
5489 #: ../examples/guestfs-recipes.pod:272
5491 "Make the file executable and then you can run it on any named virtual "
5496 #: ../examples/guestfs-recipes.pod:275
5499 " # list-apps.sh WinGuest\n"
5501 " app_name: Mozilla Firefox (3.6.12)\n"
5502 " app_display_name: Mozilla Firefox (3.6.12)\n"
5504 " app_version: 3.6.12 (en-GB)\n"
5506 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5507 " app_trans_path:\n"
5508 " app_publisher: Mozilla\n"
5509 " app_url: http://www.mozilla.com/en-GB/\n"
5510 " app_source_package:\n"
5512 " app_description: Mozilla Firefox\n"
5515 " app_name: VLC media player\n"
5516 " app_display_name: VLC media player 1.1.5\n"
5518 " app_version: 1.1.5\n"
5520 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5521 " app_trans_path:\n"
5522 " app_publisher: VideoLAN\n"
5523 " app_url: http://www.videolan.org/\n"
5524 " app_source_package:\n"
5526 " app_description:\n"
5532 #: ../examples/guestfs-recipes.pod:305
5534 "If you want to run the script on disk images (instead of libvirt virtual "
5535 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also L<virt-inspector(1)"
5540 #: ../examples/guestfs-recipes.pod:309
5541 msgid "List files and directories in a VM"
5545 #: ../examples/guestfs-recipes.pod:311
5546 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5550 #: ../examples/guestfs-recipes.pod:313
5553 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5558 #: ../examples/guestfs-recipes.pod:315
5559 msgid "List services in a Windows VM"
5563 #: ../examples/guestfs-recipes.pod:317
5565 "The link below contains a script that can be used to list out the services "
5566 "from a Windows VM, and whether those services run at boot time or are loaded "
5571 #: ../examples/guestfs-recipes.pod:321
5573 "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/"
5578 #: ../examples/guestfs-recipes.pod:323
5579 msgid "Make a disk image sparse"
5583 #: ../examples/guestfs-recipes.pod:325
5585 "The link below contains some guides for making a disk image sparse (or "
5586 "reintroducing sparseness)."
5590 #: ../examples/guestfs-recipes.pod:328
5592 "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
5596 #: ../examples/guestfs-recipes.pod:330
5597 msgid "Monitor disk usage over time"
5601 #: ../examples/guestfs-recipes.pod:332
5603 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5604 "The link below contains a guide."
5608 #: ../examples/guestfs-recipes.pod:335
5609 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5613 #: ../examples/guestfs-recipes.pod:337
5614 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5618 #: ../examples/guestfs-recipes.pod:339
5620 "L<guestfish(1)> plus the tools described in the link below can be used to "
5621 "read out the Windows Event Log from any virtual machine running Windows "
5622 "Vista or a later version."
5626 #: ../examples/guestfs-recipes.pod:343
5628 "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-"
5629 "guestfish/#content"
5633 #: ../examples/guestfs-recipes.pod:345
5634 msgid "Remove root password (Linux)"
5638 #: ../examples/guestfs-recipes.pod:347
5640 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5641 "files. One use is to remove the root password from a Linux guest:"
5645 #: ../examples/guestfs-recipes.pod:350
5648 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5653 #: ../examples/guestfs-recipes.pod:352
5654 msgid "Remove Administrator password (Windows)"
5658 #: ../examples/guestfs-recipes.pod:354
5660 "The link below contains one technique for removing the Administrator "
5661 "password from a Windows VM, or to be more precise, it gives you a command "
5662 "prompt the next time you log in which you can use to bypass any security:"
5666 #: ../examples/guestfs-recipes.pod:359
5668 "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-"
5669 "administrator-password-with-guestfish/"
5673 #: ../examples/guestfs-recipes.pod:361
5674 msgid "Unpack a live CD"
5678 #: ../examples/guestfs-recipes.pod:363
5680 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5681 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5682 "layers, as outlined in the guide below."
5686 #: ../examples/guestfs-recipes.pod:367
5688 "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-"
5693 #: ../examples/guestfs-recipes.pod:369
5694 msgid "Uploading and downloading files"
5698 #: ../examples/guestfs-recipes.pod:371
5700 "The link below contains general tips on uploading (copying in) and "
5701 "downloading (copying out) files from VMs."
5705 #: ../examples/guestfs-recipes.pod:374
5707 "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5711 #: ../examples/guestfs-recipes.pod:376
5712 msgid "Use libguestfs tools on VMware ESX guests"
5716 #: ../examples/guestfs-recipes.pod:378
5718 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5719 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5723 #: ../examples/guestfs-recipes.pod:382
5725 "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-"
5730 #: ../examples/guestfs-recipes.pod:386
5732 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)"
5733 ">, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-"
5734 "python(3)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
5738 #: ../examples/guestfs-recipes.pod:403
5739 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5743 #: ../fish/guestfish-actions.pod:1
5748 #: ../fish/guestfish-actions.pod:3
5751 " add-cdrom filename\n"
5756 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
5757 msgid "This function adds a virtual CD-ROM disk image to the guest."
5761 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
5762 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
5766 #: ../fish/guestfish-actions.pod:15
5768 "This call checks for the existence of C<filename>. This stops you from "
5769 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5770 "and C<http:> URLs. To specify those, use the general L</config> call "
5775 #: ../fish/guestfish-actions.pod:22
5777 "If you just want to add an ISO file (often you use this as an efficient way "
5778 "to transfer large files into the guest), then you should probably use L</add-"
5779 "drive-ro> instead."
5783 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214
5784 #: ../fish/guestfish-actions.pod:228
5786 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
5791 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:217
5792 #: ../fish/guestfish-actions.pod:231 ../fish/guestfish-actions.pod:941
5793 #: ../fish/guestfish-actions.pod:976 ../fish/guestfish-actions.pod:1149
5794 #: ../fish/guestfish-actions.pod:1509 ../fish/guestfish-actions.pod:1523
5795 #: ../fish/guestfish-actions.pod:3293 ../fish/guestfish-actions.pod:3604
5796 #: ../fish/guestfish-actions.pod:3652 ../fish/guestfish-actions.pod:4579
5797 #: ../fish/guestfish-actions.pod:4602 ../fish/guestfish-actions.pod:4624
5798 #: ../fish/guestfish-actions.pod:4662 ../fish/guestfish-actions.pod:5311
5799 #: ../fish/guestfish-actions.pod:5417 ../src/guestfs-actions.pod:10
5800 #: ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326
5801 #: ../src/guestfs-actions.pod:1572 ../src/guestfs-actions.pod:1629
5802 #: ../src/guestfs-actions.pod:1912 ../src/guestfs-actions.pod:2411
5803 #: ../src/guestfs-actions.pod:2432 ../src/guestfs-actions.pod:5077
5804 #: ../src/guestfs-actions.pod:5599 ../src/guestfs-actions.pod:5699
5805 #: ../src/guestfs-actions.pod:6999 ../src/guestfs-actions.pod:7043
5806 #: ../src/guestfs-actions.pod:7077 ../src/guestfs-actions.pod:7140
5807 #: ../src/guestfs-actions.pod:8072 ../src/guestfs-actions.pod:8181
5808 #: ../src/guestfs-actions.pod:8364
5810 "Deprecated functions will not be removed from the API, but the fact that "
5811 "they are deprecated indicates that there are problems with correct use of "
5816 #: ../fish/guestfish-actions.pod:35
5821 #: ../fish/guestfish-actions.pod:37
5826 #: ../fish/guestfish-actions.pod:39
5829 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..] [readonlydisk:..]\n"
5834 #: ../fish/guestfish-actions.pod:41
5836 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
5837 "It works by connecting to libvirt, requesting the domain and domain XML from "
5838 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
5842 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
5844 "The number of disks added is returned. This operation is atomic: if an "
5845 "error is returned, then no disks are added."
5849 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
5851 "This function does some minimal checks to make sure the libvirt domain is "
5852 "not running (unless C<readonly> is true). In a future version we will try "
5853 "to acquire the libvirt lock on each disk."
5857 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
5859 "Disks must be accessible locally. This often means that adding disks from a "
5860 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
5861 "unless those disks are accessible via the same device path locally too."
5865 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
5867 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
5868 "libvirt.org/uri.html>). If this is not set then we connect to the default "
5869 "libvirt URI (or one set through an environment variable, see the libvirt "
5870 "documentation for full details)."
5874 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
5876 "The optional C<live> flag controls whether this call will try to connect to "
5877 "a running virtual machine C<guestfsd> process if it sees a suitable "
5878 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
5879 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
5880 "DAEMONS> for more information."
5884 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
5886 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
5887 "passed instead of the domain name. The C<dom> string is treated as a UUID "
5888 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
5893 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
5895 "The optional C<readonlydisk> parameter controls what we do for disks which "
5896 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
5900 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
5901 msgid "readonlydisk = \"error\""
5905 #: ../fish/guestfish-actions.pod:84 ../fish/guestfish-actions.pod:95
5906 #: ../fish/guestfish-actions.pod:106 ../src/guestfs-actions.pod:103
5907 #: ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:125
5908 msgid "If C<readonly> is false:"
5912 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
5914 "The whole call is aborted with an error if any disk with the E<lt>readonly/"
5915 "E<gt> flag is found."
5919 #: ../fish/guestfish-actions.pod:89 ../fish/guestfish-actions.pod:100
5920 #: ../fish/guestfish-actions.pod:110 ../src/guestfs-actions.pod:108
5921 #: ../src/guestfs-actions.pod:119 ../src/guestfs-actions.pod:129
5922 msgid "If C<readonly> is true:"
5926 #: ../fish/guestfish-actions.pod:91 ../fish/guestfish-actions.pod:102
5927 #: ../fish/guestfish-actions.pod:112 ../src/guestfs-actions.pod:110
5928 #: ../src/guestfs-actions.pod:121 ../src/guestfs-actions.pod:131
5929 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
5933 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
5934 msgid "readonlydisk = \"read\""
5938 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
5940 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
5941 "are added read/write."
5945 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
5946 msgid "readonlydisk = \"write\" (default)"
5950 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
5951 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
5955 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
5956 msgid "readonlydisk = \"ignore\""
5960 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
5961 msgid "If C<readonly> is true or false:"
5965 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
5966 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
5970 #: ../fish/guestfish-actions.pod:122
5972 "The other optional parameters are passed directly through to L</add-drive-"
5977 #: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:194
5978 #: ../fish/guestfish-actions.pod:624 ../fish/guestfish-actions.pod:835
5979 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:894
5980 #: ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:912
5981 #: ../fish/guestfish-actions.pod:926 ../fish/guestfish-actions.pod:2171
5982 #: ../fish/guestfish-actions.pod:3342 ../fish/guestfish-actions.pod:3505
5983 #: ../fish/guestfish-actions.pod:3640
5985 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
5989 #: ../fish/guestfish-actions.pod:127
5994 #: ../fish/guestfish-actions.pod:129
5997 " add-drive filename\n"
6002 #: ../fish/guestfish-actions.pod:131
6004 "This function is the equivalent of calling L</add-drive-opts> with no "
6005 "optional parameters, so the disk is added writable, with the format being "
6006 "detected automatically."
6010 #: ../fish/guestfish-actions.pod:135
6012 "Automatic detection of the format opens you up to a potential security hole "
6013 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6014 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6015 "you should think about replacing calls to this function with calls to L</add-"
6016 "drive-opts>, and specifying the format."
6020 #: ../fish/guestfish-actions.pod:142
6021 msgid "add-drive-opts"
6025 #: ../fish/guestfish-actions.pod:144
6030 #: ../fish/guestfish-actions.pod:146
6033 " add-drive-opts filename [readonly:..] [format:..] [iface:..] [name:..]\n"
6038 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
6040 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6041 "The first time you call this function, the disk appears as C</dev/sda>, the "
6042 "second time as C</dev/sdb>, and so on."
6046 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
6048 "You don't necessarily need to be root when using libguestfs. However you "
6049 "obviously do need sufficient permissions to access the filename for whatever "
6050 "operations you want to perform (ie. read access if you just want to read the "
6051 "image or write access if you want to modify the image)."
6055 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
6056 msgid "This call checks that C<filename> exists."
6060 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3304
6061 #: ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5114
6062 msgid "The optional arguments are:"
6066 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6071 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6073 "If true then the image is treated as read-only. Writes are still allowed, "
6074 "but they are stored in a temporary snapshot overlay which is discarded at "
6075 "the end. The disk that you add is not modified."
6079 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6084 #: ../fish/guestfish-actions.pod:173
6086 "This forces the image format. If you omit this (or use L</add-drive> or L</"
6087 "add-drive-ro>) then the format is automatically detected. Possible formats "
6088 "include C<raw> and C<qcow2>."
6092 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6094 "Automatic detection of the format opens you up to a potential security hole "
6095 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6096 "RHBZ#642934. Specifying the format closes this security hole."
6100 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6105 #: ../fish/guestfish-actions.pod:184
6107 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
6108 "add-drive-with-if> call (q.v.)"
6112 #: ../fish/guestfish-actions.pod:187 ../src/guestfs-actions.pod:247
6117 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
6119 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
6120 "a hint to the guest inspection process if it is available."
6124 #: ../fish/guestfish-actions.pod:196
6125 msgid "add-drive-ro"
6129 #: ../fish/guestfish-actions.pod:198
6134 #: ../fish/guestfish-actions.pod:200
6137 " add-drive-ro filename\n"
6142 #: ../fish/guestfish-actions.pod:202
6144 "This function is the equivalent of calling L</add-drive-opts> with the "
6145 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6146 "is added read-only, with the format being detected automatically."
6150 #: ../fish/guestfish-actions.pod:207
6151 msgid "add-drive-ro-with-if"
6155 #: ../fish/guestfish-actions.pod:209
6158 " add-drive-ro-with-if filename iface\n"
6163 #: ../fish/guestfish-actions.pod:211
6165 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6166 "interface emulation to use at run time."
6170 #: ../fish/guestfish-actions.pod:221
6171 msgid "add-drive-with-if"
6175 #: ../fish/guestfish-actions.pod:223
6178 " add-drive-with-if filename iface\n"
6183 #: ../fish/guestfish-actions.pod:225
6185 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6186 "interface emulation to use at run time."
6190 #: ../fish/guestfish-actions.pod:235
6195 #: ../fish/guestfish-actions.pod:237
6198 " aug-clear augpath\n"
6203 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
6205 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6206 "L<augtool(1)> C<clear> command."
6210 #: ../fish/guestfish-actions.pod:242
6215 #: ../fish/guestfish-actions.pod:244
6223 #: ../fish/guestfish-actions.pod:246
6225 "Close the current Augeas handle and free up any resources used by it. After "
6226 "calling this, you have to call L</aug-init> again before you can use any "
6227 "other Augeas functions."
6231 #: ../fish/guestfish-actions.pod:251
6236 #: ../fish/guestfish-actions.pod:253
6239 " aug-defnode name expr val\n"
6244 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
6246 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6250 #: ../fish/guestfish-actions.pod:258
6252 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6253 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6254 "containing that single node."
6258 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
6260 "On success this returns a pair containing the number of nodes in the "
6261 "nodeset, and a boolean flag if a node was created."
6265 #: ../fish/guestfish-actions.pod:266
6270 #: ../fish/guestfish-actions.pod:268
6273 " aug-defvar name expr\n"
6278 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
6280 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6281 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6285 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
6287 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6288 "evaluates to something which is not a nodeset."
6292 #: ../fish/guestfish-actions.pod:277
6297 #: ../fish/guestfish-actions.pod:279
6300 " aug-get augpath\n"
6305 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
6307 "Look up the value associated with C<path>. If C<path> matches exactly one "
6308 "node, the C<value> is returned."
6312 #: ../fish/guestfish-actions.pod:284
6317 #: ../fish/guestfish-actions.pod:286
6320 " aug-init root flags\n"
6325 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
6327 "Create a new Augeas handle for editing configuration files. If there was "
6328 "any previous Augeas handle associated with this guestfs session, then it is "
6333 #: ../fish/guestfish-actions.pod:292
6334 msgid "You must call this before using any other L</aug-*> commands."
6338 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
6340 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6344 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
6346 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6347 "logical I<or> of the following integers:"
6351 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
6352 msgid "C<AUG_SAVE_BACKUP> = 1"
6356 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
6357 msgid "Keep the original file with a C<.augsave> extension."
6361 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
6362 msgid "C<AUG_SAVE_NEWFILE> = 2"
6366 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
6368 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6369 "original. Overrides C<AUG_SAVE_BACKUP>."
6373 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
6374 msgid "C<AUG_TYPE_CHECK> = 4"
6378 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
6379 msgid "Typecheck lenses."
6383 #: ../fish/guestfish-actions.pod:317
6385 "This option is only useful when debugging Augeas lenses. Use of this option "
6386 "may require additional memory for the libguestfs appliance. You may need to "
6387 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
6391 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
6392 msgid "C<AUG_NO_STDINC> = 8"
6396 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
6397 msgid "Do not use standard load path for modules."
6401 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
6402 msgid "C<AUG_SAVE_NOOP> = 16"
6406 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
6407 msgid "Make save a no-op, just record what would have been changed."
6411 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
6412 msgid "C<AUG_NO_LOAD> = 32"
6416 #: ../fish/guestfish-actions.pod:332
6417 msgid "Do not load the tree in L</aug-init>."
6421 #: ../fish/guestfish-actions.pod:336
6422 msgid "To close the handle, you can call L</aug-close>."
6426 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
6427 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6431 #: ../fish/guestfish-actions.pod:340
6436 #: ../fish/guestfish-actions.pod:342
6439 " aug-insert augpath label true|false\n"
6444 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
6446 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6447 "or after C<path> (depending on the boolean flag C<before>)."
6451 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
6453 "C<path> must match exactly one existing node in the tree, and C<label> must "
6454 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6458 #: ../fish/guestfish-actions.pod:352
6463 #: ../fish/guestfish-actions.pod:354
6471 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
6472 msgid "Load files into the tree."
6476 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
6477 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6481 #: ../fish/guestfish-actions.pod:361
6486 #: ../fish/guestfish-actions.pod:363
6494 #: ../fish/guestfish-actions.pod:365
6496 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6497 "resulting nodes into alphabetical order."
6501 #: ../fish/guestfish-actions.pod:368
6506 #: ../fish/guestfish-actions.pod:370
6509 " aug-match augpath\n"
6514 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
6516 "Returns a list of paths which match the path expression C<path>. The "
6517 "returned paths are sufficiently qualified so that they match exactly one "
6518 "node in the current tree."
6522 #: ../fish/guestfish-actions.pod:376
6527 #: ../fish/guestfish-actions.pod:378
6530 " aug-mv src dest\n"
6535 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
6537 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6538 "C<dest> is overwritten if it exists."
6542 #: ../fish/guestfish-actions.pod:383
6547 #: ../fish/guestfish-actions.pod:385
6555 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
6556 msgid "Remove C<path> and all of its children."
6560 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
6561 msgid "On success this returns the number of entries which were removed."
6565 #: ../fish/guestfish-actions.pod:391
6570 #: ../fish/guestfish-actions.pod:393
6578 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
6579 msgid "This writes all pending changes to disk."
6583 #: ../fish/guestfish-actions.pod:397
6585 "The flags which were passed to L</aug-init> affect exactly how files are "
6590 #: ../fish/guestfish-actions.pod:400
6595 #: ../fish/guestfish-actions.pod:402
6598 " aug-set augpath val\n"
6603 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
6604 msgid "Set the value associated with C<path> to C<val>."
6608 #: ../fish/guestfish-actions.pod:406
6610 "In the Augeas API, it is possible to clear a node by setting the value to "
6611 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6612 "this call. Instead you must use the L</aug-clear> call."
6616 #: ../fish/guestfish-actions.pod:411
6621 #: ../fish/guestfish-actions.pod:413
6624 " available 'groups ...'\n"
6629 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
6631 "This command is used to check the availability of some groups of "
6632 "functionality in the appliance, which not all builds of the libguestfs "
6633 "appliance will be able to provide."
6637 #: ../fish/guestfish-actions.pod:419
6639 "The libguestfs groups, and the functions that those groups correspond to, "
6640 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6641 "runtime by calling L</available-all-groups>."
6645 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
6647 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
6648 "\"]> would check for the availability of the Linux inotify functions and "
6649 "Augeas (configuration file editing) functions."
6653 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
6654 msgid "The command returns no error if I<all> requested groups are available."
6658 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
6660 "It fails with an error if one or more of the requested groups is unavailable "
6665 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
6667 "If an unknown group name is included in the list of groups then an error is "
6672 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
6677 #: ../fish/guestfish-actions.pod:443
6678 msgid "You must call L</launch> before calling this function."
6682 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
6684 "The reason is because we don't know what groups are supported by the "
6685 "appliance/daemon until it is running and can be queried."
6689 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
6691 "If a group of functions is available, this does not necessarily mean that "
6692 "they will work. You still have to check for errors when calling individual "
6693 "API functions even if they are available."
6697 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
6699 "It is usually the job of distro packagers to build complete functionality "
6700 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6701 "with all requirements satisfied, will support everything."
6705 #: ../fish/guestfish-actions.pod:465
6707 "This call was added in version C<1.0.80>. In previous versions of "
6708 "libguestfs all you could do would be to speculatively execute a command to "
6709 "find out if the daemon implemented it. See also L</version>."
6713 #: ../fish/guestfish-actions.pod:472
6714 msgid "available-all-groups"
6718 #: ../fish/guestfish-actions.pod:474
6721 " available-all-groups\n"
6726 #: ../fish/guestfish-actions.pod:476
6728 "This command returns a list of all optional groups that this daemon knows "
6729 "about. Note this returns both supported and unsupported groups. To find "
6730 "out which ones the daemon can actually support you have to call L</"
6731 "available> on each member of the returned list."
6735 #: ../fish/guestfish-actions.pod:482
6736 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6740 #: ../fish/guestfish-actions.pod:484
6745 #: ../fish/guestfish-actions.pod:486
6748 " base64-in (base64file|-) filename\n"
6753 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
6755 "This command uploads base64-encoded data from C<base64file> to C<filename>."
6759 #: ../fish/guestfish-actions.pod:491 ../fish/guestfish-actions.pod:500
6760 #: ../fish/guestfish-actions.pod:749 ../fish/guestfish-actions.pod:833
6761 #: ../fish/guestfish-actions.pod:854 ../fish/guestfish-actions.pod:1025
6762 #: ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1418
6763 #: ../fish/guestfish-actions.pod:4882 ../fish/guestfish-actions.pod:4894
6764 #: ../fish/guestfish-actions.pod:4905 ../fish/guestfish-actions.pod:4916
6765 #: ../fish/guestfish-actions.pod:4968 ../fish/guestfish-actions.pod:4977
6766 #: ../fish/guestfish-actions.pod:5031 ../fish/guestfish-actions.pod:5054
6767 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6771 #: ../fish/guestfish-actions.pod:493
6776 #: ../fish/guestfish-actions.pod:495
6779 " base64-out filename (base64file|-)\n"
6784 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
6786 "This command downloads the contents of C<filename>, writing it out to local "
6787 "file C<base64file> encoded as base64."
6791 #: ../fish/guestfish-actions.pod:502
6792 msgid "blockdev-flushbufs"
6796 #: ../fish/guestfish-actions.pod:504
6799 " blockdev-flushbufs device\n"
6804 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
6806 "This tells the kernel to flush internal buffers associated with C<device>."
6810 #: ../fish/guestfish-actions.pod:509 ../fish/guestfish-actions.pod:520
6811 #: ../fish/guestfish-actions.pod:529 ../fish/guestfish-actions.pod:539
6812 #: ../fish/guestfish-actions.pod:551 ../fish/guestfish-actions.pod:564
6813 #: ../fish/guestfish-actions.pod:572 ../fish/guestfish-actions.pod:583
6814 #: ../fish/guestfish-actions.pod:591 ../fish/guestfish-actions.pod:599
6815 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:749
6816 #: ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:780
6817 #: ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:817
6818 #: ../src/guestfs-actions.pod:831 ../src/guestfs-actions.pod:849
6819 #: ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:877
6820 msgid "This uses the L<blockdev(8)> command."
6824 #: ../fish/guestfish-actions.pod:511
6825 msgid "blockdev-getbsz"
6829 #: ../fish/guestfish-actions.pod:513
6832 " blockdev-getbsz device\n"
6837 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
6838 msgid "This returns the block size of a device."
6842 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580
6843 #: ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
6845 "(Note this is different from both I<size in blocks> and I<filesystem block "
6850 #: ../fish/guestfish-actions.pod:522
6851 msgid "blockdev-getro"
6855 #: ../fish/guestfish-actions.pod:524
6858 " blockdev-getro device\n"
6863 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
6865 "Returns a boolean indicating if the block device is read-only (true if read-"
6866 "only, false if not)."
6870 #: ../fish/guestfish-actions.pod:531
6871 msgid "blockdev-getsize64"
6875 #: ../fish/guestfish-actions.pod:533
6878 " blockdev-getsize64 device\n"
6883 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
6884 msgid "This returns the size of the device in bytes."
6888 #: ../fish/guestfish-actions.pod:537
6889 msgid "See also L</blockdev-getsz>."
6893 #: ../fish/guestfish-actions.pod:541
6894 msgid "blockdev-getss"
6898 #: ../fish/guestfish-actions.pod:543
6901 " blockdev-getss device\n"
6906 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
6908 "This returns the size of sectors on a block device. Usually 512, but can be "
6909 "larger for modern devices."
6913 #: ../fish/guestfish-actions.pod:548
6915 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
6919 #: ../fish/guestfish-actions.pod:553
6920 msgid "blockdev-getsz"
6924 #: ../fish/guestfish-actions.pod:555
6927 " blockdev-getsz device\n"
6932 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
6934 "This returns the size of the device in units of 512-byte sectors (even if "
6935 "the sectorsize isn't 512 bytes ... weird)."
6939 #: ../fish/guestfish-actions.pod:560
6941 "See also L</blockdev-getss> for the real sector size of the device, and L</"
6942 "blockdev-getsize64> for the more useful I<size in bytes>."
6946 #: ../fish/guestfish-actions.pod:566
6947 msgid "blockdev-rereadpt"
6951 #: ../fish/guestfish-actions.pod:568
6954 " blockdev-rereadpt device\n"
6959 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
6960 msgid "Reread the partition table on C<device>."
6964 #: ../fish/guestfish-actions.pod:574
6965 msgid "blockdev-setbsz"
6969 #: ../fish/guestfish-actions.pod:576
6972 " blockdev-setbsz device blocksize\n"
6977 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
6978 msgid "This sets the block size of a device."
6982 #: ../fish/guestfish-actions.pod:585
6983 msgid "blockdev-setro"
6987 #: ../fish/guestfish-actions.pod:587
6990 " blockdev-setro device\n"
6995 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
6996 msgid "Sets the block device named C<device> to read-only."
7000 #: ../fish/guestfish-actions.pod:593
7001 msgid "blockdev-setrw"
7005 #: ../fish/guestfish-actions.pod:595
7008 " blockdev-setrw device\n"
7013 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
7014 msgid "Sets the block device named C<device> to read-write."
7018 #: ../fish/guestfish-actions.pod:601
7019 msgid "btrfs-filesystem-resize"
7023 #: ../fish/guestfish-actions.pod:603
7026 " btrfs-filesystem-resize mountpoint [size:..]\n"
7031 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
7032 msgid "This command resizes a btrfs filesystem."
7036 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
7038 "Note that unlike other resize calls, the filesystem has to be mounted and "
7039 "the parameter is the mountpoint not the device (this is a requirement of "
7044 #: ../fish/guestfish-actions.pod:611 ../fish/guestfish-actions.pod:3615
7045 #: ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:5638
7046 msgid "The optional parameters are:"
7050 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3619
7051 #: ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5642
7056 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
7058 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7059 "resized to the maximum size."
7063 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
7064 msgid "See also L<btrfs(8)>."
7068 #: ../fish/guestfish-actions.pod:626
7069 msgid "case-sensitive-path"
7073 #: ../fish/guestfish-actions.pod:628
7076 " case-sensitive-path path\n"
7081 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
7083 "This can be used to resolve case insensitive paths on a filesystem which is "
7084 "case sensitive. The use case is to resolve paths which you have read from "
7085 "Windows configuration files or the Windows Registry, to the true path."
7089 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
7091 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7092 "(and probably others), which is that although the underlying filesystem is "
7093 "case-insensitive, the driver exports the filesystem to Linux as case-"
7098 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
7100 "One consequence of this is that special directories such as C<c:\\windows> "
7101 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7102 "precise details of how they were created. In Windows itself this would not "
7107 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
7109 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7114 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
7116 "This function resolves the true case of each element in the path and returns "
7117 "the case-sensitive path."
7121 #: ../fish/guestfish-actions.pod:652
7123 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
7124 "WINDOWS/system32\"> (the exact return value would depend on details of how "
7125 "the directories were originally created under Windows)."
7129 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
7130 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7134 #: ../fish/guestfish-actions.pod:660
7135 msgid "See also L</realpath>."
7139 #: ../fish/guestfish-actions.pod:662
7144 #: ../fish/guestfish-actions.pod:664
7152 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4049
7153 #: ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6299
7154 msgid "Return the contents of the file named C<path>."
7158 #: ../fish/guestfish-actions.pod:668
7160 "Note that this function cannot correctly handle binary files (specifically, "
7161 "files containing C<\\0> character which is treated as end of string). For "
7162 "those you need to use the L</read-file> or L</download> functions which have "
7163 "a more complex interface."
7167 #: ../fish/guestfish-actions.pod:673 ../fish/guestfish-actions.pod:808
7168 #: ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:1103
7169 #: ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1180
7170 #: ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1382
7171 #: ../fish/guestfish-actions.pod:1695 ../fish/guestfish-actions.pod:1705
7172 #: ../fish/guestfish-actions.pod:1755 ../fish/guestfish-actions.pod:1770
7173 #: ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1799
7174 #: ../fish/guestfish-actions.pod:3919 ../fish/guestfish-actions.pod:3934
7175 #: ../fish/guestfish-actions.pod:4010 ../fish/guestfish-actions.pod:4027
7176 #: ../fish/guestfish-actions.pod:4042 ../fish/guestfish-actions.pod:4723
7177 #: ../fish/guestfish-actions.pod:4769 ../fish/guestfish-actions.pod:4854
7178 #: ../fish/guestfish-actions.pod:4869 ../fish/guestfish-actions.pod:5275
7179 #: ../fish/guestfish-actions.pod:5287 ../fish/guestfish-actions.pod:5305
7180 #: ../fish/guestfish-actions.pod:5322 ../fish/guestfish-actions.pod:5332
7181 #: ../fish/guestfish-actions.pod:5389 ../fish/guestfish-actions.pod:5399
7182 #: ../fish/guestfish-actions.pod:5428 ../fish/guestfish-actions.pod:5438
7183 #: ../src/guestfs-actions.pod:1001 ../src/guestfs-actions.pod:1180
7184 #: ../src/guestfs-actions.pod:1200 ../src/guestfs-actions.pod:1847
7185 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:1969
7186 #: ../src/guestfs-actions.pod:1988 ../src/guestfs-actions.pod:2234
7187 #: ../src/guestfs-actions.pod:2716 ../src/guestfs-actions.pod:2735
7188 #: ../src/guestfs-actions.pod:2800 ../src/guestfs-actions.pod:2824
7189 #: ../src/guestfs-actions.pod:2841 ../src/guestfs-actions.pod:2870
7190 #: ../src/guestfs-actions.pod:6081 ../src/guestfs-actions.pod:6107
7191 #: ../src/guestfs-actions.pod:6238 ../src/guestfs-actions.pod:6264
7192 #: ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:7255
7193 #: ../src/guestfs-actions.pod:7310 ../src/guestfs-actions.pod:7456
7194 #: ../src/guestfs-actions.pod:7480 ../src/guestfs-actions.pod:8145
7195 #: ../src/guestfs-actions.pod:8165 ../src/guestfs-actions.pod:8198
7196 #: ../src/guestfs-actions.pod:8217 ../src/guestfs-actions.pod:8236
7197 #: ../src/guestfs-actions.pod:8330 ../src/guestfs-actions.pod:8349
7198 #: ../src/guestfs-actions.pod:8395 ../src/guestfs-actions.pod:8414
7200 "Because of the message protocol, there is a transfer limit of somewhere "
7201 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7205 #: ../fish/guestfish-actions.pod:676
7210 #: ../fish/guestfish-actions.pod:678
7213 " checksum csumtype path\n"
7218 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
7220 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7224 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
7226 "The type of checksum to compute is given by the C<csumtype> parameter which "
7227 "must have one of the following values:"
7231 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
7236 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
7238 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7243 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
7248 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
7249 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7253 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
7258 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
7259 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7263 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
7268 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
7269 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7273 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
7278 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
7279 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7283 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
7288 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
7289 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7293 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
7298 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
7299 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7303 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
7304 msgid "The checksum is returned as a printable string."
7308 #: ../fish/guestfish-actions.pod:721
7309 msgid "To get the checksum for a device, use L</checksum-device>."
7313 #: ../fish/guestfish-actions.pod:723
7314 msgid "To get the checksums for many files, use L</checksums-out>."
7318 #: ../fish/guestfish-actions.pod:725
7319 msgid "checksum-device"
7323 #: ../fish/guestfish-actions.pod:727
7326 " checksum-device csumtype device\n"
7331 #: ../fish/guestfish-actions.pod:729
7333 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7334 "device named C<device>. For the types of checksums supported see the L</"
7335 "checksum> command."
7339 #: ../fish/guestfish-actions.pod:733
7340 msgid "checksums-out"
7344 #: ../fish/guestfish-actions.pod:735
7347 " checksums-out csumtype directory (sumsfile|-)\n"
7352 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
7354 "This command computes the checksums of all regular files in C<directory> and "
7355 "then emits a list of those checksums to the local output file C<sumsfile>."
7359 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
7361 "This can be used for verifying the integrity of a virtual machine. However "
7362 "to be properly secure you should pay attention to the output of the checksum "
7363 "command (it uses the ones from GNU coreutils). In particular when the "
7364 "filename is not printable, coreutils uses a special backslash syntax. For "
7365 "more information, see the GNU coreutils info file."
7369 #: ../fish/guestfish-actions.pod:751
7374 #: ../fish/guestfish-actions.pod:753
7377 " chmod mode path\n"
7382 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
7384 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7389 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
7391 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7392 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7397 #: ../fish/guestfish-actions.pod:762 ../fish/guestfish-actions.pod:3268
7398 #: ../fish/guestfish-actions.pod:3407 ../fish/guestfish-actions.pod:3417
7399 #: ../fish/guestfish-actions.pod:3427 ../src/guestfs-actions.pod:1117
7400 #: ../src/guestfs-actions.pod:5045 ../src/guestfs-actions.pod:5254
7401 #: ../src/guestfs-actions.pod:5273 ../src/guestfs-actions.pod:5292
7402 msgid "The mode actually set is affected by the umask."
7406 #: ../fish/guestfish-actions.pod:764
7411 #: ../fish/guestfish-actions.pod:766
7414 " chown owner group path\n"
7419 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
7420 msgid "Change the file owner to C<owner> and group to C<group>."
7424 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2703
7425 #: ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4116
7427 "Only numeric uid and gid are supported. If you want to use names, you will "
7428 "need to locate and parse the password file yourself (Augeas support makes "
7429 "this relatively easy)."
7433 #: ../fish/guestfish-actions.pod:774
7438 #: ../fish/guestfish-actions.pod:776
7441 " command 'arguments ...'\n"
7446 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
7448 "This call runs a command from the guest filesystem. The filesystem must be "
7449 "mounted, and must contain a compatible operating system (ie. something "
7450 "Linux, with the same or compatible processor architecture)."
7454 #: ../fish/guestfish-actions.pod:783
7456 "The single parameter is an argv-style list of arguments. The first element "
7457 "is the name of the program to run. Subsequent elements are parameters. The "
7458 "list must be non-empty (ie. must contain a program name). Note that the "
7459 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7463 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
7464 msgid "The return value is anything printed to I<stdout> by the command."
7468 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
7470 "If the command returns a non-zero exit status, then this function returns an "
7471 "error message. The error message string is the content of I<stderr> from "
7476 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
7478 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
7479 "bin>. If you require a program from another location, you should provide "
7480 "the full path in the first parameter."
7484 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
7486 "Shared libraries and data files required by the program must be available on "
7487 "filesystems which are mounted in the correct places. It is the caller's "
7488 "responsibility to ensure all filesystems that are needed are mounted at the "
7493 #: ../fish/guestfish-actions.pod:811
7494 msgid "command-lines"
7498 #: ../fish/guestfish-actions.pod:813
7501 " command-lines 'arguments ...'\n"
7506 #: ../fish/guestfish-actions.pod:815
7508 "This is the same as L</command>, but splits the result into a list of lines."
7512 #: ../fish/guestfish-actions.pod:818
7513 msgid "See also: L</sh-lines>"
7517 #: ../fish/guestfish-actions.pod:823
7518 msgid "compress-device-out"
7522 #: ../fish/guestfish-actions.pod:825
7525 " compress-device-out ctype device (zdevice|-) [level:..]\n"
7530 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
7532 "This command compresses C<device> and writes it out to the local file "
7537 #: ../fish/guestfish-actions.pod:830
7539 "The C<ctype> and optional C<level> parameters have the same meaning as in L</"
7544 #: ../fish/guestfish-actions.pod:837
7545 msgid "compress-out"
7549 #: ../fish/guestfish-actions.pod:839
7552 " compress-out ctype file (zfile|-) [level:..]\n"
7557 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
7559 "This command compresses C<file> and writes it out to the local file C<zfile>."
7563 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
7565 "The compression program used is controlled by the C<ctype> parameter. "
7566 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7567 "Some compression types may not be supported by particular builds of "
7568 "libguestfs, in which case you will get an error containing the substring "
7569 "\"not supported\"."
7573 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
7575 "The optional C<level> parameter controls compression level. The meaning and "
7576 "default for this parameter depends on the compression program being used."
7580 #: ../fish/guestfish-actions.pod:858
7585 #: ../fish/guestfish-actions.pod:860
7588 " config qemuparam qemuvalue\n"
7593 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
7595 "This can be used to add arbitrary qemu command line parameters of the form "
7596 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7597 "setting some parameters which would interfere with parameters that we use."
7601 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
7602 msgid "The first character of C<param> string must be a C<-> (dash)."
7606 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
7607 msgid "C<value> can be NULL."
7611 #: ../fish/guestfish-actions.pod:871
7612 msgid "copy-device-to-device"
7616 #: ../fish/guestfish-actions.pod:873
7619 " copy-device-to-device src dest [srcoffset:..] [destoffset:..] [size:..]\n"
7624 #: ../fish/guestfish-actions.pod:875
7626 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, L</copy-"
7627 "file-to-device>, and L</copy-file-to-file> let you copy from a source "
7628 "(device|file) to a destination (device|file)."
7632 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
7634 "Partial copies can be made since you can specify optionally the source "
7635 "offset, destination offset and size to copy. These values are all specified "
7636 "in bytes. If not given, the offsets both default to zero, and the size "
7637 "defaults to copying as much as possible until we hit the end of the source."
7641 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
7643 "The source and destination may be the same object. However overlapping "
7644 "regions may not be copied correctly."
7648 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
7650 "If the destination is a file, it is created if required. If the destination "
7651 "file is not large enough, it is extended."
7655 #: ../fish/guestfish-actions.pod:896
7656 msgid "copy-device-to-file"
7660 #: ../fish/guestfish-actions.pod:898
7663 " copy-device-to-file src dest [srcoffset:..] [destoffset:..] [size:..]\n"
7668 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909
7669 #: ../fish/guestfish-actions.pod:918
7670 msgid "See L</copy-device-to-device> for a general overview of this call."
7674 #: ../fish/guestfish-actions.pod:905
7675 msgid "copy-file-to-device"
7679 #: ../fish/guestfish-actions.pod:907
7682 " copy-file-to-device src dest [srcoffset:..] [destoffset:..] [size:..]\n"
7687 #: ../fish/guestfish-actions.pod:914
7688 msgid "copy-file-to-file"
7692 #: ../fish/guestfish-actions.pod:916
7695 " copy-file-to-file src dest [srcoffset:..] [destoffset:..] [size:..]\n"
7700 #: ../fish/guestfish-actions.pod:921
7702 "This is B<not> the function you want for copying files. This is for copying "
7703 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7704 "file copying and moving functions."
7708 #: ../fish/guestfish-actions.pod:928
7713 #: ../fish/guestfish-actions.pod:930
7716 " copy-size src dest size\n"
7721 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1576
7723 "This command copies exactly C<size> bytes from one source device or file "
7724 "C<src> to another destination device or file C<dest>."
7728 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1579
7730 "Note this will fail if the source is too short or if the destination is not "
7735 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
7737 "I<This function is deprecated.> In new code, use the L</"
7738 "copy_device_to_device> call instead."
7742 #: ../fish/guestfish-actions.pod:945
7747 #: ../fish/guestfish-actions.pod:947
7755 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1598
7757 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7758 "destination filename or destination directory."
7762 #: ../fish/guestfish-actions.pod:952
7767 #: ../fish/guestfish-actions.pod:954
7775 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1612
7777 "This copies a file or directory from C<src> to C<dest> recursively using the "
7782 #: ../fish/guestfish-actions.pod:959
7787 #: ../fish/guestfish-actions.pod:961
7795 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1633
7797 "This command copies from one source device or file C<src> to another "
7798 "destination device or file C<dest>. Normally you would use this to copy to "
7799 "or from a device or partition, for example to duplicate a filesystem."
7803 #: ../fish/guestfish-actions.pod:968
7805 "If the destination is a device, it must be as large or larger than the "
7806 "source file or device, otherwise the copy will fail. This command cannot do "
7807 "partial copies (see L</copy-device-to-device>)."
7811 #: ../fish/guestfish-actions.pod:980
7816 #: ../fish/guestfish-actions.pod:982
7824 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1652
7825 msgid "This command runs the C<df> command to report disk space used."
7829 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
7831 "This command is mostly useful for interactive sessions. It is I<not> "
7832 "intended that you try to parse the output string. Use L</statvfs> from "
7837 #: ../fish/guestfish-actions.pod:990
7842 #: ../fish/guestfish-actions.pod:992
7850 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1668
7852 "This command runs the C<df -h> command to report disk space used in human-"
7857 #: ../fish/guestfish-actions.pod:1001
7862 #: ../fish/guestfish-actions.pod:1003
7870 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1685
7872 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
7873 "This is sometimes useful for extended debugging of problems."
7877 #: ../fish/guestfish-actions.pod:1009
7879 "Another way to get the same information is to enable verbose messages with "
7880 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
7881 "before running the program."
7885 #: ../fish/guestfish-actions.pod:1014
7890 #: ../fish/guestfish-actions.pod:1016
7893 " download remotefilename (filename|-)\n"
7898 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031
7899 #: ../src/guestfs-actions.pod:1706 ../src/guestfs-actions.pod:1731
7901 "Download file C<remotefilename> and save it as C<filename> on the local "
7906 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5027
7907 #: ../src/guestfs-actions.pod:1709 ../src/guestfs-actions.pod:7715
7908 msgid "C<filename> can also be a named pipe."
7912 #: ../fish/guestfish-actions.pod:1023
7913 msgid "See also L</upload>, L</cat>."
7917 #: ../fish/guestfish-actions.pod:1027
7918 msgid "download-offset"
7922 #: ../fish/guestfish-actions.pod:1029
7925 " download-offset remotefilename (filename|-) offset size\n"
7930 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1734
7932 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
7933 "region must be within the file or device)."
7937 #: ../fish/guestfish-actions.pod:1037
7939 "Note that there is no limit on the amount of data that can be downloaded "
7940 "with this call, unlike with L</pread>, and this call always reads the full "
7941 "amount unless an error occurs."
7945 #: ../fish/guestfish-actions.pod:1042
7946 msgid "See also L</download>, L</pread>."
7950 #: ../fish/guestfish-actions.pod:1046
7955 #: ../fish/guestfish-actions.pod:1048
7958 " drop-caches whattodrop\n"
7963 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1759
7965 "This instructs the guest kernel to drop its page cache, and/or dentries and "
7966 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
7967 "to drop, see L<http://linux-mm.org/Drop_Caches>"
7971 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1764
7972 msgid "Setting C<whattodrop> to 3 should drop everything."
7976 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1766
7978 "This automatically calls L<sync(2)> before the operation, so that the "
7979 "maximum guest memory is freed."
7983 #: ../fish/guestfish-actions.pod:1060
7988 #: ../fish/guestfish-actions.pod:1062
7996 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1779
7998 "This command runs the C<du -s> command to estimate file space usage for "
8003 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1782
8005 "C<path> can be a file or a directory. If C<path> is a directory then the "
8006 "estimate includes the contents of the directory and all subdirectories "
8011 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1786
8013 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8017 #: ../fish/guestfish-actions.pod:1074
8022 #: ../fish/guestfish-actions.pod:1076
8025 " e2fsck-f device\n"
8030 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1804
8032 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8033 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8038 #: ../fish/guestfish-actions.pod:1082
8040 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8041 "should use L</fsck>."
8045 #: ../fish/guestfish-actions.pod:1085
8050 #: ../fish/guestfish-actions.pod:1087
8053 " echo-daemon 'words ...'\n"
8058 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1821
8060 "This command concatenates the list of C<words> passed with single spaces "
8061 "between them and returns the resulting string."
8065 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1824
8066 msgid "You can use this command to test the connection through to the daemon."
8070 #: ../fish/guestfish-actions.pod:1094
8071 msgid "See also L</ping-daemon>."
8075 #: ../fish/guestfish-actions.pod:1096
8080 #: ../fish/guestfish-actions.pod:1098
8083 " egrep regex path\n"
8088 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1840
8090 "This calls the external C<egrep> program and returns the matching lines."
8094 #: ../fish/guestfish-actions.pod:1106
8099 #: ../fish/guestfish-actions.pod:1108
8102 " egrepi regex path\n"
8107 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1859
8109 "This calls the external C<egrep -i> program and returns the matching lines."
8113 #: ../fish/guestfish-actions.pod:1116
8118 #: ../fish/guestfish-actions.pod:1118
8121 " equal file1 file2\n"
8126 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1878
8128 "This compares the two files C<file1> and C<file2> and returns true if their "
8129 "content is exactly equal, or false otherwise."
8133 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1881
8134 msgid "The external L<cmp(1)> program is used for the comparison."
8138 #: ../fish/guestfish-actions.pod:1125
8143 #: ../fish/guestfish-actions.pod:1127
8151 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1893
8153 "This returns C<true> if and only if there is a file, directory (or anything) "
8154 "with the given C<path> name."
8158 #: ../fish/guestfish-actions.pod:1132
8159 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8163 #: ../fish/guestfish-actions.pod:1134
8168 #: ../fish/guestfish-actions.pod:1136
8171 " fallocate path len\n"
8176 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157
8177 #: ../src/guestfs-actions.pod:1916 ../src/guestfs-actions.pod:1935
8179 "This command preallocates a file (containing zero bytes) named C<path> of "
8180 "size C<len> bytes. If the file exists already, it is overwritten."
8184 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1920
8186 "Do not confuse this with the guestfish-specific C<alloc> command which "
8187 "allocates a file in the host and attaches it as a device."
8191 #: ../fish/guestfish-actions.pod:1146
8193 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8198 #: ../fish/guestfish-actions.pod:1153
8203 #: ../fish/guestfish-actions.pod:1155
8206 " fallocate64 path len\n"
8211 #: ../fish/guestfish-actions.pod:1161
8213 "Note that this call allocates disk blocks for the file. To create a sparse "
8214 "file use L</truncate-size> instead."
8218 #: ../fish/guestfish-actions.pod:1164
8220 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8221 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8222 "maximum size of files created through that call to 1GB."
8226 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1947
8228 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8229 "commands which create a file in the host and attach it as a device."
8233 #: ../fish/guestfish-actions.pod:1173
8238 #: ../fish/guestfish-actions.pod:1175
8241 " fgrep pattern path\n"
8246 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1962
8248 "This calls the external C<fgrep> program and returns the matching lines."
8252 #: ../fish/guestfish-actions.pod:1183
8257 #: ../fish/guestfish-actions.pod:1185
8260 " fgrepi pattern path\n"
8265 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1981
8267 "This calls the external C<fgrep -i> program and returns the matching lines."
8271 #: ../fish/guestfish-actions.pod:1193
8276 #: ../fish/guestfish-actions.pod:1195
8284 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:1999
8286 "This call uses the standard L<file(1)> command to determine the type or "
8287 "contents of the file."
8291 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2002
8293 "This call will also transparently look inside various types of compressed "
8298 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2005
8300 "The exact command which runs is C<file -zb path>. Note in particular that "
8301 "the filename is not prepended to the output (the I<-b> option)."
8305 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2009
8307 "The output depends on the output of the underlying L<file(1)> command and it "
8308 "can change in future in ways beyond our control. In other words, the output "
8309 "is not guaranteed by the ABI."
8313 #: ../fish/guestfish-actions.pod:1211
8315 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8316 "(etc), L</is-zero>."
8320 #: ../fish/guestfish-actions.pod:1214
8321 msgid "file-architecture"
8325 #: ../fish/guestfish-actions.pod:1216
8328 " file-architecture filename\n"
8333 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2027
8335 "This detects the architecture of the binary C<filename>, and returns it if "
8340 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2030
8341 msgid "Currently defined architectures are:"
8345 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2034
8350 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2036
8352 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8353 "irrespective of the precise processor requirements of the binary."
8357 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2039
8362 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2041
8363 msgid "64 bit x86-64."
8367 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2043
8372 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2045
8373 msgid "32 bit SPARC."
8377 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2047
8382 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2049
8383 msgid "64 bit SPARC V9 and above."
8387 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2051
8392 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2053
8393 msgid "Intel Itanium."
8397 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2055
8402 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2057
8403 msgid "32 bit Power PC."
8407 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2059
8412 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2061
8413 msgid "64 bit Power PC."
8417 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2065
8418 msgid "Libguestfs may return other architecture strings in future."
8422 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2067
8423 msgid "The function works on at least the following types of files:"
8427 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2073
8428 msgid "many types of Un*x and Linux binary"
8432 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2077
8433 msgid "many types of Un*x and Linux shared library"
8437 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2081
8438 msgid "Windows Win32 and Win64 binaries"
8442 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2085
8443 msgid "Windows Win32 and Win64 DLLs"
8447 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2087
8448 msgid "Win32 binaries and DLLs return C<i386>."
8452 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2089
8453 msgid "Win64 binaries and DLLs return C<x86_64>."
8457 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2093
8458 msgid "Linux kernel modules"
8462 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2097
8463 msgid "Linux new-style initrd images"
8467 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2101
8468 msgid "some non-x86 Linux vmlinuz kernels"
8472 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2105
8473 msgid "What it can't do currently:"
8477 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2111
8478 msgid "static libraries (libfoo.a)"
8482 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2115
8483 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8487 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2119
8488 msgid "x86 Linux vmlinuz kernels"
8492 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2121
8494 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8495 "compressed code, and are horribly hard to unpack. If you want to find the "
8496 "architecture of a kernel, use the architecture of the associated initrd or "
8497 "kernel module(s) instead."
8501 #: ../fish/guestfish-actions.pod:1319
8506 #: ../fish/guestfish-actions.pod:1321
8514 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2139
8515 msgid "This command returns the size of C<file> in bytes."
8519 #: ../fish/guestfish-actions.pod:1325
8521 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
8522 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
8526 #: ../fish/guestfish-actions.pod:1329
8531 #: ../fish/guestfish-actions.pod:1331
8534 " fill c len path\n"
8539 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2157
8541 "This command creates a new file called C<path>. The initial content of the "
8542 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
8547 #: ../fish/guestfish-actions.pod:1337
8549 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8550 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8555 #: ../fish/guestfish-actions.pod:1342
8556 msgid "fill-pattern"
8560 #: ../fish/guestfish-actions.pod:1344
8563 " fill-pattern pattern len path\n"
8568 #: ../fish/guestfish-actions.pod:1346
8570 "This function is like L</fill> except that it creates a new file of length "
8571 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8572 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8577 #: ../fish/guestfish-actions.pod:1351
8582 #: ../fish/guestfish-actions.pod:1353
8590 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2203
8592 "This command lists out all files and directories, recursively, starting at "
8593 "C<directory>. It is essentially equivalent to running the shell command "
8594 "C<find directory -print> but some post-processing happens on the output, "
8599 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2208
8601 "This returns a list of strings I<without any prefix>. Thus if the directory "
8606 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2211
8616 #: ../fish/guestfish-actions.pod:1367
8617 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8621 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2218
8632 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2223
8633 msgid "If C<directory> is not a directory, then this command returns an error."
8637 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2226
8638 msgid "The returned list is sorted."
8642 #: ../fish/guestfish-actions.pod:1380
8643 msgid "See also L</find0>."
8647 #: ../fish/guestfish-actions.pod:1385
8652 #: ../fish/guestfish-actions.pod:1387
8655 " find0 directory (files|-)\n"
8660 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2246
8662 "This command lists out all files and directories, recursively, starting at "
8663 "C<directory>, placing the resulting list in the external file called "
8668 #: ../fish/guestfish-actions.pod:1393
8670 "This command works the same way as L</find> with the following exceptions:"
8674 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2257
8675 msgid "The resulting list is written to an external file."
8679 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2261
8681 "Items (filenames) in the result are separated by C<\\0> characters. See "
8682 "L<find(1)> option I<-print0>."
8686 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2266
8687 msgid "This command is not limited in the number of names that it can return."
8691 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2271
8692 msgid "The result list is not sorted."
8696 #: ../fish/guestfish-actions.pod:1420
8697 msgid "findfs-label"
8701 #: ../fish/guestfish-actions.pod:1422
8704 " findfs-label label\n"
8709 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2285
8711 "This command searches the filesystems and returns the one which has the "
8712 "given label. An error is returned if no such filesystem can be found."
8716 #: ../fish/guestfish-actions.pod:1428
8717 msgid "To find the label of a filesystem, use L</vfs-label>."
8721 #: ../fish/guestfish-actions.pod:1430
8726 #: ../fish/guestfish-actions.pod:1432
8729 " findfs-uuid uuid\n"
8734 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2302
8736 "This command searches the filesystems and returns the one which has the "
8737 "given UUID. An error is returned if no such filesystem can be found."
8741 #: ../fish/guestfish-actions.pod:1438
8742 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8746 #: ../fish/guestfish-actions.pod:1440
8751 #: ../fish/guestfish-actions.pod:1442
8754 " fsck fstype device\n"
8759 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2320
8761 "This runs the filesystem checker (fsck) on C<device> which should have "
8762 "filesystem type C<fstype>."
8766 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2323
8768 "The returned integer is the status. See L<fsck(8)> for the list of status "
8769 "codes from C<fsck>."
8773 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2332
8774 msgid "Multiple status codes can be summed together."
8778 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2336
8780 "A non-zero return code can mean \"success\", for example if errors have been "
8781 "corrected on the filesystem."
8785 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2341
8786 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8790 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2346
8792 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8796 #: ../fish/guestfish-actions.pod:1472
8801 #: ../fish/guestfish-actions.pod:1474
8809 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2357
8811 "Return the additional kernel options which are added to the guest kernel "
8816 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2360
8817 msgid "If C<NULL> then no options are added."
8821 #: ../fish/guestfish-actions.pod:1481
8822 msgid "get-attach-method"
8826 #: ../fish/guestfish-actions.pod:1483
8829 " get-attach-method\n"
8834 #: ../fish/guestfish-actions.pod:1485
8835 msgid "Return the current attach method. See L</set-attach-method>."
8839 #: ../fish/guestfish-actions.pod:1487
8840 msgid "get-autosync"
8844 #: ../fish/guestfish-actions.pod:1489
8852 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2385
8853 msgid "Get the autosync flag."
8857 #: ../fish/guestfish-actions.pod:1493
8862 #: ../fish/guestfish-actions.pod:1495
8870 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2396
8871 msgid "Return the direct appliance mode flag."
8875 #: ../fish/guestfish-actions.pod:1499
8880 #: ../fish/guestfish-actions.pod:1501
8883 " get-e2label device\n"
8888 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2415
8890 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
8894 #: ../fish/guestfish-actions.pod:1506
8896 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
8901 #: ../fish/guestfish-actions.pod:1513
8906 #: ../fish/guestfish-actions.pod:1515
8909 " get-e2uuid device\n"
8914 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2436
8916 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
8920 #: ../fish/guestfish-actions.pod:1520
8922 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
8927 #: ../fish/guestfish-actions.pod:1527
8932 #: ../fish/guestfish-actions.pod:1529
8940 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2449
8942 "This gets the memory size in megabytes allocated to the qemu subprocess."
8946 #: ../fish/guestfish-actions.pod:1534
8948 "If L</set-memsize> was not called on this handle, and if "
8949 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
8950 "value for memsize."
8954 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:1595
8955 #: ../fish/guestfish-actions.pod:4375 ../fish/guestfish-actions.pod:4477
8956 #: ../src/guestfs-actions.pod:2456 ../src/guestfs-actions.pod:2548
8957 #: ../src/guestfs-actions.pod:6760 ../src/guestfs-actions.pod:6886
8959 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
8963 #: ../fish/guestfish-actions.pod:1541
8968 #: ../fish/guestfish-actions.pod:1543
8976 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2468
8977 msgid "This returns the enable network flag."
8981 #: ../fish/guestfish-actions.pod:1547
8986 #: ../fish/guestfish-actions.pod:1549
8994 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2479
8995 msgid "Return the current search path."
8999 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2481
9001 "This is always non-NULL. If it wasn't set already, then this will return "
9006 #: ../fish/guestfish-actions.pod:1556
9011 #: ../fish/guestfish-actions.pod:1558
9019 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2494
9020 msgid "This returns the process group flag."
9024 #: ../fish/guestfish-actions.pod:1562
9029 #: ../fish/guestfish-actions.pod:1564
9034 #: ../fish/guestfish-actions.pod:1566
9042 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2505
9044 "Return the process ID of the qemu subprocess. If there is no qemu "
9045 "subprocess, then this will return an error."
9049 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2508
9050 msgid "This is an internal call used for debugging and testing."
9054 #: ../fish/guestfish-actions.pod:1573
9059 #: ../fish/guestfish-actions.pod:1575
9067 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2519
9068 msgid "Return the current qemu binary."
9072 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2521
9074 "This is always non-NULL. If it wasn't set already, then this will return "
9075 "the default qemu binary name."
9079 #: ../fish/guestfish-actions.pod:1582
9080 msgid "get-recovery-proc"
9084 #: ../fish/guestfish-actions.pod:1584
9087 " get-recovery-proc\n"
9092 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2534
9093 msgid "Return the recovery process enabled flag."
9097 #: ../fish/guestfish-actions.pod:1588
9102 #: ../fish/guestfish-actions.pod:1590
9110 #: ../fish/guestfish-actions.pod:1592
9112 "This returns the current setting of the selinux flag which is passed to the "
9113 "appliance at boot time. See L</set-selinux>."
9117 #: ../fish/guestfish-actions.pod:1598
9122 #: ../fish/guestfish-actions.pod:1600
9130 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2560
9131 msgid "This returns the number of virtual CPUs assigned to the appliance."
9135 #: ../fish/guestfish-actions.pod:1604
9140 #: ../fish/guestfish-actions.pod:1606
9148 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2571
9150 "This returns the current state as an opaque integer. This is only useful "
9151 "for printing debug and internal error messages."
9155 #: ../fish/guestfish-actions.pod:1611 ../fish/guestfish-actions.pod:2570
9156 #: ../fish/guestfish-actions.pod:2588 ../fish/guestfish-actions.pod:2626
9157 #: ../fish/guestfish-actions.pod:2642 ../src/guestfs-actions.pod:2574
9158 #: ../src/guestfs-actions.pod:3893 ../src/guestfs-actions.pod:3922
9159 #: ../src/guestfs-actions.pod:3983 ../src/guestfs-actions.pod:4010
9160 msgid "For more information on states, see L<guestfs(3)>."
9164 #: ../fish/guestfish-actions.pod:1613
9169 #: ../fish/guestfish-actions.pod:1615
9177 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2585
9178 msgid "Return the command trace flag."
9182 #: ../fish/guestfish-actions.pod:1619
9187 #: ../fish/guestfish-actions.pod:1621
9195 #: ../fish/guestfish-actions.pod:1623
9197 "Return the current umask. By default the umask is C<022> unless it has been "
9198 "set by calling L</umask>."
9202 #: ../fish/guestfish-actions.pod:1626
9207 #: ../fish/guestfish-actions.pod:1628
9215 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2608
9216 msgid "This returns the verbose messages flag."
9220 #: ../fish/guestfish-actions.pod:1632
9225 #: ../fish/guestfish-actions.pod:1634
9233 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2619
9234 msgid "This gets the SELinux security context of the daemon."
9238 #: ../fish/guestfish-actions.pod:1638
9239 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9243 #: ../fish/guestfish-actions.pod:1641
9248 #: ../fish/guestfish-actions.pod:1643
9251 " getxattr path name\n"
9256 #: ../fish/guestfish-actions.pod:1645
9258 "Get a single extended attribute from file C<path> named C<name>. This call "
9259 "follows symlinks. If you want to lookup an extended attribute for the "
9260 "symlink itself, use L</lgetxattr>."
9264 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2715
9266 "Normally it is better to get all extended attributes from a file in one go "
9267 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9268 "buggy and do not provide a way to list out attributes. For these "
9269 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9270 "attributes you want in advance and call this function."
9274 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2722
9275 #: ../src/guestfs-actions.pod:2648 ../src/guestfs-actions.pod:4143
9277 "Extended attribute values are blobs of binary data. If there is no extended "
9278 "attribute named C<name>, this returns an error."
9282 #: ../fish/guestfish-actions.pod:1659
9283 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9287 #: ../fish/guestfish-actions.pod:1661
9292 #: ../fish/guestfish-actions.pod:1663
9300 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2665
9302 "This call lists the extended attributes of the file or directory C<path>."
9306 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2668
9308 "At the system call level, this is a combination of the L<listxattr(2)> and "
9309 "L<getxattr(2)> calls."
9313 #: ../fish/guestfish-actions.pod:1671
9314 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9318 #: ../fish/guestfish-actions.pod:1673
9323 #: ../fish/guestfish-actions.pod:1675
9326 " glob-expand pattern\n"
9331 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2685
9333 "This command searches for all the pathnames matching C<pattern> according to "
9334 "the wildcard expansion rules used by the shell."
9338 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2689
9340 "If no paths match, then this returns an empty list (note: not an error)."
9344 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2692
9346 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
9347 "GLOB_BRACE>. See that manual page for more details."
9351 #: ../fish/guestfish-actions.pod:1688
9356 #: ../fish/guestfish-actions.pod:1690
9359 " grep regex path\n"
9364 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2709
9365 msgid "This calls the external C<grep> program and returns the matching lines."
9369 #: ../fish/guestfish-actions.pod:1698
9374 #: ../fish/guestfish-actions.pod:1700
9377 " grepi regex path\n"
9382 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2728
9384 "This calls the external C<grep -i> program and returns the matching lines."
9388 #: ../fish/guestfish-actions.pod:1708
9389 msgid "grub-install"
9393 #: ../fish/guestfish-actions.pod:1710
9396 " grub-install root device\n"
9401 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2747
9403 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9404 "with the root directory being C<root>."
9408 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2756
9410 "There is currently no way in the API to install grub2, which is used by most "
9411 "modern Linux guests. It is possible to run the grub2 command from the "
9412 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9416 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2763
9418 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9419 "compatible with itself, so this only works in rather narrow circumstances. "
9420 "Careful testing with each guest version is advisable."
9424 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2770
9426 "If grub-install reports the error \"No suitable drive was found in the "
9427 "generated device map.\" it may be that you need to create a C</boot/grub/"
9428 "device.map> file first that contains the mapping between grub device names "
9429 "and Linux device names. It is usually sufficient to create a file "
9434 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2777
9442 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2779
9443 msgid "replacing C</dev/vda> with the name of the installation device."
9447 #: ../fish/guestfish-actions.pod:1748
9452 #: ../fish/guestfish-actions.pod:1750
9460 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2793
9462 "This command returns up to the first 10 lines of a file as a list of strings."
9466 #: ../fish/guestfish-actions.pod:1758
9471 #: ../fish/guestfish-actions.pod:1760
9474 " head-n nrlines path\n"
9479 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2812
9481 "If the parameter C<nrlines> is a positive number, this returns the first "
9482 "C<nrlines> lines of the file C<path>."
9486 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2815
9488 "If the parameter C<nrlines> is a negative number, this returns lines from "
9489 "the file C<path>, excluding the last C<nrlines> lines."
9493 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4867
9494 #: ../src/guestfs-actions.pod:2818 ../src/guestfs-actions.pod:7474
9495 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9499 #: ../fish/guestfish-actions.pod:1773
9504 #: ../fish/guestfish-actions.pod:1775
9512 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2835
9514 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
9515 "readable, canonical hex dump of the file."
9519 #: ../fish/guestfish-actions.pod:1783
9524 #: ../fish/guestfish-actions.pod:1785
9527 " initrd-cat initrdpath filename\n"
9532 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2854
9534 "This command unpacks the file C<filename> from the initrd file called "
9535 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9540 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2858
9542 "For example, in guestfish you could use the following command to examine the "
9543 "boot script (usually called C</init>) contained in a Linux initrd or "
9548 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2862
9551 " initrd-cat /boot/initrd-<version>.img init\n"
9556 #: ../fish/guestfish-actions.pod:1797
9557 msgid "See also L</initrd-list>."
9561 #: ../fish/guestfish-actions.pod:1802
9566 #: ../fish/guestfish-actions.pod:1804
9569 " initrd-list path\n"
9574 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2881
9575 msgid "This command lists out files contained in an initrd."
9579 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2883
9581 "The files are listed without any initial C</> character. The files are "
9582 "listed in the order they appear (not necessarily alphabetical). Directory "
9583 "names are listed as separate items."
9587 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2887
9589 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9590 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9595 #: ../fish/guestfish-actions.pod:1816
9596 msgid "inotify-add-watch"
9600 #: ../fish/guestfish-actions.pod:1818
9603 " inotify-add-watch path mask\n"
9608 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2904
9609 msgid "Watch C<path> for the events listed in C<mask>."
9613 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2906
9615 "Note that if C<path> is a directory then events within that directory are "
9616 "watched, but this does I<not> happen recursively (in subdirectories)."
9620 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2910
9622 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9623 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9627 #: ../fish/guestfish-actions.pod:1830
9628 msgid "inotify-close"
9632 #: ../fish/guestfish-actions.pod:1832
9640 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2923
9642 "This closes the inotify handle which was previously opened by inotify_init. "
9643 "It removes all watches, throws away any pending events, and deallocates all "
9648 #: ../fish/guestfish-actions.pod:1838
9649 msgid "inotify-files"
9653 #: ../fish/guestfish-actions.pod:1840
9661 #: ../fish/guestfish-actions.pod:1842
9663 "This function is a helpful wrapper around L</inotify-read> which just "
9664 "returns a list of pathnames of objects that were touched. The returned "
9665 "pathnames are sorted and deduplicated."
9669 #: ../fish/guestfish-actions.pod:1846
9670 msgid "inotify-init"
9674 #: ../fish/guestfish-actions.pod:1848
9677 " inotify-init maxevents\n"
9682 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2952
9684 "This command creates a new inotify handle. The inotify subsystem can be "
9685 "used to notify events which happen to objects in the guest filesystem."
9689 #: ../fish/guestfish-actions.pod:1854
9691 "C<maxevents> is the maximum number of events which will be queued up between "
9692 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9693 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9694 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9695 "but records the fact that it threw them away by setting a flag "
9696 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9700 #: ../fish/guestfish-actions.pod:1864
9702 "Before any events are generated, you have to add some watches to the "
9703 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9704 "L</inotify-watch-all>."
9708 #: ../fish/guestfish-actions.pod:1870
9710 "Queued up events should be read periodically by calling L</inotify-read> (or "
9711 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9712 "If you don't read the events out often enough then you risk the internal "
9713 "queue overflowing."
9717 #: ../fish/guestfish-actions.pod:1877
9719 "The handle should be closed after use by calling L</inotify-close>. This "
9720 "also removes any watches automatically."
9724 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2983
9726 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9727 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9728 "that there is one global inotify handle per libguestfs instance."
9732 #: ../fish/guestfish-actions.pod:1886
9733 msgid "inotify-read"
9737 #: ../fish/guestfish-actions.pod:1888
9745 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:2997
9747 "Return the complete queue of events that have happened since the previous "
9752 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3000
9753 msgid "If no events have happened, this returns an empty list."
9757 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3002
9759 "I<Note>: In order to make sure that all events have been read, you must call "
9760 "this function repeatedly until it returns an empty list. The reason is that "
9761 "the call will read events up to the maximum appliance-to-host message size "
9762 "and leave remaining events in the queue."
9766 #: ../fish/guestfish-actions.pod:1901
9767 msgid "inotify-rm-watch"
9771 #: ../fish/guestfish-actions.pod:1903
9774 " inotify-rm-watch wd\n"
9779 #: ../fish/guestfish-actions.pod:1905
9780 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9784 #: ../fish/guestfish-actions.pod:1908
9785 msgid "inspect-get-arch"
9789 #: ../fish/guestfish-actions.pod:1910
9792 " inspect-get-arch root\n"
9797 #: ../fish/guestfish-actions.pod:1912
9799 "This returns the architecture of the inspected operating system. The "
9800 "possible return values are listed under L</file-architecture>."
9804 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3037
9806 "If the architecture could not be determined, then the string C<unknown> is "
9811 #: ../fish/guestfish-actions.pod:1919 ../fish/guestfish-actions.pod:2014
9812 #: ../fish/guestfish-actions.pod:2093 ../fish/guestfish-actions.pod:2105
9813 #: ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2251
9814 #: ../fish/guestfish-actions.pod:2272 ../fish/guestfish-actions.pod:2286
9815 #: ../fish/guestfish-actions.pod:2326 ../fish/guestfish-actions.pod:2362
9816 #: ../fish/guestfish-actions.pod:2375 ../fish/guestfish-actions.pod:2388
9817 #: ../fish/guestfish-actions.pod:2398 ../fish/guestfish-actions.pod:2408
9818 #: ../fish/guestfish-actions.pod:2420 ../fish/guestfish-actions.pod:2516
9819 #: ../fish/guestfish-actions.pod:2550 ../src/guestfs-actions.pod:3040
9820 #: ../src/guestfs-actions.pod:3142 ../src/guestfs-actions.pod:3246
9821 #: ../src/guestfs-actions.pod:3265 ../src/guestfs-actions.pod:3396
9822 #: ../src/guestfs-actions.pod:3480 ../src/guestfs-actions.pod:3508
9823 #: ../src/guestfs-actions.pod:3529 ../src/guestfs-actions.pod:3582
9824 #: ../src/guestfs-actions.pod:3626 ../src/guestfs-actions.pod:3646
9825 #: ../src/guestfs-actions.pod:3666 ../src/guestfs-actions.pod:3683
9826 #: ../src/guestfs-actions.pod:3699 ../src/guestfs-actions.pod:3717
9827 #: ../src/guestfs-actions.pod:3819 ../src/guestfs-actions.pod:3860
9828 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9832 #: ../fish/guestfish-actions.pod:1921
9833 msgid "inspect-get-distro"
9837 #: ../fish/guestfish-actions.pod:1923
9840 " inspect-get-distro root\n"
9845 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3053
9847 "This returns the distro (distribution) of the inspected operating system."
9851 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3056
9852 msgid "Currently defined distros are:"
9856 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3060
9857 msgid "\"archlinux\""
9861 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3062
9866 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3064
9871 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3066
9876 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3068
9881 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3070
9886 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3072
9891 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3074
9896 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3076
9901 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3078
9906 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3080
9907 msgid "\"linuxmint\""
9911 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3082
9916 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3084
9921 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3086
9926 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3088
9927 msgid "\"mandriva\""
9931 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3090
9936 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3092
9941 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3094
9946 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3096
9947 msgid "\"opensuse\""
9951 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3098
9956 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3100
9961 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3102
9966 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3104
9967 msgid "\"redhat-based\""
9971 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3106
9972 msgid "Some Red Hat-derived distro."
9976 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3108
9981 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3110
9982 msgid "Red Hat Enterprise Linux."
9986 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3112
9987 msgid "\"scientificlinux\""
9991 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3114
9992 msgid "Scientific Linux."
9996 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3116
9997 msgid "\"slackware\""
10001 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3118
10006 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3120
10007 msgid "\"ttylinux\""
10011 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3122
10016 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3124
10021 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3126
10026 #: ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2084
10027 #: ../fish/guestfish-actions.pod:2353 ../src/guestfs-actions.pod:3128
10028 #: ../src/guestfs-actions.pod:3237 ../src/guestfs-actions.pod:3617
10029 msgid "\"unknown\""
10033 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3130
10034 msgid "The distro could not be determined."
10038 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341
10039 #: ../src/guestfs-actions.pod:3132 ../src/guestfs-actions.pod:3605
10040 msgid "\"windows\""
10044 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3134
10046 "Windows does not have distributions. This string is returned if the OS type "
10051 #: ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2090
10052 #: ../fish/guestfish-actions.pod:2359 ../src/guestfs-actions.pod:3139
10053 #: ../src/guestfs-actions.pod:3243 ../src/guestfs-actions.pod:3623
10055 "Future versions of libguestfs may return other strings here. The caller "
10056 "should be prepared to handle any string."
10060 #: ../fish/guestfish-actions.pod:2016
10061 msgid "inspect-get-drive-mappings"
10065 #: ../fish/guestfish-actions.pod:2018
10068 " inspect-get-drive-mappings root\n"
10073 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3155
10075 "This call is useful for Windows which uses a primitive system of assigning "
10076 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10077 "Windows Registry to find out how disks/partitions are mapped to drive "
10078 "letters, and returns a hash table as in the example below:"
10082 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3161
10085 " C => /dev/vda2\n"
10086 " E => /dev/vdb1\n"
10087 " F => /dev/vdc1\n"
10092 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3165
10094 "Note that keys are drive letters. For Windows, the key is case insensitive "
10095 "and just contains the drive letter, without the customary colon separator "
10100 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3169
10102 "In future we may support other operating systems that also used drive "
10103 "letters, but the keys for those might not be case insensitive and might be "
10104 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10109 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3174
10111 "For Windows guests, currently only hard drive mappings are returned. "
10112 "Removable disks (eg. DVD-ROMs) are ignored."
10116 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3177
10118 "For guests that do not use drive mappings, or if the drive mappings could "
10119 "not be determined, this returns an empty hash table."
10123 #: ../fish/guestfish-actions.pod:2045
10125 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10126 "get-mountpoints>, L</inspect-get-filesystems>."
10130 #: ../fish/guestfish-actions.pod:2049
10131 msgid "inspect-get-filesystems"
10135 #: ../fish/guestfish-actions.pod:2051
10138 " inspect-get-filesystems root\n"
10143 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3198
10145 "This returns a list of all the filesystems that we think are associated with "
10146 "this operating system. This includes the root filesystem, other ordinary "
10147 "filesystems, and non-mounted devices like swap partitions."
10151 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3203
10153 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10154 "to be shared between operating systems."
10158 #: ../fish/guestfish-actions.pod:2061
10160 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10161 "get-mountpoints>."
10165 #: ../fish/guestfish-actions.pod:2064
10166 msgid "inspect-get-format"
10170 #: ../fish/guestfish-actions.pod:2066
10173 " inspect-get-format root\n"
10178 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3221
10180 "This returns the format of the inspected operating system. You can use it "
10181 "to detect install images, live CDs and similar."
10185 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3224
10186 msgid "Currently defined formats are:"
10190 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3228
10191 msgid "\"installed\""
10195 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3230
10196 msgid "This is an installed operating system."
10200 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3232
10201 msgid "\"installer\""
10205 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3234
10207 "The disk image being inspected is not an installed operating system, but a "
10208 "I<bootable> install disk, live CD, or similar."
10212 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3239
10213 msgid "The format of this disk image is not known."
10217 #: ../fish/guestfish-actions.pod:2095
10218 msgid "inspect-get-hostname"
10222 #: ../fish/guestfish-actions.pod:2097
10225 " inspect-get-hostname root\n"
10230 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3259
10232 "This function returns the hostname of the operating system as found by "
10233 "inspection of the guest's configuration files."
10237 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3262
10239 "If the hostname could not be determined, then the string C<unknown> is "
10244 #: ../fish/guestfish-actions.pod:2107
10245 msgid "inspect-get-icon"
10249 #: ../fish/guestfish-actions.pod:2109
10252 " inspect-get-icon root [favicon:..] [highquality:..]\n"
10257 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3288
10259 "This function returns an icon corresponding to the inspected operating "
10260 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10261 "to PNG if necessary)."
10265 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3292
10267 "If it was not possible to get an icon this function returns a zero-length "
10268 "(non-NULL) buffer. I<Callers must check for this case>."
10272 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3295
10274 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10275 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10276 "this file will be returned. You can disable favicons by passing the "
10277 "optional C<favicon> boolean as false (default is true)."
10281 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3301
10283 "If finding the favicon fails, then we look in other places in the guest for "
10288 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3304
10290 "If the optional C<highquality> boolean is true then only high quality icons "
10291 "are returned, which means only icons of high resolution with an alpha "
10292 "channel. The default (false) is to return any icon we can, even if it is of "
10293 "substandard quality."
10297 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3315
10299 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10300 "before you call this, since it needs to read information from the guest "
10301 "filesystem during the call."
10305 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3321
10307 "B<Security:> The icon data comes from the untrusted guest, and should be "
10308 "treated with caution. PNG files have been known to contain exploits. "
10309 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10310 "trying to process or display the icon."
10314 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3329
10316 "The PNG image returned can be any size. It might not be square. Libguestfs "
10317 "tries to return the largest, highest quality icon available. The "
10318 "application must scale the icon to the required size."
10322 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3336
10324 "Extracting icons from Windows guests requires the external C<wrestool> "
10325 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10326 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10327 "installed separately."
10331 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3343
10333 "Operating system icons are usually trademarks. Seek legal advice before "
10334 "using trademarks in applications."
10338 #: ../fish/guestfish-actions.pod:2173
10339 msgid "inspect-get-major-version"
10343 #: ../fish/guestfish-actions.pod:2175
10346 " inspect-get-major-version root\n"
10351 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3384
10353 "This returns the major version number of the inspected operating system."
10357 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3387
10359 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10360 "popular public names used by the operating system. Notably the operating "
10361 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10362 "1). You can find out the real versions corresponding to releases of Windows "
10363 "by consulting Wikipedia or MSDN."
10367 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198
10368 #: ../src/guestfs-actions.pod:3394 ../src/guestfs-actions.pod:3411
10369 msgid "If the version could not be determined, then C<0> is returned."
10373 #: ../fish/guestfish-actions.pod:2191
10374 msgid "inspect-get-minor-version"
10378 #: ../fish/guestfish-actions.pod:2193
10381 " inspect-get-minor-version root\n"
10386 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3408
10388 "This returns the minor version number of the inspected operating system."
10392 #: ../fish/guestfish-actions.pod:2200
10394 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10395 "get-major-version>."
10399 #: ../fish/guestfish-actions.pod:2203
10400 msgid "inspect-get-mountpoints"
10404 #: ../fish/guestfish-actions.pod:2205
10407 " inspect-get-mountpoints root\n"
10412 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3426
10414 "This returns a hash of where we think the filesystems associated with this "
10415 "operating system should be mounted. Callers should note that this is at "
10416 "best an educated guess made by reading configuration files such as C</etc/"
10417 "fstab>. I<In particular note> that this may return filesystems which are "
10418 "non-existent or not mountable and callers should be prepared to handle or "
10419 "ignore failures if they try to mount them."
10423 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3435
10425 "Each element in the returned hashtable has a key which is the path of the "
10426 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10427 "mounted there (eg. C</dev/sda1>)."
10431 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3440
10433 "Non-mounted devices such as swap devices are I<not> returned in this list."
10437 #: ../fish/guestfish-actions.pod:2224
10439 "For operating systems like Windows which still use drive letters, this call "
10440 "will only return an entry for the first drive \"mounted on\" C</>. For "
10441 "information about the mapping of drive letters to partitions, see L</inspect-"
10442 "get-drive-mappings>."
10446 #: ../fish/guestfish-actions.pod:2230
10448 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10449 "get-filesystems>."
10453 #: ../fish/guestfish-actions.pod:2233
10454 msgid "inspect-get-package-format"
10458 #: ../fish/guestfish-actions.pod:2235
10461 " inspect-get-package-format root\n"
10466 #: ../fish/guestfish-actions.pod:2237
10468 "This function and L</inspect-get-package-management> return the package "
10469 "format and package management tool used by the inspected operating system. "
10470 "For example for Fedora these functions would return C<rpm> (package format) "
10471 "and C<yum> (package management)."
10475 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3472
10477 "This returns the string C<unknown> if we could not determine the package "
10478 "format I<or> if the operating system does not have a real packaging system "
10483 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3476
10485 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10486 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10490 #: ../fish/guestfish-actions.pod:2253
10491 msgid "inspect-get-package-management"
10495 #: ../fish/guestfish-actions.pod:2255
10498 " inspect-get-package-management root\n"
10503 #: ../fish/guestfish-actions.pod:2257
10505 "L</inspect-get-package-format> and this function return the package format "
10506 "and package management tool used by the inspected operating system. For "
10507 "example for Fedora these functions would return C<rpm> (package format) and "
10508 "C<yum> (package management)."
10512 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3499
10514 "This returns the string C<unknown> if we could not determine the package "
10515 "management tool I<or> if the operating system does not have a real packaging "
10516 "system (eg. Windows)."
10520 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3503
10522 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10523 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10524 "versions of libguestfs may return other strings."
10528 #: ../fish/guestfish-actions.pod:2274
10529 msgid "inspect-get-product-name"
10533 #: ../fish/guestfish-actions.pod:2276
10536 " inspect-get-product-name root\n"
10541 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3521
10543 "This returns the product name of the inspected operating system. The "
10544 "product name is generally some freeform string which can be displayed to the "
10545 "user, but should not be parsed by programs."
10549 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3526
10551 "If the product name could not be determined, then the string C<unknown> is "
10556 #: ../fish/guestfish-actions.pod:2288
10557 msgid "inspect-get-product-variant"
10561 #: ../fish/guestfish-actions.pod:2290
10564 " inspect-get-product-variant root\n"
10569 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3542
10570 msgid "This returns the product variant of the inspected operating system."
10574 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3545
10576 "For Windows guests, this returns the contents of the Registry key C<HKLM"
10577 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
10578 "is usually a string such as C<Client> or C<Server> (other values are "
10579 "possible). This can be used to distinguish consumer and enterprise versions "
10580 "of Windows that have the same version number (for example, Windows 7 and "
10581 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10582 "the latter is C<Server>)."
10586 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3554
10588 "For enterprise Linux guests, in future we intend this to return the product "
10589 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10590 "implemented at present."
10594 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3558
10596 "If the product variant could not be determined, then the string C<unknown> "
10601 #: ../fish/guestfish-actions.pod:2311
10603 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10604 "get-product-name>, L</inspect-get-major-version>."
10608 #: ../fish/guestfish-actions.pod:2315
10609 msgid "inspect-get-roots"
10613 #: ../fish/guestfish-actions.pod:2317
10616 " inspect-get-roots\n"
10621 #: ../fish/guestfish-actions.pod:2319
10623 "This function is a convenient way to get the list of root devices, as "
10624 "returned from a previous call to L</inspect-os>, but without redoing the "
10625 "whole inspection process."
10629 #: ../fish/guestfish-actions.pod:2323
10631 "This returns an empty list if either no root devices were found or the "
10632 "caller has not called L</inspect-os>."
10636 #: ../fish/guestfish-actions.pod:2328
10637 msgid "inspect-get-type"
10641 #: ../fish/guestfish-actions.pod:2330
10644 " inspect-get-type root\n"
10649 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3596
10651 "This returns the type of the inspected operating system. Currently defined "
10656 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3601
10661 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3603
10662 msgid "Any Linux-based operating system."
10666 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3607
10667 msgid "Any Microsoft Windows operating system."
10671 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3609
10672 msgid "\"freebsd\""
10676 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3611
10681 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3613
10686 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3615
10691 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3619
10692 msgid "The operating system type could not be determined."
10696 #: ../fish/guestfish-actions.pod:2364
10697 msgid "inspect-get-windows-current-control-set"
10701 #: ../fish/guestfish-actions.pod:2366
10704 " inspect-get-windows-current-control-set root\n"
10709 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3639
10711 "This returns the Windows CurrentControlSet of the inspected guest. The "
10712 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10716 #: ../fish/guestfish-actions.pod:2371 ../src/guestfs-actions.pod:3642
10718 "This call assumes that the guest is Windows and that the Registry could be "
10719 "examined by inspection. If this is not the case then an error is returned."
10723 #: ../fish/guestfish-actions.pod:2377
10724 msgid "inspect-get-windows-systemroot"
10728 #: ../fish/guestfish-actions.pod:2379
10731 " inspect-get-windows-systemroot root\n"
10736 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3659
10738 "This returns the Windows systemroot of the inspected guest. The systemroot "
10739 "is a directory path such as C</WINDOWS>."
10743 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3662
10745 "This call assumes that the guest is Windows and that the systemroot could be "
10746 "determined by inspection. If this is not the case then an error is returned."
10750 #: ../fish/guestfish-actions.pod:2390
10751 msgid "inspect-is-live"
10755 #: ../fish/guestfish-actions.pod:2392
10758 " inspect-is-live root\n"
10763 #: ../fish/guestfish-actions.pod:2394
10765 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10766 "then this returns true if a live image was detected on the disk."
10770 #: ../fish/guestfish-actions.pod:2400
10771 msgid "inspect-is-multipart"
10775 #: ../fish/guestfish-actions.pod:2402
10778 " inspect-is-multipart root\n"
10783 #: ../fish/guestfish-actions.pod:2404
10785 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10786 "then this returns true if the disk is part of a set."
10790 #: ../fish/guestfish-actions.pod:2410
10791 msgid "inspect-is-netinst"
10795 #: ../fish/guestfish-actions.pod:2412
10798 " inspect-is-netinst root\n"
10803 #: ../fish/guestfish-actions.pod:2414
10805 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10806 "then this returns true if the disk is a network installer, ie. not a self-"
10807 "contained install CD but one which is likely to require network access to "
10808 "complete the install."
10812 #: ../fish/guestfish-actions.pod:2422
10813 msgid "inspect-list-applications"
10817 #: ../fish/guestfish-actions.pod:2424
10820 " inspect-list-applications root\n"
10825 #: ../fish/guestfish-actions.pod:2426 ../src/guestfs-actions.pod:3729
10826 msgid "Return the list of applications installed in the operating system."
10830 #: ../fish/guestfish-actions.pod:2428
10832 "I<Note:> This call works differently from other parts of the inspection "
10833 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10834 "then mount up the disks, before calling this. Listing applications is a "
10835 "significantly more difficult operation which requires access to the full "
10836 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10837 "are just returning data cached in the libguestfs handle, this call actually "
10838 "reads parts of the mounted filesystems during the call."
10842 #: ../fish/guestfish-actions.pod:2438 ../src/guestfs-actions.pod:3741
10844 "This returns an empty list if the inspection code was not able to determine "
10845 "the list of applications."
10849 #: ../fish/guestfish-actions.pod:2441 ../src/guestfs-actions.pod:3744
10850 msgid "The application structure contains the following fields:"
10854 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3748
10855 msgid "C<app_name>"
10859 #: ../fish/guestfish-actions.pod:2447 ../src/guestfs-actions.pod:3750
10861 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10862 "guests, this is the package name."
10866 #: ../fish/guestfish-actions.pod:2450 ../src/guestfs-actions.pod:3753
10867 msgid "C<app_display_name>"
10871 #: ../fish/guestfish-actions.pod:2452 ../src/guestfs-actions.pod:3755
10873 "The display name of the application, sometimes localized to the install "
10874 "language of the guest operating system."
10878 #: ../fish/guestfish-actions.pod:2455 ../src/guestfs-actions.pod:3758
10880 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
10881 "to display something can use C<app_name> instead."
10885 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3761
10886 msgid "C<app_epoch>"
10890 #: ../fish/guestfish-actions.pod:2460 ../src/guestfs-actions.pod:3763
10892 "For package managers which use epochs, this contains the epoch of the "
10893 "package (an integer). If unavailable, this is returned as C<0>."
10897 #: ../fish/guestfish-actions.pod:2463 ../src/guestfs-actions.pod:3766
10898 msgid "C<app_version>"
10902 #: ../fish/guestfish-actions.pod:2465 ../src/guestfs-actions.pod:3768
10904 "The version string of the application or package. If unavailable this is "
10905 "returned as an empty string C<\"\">."
10909 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3771
10910 msgid "C<app_release>"
10914 #: ../fish/guestfish-actions.pod:2470 ../src/guestfs-actions.pod:3773
10916 "The release string of the application or package, for package managers that "
10917 "use this. If unavailable this is returned as an empty string C<\"\">."
10921 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3777
10922 msgid "C<app_install_path>"
10926 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3779
10928 "The installation path of the application (on operating systems such as "
10929 "Windows which use installation paths). This path is in the format used by "
10930 "the guest operating system, it is not a libguestfs path."
10934 #: ../fish/guestfish-actions.pod:2481 ../src/guestfs-actions.pod:3784
10935 msgid "If unavailable this is returned as an empty string C<\"\">."
10939 #: ../fish/guestfish-actions.pod:2483 ../src/guestfs-actions.pod:3786
10940 msgid "C<app_trans_path>"
10944 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3788
10946 "The install path translated into a libguestfs path. If unavailable this is "
10947 "returned as an empty string C<\"\">."
10951 #: ../fish/guestfish-actions.pod:2488 ../src/guestfs-actions.pod:3791
10952 msgid "C<app_publisher>"
10956 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3793
10958 "The name of the publisher of the application, for package managers that use "
10959 "this. If unavailable this is returned as an empty string C<\"\">."
10963 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3797
10968 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3799
10970 "The URL (eg. upstream URL) of the application. If unavailable this is "
10971 "returned as an empty string C<\"\">."
10975 #: ../fish/guestfish-actions.pod:2499 ../src/guestfs-actions.pod:3802
10976 msgid "C<app_source_package>"
10980 #: ../fish/guestfish-actions.pod:2501 ../src/guestfs-actions.pod:3804
10982 "For packaging systems which support this, the name of the source package. "
10983 "If unavailable this is returned as an empty string C<\"\">."
10987 #: ../fish/guestfish-actions.pod:2504 ../src/guestfs-actions.pod:3807
10988 msgid "C<app_summary>"
10992 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:3809
10994 "A short (usually one line) description of the application or package. If "
10995 "unavailable this is returned as an empty string C<\"\">."
10999 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3812
11000 msgid "C<app_description>"
11004 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3814
11006 "A longer description of the application or package. If unavailable this is "
11007 "returned as an empty string C<\"\">."
11011 #: ../fish/guestfish-actions.pod:2518
11016 #: ../fish/guestfish-actions.pod:2520
11024 #: ../fish/guestfish-actions.pod:2522 ../src/guestfs-actions.pod:3832
11026 "This function uses other libguestfs functions and certain heuristics to "
11027 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11028 "for operating systems."
11032 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3836
11033 msgid "The list returned is empty if no operating systems were found."
11037 #: ../fish/guestfish-actions.pod:2528 ../src/guestfs-actions.pod:3838
11039 "If one operating system was found, then this returns a list with a single "
11040 "element, which is the name of the root filesystem of this operating system. "
11041 "It is also possible for this function to return a list containing more than "
11042 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11043 "element being the root filesystem of one of the operating systems."
11047 #: ../fish/guestfish-actions.pod:2535
11049 "You can pass the root string(s) returned to other L</inspect-get-*> "
11050 "functions in order to query further information about each operating system, "
11051 "such as the name and version."
11055 #: ../fish/guestfish-actions.pod:2540
11057 "This function uses other libguestfs features such as L</mount-ro> and L</"
11058 "umount-all> in order to mount and unmount filesystems and look at the "
11059 "contents. This should be called with no disks currently mounted. The "
11060 "function may also use Augeas, so any existing Augeas handle will be closed."
11064 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3856
11066 "This function cannot decrypt encrypted disks. The caller must do that first "
11067 "(supplying the necessary keys) if the disk is encrypted."
11071 #: ../fish/guestfish-actions.pod:2552 ../fish/guestfish-actions.pod:2750
11072 #: ../fish/guestfish-actions.pod:2809
11073 msgid "See also L</list-filesystems>."
11077 #: ../fish/guestfish-actions.pod:2554
11078 msgid "is-blockdev"
11082 #: ../fish/guestfish-actions.pod:2556
11085 " is-blockdev path\n"
11090 #: ../fish/guestfish-actions.pod:2558 ../src/guestfs-actions.pod:3876
11092 "This returns C<true> if and only if there is a block device with the given "
11097 #: ../fish/guestfish-actions.pod:2561 ../fish/guestfish-actions.pod:2579
11098 #: ../fish/guestfish-actions.pod:2598 ../fish/guestfish-actions.pod:2607
11099 #: ../fish/guestfish-actions.pod:2617 ../fish/guestfish-actions.pod:2651
11100 #: ../fish/guestfish-actions.pod:2660
11101 msgid "See also L</stat>."
11105 #: ../fish/guestfish-actions.pod:2563
11110 #: ../fish/guestfish-actions.pod:2565
11118 #: ../fish/guestfish-actions.pod:2567 ../src/guestfs-actions.pod:3890
11120 "This returns true iff this handle is busy processing a command (in the "
11125 #: ../fish/guestfish-actions.pod:2572
11130 #: ../fish/guestfish-actions.pod:2574
11133 " is-chardev path\n"
11138 #: ../fish/guestfish-actions.pod:2576 ../src/guestfs-actions.pod:3905
11140 "This returns C<true> if and only if there is a character device with the "
11141 "given C<path> name."
11145 #: ../fish/guestfish-actions.pod:2581
11150 #: ../fish/guestfish-actions.pod:2583
11158 #: ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3919
11160 "This returns true iff this handle is being configured (in the C<CONFIG> "
11165 #: ../fish/guestfish-actions.pod:2590
11170 #: ../fish/guestfish-actions.pod:2592
11178 #: ../fish/guestfish-actions.pod:2594 ../src/guestfs-actions.pod:3934
11180 "This returns C<true> if and only if there is a directory with the given "
11181 "C<path> name. Note that it returns false for other objects like files."
11185 #: ../fish/guestfish-actions.pod:2600
11190 #: ../fish/guestfish-actions.pod:2602
11198 #: ../fish/guestfish-actions.pod:2604 ../src/guestfs-actions.pod:3950
11200 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11201 "given C<path> name."
11205 #: ../fish/guestfish-actions.pod:2609
11210 #: ../fish/guestfish-actions.pod:2611
11218 #: ../fish/guestfish-actions.pod:2613 ../src/guestfs-actions.pod:3965
11220 "This returns C<true> if and only if there is a regular file with the given "
11221 "C<path> name. Note that it returns false for other objects like directories."
11225 #: ../fish/guestfish-actions.pod:2619
11226 msgid "is-launching"
11230 #: ../fish/guestfish-actions.pod:2621
11238 #: ../fish/guestfish-actions.pod:2623 ../src/guestfs-actions.pod:3980
11240 "This returns true iff this handle is launching the subprocess (in the "
11241 "C<LAUNCHING> state)."
11245 #: ../fish/guestfish-actions.pod:2628
11250 #: ../fish/guestfish-actions.pod:2630
11258 #: ../fish/guestfish-actions.pod:2632 ../src/guestfs-actions.pod:3995
11260 "This command tests whether C<device> is a logical volume, and returns true "
11261 "iff this is the case."
11265 #: ../fish/guestfish-actions.pod:2635
11270 #: ../fish/guestfish-actions.pod:2637
11278 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4007
11280 "This returns true iff this handle is ready to accept commands (in the "
11285 #: ../fish/guestfish-actions.pod:2644
11290 #: ../fish/guestfish-actions.pod:2646
11293 " is-socket path\n"
11298 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4022
11300 "This returns C<true> if and only if there is a Unix domain socket with the "
11301 "given C<path> name."
11305 #: ../fish/guestfish-actions.pod:2653
11310 #: ../fish/guestfish-actions.pod:2655
11313 " is-symlink path\n"
11318 #: ../fish/guestfish-actions.pod:2657 ../src/guestfs-actions.pod:4037
11320 "This returns C<true> if and only if there is a symbolic link with the given "
11325 #: ../fish/guestfish-actions.pod:2662
11330 #: ../fish/guestfish-actions.pod:2664
11338 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:4052
11340 "This returns true iff the file exists and the file is empty or it contains "
11345 #: ../fish/guestfish-actions.pod:2669
11346 msgid "is-zero-device"
11350 #: ../fish/guestfish-actions.pod:2671
11353 " is-zero-device device\n"
11358 #: ../fish/guestfish-actions.pod:2673 ../src/guestfs-actions.pod:4065
11359 msgid "This returns true iff the device exists and contains all zero bytes."
11363 #: ../fish/guestfish-actions.pod:2675 ../src/guestfs-actions.pod:4067
11364 msgid "Note that for large devices this can take a long time to run."
11368 #: ../fish/guestfish-actions.pod:2677
11369 msgid "kill-subprocess"
11373 #: ../fish/guestfish-actions.pod:2679
11376 " kill-subprocess\n"
11381 #: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:4078
11382 msgid "This kills the qemu subprocess. You should never need to call this."
11386 #: ../fish/guestfish-actions.pod:2683
11391 #: ../fish/guestfish-actions.pod:2685
11396 #: ../fish/guestfish-actions.pod:2687
11404 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:4089
11406 "Internally libguestfs is implemented by running a virtual machine using "
11411 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4092
11413 "You should call this after configuring the handle (eg. adding drives) but "
11414 "before performing any actions."
11418 #: ../fish/guestfish-actions.pod:2695
11423 #: ../fish/guestfish-actions.pod:2697
11426 " lchown owner group path\n"
11431 #: ../fish/guestfish-actions.pod:2699
11433 "Change the file owner to C<owner> and group to C<group>. This is like L</"
11434 "chown> but if C<path> is a symlink then the link itself is changed, not the "
11439 #: ../fish/guestfish-actions.pod:2707
11444 #: ../fish/guestfish-actions.pod:2709
11447 " lgetxattr path name\n"
11452 #: ../fish/guestfish-actions.pod:2711 ../src/guestfs-actions.pod:4132
11454 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11455 "is a symlink, then this call returns an extended attribute from the symlink."
11459 #: ../fish/guestfish-actions.pod:2725
11460 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11464 #: ../fish/guestfish-actions.pod:2727
11469 #: ../fish/guestfish-actions.pod:2729
11472 " lgetxattrs path\n"
11477 #: ../fish/guestfish-actions.pod:2731
11479 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11480 "it returns the extended attributes of the link itself."
11484 #: ../fish/guestfish-actions.pod:2735
11489 #: ../fish/guestfish-actions.pod:2737
11497 #: ../fish/guestfish-actions.pod:2739 ../src/guestfs-actions.pod:4175
11499 "List all 9p filesystems attached to the guest. A list of mount tags is "
11504 #: ../fish/guestfish-actions.pod:2742
11505 msgid "list-devices"
11509 #: ../fish/guestfish-actions.pod:2744
11517 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4189
11518 msgid "List all the block devices."
11522 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4191
11523 msgid "The full block device names are returned, eg. C</dev/sda>."
11527 #: ../fish/guestfish-actions.pod:2752
11528 msgid "list-dm-devices"
11532 #: ../fish/guestfish-actions.pod:2754
11535 " list-dm-devices\n"
11540 #: ../fish/guestfish-actions.pod:2756 ../src/guestfs-actions.pod:4206
11541 msgid "List all device mapper devices."
11545 #: ../fish/guestfish-actions.pod:2758
11547 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11548 "previous call to L</luks-open>."
11552 #: ../fish/guestfish-actions.pod:2761
11554 "Device mapper devices which correspond to logical volumes are I<not> "
11555 "returned in this list. Call L</lvs> if you want to list logical volumes."
11559 #: ../fish/guestfish-actions.pod:2765
11560 msgid "list-filesystems"
11564 #: ../fish/guestfish-actions.pod:2767
11567 " list-filesystems\n"
11572 #: ../fish/guestfish-actions.pod:2769 ../src/guestfs-actions.pod:4226
11574 "This inspection command looks for filesystems on partitions, block devices "
11575 "and logical volumes, returning a list of devices containing filesystems and "
11580 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4230
11582 "The return value is a hash, where the keys are the devices containing "
11583 "filesystems, and the values are the filesystem types. For example:"
11587 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4234
11590 " \"/dev/sda1\" => \"ntfs\"\n"
11591 " \"/dev/sda2\" => \"ext2\"\n"
11592 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11593 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11598 #: ../fish/guestfish-actions.pod:2782 ../src/guestfs-actions.pod:4239
11600 "The value can have the special value \"unknown\", meaning the content of the "
11601 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11605 #: ../fish/guestfish-actions.pod:2786
11607 "This command runs other libguestfs commands, which might include L</mount> "
11608 "and L</umount>, and therefore you should use this soon after launch and only "
11609 "when nothing is mounted."
11613 #: ../fish/guestfish-actions.pod:2790
11615 "Not all of the filesystems returned will be mountable. In particular, swap "
11616 "partitions are returned in the list. Also this command does not check that "
11617 "each filesystem found is valid and mountable, and some filesystems might be "
11618 "mountable but require special options. Filesystems may not all belong to a "
11619 "single logical operating system (use L</inspect-os> to look for OSes)."
11623 #: ../fish/guestfish-actions.pod:2798
11624 msgid "list-partitions"
11628 #: ../fish/guestfish-actions.pod:2800
11631 " list-partitions\n"
11636 #: ../fish/guestfish-actions.pod:2802 ../src/guestfs-actions.pod:4268
11637 msgid "List all the partitions detected on all block devices."
11641 #: ../fish/guestfish-actions.pod:2804 ../src/guestfs-actions.pod:4270
11642 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11646 #: ../fish/guestfish-actions.pod:2806
11648 "This does not return logical volumes. For that you will need to call L</"
11653 #: ../fish/guestfish-actions.pod:2811
11658 #: ../fish/guestfish-actions.pod:2813
11666 #: ../fish/guestfish-actions.pod:2815 ../src/guestfs-actions.pod:4289
11668 "List the files in C<directory> (relative to the root directory, there is no "
11669 "cwd) in the format of 'ls -la'."
11673 #: ../fish/guestfish-actions.pod:2818 ../src/guestfs-actions.pod:4292
11675 "This command is mostly useful for interactive sessions. It is I<not> "
11676 "intended that you try to parse the output string."
11680 #: ../fish/guestfish-actions.pod:2821
11685 #: ../fish/guestfish-actions.pod:2823
11688 " ln target linkname\n"
11693 #: ../fish/guestfish-actions.pod:2825 ../src/guestfs-actions.pod:4307
11694 msgid "This command creates a hard link using the C<ln> command."
11698 #: ../fish/guestfish-actions.pod:2827
11703 #: ../fish/guestfish-actions.pod:2829
11706 " ln-f target linkname\n"
11711 #: ../fish/guestfish-actions.pod:2831 ../src/guestfs-actions.pod:4320
11713 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11714 "option removes the link (C<linkname>) if it exists already."
11718 #: ../fish/guestfish-actions.pod:2834
11723 #: ../fish/guestfish-actions.pod:2836
11726 " ln-s target linkname\n"
11731 #: ../fish/guestfish-actions.pod:2838 ../src/guestfs-actions.pod:4334
11732 msgid "This command creates a symbolic link using the C<ln -s> command."
11736 #: ../fish/guestfish-actions.pod:2840
11741 #: ../fish/guestfish-actions.pod:2842
11744 " ln-sf target linkname\n"
11749 #: ../fish/guestfish-actions.pod:2844 ../src/guestfs-actions.pod:4347
11751 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11752 "option removes the link (C<linkname>) if it exists already."
11756 #: ../fish/guestfish-actions.pod:2847
11757 msgid "lremovexattr"
11761 #: ../fish/guestfish-actions.pod:2849
11764 " lremovexattr xattr path\n"
11769 #: ../fish/guestfish-actions.pod:2851
11771 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11772 "it removes an extended attribute of the link itself."
11776 #: ../fish/guestfish-actions.pod:2855
11781 #: ../fish/guestfish-actions.pod:2857
11789 #: ../fish/guestfish-actions.pod:2859 ../src/guestfs-actions.pod:4375
11791 "List the files in C<directory> (relative to the root directory, there is no "
11792 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
11796 #: ../fish/guestfish-actions.pod:2863
11798 "This command is mostly useful for interactive sessions. Programs should "
11799 "probably use L</readdir> instead."
11803 #: ../fish/guestfish-actions.pod:2866
11808 #: ../fish/guestfish-actions.pod:2868
11811 " lsetxattr xattr val vallen path\n"
11816 #: ../fish/guestfish-actions.pod:2870
11818 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11819 "sets an extended attribute of the link itself."
11823 #: ../fish/guestfish-actions.pod:2874
11828 #: ../fish/guestfish-actions.pod:2876
11836 #: ../fish/guestfish-actions.pod:2878 ../fish/guestfish-actions.pod:4702
11837 #: ../src/guestfs-actions.pod:4411 ../src/guestfs-actions.pod:7214
11838 msgid "Returns file information for the given C<path>."
11842 #: ../fish/guestfish-actions.pod:2880
11844 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11845 "the link is stat-ed, not the file it refers to."
11849 #: ../fish/guestfish-actions.pod:2884 ../src/guestfs-actions.pod:4417
11850 msgid "This is the same as the C<lstat(2)> system call."
11854 #: ../fish/guestfish-actions.pod:2886
11859 #: ../fish/guestfish-actions.pod:2888
11862 " lstatlist path 'names ...'\n"
11867 #: ../fish/guestfish-actions.pod:2890
11869 "This call allows you to perform the L</lstat> operation on multiple files, "
11870 "where all files are in the directory C<path>. C<names> is the list of files "
11871 "from this directory."
11875 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4436
11877 "On return you get a list of stat structs, with a one-to-one correspondence "
11878 "to the C<names> list. If any name did not exist or could not be lstat'd, "
11879 "then the C<ino> field of that structure is set to C<-1>."
11883 #: ../fish/guestfish-actions.pod:2899
11885 "This call is intended for programs that want to efficiently list a directory "
11886 "contents without making many round-trips. See also L</lxattrlist> for a "
11887 "similarly efficient call for getting extended attributes. Very long "
11888 "directory listings might cause the protocol message size to be exceeded, "
11889 "causing this call to fail. The caller must split up such requests into "
11890 "smaller groups of names."
11894 #: ../fish/guestfish-actions.pod:2907
11895 msgid "luks-add-key"
11899 #: ../fish/guestfish-actions.pod:2909
11902 " luks-add-key device keyslot\n"
11907 #: ../fish/guestfish-actions.pod:2911 ../src/guestfs-actions.pod:4464
11909 "This command adds a new key on LUKS device C<device>. C<key> is any "
11910 "existing key, and is used to access the device. C<newkey> is the new key to "
11911 "add. C<keyslot> is the key slot that will be replaced."
11915 #: ../fish/guestfish-actions.pod:2916
11917 "Note that if C<keyslot> already contains a key, then this command will "
11918 "fail. You have to use L</luks-kill-slot> first to remove that key."
11922 #: ../fish/guestfish-actions.pod:2920 ../fish/guestfish-actions.pod:2942
11923 #: ../fish/guestfish-actions.pod:2955 ../fish/guestfish-actions.pod:2969
11924 #: ../fish/guestfish-actions.pod:2995 ../fish/guestfish-actions.pod:3005
11926 "This command has one or more key or passphrase parameters. Guestfish will "
11927 "prompt for these separately."
11931 #: ../fish/guestfish-actions.pod:2923
11936 #: ../fish/guestfish-actions.pod:2925
11939 " luks-close device\n"
11944 #: ../fish/guestfish-actions.pod:2927
11946 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
11947 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
11948 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
11953 #: ../fish/guestfish-actions.pod:2933
11954 msgid "luks-format"
11958 #: ../fish/guestfish-actions.pod:2935
11961 " luks-format device keyslot\n"
11966 #: ../fish/guestfish-actions.pod:2937 ../src/guestfs-actions.pod:4505
11968 "This command erases existing data on C<device> and formats the device as a "
11969 "LUKS encrypted device. C<key> is the initial key, which is added to key "
11970 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
11974 #: ../fish/guestfish-actions.pod:2945 ../fish/guestfish-actions.pod:2958
11975 #: ../fish/guestfish-actions.pod:3045 ../fish/guestfish-actions.pod:3696
11976 #: ../fish/guestfish-actions.pod:4236 ../fish/guestfish-actions.pod:4573
11977 #: ../fish/guestfish-actions.pod:4596 ../fish/guestfish-actions.pod:4618
11978 #: ../fish/guestfish-actions.pod:5364 ../src/guestfs-actions.pod:4512
11979 #: ../src/guestfs-actions.pod:4535 ../src/guestfs-actions.pod:4678
11980 #: ../src/guestfs-actions.pod:5771 ../src/guestfs-actions.pod:6577
11981 #: ../src/guestfs-actions.pod:7028 ../src/guestfs-actions.pod:7058
11982 #: ../src/guestfs-actions.pod:7091 ../src/guestfs-actions.pod:8290
11984 "B<This command is dangerous. Without careful use you can easily destroy all "
11989 #: ../fish/guestfish-actions.pod:2948
11990 msgid "luks-format-cipher"
11994 #: ../fish/guestfish-actions.pod:2950
11997 " luks-format-cipher device keyslot cipher\n"
12002 #: ../fish/guestfish-actions.pod:2952
12004 "This command is the same as L</luks-format> but it also allows you to set "
12005 "the C<cipher> used."
12009 #: ../fish/guestfish-actions.pod:2961
12010 msgid "luks-kill-slot"
12014 #: ../fish/guestfish-actions.pod:2963
12017 " luks-kill-slot device keyslot\n"
12022 #: ../fish/guestfish-actions.pod:2965 ../src/guestfs-actions.pod:4552
12024 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12025 "device C<device>. C<key> must be one of the I<other> keys."
12029 #: ../fish/guestfish-actions.pod:2972
12034 #: ../fish/guestfish-actions.pod:2974
12037 " luks-open device mapname\n"
12042 #: ../fish/guestfish-actions.pod:2976 ../src/guestfs-actions.pod:4572
12044 "This command opens a block device which has been encrypted according to the "
12045 "Linux Unified Key Setup (LUKS) standard."
12049 #: ../fish/guestfish-actions.pod:2979 ../src/guestfs-actions.pod:4575
12050 msgid "C<device> is the encrypted block device or partition."
12054 #: ../fish/guestfish-actions.pod:2981 ../src/guestfs-actions.pod:4577
12056 "The caller must supply one of the keys associated with the LUKS block "
12057 "device, in the C<key> parameter."
12061 #: ../fish/guestfish-actions.pod:2984 ../src/guestfs-actions.pod:4580
12063 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12064 "writes to this block device are decrypted from and encrypted to the "
12065 "underlying C<device> respectively."
12069 #: ../fish/guestfish-actions.pod:2988
12071 "If this block device contains LVM volume groups, then calling L</vgscan> "
12072 "followed by L</vg-activate-all> will make them visible."
12076 #: ../fish/guestfish-actions.pod:2992
12077 msgid "Use L</list-dm-devices> to list all device mapper devices."
12081 #: ../fish/guestfish-actions.pod:2998
12082 msgid "luks-open-ro"
12086 #: ../fish/guestfish-actions.pod:3000
12089 " luks-open-ro device mapname\n"
12094 #: ../fish/guestfish-actions.pod:3002
12096 "This is the same as L</luks-open> except that a read-only mapping is created."
12100 #: ../fish/guestfish-actions.pod:3008
12105 #: ../fish/guestfish-actions.pod:3010
12108 " lvcreate logvol volgroup mbytes\n"
12113 #: ../fish/guestfish-actions.pod:3012 ../src/guestfs-actions.pod:4626
12115 "This creates an LVM logical volume called C<logvol> on the volume group "
12116 "C<volgroup>, with C<size> megabytes."
12120 #: ../fish/guestfish-actions.pod:3015
12121 msgid "lvm-canonical-lv-name"
12125 #: ../fish/guestfish-actions.pod:3017
12128 " lvm-canonical-lv-name lvname\n"
12133 #: ../fish/guestfish-actions.pod:3019 ../src/guestfs-actions.pod:4639
12135 "This converts alternative naming schemes for LVs that you might find to the "
12136 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
12141 #: ../fish/guestfish-actions.pod:3023 ../src/guestfs-actions.pod:4643
12143 "This command returns an error if the C<lvname> parameter does not refer to a "
12148 #: ../fish/guestfish-actions.pod:3026
12149 msgid "See also L</is-lv>."
12153 #: ../fish/guestfish-actions.pod:3028
12154 msgid "lvm-clear-filter"
12158 #: ../fish/guestfish-actions.pod:3030
12161 " lvm-clear-filter\n"
12166 #: ../fish/guestfish-actions.pod:3032
12168 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12173 #: ../fish/guestfish-actions.pod:3035 ../fish/guestfish-actions.pod:3066
12174 #: ../src/guestfs-actions.pod:4661 ../src/guestfs-actions.pod:4703
12176 "This command also clears the LVM cache and performs a volume group scan."
12180 #: ../fish/guestfish-actions.pod:3038
12181 msgid "lvm-remove-all"
12185 #: ../fish/guestfish-actions.pod:3040
12188 " lvm-remove-all\n"
12193 #: ../fish/guestfish-actions.pod:3042 ../src/guestfs-actions.pod:4673
12195 "This command removes all LVM logical volumes, volume groups and physical "
12200 #: ../fish/guestfish-actions.pod:3048
12201 msgid "lvm-set-filter"
12205 #: ../fish/guestfish-actions.pod:3050
12208 " lvm-set-filter 'devices ...'\n"
12213 #: ../fish/guestfish-actions.pod:3052 ../src/guestfs-actions.pod:4689
12215 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12216 "block devices in the list C<devices>, and will ignore all other attached "
12221 #: ../fish/guestfish-actions.pod:3056 ../src/guestfs-actions.pod:4693
12223 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12224 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12225 "there are two types of duplication possible: either cloned PVs/VGs which "
12226 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12227 "same name. In normal operation you cannot create this situation, but you "
12228 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12229 "inside the LVM metadata."
12233 #: ../fish/guestfish-actions.pod:3069 ../src/guestfs-actions.pod:4706
12234 msgid "You can filter whole block devices or individual partitions."
12238 #: ../fish/guestfish-actions.pod:3071 ../src/guestfs-actions.pod:4708
12240 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12241 "filesystem), even if you are not filtering out that VG."
12245 #: ../fish/guestfish-actions.pod:3075
12250 #: ../fish/guestfish-actions.pod:3077
12253 " lvremove device\n"
12258 #: ../fish/guestfish-actions.pod:3079 ../src/guestfs-actions.pod:4722
12260 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12261 "LV, such as C</dev/VG/LV>."
12265 #: ../fish/guestfish-actions.pod:3082 ../src/guestfs-actions.pod:4725
12267 "You can also remove all LVs in a volume group by specifying the VG name, C</"
12272 #: ../fish/guestfish-actions.pod:3085
12277 #: ../fish/guestfish-actions.pod:3087
12280 " lvrename logvol newlogvol\n"
12285 #: ../fish/guestfish-actions.pod:3089 ../src/guestfs-actions.pod:4739
12286 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12290 #: ../fish/guestfish-actions.pod:3091
12295 #: ../fish/guestfish-actions.pod:3093
12298 " lvresize device mbytes\n"
12303 #: ../fish/guestfish-actions.pod:3095 ../src/guestfs-actions.pod:4752
12305 "This resizes (expands or shrinks) an existing LVM logical volume to "
12306 "C<mbytes>. When reducing, data in the reduced part is lost."
12310 #: ../fish/guestfish-actions.pod:3099
12311 msgid "lvresize-free"
12315 #: ../fish/guestfish-actions.pod:3101
12318 " lvresize-free lv percent\n"
12323 #: ../fish/guestfish-actions.pod:3103 ../src/guestfs-actions.pod:4767
12325 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12326 "remaining free space in the volume group. Commonly you would call this with "
12327 "pc = 100 which expands the logical volume as much as possible, using all "
12328 "remaining free space in the volume group."
12332 #: ../fish/guestfish-actions.pod:3109
12337 #: ../fish/guestfish-actions.pod:3111
12345 #: ../fish/guestfish-actions.pod:3113 ../src/guestfs-actions.pod:4782
12347 "List all the logical volumes detected. This is the equivalent of the L<lvs"
12352 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4785
12354 "This returns a list of the logical volume device names (eg. C</dev/"
12355 "VolGroup00/LogVol00>)."
12359 #: ../fish/guestfish-actions.pod:3119
12360 msgid "See also L</lvs-full>, L</list-filesystems>."
12364 #: ../fish/guestfish-actions.pod:3121
12369 #: ../fish/guestfish-actions.pod:3123
12377 #: ../fish/guestfish-actions.pod:3125 ../src/guestfs-actions.pod:4801
12379 "List all the logical volumes detected. This is the equivalent of the L<lvs"
12380 "(8)> command. The \"full\" version includes all fields."
12384 #: ../fish/guestfish-actions.pod:3128
12389 #: ../fish/guestfish-actions.pod:3130
12397 #: ../fish/guestfish-actions.pod:3132 ../src/guestfs-actions.pod:4816
12398 msgid "This command returns the UUID of the LVM LV C<device>."
12402 #: ../fish/guestfish-actions.pod:3134
12407 #: ../fish/guestfish-actions.pod:3136
12410 " lxattrlist path 'names ...'\n"
12415 #: ../fish/guestfish-actions.pod:3138 ../src/guestfs-actions.pod:4830
12417 "This call allows you to get the extended attributes of multiple files, where "
12418 "all files are in the directory C<path>. C<names> is the list of files from "
12423 #: ../fish/guestfish-actions.pod:3142 ../src/guestfs-actions.pod:4834
12425 "On return you get a flat list of xattr structs which must be interpreted "
12426 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12427 "C<attrval> in this struct is zero-length to indicate there was an error "
12428 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12429 "number (the number of following attributes for this file, which could be C<"
12430 "\"0\">). Then after the first xattr struct are the zero or more attributes "
12431 "for the first named file. This repeats for the second and subsequent files."
12435 #: ../fish/guestfish-actions.pod:3152
12437 "This call is intended for programs that want to efficiently list a directory "
12438 "contents without making many round-trips. See also L</lstatlist> for a "
12439 "similarly efficient call for getting standard stats. Very long directory "
12440 "listings might cause the protocol message size to be exceeded, causing this "
12441 "call to fail. The caller must split up such requests into smaller groups of "
12446 #: ../fish/guestfish-actions.pod:3160
12451 #: ../fish/guestfish-actions.pod:3162
12459 #: ../fish/guestfish-actions.pod:3164 ../src/guestfs-actions.pod:4864
12460 msgid "Create a directory named C<path>."
12464 #: ../fish/guestfish-actions.pod:3166
12469 #: ../fish/guestfish-actions.pod:3168
12472 " mkdir-mode path mode\n"
12477 #: ../fish/guestfish-actions.pod:3170 ../src/guestfs-actions.pod:4877
12479 "This command creates a directory, setting the initial permissions of the "
12480 "directory to C<mode>."
12484 #: ../fish/guestfish-actions.pod:3173 ../src/guestfs-actions.pod:4880
12486 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12487 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12492 #: ../fish/guestfish-actions.pod:3177
12493 msgid "See also L</mkdir>, L</umask>"
12497 #: ../fish/guestfish-actions.pod:3179
12502 #: ../fish/guestfish-actions.pod:3181
12510 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4896
12512 "Create a directory named C<path>, creating any parent directories as "
12513 "necessary. This is like the C<mkdir -p> shell command."
12517 #: ../fish/guestfish-actions.pod:3186
12522 #: ../fish/guestfish-actions.pod:3188
12525 " mkdtemp template\n"
12530 #: ../fish/guestfish-actions.pod:3190 ../src/guestfs-actions.pod:4909
12532 "This command creates a temporary directory. The C<template> parameter "
12533 "should be a full pathname for the temporary directory name with the final "
12534 "six characters being \"XXXXXX\"."
12538 #: ../fish/guestfish-actions.pod:3195 ../src/guestfs-actions.pod:4914
12540 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12541 "being suitable for Windows filesystems."
12545 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4917
12546 msgid "The name of the temporary directory that was created is returned."
12550 #: ../fish/guestfish-actions.pod:3201 ../src/guestfs-actions.pod:4920
12551 msgid "The temporary directory is created with mode 0700 and is owned by root."
12555 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4923
12557 "The caller is responsible for deleting the temporary directory and its "
12558 "contents after use."
12562 #: ../fish/guestfish-actions.pod:3207 ../src/guestfs-actions.pod:4926
12563 msgid "See also: L<mkdtemp(3)>"
12567 #: ../fish/guestfish-actions.pod:3209
12572 #: ../fish/guestfish-actions.pod:3211
12575 " mke2fs-J fstype blocksize device journal\n"
12580 #: ../fish/guestfish-actions.pod:3213 ../src/guestfs-actions.pod:4942
12582 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12583 "C<journal>. It is equivalent to the command:"
12587 #: ../fish/guestfish-actions.pod:3217 ../src/guestfs-actions.pod:4946
12590 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12595 #: ../fish/guestfish-actions.pod:3219
12596 msgid "See also L</mke2journal>."
12600 #: ../fish/guestfish-actions.pod:3221
12605 #: ../fish/guestfish-actions.pod:3223
12608 " mke2fs-JL fstype blocksize device label\n"
12613 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4963
12615 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12616 "the journal labeled C<label>."
12620 #: ../fish/guestfish-actions.pod:3228
12621 msgid "See also L</mke2journal-L>."
12625 #: ../fish/guestfish-actions.pod:3230
12630 #: ../fish/guestfish-actions.pod:3232
12633 " mke2fs-JU fstype blocksize device uuid\n"
12638 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4981
12640 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12641 "the journal with UUID C<uuid>."
12645 #: ../fish/guestfish-actions.pod:3237
12646 msgid "See also L</mke2journal-U>."
12650 #: ../fish/guestfish-actions.pod:3239
12651 msgid "mke2journal"
12655 #: ../fish/guestfish-actions.pod:3241
12658 " mke2journal blocksize device\n"
12663 #: ../fish/guestfish-actions.pod:3243 ../src/guestfs-actions.pod:4997
12665 "This creates an ext2 external journal on C<device>. It is equivalent to the "
12670 #: ../fish/guestfish-actions.pod:3246 ../src/guestfs-actions.pod:5000
12673 " mke2fs -O journal_dev -b blocksize device\n"
12678 #: ../fish/guestfish-actions.pod:3248
12679 msgid "mke2journal-L"
12683 #: ../fish/guestfish-actions.pod:3250
12686 " mke2journal-L blocksize label device\n"
12691 #: ../fish/guestfish-actions.pod:3252 ../src/guestfs-actions.pod:5014
12692 msgid "This creates an ext2 external journal on C<device> with label C<label>."
12696 #: ../fish/guestfish-actions.pod:3254
12697 msgid "mke2journal-U"
12701 #: ../fish/guestfish-actions.pod:3256
12704 " mke2journal-U blocksize uuid device\n"
12709 #: ../fish/guestfish-actions.pod:3258 ../src/guestfs-actions.pod:5028
12710 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12714 #: ../fish/guestfish-actions.pod:3260
12719 #: ../fish/guestfish-actions.pod:3262
12722 " mkfifo mode path\n"
12727 #: ../fish/guestfish-actions.pod:3264
12729 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12730 "is just a convenient wrapper around L</mknod>."
12734 #: ../fish/guestfish-actions.pod:3270
12739 #: ../fish/guestfish-actions.pod:3272
12742 " mkfs fstype device\n"
12747 #: ../fish/guestfish-actions.pod:3274 ../src/guestfs-actions.pod:5058
12749 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12750 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12754 #: ../fish/guestfish-actions.pod:3278
12759 #: ../fish/guestfish-actions.pod:3280
12762 " mkfs-b fstype blocksize device\n"
12767 #: ../fish/guestfish-actions.pod:3282
12769 "This call is similar to L</mkfs>, but it allows you to control the block "
12770 "size of the resulting filesystem. Supported block sizes depend on the "
12771 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12775 #: ../fish/guestfish-actions.pod:3287 ../fish/guestfish-actions.pod:3314
12776 #: ../src/guestfs-actions.pod:5086 ../src/guestfs-actions.pod:5124
12778 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12783 #: ../fish/guestfish-actions.pod:3290
12785 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
12790 #: ../fish/guestfish-actions.pod:3297
12795 #: ../fish/guestfish-actions.pod:3299
12798 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] [sectorsize:..]\n"
12803 #: ../fish/guestfish-actions.pod:3301 ../src/guestfs-actions.pod:5111
12805 "This function creates a filesystem on C<device>. The filesystem type is "
12806 "C<fstype>, for example C<ext3>."
12810 #: ../fish/guestfish-actions.pod:3308 ../src/guestfs-actions.pod:5118
12811 msgid "C<blocksize>"
12815 #: ../fish/guestfish-actions.pod:3310 ../src/guestfs-actions.pod:5120
12817 "The filesystem block size. Supported block sizes depend on the filesystem "
12818 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12823 #: ../fish/guestfish-actions.pod:3317 ../src/guestfs-actions.pod:5127
12824 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
12828 #: ../fish/guestfish-actions.pod:3319 ../src/guestfs-actions.pod:5129
12829 msgid "C<features>"
12833 #: ../fish/guestfish-actions.pod:3321 ../src/guestfs-actions.pod:5131
12834 msgid "This passes the I<-O> parameter to the external mkfs program."
12838 #: ../fish/guestfish-actions.pod:3323 ../src/guestfs-actions.pod:5133
12840 "For certain filesystem types, this allows extra filesystem features to be "
12841 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
12845 #: ../fish/guestfish-actions.pod:3327 ../src/guestfs-actions.pod:5137
12847 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
12852 #: ../fish/guestfish-actions.pod:3330 ../src/guestfs-actions.pod:5140
12857 #: ../fish/guestfish-actions.pod:3332 ../src/guestfs-actions.pod:5142
12859 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
12860 "sets the inode size (only for ext2/3/4 filesystems at present)."
12864 #: ../fish/guestfish-actions.pod:3335 ../src/guestfs-actions.pod:5145
12865 msgid "C<sectorsize>"
12869 #: ../fish/guestfish-actions.pod:3337 ../src/guestfs-actions.pod:5147
12871 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
12872 "sets sector size for ufs filesystem."
12876 #: ../fish/guestfish-actions.pod:3344
12877 msgid "mkmountpoint"
12881 #: ../fish/guestfish-actions.pod:3346
12884 " mkmountpoint exemptpath\n"
12889 #: ../fish/guestfish-actions.pod:3348
12891 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
12892 "to create extra mountpoints before mounting the first filesystem."
12896 #: ../fish/guestfish-actions.pod:3352 ../src/guestfs-actions.pod:5190
12898 "These calls are I<only> necessary in some very limited circumstances, mainly "
12899 "the case where you want to mount a mix of unrelated and/or read-only "
12900 "filesystems together."
12904 #: ../fish/guestfish-actions.pod:3356 ../src/guestfs-actions.pod:5194
12906 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
12907 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
12908 "inside that. You can unpack this as follows in guestfish:"
12912 #: ../fish/guestfish-actions.pod:3361 ../src/guestfs-actions.pod:5199
12915 " add-ro Fedora-11-i686-Live.iso\n"
12917 " mkmountpoint /cd\n"
12918 " mkmountpoint /sqsh\n"
12919 " mkmountpoint /ext3fs\n"
12920 " mount /dev/sda /cd\n"
12921 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
12922 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
12927 #: ../fish/guestfish-actions.pod:3370 ../src/guestfs-actions.pod:5208
12928 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
12932 #: ../fish/guestfish-actions.pod:3372
12934 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
12935 "unexpected errors if you try to mix these calls. It is safest to manually "
12936 "unmount filesystems and remove mountpoints after use."
12940 #: ../fish/guestfish-actions.pod:3376
12942 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
12943 "for this to work for manual mountpoints, you must ensure that the innermost "
12944 "mountpoints have the longest pathnames, as in the example code above."
12948 #: ../fish/guestfish-actions.pod:3381 ../src/guestfs-actions.pod:5219
12950 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
12954 #: ../fish/guestfish-actions.pod:3383
12956 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
12957 "L</umount-all> to be called when the handle is closed which can also trigger "
12962 #: ../fish/guestfish-actions.pod:3387
12967 #: ../fish/guestfish-actions.pod:3389
12970 " mknod mode devmajor devminor path\n"
12975 #: ../fish/guestfish-actions.pod:3391 ../src/guestfs-actions.pod:5238
12977 "This call creates block or character special devices, or named pipes (FIFOs)."
12981 #: ../fish/guestfish-actions.pod:3394 ../src/guestfs-actions.pod:5241
12983 "The C<mode> parameter should be the mode, using the standard constants. "
12984 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
12985 "used when creating block and character special devices."
12989 #: ../fish/guestfish-actions.pod:3399
12991 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
12992 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
12993 "regular file). These constants are available in the standard Linux header "
12994 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
12995 "wrappers around this command which bitwise OR in the appropriate constant "
13000 #: ../fish/guestfish-actions.pod:3409
13005 #: ../fish/guestfish-actions.pod:3411
13008 " mknod-b mode devmajor devminor path\n"
13013 #: ../fish/guestfish-actions.pod:3413
13015 "This call creates a block device node called C<path> with mode C<mode> and "
13016 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13017 "wrapper around L</mknod>."
13021 #: ../fish/guestfish-actions.pod:3419
13026 #: ../fish/guestfish-actions.pod:3421
13029 " mknod-c mode devmajor devminor path\n"
13034 #: ../fish/guestfish-actions.pod:3423
13036 "This call creates a char device node called C<path> with mode C<mode> and "
13037 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13038 "wrapper around L</mknod>."
13042 #: ../fish/guestfish-actions.pod:3429
13047 #: ../fish/guestfish-actions.pod:3431
13055 #: ../fish/guestfish-actions.pod:3433 ../src/guestfs-actions.pod:5304
13056 msgid "Create a swap partition on C<device>."
13060 #: ../fish/guestfish-actions.pod:3435
13065 #: ../fish/guestfish-actions.pod:3437
13068 " mkswap-L label device\n"
13073 #: ../fish/guestfish-actions.pod:3439 ../src/guestfs-actions.pod:5317
13074 msgid "Create a swap partition on C<device> with label C<label>."
13078 #: ../fish/guestfish-actions.pod:3441 ../src/guestfs-actions.pod:5319
13080 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
13081 "sda>), just to a partition. This appears to be a limitation of the kernel "
13086 #: ../fish/guestfish-actions.pod:3445
13091 #: ../fish/guestfish-actions.pod:3447
13094 " mkswap-U uuid device\n"
13099 #: ../fish/guestfish-actions.pod:3449 ../src/guestfs-actions.pod:5334
13100 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13104 #: ../fish/guestfish-actions.pod:3451
13105 msgid "mkswap-file"
13109 #: ../fish/guestfish-actions.pod:3453
13112 " mkswap-file path\n"
13117 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5346
13118 msgid "Create a swap file."
13122 #: ../fish/guestfish-actions.pod:3457
13124 "This command just writes a swap file signature to an existing file. To "
13125 "create the file itself, use something like L</fallocate>."
13129 #: ../fish/guestfish-actions.pod:3460
13134 #: ../fish/guestfish-actions.pod:3462
13137 " modprobe modulename\n"
13142 #: ../fish/guestfish-actions.pod:3464 ../src/guestfs-actions.pod:5361
13143 msgid "This loads a kernel module in the appliance."
13147 #: ../fish/guestfish-actions.pod:3466 ../src/guestfs-actions.pod:5363
13149 "The kernel module must have been whitelisted when libguestfs was built (see "
13150 "C<appliance/kmod.whitelist.in> in the source)."
13154 #: ../fish/guestfish-actions.pod:3469
13159 #: ../fish/guestfish-actions.pod:3471
13162 " mount device mountpoint\n"
13167 #: ../fish/guestfish-actions.pod:3473 ../src/guestfs-actions.pod:5377
13169 "Mount a guest disk at a position in the filesystem. Block devices are named "
13170 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13171 "those block devices contain partitions, they will have the usual names (eg. "
13172 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13176 #: ../fish/guestfish-actions.pod:3479 ../src/guestfs-actions.pod:5383
13178 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13179 "mounted on C</> before others can be mounted. Other filesystems can only be "
13180 "mounted on directories which already exist."
13184 #: ../fish/guestfish-actions.pod:3484 ../src/guestfs-actions.pod:5388
13186 "The mounted filesystem is writable, if we have sufficient permissions on the "
13187 "underlying device."
13191 #: ../fish/guestfish-actions.pod:3487
13193 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13194 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13195 "problems for users. If your program might need to work with older versions "
13196 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13197 "first parameter if you don't want any options)."
13201 #: ../fish/guestfish-actions.pod:3494
13206 #: ../fish/guestfish-actions.pod:3496
13209 " mount-9p mounttag mountpoint [options:..]\n"
13214 #: ../fish/guestfish-actions.pod:3498 ../src/guestfs-actions.pod:5417
13216 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13221 #: ../fish/guestfish-actions.pod:3501 ../src/guestfs-actions.pod:5420
13223 "If required, C<trans=virtio> will be automatically added to the options. "
13224 "Any other options required can be passed in the optional C<options> "
13229 #: ../fish/guestfish-actions.pod:3507
13234 #: ../fish/guestfish-actions.pod:3509
13237 " mount-loop file mountpoint\n"
13242 #: ../fish/guestfish-actions.pod:3511 ../src/guestfs-actions.pod:5459
13244 "This command lets you mount C<file> (a filesystem image in a file) on a "
13245 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13250 #: ../fish/guestfish-actions.pod:3515
13251 msgid "mount-options"
13255 #: ../fish/guestfish-actions.pod:3517
13258 " mount-options options device mountpoint\n"
13263 #: ../fish/guestfish-actions.pod:3519
13265 "This is the same as the L</mount> command, but it allows you to set the "
13266 "mount options as for the L<mount(8)> I<-o> flag."
13270 #: ../fish/guestfish-actions.pod:3523 ../src/guestfs-actions.pod:5479
13272 "If the C<options> parameter is an empty string, then no options are passed "
13273 "(all options default to whatever the filesystem uses)."
13277 #: ../fish/guestfish-actions.pod:3527
13282 #: ../fish/guestfish-actions.pod:3529
13285 " mount-ro device mountpoint\n"
13290 #: ../fish/guestfish-actions.pod:3531
13292 "This is the same as the L</mount> command, but it mounts the filesystem with "
13293 "the read-only (I<-o ro>) flag."
13297 #: ../fish/guestfish-actions.pod:3534
13302 #: ../fish/guestfish-actions.pod:3536
13305 " mount-vfs options vfstype device mountpoint\n"
13310 #: ../fish/guestfish-actions.pod:3538
13312 "This is the same as the L</mount> command, but it allows you to set both the "
13313 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13317 #: ../fish/guestfish-actions.pod:3542
13318 msgid "mountpoints"
13322 #: ../fish/guestfish-actions.pod:3544
13330 #: ../fish/guestfish-actions.pod:3546
13332 "This call is similar to L</mounts>. That call returns a list of devices. "
13333 "This one returns a hash table (map) of device name to directory where the "
13334 "device is mounted."
13338 #: ../fish/guestfish-actions.pod:3550
13343 #: ../fish/guestfish-actions.pod:3552
13351 #: ../fish/guestfish-actions.pod:3554 ../src/guestfs-actions.pod:5540
13353 "This returns the list of currently mounted filesystems. It returns the list "
13354 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13358 #: ../fish/guestfish-actions.pod:3557 ../src/guestfs-actions.pod:5543
13359 msgid "Some internal mounts are not shown."
13363 #: ../fish/guestfish-actions.pod:3559
13364 msgid "See also: L</mountpoints>"
13368 #: ../fish/guestfish-actions.pod:3561
13373 #: ../fish/guestfish-actions.pod:3563
13381 #: ../fish/guestfish-actions.pod:3565 ../src/guestfs-actions.pod:5560
13383 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13384 "destination filename or destination directory."
13388 #: ../fish/guestfish-actions.pod:3568
13389 msgid "ntfs-3g-probe"
13393 #: ../fish/guestfish-actions.pod:3570
13396 " ntfs-3g-probe true|false device\n"
13401 #: ../fish/guestfish-actions.pod:3572 ../src/guestfs-actions.pod:5574
13403 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13404 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
13405 "write, and some cannot be mounted at all)."
13409 #: ../fish/guestfish-actions.pod:3576 ../src/guestfs-actions.pod:5578
13411 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13412 "can be mounted read-write. Set it to false if you want to test if the "
13413 "volume can be mounted read-only."
13417 #: ../fish/guestfish-actions.pod:3580 ../src/guestfs-actions.pod:5582
13419 "The return value is an integer which C<0> if the operation would succeed, or "
13420 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13424 #: ../fish/guestfish-actions.pod:3584
13429 #: ../fish/guestfish-actions.pod:3586
13432 " ntfsresize device\n"
13437 #: ../fish/guestfish-actions.pod:3588 ../fish/guestfish-actions.pod:3612
13438 #: ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:5635
13440 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13441 "size of the underlying device."
13445 #: ../fish/guestfish-actions.pod:3591 ../src/guestfs-actions.pod:5606
13447 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13448 "consistency check (for safety). You have to boot into Windows to perform "
13449 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13450 "resize filesystems which have been marked in this way. So in effect it is "
13451 "not possible to call ntfsresize multiple times on a single filesystem "
13452 "without booting into Windows between each resize."
13456 #: ../fish/guestfish-actions.pod:3599 ../fish/guestfish-actions.pod:3638
13457 #: ../src/guestfs-actions.pod:5614 ../src/guestfs-actions.pod:5661
13458 msgid "See also L<ntfsresize(8)>."
13462 #: ../fish/guestfish-actions.pod:3601 ../fish/guestfish-actions.pod:3649
13464 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13469 #: ../fish/guestfish-actions.pod:3608
13470 msgid "ntfsresize-opts"
13474 #: ../fish/guestfish-actions.pod:3610
13477 " ntfsresize-opts device [size:..] [force:..]\n"
13482 #: ../fish/guestfish-actions.pod:3621 ../src/guestfs-actions.pod:5644
13484 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13485 "resized to fit the container (eg. partition)."
13489 #: ../fish/guestfish-actions.pod:3624 ../src/guestfs-actions.pod:5647
13494 #: ../fish/guestfish-actions.pod:3626 ../src/guestfs-actions.pod:5649
13496 "If this option is true, then force the resize of the filesystem even if the "
13497 "filesystem is marked as requiring a consistency check."
13501 #: ../fish/guestfish-actions.pod:3629
13503 "After the resize operation, the filesystem is always marked as requiring a "
13504 "consistency check (for safety). You have to boot into Windows to perform "
13505 "this check and clear this condition. If you I<don't> set the C<force> "
13506 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13507 "a single filesystem without booting into Windows between each resize."
13511 #: ../fish/guestfish-actions.pod:3642
13512 msgid "ntfsresize-size"
13516 #: ../fish/guestfish-actions.pod:3644
13519 " ntfsresize-size device size\n"
13524 #: ../fish/guestfish-actions.pod:3646
13526 "This command is the same as L</ntfsresize> except that it allows you to "
13527 "specify the new size (in bytes) explicitly."
13531 #: ../fish/guestfish-actions.pod:3656
13536 #: ../fish/guestfish-actions.pod:3658
13539 " part-add device prlogex startsect endsect\n"
13544 #: ../fish/guestfish-actions.pod:3660
13546 "This command adds a partition to C<device>. If there is no partition table "
13547 "on the device, call L</part-init> first."
13551 #: ../fish/guestfish-actions.pod:3663 ../src/guestfs-actions.pod:5722
13553 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13554 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13555 "C<logical>) and C<e> (or C<extended>) partition types."
13559 #: ../fish/guestfish-actions.pod:3668 ../src/guestfs-actions.pod:5727
13561 "C<startsect> and C<endsect> are the start and end of the partition in "
13562 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13563 "from the end of the disk (C<-1> is the last sector)."
13567 #: ../fish/guestfish-actions.pod:3672
13569 "Creating a partition which covers the whole disk is not so easy. Use L</"
13570 "part-disk> to do that."
13574 #: ../fish/guestfish-actions.pod:3675
13579 #: ../fish/guestfish-actions.pod:3677
13582 " part-del device partnum\n"
13587 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5745
13588 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13592 #: ../fish/guestfish-actions.pod:3681 ../src/guestfs-actions.pod:5747
13594 "Note that in the case of MBR partitioning, deleting an extended partition "
13595 "also deletes any logical partitions it contains."
13599 #: ../fish/guestfish-actions.pod:3685
13604 #: ../fish/guestfish-actions.pod:3687
13607 " part-disk device parttype\n"
13612 #: ../fish/guestfish-actions.pod:3689
13614 "This command is simply a combination of L</part-init> followed by L</part-"
13615 "add> to create a single primary partition covering the whole disk."
13619 #: ../fish/guestfish-actions.pod:3693
13621 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13622 "possible values are described in L</part-init>."
13626 #: ../fish/guestfish-actions.pod:3699
13627 msgid "part-get-bootable"
13631 #: ../fish/guestfish-actions.pod:3701
13634 " part-get-bootable device partnum\n"
13639 #: ../fish/guestfish-actions.pod:3703 ../src/guestfs-actions.pod:5783
13641 "This command returns true if the partition C<partnum> on C<device> has the "
13642 "bootable flag set."
13646 #: ../fish/guestfish-actions.pod:3706
13647 msgid "See also L</part-set-bootable>."
13651 #: ../fish/guestfish-actions.pod:3708
13652 msgid "part-get-mbr-id"
13656 #: ../fish/guestfish-actions.pod:3710
13659 " part-get-mbr-id device partnum\n"
13664 #: ../fish/guestfish-actions.pod:3712 ../src/guestfs-actions.pod:5799
13666 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13667 "partition C<partnum>."
13671 #: ../fish/guestfish-actions.pod:3715 ../fish/guestfish-actions.pod:3859
13673 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
13674 "undefined results for other partition table types (see L</part-get-"
13679 #: ../fish/guestfish-actions.pod:3719
13680 msgid "part-get-parttype"
13684 #: ../fish/guestfish-actions.pod:3721
13687 " part-get-parttype device\n"
13692 #: ../fish/guestfish-actions.pod:3723 ../src/guestfs-actions.pod:5816
13694 "This command examines the partition table on C<device> and returns the "
13695 "partition table type (format) being used."
13699 #: ../fish/guestfish-actions.pod:3726
13701 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13702 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13703 "possible, although unusual. See L</part-init> for a full list."
13707 #: ../fish/guestfish-actions.pod:3731
13712 #: ../fish/guestfish-actions.pod:3733
13715 " part-init device parttype\n"
13720 #: ../fish/guestfish-actions.pod:3735 ../src/guestfs-actions.pod:5836
13722 "This creates an empty partition table on C<device> of one of the partition "
13723 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13724 "(for large disks)."
13728 #: ../fish/guestfish-actions.pod:3739
13730 "Initially there are no partitions. Following this, you should call L</part-"
13731 "add> for each partition required."
13735 #: ../fish/guestfish-actions.pod:3742 ../src/guestfs-actions.pod:5843
13736 msgid "Possible values for C<parttype> are:"
13740 #: ../fish/guestfish-actions.pod:3746 ../src/guestfs-actions.pod:5847
13745 #: ../fish/guestfish-actions.pod:3748 ../src/guestfs-actions.pod:5849
13750 #: ../fish/guestfish-actions.pod:3750 ../src/guestfs-actions.pod:5851
13751 msgid "Intel EFI / GPT partition table."
13755 #: ../fish/guestfish-actions.pod:3752 ../src/guestfs-actions.pod:5853
13757 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13758 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13759 "the C<mbr> format."
13763 #: ../fish/guestfish-actions.pod:3756 ../src/guestfs-actions.pod:5857
13768 #: ../fish/guestfish-actions.pod:3758 ../src/guestfs-actions.pod:5859
13773 #: ../fish/guestfish-actions.pod:3760 ../src/guestfs-actions.pod:5861
13775 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13776 "Windows. This partition type will B<only> work for device sizes up to 2 "
13777 "TB. For large disks we recommend using C<gpt>."
13781 #: ../fish/guestfish-actions.pod:3767 ../src/guestfs-actions.pod:5868
13783 "Other partition table types that may work but are not supported include:"
13787 #: ../fish/guestfish-actions.pod:3772 ../src/guestfs-actions.pod:5873
13792 #: ../fish/guestfish-actions.pod:3774 ../src/guestfs-actions.pod:5875
13793 msgid "AIX disk labels."
13797 #: ../fish/guestfish-actions.pod:3776 ../src/guestfs-actions.pod:5877
13802 #: ../fish/guestfish-actions.pod:3778 ../src/guestfs-actions.pod:5879
13807 #: ../fish/guestfish-actions.pod:3780 ../src/guestfs-actions.pod:5881
13808 msgid "Amiga \"Rigid Disk Block\" format."
13812 #: ../fish/guestfish-actions.pod:3782 ../src/guestfs-actions.pod:5883
13817 #: ../fish/guestfish-actions.pod:3784 ../src/guestfs-actions.pod:5885
13818 msgid "BSD disk labels."
13822 #: ../fish/guestfish-actions.pod:3786 ../src/guestfs-actions.pod:5887
13827 #: ../fish/guestfish-actions.pod:3788 ../src/guestfs-actions.pod:5889
13828 msgid "DASD, used on IBM mainframes."
13832 #: ../fish/guestfish-actions.pod:3790 ../src/guestfs-actions.pod:5891
13837 #: ../fish/guestfish-actions.pod:3792 ../src/guestfs-actions.pod:5893
13838 msgid "MIPS/SGI volumes."
13842 #: ../fish/guestfish-actions.pod:3794 ../src/guestfs-actions.pod:5895
13847 #: ../fish/guestfish-actions.pod:3796 ../src/guestfs-actions.pod:5897
13848 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13852 #: ../fish/guestfish-actions.pod:3798 ../src/guestfs-actions.pod:5899
13857 #: ../fish/guestfish-actions.pod:3800 ../src/guestfs-actions.pod:5901
13858 msgid "NEC PC-98 format, common in Japan apparently."
13862 #: ../fish/guestfish-actions.pod:3802 ../src/guestfs-actions.pod:5903
13867 #: ../fish/guestfish-actions.pod:3804 ../src/guestfs-actions.pod:5905
13868 msgid "Sun disk labels."
13872 #: ../fish/guestfish-actions.pod:3808
13877 #: ../fish/guestfish-actions.pod:3810
13880 " part-list device\n"
13885 #: ../fish/guestfish-actions.pod:3812 ../src/guestfs-actions.pod:5919
13887 "This command parses the partition table on C<device> and returns the list of "
13888 "partitions found."
13892 #: ../fish/guestfish-actions.pod:3815 ../src/guestfs-actions.pod:5922
13893 msgid "The fields in the returned structure are:"
13897 #: ../fish/guestfish-actions.pod:3819 ../src/guestfs-actions.pod:5926
13898 msgid "B<part_num>"
13902 #: ../fish/guestfish-actions.pod:3821 ../src/guestfs-actions.pod:5928
13903 msgid "Partition number, counting from 1."
13907 #: ../fish/guestfish-actions.pod:3823 ../src/guestfs-actions.pod:5930
13908 msgid "B<part_start>"
13912 #: ../fish/guestfish-actions.pod:3825
13914 "Start of the partition I<in bytes>. To get sectors you have to divide by "
13915 "the device's sector size, see L</blockdev-getss>."
13919 #: ../fish/guestfish-actions.pod:3828 ../src/guestfs-actions.pod:5935
13920 msgid "B<part_end>"
13924 #: ../fish/guestfish-actions.pod:3830 ../src/guestfs-actions.pod:5937
13925 msgid "End of the partition in bytes."
13929 #: ../fish/guestfish-actions.pod:3832 ../src/guestfs-actions.pod:5939
13930 msgid "B<part_size>"
13934 #: ../fish/guestfish-actions.pod:3834 ../src/guestfs-actions.pod:5941
13935 msgid "Size of the partition in bytes."
13939 #: ../fish/guestfish-actions.pod:3838
13940 msgid "part-set-bootable"
13944 #: ../fish/guestfish-actions.pod:3840
13947 " part-set-bootable device partnum true|false\n"
13952 #: ../fish/guestfish-actions.pod:3842 ../src/guestfs-actions.pod:5959
13954 "This sets the bootable flag on partition numbered C<partnum> on device "
13955 "C<device>. Note that partitions are numbered from 1."
13959 #: ../fish/guestfish-actions.pod:3845 ../src/guestfs-actions.pod:5962
13961 "The bootable flag is used by some operating systems (notably Windows) to "
13962 "determine which partition to boot from. It is by no means universally "
13967 #: ../fish/guestfish-actions.pod:3849
13968 msgid "part-set-mbr-id"
13972 #: ../fish/guestfish-actions.pod:3851
13975 " part-set-mbr-id device partnum idbyte\n"
13980 #: ../fish/guestfish-actions.pod:3853 ../src/guestfs-actions.pod:5978
13982 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
13983 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
13984 "documentation are in fact hexadecimal numbers, but usually documented "
13985 "without any leading \"0x\" which might be confusing."
13989 #: ../fish/guestfish-actions.pod:3863
13990 msgid "part-set-name"
13994 #: ../fish/guestfish-actions.pod:3865
13997 " part-set-name device partnum name\n"
14002 #: ../fish/guestfish-actions.pod:3867 ../src/guestfs-actions.pod:6000
14004 "This sets the partition name on partition numbered C<partnum> on device "
14005 "C<device>. Note that partitions are numbered from 1."
14009 #: ../fish/guestfish-actions.pod:3870 ../src/guestfs-actions.pod:6003
14011 "The partition name can only be set on certain types of partition table. "
14012 "This works on C<gpt> but not on C<mbr> partitions."
14016 #: ../fish/guestfish-actions.pod:3873
14017 msgid "part-to-dev"
14021 #: ../fish/guestfish-actions.pod:3875
14024 " part-to-dev partition\n"
14029 #: ../fish/guestfish-actions.pod:3877 ../src/guestfs-actions.pod:6016
14031 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14032 "partition number, returning the device name (eg. \"/dev/sdb\")."
14036 #: ../fish/guestfish-actions.pod:3881 ../fish/guestfish-actions.pod:3893
14038 "The named partition must exist, for example as a string returned from L</"
14039 "list-partitions>."
14043 #: ../fish/guestfish-actions.pod:3884
14044 msgid "See also L</part-to-partnum>."
14048 #: ../fish/guestfish-actions.pod:3886
14049 msgid "part-to-partnum"
14053 #: ../fish/guestfish-actions.pod:3888
14056 " part-to-partnum partition\n"
14061 #: ../fish/guestfish-actions.pod:3890 ../src/guestfs-actions.pod:6036
14063 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14064 "partition number (eg. C<1>)."
14068 #: ../fish/guestfish-actions.pod:3896
14069 msgid "See also L</part-to-dev>."
14073 #: ../fish/guestfish-actions.pod:3898
14074 msgid "ping-daemon"
14078 #: ../fish/guestfish-actions.pod:3900
14086 #: ../fish/guestfish-actions.pod:3902 ../src/guestfs-actions.pod:6051
14088 "This is a test probe into the guestfs daemon running inside the qemu "
14089 "subprocess. Calling this function checks that the daemon responds to the "
14090 "ping message, without affecting the daemon or attached block device(s) in "
14095 #: ../fish/guestfish-actions.pod:3907
14100 #: ../fish/guestfish-actions.pod:3909
14103 " pread path count offset\n"
14108 #: ../fish/guestfish-actions.pod:3911 ../src/guestfs-actions.pod:6069
14110 "This command lets you read part of a file. It reads C<count> bytes of the "
14111 "file, starting at C<offset>, from file C<path>."
14115 #: ../fish/guestfish-actions.pod:3914 ../fish/guestfish-actions.pod:3929
14116 #: ../src/guestfs-actions.pod:6072 ../src/guestfs-actions.pod:6098
14118 "This may read fewer bytes than requested. For further details see the "
14119 "L<pread(2)> system call."
14123 #: ../fish/guestfish-actions.pod:3917
14124 msgid "See also L</pwrite>, L</pread-device>."
14128 #: ../fish/guestfish-actions.pod:3922
14129 msgid "pread-device"
14133 #: ../fish/guestfish-actions.pod:3924
14136 " pread-device device count offset\n"
14141 #: ../fish/guestfish-actions.pod:3926 ../src/guestfs-actions.pod:6095
14143 "This command lets you read part of a file. It reads C<count> bytes of "
14144 "C<device>, starting at C<offset>."
14148 #: ../fish/guestfish-actions.pod:3932
14149 msgid "See also L</pread>."
14153 #: ../fish/guestfish-actions.pod:3937
14158 #: ../fish/guestfish-actions.pod:3939
14161 " pvcreate device\n"
14166 #: ../fish/guestfish-actions.pod:3941 ../src/guestfs-actions.pod:6118
14168 "This creates an LVM physical volume on the named C<device>, where C<device> "
14169 "should usually be a partition name such as C</dev/sda1>."
14173 #: ../fish/guestfish-actions.pod:3945
14178 #: ../fish/guestfish-actions.pod:3947
14181 " pvremove device\n"
14186 #: ../fish/guestfish-actions.pod:3949 ../src/guestfs-actions.pod:6132
14188 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14193 #: ../fish/guestfish-actions.pod:3952 ../src/guestfs-actions.pod:6135
14195 "The implementation uses the C<pvremove> command which refuses to wipe "
14196 "physical volumes that contain any volume groups, so you have to remove those "
14201 #: ../fish/guestfish-actions.pod:3956
14206 #: ../fish/guestfish-actions.pod:3958
14209 " pvresize device\n"
14214 #: ../fish/guestfish-actions.pod:3960 ../src/guestfs-actions.pod:6149
14216 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14217 "the new size of the underlying device."
14221 #: ../fish/guestfish-actions.pod:3963
14222 msgid "pvresize-size"
14226 #: ../fish/guestfish-actions.pod:3965
14229 " pvresize-size device size\n"
14234 #: ../fish/guestfish-actions.pod:3967
14236 "This command is the same as L</pvresize> except that it allows you to "
14237 "specify the new size (in bytes) explicitly."
14241 #: ../fish/guestfish-actions.pod:3970
14246 #: ../fish/guestfish-actions.pod:3972
14254 #: ../fish/guestfish-actions.pod:3974 ../src/guestfs-actions.pod:6175
14256 "List all the physical volumes detected. This is the equivalent of the L<pvs"
14261 #: ../fish/guestfish-actions.pod:3977 ../src/guestfs-actions.pod:6178
14263 "This returns a list of just the device names that contain PVs (eg. C</dev/"
14268 #: ../fish/guestfish-actions.pod:3980
14269 msgid "See also L</pvs-full>."
14273 #: ../fish/guestfish-actions.pod:3982
14278 #: ../fish/guestfish-actions.pod:3984
14286 #: ../fish/guestfish-actions.pod:3986 ../src/guestfs-actions.pod:6194
14288 "List all the physical volumes detected. This is the equivalent of the L<pvs"
14289 "(8)> command. The \"full\" version includes all fields."
14293 #: ../fish/guestfish-actions.pod:3989
14298 #: ../fish/guestfish-actions.pod:3991
14306 #: ../fish/guestfish-actions.pod:3993 ../src/guestfs-actions.pod:6209
14307 msgid "This command returns the UUID of the LVM PV C<device>."
14311 #: ../fish/guestfish-actions.pod:3995
14316 #: ../fish/guestfish-actions.pod:3997
14319 " pwrite path content offset\n"
14324 #: ../fish/guestfish-actions.pod:3999 ../src/guestfs-actions.pod:6225
14326 "This command writes to part of a file. It writes the data buffer C<content> "
14327 "to the file C<path> starting at offset C<offset>."
14331 #: ../fish/guestfish-actions.pod:4002 ../src/guestfs-actions.pod:6228
14333 "This command implements the L<pwrite(2)> system call, and like that system "
14334 "call it may not write the full data requested. The return value is the "
14335 "number of bytes that were actually written to the file. This could even be "
14336 "0, although short writes are unlikely for regular files in ordinary "
14341 #: ../fish/guestfish-actions.pod:4008
14342 msgid "See also L</pread>, L</pwrite-device>."
14346 #: ../fish/guestfish-actions.pod:4013
14347 msgid "pwrite-device"
14351 #: ../fish/guestfish-actions.pod:4015
14354 " pwrite-device device content offset\n"
14359 #: ../fish/guestfish-actions.pod:4017 ../src/guestfs-actions.pod:6252
14361 "This command writes to part of a device. It writes the data buffer "
14362 "C<content> to C<device> starting at offset C<offset>."
14366 #: ../fish/guestfish-actions.pod:4020 ../src/guestfs-actions.pod:6255
14368 "This command implements the L<pwrite(2)> system call, and like that system "
14369 "call it may not write the full data requested (although short writes to disk "
14370 "devices and partitions are probably impossible with standard Linux kernels)."
14374 #: ../fish/guestfish-actions.pod:4025
14375 msgid "See also L</pwrite>."
14379 #: ../fish/guestfish-actions.pod:4030
14384 #: ../fish/guestfish-actions.pod:4032
14387 " read-file path\n"
14392 #: ../fish/guestfish-actions.pod:4034 ../src/guestfs-actions.pod:6276
14393 msgid "This calls returns the contents of the file C<path> as a buffer."
14397 #: ../fish/guestfish-actions.pod:4037
14399 "Unlike L</cat>, this function can correctly handle files that contain "
14400 "embedded ASCII NUL characters. However unlike L</download>, this function "
14401 "is limited in the total size of file that can be handled."
14405 #: ../fish/guestfish-actions.pod:4045
14410 #: ../fish/guestfish-actions.pod:4047
14413 " read-lines path\n"
14418 #: ../fish/guestfish-actions.pod:4051 ../src/guestfs-actions.pod:6301
14420 "The file contents are returned as a list of lines. Trailing C<LF> and "
14421 "C<CRLF> character sequences are I<not> returned."
14425 #: ../fish/guestfish-actions.pod:4054
14427 "Note that this function cannot correctly handle binary files (specifically, "
14428 "files containing C<\\0> character which is treated as end of line). For "
14429 "those you need to use the L</read-file> function which has a more complex "
14434 #: ../fish/guestfish-actions.pod:4059
14439 #: ../fish/guestfish-actions.pod:4061
14447 #: ../fish/guestfish-actions.pod:4063 ../src/guestfs-actions.pod:6321
14448 msgid "This returns the list of directory entries in directory C<dir>."
14452 #: ../fish/guestfish-actions.pod:4065 ../src/guestfs-actions.pod:6323
14454 "All entries in the directory are returned, including C<.> and C<..>. The "
14455 "entries are I<not> sorted, but returned in the same order as the underlying "
14460 #: ../fish/guestfish-actions.pod:4069 ../src/guestfs-actions.pod:6327
14462 "Also this call returns basic file type information about each file. The "
14463 "C<ftyp> field will contain one of the following characters:"
14467 #: ../fish/guestfish-actions.pod:4074 ../src/guestfs-actions.pod:6332
14472 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6334
14473 msgid "Block special"
14477 #: ../fish/guestfish-actions.pod:4078 ../src/guestfs-actions.pod:6336
14482 #: ../fish/guestfish-actions.pod:4080 ../src/guestfs-actions.pod:6338
14483 msgid "Char special"
14487 #: ../fish/guestfish-actions.pod:4082 ../src/guestfs-actions.pod:6340
14492 #: ../fish/guestfish-actions.pod:4084 ../src/guestfs-actions.pod:6342
14497 #: ../fish/guestfish-actions.pod:4086 ../src/guestfs-actions.pod:6344
14502 #: ../fish/guestfish-actions.pod:4088 ../src/guestfs-actions.pod:6346
14503 msgid "FIFO (named pipe)"
14507 #: ../fish/guestfish-actions.pod:4090 ../src/guestfs-actions.pod:6348
14512 #: ../fish/guestfish-actions.pod:4092 ../src/guestfs-actions.pod:6350
14513 msgid "Symbolic link"
14517 #: ../fish/guestfish-actions.pod:4094 ../src/guestfs-actions.pod:6352
14522 #: ../fish/guestfish-actions.pod:4096 ../src/guestfs-actions.pod:6354
14523 msgid "Regular file"
14527 #: ../fish/guestfish-actions.pod:4098 ../src/guestfs-actions.pod:6356
14532 #: ../fish/guestfish-actions.pod:4100 ../src/guestfs-actions.pod:6358
14537 #: ../fish/guestfish-actions.pod:4102 ../src/guestfs-actions.pod:6360
14542 #: ../fish/guestfish-actions.pod:4104 ../src/guestfs-actions.pod:6362
14543 msgid "Unknown file type"
14547 #: ../fish/guestfish-actions.pod:4106 ../src/guestfs-actions.pod:6364
14552 #: ../fish/guestfish-actions.pod:4108 ../src/guestfs-actions.pod:6366
14554 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14558 #: ../fish/guestfish-actions.pod:4113
14560 "This function is primarily intended for use by programs. To get a simple "
14561 "list of names, use L</ls>. To get a printable directory for human "
14562 "consumption, use L</ll>."
14566 #: ../fish/guestfish-actions.pod:4117
14571 #: ../fish/guestfish-actions.pod:4119
14579 #: ../fish/guestfish-actions.pod:4121 ../src/guestfs-actions.pod:6387
14580 msgid "This command reads the target of a symbolic link."
14584 #: ../fish/guestfish-actions.pod:4123
14585 msgid "readlinklist"
14589 #: ../fish/guestfish-actions.pod:4125
14592 " readlinklist path 'names ...'\n"
14597 #: ../fish/guestfish-actions.pod:4127 ../src/guestfs-actions.pod:6401
14599 "This call allows you to do a C<readlink> operation on multiple files, where "
14600 "all files are in the directory C<path>. C<names> is the list of files from "
14605 #: ../fish/guestfish-actions.pod:4131 ../src/guestfs-actions.pod:6405
14607 "On return you get a list of strings, with a one-to-one correspondence to the "
14608 "C<names> list. Each string is the value of the symbolic link."
14612 #: ../fish/guestfish-actions.pod:4135 ../src/guestfs-actions.pod:6409
14614 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14615 "result string is the empty string C<\"\">. However the whole operation is "
14616 "completed even if there were C<readlink(2)> errors, and so you can call this "
14617 "function with names where you don't know if they are symbolic links already "
14618 "(albeit slightly less efficient)."
14622 #: ../fish/guestfish-actions.pod:4142 ../src/guestfs-actions.pod:6416
14624 "This call is intended for programs that want to efficiently list a directory "
14625 "contents without making many round-trips. Very long directory listings "
14626 "might cause the protocol message size to be exceeded, causing this call to "
14627 "fail. The caller must split up such requests into smaller groups of names."
14631 #: ../fish/guestfish-actions.pod:4149
14636 #: ../fish/guestfish-actions.pod:4151
14644 #: ../fish/guestfish-actions.pod:4153 ../src/guestfs-actions.pod:6435
14646 "Return the canonicalized absolute pathname of C<path>. The returned path "
14647 "has no C<.>, C<..> or symbolic link path elements."
14651 #: ../fish/guestfish-actions.pod:4156
14652 msgid "removexattr"
14656 #: ../fish/guestfish-actions.pod:4158
14659 " removexattr xattr path\n"
14664 #: ../fish/guestfish-actions.pod:4160 ../src/guestfs-actions.pod:6450
14666 "This call removes the extended attribute named C<xattr> of the file C<path>."
14670 #: ../fish/guestfish-actions.pod:4163
14671 msgid "See also: L</lremovexattr>, L<attr(5)>."
14675 #: ../fish/guestfish-actions.pod:4165
14680 #: ../fish/guestfish-actions.pod:4167
14683 " resize2fs device\n"
14688 #: ../fish/guestfish-actions.pod:4169 ../src/guestfs-actions.pod:6465
14690 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14691 "underlying device."
14695 #: ../fish/guestfish-actions.pod:4172
14697 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
14698 "before calling this command. For unknown reasons C<resize2fs> sometimes "
14699 "gives an error about this and sometimes not. In any case, it is always safe "
14700 "to call L</e2fsck-f> before calling this function."
14704 #: ../fish/guestfish-actions.pod:4178
14705 msgid "resize2fs-M"
14709 #: ../fish/guestfish-actions.pod:4180
14712 " resize2fs-M device\n"
14717 #: ../fish/guestfish-actions.pod:4182
14719 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14720 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14725 #: ../fish/guestfish-actions.pod:4186
14727 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14728 "and read the C<Block size> and C<Block count> values. These two numbers, "
14729 "multiplied together, give the resulting size of the minimal filesystem in "
14734 #: ../fish/guestfish-actions.pod:4191
14735 msgid "resize2fs-size"
14739 #: ../fish/guestfish-actions.pod:4193
14742 " resize2fs-size device size\n"
14747 #: ../fish/guestfish-actions.pod:4195
14749 "This command is the same as L</resize2fs> except that it allows you to "
14750 "specify the new size (in bytes) explicitly."
14754 #: ../fish/guestfish-actions.pod:4198
14759 #: ../fish/guestfish-actions.pod:4200
14767 #: ../fish/guestfish-actions.pod:4202 ../src/guestfs-actions.pod:6517
14768 msgid "Remove the single file C<path>."
14772 #: ../fish/guestfish-actions.pod:4204
14777 #: ../fish/guestfish-actions.pod:4206
14785 #: ../fish/guestfish-actions.pod:4208 ../src/guestfs-actions.pod:6529
14787 "Remove the file or directory C<path>, recursively removing the contents if "
14788 "its a directory. This is like the C<rm -rf> shell command."
14792 #: ../fish/guestfish-actions.pod:4212
14797 #: ../fish/guestfish-actions.pod:4214
14805 #: ../fish/guestfish-actions.pod:4216 ../src/guestfs-actions.pod:6543
14806 msgid "Remove the single directory C<path>."
14810 #: ../fish/guestfish-actions.pod:4218
14811 msgid "rmmountpoint"
14815 #: ../fish/guestfish-actions.pod:4220
14818 " rmmountpoint exemptpath\n"
14823 #: ../fish/guestfish-actions.pod:4222
14825 "This calls removes a mountpoint that was previously created with L</"
14826 "mkmountpoint>. See L</mkmountpoint> for full details."
14830 #: ../fish/guestfish-actions.pod:4226
14831 msgid "scrub-device"
14835 #: ../fish/guestfish-actions.pod:4228
14838 " scrub-device device\n"
14843 #: ../fish/guestfish-actions.pod:4230 ../src/guestfs-actions.pod:6569
14845 "This command writes patterns over C<device> to make data retrieval more "
14850 #: ../fish/guestfish-actions.pod:4233 ../fish/guestfish-actions.pod:4248
14851 #: ../fish/guestfish-actions.pod:4261 ../src/guestfs-actions.pod:6572
14852 #: ../src/guestfs-actions.pod:6593 ../src/guestfs-actions.pod:6612
14854 "It is an interface to the L<scrub(1)> program. See that manual page for "
14859 #: ../fish/guestfish-actions.pod:4239
14864 #: ../fish/guestfish-actions.pod:4241
14867 " scrub-file file\n"
14872 #: ../fish/guestfish-actions.pod:4243 ../src/guestfs-actions.pod:6588
14874 "This command writes patterns over a file to make data retrieval more "
14879 #: ../fish/guestfish-actions.pod:4246 ../src/guestfs-actions.pod:6591
14880 msgid "The file is I<removed> after scrubbing."
14884 #: ../fish/guestfish-actions.pod:4251
14885 msgid "scrub-freespace"
14889 #: ../fish/guestfish-actions.pod:4253
14892 " scrub-freespace dir\n"
14897 #: ../fish/guestfish-actions.pod:4255
14899 "This command creates the directory C<dir> and then fills it with files until "
14900 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
14901 "deletes them. The intention is to scrub any free space on the partition "
14902 "containing C<dir>."
14906 #: ../fish/guestfish-actions.pod:4264
14911 #: ../fish/guestfish-actions.pod:4266
14916 #: ../fish/guestfish-actions.pod:4268
14919 " set-append append\n"
14924 #: ../fish/guestfish-actions.pod:4270 ../src/guestfs-actions.pod:6625
14926 "This function is used to add additional options to the guest kernel command "
14931 #: ../fish/guestfish-actions.pod:4273 ../src/guestfs-actions.pod:6628
14933 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
14934 "environment variable."
14938 #: ../fish/guestfish-actions.pod:4276 ../src/guestfs-actions.pod:6631
14940 "Setting C<append> to C<NULL> means I<no> additional options are passed "
14941 "(libguestfs always adds a few of its own)."
14945 #: ../fish/guestfish-actions.pod:4279
14946 msgid "set-attach-method"
14950 #: ../fish/guestfish-actions.pod:4281
14951 msgid "attach-method"
14955 #: ../fish/guestfish-actions.pod:4283
14958 " set-attach-method attachmethod\n"
14963 #: ../fish/guestfish-actions.pod:4285 ../src/guestfs-actions.pod:6644
14965 "Set the method that libguestfs uses to connect to the back end guestfsd "
14966 "daemon. Possible methods are:"
14970 #: ../fish/guestfish-actions.pod:4290 ../src/guestfs-actions.pod:6649
14971 #: ../src/guestfs.pod:2916
14972 msgid "C<appliance>"
14976 #: ../fish/guestfish-actions.pod:4292 ../src/guestfs-actions.pod:6651
14978 "Launch an appliance and connect to it. This is the ordinary method and the "
14983 #: ../fish/guestfish-actions.pod:4295 ../src/guestfs-actions.pod:6654
14984 msgid "C<unix:I<path>>"
14988 #: ../fish/guestfish-actions.pod:4297 ../src/guestfs-actions.pod:6656
14989 msgid "Connect to the Unix domain socket I<path>."
14993 #: ../fish/guestfish-actions.pod:4299 ../src/guestfs-actions.pod:6658
14995 "This method lets you connect to an existing daemon or (using virtio-serial) "
14996 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
14997 "RUNNING DAEMONS>."
15001 #: ../fish/guestfish-actions.pod:4305
15002 msgid "set-autosync"
15006 #: ../fish/guestfish-actions.pod:4307
15011 #: ../fish/guestfish-actions.pod:4309
15014 " set-autosync true|false\n"
15019 #: ../fish/guestfish-actions.pod:4311 ../src/guestfs-actions.pod:6674
15021 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15022 "effort attempt to make filesystems consistent and synchronized when the "
15023 "handle is closed (also if the program exits without closing handles)."
15027 #: ../fish/guestfish-actions.pod:4316 ../src/guestfs-actions.pod:6679
15029 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15030 "disabled by default)."
15034 #: ../fish/guestfish-actions.pod:4319
15039 #: ../fish/guestfish-actions.pod:4321
15044 #: ../fish/guestfish-actions.pod:4323
15047 " set-direct true|false\n"
15052 #: ../fish/guestfish-actions.pod:4325 ../src/guestfs-actions.pod:6692
15054 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15055 "passed directly through to the appliance once it is launched."
15059 #: ../fish/guestfish-actions.pod:4329
15061 "One consequence of this is that log messages aren't caught by the library "
15062 "and handled by L</set-log-message-callback>, but go straight to stdout."
15066 #: ../fish/guestfish-actions.pod:4333 ../src/guestfs-actions.pod:6700
15067 msgid "You probably don't want to use this unless you know what you are doing."
15071 #: ../fish/guestfish-actions.pod:4336 ../src/guestfs-actions.pod:6703
15072 msgid "The default is disabled."
15076 #: ../fish/guestfish-actions.pod:4338
15077 msgid "set-e2label"
15081 #: ../fish/guestfish-actions.pod:4340
15084 " set-e2label device label\n"
15089 #: ../fish/guestfish-actions.pod:4342 ../src/guestfs-actions.pod:6716
15091 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15092 "C<label>. Filesystem labels are limited to 16 characters."
15096 #: ../fish/guestfish-actions.pod:4346
15098 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15099 "label on a filesystem."
15103 #: ../fish/guestfish-actions.pod:4349
15108 #: ../fish/guestfish-actions.pod:4351
15111 " set-e2uuid device uuid\n"
15116 #: ../fish/guestfish-actions.pod:4353 ../src/guestfs-actions.pod:6734
15118 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15119 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15120 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15124 #: ../fish/guestfish-actions.pod:4358
15126 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15127 "UUID of a filesystem."
15131 #: ../fish/guestfish-actions.pod:4361
15132 msgid "set-memsize"
15136 #: ../fish/guestfish-actions.pod:4363
15141 #: ../fish/guestfish-actions.pod:4365
15144 " set-memsize memsize\n"
15149 #: ../fish/guestfish-actions.pod:4367
15151 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15152 "This only has any effect if called before L</launch>."
15156 #: ../fish/guestfish-actions.pod:4371 ../src/guestfs-actions.pod:6756
15158 "You can also change this by setting the environment variable "
15159 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15163 #: ../fish/guestfish-actions.pod:4378
15164 msgid "set-network"
15168 #: ../fish/guestfish-actions.pod:4380
15173 #: ../fish/guestfish-actions.pod:4382
15176 " set-network true|false\n"
15181 #: ../fish/guestfish-actions.pod:4384 ../src/guestfs-actions.pod:6773
15183 "If C<network> is true, then the network is enabled in the libguestfs "
15184 "appliance. The default is false."
15188 #: ../fish/guestfish-actions.pod:4387 ../src/guestfs-actions.pod:6776
15190 "This affects whether commands are able to access the network (see L<guestfs"
15191 "(3)/RUNNING COMMANDS>)."
15195 #: ../fish/guestfish-actions.pod:4390
15197 "You must call this before calling L</launch>, otherwise it has no effect."
15201 #: ../fish/guestfish-actions.pod:4393
15206 #: ../fish/guestfish-actions.pod:4397
15209 " set-path searchpath\n"
15214 #: ../fish/guestfish-actions.pod:4399 ../src/guestfs-actions.pod:6792
15215 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15219 #: ../fish/guestfish-actions.pod:4401 ../src/guestfs-actions.pod:6794
15221 "The default is C<$libdir/guestfs> unless overridden by setting "
15222 "C<LIBGUESTFS_PATH> environment variable."
15226 #: ../fish/guestfish-actions.pod:4404 ../src/guestfs-actions.pod:6797
15227 msgid "Setting C<path> to C<NULL> restores the default path."
15231 #: ../fish/guestfish-actions.pod:4406
15236 #: ../fish/guestfish-actions.pod:4408
15241 #: ../fish/guestfish-actions.pod:4410
15244 " set-pgroup true|false\n"
15249 #: ../fish/guestfish-actions.pod:4412 ../src/guestfs-actions.pod:6809
15251 "If C<pgroup> is true, child processes are placed into their own process "
15256 #: ../fish/guestfish-actions.pod:4415 ../src/guestfs-actions.pod:6812
15258 "The practical upshot of this is that signals like C<SIGINT> (from users "
15259 "pressing C<^C>) won't be received by the child process."
15263 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6815
15265 "The default for this flag is false, because usually you want C<^C> to kill "
15270 #: ../fish/guestfish-actions.pod:4421
15275 #: ../fish/guestfish-actions.pod:4423
15280 #: ../fish/guestfish-actions.pod:4425
15288 #: ../fish/guestfish-actions.pod:4427 ../src/guestfs-actions.pod:6828
15289 msgid "Set the qemu binary that we will use."
15293 #: ../fish/guestfish-actions.pod:4429 ../src/guestfs-actions.pod:6830
15295 "The default is chosen when the library was compiled by the configure script."
15299 #: ../fish/guestfish-actions.pod:4432 ../src/guestfs-actions.pod:6833
15301 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15306 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6836
15307 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15311 #: ../fish/guestfish-actions.pod:4437 ../src/guestfs-actions.pod:6838
15313 "Note that you should call this function as early as possible after creating "
15314 "the handle. This is because some pre-launch operations depend on testing "
15315 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15316 "don't retest features, and so you might see inconsistent results. Using the "
15317 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15318 "the qemu binary at the same time as the handle is created."
15322 #: ../fish/guestfish-actions.pod:4445
15323 msgid "set-recovery-proc"
15327 #: ../fish/guestfish-actions.pod:4447
15328 msgid "recovery-proc"
15332 #: ../fish/guestfish-actions.pod:4449
15335 " set-recovery-proc true|false\n"
15340 #: ../fish/guestfish-actions.pod:4451
15342 "If this is called with the parameter C<false> then L</launch> does not "
15343 "create a recovery process. The purpose of the recovery process is to stop "
15344 "runaway qemu processes in the case where the main program aborts abruptly."
15348 #: ../fish/guestfish-actions.pod:4456
15350 "This only has any effect if called before L</launch>, and the default is "
15355 #: ../fish/guestfish-actions.pod:4459 ../src/guestfs-actions.pod:6864
15357 "About the only time when you would want to disable this is if the main "
15358 "process will fork itself into the background (\"daemonize\" itself). In "
15359 "this case the recovery process thinks that the main program has disappeared "
15360 "and so kills qemu, which is not very helpful."
15364 #: ../fish/guestfish-actions.pod:4465
15365 msgid "set-selinux"
15369 #: ../fish/guestfish-actions.pod:4467
15374 #: ../fish/guestfish-actions.pod:4469
15377 " set-selinux true|false\n"
15382 #: ../fish/guestfish-actions.pod:4471 ../src/guestfs-actions.pod:6880
15384 "This sets the selinux flag that is passed to the appliance at boot time. "
15385 "The default is C<selinux=0> (disabled)."
15389 #: ../fish/guestfish-actions.pod:4474 ../src/guestfs-actions.pod:6883
15391 "Note that if SELinux is enabled, it is always in Permissive mode "
15392 "(C<enforcing=0>)."
15396 #: ../fish/guestfish-actions.pod:4480
15401 #: ../fish/guestfish-actions.pod:4482
15406 #: ../fish/guestfish-actions.pod:4484
15414 #: ../fish/guestfish-actions.pod:4486 ../src/guestfs-actions.pod:6899
15416 "Change the number of virtual CPUs assigned to the appliance. The default is "
15417 "C<1>. Increasing this may improve performance, though often it has no "
15422 #: ../fish/guestfish-actions.pod:4490
15423 msgid "This function must be called before L</launch>."
15427 #: ../fish/guestfish-actions.pod:4492
15432 #: ../fish/guestfish-actions.pod:4494
15437 #: ../fish/guestfish-actions.pod:4496
15440 " set-trace true|false\n"
15445 #: ../fish/guestfish-actions.pod:4498 ../src/guestfs-actions.pod:6915
15447 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15448 "return values are traced."
15452 #: ../fish/guestfish-actions.pod:4501 ../src/guestfs-actions.pod:6918
15454 "If you want to trace C API calls into libguestfs (and other libraries) then "
15455 "possibly a better way is to use the external ltrace(1) command."
15459 #: ../fish/guestfish-actions.pod:4505 ../src/guestfs-actions.pod:6922
15461 "Command traces are disabled unless the environment variable "
15462 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15466 #: ../fish/guestfish-actions.pod:4508
15468 "Trace messages are normally sent to C<stderr>, unless you register a "
15469 "callback to send them somewhere else (see L</set-event-callback>)."
15473 #: ../fish/guestfish-actions.pod:4512
15474 msgid "set-verbose"
15478 #: ../fish/guestfish-actions.pod:4514
15483 #: ../fish/guestfish-actions.pod:4516
15486 " set-verbose true|false\n"
15491 #: ../fish/guestfish-actions.pod:4518 ../src/guestfs-actions.pod:6939
15492 msgid "If C<verbose> is true, this turns on verbose messages."
15496 #: ../fish/guestfish-actions.pod:4520 ../src/guestfs-actions.pod:6941
15498 "Verbose messages are disabled unless the environment variable "
15499 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15503 #: ../fish/guestfish-actions.pod:4523
15505 "Verbose messages are normally sent to C<stderr>, unless you register a "
15506 "callback to send them somewhere else (see L</set-event-callback>)."
15510 #: ../fish/guestfish-actions.pod:4527
15515 #: ../fish/guestfish-actions.pod:4529
15518 " setcon context\n"
15523 #: ../fish/guestfish-actions.pod:4531 ../src/guestfs-actions.pod:6958
15525 "This sets the SELinux security context of the daemon to the string "
15530 #: ../fish/guestfish-actions.pod:4534 ../src/guestfs-actions.pod:6961
15531 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15535 #: ../fish/guestfish-actions.pod:4536
15540 #: ../fish/guestfish-actions.pod:4538
15543 " setxattr xattr val vallen path\n"
15548 #: ../fish/guestfish-actions.pod:4540 ../src/guestfs-actions.pod:6976
15550 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15551 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15555 #: ../fish/guestfish-actions.pod:4544
15556 msgid "See also: L</lsetxattr>, L<attr(5)>."
15560 #: ../fish/guestfish-actions.pod:4546
15565 #: ../fish/guestfish-actions.pod:4548
15568 " sfdisk device cyls heads sectors 'lines ...'\n"
15573 #: ../fish/guestfish-actions.pod:4550 ../src/guestfs-actions.pod:7003
15575 "This is a direct interface to the L<sfdisk(8)> program for creating "
15576 "partitions on block devices."
15580 #: ../fish/guestfish-actions.pod:4553 ../src/guestfs-actions.pod:7006
15581 msgid "C<device> should be a block device, for example C</dev/sda>."
15585 #: ../fish/guestfish-actions.pod:4555 ../src/guestfs-actions.pod:7008
15587 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15588 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
15589 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15590 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15591 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15592 "the kernel) cannot work out the right geometry and you will need to tell it."
15596 #: ../fish/guestfish-actions.pod:4563 ../src/guestfs-actions.pod:7016
15598 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15599 "refer to the L<sfdisk(8)> manpage."
15603 #: ../fish/guestfish-actions.pod:4566 ../src/guestfs-actions.pod:7019
15605 "To create a single partition occupying the whole disk, you would pass "
15606 "C<lines> as a single element list, when the single element being the string "
15611 #: ../fish/guestfish-actions.pod:4570
15612 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15616 #: ../fish/guestfish-actions.pod:4576 ../fish/guestfish-actions.pod:4599
15617 #: ../fish/guestfish-actions.pod:4621
15619 "I<This function is deprecated.> In new code, use the L</part_add> call "
15624 #: ../fish/guestfish-actions.pod:4583
15629 #: ../fish/guestfish-actions.pod:4585
15632 " sfdiskM device 'lines ...'\n"
15637 #: ../fish/guestfish-actions.pod:4587
15639 "This is a simplified interface to the L</sfdisk> command, where partition "
15640 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15641 "you don't need to specify the cyls, heads and sectors parameters which were "
15642 "rarely if ever used anyway."
15646 #: ../fish/guestfish-actions.pod:4593
15647 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15651 #: ../fish/guestfish-actions.pod:4606
15656 #: ../fish/guestfish-actions.pod:4608
15659 " sfdisk-N device partnum cyls heads sectors line\n"
15664 #: ../fish/guestfish-actions.pod:4610 ../src/guestfs-actions.pod:7081
15666 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15667 "(note: C<n> counts from 1)."
15671 #: ../fish/guestfish-actions.pod:4613
15673 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15674 "cyls/heads/sectors parameters."
15678 #: ../fish/guestfish-actions.pod:4616
15679 msgid "See also: L</part-add>"
15683 #: ../fish/guestfish-actions.pod:4628
15684 msgid "sfdisk-disk-geometry"
15688 #: ../fish/guestfish-actions.pod:4630
15691 " sfdisk-disk-geometry device\n"
15696 #: ../fish/guestfish-actions.pod:4632
15698 "This displays the disk geometry of C<device> read from the partition table. "
15699 "Especially in the case where the underlying block device has been resized, "
15700 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
15701 "kernel-geometry>)."
15705 #: ../fish/guestfish-actions.pod:4637 ../fish/guestfish-actions.pod:4646
15706 #: ../src/guestfs-actions.pod:7107 ../src/guestfs-actions.pod:7123
15707 msgid "The result is in human-readable format, and not designed to be parsed."
15711 #: ../fish/guestfish-actions.pod:4640
15712 msgid "sfdisk-kernel-geometry"
15716 #: ../fish/guestfish-actions.pod:4642
15719 " sfdisk-kernel-geometry device\n"
15724 #: ../fish/guestfish-actions.pod:4644 ../src/guestfs-actions.pod:7121
15725 msgid "This displays the kernel's idea of the geometry of C<device>."
15729 #: ../fish/guestfish-actions.pod:4649
15734 #: ../fish/guestfish-actions.pod:4651
15737 " sfdisk-l device\n"
15742 #: ../fish/guestfish-actions.pod:4653 ../src/guestfs-actions.pod:7144
15744 "This displays the partition table on C<device>, in the human-readable output "
15745 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15749 #: ../fish/guestfish-actions.pod:4657
15750 msgid "See also: L</part-list>"
15754 #: ../fish/guestfish-actions.pod:4659
15756 "I<This function is deprecated.> In new code, use the L</part_list> call "
15761 #: ../fish/guestfish-actions.pod:4666
15766 #: ../fish/guestfish-actions.pod:4668
15774 #: ../fish/guestfish-actions.pod:4670 ../src/guestfs-actions.pod:7161
15776 "This call runs a command from the guest filesystem via the guest's C</bin/"
15781 #: ../fish/guestfish-actions.pod:4673
15782 msgid "This is like L</command>, but passes the command to:"
15786 #: ../fish/guestfish-actions.pod:4675 ../src/guestfs-actions.pod:7166
15789 " /bin/sh -c \"command\"\n"
15794 #: ../fish/guestfish-actions.pod:4677 ../src/guestfs-actions.pod:7168
15796 "Depending on the guest's shell, this usually results in wildcards being "
15797 "expanded, shell expressions being interpolated and so on."
15801 #: ../fish/guestfish-actions.pod:4681
15802 msgid "All the provisos about L</command> apply to this call."
15806 #: ../fish/guestfish-actions.pod:4683
15811 #: ../fish/guestfish-actions.pod:4685
15814 " sh-lines command\n"
15819 #: ../fish/guestfish-actions.pod:4687
15820 msgid "This is the same as L</sh>, but splits the result into a list of lines."
15824 #: ../fish/guestfish-actions.pod:4690
15825 msgid "See also: L</command-lines>"
15829 #: ../fish/guestfish-actions.pod:4692
15834 #: ../fish/guestfish-actions.pod:4694
15842 #: ../fish/guestfish-actions.pod:4696 ../src/guestfs-actions.pod:7202
15843 msgid "Sleep for C<secs> seconds."
15847 #: ../fish/guestfish-actions.pod:4698
15852 #: ../fish/guestfish-actions.pod:4700
15860 #: ../fish/guestfish-actions.pod:4704 ../src/guestfs-actions.pod:7216
15861 msgid "This is the same as the C<stat(2)> system call."
15865 #: ../fish/guestfish-actions.pod:4706
15870 #: ../fish/guestfish-actions.pod:4708
15878 #: ../fish/guestfish-actions.pod:4710 ../src/guestfs-actions.pod:7230
15880 "Returns file system statistics for any mounted file system. C<path> should "
15881 "be a file or directory in the mounted file system (typically it is the mount "
15882 "point itself, but it doesn't need to be)."
15886 #: ../fish/guestfish-actions.pod:4714 ../src/guestfs-actions.pod:7234
15887 msgid "This is the same as the C<statvfs(2)> system call."
15891 #: ../fish/guestfish-actions.pod:4716
15896 #: ../fish/guestfish-actions.pod:4718
15904 #: ../fish/guestfish-actions.pod:4720 ../src/guestfs-actions.pod:7248
15906 "This runs the L<strings(1)> command on a file and returns the list of "
15907 "printable strings found."
15911 #: ../fish/guestfish-actions.pod:4726
15916 #: ../fish/guestfish-actions.pod:4728
15919 " strings-e encoding path\n"
15924 #: ../fish/guestfish-actions.pod:4730
15926 "This is like the L</strings> command, but allows you to specify the encoding "
15927 "of strings that are looked for in the source file C<path>."
15931 #: ../fish/guestfish-actions.pod:4734 ../src/guestfs-actions.pod:7271
15932 msgid "Allowed encodings are:"
15936 #: ../fish/guestfish-actions.pod:4738 ../src/guestfs-actions.pod:7275
15941 #: ../fish/guestfish-actions.pod:4740
15943 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
15944 "ISO-8859-X (this is what L</strings> uses)."
15948 #: ../fish/guestfish-actions.pod:4743 ../src/guestfs-actions.pod:7280
15953 #: ../fish/guestfish-actions.pod:4745 ../src/guestfs-actions.pod:7282
15954 msgid "Single 8-bit-byte characters."
15958 #: ../fish/guestfish-actions.pod:4747 ../src/guestfs-actions.pod:7284
15963 #: ../fish/guestfish-actions.pod:4749 ../src/guestfs-actions.pod:7286
15964 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
15968 #: ../fish/guestfish-actions.pod:4752 ../src/guestfs-actions.pod:7289
15969 msgid "l (lower case letter L)"
15973 #: ../fish/guestfish-actions.pod:4754 ../src/guestfs-actions.pod:7291
15975 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
15976 "examining binaries in Windows guests."
15980 #: ../fish/guestfish-actions.pod:4757 ../src/guestfs-actions.pod:7294
15985 #: ../fish/guestfish-actions.pod:4759 ../src/guestfs-actions.pod:7296
15986 msgid "32-bit big endian such as UCS-4BE."
15990 #: ../fish/guestfish-actions.pod:4761 ../src/guestfs-actions.pod:7298
15995 #: ../fish/guestfish-actions.pod:4763 ../src/guestfs-actions.pod:7300
15996 msgid "32-bit little endian such as UCS-4LE."
16000 #: ../fish/guestfish-actions.pod:4767 ../src/guestfs-actions.pod:7304
16001 msgid "The returned strings are transcoded to UTF-8."
16005 #: ../fish/guestfish-actions.pod:4772
16006 msgid "swapoff-device"
16010 #: ../fish/guestfish-actions.pod:4774
16013 " swapoff-device device\n"
16018 #: ../fish/guestfish-actions.pod:4776
16020 "This command disables the libguestfs appliance swap device or partition "
16021 "named C<device>. See L</swapon-device>."
16025 #: ../fish/guestfish-actions.pod:4780
16026 msgid "swapoff-file"
16030 #: ../fish/guestfish-actions.pod:4782
16033 " swapoff-file file\n"
16038 #: ../fish/guestfish-actions.pod:4784 ../src/guestfs-actions.pod:7335
16039 msgid "This command disables the libguestfs appliance swap on file."
16043 #: ../fish/guestfish-actions.pod:4786
16044 msgid "swapoff-label"
16048 #: ../fish/guestfish-actions.pod:4788
16051 " swapoff-label label\n"
16056 #: ../fish/guestfish-actions.pod:4790 ../src/guestfs-actions.pod:7347
16058 "This command disables the libguestfs appliance swap on labeled swap "
16063 #: ../fish/guestfish-actions.pod:4793
16064 msgid "swapoff-uuid"
16068 #: ../fish/guestfish-actions.pod:4795
16071 " swapoff-uuid uuid\n"
16076 #: ../fish/guestfish-actions.pod:4797 ../src/guestfs-actions.pod:7360
16078 "This command disables the libguestfs appliance swap partition with the given "
16083 #: ../fish/guestfish-actions.pod:4800
16084 msgid "swapon-device"
16088 #: ../fish/guestfish-actions.pod:4802
16091 " swapon-device device\n"
16096 #: ../fish/guestfish-actions.pod:4804
16098 "This command enables the libguestfs appliance to use the swap device or "
16099 "partition named C<device>. The increased memory is made available for all "
16100 "commands, for example those run using L</command> or L</sh>."
16104 #: ../fish/guestfish-actions.pod:4809 ../src/guestfs-actions.pod:7378
16106 "Note that you should not swap to existing guest swap partitions unless you "
16107 "know what you are doing. They may contain hibernation information, or other "
16108 "information that the guest doesn't want you to trash. You also risk leaking "
16109 "information about the host to the guest this way. Instead, attach a new "
16110 "host device to the guest and swap on that."
16114 #: ../fish/guestfish-actions.pod:4816
16115 msgid "swapon-file"
16119 #: ../fish/guestfish-actions.pod:4818
16122 " swapon-file file\n"
16127 #: ../fish/guestfish-actions.pod:4820
16129 "This command enables swap to a file. See L</swapon-device> for other notes."
16133 #: ../fish/guestfish-actions.pod:4823
16134 msgid "swapon-label"
16138 #: ../fish/guestfish-actions.pod:4825
16141 " swapon-label label\n"
16146 #: ../fish/guestfish-actions.pod:4827
16148 "This command enables swap to a labeled swap partition. See L</swapon-"
16149 "device> for other notes."
16153 #: ../fish/guestfish-actions.pod:4830
16154 msgid "swapon-uuid"
16158 #: ../fish/guestfish-actions.pod:4832
16161 " swapon-uuid uuid\n"
16166 #: ../fish/guestfish-actions.pod:4834
16168 "This command enables swap to a swap partition with the given UUID. See L</"
16169 "swapon-device> for other notes."
16173 #: ../fish/guestfish-actions.pod:4837
16178 #: ../fish/guestfish-actions.pod:4839
16186 #: ../fish/guestfish-actions.pod:4841 ../src/guestfs-actions.pod:7433
16188 "This syncs the disk, so that any writes are flushed through to the "
16189 "underlying disk image."
16193 #: ../fish/guestfish-actions.pod:4844 ../src/guestfs-actions.pod:7436
16195 "You should always call this if you have modified a disk image, before "
16196 "closing the handle."
16200 #: ../fish/guestfish-actions.pod:4847
16205 #: ../fish/guestfish-actions.pod:4849
16213 #: ../fish/guestfish-actions.pod:4851 ../src/guestfs-actions.pod:7449
16215 "This command returns up to the last 10 lines of a file as a list of strings."
16219 #: ../fish/guestfish-actions.pod:4857
16224 #: ../fish/guestfish-actions.pod:4859
16227 " tail-n nrlines path\n"
16232 #: ../fish/guestfish-actions.pod:4861 ../src/guestfs-actions.pod:7468
16234 "If the parameter C<nrlines> is a positive number, this returns the last "
16235 "C<nrlines> lines of the file C<path>."
16239 #: ../fish/guestfish-actions.pod:4864 ../src/guestfs-actions.pod:7471
16241 "If the parameter C<nrlines> is a negative number, this returns lines from "
16242 "the file C<path>, starting with the C<-nrlines>th line."
16246 #: ../fish/guestfish-actions.pod:4872
16251 #: ../fish/guestfish-actions.pod:4874
16254 " tar-in (tarfile|-) directory\n"
16259 #: ../fish/guestfish-actions.pod:4876 ../src/guestfs-actions.pod:7492
16261 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16262 "tar file) into C<directory>."
16266 #: ../fish/guestfish-actions.pod:4879
16267 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16271 #: ../fish/guestfish-actions.pod:4884
16276 #: ../fish/guestfish-actions.pod:4886
16279 " tar-out directory (tarfile|-)\n"
16284 #: ../fish/guestfish-actions.pod:4888 ../src/guestfs-actions.pod:7509
16286 "This command packs the contents of C<directory> and downloads it to local "
16291 #: ../fish/guestfish-actions.pod:4891
16292 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16296 #: ../fish/guestfish-actions.pod:4896
16301 #: ../fish/guestfish-actions.pod:4898
16304 " tgz-in (tarball|-) directory\n"
16309 #: ../fish/guestfish-actions.pod:4900 ../src/guestfs-actions.pod:7526
16311 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16312 "tar file) into C<directory>."
16316 #: ../fish/guestfish-actions.pod:4903
16317 msgid "To upload an uncompressed tarball, use L</tar-in>."
16321 #: ../fish/guestfish-actions.pod:4907
16326 #: ../fish/guestfish-actions.pod:4909
16329 " tgz-out directory (tarball|-)\n"
16334 #: ../fish/guestfish-actions.pod:4911 ../src/guestfs-actions.pod:7542
16336 "This command packs the contents of C<directory> and downloads it to local "
16341 #: ../fish/guestfish-actions.pod:4914
16342 msgid "To download an uncompressed tarball, use L</tar-out>."
16346 #: ../fish/guestfish-actions.pod:4918
16351 #: ../fish/guestfish-actions.pod:4920
16359 #: ../fish/guestfish-actions.pod:4922 ../src/guestfs-actions.pod:7557
16361 "Touch acts like the L<touch(1)> command. It can be used to update the "
16362 "timestamps on a file, or, if the file does not exist, to create a new zero-"
16367 #: ../fish/guestfish-actions.pod:4926 ../src/guestfs-actions.pod:7561
16369 "This command only works on regular files, and will fail on other file types "
16370 "such as directories, symbolic links, block special etc."
16374 #: ../fish/guestfish-actions.pod:4929
16379 #: ../fish/guestfish-actions.pod:4931
16387 #: ../fish/guestfish-actions.pod:4933 ../src/guestfs-actions.pod:7574
16389 "This command truncates C<path> to a zero-length file. The file must exist "
16394 #: ../fish/guestfish-actions.pod:4936
16395 msgid "truncate-size"
16399 #: ../fish/guestfish-actions.pod:4938
16402 " truncate-size path size\n"
16407 #: ../fish/guestfish-actions.pod:4940 ../src/guestfs-actions.pod:7588
16409 "This command truncates C<path> to size C<size> bytes. The file must exist "
16414 #: ../fish/guestfish-actions.pod:4943
16416 "If the current file size is less than C<size> then the file is extended to "
16417 "the required size with zero bytes. This creates a sparse file (ie. disk "
16418 "blocks are not allocated for the file until you write to it). To create a "
16419 "non-sparse file of zeroes, use L</fallocate64> instead."
16423 #: ../fish/guestfish-actions.pod:4949
16428 #: ../fish/guestfish-actions.pod:4951
16431 " tune2fs-l device\n"
16436 #: ../fish/guestfish-actions.pod:4953 ../src/guestfs-actions.pod:7607
16438 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16443 #: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7610
16445 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16446 "for more details. The list of fields returned isn't clearly defined, and "
16447 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16448 "and the filesystem itself."
16452 #: ../fish/guestfish-actions.pod:4961
16457 #: ../fish/guestfish-actions.pod:4963
16460 " txz-in (tarball|-) directory\n"
16465 #: ../fish/guestfish-actions.pod:4965 ../src/guestfs-actions.pod:7630
16467 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16468 "tar file) into C<directory>."
16472 #: ../fish/guestfish-actions.pod:4970
16477 #: ../fish/guestfish-actions.pod:4972
16480 " txz-out directory (tarball|-)\n"
16485 #: ../fish/guestfish-actions.pod:4974 ../src/guestfs-actions.pod:7644
16487 "This command packs the contents of C<directory> and downloads it to local "
16488 "file C<tarball> (as an xz compressed tar archive)."
16492 #: ../fish/guestfish-actions.pod:4979
16497 #: ../fish/guestfish-actions.pod:4981
16505 #: ../fish/guestfish-actions.pod:4983 ../src/guestfs-actions.pod:7657
16507 "This function sets the mask used for creating new files and device nodes to "
16512 #: ../fish/guestfish-actions.pod:4986 ../src/guestfs-actions.pod:7660
16514 "Typical umask values would be C<022> which creates new files with "
16515 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16516 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16520 #: ../fish/guestfish-actions.pod:4991 ../src/guestfs-actions.pod:7665
16522 "The default umask is C<022>. This is important because it means that "
16523 "directories and device nodes will be created with C<0644> or C<0755> mode "
16524 "even if you specify C<0777>."
16528 #: ../fish/guestfish-actions.pod:4995
16529 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16533 #: ../fish/guestfish-actions.pod:4998 ../src/guestfs-actions.pod:7672
16534 msgid "This call returns the previous umask."
16538 #: ../fish/guestfish-actions.pod:5000
16543 #: ../fish/guestfish-actions.pod:5002
16548 #: ../fish/guestfish-actions.pod:5004
16551 " umount pathordevice\n"
16556 #: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7684
16558 "This unmounts the given filesystem. The filesystem may be specified either "
16559 "by its mountpoint (path) or the device which contains the filesystem."
16563 #: ../fish/guestfish-actions.pod:5010
16568 #: ../fish/guestfish-actions.pod:5012
16569 msgid "unmount-all"
16573 #: ../fish/guestfish-actions.pod:5014
16581 #: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7697
16582 msgid "This unmounts all mounted filesystems."
16586 #: ../fish/guestfish-actions.pod:5018 ../src/guestfs-actions.pod:7699
16587 msgid "Some internal mounts are not unmounted by this call."
16591 #: ../fish/guestfish-actions.pod:5020
16596 #: ../fish/guestfish-actions.pod:5022
16599 " upload (filename|-) remotefilename\n"
16604 #: ../fish/guestfish-actions.pod:5024 ../fish/guestfish-actions.pod:5037
16605 #: ../src/guestfs-actions.pod:7712 ../src/guestfs-actions.pod:7736
16606 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16610 #: ../fish/guestfish-actions.pod:5029
16611 msgid "See also L</download>."
16615 #: ../fish/guestfish-actions.pod:5033
16616 msgid "upload-offset"
16620 #: ../fish/guestfish-actions.pod:5035
16623 " upload-offset (filename|-) remotefilename offset\n"
16628 #: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7739
16630 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
16631 "The intention is to overwrite parts of existing files or devices, although "
16632 "if a non-existant file is specified then it is created with a \"hole\" "
16633 "before C<offset>. The size of the data written is implicit in the size of "
16634 "the source C<filename>."
16638 #: ../fish/guestfish-actions.pod:5047
16640 "Note that there is no limit on the amount of data that can be uploaded with "
16641 "this call, unlike with L</pwrite>, and this call always writes the full "
16642 "amount unless an error occurs."
16646 #: ../fish/guestfish-actions.pod:5052
16647 msgid "See also L</upload>, L</pwrite>."
16651 #: ../fish/guestfish-actions.pod:5056
16656 #: ../fish/guestfish-actions.pod:5058
16659 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
16664 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7772
16665 msgid "This command sets the timestamps of a file with nanosecond precision."
16669 #: ../fish/guestfish-actions.pod:5063 ../src/guestfs-actions.pod:7775
16671 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16676 #: ../fish/guestfish-actions.pod:5066 ../src/guestfs-actions.pod:7778
16678 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16679 "nanoseconds from the epoch."
16683 #: ../fish/guestfish-actions.pod:5069 ../src/guestfs-actions.pod:7781
16685 "If the C<*nsecs> field contains the special value C<-1> then the "
16686 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16687 "ignored in this case)."
16691 #: ../fish/guestfish-actions.pod:5073 ../src/guestfs-actions.pod:7785
16693 "If the C<*nsecs> field contains the special value C<-2> then the "
16694 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16699 #: ../fish/guestfish-actions.pod:5077
16704 #: ../fish/guestfish-actions.pod:5079
16712 #: ../fish/guestfish-actions.pod:5081 ../src/guestfs-actions.pod:7798
16714 "Return the libguestfs version number that the program is linked against."
16718 #: ../fish/guestfish-actions.pod:5084 ../src/guestfs-actions.pod:7801
16720 "Note that because of dynamic linking this is not necessarily the version of "
16721 "libguestfs that you compiled against. You can compile the program, and then "
16722 "at runtime dynamically link against a completely different C<libguestfs.so> "
16727 #: ../fish/guestfish-actions.pod:5089 ../src/guestfs-actions.pod:7806
16729 "This call was added in version C<1.0.58>. In previous versions of "
16730 "libguestfs there was no way to get the version number. From C code you can "
16731 "use dynamic linker functions to find out if this symbol exists (if it "
16732 "doesn't, then it's an earlier version)."
16736 #: ../fish/guestfish-actions.pod:5095 ../src/guestfs-actions.pod:7812
16738 "The call returns a structure with four elements. The first three (C<major>, "
16739 "C<minor> and C<release>) are numbers and correspond to the usual version "
16740 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16741 "but may be used for distro-specific information."
16745 #: ../fish/guestfish-actions.pod:5101 ../src/guestfs-actions.pod:7818
16747 "To construct the original version string: C<$major.$minor.$release$extra>"
16751 #: ../fish/guestfish-actions.pod:5104 ../src/guestfs-actions.pod:7821
16752 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16756 #: ../fish/guestfish-actions.pod:5106
16758 "I<Note:> Don't use this call to test for availability of features. In "
16759 "enterprise distributions we backport features from later versions into "
16760 "earlier versions, making this an unreliable way to test for features. Use "
16761 "L</available> instead."
16765 #: ../fish/guestfish-actions.pod:5112
16770 #: ../fish/guestfish-actions.pod:5114
16773 " vfs-label device\n"
16778 #: ../fish/guestfish-actions.pod:5116 ../src/guestfs-actions.pod:7841
16779 msgid "This returns the filesystem label of the filesystem on C<device>."
16783 #: ../fish/guestfish-actions.pod:5119 ../src/guestfs-actions.pod:7844
16784 msgid "If the filesystem is unlabeled, this returns the empty string."
16788 #: ../fish/guestfish-actions.pod:5121
16789 msgid "To find a filesystem from the label, use L</findfs-label>."
16793 #: ../fish/guestfish-actions.pod:5123
16798 #: ../fish/guestfish-actions.pod:5125
16801 " vfs-type device\n"
16806 #: ../fish/guestfish-actions.pod:5127 ../src/guestfs-actions.pod:7859
16808 "This command gets the filesystem type corresponding to the filesystem on "
16813 #: ../fish/guestfish-actions.pod:5130 ../src/guestfs-actions.pod:7862
16815 "For most filesystems, the result is the name of the Linux VFS module which "
16816 "would be used to mount this filesystem if you mounted it without specifying "
16817 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16821 #: ../fish/guestfish-actions.pod:5135
16826 #: ../fish/guestfish-actions.pod:5137
16829 " vfs-uuid device\n"
16834 #: ../fish/guestfish-actions.pod:5139 ../src/guestfs-actions.pod:7878
16835 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16839 #: ../fish/guestfish-actions.pod:5142 ../src/guestfs-actions.pod:7881
16840 msgid "If the filesystem does not have a UUID, this returns the empty string."
16844 #: ../fish/guestfish-actions.pod:5144
16845 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
16849 #: ../fish/guestfish-actions.pod:5146
16850 msgid "vg-activate"
16854 #: ../fish/guestfish-actions.pod:5148
16857 " vg-activate true|false 'volgroups ...'\n"
16862 #: ../fish/guestfish-actions.pod:5150 ../src/guestfs-actions.pod:7897
16864 "This command activates or (if C<activate> is false) deactivates all logical "
16865 "volumes in the listed volume groups C<volgroups>."
16869 #: ../fish/guestfish-actions.pod:5153 ../src/guestfs-actions.pod:7900
16870 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16874 #: ../fish/guestfish-actions.pod:5155 ../src/guestfs-actions.pod:7902
16876 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16877 "activated or deactivated."
16881 #: ../fish/guestfish-actions.pod:5158
16882 msgid "vg-activate-all"
16886 #: ../fish/guestfish-actions.pod:5160
16889 " vg-activate-all true|false\n"
16894 #: ../fish/guestfish-actions.pod:5162 ../src/guestfs-actions.pod:7915
16896 "This command activates or (if C<activate> is false) deactivates all logical "
16897 "volumes in all volume groups."
16901 #: ../fish/guestfish-actions.pod:5165 ../src/guestfs-actions.pod:7918
16902 msgid "This command is the same as running C<vgchange -a y|n>"
16906 #: ../fish/guestfish-actions.pod:5167
16911 #: ../fish/guestfish-actions.pod:5169
16914 " vgcreate volgroup 'physvols ...'\n"
16919 #: ../fish/guestfish-actions.pod:5171 ../src/guestfs-actions.pod:7931
16921 "This creates an LVM volume group called C<volgroup> from the non-empty list "
16922 "of physical volumes C<physvols>."
16926 #: ../fish/guestfish-actions.pod:5174
16931 #: ../fish/guestfish-actions.pod:5176
16934 " vglvuuids vgname\n"
16939 #: ../fish/guestfish-actions.pod:5178 ../src/guestfs-actions.pod:7944
16941 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
16942 "volumes created in this volume group."
16946 #: ../fish/guestfish-actions.pod:5181
16948 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
16949 "logical volumes and volume groups."
16953 #: ../fish/guestfish-actions.pod:5184
16954 msgid "See also L</vgpvuuids>."
16958 #: ../fish/guestfish-actions.pod:5186
16963 #: ../fish/guestfish-actions.pod:5188
16966 " vgpvuuids vgname\n"
16971 #: ../fish/guestfish-actions.pod:5190 ../src/guestfs-actions.pod:7964
16973 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
16974 "volumes that this volume group resides on."
16978 #: ../fish/guestfish-actions.pod:5193
16980 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
16981 "physical volumes and volume groups."
16985 #: ../fish/guestfish-actions.pod:5196
16986 msgid "See also L</vglvuuids>."
16990 #: ../fish/guestfish-actions.pod:5198
16995 #: ../fish/guestfish-actions.pod:5200
16998 " vgremove vgname\n"
17003 #: ../fish/guestfish-actions.pod:5202 ../src/guestfs-actions.pod:7984
17004 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17008 #: ../fish/guestfish-actions.pod:5204 ../src/guestfs-actions.pod:7986
17010 "This also forcibly removes all logical volumes in the volume group (if any)."
17014 #: ../fish/guestfish-actions.pod:5207
17019 #: ../fish/guestfish-actions.pod:5209
17022 " vgrename volgroup newvolgroup\n"
17027 #: ../fish/guestfish-actions.pod:5211 ../src/guestfs-actions.pod:8000
17028 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17032 #: ../fish/guestfish-actions.pod:5213
17037 #: ../fish/guestfish-actions.pod:5215
17045 #: ../fish/guestfish-actions.pod:5217 ../src/guestfs-actions.pod:8011
17047 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
17052 #: ../fish/guestfish-actions.pod:5220 ../src/guestfs-actions.pod:8014
17054 "This returns a list of just the volume group names that were detected (eg. "
17059 #: ../fish/guestfish-actions.pod:5223
17060 msgid "See also L</vgs-full>."
17064 #: ../fish/guestfish-actions.pod:5225
17069 #: ../fish/guestfish-actions.pod:5227
17077 #: ../fish/guestfish-actions.pod:5229 ../src/guestfs-actions.pod:8030
17079 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
17080 "> command. The \"full\" version includes all fields."
17084 #: ../fish/guestfish-actions.pod:5232
17089 #: ../fish/guestfish-actions.pod:5234
17097 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:8044
17099 "This rescans all block devices and rebuilds the list of LVM physical "
17100 "volumes, volume groups and logical volumes."
17104 #: ../fish/guestfish-actions.pod:5239
17109 #: ../fish/guestfish-actions.pod:5241
17117 #: ../fish/guestfish-actions.pod:5243 ../src/guestfs-actions.pod:8057
17118 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17122 #: ../fish/guestfish-actions.pod:5245
17127 #: ../fish/guestfish-actions.pod:5247
17135 #: ../fish/guestfish-actions.pod:5249 ../src/guestfs-actions.pod:8097
17137 "This command counts the characters in a file, using the C<wc -c> external "
17142 #: ../fish/guestfish-actions.pod:5252
17147 #: ../fish/guestfish-actions.pod:5254
17155 #: ../fish/guestfish-actions.pod:5256 ../src/guestfs-actions.pod:8110
17157 "This command counts the lines in a file, using the C<wc -l> external command."
17161 #: ../fish/guestfish-actions.pod:5259
17166 #: ../fish/guestfish-actions.pod:5261
17174 #: ../fish/guestfish-actions.pod:5263 ../src/guestfs-actions.pod:8123
17176 "This command counts the words in a file, using the C<wc -w> external command."
17180 #: ../fish/guestfish-actions.pod:5266
17185 #: ../fish/guestfish-actions.pod:5268
17188 " write path content\n"
17193 #: ../fish/guestfish-actions.pod:5270 ../src/guestfs-actions.pod:8138
17195 "This call creates a file called C<path>. The content of the file is the "
17196 "string C<content> (which can contain any 8 bit data)."
17200 #: ../fish/guestfish-actions.pod:5273
17201 msgid "See also L</write-append>."
17205 #: ../fish/guestfish-actions.pod:5278
17206 msgid "write-append"
17210 #: ../fish/guestfish-actions.pod:5280
17213 " write-append path content\n"
17218 #: ../fish/guestfish-actions.pod:5282 ../src/guestfs-actions.pod:8158
17220 "This call appends C<content> to the end of file C<path>. If C<path> does "
17221 "not exist, then a new file is created."
17225 #: ../fish/guestfish-actions.pod:5285
17226 msgid "See also L</write>."
17230 #: ../fish/guestfish-actions.pod:5290
17235 #: ../fish/guestfish-actions.pod:5292
17238 " write-file path content size\n"
17243 #: ../fish/guestfish-actions.pod:5294 ../src/guestfs-actions.pod:8185
17245 "This call creates a file called C<path>. The contents of the file is the "
17246 "string C<content> (which can contain any 8 bit data), with length C<size>."
17250 #: ../fish/guestfish-actions.pod:5298 ../src/guestfs-actions.pod:8189
17252 "As a special case, if C<size> is C<0> then the length is calculated using "
17253 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17257 #: ../fish/guestfish-actions.pod:5302 ../src/guestfs-actions.pod:8193
17259 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17260 "I<not> work, even if the length is specified."
17264 #: ../fish/guestfish-actions.pod:5308
17266 "I<This function is deprecated.> In new code, use the L</write> call instead."
17270 #: ../fish/guestfish-actions.pod:5315
17275 #: ../fish/guestfish-actions.pod:5317
17278 " zegrep regex path\n"
17283 #: ../fish/guestfish-actions.pod:5319 ../src/guestfs-actions.pod:8210
17285 "This calls the external C<zegrep> program and returns the matching lines."
17289 #: ../fish/guestfish-actions.pod:5325
17294 #: ../fish/guestfish-actions.pod:5327
17297 " zegrepi regex path\n"
17302 #: ../fish/guestfish-actions.pod:5329 ../src/guestfs-actions.pod:8229
17304 "This calls the external C<zegrep -i> program and returns the matching lines."
17308 #: ../fish/guestfish-actions.pod:5335
17313 #: ../fish/guestfish-actions.pod:5337
17321 #: ../fish/guestfish-actions.pod:5339 ../src/guestfs-actions.pod:8247
17322 msgid "This command writes zeroes over the first few blocks of C<device>."
17326 #: ../fish/guestfish-actions.pod:5341 ../src/guestfs-actions.pod:8249
17328 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17329 "securely wipe the device). It should be sufficient to remove any partition "
17330 "tables, filesystem superblocks and so on."
17334 #: ../fish/guestfish-actions.pod:5345 ../fish/guestfish-actions.pod:5360
17335 #: ../src/guestfs-actions.pod:8253 ../src/guestfs-actions.pod:8279
17337 "If blocks are already zero, then this command avoids writing zeroes. This "
17338 "prevents the underlying device from becoming non-sparse or growing "
17343 #: ../fish/guestfish-actions.pod:5349
17344 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17348 #: ../fish/guestfish-actions.pod:5352
17349 msgid "zero-device"
17353 #: ../fish/guestfish-actions.pod:5354
17356 " zero-device device\n"
17361 #: ../fish/guestfish-actions.pod:5356
17363 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17364 "which just zeroes the first few blocks of a device."
17368 #: ../fish/guestfish-actions.pod:5367
17373 #: ../fish/guestfish-actions.pod:5369
17376 " zerofree device\n"
17381 #: ../fish/guestfish-actions.pod:5371 ../src/guestfs-actions.pod:8301
17383 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17384 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17385 "possible to compress the filesystem more effectively."
17389 #: ../fish/guestfish-actions.pod:5376 ../src/guestfs-actions.pod:8306
17390 msgid "You should B<not> run this program if the filesystem is mounted."
17394 #: ../fish/guestfish-actions.pod:5379 ../src/guestfs-actions.pod:8309
17396 "It is possible that using this program can damage the filesystem or data on "
17401 #: ../fish/guestfish-actions.pod:5382
17406 #: ../fish/guestfish-actions.pod:5384
17409 " zfgrep pattern path\n"
17414 #: ../fish/guestfish-actions.pod:5386 ../src/guestfs-actions.pod:8323
17416 "This calls the external C<zfgrep> program and returns the matching lines."
17420 #: ../fish/guestfish-actions.pod:5392
17425 #: ../fish/guestfish-actions.pod:5394
17428 " zfgrepi pattern path\n"
17433 #: ../fish/guestfish-actions.pod:5396 ../src/guestfs-actions.pod:8342
17435 "This calls the external C<zfgrep -i> program and returns the matching lines."
17439 #: ../fish/guestfish-actions.pod:5402
17444 #: ../fish/guestfish-actions.pod:5404
17447 " zfile meth path\n"
17452 #: ../fish/guestfish-actions.pod:5406 ../src/guestfs-actions.pod:8368
17454 "This command runs C<file> after first decompressing C<path> using C<method>."
17458 #: ../fish/guestfish-actions.pod:5409 ../src/guestfs-actions.pod:8371
17459 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17463 #: ../fish/guestfish-actions.pod:5411
17465 "Since 1.0.63, use L</file> instead which can now process compressed files."
17469 #: ../fish/guestfish-actions.pod:5414
17471 "I<This function is deprecated.> In new code, use the L</file> call instead."
17475 #: ../fish/guestfish-actions.pod:5421
17480 #: ../fish/guestfish-actions.pod:5423
17483 " zgrep regex path\n"
17488 #: ../fish/guestfish-actions.pod:5425 ../src/guestfs-actions.pod:8388
17490 "This calls the external C<zgrep> program and returns the matching lines."
17494 #: ../fish/guestfish-actions.pod:5431
17499 #: ../fish/guestfish-actions.pod:5433
17502 " zgrepi regex path\n"
17507 #: ../fish/guestfish-actions.pod:5435 ../src/guestfs-actions.pod:8407
17509 "This calls the external C<zgrep -i> program and returns the matching lines."
17513 #: ../fish/guestfish-commands.pod:1
17518 #: ../fish/guestfish-commands.pod:3
17523 #: ../fish/guestfish-commands.pod:5
17526 " alloc filename size\n"
17531 #: ../fish/guestfish-commands.pod:7
17533 "This creates an empty (zeroed) file of the given size, and then adds so it "
17534 "can be further examined."
17538 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17539 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17543 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17544 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17548 #: ../fish/guestfish-commands.pod:14
17550 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17551 "image, see L</PREPARED DISK IMAGES>."
17555 #: ../fish/guestfish-commands.pod:17
17560 #: ../fish/guestfish-commands.pod:19
17563 " copy-in local [local ...] /remotedir\n"
17568 #: ../fish/guestfish-commands.pod:21
17570 "C<copy-in> copies local files or directories recursively into the disk "
17571 "image, placing them in the directory called C</remotedir> (which must "
17572 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
17573 "other commands as necessary."
17577 #: ../fish/guestfish-commands.pod:26
17579 "Multiple local files and directories can be specified, but the last "
17580 "parameter must always be a remote directory. Wildcards cannot be used."
17584 #: ../fish/guestfish-commands.pod:30
17589 #: ../fish/guestfish-commands.pod:32
17592 " copy-out remote [remote ...] localdir\n"
17597 #: ../fish/guestfish-commands.pod:34
17599 "C<copy-out> copies remote files or directories recursively out of the disk "
17600 "image, placing them on the host disk in a local directory called C<localdir> "
17601 "(which must exist). This guestfish meta-command turns into a sequence of L</"
17602 "download>, L</tar-out> and other commands as necessary."
17606 #: ../fish/guestfish-commands.pod:40
17608 "Multiple remote files and directories can be specified, but the last "
17609 "parameter must always be a local directory. To download to the current "
17610 "directory, use C<.> as in:"
17614 #: ../fish/guestfish-commands.pod:44
17617 " copy-out /home .\n"
17622 #: ../fish/guestfish-commands.pod:46
17624 "Wildcards cannot be used in the ordinary command, but you can use them with "
17625 "the help of L</glob> like this:"
17629 #: ../fish/guestfish-commands.pod:49
17632 " glob copy-out /home/* .\n"
17637 #: ../fish/guestfish-commands.pod:51
17642 #: ../fish/guestfish-commands.pod:53
17645 " display filename\n"
17650 #: ../fish/guestfish-commands.pod:55
17652 "Use C<display> (a graphical display program) to display an image file. It "
17653 "downloads the file, and runs C<display> on it."
17657 #: ../fish/guestfish-commands.pod:58
17659 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
17660 "environment variable. For example to use the GNOME display program:"
17664 #: ../fish/guestfish-commands.pod:61
17667 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
17672 #: ../fish/guestfish-commands.pod:63
17673 msgid "See also L<display(1)>."
17677 #: ../fish/guestfish-commands.pod:65
17682 #: ../fish/guestfish-commands.pod:67
17685 " echo [params ...]\n"
17690 #: ../fish/guestfish-commands.pod:69
17691 msgid "This echos the parameters to the terminal."
17695 #: ../fish/guestfish-commands.pod:71
17700 #: ../fish/guestfish-commands.pod:73
17705 #: ../fish/guestfish-commands.pod:75
17710 #: ../fish/guestfish-commands.pod:77
17718 #: ../fish/guestfish-commands.pod:79
17720 "This is used to edit a file. It downloads the file, edits it locally using "
17721 "your editor, then uploads the result."
17725 #: ../fish/guestfish-commands.pod:82
17727 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
17728 "or C<emacs> you will get those corresponding editors."
17732 #: ../fish/guestfish-commands.pod:86
17737 #: ../fish/guestfish-commands.pod:88
17740 " glob command args...\n"
17745 #: ../fish/guestfish-commands.pod:90
17747 "Expand wildcards in any paths in the args list, and run C<command> "
17748 "repeatedly on each matching path."
17752 #: ../fish/guestfish-commands.pod:93
17753 msgid "See L</WILDCARDS AND GLOBBING>."
17757 #: ../fish/guestfish-commands.pod:95
17762 #: ../fish/guestfish-commands.pod:97
17765 " hexedit <filename|device>\n"
17766 " hexedit <filename|device> <max>\n"
17767 " hexedit <filename|device> <start> <max>\n"
17772 #: ../fish/guestfish-commands.pod:101
17774 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
17779 #: ../fish/guestfish-commands.pod:104
17781 "This command works by downloading potentially the whole file or device, "
17782 "editing it locally, then uploading it. If the file or device is large, you "
17783 "have to specify which part you wish to edit by using C<max> and/or C<start> "
17784 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
17785 "usual modifiers allowed such as C<1M> (1 megabyte)."
17789 #: ../fish/guestfish-commands.pod:111
17790 msgid "For example to edit the first few sectors of a disk you might do:"
17794 #: ../fish/guestfish-commands.pod:114
17797 " hexedit /dev/sda 1M\n"
17802 #: ../fish/guestfish-commands.pod:116
17804 "which would allow you to edit anywhere within the first megabyte of the disk."
17808 #: ../fish/guestfish-commands.pod:119
17809 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
17813 #: ../fish/guestfish-commands.pod:121
17816 " hexedit /dev/sda1 0x400 0x400\n"
17821 #: ../fish/guestfish-commands.pod:123
17822 msgid "(assuming the superblock is in the standard location)."
17826 #: ../fish/guestfish-commands.pod:125
17828 "This command requires the external L<hexedit(1)> program. You can specify "
17829 "another program to use by setting the C<HEXEDITOR> environment variable."
17833 #: ../fish/guestfish-commands.pod:129
17834 msgid "See also L</hexdump>."
17838 #: ../fish/guestfish-commands.pod:131
17843 #: ../fish/guestfish-commands.pod:133
17851 #: ../fish/guestfish-commands.pod:135
17853 "Change the local directory, ie. the current directory of guestfish itself."
17857 #: ../fish/guestfish-commands.pod:138
17858 msgid "Note that C<!cd> won't do what you might expect."
17862 #: ../fish/guestfish-commands.pod:140
17867 #: ../fish/guestfish-commands.pod:142
17872 #: ../fish/guestfish-commands.pod:144
17880 #: ../fish/guestfish-commands.pod:146
17881 msgid "Opens the manual page for guestfish."
17885 #: ../fish/guestfish-commands.pod:148
17890 #: ../fish/guestfish-commands.pod:150
17895 #: ../fish/guestfish-commands.pod:152
17903 #: ../fish/guestfish-commands.pod:154
17911 #: ../fish/guestfish-commands.pod:156
17912 msgid "This is used to view a file."
17916 #: ../fish/guestfish-commands.pod:158
17918 "The default viewer is C<$PAGER>. However if you use the alternate command "
17919 "C<less> you will get the C<less> command specifically."
17923 #: ../fish/guestfish-commands.pod:161
17928 #: ../fish/guestfish-commands.pod:163
17936 #: ../fish/guestfish-commands.pod:165
17938 "Close and reopen the libguestfs handle. It is not necessary to use this "
17939 "normally, because the handle is closed properly when guestfish exits. "
17940 "However this is occasionally useful for testing."
17944 #: ../fish/guestfish-commands.pod:169
17949 #: ../fish/guestfish-commands.pod:171
17952 " setenv VAR value\n"
17957 #: ../fish/guestfish-commands.pod:173
17958 msgid "Set the environment variable C<VAR> to the string C<value>."
17962 #: ../fish/guestfish-commands.pod:175
17964 "To print the value of an environment variable use a shell command such as:"
17968 #: ../fish/guestfish-commands.pod:178
17976 #: ../fish/guestfish-commands.pod:180
17981 #: ../fish/guestfish-commands.pod:182
17984 " sparse filename size\n"
17989 #: ../fish/guestfish-commands.pod:184
17991 "This creates an empty sparse file of the given size, and then adds so it can "
17992 "be further examined."
17996 #: ../fish/guestfish-commands.pod:187
17998 "In all respects it works the same as the L</alloc> command, except that the "
17999 "image file is allocated sparsely, which means that disk blocks are not "
18000 "assigned to the file until they are needed. Sparse disk files only use "
18001 "space when written to, but they are slower and there is a danger you could "
18002 "run out of real disk space during a write operation."
18006 #: ../fish/guestfish-commands.pod:197
18011 #: ../fish/guestfish-commands.pod:199
18019 #: ../fish/guestfish-commands.pod:201
18021 "This command returns a list of the optional groups known to the daemon, and "
18022 "indicates which ones are supported by this build of the libguestfs appliance."
18026 #: ../fish/guestfish-commands.pod:205
18027 msgid "See also L<guestfs(3)/AVAILABILITY>."
18031 #: ../fish/guestfish-commands.pod:207
18036 #: ../fish/guestfish-commands.pod:209
18039 " time command args...\n"
18044 #: ../fish/guestfish-commands.pod:211
18046 "Run the command as usual, but print the elapsed time afterwards. This can "
18047 "be useful for benchmarking operations."
18051 #: ../fish/guestfish-commands.pod:214
18056 #: ../fish/guestfish-commands.pod:216
18064 #: ../fish/guestfish-commands.pod:218
18065 msgid "Remove C<VAR> from the environment."
18069 #: ../fish/guestfish.pod:5
18070 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18074 #: ../fish/guestfish.pod:9
18077 " guestfish [--options] [commands]\n"
18082 #: ../fish/guestfish.pod:11
18090 #: ../fish/guestfish.pod:13
18093 " guestfish [--ro|--rw] -a disk.img\n"
18098 #: ../fish/guestfish.pod:15
18101 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18106 #: ../fish/guestfish.pod:17
18109 " guestfish -d libvirt-domain\n"
18114 #: ../fish/guestfish.pod:19
18117 " guestfish [--ro|--rw] -a disk.img -i\n"
18122 #: ../fish/guestfish.pod:21
18125 " guestfish -d libvirt-domain -i\n"
18130 #: ../fish/guestfish.pod:25
18132 "Using guestfish in read/write mode on live virtual machines can be "
18133 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
18134 "option to use guestfish safely if the disk image or virtual machine might be "
18139 #: ../fish/guestfish.pod:32
18141 "Guestfish is a shell and command-line tool for examining and modifying "
18142 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18143 "functionality of the guestfs API, see L<guestfs(3)>."
18147 #: ../fish/guestfish.pod:36
18149 "Guestfish gives you structured access to the libguestfs API, from shell "
18150 "scripts or the command line or interactively. If you want to rescue a "
18151 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18156 #: ../fish/guestfish.pod:43
18157 msgid "As an interactive shell"
18161 #: ../fish/guestfish.pod:45
18169 #: ../fish/guestfish.pod:47
18172 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18173 " editing virtual machine filesystems.\n"
18178 #: ../fish/guestfish.pod:50
18181 " Type: 'help' for a list of commands\n"
18182 " 'man' to read the manual\n"
18183 " 'quit' to quit the shell\n"
18188 #: ../fish/guestfish.pod:54
18191 " ><fs> add-ro disk.img\n"
18193 " ><fs> list-filesystems\n"
18194 " /dev/sda1: ext4\n"
18195 " /dev/vg_guest/lv_root: ext4\n"
18196 " /dev/vg_guest/lv_swap: swap\n"
18197 " ><fs> mount /dev/vg_guest/lv_root /\n"
18198 " ><fs> cat /etc/fstab\n"
18200 " # Created by anaconda\n"
18207 #: ../fish/guestfish.pod:67
18208 msgid "From shell scripts"
18212 #: ../fish/guestfish.pod:69
18213 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18217 #: ../fish/guestfish.pod:71
18220 " guestfish <<_EOF_\n"
18223 " mount /dev/vg_guest/lv_root /\n"
18224 " write /etc/motd \"Welcome, new users\"\n"
18230 #: ../fish/guestfish.pod:78
18231 msgid "List the LVM logical volumes in a disk image:"
18235 #: ../fish/guestfish.pod:80
18238 " guestfish -a disk.img --ro <<_EOF_\n"
18246 #: ../fish/guestfish.pod:85
18247 msgid "List all the filesystems in a disk image:"
18251 #: ../fish/guestfish.pod:87
18254 " guestfish -a disk.img --ro <<_EOF_\n"
18256 " list-filesystems\n"
18262 #: ../fish/guestfish.pod:92
18263 msgid "On one command line"
18267 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18268 msgid "Update C</etc/resolv.conf> in a guest:"
18272 #: ../fish/guestfish.pod:96
18276 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18277 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18282 #: ../fish/guestfish.pod:100
18283 msgid "Edit C</boot/grub/grub.conf> interactively:"
18287 #: ../fish/guestfish.pod:102
18290 " guestfish --rw --add disk.img \\\n"
18291 " --mount /dev/vg_guest/lv_root \\\n"
18292 " --mount /dev/sda1:/boot \\\n"
18293 " edit /boot/grub/grub.conf\n"
18298 #: ../fish/guestfish.pod:107
18299 msgid "Mount disks automatically"
18303 #: ../fish/guestfish.pod:109
18305 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
18309 #: ../fish/guestfish.pod:112
18312 " guestfish --ro -a disk.img -i cat /etc/group\n"
18317 #: ../fish/guestfish.pod:114
18320 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18325 #: ../fish/guestfish.pod:116
18326 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18330 #: ../fish/guestfish.pod:118
18333 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18338 #: ../fish/guestfish.pod:120
18339 msgid "As a script interpreter"
18343 #: ../fish/guestfish.pod:122
18344 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18348 #: ../fish/guestfish.pod:124
18351 " #!/usr/bin/guestfish -f\n"
18352 " sparse test1.img 100M\n"
18354 " part-disk /dev/sda mbr\n"
18355 " mkfs ext2 /dev/sda1\n"
18360 #: ../fish/guestfish.pod:130
18361 msgid "Start with a prepared disk"
18365 #: ../fish/guestfish.pod:132
18367 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18368 "single ext2-formatted partition:"
18372 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18375 " guestfish -N fs\n"
18380 #: ../fish/guestfish.pod:137
18381 msgid "To list what is available do:"
18385 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18388 " guestfish -N help | less\n"
18393 #: ../fish/guestfish.pod:141
18394 msgid "Remote control"
18398 #: ../fish/guestfish.pod:143
18401 " eval \"`guestfish --listen`\"\n"
18402 " guestfish --remote add-ro disk.img\n"
18403 " guestfish --remote run\n"
18404 " guestfish --remote lvs\n"
18409 #: ../fish/guestfish.pod:154
18410 msgid "Displays general help on options."
18414 #: ../fish/guestfish.pod:158
18415 msgid "B<--cmd-help>"
18419 #: ../fish/guestfish.pod:160
18420 msgid "Lists all available guestfish commands."
18424 #: ../fish/guestfish.pod:162
18429 #: ../fish/guestfish.pod:164
18430 msgid "B<--cmd-help cmd>"
18434 #: ../fish/guestfish.pod:166
18435 msgid "Displays detailed help on a single command C<cmd>."
18439 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18440 msgid "B<-a image>"
18444 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18445 msgid "B<--add image>"
18449 #: ../fish/guestfish.pod:172
18450 msgid "Add a block device or virtual machine image to the shell."
18454 #: ../fish/guestfish.pod:177
18456 "Using this flag is mostly equivalent to using the C<add> command, with "
18457 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18458 "the I<--format=...> flag was given."
18462 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18464 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18465 "URI to use. The default is to use the default libvirt connection."
18469 #: ../fish/guestfish.pod:189
18474 #: ../fish/guestfish.pod:191
18476 "If using the I<--listen> option and a csh-like shell, use this option. See "
18477 "section L</REMOTE CONTROL AND CSH> below."
18481 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18482 msgid "B<-d libvirt-domain>"
18486 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18487 msgid "B<--domain libvirt-domain>"
18491 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18493 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18494 "used, then any libvirt domain can be used. However in write mode, only "
18495 "libvirt domains which are shut down can be named here."
18499 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18500 msgid "Domain UUIDs can be used instead of names."
18504 #: ../fish/guestfish.pod:204
18506 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18507 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18508 "if the I<--format:...> flag was given."
18512 #: ../fish/guestfish.pod:208
18517 #: ../fish/guestfish.pod:210
18518 msgid "B<--no-dest-paths>"
18522 #: ../fish/guestfish.pod:212
18524 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18525 "to hit the tab key to complete paths on the guest filesystem, but this "
18526 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18527 "allow this feature to be disabled."
18531 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18533 "When prompting for keys and passphrases, guestfish normally turns echoing "
18534 "off so you cannot see what you are typing. If you are not worried about "
18535 "Tempest attacks and there is no one else in the room you can specify this "
18536 "flag to see what you are typing."
18540 #: ../fish/guestfish.pod:224
18545 #: ../fish/guestfish.pod:226
18546 msgid "B<--file file>"
18550 #: ../fish/guestfish.pod:228
18551 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18555 #: ../fish/guestfish.pod:231
18558 " #!/usr/bin/guestfish -f\n"
18563 #: ../fish/guestfish.pod:244
18566 " guestfish --format=raw -a disk.img\n"
18571 #: ../fish/guestfish.pod:248
18574 " guestfish --format=raw -a disk.img --format -a another.img\n"
18579 #: ../fish/guestfish.pod:253
18581 "If you have untrusted raw-format guest disk images, you should use this "
18582 "option to specify the disk format. This avoids a possible security problem "
18583 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18587 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18588 msgid "B<--inspector>"
18592 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18594 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18595 "system and mount filesystems as they would be mounted on the real virtual "
18600 #: ../fish/guestfish.pod:266
18601 msgid "Typical usage is either:"
18605 #: ../fish/guestfish.pod:268
18608 " guestfish -d myguest -i\n"
18613 #: ../fish/guestfish.pod:270
18614 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18618 #: ../fish/guestfish.pod:272
18621 " guestfish --ro -d myguest -i\n"
18626 #: ../fish/guestfish.pod:274
18627 msgid "(for active domains, readonly), or specify the block device directly:"
18631 #: ../fish/guestfish.pod:276
18634 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18639 #: ../fish/guestfish.pod:278
18641 "Note that the command line syntax changed slightly over older versions of "
18642 "guestfish. You can still use the old syntax:"
18646 #: ../fish/guestfish.pod:281
18649 " guestfish [--ro] -i disk.img\n"
18654 #: ../fish/guestfish.pod:283
18657 " guestfish [--ro] -i libvirt-domain\n"
18662 #: ../fish/guestfish.pod:285
18664 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18665 "then using other commands to mount the filesystems that were found."
18669 #: ../fish/guestfish.pod:294
18670 msgid "B<--listen>"
18674 #: ../fish/guestfish.pod:296
18676 "Fork into the background and listen for remote commands. See section L</"
18677 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18681 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
18686 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
18688 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
18689 "ATTACHING TO RUNNING DAEMONS>)."
18693 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
18694 msgid "B<-m dev[:mountpoint[:options]]>"
18698 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
18699 msgid "B<--mount dev[:mountpoint[:options]]>"
18703 #: ../fish/guestfish.pod:308
18704 msgid "Mount the named partition or logical volume on the given mountpoint."
18708 #: ../fish/guestfish.pod:310
18709 msgid "If the mountpoint is omitted, it defaults to C</>."
18713 #: ../fish/guestfish.pod:312
18714 msgid "You have to mount something on C</> before most commands will work."
18718 #: ../fish/guestfish.pod:314
18720 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18725 #: ../fish/guestfish.pod:317
18727 "If you don't know what filesystems a disk image contains, you can either run "
18728 "guestfish without this option, then list the partitions, filesystems and LVs "
18729 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18730 "commands), or you can use the L<virt-filesystems(1)> program."
18734 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
18736 "The third (and rarely used) part of the mount parameter is the list of mount "
18737 "options used to mount the underlying filesystem. If this is not given, then "
18738 "the mount options are either the empty string or C<ro> (the latter if the "
18739 "I<--ro> flag is used). By specifying the mount options, you override this "
18740 "default choice. Probably the only time you would use this is to enable ACLs "
18741 "and/or extended attributes if the filesystem can support them:"
18745 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
18748 " -m /dev/sda1:/:acl,user_xattr\n"
18753 #: ../fish/guestfish.pod:333
18754 msgid "Using this flag is equivalent to using the C<mount-options> command."
18758 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202
18759 #: ../resize/virt-resize.pod:435
18764 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
18765 msgid "B<--no-sync>"
18769 #: ../fish/guestfish.pod:339
18771 "Disable autosync. This is enabled by default. See the discussion of "
18772 "autosync in the L<guestfs(3)> manpage."
18776 #: ../fish/guestfish.pod:342
18781 #: ../fish/guestfish.pod:344
18782 msgid "B<--new type>"
18786 #: ../fish/guestfish.pod:346
18791 #: ../fish/guestfish.pod:348
18793 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
18794 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18795 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18800 #: ../fish/guestfish.pod:353
18801 msgid "B<--progress-bars>"
18805 #: ../fish/guestfish.pod:355
18806 msgid "Enable progress bars, even when guestfish is used non-interactively."
18810 #: ../fish/guestfish.pod:357
18812 "Progress bars are enabled by default when guestfish is used as an "
18813 "interactive shell."
18817 #: ../fish/guestfish.pod:360
18818 msgid "B<--no-progress-bars>"
18822 #: ../fish/guestfish.pod:362
18823 msgid "Disable progress bars."
18827 #: ../fish/guestfish.pod:364
18828 msgid "B<--remote[=pid]>"
18832 #: ../fish/guestfish.pod:366
18834 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18835 "CONTROL GUESTFISH OVER A SOCKET> below."
18839 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248
18840 #: ../rescue/virt-rescue.pod:161
18845 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250
18846 #: ../rescue/virt-rescue.pod:163
18851 #: ../fish/guestfish.pod:373
18853 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18854 "mounts are done read-only."
18858 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
18860 "The option must always be used if the disk image or virtual machine might be "
18861 "running, and is generally recommended in cases where you don't need write "
18862 "access to the disk."
18866 #: ../fish/guestfish.pod:380
18868 "Note that prepared disk images created with I<-N> are not affected by this "
18869 "option. Also commands like C<add> are not affected - you have to specify "
18870 "the C<readonly:true> option explicitly if you need it."
18874 #: ../fish/guestfish.pod:384
18875 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18879 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262
18880 #: ../rescue/virt-rescue.pod:173
18881 msgid "B<--selinux>"
18885 #: ../fish/guestfish.pod:388
18886 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18890 #: ../fish/guestfish.pod:394
18892 "Enable very verbose messages. This is particularly useful if you find a bug."
18896 #: ../fish/guestfish.pod:401
18897 msgid "Display the guestfish / libguestfs version number and exit."
18901 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278
18902 #: ../rescue/virt-rescue.pod:194
18907 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280
18908 #: ../rescue/virt-rescue.pod:196
18913 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
18915 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18916 "mounts are done read-write."
18920 #: ../fish/guestfish.pod:410
18921 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
18925 #: ../fish/guestfish.pod:414
18926 msgid "Echo each command before executing it."
18930 #: ../fish/guestfish.pod:418
18931 msgid "COMMANDS ON COMMAND LINE"
18935 #: ../fish/guestfish.pod:420
18937 "Any additional (non-option) arguments are treated as commands to execute."
18941 #: ../fish/guestfish.pod:423
18943 "Commands to execute should be separated by a colon (C<:>), where the colon "
18944 "is a separate parameter. Thus:"
18948 #: ../fish/guestfish.pod:426
18951 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
18956 #: ../fish/guestfish.pod:428
18958 "If there are no additional arguments, then we enter a shell, either an "
18959 "interactive shell with a prompt (if the input is a terminal) or a non-"
18960 "interactive shell."
18964 #: ../fish/guestfish.pod:432
18966 "In either command line mode or non-interactive shell, the first command that "
18967 "gives an error causes the whole shell to exit. In interactive mode (with a "
18968 "prompt) if a command fails, you can continue to enter commands."
18972 #: ../fish/guestfish.pod:437
18973 msgid "USING launch (OR run)"
18977 #: ../fish/guestfish.pod:439
18979 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
18980 "then launch it, then mount any disks you need, and finally issue actions/"
18981 "commands. So the general order of the day is:"
18985 #: ../fish/guestfish.pod:447
18986 msgid "add or -a/--add"
18990 #: ../fish/guestfish.pod:451
18991 msgid "launch (aka run)"
18995 #: ../fish/guestfish.pod:455
18996 msgid "mount or -m/--mount"
19000 #: ../fish/guestfish.pod:459
19001 msgid "any other commands"
19005 #: ../fish/guestfish.pod:463
19007 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19008 "guest before mounting or performing any other commands."
19012 #: ../fish/guestfish.pod:466
19014 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19015 "I<--new> options were given then C<run> is done automatically, simply "
19016 "because guestfish can't perform the action you asked for without doing this."
19020 #: ../fish/guestfish.pod:471
19021 msgid "OPENING DISKS FOR READ AND WRITE"
19025 #: ../fish/guestfish.pod:473
19027 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19028 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19029 "I<-i> and I<-m> open disk images read-only or for writing."
19033 #: ../fish/guestfish.pod:478
19035 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
19036 "opening disk images supplied on the command line for write. To open a disk "
19037 "image read-only you have to do I<-a image --ro>."
19041 #: ../fish/guestfish.pod:482
19043 "This matters: If you accidentally open a live VM disk image writable then "
19044 "you will cause irreversible disk corruption."
19048 #: ../fish/guestfish.pod:485
19050 "In a future libguestfs we intend to change the default the other way. Disk "
19051 "images will be opened read-only. You will have to either specify "
19052 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19053 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19054 "access for disk images specified by those other command line options."
19058 #: ../fish/guestfish.pod:492
19060 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19061 "which does nothing (it is already the default). However it is highly "
19062 "recommended that you use this option to indicate that you need write access, "
19063 "and prepare your scripts for the day when this option will be required for "
19068 #: ../fish/guestfish.pod:498
19070 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
19071 "other libguestfs program apart from guestfish and guestmount."
19075 #: ../fish/guestfish.pod:501
19080 #: ../fish/guestfish.pod:503
19082 "You can quote ordinary parameters using either single or double quotes. For "
19087 #: ../fish/guestfish.pod:506
19090 " add \"file with a space.img\"\n"
19095 #: ../fish/guestfish.pod:508
19098 " rm '/file name'\n"
19103 #: ../fish/guestfish.pod:510
19111 #: ../fish/guestfish.pod:512
19113 "A few commands require a list of strings to be passed. For these, use a "
19114 "whitespace-separated list, enclosed in quotes. Strings containing "
19115 "whitespace to be passed through must be enclosed in single quotes. A "
19116 "literal single quote must be escaped with a backslash."
19120 #: ../fish/guestfish.pod:517
19123 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19124 " command \"/bin/echo 'foo bar'\"\n"
19125 " command \"/bin/echo \\'foo\\'\"\n"
19130 #: ../fish/guestfish.pod:521
19131 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19135 #: ../fish/guestfish.pod:523
19137 "In double-quoted arguments (only) use backslash to insert special characters:"
19141 #: ../fish/guestfish.pod:528
19146 #: ../fish/guestfish.pod:530
19147 msgid "Alert (bell) character."
19151 #: ../fish/guestfish.pod:532
19156 #: ../fish/guestfish.pod:534
19157 msgid "Backspace character."
19161 #: ../fish/guestfish.pod:536
19166 #: ../fish/guestfish.pod:538
19167 msgid "Form feed character."
19171 #: ../fish/guestfish.pod:540
19176 #: ../fish/guestfish.pod:542
19177 msgid "Newline character."
19181 #: ../fish/guestfish.pod:544
19186 #: ../fish/guestfish.pod:546
19187 msgid "Carriage return character."
19191 #: ../fish/guestfish.pod:548
19196 #: ../fish/guestfish.pod:550
19197 msgid "Horizontal tab character."
19201 #: ../fish/guestfish.pod:552
19206 #: ../fish/guestfish.pod:554
19207 msgid "Vertical tab character."
19211 #: ../fish/guestfish.pod:556
19216 #: ../fish/guestfish.pod:558
19217 msgid "A literal double quote character."
19221 #: ../fish/guestfish.pod:560
19226 #: ../fish/guestfish.pod:562
19228 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
19233 #: ../fish/guestfish.pod:565
19238 #: ../fish/guestfish.pod:567
19240 "A character with hex value I<hh>. There must be precisely 2 hex digits."
19244 #: ../fish/guestfish.pod:570
19246 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19251 #: ../fish/guestfish.pod:573
19256 #: ../fish/guestfish.pod:575
19257 msgid "A literal backslash character."
19261 #: ../fish/guestfish.pod:579
19262 msgid "OPTIONAL ARGUMENTS"
19266 #: ../fish/guestfish.pod:581
19268 "Some commands take optional arguments. These arguments appear in this "
19269 "documentation as C<[argname:..]>. You can use them as in these examples:"
19273 #: ../fish/guestfish.pod:585
19276 " add-drive-opts filename\n"
19281 #: ../fish/guestfish.pod:587
19284 " add-drive-opts filename readonly:true\n"
19289 #: ../fish/guestfish.pod:589
19292 " add-drive-opts filename format:qcow2 readonly:false\n"
19297 #: ../fish/guestfish.pod:591
19299 "Each optional argument can appear at most once. All optional arguments must "
19300 "appear after the required ones."
19304 #: ../fish/guestfish.pod:594
19309 #: ../fish/guestfish.pod:596
19311 "This section applies to all commands which can take integers as parameters."
19315 #: ../fish/guestfish.pod:599
19316 msgid "SIZE SUFFIX"
19320 #: ../fish/guestfish.pod:601
19322 "When the command takes a parameter measured in bytes, you can use one of the "
19323 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19327 #: ../fish/guestfish.pod:607
19328 msgid "B<k> or B<K> or B<KiB>"
19332 #: ../fish/guestfish.pod:609
19333 msgid "The size in kilobytes (multiplied by 1024)."
19337 #: ../fish/guestfish.pod:611
19342 #: ../fish/guestfish.pod:613
19343 msgid "The size in SI 1000 byte units."
19347 #: ../fish/guestfish.pod:615
19348 msgid "B<M> or B<MiB>"
19352 #: ../fish/guestfish.pod:617
19353 msgid "The size in megabytes (multiplied by 1048576)."
19357 #: ../fish/guestfish.pod:619
19362 #: ../fish/guestfish.pod:621
19363 msgid "The size in SI 1000000 byte units."
19367 #: ../fish/guestfish.pod:623
19368 msgid "B<G> or B<GiB>"
19372 #: ../fish/guestfish.pod:625
19373 msgid "The size in gigabytes (multiplied by 2**30)."
19377 #: ../fish/guestfish.pod:627
19382 #: ../fish/guestfish.pod:629
19383 msgid "The size in SI 10**9 byte units."
19387 #: ../fish/guestfish.pod:631
19388 msgid "B<T> or B<TiB>"
19392 #: ../fish/guestfish.pod:633
19393 msgid "The size in terabytes (multiplied by 2**40)."
19397 #: ../fish/guestfish.pod:635
19402 #: ../fish/guestfish.pod:637
19403 msgid "The size in SI 10**12 byte units."
19407 #: ../fish/guestfish.pod:639
19408 msgid "B<P> or B<PiB>"
19412 #: ../fish/guestfish.pod:641
19413 msgid "The size in petabytes (multiplied by 2**50)."
19417 #: ../fish/guestfish.pod:643
19422 #: ../fish/guestfish.pod:645
19423 msgid "The size in SI 10**15 byte units."
19427 #: ../fish/guestfish.pod:647
19428 msgid "B<E> or B<EiB>"
19432 #: ../fish/guestfish.pod:649
19433 msgid "The size in exabytes (multiplied by 2**60)."
19437 #: ../fish/guestfish.pod:651
19442 #: ../fish/guestfish.pod:653
19443 msgid "The size in SI 10**18 byte units."
19447 #: ../fish/guestfish.pod:655
19448 msgid "B<Z> or B<ZiB>"
19452 #: ../fish/guestfish.pod:657
19453 msgid "The size in zettabytes (multiplied by 2**70)."
19457 #: ../fish/guestfish.pod:659
19462 #: ../fish/guestfish.pod:661
19463 msgid "The size in SI 10**21 byte units."
19467 #: ../fish/guestfish.pod:663
19468 msgid "B<Y> or B<YiB>"
19472 #: ../fish/guestfish.pod:665
19473 msgid "The size in yottabytes (multiplied by 2**80)."
19477 #: ../fish/guestfish.pod:667
19482 #: ../fish/guestfish.pod:669
19483 msgid "The size in SI 10**24 byte units."
19487 #: ../fish/guestfish.pod:675
19490 " truncate-size /file 1G\n"
19495 #: ../fish/guestfish.pod:677
19496 msgid "would truncate the file to 1 gigabyte."
19500 #: ../fish/guestfish.pod:679
19502 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
19503 "the parameter to L</memsize> is specified in megabytes already). Adding a "
19504 "suffix will probably not do what you expect."
19508 #: ../fish/guestfish.pod:683
19509 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19513 #: ../fish/guestfish.pod:685
19515 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19516 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19520 #: ../fish/guestfish.pod:688
19523 " 1234 decimal number 1234\n"
19524 " 02322 octal number, equivalent to decimal 1234\n"
19525 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19530 #: ../fish/guestfish.pod:692
19532 "When using the C<chmod> command, you almost always want to specify an octal "
19533 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19534 "L<chmod(1)> program):"
19538 #: ../fish/guestfish.pod:696
19541 " chmod 0777 /public # OK\n"
19542 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19547 #: ../fish/guestfish.pod:699
19549 "Commands that return numbers usually print them in decimal, but some "
19550 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19551 "octal, preceeded by C<0>)."
19555 #: ../fish/guestfish.pod:703
19556 msgid "WILDCARDS AND GLOBBING"
19560 #: ../fish/guestfish.pod:705
19562 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19563 "(globbing) by default. So for example the following will not do what you "
19568 #: ../fish/guestfish.pod:709
19576 #: ../fish/guestfish.pod:711
19578 "Assuming you don't have a directory called literally C</home/*> then the "
19579 "above command will return an error."
19583 #: ../fish/guestfish.pod:714
19584 msgid "To perform wildcard expansion, use the C<glob> command."
19588 #: ../fish/guestfish.pod:716
19591 " glob rm-rf /home/*\n"
19596 #: ../fish/guestfish.pod:718
19598 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19599 "many times), equivalent to:"
19603 #: ../fish/guestfish.pod:721
19606 " rm-rf /home/jim\n"
19607 " rm-rf /home/joe\n"
19608 " rm-rf /home/mary\n"
19613 #: ../fish/guestfish.pod:725
19614 msgid "C<glob> only works on simple guest paths and not on device names."
19618 #: ../fish/guestfish.pod:727
19620 "If you have several parameters, each containing a wildcard, then glob will "
19621 "perform a Cartesian product."
19625 #: ../fish/guestfish.pod:730
19630 #: ../fish/guestfish.pod:732
19632 "Any line which starts with a I<#> character is treated as a comment and "
19633 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19634 "a command. For example:"
19638 #: ../fish/guestfish.pod:736
19641 " # this is a comment\n"
19642 " # this is a comment\n"
19643 " foo # NOT a comment\n"
19648 #: ../fish/guestfish.pod:740
19649 msgid "Blank lines are also ignored."
19653 #: ../fish/guestfish.pod:742
19654 msgid "RUNNING COMMANDS LOCALLY"
19658 #: ../fish/guestfish.pod:744
19660 "Any line which starts with a I<!> character is treated as a command sent to "
19661 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19665 #: ../fish/guestfish.pod:748
19669 " tgz-out /remote local/remote-data.tar.gz\n"
19674 #: ../fish/guestfish.pod:751
19676 "will create a directory C<local> on the host, and then export the contents "
19677 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19678 "(See C<tgz-out>)."
19682 #: ../fish/guestfish.pod:755
19684 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19685 "effect, due to the way that subprocesses work in Unix."
19689 #: ../fish/guestfish.pod:758
19690 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19694 #: ../fish/guestfish.pod:760
19696 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19697 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19698 "and executed as guestfish commands."
19702 #: ../fish/guestfish.pod:764
19704 "Thus you can use shell script to construct arbitrary guestfish commands "
19705 "which are then parsed by guestfish."
19709 #: ../fish/guestfish.pod:767
19711 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19712 "through C</foo.100>) using guestfish commands alone. However this is simple "
19713 "if we use a shell script to create the guestfish commands for us:"
19717 #: ../fish/guestfish.pod:772
19720 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19725 #: ../fish/guestfish.pod:774
19726 msgid "or with names like C</foo.001>:"
19730 #: ../fish/guestfish.pod:776
19733 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19738 #: ../fish/guestfish.pod:778
19740 "When using guestfish interactively it can be helpful to just run the shell "
19741 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19742 "ordinary I<!> local command), see what guestfish commands it would run, and "
19743 "when you are happy with those prepend the C<E<lt>> character to run the "
19744 "guestfish commands for real."
19748 #: ../fish/guestfish.pod:784
19753 #: ../fish/guestfish.pod:786
19755 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19756 "command (a guestfish command) to the second command (any host command). For "
19761 #: ../fish/guestfish.pod:790
19764 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19769 #: ../fish/guestfish.pod:792
19771 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19772 "program). The above command would list all accounts in the guest filesystem "
19773 "which have UID 0, ie. root accounts including backdoors. Other examples:"
19777 #: ../fish/guestfish.pod:797
19780 " hexdump /bin/ls | head\n"
19781 " list-devices | tail -1\n"
19782 " tgz-out / - | tar ztf -\n"
19787 #: ../fish/guestfish.pod:801
19789 "The space before the pipe symbol is required, any space after the pipe "
19790 "symbol is optional. Everything after the pipe symbol is just passed "
19791 "straight to the host shell, so it can contain redirections, globs and "
19792 "anything else that makes sense on the host side."
19796 #: ../fish/guestfish.pod:806
19798 "To use a literal argument which begins with a pipe symbol, you have to quote "
19803 #: ../fish/guestfish.pod:809
19811 #: ../fish/guestfish.pod:811
19812 msgid "HOME DIRECTORIES"
19816 #: ../fish/guestfish.pod:813
19818 "If a parameter starts with the character C<~> then the tilde may be expanded "
19819 "as a home directory path (either C<~> for the current user's home directory, "
19820 "or C<~user> for another user)."
19824 #: ../fish/guestfish.pod:817
19826 "Note that home directory expansion happens for users known I<on the host>, "
19827 "not in the guest filesystem."
19831 #: ../fish/guestfish.pod:820
19833 "To use a literal argument which begins with a tilde, you have to quote it, "
19838 #: ../fish/guestfish.pod:823
19846 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
19847 msgid "ENCRYPTED DISKS"
19851 #: ../fish/guestfish.pod:827
19853 "Libguestfs has some support for Linux guests encrypted according to the "
19854 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19855 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
19856 "LUKS is supported."
19860 #: ../fish/guestfish.pod:832
19861 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19865 #: ../fish/guestfish.pod:834
19868 " ><fs> vfs-type /dev/sda2\n"
19874 #: ../fish/guestfish.pod:837
19876 "Then open those devices using L</luks-open>. This creates a device-mapper "
19877 "device called C</dev/mapper/luksdev>."
19881 #: ../fish/guestfish.pod:840
19884 " ><fs> luks-open /dev/sda2 luksdev\n"
19885 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19890 #: ../fish/guestfish.pod:843
19892 "Finally you have to tell LVM to scan for volume groups on the newly created "
19897 #: ../fish/guestfish.pod:846
19901 " vg-activate-all true\n"
19906 #: ../fish/guestfish.pod:849
19907 msgid "The logical volume(s) can now be mounted in the usual way."
19911 #: ../fish/guestfish.pod:851
19913 "Before closing a LUKS device you must unmount any logical volumes on it and "
19914 "deactivate the volume groups by calling C<vg-activate false VG> on each "
19915 "one. Then you can close the mapper device:"
19919 #: ../fish/guestfish.pod:855
19922 " vg-activate false /dev/VG\n"
19923 " luks-close /dev/mapper/luksdev\n"
19928 #: ../fish/guestfish.pod:860
19930 "If a path is prefixed with C<win:> then you can use Windows-style drive "
19931 "letters and paths (with some limitations). The following commands are "
19936 #: ../fish/guestfish.pod:864
19939 " file /WINDOWS/system32/config/system.LOG\n"
19944 #: ../fish/guestfish.pod:866
19947 " file win:\\windows\\system32\\config\\system.log\n"
19952 #: ../fish/guestfish.pod:868
19955 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
19960 #: ../fish/guestfish.pod:870
19962 "The parameter is rewritten \"behind the scenes\" by looking up the position "
19963 "where the drive is mounted, prepending that to the path, changing all "
19964 "backslash characters to forward slash, then resolving the result using L</"
19965 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
19966 "the parameter might be rewritten like this:"
19970 #: ../fish/guestfish.pod:876
19973 " win:e:\\foo\\bar => /e/FOO/bar\n"
19978 #: ../fish/guestfish.pod:878
19979 msgid "This only works in argument positions that expect a path."
19983 #: ../fish/guestfish.pod:880
19984 msgid "UPLOADING AND DOWNLOADING FILES"
19988 #: ../fish/guestfish.pod:882
19990 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
19991 "others which upload from or download to a local file, you can use the "
19992 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
19996 #: ../fish/guestfish.pod:886
20004 #: ../fish/guestfish.pod:888
20006 "reads stdin and creates from that a file C</foo> in the disk image, and:"
20010 #: ../fish/guestfish.pod:891
20013 " tar-out /etc - | tar tf -\n"
20018 #: ../fish/guestfish.pod:893
20020 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20021 "command (see L</PIPES>)."
20025 #: ../fish/guestfish.pod:896
20027 "When using C<-> to read from stdin, the input is read up to the end of "
20028 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20029 "some arbitrary end marker:"
20033 #: ../fish/guestfish.pod:900
20036 " upload -<<END /foo\n"
20045 #: ../fish/guestfish.pod:906
20047 "Any string of characters can be used instead of C<END>. The end marker must "
20048 "appear on a line of its own, without any preceeding or following characters "
20049 "(not even spaces)."
20053 #: ../fish/guestfish.pod:910
20055 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20056 "upload local files (so-called \"FileIn\" parameters in the generator)."
20060 #: ../fish/guestfish.pod:913
20061 msgid "EXIT ON ERROR BEHAVIOUR"
20065 #: ../fish/guestfish.pod:915
20067 "By default, guestfish will ignore any errors when in interactive mode (ie. "
20068 "taking commands from a human over a tty), and will exit on the first error "
20069 "in non-interactive mode (scripts, commands given on the command line)."
20073 #: ../fish/guestfish.pod:920
20075 "If you prefix a command with a I<-> character, then that command will not "
20076 "cause guestfish to exit, even if that (one) command returns an error."
20080 #: ../fish/guestfish.pod:924
20081 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20085 #: ../fish/guestfish.pod:926
20087 "Guestfish can be remote-controlled over a socket. This is useful "
20088 "particularly in shell scripts where you want to make several different "
20089 "changes to a filesystem, but you don't want the overhead of starting up a "
20090 "guestfish process each time."
20094 #: ../fish/guestfish.pod:931
20095 msgid "Start a guestfish server process using:"
20099 #: ../fish/guestfish.pod:933
20102 " eval \"`guestfish --listen`\"\n"
20107 #: ../fish/guestfish.pod:935
20108 msgid "and then send it commands by doing:"
20112 #: ../fish/guestfish.pod:937
20115 " guestfish --remote cmd [...]\n"
20120 #: ../fish/guestfish.pod:939
20121 msgid "To cause the server to exit, send it the exit command:"
20125 #: ../fish/guestfish.pod:943
20127 "Note that the server will normally exit if there is an error in a command. "
20128 "You can change this in the usual way. See section L</EXIT ON ERROR "
20133 #: ../fish/guestfish.pod:947
20134 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20138 #: ../fish/guestfish.pod:949
20140 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
20141 "is how the I<--remote> option knows where to send the commands. You can "
20142 "have several guestfish listener processes running using:"
20146 #: ../fish/guestfish.pod:953
20149 " eval \"`guestfish --listen`\"\n"
20150 " pid1=$GUESTFISH_PID\n"
20151 " eval \"`guestfish --listen`\"\n"
20152 " pid2=$GUESTFISH_PID\n"
20154 " guestfish --remote=$pid1 cmd\n"
20155 " guestfish --remote=$pid2 cmd\n"
20160 #: ../fish/guestfish.pod:961
20161 msgid "REMOTE CONTROL AND CSH"
20165 #: ../fish/guestfish.pod:963
20167 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20172 #: ../fish/guestfish.pod:966
20175 " eval \"`guestfish --listen --csh`\"\n"
20180 #: ../fish/guestfish.pod:968
20181 msgid "REMOTE CONTROL DETAILS"
20185 #: ../fish/guestfish.pod:970
20187 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
20188 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
20189 "and C<$PID> is the process ID of the server."
20193 #: ../fish/guestfish.pod:974
20194 msgid "Guestfish client and server versions must match exactly."
20198 #: ../fish/guestfish.pod:976
20199 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20203 #: ../fish/guestfish.pod:978
20205 "From Bash, you can use the following code which creates a guestfish "
20206 "instance, correctly quotes the command line, handles failure to start, and "
20207 "cleans up guestfish when the script exits:"
20211 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20219 #: ../fish/guestfish.pod:986
20222 " guestfish[0]=\"guestfish\"\n"
20223 " guestfish[1]=\"--listen\"\n"
20224 " guestfish[2]=\"--ro\"\n"
20225 " guestfish[3]=\"-a\"\n"
20226 " guestfish[4]=\"disk.img\"\n"
20231 #: ../fish/guestfish.pod:992
20234 " GUESTFISH_PID=\n"
20235 " eval $(\"${guestfish[@]}\")\n"
20236 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20237 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20244 #: ../fish/guestfish.pod:999
20247 " cleanup_guestfish ()\n"
20249 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20251 " trap cleanup_guestfish EXIT ERR\n"
20256 #: ../fish/guestfish.pod:1005
20259 " guestfish --remote -- run\n"
20264 #: ../fish/guestfish.pod:1007
20272 #: ../fish/guestfish.pod:1009
20273 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20277 #: ../fish/guestfish.pod:1011
20279 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20280 "context hangs, ie. don't do (note the backquotes):"
20284 #: ../fish/guestfish.pod:1014
20287 " a=`guestfish --remote run`\n"
20292 #: ../fish/guestfish.pod:1016
20294 "Since the C<run> command produces no output on stdout, this is not useful "
20295 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
20300 #: ../fish/guestfish.pod:1020
20301 msgid "PREPARED DISK IMAGES"
20305 #: ../fish/guestfish.pod:1022
20307 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20308 "preformatted disk images that guestfish can make for you to save typing. "
20309 "This is particularly useful for testing purposes. This option is used "
20310 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20311 "can be mixed with I<-a>)."
20315 #: ../fish/guestfish.pod:1028
20317 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20318 "the second and so on. Existing files in the current directory are "
20323 #: ../fish/guestfish.pod:1032
20325 "The type briefly describes how the disk should be sized, partitioned, how "
20326 "filesystem(s) should be created, and how content should be added. "
20327 "Optionally the type can be followed by extra parameters, separated by C<:> "
20328 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
20329 "allocated disk, containing a single partition, with the partition formatted "
20330 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
20335 #: ../fish/guestfish.pod:1040
20336 msgid "To list the available types and any extra parameters they take, run:"
20340 #: ../fish/guestfish.pod:1044
20342 "Note that the prepared filesystem is not mounted. You would usually have to "
20343 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20347 #: ../fish/guestfish.pod:1048
20349 "If any I<-N> or I<--new> options are given, the guest is automatically "
20354 #: ../fish/guestfish.pod:1053
20355 msgid "Create a 100MB disk with an ext4-formatted partition:"
20359 #: ../fish/guestfish.pod:1055
20362 " guestfish -N fs:ext4\n"
20367 #: ../fish/guestfish.pod:1057
20368 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20372 #: ../fish/guestfish.pod:1059
20375 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20380 #: ../fish/guestfish.pod:1061
20381 msgid "Create a blank 200MB disk:"
20385 #: ../fish/guestfish.pod:1063
20388 " guestfish -N disk:200M\n"
20393 #: ../fish/guestfish.pod:1065
20394 msgid "PROGRESS BARS"
20398 #: ../fish/guestfish.pod:1067
20400 "Some (not all) long-running commands send progress notification messages as "
20401 "they are running. Guestfish turns these messages into progress bars."
20405 #: ../fish/guestfish.pod:1071
20407 "When a command that supports progress bars takes longer than two seconds to "
20408 "run, and if progress bars are enabled, then you will see one appearing below "
20413 #: ../fish/guestfish.pod:1075
20416 " ><fs> copy-size /large-file /another-file 2048M\n"
20417 " / 10% [#####-----------------------------------------] 00:30\n"
20422 #: ../fish/guestfish.pod:1078
20424 "The spinner on the left hand side moves round once for every progress "
20425 "notification received from the backend. This is a (reasonably) golden "
20426 "assurance that the command is \"doing something\" even if the progress bar "
20427 "is not moving, because the command is able to send the progress "
20428 "notifications. When the bar reaches 100% and the command finishes, the "
20429 "spinner disappears."
20433 #: ../fish/guestfish.pod:1085
20435 "Progress bars are enabled by default when guestfish is used interactively. "
20436 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20437 "and you can disable them completely using I<--no-progress-bars>."
20441 #: ../fish/guestfish.pod:1090
20442 msgid "GUESTFISH COMMANDS"
20446 #: ../fish/guestfish.pod:1092
20448 "The commands in this section are guestfish convenience commands, in other "
20449 "words, they are not part of the L<guestfs(3)> API."
20453 #: ../fish/guestfish.pod:1095
20458 #: ../fish/guestfish.pod:1097
20467 #: ../fish/guestfish.pod:1100
20468 msgid "Without any parameter, this provides general help."
20472 #: ../fish/guestfish.pod:1102
20473 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20477 #: ../fish/guestfish.pod:1104
20478 msgid "quit | exit"
20482 #: ../fish/guestfish.pod:1106
20483 msgid "This exits guestfish. You can also use C<^D> key."
20487 #: ../fish/guestfish.pod:1108
20488 msgid "@FISH_COMMANDS@"
20492 #: ../fish/guestfish.pod:1110
20497 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20502 #: ../fish/guestfish.pod:1116
20504 "guestfish returns 0 if the commands completed without error, or 1 if there "
20509 #: ../fish/guestfish.pod:1123
20514 #: ../fish/guestfish.pod:1125
20516 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20521 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3213
20522 msgid "FEBOOTSTRAP_KERNEL"
20526 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3215
20527 msgid "FEBOOTSTRAP_MODULES"
20531 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3217
20533 "These two environment variables allow the kernel that libguestfs uses in the "
20534 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20535 "most recent host kernel is chosen. For more information about kernel "
20536 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20537 "available in febootstrap E<ge> 3.8."
20541 #: ../fish/guestfish.pod:1138
20542 msgid "GUESTFISH_DISPLAY_IMAGE"
20546 #: ../fish/guestfish.pod:1140
20548 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20549 "If not set, it uses L<display(1)>."
20553 #: ../fish/guestfish.pod:1143
20554 msgid "GUESTFISH_PID"
20558 #: ../fish/guestfish.pod:1145
20560 "Used with the I<--remote> option to specify the remote guestfish process to "
20561 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20565 #: ../fish/guestfish.pod:1149
20570 #: ../fish/guestfish.pod:1151
20572 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20573 "not specified, the external L<hexedit(1)> program is used."
20577 #: ../fish/guestfish.pod:1155
20582 #: ../fish/guestfish.pod:1157
20584 "If compiled with GNU readline support, various files in the home directory "
20585 "can be used. See L</FILES>."
20589 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3223
20590 msgid "LIBGUESTFS_APPEND"
20594 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3225
20595 msgid "Pass additional options to the guest kernel."
20599 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3227
20600 msgid "LIBGUESTFS_DEBUG"
20604 #: ../fish/guestfish.pod:1166
20606 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20607 "effect as using the B<-v> option."
20611 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3232
20612 msgid "LIBGUESTFS_MEMSIZE"
20616 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3234
20618 "Set the memory allocated to the qemu process, in megabytes. For example:"
20622 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3237
20625 " LIBGUESTFS_MEMSIZE=700\n"
20630 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3239
20631 msgid "LIBGUESTFS_PATH"
20635 #: ../fish/guestfish.pod:1178
20637 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20638 "the discussion of paths in L<guestfs(3)>."
20642 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3244
20643 msgid "LIBGUESTFS_QEMU"
20647 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3246
20649 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
20650 "which was found at compile time by the configure script is used."
20654 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3252
20655 msgid "LIBGUESTFS_TRACE"
20659 #: ../fish/guestfish.pod:1189
20660 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
20664 #: ../fish/guestfish.pod:1191
20669 #: ../fish/guestfish.pod:1193
20671 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
20676 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:236
20677 #: ../src/guestfs.pod:3257
20682 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3259
20684 "Location of temporary directory, defaults to C</tmp> except for the cached "
20685 "supermin appliance which defaults to C</var/tmp>."
20689 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3262
20691 "If libguestfs was compiled to use the supermin appliance then the real "
20692 "appliance is cached in this directory, shared between all handles belonging "
20693 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
20694 "use in case C</var/tmp> is not large enough."
20698 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297
20699 #: ../rescue/virt-rescue.pod:273
20704 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301
20705 #: ../rescue/virt-rescue.pod:277
20706 msgid "$HOME/.libguestfs-tools.rc"
20710 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303
20711 #: ../rescue/virt-rescue.pod:279
20712 msgid "/etc/libguestfs-tools.conf"
20716 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305
20717 #: ../rescue/virt-rescue.pod:281
20719 "This configuration file controls the default read-only or read-write mode "
20720 "(I<--ro> or I<--rw>)."
20724 #: ../fish/guestfish.pod:1220
20725 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
20729 #: ../fish/guestfish.pod:1222
20730 msgid "$HOME/.guestfish"
20734 #: ../fish/guestfish.pod:1224
20736 "If compiled with GNU readline support, then the command history is saved in "
20741 #: ../fish/guestfish.pod:1227
20742 msgid "$HOME/.inputrc"
20746 #: ../fish/guestfish.pod:1229
20747 msgid "/etc/inputrc"
20751 #: ../fish/guestfish.pod:1231
20753 "If compiled with GNU readline support, then these files can be used to "
20754 "configure readline. For further information, please see L<readline(3)/"
20755 "INITIALIZATION FILE>."
20759 #: ../fish/guestfish.pod:1235
20760 msgid "To write rules which only apply to guestfish, use:"
20764 #: ../fish/guestfish.pod:1237
20774 #: ../fish/guestfish.pod:1241
20776 "Variables that you can set in inputrc that change the behaviour of guestfish "
20777 "in useful ways include:"
20781 #: ../fish/guestfish.pod:1246
20782 msgid "completion-ignore-case (default: on)"
20786 #: ../fish/guestfish.pod:1248
20788 "By default, guestfish will ignore case when tab-completing paths on the "
20793 #: ../fish/guestfish.pod:1251
20796 " set completion-ignore-case off\n"
20801 #: ../fish/guestfish.pod:1253
20802 msgid "to make guestfish case sensitive."
20806 #: ../fish/guestfish.pod:1257
20811 #: ../fish/guestfish.pod:1259
20812 msgid "test2.img (etc)"
20816 #: ../fish/guestfish.pod:1261
20818 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
20819 "will be created in the file C<test1.img> in the current directory. The "
20820 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
20821 "the same name will be overwritten."
20825 #: ../fish/guestfish.pod:1270
20827 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, L<virt-"
20828 "cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit"
20829 "(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems"
20830 "(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-"
20831 "rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, "
20832 "L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, "
20833 "L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-helper(8)>."
20837 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3354
20838 #: ../test-tool/libguestfs-test-tool.pod:112
20839 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
20843 #: ../fish/virt-copy-in.pod:5
20845 "virt-copy-in - Copy files and directories into a virtual machine disk image."
20849 #: ../fish/virt-copy-in.pod:9
20852 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
20857 #: ../fish/virt-copy-in.pod:11
20860 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
20865 #: ../fish/virt-copy-in.pod:15
20867 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
20868 "causing disk corruption. The virtual machine must be shut down before you "
20869 "use this command."
20873 #: ../fish/virt-copy-in.pod:21
20875 "C<virt-copy-in> copies files and directories from the local disk into a "
20876 "virtual machine disk image or named libvirt domain."
20880 #: ../fish/virt-copy-in.pod:24
20882 "You can give one of more filenames and directories on the command line. "
20883 "Directories are copied in recursively. The final parameter must be the "
20884 "destination directory in the disk image which must be an absolute path "
20885 "starting with a C</> character."
20889 #: ../fish/virt-copy-in.pod:33
20892 " virt-copy-in -d MyGuest resolv.conf /etc\n"
20897 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
20898 msgid "Upload a home directory to a guest:"
20902 #: ../fish/virt-copy-in.pod:37
20905 " virt-copy-in -d MyGuest skel /home\n"
20910 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
20911 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
20912 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
20916 #: ../fish/virt-copy-in.pod:41
20918 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20919 "> C<copy-in> command. For anything more complex than a trivial copy, you "
20920 "are probably better off using guestfish directly."
20924 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
20925 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
20927 "Since the shell script just passes options straight to guestfish, read "
20928 "L<guestfish(1)> to see the full list of options."
20932 #: ../fish/virt-copy-in.pod:52
20934 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
20935 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20939 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
20940 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
20941 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
20945 #: ../fish/virt-copy-out.pod:5
20947 "virt-copy-out - Copy files and directories out of a virtual machine disk "
20952 #: ../fish/virt-copy-out.pod:9
20955 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
20960 #: ../fish/virt-copy-out.pod:11
20963 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
20968 #: ../fish/virt-copy-out.pod:15
20970 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
20971 "image or named libvirt domain."
20975 #: ../fish/virt-copy-out.pod:18
20977 "You can give one of more filenames and directories on the command line. "
20978 "Directories are copied out recursively."
20982 #: ../fish/virt-copy-out.pod:23
20983 msgid "Download the home directories from a virtual machine:"
20987 #: ../fish/virt-copy-out.pod:25
20991 " virt-copy-out -d MyGuest /home homes\n"
20996 #: ../fish/virt-copy-out.pod:30
20998 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20999 "> C<copy-out> command. For anything more complex than a trivial copy, you "
21000 "are probably better off using guestfish directly."
21004 #: ../fish/virt-copy-out.pod:41
21006 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L<virt-"
21007 "tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21011 #: ../fish/virt-tar-in.pod:5
21012 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21016 #: ../fish/virt-tar-in.pod:9
21019 " virt-tar-in -a disk.img data.tar /destination\n"
21024 #: ../fish/virt-tar-in.pod:11
21027 " virt-tar-in -d domain data.tar /destination\n"
21032 #: ../fish/virt-tar-in.pod:13
21035 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21040 #: ../fish/virt-tar-in.pod:17
21042 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21043 "causing disk corruption. The virtual machine must be shut down before you "
21044 "use this command."
21048 #: ../fish/virt-tar-in.pod:23
21050 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21051 "image or named libvirt domain."
21055 #: ../fish/virt-tar-in.pod:26
21057 "The first parameter is the tar file. Use C<-> to read the tar file from "
21058 "standard input. The second parameter is the absolute target directory to "
21063 #: ../fish/virt-tar-in.pod:34
21066 " virt-tar-in -d MyGuest homes.tar /home\n"
21071 #: ../fish/virt-tar-in.pod:38
21073 "This command is just a simple shell script wrapper around the L<guestfish(1)"
21074 "> C<tar-in> command. For anything more complex than a trivial copy, you are "
21075 "probably better off using guestfish directly."
21079 #: ../fish/virt-tar-in.pod:49
21081 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21082 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, L<http://libguestfs."
21087 #: ../fish/virt-tar-out.pod:5
21089 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21093 #: ../fish/virt-tar-out.pod:9
21096 " virt-tar-out -a disk.img /dir files.tar\n"
21101 #: ../fish/virt-tar-out.pod:11
21104 " virt-tar-out -d domain /dir files.tar\n"
21109 #: ../fish/virt-tar-out.pod:13
21112 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21117 #: ../fish/virt-tar-out.pod:17
21119 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21123 #: ../fish/virt-tar-out.pod:20
21125 "The first parameter is the absolute path of the virtual machine directory. "
21126 "The second parameter is the tar file to write. Use C<-> to write to "
21131 #: ../fish/virt-tar-out.pod:26
21132 msgid "Download the home directories from a guest:"
21136 #: ../fish/virt-tar-out.pod:28
21139 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21144 #: ../fish/virt-tar-out.pod:32
21146 "This command is just a simple shell script wrapper around the L<guestfish(1)"
21147 "> C<tar-out> command. For anything more complex than a trivial copy, you "
21148 "are probably better off using guestfish directly."
21152 #: ../fish/virt-tar-out.pod:43
21154 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21155 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21159 #: ../fuse/guestmount.pod:5
21161 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21165 #: ../fuse/guestmount.pod:9
21168 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21173 #: ../fuse/guestmount.pod:11
21176 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21181 #: ../fuse/guestmount.pod:13
21184 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21189 #: ../fuse/guestmount.pod:17
21191 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21192 "machines. If you do this, you risk disk corruption in the VM."
21196 #: ../fuse/guestmount.pod:22
21198 "The guestmount program can be used to mount virtual machine filesystems and "
21199 "other disk images on the host. It uses libguestfs for access to the guest "
21200 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21201 "a mountable device."
21205 #: ../fuse/guestmount.pod:27
21207 "Along with other options, you have to give at least one device (I<-a> "
21208 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
21209 "option) or use the I<-i> inspection option or the I<--live> option. How "
21210 "this works is better explained in the L<guestfish(1)> manual page, or by "
21211 "looking at the examples below."
21215 #: ../fuse/guestmount.pod:33
21217 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21218 "by you, and the filesystem will not be visible to any other users unless you "
21219 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21220 "the filesystem, use the C<fusermount -u> command."
21224 #: ../fuse/guestmount.pod:41
21226 "For a typical Windows guest which has its main filesystem on the first "
21231 #: ../fuse/guestmount.pod:44
21234 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21239 #: ../fuse/guestmount.pod:46
21241 "For a typical Linux guest which has a /boot filesystem on the first "
21242 "partition, and the root filesystem on a logical volume:"
21246 #: ../fuse/guestmount.pod:49
21249 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21254 #: ../fuse/guestmount.pod:51
21255 msgid "To get libguestfs to detect guest mountpoints for you:"
21259 #: ../fuse/guestmount.pod:53
21262 " guestmount -a guest.img -i --ro /mnt\n"
21267 #: ../fuse/guestmount.pod:55
21268 msgid "For a libvirt guest called \"Guest\" you could do:"
21272 #: ../fuse/guestmount.pod:57
21275 " guestmount -d Guest -i --ro /mnt\n"
21280 #: ../fuse/guestmount.pod:59
21282 "If you don't know what filesystems are contained in a guest or disk image, "
21283 "use L<virt-filesystems(1)> first:"
21287 #: ../fuse/guestmount.pod:62
21290 " virt-filesystems MyGuest\n"
21295 #: ../fuse/guestmount.pod:64
21297 "If you want to trace the libguestfs calls but without excessive debugging "
21298 "information, we recommend:"
21302 #: ../fuse/guestmount.pod:67
21305 " guestmount [...] --trace /mnt\n"
21310 #: ../fuse/guestmount.pod:69
21311 msgid "If you want to debug the program, we recommend:"
21315 #: ../fuse/guestmount.pod:71
21318 " guestmount [...] --trace --verbose /mnt\n"
21323 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68
21324 #: ../resize/virt-resize.pod:621
21329 #: ../fuse/guestmount.pod:75
21330 msgid "Other users cannot see the filesystem by default"
21334 #: ../fuse/guestmount.pod:77
21336 "If you mount a filesystem as one user (eg. root), then other users will not "
21337 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21338 "option when mounting:"
21342 #: ../fuse/guestmount.pod:81
21345 " sudo guestmount [...] -o allow_other /mnt\n"
21350 #: ../fuse/guestmount.pod:83
21351 msgid "Enabling FUSE"
21355 #: ../fuse/guestmount.pod:85
21357 "On some distros, you may need to add yourself to a special group (eg. "
21358 "C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21359 "Debian and derivatives."
21363 #: ../fuse/guestmount.pod:89
21365 "On other distros, no special group is required. It is not necessary on "
21366 "Fedora or Red Hat Enterprise Linux."
21370 #: ../fuse/guestmount.pod:100
21371 msgid "Add a block device or virtual machine image."
21375 #: ../fuse/guestmount.pod:123
21376 msgid "B<--dir-cache-timeout N>"
21380 #: ../fuse/guestmount.pod:125
21382 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21383 "seconds. The readdir cache [actually, there are several semi-independent "
21384 "caches] is populated after a readdir(2) call with the stat and extended "
21385 "attributes of the files in the directory, in anticipation that they will be "
21386 "requested soon after."
21390 #: ../fuse/guestmount.pod:131
21392 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21393 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21394 "requests, only cache existing ones."
21398 #: ../fuse/guestmount.pod:151
21400 "If you have untrusted raw-format guest disk images, you should use this "
21401 "option to specify the disk format. This avoids a possible security problem "
21402 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
21403 "guestfs_add_drive_opts>."
21407 #: ../fuse/guestmount.pod:156
21408 msgid "B<--fuse-help>"
21412 #: ../fuse/guestmount.pod:158
21413 msgid "Display help on special FUSE options (see I<-o> below)."
21417 #: ../fuse/guestmount.pod:162
21418 msgid "Display brief help and exit."
21422 #: ../fuse/guestmount.pod:186
21424 "Mount the named partition or logical volume on the given mountpoint B<in the "
21425 "guest> (this has nothing to do with mountpoints in the host)."
21429 #: ../fuse/guestmount.pod:189
21431 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21432 "something on C</>."
21436 #: ../fuse/guestmount.pod:206
21438 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21439 "unmounted. If you specify this option, then we don't attempt to sync the "
21440 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21444 #: ../fuse/guestmount.pod:211
21445 msgid "B<-o option>"
21449 #: ../fuse/guestmount.pod:213
21450 msgid "B<--option option>"
21454 #: ../fuse/guestmount.pod:215
21455 msgid "Pass extra options to FUSE."
21459 #: ../fuse/guestmount.pod:217
21461 "To get a list of all the extra options supported by FUSE, use the command "
21462 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21463 "of them are a good idea."
21467 #: ../fuse/guestmount.pod:221
21470 " guestmount --fuse-help\n"
21475 #: ../fuse/guestmount.pod:223
21476 msgid "Some potentially useful FUSE options:"
21480 #: ../fuse/guestmount.pod:227
21481 msgid "B<-o allow_other>"
21485 #: ../fuse/guestmount.pod:229
21486 msgid "Allow other users to see the filesystem."
21490 #: ../fuse/guestmount.pod:231
21491 msgid "B<-o attr_timeout=N>"
21495 #: ../fuse/guestmount.pod:233
21496 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21500 #: ../fuse/guestmount.pod:235
21501 msgid "B<-o kernel_cache>"
21505 #: ../fuse/guestmount.pod:237
21507 "Allow the kernel to cache files (reduces the number of reads that have to go "
21508 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21509 "afford the extra memory usage."
21513 #: ../fuse/guestmount.pod:241
21514 msgid "B<-o uid=N> B<-o gid=N>"
21518 #: ../fuse/guestmount.pod:243
21520 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21521 "the chosen values."
21525 #: ../fuse/guestmount.pod:252
21527 "Add devices and mount everything read-only. Also disallow writes and make "
21528 "the disk appear read-only to FUSE."
21532 #: ../fuse/guestmount.pod:255
21534 "This is highly recommended if you are not going to edit the guest disk. If "
21535 "the guest is running and this option is I<not> supplied, then there is a "
21536 "strong risk of disk corruption in the guest. We try to prevent this from "
21537 "happening, but it is not always possible."
21541 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:171
21542 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21546 #: ../fuse/guestmount.pod:264
21547 msgid "Enable SELinux support for the guest."
21551 #: ../fuse/guestmount.pod:270
21552 msgid "Enable verbose messages from underlying libguestfs."
21556 #: ../fuse/guestmount.pod:276
21557 msgid "Display the program version and exit."
21561 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308
21562 #: ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
21563 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21567 #: ../fuse/guestmount.pod:289
21572 #: ../fuse/guestmount.pod:291
21573 msgid "Trace libguestfs calls and entry into each FUSE function."
21577 #: ../fuse/guestmount.pod:293
21578 msgid "This also stops the daemon from forking into the background."
21582 #: ../fuse/guestmount.pod:319
21584 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21585 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
21590 #: ../fuse/guestmount.pod:334
21591 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21595 #: ../inspector/virt-inspector.pod:5
21597 "virt-inspector - Display operating system version and other information "
21598 "about a virtual machine"
21602 #: ../inspector/virt-inspector.pod:9
21605 " virt-inspector [--options] -d domname\n"
21610 #: ../inspector/virt-inspector.pod:11
21613 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21618 #: ../inspector/virt-inspector.pod:15
21621 " virt-inspector domname\n"
21626 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
21629 " virt-inspector disk.img [disk.img ...]\n"
21634 #: ../inspector/virt-inspector.pod:21
21636 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21637 "determine the version of the operating system and other information about "
21638 "the virtual machine."
21642 #: ../inspector/virt-inspector.pod:25
21643 msgid "Virt-inspector produces XML output for feeding into other programs."
21647 #: ../inspector/virt-inspector.pod:27
21649 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21650 "the libvirt domain (see: C<virsh list --all>)."
21654 #: ../inspector/virt-inspector.pod:30
21656 "You can also run virt-inspector directly on disk images from a single "
21657 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
21658 "has several block devices, in which case you should list several I<-a> "
21659 "options one after another, with the first corresponding to the guest's C</"
21660 "dev/sda>, the second to the guest's C</dev/sdb> and so on."
21664 #: ../inspector/virt-inspector.pod:37
21666 "You can also run virt-inspector on install disks, live CDs, bootable USB "
21667 "keys and similar."
21671 #: ../inspector/virt-inspector.pod:40
21673 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
21674 "inspect several virtual machines, you have to run virt-inspector several "
21675 "times (for example, from a shell script for-loop)."
21679 #: ../inspector/virt-inspector.pod:45
21681 "Because virt-inspector needs direct access to guest images, it won't "
21682 "normally work over remote libvirt connections."
21686 #: ../inspector/virt-inspector.pod:48
21688 "All of the information available from virt-inspector is also available "
21689 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
21690 "The same information can also be fetched using guestfish or via libguestfs "
21691 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
21692 "WITH OTHER PROGRAMMING LANGUAGES>)."
21696 #: ../inspector/virt-inspector.pod:81
21698 "Libvirt is only used if you specify a C<domname> on the command line. If "
21699 "you specify guest block devices directly (I<-a>), then libvirt is not used "
21704 #: ../inspector/virt-inspector.pod:94
21706 "When prompting for keys and passphrases, virt-inspector normally turns "
21707 "echoing off so you cannot see what you are typing. If you are not worried "
21708 "about Tempest attacks and there is no one else in the room you can specify "
21709 "this flag to see what you are typing."
21713 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
21714 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
21715 #: ../tools/virt-win-reg.pl:144
21717 "Specify the format of disk images given on the command line. If this is "
21718 "omitted then the format is autodetected from the content of the disk image."
21722 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
21723 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
21724 #: ../tools/virt-win-reg.pl:148
21726 "If disk images are requested from libvirt, then this program asks libvirt "
21727 "for this information. In this case, the value of the format parameter is "
21732 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:391
21733 #: ../resize/virt-resize.pod:483 ../sparsify/virt-sparsify.pod:132
21734 #: ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102
21735 #: ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
21737 "If working with untrusted raw-format guest disk images, you should ensure "
21738 "the format is always specified."
21742 #: ../inspector/virt-inspector.pod:139
21743 msgid "Previous versions of virt-inspector allowed you to write either:"
21747 #: ../inspector/virt-inspector.pod:145
21750 " virt-inspector guestname\n"
21755 #: ../inspector/virt-inspector.pod:153
21760 #: ../inspector/virt-inspector.pod:155
21762 "The virt-inspector XML is described precisely in a RELAX NG schema file "
21763 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
21764 "just an overview."
21768 #: ../inspector/virt-inspector.pod:159
21770 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
21771 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
21772 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
21773 "which is vanishingly rare in real world VMs."
21777 #: ../inspector/virt-inspector.pod:164
21778 msgid "E<lt>operatingsystemE<gt>"
21782 #: ../inspector/virt-inspector.pod:166
21784 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
21785 "describe the operating system, its architecture, the descriptive \"product "
21786 "name\" string, the type of OS and so on, as in this example:"
21790 #: ../inspector/virt-inspector.pod:170
21793 " <operatingsystems>\n"
21794 " <operatingsystem>\n"
21795 " <root>/dev/sda2</root>\n"
21796 " <name>windows</name>\n"
21797 " <arch>i386</arch>\n"
21798 " <distro>windows</distro>\n"
21799 " <product_name>Windows 7 Enterprise</product_name>\n"
21800 " <product_variant>Client</product_variant>\n"
21801 " <major_version>6</major_version>\n"
21802 " <minor_version>1</minor_version>\n"
21803 " <windows_systemroot>/Windows</windows_systemroot>\n"
21804 " <format>installed</format>\n"
21809 #: ../inspector/virt-inspector.pod:183
21811 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
21812 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
21813 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
21814 "architecture. The other fields are fairly self-explanatory, but because "
21815 "these fields are taken directly from the libguestfs inspection API you can "
21816 "find precise information from L<guestfs(3)/INSPECTION>."
21820 #: ../inspector/virt-inspector.pod:191
21822 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
21823 "of view of libguestfs (block devices may have completely different names "
21824 "inside the VM itself)."
21828 #: ../inspector/virt-inspector.pod:195
21829 msgid "E<lt>mountpointsE<gt>"
21833 #: ../inspector/virt-inspector.pod:197
21835 "Un*x-like guests typically have multiple filesystems which are mounted at "
21836 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
21837 "element which looks like this:"
21841 #: ../inspector/virt-inspector.pod:201
21844 " <operatingsystems>\n"
21845 " <operatingsystem>\n"
21848 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
21849 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
21850 " </mountpoints>\n"
21855 #: ../inspector/virt-inspector.pod:209
21857 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
21858 "and may have completely different names inside the guest. Only mountable "
21859 "filesystems appear in this list, not things like swap devices."
21863 #: ../inspector/virt-inspector.pod:214
21864 msgid "E<lt>filesystemsE<gt>"
21868 #: ../inspector/virt-inspector.pod:216
21870 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
21871 "filesystems belonging to the guest, including swap and empty partitions. "
21872 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
21873 "this OS or shared with this OS and other OSes)."
21877 #: ../inspector/virt-inspector.pod:222
21878 msgid "You might see something like this:"
21882 #: ../inspector/virt-inspector.pod:224
21885 " <operatingsystems>\n"
21886 " <operatingsystem>\n"
21889 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21890 " <type>ext4</type>\n"
21891 " <label>Fedora-13-x86_64</label>\n"
21892 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
21898 #: ../inspector/virt-inspector.pod:234
21900 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
21901 "the label, and the UUID."
21905 #: ../inspector/virt-inspector.pod:237
21906 msgid "E<lt>applicationsE<gt>"
21910 #: ../inspector/virt-inspector.pod:239
21912 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
21913 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
21918 #: ../inspector/virt-inspector.pod:243
21920 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
21921 "Typical values would be C<rpm> and C<deb>."
21925 #: ../inspector/virt-inspector.pod:246
21927 "E<lt>package_managementE<gt>, if present, describes the package manager. "
21928 "Typical values include C<yum>, C<up2date> and C<apt>"
21932 #: ../inspector/virt-inspector.pod:249
21933 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
21937 #: ../inspector/virt-inspector.pod:252
21940 " <operatingsystems>\n"
21941 " <operatingsystem>\n"
21943 " <applications>\n"
21945 " <name>coreutils</name>\n"
21946 " <version>8.5</version>\n"
21947 " <release>1</release>\n"
21948 " </application>\n"
21953 #: ../inspector/virt-inspector.pod:262
21955 "The version and release fields may not be available for some types guests. "
21956 "Other fields are possible, see L<guestfs(3)/"
21957 "guestfs_inspect_list_applications>."
21961 #: ../inspector/virt-inspector.pod:266
21962 msgid "E<lt>drive_mappingsE<gt>"
21966 #: ../inspector/virt-inspector.pod:268
21968 "For operating systems like Windows which use drive letters, virt-inspector "
21969 "is able to find out how drive letters map to filesystems."
21973 #: ../inspector/virt-inspector.pod:272
21976 " <operatingsystems>\n"
21977 " <operatingsystem>\n"
21979 " <drive_mappings>\n"
21980 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
21981 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
21982 " </drive_mappings>\n"
21987 #: ../inspector/virt-inspector.pod:280
21989 "In the example above, drive C maps to the filesystem on the second partition "
21990 "on the first disk, and drive E maps to the filesystem on the first partition "
21991 "on the second disk."
21995 #: ../inspector/virt-inspector.pod:284
21997 "Note that this only covers permanent local filesystem mappings, not things "
21998 "like network shares. Furthermore NTFS volume mount points may not be listed "
22003 #: ../inspector/virt-inspector.pod:288
22004 msgid "E<lt>iconE<gt>"
22008 #: ../inspector/virt-inspector.pod:290
22010 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22011 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22012 "very large and high quality."
22016 #: ../inspector/virt-inspector.pod:294
22019 " <operatingsystems>\n"
22020 " <operatingsystem>\n"
22023 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22024 " [... many lines of base64 data ...]\n"
22030 #: ../inspector/virt-inspector.pod:302
22032 "To display the icon, you have to extract it and convert the base64 data back "
22033 "to a binary file. Use an XPath query or simply an editor to extract the "
22034 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22039 #: ../inspector/virt-inspector.pod:307
22042 " base64 -i -d < icon.data > icon.png\n"
22047 #: ../inspector/virt-inspector.pod:309
22048 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22052 #: ../inspector/virt-inspector.pod:311
22054 "Virt-inspector can detect some operating system installers on install disks, "
22055 "live CDs, bootable USB keys and more."
22059 #: ../inspector/virt-inspector.pod:314
22061 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22062 "fields may be present to indicate a live CD, network installer, or one part "
22063 "of a multipart CD. For example:"
22067 #: ../inspector/virt-inspector.pod:318
22070 " <operatingsystems>\n"
22071 " <operatingsystem>\n"
22072 " <root>/dev/sda</root>\n"
22073 " <name>linux</name>\n"
22074 " <arch>i386</arch>\n"
22075 " <distro>ubuntu</distro>\n"
22076 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
22077 " <major_version>10</major_version>\n"
22078 " <minor_version>10</minor_version>\n"
22079 " <format>installer</format>\n"
22085 #: ../inspector/virt-inspector.pod:330
22086 msgid "USING XPATH"
22090 #: ../inspector/virt-inspector.pod:332
22092 "You can use the XPath query language to select parts of the XML. We "
22093 "recommend using C<xmlstarlet> to perform XPath queries from the command line."
22097 #: ../inspector/virt-inspector.pod:338
22100 " $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
22102 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22103 " <type>ext4</type>\n"
22109 #: ../inspector/virt-inspector.pod:344
22112 " $ virt-inspector -d Guest | \\\n"
22113 " xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22119 #: ../inspector/virt-inspector.pod:348
22122 " $ virt-inspector -d Guest | \\\n"
22123 " xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
22124 " [displays the guest icon, if there is one]\n"
22129 #: ../inspector/virt-inspector.pod:359
22130 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22134 #: ../inspector/virt-inspector.pod:361
22136 "Early versions of libguestfs shipped with a different virt-inspector program "
22137 "written in Perl (the current version is written in C). The XML output of "
22138 "the Perl virt-inspector was different and it could also output in other "
22139 "formats like text."
22143 #: ../inspector/virt-inspector.pod:366
22145 "The old virt-inspector is no longer supported or shipped with libguestfs."
22149 #: ../inspector/virt-inspector.pod:369
22151 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22152 "versions of virt-inspector with different names:"
22156 #: ../inspector/virt-inspector.pod:372
22159 " virt-inspector Old Perl version.\n"
22160 " virt-inspector2 New C version.\n"
22165 #: ../inspector/virt-inspector.pod:382
22167 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
22168 ">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22172 #: ../inspector/virt-inspector.pod:399
22173 msgid "Matthew Booth L<mbooth@redhat.com>"
22177 #: ../java/examples/guestfs-java.pod:5
22178 msgid "guestfs-java - How to use libguestfs from Java"
22182 #: ../java/examples/guestfs-java.pod:9
22185 " import com.redhat.et.libguestfs.*;\n"
22190 #: ../java/examples/guestfs-java.pod:11
22193 " GuestFS g = new GuestFS ();\n"
22194 " g.add_drive_opts (\"disk.img\", null);\n"
22200 #: ../java/examples/guestfs-java.pod:17
22202 "This manual page documents how to call libguestfs from the Java programming "
22203 "language. This page just documents the differences from the C API and gives "
22204 "some examples. If you are not familiar with using libguestfs, you also need "
22205 "to read L<guestfs(3)>."
22209 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22210 msgid "CLOSING THE HANDLE"
22214 #: ../java/examples/guestfs-java.pod:24
22216 "The handle is closed when it is reaped by the garbage collector. Because "
22217 "libguestfs handles include a lot of state, it is also possible to close (and "
22218 "hence free) them explicitly by calling the C<close> method."
22222 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
22223 #: ../python/examples/guestfs-python.pod:21
22224 #: ../ruby/examples/guestfs-ruby.pod:22
22229 #: ../java/examples/guestfs-java.pod:31
22231 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22232 "exception. This has a single parameter which is the error message (a "
22237 #: ../java/examples/guestfs-java.pod:35
22238 msgid "Calling any method on a closed handle raises the same exception."
22242 #: ../java/examples/guestfs-java.pod:47
22244 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-ocaml"
22245 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
22246 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22250 #: ../ocaml/examples/guestfs-ocaml.pod:5
22251 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22255 #: ../ocaml/examples/guestfs-ocaml.pod:9
22256 msgid "Module style:"
22260 #: ../ocaml/examples/guestfs-ocaml.pod:11
22263 " let g = Guestfs.create () in\n"
22264 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22265 " Guestfs.launch g;\n"
22270 #: ../ocaml/examples/guestfs-ocaml.pod:15
22271 msgid "Object-oriented style:"
22275 #: ../ocaml/examples/guestfs-ocaml.pod:17
22278 " let g = new Guestfs.guestfs () in\n"
22279 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22285 #: ../ocaml/examples/guestfs-ocaml.pod:21
22288 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22290 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22295 #: ../ocaml/examples/guestfs-ocaml.pod:27
22297 "This manual page documents how to call libguestfs from the OCaml programming "
22298 "language. This page just documents the differences from the C API and gives "
22299 "some examples. If you are not familiar with using libguestfs, you also need "
22300 "to read L<guestfs(3)>."
22304 #: ../ocaml/examples/guestfs-ocaml.pod:32
22305 msgid "PROGRAMMING STYLES"
22309 #: ../ocaml/examples/guestfs-ocaml.pod:34
22311 "There are two different programming styles supported by the OCaml bindings. "
22312 "You can use a module style, with each C function mapped to an OCaml function:"
22316 #: ../ocaml/examples/guestfs-ocaml.pod:38
22319 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22324 #: ../ocaml/examples/guestfs-ocaml.pod:40
22329 #: ../ocaml/examples/guestfs-ocaml.pod:42
22332 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22337 #: ../ocaml/examples/guestfs-ocaml.pod:44
22339 "Alternately you can use an object-oriented style, calling methods on the "
22340 "class C<Guestfs.guestfs>:"
22344 #: ../ocaml/examples/guestfs-ocaml.pod:47
22347 " method set_verbose : bool -> unit\n"
22352 #: ../ocaml/examples/guestfs-ocaml.pod:49
22354 "The object-oriented style is usually briefer, and the minor performance "
22355 "penalty isn't noticable in the general overhead of performing libguestfs "
22360 #: ../ocaml/examples/guestfs-ocaml.pod:55
22362 "The handle is closed when it is reaped by the garbage collector. Because "
22363 "libguestfs handles include a lot of state, it is also possible to close (and "
22364 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22369 #: ../ocaml/examples/guestfs-ocaml.pod:62
22371 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22372 "exception. This has a single parameter which is the error message (a "
22377 #: ../ocaml/examples/guestfs-ocaml.pod:66
22379 "Calling any function/method on a closed handle raises C<Guestfs."
22380 "Handle_closed>. The single parameter is the name of the function that you "
22385 #: ../ocaml/examples/guestfs-ocaml.pod:80
22387 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22388 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
22389 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22393 #: ../perl/examples/guestfs-perl.pod:5
22394 msgid "guestfs-perl - How to use libguestfs from Perl"
22398 #: ../perl/examples/guestfs-perl.pod:9
22401 " use Sys::Guestfs;\n"
22406 #: ../perl/examples/guestfs-perl.pod:11
22409 " my $h = Sys::Guestfs->new ();\n"
22410 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22411 " $h->launch ();\n"
22412 " $h->mount_options ('', '/dev/sda1', '/');\n"
22413 " $h->touch ('/hello');\n"
22419 #: ../perl/examples/guestfs-perl.pod:20
22421 "This manual page documents how to call libguestfs from the Perl programming "
22422 "language. This page just documents the differences from the C API and gives "
22423 "some examples. If you are not familiar with using libguestfs, you also need "
22424 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22428 #: ../perl/examples/guestfs-perl.pod:26
22433 #: ../perl/examples/guestfs-perl.pod:28
22435 "Errors from libguestfs functions turn into calls to C<croak> (see L<Carp(3)"
22440 #: ../perl/examples/guestfs-perl.pod:41
22442 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang"
22443 "(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
22444 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22448 #: ../python/examples/guestfs-python.pod:5
22449 msgid "guestfs-python - How to use libguestfs from Python"
22453 #: ../python/examples/guestfs-python.pod:9
22456 " import guestfs\n"
22457 " g = guestfs.GuestFS ()\n"
22458 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22464 #: ../python/examples/guestfs-python.pod:16
22466 "This manual page documents how to call libguestfs from the Python "
22467 "programming language. This page just documents the differences from the C "
22468 "API and gives some examples. If you are not familiar with using libguestfs, "
22469 "you also need to read L<guestfs(3)>."
22473 #: ../python/examples/guestfs-python.pod:23
22475 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22476 "single string argument which is the error message."
22480 #: ../python/examples/guestfs-python.pod:26
22481 msgid "MORE DOCUMENTATION"
22485 #: ../python/examples/guestfs-python.pod:28
22490 #: ../python/examples/guestfs-python.pod:30
22494 " >>> import guestfs\n"
22495 " >>> help (guestfs)\n"
22500 #: ../python/examples/guestfs-python.pod:44
22502 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22503 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, "
22504 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22508 #: ../rescue/virt-rescue.pod:5
22509 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22513 #: ../rescue/virt-rescue.pod:9
22516 " virt-rescue [--options] -d domname\n"
22521 #: ../rescue/virt-rescue.pod:11
22524 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22529 #: ../rescue/virt-rescue.pod:15
22532 " virt-rescue [--options] domname\n"
22537 #: ../rescue/virt-rescue.pod:17
22540 " virt-rescue [--options] disk.img [disk.img ...]\n"
22545 #: ../rescue/virt-rescue.pod:21
22547 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22548 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22549 "you from doing this, but doesn't catch all cases."
22553 #: ../rescue/virt-rescue.pod:25
22555 "However if you use the I<--ro> (read only) option, then you can attach a "
22556 "shell to a live virtual machine. The results might be strange or "
22557 "inconsistent at times but you won't get disk corruption."
22561 #: ../rescue/virt-rescue.pod:31
22563 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22564 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22565 "recovery tools which you can use to examine or rescue a virtual machine or "
22570 #: ../rescue/virt-rescue.pod:36
22572 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
22573 "on disk image(s):"
22577 #: ../rescue/virt-rescue.pod:39
22580 " virt-rescue -d GuestName\n"
22585 #: ../rescue/virt-rescue.pod:41
22588 " virt-rescue --ro -a /path/to/disk.img\n"
22593 #: ../rescue/virt-rescue.pod:43
22596 " virt-rescue -a /dev/sdc\n"
22601 #: ../rescue/virt-rescue.pod:45
22602 msgid "For live VMs you I<must> use the --ro option."
22606 #: ../rescue/virt-rescue.pod:47
22608 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22609 "in an interactive bash shell where you can use many ordinary Linux "
22610 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
22611 "appliance. You must mount the virtual machine's filesystems by hand. There "
22612 "is an empty directory called C</sysroot> where you can mount filesystems."
22616 #: ../rescue/virt-rescue.pod:54
22618 "In the example below, we list logical volumes, then choose one to mount "
22619 "under C</sysroot>:"
22623 #: ../rescue/virt-rescue.pod:57
22627 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
22628 " lv_root vg_f11x64 -wi-a- 8.83G\n"
22629 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
22630 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
22631 " ><rescue> ls /sysroot\n"
22636 #: ../rescue/virt-rescue.pod:64
22638 "If you don't know what filesystems are available on the virtual machine then "
22639 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
22643 #: ../rescue/virt-rescue.pod:70
22645 "Virt-rescue can be used on I<any> disk image file or device, not just a "
22646 "virtual machine. For example you can use it on a blank file if you want to "
22647 "partition that file (although we would recommend using L<guestfish(1)> "
22648 "instead as it is more suitable for this purpose). You can even use virt-"
22649 "rescue on things like SD cards."
22653 #: ../rescue/virt-rescue.pod:76
22655 "Virt-rescue does not require root. You only need to run it as root if you "
22656 "need root to open the disk image."
22660 #: ../rescue/virt-rescue.pod:79
22662 "This tool is just designed for quick interactive hacking on a virtual "
22663 "machine. For more structured access to a virtual machine disk image, you "
22664 "should use L<guestfs(3)>. To get a structured shell that you can use to "
22665 "make scripted changes to guests, use L<guestfish(1)>."
22669 #: ../rescue/virt-rescue.pod:103
22670 msgid "B<--append kernelopts>"
22674 #: ../rescue/virt-rescue.pod:105
22675 msgid "Pass additional options to the rescue kernel."
22679 #: ../rescue/virt-rescue.pod:135
22682 " virt-rescue --format=raw -a disk.img\n"
22687 #: ../rescue/virt-rescue.pod:139
22690 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
22695 #: ../rescue/virt-rescue.pod:148
22700 #: ../rescue/virt-rescue.pod:150
22701 msgid "B<--memsize MB>"
22705 #: ../rescue/virt-rescue.pod:152
22707 "Change the amount of memory allocated to the rescue system. The default is "
22708 "set by libguestfs and is small but adequate for running system tools. The "
22709 "occasional program might need more memory. The parameter is specified in "
22714 #: ../rescue/virt-rescue.pod:157
22715 msgid "B<--network>"
22719 #: ../rescue/virt-rescue.pod:159
22720 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
22724 #: ../rescue/virt-rescue.pod:165
22725 msgid "Open the image read-only."
22729 #: ../rescue/virt-rescue.pod:175
22731 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
22732 "SELINUX> before using this option."
22736 #: ../rescue/virt-rescue.pod:178
22741 #: ../rescue/virt-rescue.pod:180
22742 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
22746 #: ../rescue/virt-rescue.pod:198
22748 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
22749 "are done read-write."
22753 #: ../rescue/virt-rescue.pod:211
22754 msgid "Previous versions of virt-rescue allowed you to write either:"
22758 #: ../rescue/virt-rescue.pod:213
22761 " virt-rescue disk.img [disk.img ...]\n"
22766 #: ../rescue/virt-rescue.pod:217
22769 " virt-rescue guestname\n"
22774 #: ../rescue/virt-rescue.pod:225
22779 #: ../rescue/virt-rescue.pod:227
22781 "Adding the I<--network> option enables QEMU user networking in the rescue "
22782 "appliance. There are some differences between user networking and ordinary "
22787 #: ../rescue/virt-rescue.pod:233
22788 msgid "ping does not work"
22792 #: ../rescue/virt-rescue.pod:235
22794 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
22795 "send the ping packets, and because virt-rescue must be able to run as non-"
22796 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
22797 "The ping command will appear to resolve addresses but will not be able to "
22798 "send or receive any packets. This does not mean that the network is not "
22803 #: ../rescue/virt-rescue.pod:242
22804 msgid "cannot receive connections"
22808 #: ../rescue/virt-rescue.pod:244
22809 msgid "QEMU user networking cannot receive incoming connections."
22813 #: ../rescue/virt-rescue.pod:246
22814 msgid "making TCP connections"
22818 #: ../rescue/virt-rescue.pod:248
22820 "The virt-rescue appliance needs to be small and so does not include many "
22821 "network tools. In particular there is no L<telnet(1)> command. You can "
22822 "make TCP connections from the shell using the magical C</dev/tcp/"
22823 "E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
22827 #: ../rescue/virt-rescue.pod:253
22830 " exec 3<>/dev/tcp/redhat.com/80\n"
22831 " echo \"GET /\" >&3\n"
22837 #: ../rescue/virt-rescue.pod:257
22838 msgid "See L<bash(1)> for more details."
22842 #: ../rescue/virt-rescue.pod:263
22844 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
22845 "ENVIRONMENT VARIABLES> for the complete list."
22849 #: ../rescue/virt-rescue.pod:290
22851 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<http://"
22852 "libguestfs.org/>."
22856 #: ../resize/virt-resize.pod:5
22857 msgid "virt-resize - Resize a virtual machine disk"
22861 #: ../resize/virt-resize.pod:9
22864 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
22865 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
22866 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
22871 #: ../resize/virt-resize.pod:15
22873 "Virt-resize is a tool which can resize a virtual machine disk, making it "
22874 "larger or smaller overall, and resizing or deleting any partitions contained "
22879 #: ../resize/virt-resize.pod:19
22881 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
22882 "not> be used on live virtual machines - for consistent results, shut the "
22883 "virtual machine down before resizing it."
22887 #: ../resize/virt-resize.pod:23
22889 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
22890 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
22894 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:597
22895 #: ../sparsify/virt-sparsify.pod:203 ../src/guestfs.pod:484
22896 #: ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
22901 #: ../resize/virt-resize.pod:33
22903 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
22904 "fill the extra 5GB of space."
22908 #: ../resize/virt-resize.pod:36
22911 " virt-filesystems --long -h --all -a olddisk\n"
22916 #: ../resize/virt-resize.pod:38
22919 " truncate -r olddisk newdisk\n"
22920 " truncate -s +5G newdisk\n"
22925 #: ../resize/virt-resize.pod:41
22928 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
22929 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
22934 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:604
22935 #: ../sparsify/virt-sparsify.pod:210 ../src/guestfs.pod:490
22936 #: ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
22941 #: ../resize/virt-resize.pod:46
22943 "As above, but make the /boot partition 200MB bigger, while giving the "
22944 "remaining space to /dev/sda2:"
22948 #: ../resize/virt-resize.pod:49
22951 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22952 " olddisk newdisk\n"
22957 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:610
22958 #: ../sparsify/virt-sparsify.pod:216 ../src/guestfs.pod:501
22959 #: ../src/guestfs.pod:1451
22964 #: ../resize/virt-resize.pod:54
22966 "As in the first example, but expand a logical volume as the final step. "
22967 "This is what you would typically use for Linux guests that use LVM:"
22971 #: ../resize/virt-resize.pod:58
22974 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
22975 " olddisk newdisk\n"
22980 #: ../resize/virt-resize.pod:61
22985 #: ../resize/virt-resize.pod:63
22987 "As in the first example, but the output format will be qcow2 instead of a "
22992 #: ../resize/virt-resize.pod:66
22995 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
22996 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23001 #: ../resize/virt-resize.pod:71
23002 msgid "DETAILED USAGE"
23006 #: ../resize/virt-resize.pod:73
23007 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23011 #: ../resize/virt-resize.pod:77
23012 msgid "1. Shut down the virtual machine"
23016 #: ../resize/virt-resize.pod:79
23017 msgid "2. Locate input disk image"
23021 #: ../resize/virt-resize.pod:81
23023 "Locate the input disk image (ie. the file or device on the host containing "
23024 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23025 "dumpxml> like this to find the disk image name:"
23029 #: ../resize/virt-resize.pod:85
23032 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23033 " Found 1 nodes:\n"
23035 " <source dev=\"/dev/vg/lv_guest\" />\n"
23040 #: ../resize/virt-resize.pod:90
23041 msgid "3. Look at current sizing"
23045 #: ../resize/virt-resize.pod:92
23046 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23050 #: ../resize/virt-resize.pod:95
23053 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23054 " Name Type Size Parent\n"
23055 " /dev/sda1 partition 101M /dev/sda\n"
23056 " /dev/sda2 partition 7.9G /dev/sda\n"
23057 " /dev/sda device 8.0G -\n"
23062 #: ../resize/virt-resize.pod:101
23064 "(This example is a virtual machine with an 8 GB disk which we would like to "
23065 "expand up to 10 GB)."
23069 #: ../resize/virt-resize.pod:104
23070 msgid "4. Create output disk"
23074 #: ../resize/virt-resize.pod:106
23076 "Virt-resize cannot do in-place disk modifications. You have to have space "
23077 "to store the resized output disk."
23081 #: ../resize/virt-resize.pod:109
23083 "To store the resized disk image in a file, create a file of a suitable size:"
23087 #: ../resize/virt-resize.pod:112
23090 " # rm -f outdisk\n"
23091 " # truncate -s 10G outdisk\n"
23096 #: ../resize/virt-resize.pod:115
23097 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23101 #: ../resize/virt-resize.pod:117
23104 " # lvcreate -L 10G -n lv_name vg_name\n"
23109 #: ../resize/virt-resize.pod:119
23110 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23114 #: ../resize/virt-resize.pod:121
23117 " # virsh pool-list\n"
23118 " # virsh vol-create-as poolname newvol 10G\n"
23123 #: ../resize/virt-resize.pod:124
23128 #: ../resize/virt-resize.pod:126
23130 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23131 "file) and the output disk. The output disk is the one created in the "
23136 #: ../resize/virt-resize.pod:130
23139 " # virt-resize indisk outdisk\n"
23144 #: ../resize/virt-resize.pod:132
23146 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23147 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23148 "larger, then an extra, empty partition is created at the end of the disk "
23149 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23154 #: ../resize/virt-resize.pod:138
23156 "More realistically you'd want to expand existing partitions in the disk "
23157 "image by passing extra options (for the full list see the L</OPTIONS> "
23162 #: ../resize/virt-resize.pod:142
23164 "L</--expand> is the most useful option. It expands the named partition "
23165 "within the disk to fill any extra space:"
23169 #: ../resize/virt-resize.pod:145
23172 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23177 #: ../resize/virt-resize.pod:147
23179 "(In this case, an extra partition is I<not> created at the end of the disk, "
23180 "because there will be no unused space)."
23184 #: ../resize/virt-resize.pod:150
23186 "L</--resize> is the other commonly used option. The following would "
23187 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23188 "rest of the available space:"
23192 #: ../resize/virt-resize.pod:154
23195 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23196 " indisk outdisk\n"
23201 #: ../resize/virt-resize.pod:157
23203 "If the expanded partition in the image contains a filesystem or LVM PV, then "
23204 "if virt-resize knows how, it will resize the contents, the equivalent of "
23205 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23206 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23207 "filesystems, so you would have to online resize them after booting the guest."
23211 #: ../resize/virt-resize.pod:164
23212 msgid "Other options are covered below."
23216 #: ../resize/virt-resize.pod:166
23221 #: ../resize/virt-resize.pod:168
23222 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23226 #: ../resize/virt-resize.pod:170
23227 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23231 #: ../resize/virt-resize.pod:172
23234 " # virsh edit guestname\n"
23239 #: ../resize/virt-resize.pod:174
23241 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
23242 "html#elementsDisks>"
23246 #: ../resize/virt-resize.pod:177
23247 msgid "Then start up the domain with the new, resized disk:"
23251 #: ../resize/virt-resize.pod:179
23254 " # virsh start guestname\n"
23259 #: ../resize/virt-resize.pod:181
23261 "and check that it still works. See also the L</NOTES> section below for "
23262 "additional information."
23266 #: ../resize/virt-resize.pod:184
23267 msgid "7. Resize LVs etc inside the guest"
23271 #: ../resize/virt-resize.pod:186
23272 msgid "(This can also be done offline using L<guestfish(1)>)"
23276 #: ../resize/virt-resize.pod:188
23278 "Once the guest has booted you should see the new space available, at least "
23279 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23280 "may need to resize LVs inside PVs, and also resize filesystem types that "
23281 "virt-resize does not know how to expand."
23285 #: ../resize/virt-resize.pod:195
23286 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23290 #: ../resize/virt-resize.pod:197
23292 "Shrinking is somewhat more complex than expanding, and only an overview is "
23297 #: ../resize/virt-resize.pod:200
23299 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23300 "filesystems). The user has to shrink content before passing the disk image "
23301 "to virt-resize, and virt-resize will check that the content has been shrunk "
23306 #: ../resize/virt-resize.pod:205
23307 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23311 #: ../resize/virt-resize.pod:207
23313 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23314 "steps 3 and 4 above to allocate a new disk image."
23318 #: ../resize/virt-resize.pod:210
23320 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23324 #: ../resize/virt-resize.pod:213
23325 msgid "IGNORING OR DELETING PARTITIONS"
23329 #: ../resize/virt-resize.pod:215
23331 "virt-resize also gives a convenient way to ignore or delete partitions when "
23332 "copying from the input disk to the output disk. Ignoring a partition speeds "
23333 "up the copy where you don't care about the existing contents of a "
23334 "partition. Deleting a partition removes it completely, but note that it "
23335 "also renumbers any partitions after the one which is deleted, which can "
23336 "leave some guests unbootable."
23340 #: ../resize/virt-resize.pod:222
23341 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23345 #: ../resize/virt-resize.pod:224
23347 "If the input disk is in qcow2 format, then you may prefer that the output is "
23348 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23349 "the fly. The output format is simply determined by the format of the empty "
23350 "output container that you provide. Thus to create qcow2 output, use:"
23354 #: ../resize/virt-resize.pod:230
23357 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23362 #: ../resize/virt-resize.pod:232
23363 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23367 #: ../resize/virt-resize.pod:234
23368 msgid "Similarly, to get non-sparse raw output use:"
23372 #: ../resize/virt-resize.pod:236
23375 " fallocate -l size outdisk\n"
23380 #: ../resize/virt-resize.pod:238
23382 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
23383 "dev/zero of=outdisk bs=1M count=..>)"
23387 #: ../resize/virt-resize.pod:241
23388 msgid "LOGICAL PARTITIONS"
23392 #: ../resize/virt-resize.pod:243
23394 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23395 "tables) cannot be resized."
23399 #: ../resize/virt-resize.pod:246
23401 "To understand what is going on, firstly one of the four partitions C</dev/"
23402 "sda1-4> will have MBR partition type C<05> or C<0f>. This is called the "
23403 "B<extended partition>. Use L<virt-filesystems(1)> to see the MBR partition "
23408 #: ../resize/virt-resize.pod:251
23409 msgid "Logical partitions live inside the extended partition."
23413 #: ../resize/virt-resize.pod:253
23415 "The extended partition can be expanded, but not shrunk (unless you force it, "
23416 "which is not advisable). When the extended partition is copied across, all "
23417 "the logical partitions contained inside are copied over implicitly. Virt-"
23418 "resize does not look inside the extended partition, so it copies the logical "
23419 "partitions blindly."
23423 #: ../resize/virt-resize.pod:259
23425 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
23426 "line. Doing so will give an error."
23430 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23431 msgid "Display help."
23435 #: ../resize/virt-resize.pod:270
23436 msgid "B<--align-first auto>"
23440 #: ../resize/virt-resize.pod:272
23441 msgid "B<--align-first never>"
23445 #: ../resize/virt-resize.pod:274
23446 msgid "B<--align-first always>"
23450 #: ../resize/virt-resize.pod:276
23452 "Align the first partition for improved performance (see also the I<--"
23453 "alignment> option)."
23457 #: ../resize/virt-resize.pod:279
23459 "The default is I<--align-first auto> which only aligns the first partition "
23460 "if it is safe to do so. That is, only when we know how to fix the "
23461 "bootloader automatically, and at the moment that can only be done for "
23466 #: ../resize/virt-resize.pod:284
23468 "I<--align-first never> means we never move the first partition. This is the "
23469 "safest option. Try this if the guest does not boot after resizing."
23473 #: ../resize/virt-resize.pod:288
23475 "I<--align-first always> means we always align the first partition (if it "
23476 "needs to be aligned). For some guests this will break the bootloader, "
23477 "making the guest unbootable."
23481 #: ../resize/virt-resize.pod:292
23482 msgid "B<--alignment N>"
23486 #: ../resize/virt-resize.pod:294
23488 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
23489 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
23493 #: ../resize/virt-resize.pod:298
23495 "Assuming 512 byte sector size inside the guest, here are some suitable "
23500 #: ../resize/virt-resize.pod:303
23501 msgid "I<--alignment 1> (512 bytes)"
23505 #: ../resize/virt-resize.pod:305
23507 "The partitions would be packed together as closely as possible, but would be "
23508 "completely unaligned. In some cases this can cause very poor performance. "
23509 "See L<virt-alignment-scan(1)> for further details."
23513 #: ../resize/virt-resize.pod:309
23514 msgid "I<--alignment 8> (4K)"
23518 #: ../resize/virt-resize.pod:311
23520 "This would be the minimum acceptable alignment for reasonable performance on "
23525 #: ../resize/virt-resize.pod:314
23526 msgid "I<--alignment 128> (64K)"
23530 #: ../resize/virt-resize.pod:316
23532 "This alignment provides good performance when the host is using high end "
23537 #: ../resize/virt-resize.pod:319
23538 msgid "I<--alignment 2048> (1M)"
23542 #: ../resize/virt-resize.pod:321
23544 "This is the standard alignment used by all newly installed guests since "
23549 #: ../resize/virt-resize.pod:326
23554 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177
23555 #: ../tools/virt-win-reg.pl:120
23560 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
23561 msgid "Enable debugging messages."
23565 #: ../resize/virt-resize.pod:332
23566 msgid "B<--delete part>"
23570 #: ../resize/virt-resize.pod:334
23572 "Delete the named partition. It would be more accurate to describe this as "
23573 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
23574 "the original disk image is left intact."
23578 #: ../resize/virt-resize.pod:338
23580 "Note that when you delete a partition, then anything contained in the "
23581 "partition is also deleted. Furthermore, this causes any partitions that "
23582 "come after to be I<renumbered>, which can easily make your guest unbootable."
23586 #: ../resize/virt-resize.pod:343 ../resize/virt-resize.pod:404
23587 #: ../resize/virt-resize.pod:531 ../sparsify/virt-sparsify.pod:145
23588 msgid "You can give this option multiple times."
23592 #: ../resize/virt-resize.pod:345
23593 msgid "B<--expand part>"
23597 #: ../resize/virt-resize.pod:347
23599 "Expand the named partition so it uses up all extra space (space left over "
23600 "after any other resize changes that you request have been done)."
23604 #: ../resize/virt-resize.pod:350
23606 "If virt-resize knows how, it will expand the direct content of the "
23607 "partition. For example, if the partition is an LVM PV, it will expand the "
23608 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
23609 "content it doesn't know about alone."
23613 #: ../resize/virt-resize.pod:355
23614 msgid "Currently virt-resize can resize:"
23618 #: ../resize/virt-resize.pod:361
23619 msgid "ext2, ext3 and ext4 filesystems."
23623 #: ../resize/virt-resize.pod:365
23624 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
23628 #: ../resize/virt-resize.pod:367
23630 "The filesystem must have been shut down consistently last time it was used. "
23631 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
23632 "consistency check, so at the first boot after resizing Windows will check "
23637 #: ../resize/virt-resize.pod:374
23639 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
23640 "inside the PV, but see the I<--LV-expand> option. The user could also "
23641 "resize LVs as desired after boot."
23645 #: ../resize/virt-resize.pod:380
23646 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
23650 #: ../resize/virt-resize.pod:384 ../resize/virt-resize.pod:559
23651 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
23655 #: ../resize/virt-resize.pod:386 ../sparsify/virt-sparsify.pod:125
23656 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92
23657 #: ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
23658 msgid "B<--format> raw"
23662 #: ../resize/virt-resize.pod:388 ../sparsify/virt-sparsify.pod:129
23664 "Specify the format of the input disk image. If this flag is not given then "
23665 "it is auto-detected from the image itself."
23669 #: ../resize/virt-resize.pod:394
23671 "Note that this option I<does not> affect the output format. See L</QCOW2 "
23672 "AND NON-SPARSE RAW FORMATS>."
23676 #: ../resize/virt-resize.pod:397
23677 msgid "B<--ignore part>"
23681 #: ../resize/virt-resize.pod:399
23683 "Ignore the named partition. Effectively this means the partition is "
23684 "allocated on the destination disk, but the content is not copied across from "
23685 "the source disk. The content of the partition will be blank (all zero "
23690 #: ../resize/virt-resize.pod:406
23691 msgid "B<--LV-expand logvol>"
23695 #: ../resize/virt-resize.pod:408
23697 "This takes the logical volume and, as a final step, expands it to fill all "
23698 "the space available in its volume group. A typical usage, assuming a Linux "
23699 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
23700 "lv_root> would be:"
23704 #: ../resize/virt-resize.pod:413
23707 " virt-resize indisk outdisk \\\n"
23708 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
23713 #: ../resize/virt-resize.pod:416
23715 "This would first expand the partition (and PV), and then expand the root "
23716 "device to fill the extra space in the PV."
23720 #: ../resize/virt-resize.pod:419
23722 "The contents of the LV are also resized if virt-resize knows how to do "
23723 "that. You can stop virt-resize from trying to expand the content by using "
23724 "the option I<--no-expand-content>."
23728 #: ../resize/virt-resize.pod:423
23729 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
23733 #: ../resize/virt-resize.pod:425
23735 "You can give this option multiple times, I<but> it doesn't make sense to do "
23736 "this unless the logical volumes you specify are all in different volume "
23741 #: ../resize/virt-resize.pod:429 ../sparsify/virt-sparsify.pod:147
23742 msgid "B<--machine-readable>"
23746 #: ../resize/virt-resize.pod:431 ../sparsify/virt-sparsify.pod:149
23748 "This option is used to make the output more machine friendly when being "
23749 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
23753 #: ../resize/virt-resize.pod:437
23754 msgid "B<--dryrun>"
23758 #: ../resize/virt-resize.pod:439
23759 msgid "Print a summary of what would be done, but don't do anything."
23763 #: ../resize/virt-resize.pod:441
23764 msgid "B<--no-copy-boot-loader>"
23768 #: ../resize/virt-resize.pod:443
23770 "By default, virt-resize copies over some sectors at the start of the disk "
23771 "(up to the beginning of the first partition). Commonly these sectors "
23772 "contain the Master Boot Record (MBR) and the boot loader, and are required "
23773 "in order for the guest to boot correctly."
23777 #: ../resize/virt-resize.pod:448
23779 "If you specify this flag, then this initial copy is not done. You may need "
23780 "to reinstall the boot loader in this case."
23784 #: ../resize/virt-resize.pod:451
23785 msgid "B<--no-extra-partition>"
23789 #: ../resize/virt-resize.pod:453
23791 "By default, virt-resize creates an extra partition if there is any extra, "
23792 "unused space after all resizing has happened. Use this option to prevent "
23793 "the extra partition from being created. If you do this then the extra space "
23794 "will be inaccessible until you run fdisk, parted, or some other partitioning "
23795 "tool in the guest."
23799 #: ../resize/virt-resize.pod:459
23801 "Note that if the surplus space is smaller than 10 MB, no extra partition "
23806 #: ../resize/virt-resize.pod:462
23807 msgid "B<--no-expand-content>"
23811 #: ../resize/virt-resize.pod:464
23813 "By default, virt-resize will try to expand the direct contents of "
23814 "partitions, if it knows how (see I<--expand> option above)."
23818 #: ../resize/virt-resize.pod:467
23820 "If you give the I<--no-expand-content> option then virt-resize will not "
23825 #: ../resize/virt-resize.pod:470
23826 msgid "B<--ntfsresize-force>"
23830 #: ../resize/virt-resize.pod:472
23832 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
23833 "the NTFS disk is marked as needing a consistency check. You have to use "
23834 "this option if you want to resize a Windows guest multiple times without "
23835 "booting into Windows between each resize."
23839 #: ../resize/virt-resize.pod:478
23840 msgid "B<--output-format> raw"
23844 #: ../resize/virt-resize.pod:480
23846 "Specify the format of the output disk image. If this flag is not given then "
23847 "it is auto-detected from the image itself."
23851 #: ../resize/virt-resize.pod:486
23853 "Note that this option I<does not create> the output format. This option "
23854 "just tells libguestfs what it is so it doesn't try to guess it. You still "
23855 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
23856 "SPARSE RAW FORMATS>."
23860 #: ../resize/virt-resize.pod:495
23861 msgid "Don't print the summary."
23865 #: ../resize/virt-resize.pod:497
23866 msgid "B<--resize part=size>"
23870 #: ../resize/virt-resize.pod:499
23872 "Resize the named partition (expanding or shrinking it) so that it has the "
23877 #: ../resize/virt-resize.pod:502
23879 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
23880 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
23881 "size; or as a relative number or percentage. For example:"
23885 #: ../resize/virt-resize.pod:508
23888 " --resize /dev/sda2=10G\n"
23893 #: ../resize/virt-resize.pod:510
23896 " --resize /dev/sda4=90%\n"
23901 #: ../resize/virt-resize.pod:512
23904 " --resize /dev/sda2=+1G\n"
23909 #: ../resize/virt-resize.pod:514
23912 " --resize /dev/sda2=-200M\n"
23917 #: ../resize/virt-resize.pod:516
23920 " --resize /dev/sda1=+128K\n"
23925 #: ../resize/virt-resize.pod:518
23928 " --resize /dev/sda1=+10%\n"
23933 #: ../resize/virt-resize.pod:520
23936 " --resize /dev/sda1=-10%\n"
23941 #: ../resize/virt-resize.pod:522
23943 "You can increase the size of any partition. Virt-resize will expand the "
23944 "direct content of the partition if it knows how (see I<--expand> below)."
23948 #: ../resize/virt-resize.pod:526
23950 "You can only I<decrease> the size of partitions that contain filesystems or "
23951 "PVs which have already been shrunk. Virt-resize will check this has been "
23952 "done before proceeding, or else will print an error (see also I<--resize-"
23957 #: ../resize/virt-resize.pod:533
23958 msgid "B<--resize-force part=size>"
23962 #: ../resize/virt-resize.pod:535
23964 "This is the same as I<--resize> except that it will let you decrease the "
23965 "size of any partition. Generally this means you will lose any data which "
23966 "was at the end of the partition you shrink, but you may not care about that "
23967 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
23968 "as a swap partition)."
23972 #: ../resize/virt-resize.pod:541
23973 msgid "See also the I<--ignore> option."
23977 #: ../resize/virt-resize.pod:543
23978 msgid "B<--shrink part>"
23982 #: ../resize/virt-resize.pod:545
23984 "Shrink the named partition until the overall disk image fits in the "
23985 "destination. The named partition B<must> contain a filesystem or PV which "
23986 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
23987 "online tools). Virt-resize will check this and give an error if it has not "
23992 #: ../resize/virt-resize.pod:551
23994 "The amount by which the overall disk must be shrunk (after carrying out all "
23995 "other operations requested by the user) is called the \"deficit\". For "
23996 "example, a straight copy (assume no other operations) from a 5GB disk image "
23997 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
23998 "would give an error unless the user specified a partition to shrink and that "
23999 "partition had more than a gigabyte of free space."
24003 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:177
24004 msgid "MACHINE READABLE OUTPUT"
24008 #: ../resize/virt-resize.pod:571
24010 "The I<--machine-readable> option can be used to make the output more machine "
24011 "friendly, which is useful when calling virt-resize from other programs, GUIs "
24016 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:183
24017 msgid "There are two ways to use this option."
24021 #: ../resize/virt-resize.pod:577
24023 "Firstly use the option on its own to query the capabilities of the virt-"
24024 "resize binary. Typical output looks like this:"
24028 #: ../resize/virt-resize.pod:580
24031 " $ virt-resize --machine-readable\n"
24033 " ntfsresize-force\n"
24041 #: ../resize/virt-resize.pod:587 ../sparsify/virt-sparsify.pod:193
24043 "A list of features is printed, one per line, and the program exits with "
24048 #: ../resize/virt-resize.pod:590 ../sparsify/virt-sparsify.pod:196
24050 "Secondly use the option in conjunction with other options to make the "
24051 "regular program output more machine friendly."
24055 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:199
24056 msgid "At the moment this means:"
24060 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:205
24062 "Progress bar messages can be parsed from stdout by looking for this regular "
24067 #: ../resize/virt-resize.pod:602 ../sparsify/virt-sparsify.pod:208
24070 " ^[0-9]+/[0-9]+$\n"
24075 #: ../resize/virt-resize.pod:606 ../sparsify/virt-sparsify.pod:212
24077 "The calling program should treat messages sent to stdout (except for "
24078 "progress bar messages) as status messages. They can be logged and/or "
24079 "displayed to the user."
24083 #: ../resize/virt-resize.pod:612
24085 "The calling program should treat messages sent to stderr as error messages. "
24086 "In addition, virt-resize exits with a non-zero status code if there was a "
24091 #: ../resize/virt-resize.pod:618
24093 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
24094 "readable> option and will return an error."
24098 #: ../resize/virt-resize.pod:623
24099 msgid "\"Partition 1 does not end on cylinder boundary.\""
24103 #: ../resize/virt-resize.pod:625
24105 "Virt-resize aligns partitions to multiples of 128 sectors (see the I<--"
24106 "alignment> parameter). Usually this means the partitions will not be "
24107 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24108 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
24109 "drives. Alignment of partitions to cylinders is not required by any modern "
24110 "operating system."
24114 #: ../resize/virt-resize.pod:632
24115 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24119 #: ../resize/virt-resize.pod:634
24121 "In Windows Vista and later versions, Microsoft switched to using a separate "
24122 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24123 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24124 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24125 "the second partition (ie. C: drive) should work."
24129 #: ../resize/virt-resize.pod:641
24131 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24132 "NTFS partitions have been expanded. This is just a safety check and (unless "
24133 "it find errors) is nothing to worry about."
24137 #: ../resize/virt-resize.pod:645
24138 msgid "GUEST BOOT STUCK AT \"GRUB\""
24142 #: ../resize/virt-resize.pod:647
24144 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24145 "printing C<GRUB> on the console, try reinstalling grub."
24149 #: ../resize/virt-resize.pod:650
24152 " guestfish -i -a newdisk\n"
24153 " ><fs> cat /boot/grub/device.map\n"
24154 " # check the contents of this file are sensible or\n"
24155 " # edit the file if necessary\n"
24156 " ><fs> grub-install / /dev/vda\n"
24162 #: ../resize/virt-resize.pod:657
24164 "For more flexible guest reconfiguration, including if you need to specify "
24165 "other parameters to grub-install, use L<virt-rescue(1)>."
24169 #: ../resize/virt-resize.pod:660
24170 msgid "ALTERNATIVE TOOLS"
24174 #: ../resize/virt-resize.pod:662
24176 "There are several proprietary tools for resizing partitions. We won't "
24177 "mention any here."
24181 #: ../resize/virt-resize.pod:665
24183 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24184 "operations on disk images. They can resize and move partitions, but I don't "
24185 "think they can do anything with the contents, and they certainly don't "
24190 #: ../resize/virt-resize.pod:670
24192 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24193 "but at a much lower level. You will probably end up hand-calculating sector "
24194 "offsets, which is something that virt-resize was designed to avoid. If you "
24195 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24200 #: ../resize/virt-resize.pod:690
24202 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
24203 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
24204 "L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, "
24205 "L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<virt-sparsify(1)>, "
24206 "L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24210 #: ../ruby/examples/guestfs-ruby.pod:5
24211 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24215 #: ../ruby/examples/guestfs-ruby.pod:9
24218 " require 'guestfs'\n"
24219 " g = Guestfs::Guestfs.new()\n"
24220 " g.add_drive_opts(\"disk.img\",\n"
24221 " :readonly => 1, :format => \"raw\")\n"
24227 #: ../ruby/examples/guestfs-ruby.pod:17
24229 "This manual page documents how to call libguestfs from the Ruby programming "
24230 "language. This page just documents the differences from the C API and gives "
24231 "some examples. If you are not familiar with using libguestfs, you also need "
24232 "to read L<guestfs(3)>."
24236 #: ../ruby/examples/guestfs-ruby.pod:24
24238 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24239 "This has a single parameter which is the error message (a string)."
24243 #: ../ruby/examples/guestfs-ruby.pod:38
24245 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
24246 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
24247 "L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24251 #: ../sparsify/virt-sparsify.pod:5
24252 msgid "virt-sparsify - Make a virtual machine disk sparse"
24256 #: ../sparsify/virt-sparsify.pod:9
24259 " virt-sparsify [--options] indisk outdisk\n"
24264 #: ../sparsify/virt-sparsify.pod:13
24266 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24267 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24268 "the disk image can be converted back to free space on the host."
24272 #: ../sparsify/virt-sparsify.pod:18
24274 "Virt-sparsify can locate and sparsify free space in most filesystems (eg. "
24275 "ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24279 #: ../sparsify/virt-sparsify.pod:21
24281 "Virt-sparsify can also convert between some disk formats, for example "
24282 "converting a raw disk image to a thin-provisioned qcow2 image."
24286 #: ../sparsify/virt-sparsify.pod:24
24288 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24289 "machines. If a virtual machine has more than one attached disk, you must "
24290 "sparsify each one separately."
24294 #: ../sparsify/virt-sparsify.pod:28
24295 msgid "IMPORTANT LIMITATIONS"
24299 #: ../sparsify/virt-sparsify.pod:34
24301 "Virt-sparsify does not do in-place modifications. It copies from a source "
24302 "image to a destination image, leaving the source unchanged. I<Check that "
24303 "the sparsification was successful before deleting the source image>."
24307 #: ../sparsify/virt-sparsify.pod:41
24308 msgid "The virtual machine I<must be shut down> before using this tool."
24312 #: ../sparsify/virt-sparsify.pod:45
24314 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24315 "(1 temporary copy + 1 destination image). This is in the worst case and "
24316 "usually much less space is required."
24320 #: ../sparsify/virt-sparsify.pod:51
24322 "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24326 #: ../sparsify/virt-sparsify.pod:56
24327 msgid "Virt-sparsify cannot handle encrypted disks."
24331 #: ../sparsify/virt-sparsify.pod:60
24333 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24334 "this space is often used for critical items like bootloaders so it's not "
24339 #: ../sparsify/virt-sparsify.pod:66
24341 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24342 "to do this unless we can be sure there is no hibernation data, so at the "
24343 "moment swap partitions are ignored."
24347 #: ../sparsify/virt-sparsify.pod:72
24349 "You may also want to read the manual pages for the associated tools L<virt-"
24350 "filesystems(1)> and L<virt-df(1)> before starting."
24354 #: ../sparsify/virt-sparsify.pod:77
24355 msgid "Typical usage is:"
24359 #: ../sparsify/virt-sparsify.pod:79
24362 " virt-sparsify indisk outdisk\n"
24367 #: ../sparsify/virt-sparsify.pod:81
24369 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24370 "is created, or overwritten if it already exists. The format of the input "
24371 "disk is detected (eg. qcow2) and the same format is used for the output disk."
24375 #: ../sparsify/virt-sparsify.pod:86
24376 msgid "To convert between formats, use the I<--convert> option:"
24380 #: ../sparsify/virt-sparsify.pod:88
24383 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24388 #: ../sparsify/virt-sparsify.pod:90
24390 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24391 "can find within the source disk image. You can get it to ignore (don't zero "
24392 "free space on) certain filesystems by doing:"
24396 #: ../sparsify/virt-sparsify.pod:94
24399 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24404 #: ../sparsify/virt-sparsify.pod:96
24406 "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24410 #: ../sparsify/virt-sparsify.pod:107
24411 msgid "B<--convert> raw"
24415 #: ../sparsify/virt-sparsify.pod:109
24416 msgid "B<--convert> qcow2"
24420 #: ../sparsify/virt-sparsify.pod:111
24421 msgid "B<--convert> [other formats]"
24425 #: ../sparsify/virt-sparsify.pod:113
24427 "Use C<output-format> as the format for the destination image. If this is "
24428 "not specified, then the input format is used."
24432 #: ../sparsify/virt-sparsify.pod:116
24433 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>."
24437 #: ../sparsify/virt-sparsify.pod:118
24439 "You can also use any format supported by the L<qemu-img(1)> program, eg. "
24440 "C<vdi> or C<vmdk>, but support for other formats is reliant on qemu."
24444 #: ../sparsify/virt-sparsify.pod:122
24446 "Specifying the I<--convert> option is usually a good idea, because then virt-"
24447 "sparsify doesn't need to try to guess the input format."
24451 #: ../sparsify/virt-sparsify.pod:127
24452 msgid "B<--format> qcow2"
24456 #: ../sparsify/virt-sparsify.pod:135
24457 msgid "B<--ignore> filesystem"
24461 #: ../sparsify/virt-sparsify.pod:137
24462 msgid "B<--ignore> volgroup"
24466 #: ../sparsify/virt-sparsify.pod:139
24468 "Ignore the named filesystem. Free space on the filesystem will not be "
24469 "zeroed, but existing blocks of zeroes will still be sparsified."
24473 #: ../sparsify/virt-sparsify.pod:142
24475 "In the second form, this ignores the named volume group. Use the volume "
24476 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24480 #: ../sparsify/virt-sparsify.pod:157
24481 msgid "This disables progress bars and other unnecessary output."
24485 #: ../sparsify/virt-sparsify.pod:179
24487 "The I<--machine-readable> option can be used to make the output more machine "
24488 "friendly, which is useful when calling virt-sparsify from other programs, "
24493 #: ../sparsify/virt-sparsify.pod:185
24495 "Firstly use the option on its own to query the capabilities of the virt-"
24496 "sparsify binary. Typical output looks like this:"
24500 #: ../sparsify/virt-sparsify.pod:188
24503 " $ virt-sparsify --machine-readable\n"
24511 #: ../sparsify/virt-sparsify.pod:218
24513 "The calling program should treat messages sent to stderr as error messages. "
24514 "In addition, virt-sparsify exits with a non-zero status code if there was a "
24519 #: ../sparsify/virt-sparsify.pod:224
24521 "All versions of virt-sparsify have supported the I<--machine-readable> "
24526 #: ../sparsify/virt-sparsify.pod:238
24528 "Location of the temporary directory used for the potentially large temporary "
24533 #: ../sparsify/virt-sparsify.pod:241
24535 "You should ensure there is enough free space in the worst case for a full "
24536 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24537 "to another directory that has enough space."
24541 #: ../sparsify/virt-sparsify.pod:245
24542 msgid "This defaults to C</tmp>."
24546 #: ../sparsify/virt-sparsify.pod:249
24548 "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24552 #: ../sparsify/virt-sparsify.pod:253
24554 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
24555 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, L<qemu-img"
24556 "(1)>, L<http://libguestfs.org/>."
24560 #: ../src/guestfs-actions.pod:1
24561 msgid "guestfs_add_cdrom"
24565 #: ../src/guestfs-actions.pod:3
24569 " guestfs_add_cdrom (guestfs_h *g,\n"
24570 " const char *filename);\n"
24575 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302
24576 #: ../src/guestfs-actions.pod:323
24578 "I<This function is deprecated.> In new code, use the L</"
24579 "guestfs_add_drive_opts> call instead."
24583 #: ../src/guestfs-actions.pod:24
24585 "This call checks for the existence of C<filename>. This stops you from "
24586 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24587 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
24592 #: ../src/guestfs-actions.pod:31
24594 "If you just want to add an ISO file (often you use this as an efficient way "
24595 "to transfer large files into the guest), then you should probably use "
24596 "C<guestfs_add_drive_ro> instead."
24600 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:187
24601 #: ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:291
24602 #: ../src/guestfs-actions.pod:312 ../src/guestfs-actions.pod:333
24603 #: ../src/guestfs-actions.pod:346 ../src/guestfs-actions.pod:360
24604 #: ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:500
24605 #: ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:559
24606 #: ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:605
24607 #: ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:705
24608 #: ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:734
24609 #: ../src/guestfs-actions.pod:833 ../src/guestfs-actions.pod:851
24610 #: ../src/guestfs-actions.pod:865 ../src/guestfs-actions.pod:879
24611 #: ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:1099
24612 #: ../src/guestfs-actions.pod:1119 ../src/guestfs-actions.pod:1137
24613 #: ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:1286
24614 #: ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:1372
24615 #: ../src/guestfs-actions.pod:1423 ../src/guestfs-actions.pod:1474
24616 #: ../src/guestfs-actions.pod:1530 ../src/guestfs-actions.pod:1582
24617 #: ../src/guestfs-actions.pod:1601 ../src/guestfs-actions.pod:1615
24618 #: ../src/guestfs-actions.pod:1643 ../src/guestfs-actions.pod:1713
24619 #: ../src/guestfs-actions.pod:1744 ../src/guestfs-actions.pod:1769
24620 #: ../src/guestfs-actions.pod:1811 ../src/guestfs-actions.pod:1924
24621 #: ../src/guestfs-actions.pod:1951 ../src/guestfs-actions.pod:2166
24622 #: ../src/guestfs-actions.pod:2188 ../src/guestfs-actions.pod:2275
24623 #: ../src/guestfs-actions.pod:2783 ../src/guestfs-actions.pod:2927
24624 #: ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3023
24625 #: ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4095
24626 #: ../src/guestfs-actions.pod:4120 ../src/guestfs-actions.pod:4309
24627 #: ../src/guestfs-actions.pod:4323 ../src/guestfs-actions.pod:4336
24628 #: ../src/guestfs-actions.pod:4350 ../src/guestfs-actions.pod:4365
24629 #: ../src/guestfs-actions.pod:4401 ../src/guestfs-actions.pod:4473
24630 #: ../src/guestfs-actions.pod:4493 ../src/guestfs-actions.pod:4510
24631 #: ../src/guestfs-actions.pod:4533 ../src/guestfs-actions.pod:4556
24632 #: ../src/guestfs-actions.pod:4591 ../src/guestfs-actions.pod:4610
24633 #: ../src/guestfs-actions.pod:4629 ../src/guestfs-actions.pod:4664
24634 #: ../src/guestfs-actions.pod:4676 ../src/guestfs-actions.pod:4712
24635 #: ../src/guestfs-actions.pod:4728 ../src/guestfs-actions.pod:4741
24636 #: ../src/guestfs-actions.pod:4756 ../src/guestfs-actions.pod:4773
24637 #: ../src/guestfs-actions.pod:4866 ../src/guestfs-actions.pod:4886
24638 #: ../src/guestfs-actions.pod:4899 ../src/guestfs-actions.pod:4950
24639 #: ../src/guestfs-actions.pod:4968 ../src/guestfs-actions.pod:4986
24640 #: ../src/guestfs-actions.pod:5002 ../src/guestfs-actions.pod:5016
24641 #: ../src/guestfs-actions.pod:5030 ../src/guestfs-actions.pod:5047
24642 #: ../src/guestfs-actions.pod:5062 ../src/guestfs-actions.pod:5089
24643 #: ../src/guestfs-actions.pod:5152 ../src/guestfs-actions.pod:5225
24644 #: ../src/guestfs-actions.pod:5256 ../src/guestfs-actions.pod:5275
24645 #: ../src/guestfs-actions.pod:5294 ../src/guestfs-actions.pod:5306
24646 #: ../src/guestfs-actions.pod:5323 ../src/guestfs-actions.pod:5336
24647 #: ../src/guestfs-actions.pod:5351 ../src/guestfs-actions.pod:5366
24648 #: ../src/guestfs-actions.pod:5398 ../src/guestfs-actions.pod:5424
24649 #: ../src/guestfs-actions.pod:5463 ../src/guestfs-actions.pod:5483
24650 #: ../src/guestfs-actions.pod:5497 ../src/guestfs-actions.pod:5514
24651 #: ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:5616
24652 #: ../src/guestfs-actions.pod:5663 ../src/guestfs-actions.pod:5706
24653 #: ../src/guestfs-actions.pod:5734 ../src/guestfs-actions.pod:5751
24654 #: ../src/guestfs-actions.pod:5769 ../src/guestfs-actions.pod:5909
24655 #: ../src/guestfs-actions.pod:5966 ../src/guestfs-actions.pod:5988
24656 #: ../src/guestfs-actions.pod:6006 ../src/guestfs-actions.pod:6056
24657 #: ../src/guestfs-actions.pod:6122 ../src/guestfs-actions.pod:6139
24658 #: ../src/guestfs-actions.pod:6152 ../src/guestfs-actions.pod:6166
24659 #: ../src/guestfs-actions.pod:6455 ../src/guestfs-actions.pod:6474
24660 #: ../src/guestfs-actions.pod:6493 ../src/guestfs-actions.pod:6507
24661 #: ../src/guestfs-actions.pod:6519 ../src/guestfs-actions.pod:6533
24662 #: ../src/guestfs-actions.pod:6545 ../src/guestfs-actions.pod:6559
24663 #: ../src/guestfs-actions.pod:6575 ../src/guestfs-actions.pod:6596
24664 #: ../src/guestfs-actions.pod:6615 ../src/guestfs-actions.pod:6634
24665 #: ../src/guestfs-actions.pod:6664 ../src/guestfs-actions.pod:6682
24666 #: ../src/guestfs-actions.pod:6705 ../src/guestfs-actions.pod:6723
24667 #: ../src/guestfs-actions.pod:6742 ../src/guestfs-actions.pod:6763
24668 #: ../src/guestfs-actions.pod:6782 ../src/guestfs-actions.pod:6799
24669 #: ../src/guestfs-actions.pod:6818 ../src/guestfs-actions.pod:6846
24670 #: ../src/guestfs-actions.pod:6870 ../src/guestfs-actions.pod:6889
24671 #: ../src/guestfs-actions.pod:6905 ../src/guestfs-actions.pod:6929
24672 #: ../src/guestfs-actions.pod:6948 ../src/guestfs-actions.pod:6963
24673 #: ../src/guestfs-actions.pod:6982 ../src/guestfs-actions.pod:7026
24674 #: ../src/guestfs-actions.pod:7056 ../src/guestfs-actions.pod:7089
24675 #: ../src/guestfs-actions.pod:7204 ../src/guestfs-actions.pod:7325
24676 #: ../src/guestfs-actions.pod:7337 ../src/guestfs-actions.pod:7350
24677 #: ../src/guestfs-actions.pod:7363 ../src/guestfs-actions.pod:7385
24678 #: ../src/guestfs-actions.pod:7398 ../src/guestfs-actions.pod:7411
24679 #: ../src/guestfs-actions.pod:7424 ../src/guestfs-actions.pod:7439
24680 #: ../src/guestfs-actions.pod:7498 ../src/guestfs-actions.pod:7515
24681 #: ../src/guestfs-actions.pod:7531 ../src/guestfs-actions.pod:7547
24682 #: ../src/guestfs-actions.pod:7564 ../src/guestfs-actions.pod:7577
24683 #: ../src/guestfs-actions.pod:7597 ../src/guestfs-actions.pod:7633
24684 #: ../src/guestfs-actions.pod:7647 ../src/guestfs-actions.pod:7688
24685 #: ../src/guestfs-actions.pod:7701 ../src/guestfs-actions.pod:7719
24686 #: ../src/guestfs-actions.pod:7753 ../src/guestfs-actions.pod:7789
24687 #: ../src/guestfs-actions.pod:7905 ../src/guestfs-actions.pod:7920
24688 #: ../src/guestfs-actions.pod:7934 ../src/guestfs-actions.pod:7989
24689 #: ../src/guestfs-actions.pod:8002 ../src/guestfs-actions.pod:8047
24690 #: ../src/guestfs-actions.pod:8087 ../src/guestfs-actions.pod:8143
24691 #: ../src/guestfs-actions.pod:8163 ../src/guestfs-actions.pod:8196
24692 #: ../src/guestfs-actions.pod:8260 ../src/guestfs-actions.pod:8283
24693 #: ../src/guestfs-actions.pod:8312
24694 msgid "This function returns 0 on success or -1 on error."
24698 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189
24699 #: ../src/guestfs-actions.pod:1334 ../src/guestfs-actions.pod:2389
24700 #: ../src/guestfs-actions.pod:2487 ../src/guestfs-actions.pod:2612
24701 #: ../src/guestfs-actions.pod:4082 ../src/guestfs-actions.pod:4102
24702 #: ../src/guestfs-actions.pod:5400 ../src/guestfs-actions.pod:6684
24703 #: ../src/guestfs-actions.pod:6801 ../src/guestfs-actions.pod:6950
24704 #: ../src/guestfs-actions.pod:7441 ../src/guestfs-actions.pod:7566
24705 #: ../src/guestfs-actions.pod:8089
24706 msgid "(Added in 0.3)"
24710 #: ../src/guestfs-actions.pod:41
24711 msgid "guestfs_add_domain"
24715 #: ../src/guestfs-actions.pod:43
24719 " guestfs_add_domain (guestfs_h *g,\n"
24720 " const char *dom,\n"
24726 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198
24727 #: ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:1214
24728 #: ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1344
24729 #: ../src/guestfs-actions.pod:1411 ../src/guestfs-actions.pod:1462
24730 #: ../src/guestfs-actions.pod:1513 ../src/guestfs-actions.pod:3280
24731 #: ../src/guestfs-actions.pod:5101 ../src/guestfs-actions.pod:5410
24732 #: ../src/guestfs-actions.pod:5627
24734 "You may supply a list of optional arguments to this call. Use zero or more "
24735 "of the following pairs of parameters, and terminate the list with C<-1> on "
24736 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
24740 #: ../src/guestfs-actions.pod:53
24743 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
24744 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
24745 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
24746 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
24747 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
24748 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
24753 #: ../src/guestfs-actions.pod:60
24755 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24756 "It works by connecting to libvirt, requesting the domain and domain XML from "
24757 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
24762 #: ../src/guestfs-actions.pod:141
24764 "The other optional parameters are passed directly through to "
24765 "C<guestfs_add_drive_opts>."
24769 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403
24770 #: ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:751
24771 #: ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800
24772 #: ../src/guestfs-actions.pod:819 ../src/guestfs-actions.pod:1789
24773 #: ../src/guestfs-actions.pod:2145 ../src/guestfs-actions.pod:2348
24774 #: ../src/guestfs-actions.pod:2459 ../src/guestfs-actions.pod:2510
24775 #: ../src/guestfs-actions.pod:2562 ../src/guestfs-actions.pod:2576
24776 #: ../src/guestfs-actions.pod:2599 ../src/guestfs-actions.pod:2914
24777 #: ../src/guestfs-actions.pod:3398 ../src/guestfs-actions.pod:3416
24778 #: ../src/guestfs-actions.pod:5586 ../src/guestfs-actions.pod:5806
24779 #: ../src/guestfs-actions.pod:6044 ../src/guestfs-actions.pod:6236
24780 #: ../src/guestfs-actions.pod:6262 ../src/guestfs-actions.pod:7674
24781 #: ../src/guestfs-actions.pod:8100 ../src/guestfs-actions.pod:8113
24782 #: ../src/guestfs-actions.pod:8126
24783 msgid "On error this function returns -1."
24787 #: ../src/guestfs-actions.pod:146
24788 msgid "(Added in 1.7.4)"
24792 #: ../src/guestfs-actions.pod:148
24793 msgid "guestfs_add_domain_va"
24797 #: ../src/guestfs-actions.pod:150
24801 " guestfs_add_domain_va (guestfs_h *g,\n"
24802 " const char *dom,\n"
24803 " va_list args);\n"
24808 #: ../src/guestfs-actions.pod:155
24809 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
24813 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168
24814 #: ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278
24815 #: ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:940
24816 #: ../src/guestfs-actions.pod:1242 ../src/guestfs-actions.pod:1255
24817 #: ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1314
24818 #: ../src/guestfs-actions.pod:1389 ../src/guestfs-actions.pod:1401
24819 #: ../src/guestfs-actions.pod:1440 ../src/guestfs-actions.pod:1452
24820 #: ../src/guestfs-actions.pod:1491 ../src/guestfs-actions.pod:1503
24821 #: ../src/guestfs-actions.pod:1547 ../src/guestfs-actions.pod:1559
24822 #: ../src/guestfs-actions.pod:3364 ../src/guestfs-actions.pod:3376
24823 #: ../src/guestfs-actions.pod:5166 ../src/guestfs-actions.pod:5178
24824 #: ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5450
24825 #: ../src/guestfs-actions.pod:5676 ../src/guestfs-actions.pod:5687
24826 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
24830 #: ../src/guestfs-actions.pod:159
24831 msgid "guestfs_add_domain_argv"
24835 #: ../src/guestfs-actions.pod:161
24839 " guestfs_add_domain_argv (guestfs_h *g,\n"
24840 " const char *dom,\n"
24841 " const struct guestfs_add_domain_argv *optargs);\n"
24846 #: ../src/guestfs-actions.pod:166
24847 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
24851 #: ../src/guestfs-actions.pod:170
24852 msgid "guestfs_add_drive"
24856 #: ../src/guestfs-actions.pod:172
24860 " guestfs_add_drive (guestfs_h *g,\n"
24861 " const char *filename);\n"
24866 #: ../src/guestfs-actions.pod:176
24868 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
24869 "optional parameters, so the disk is added writable, with the format being "
24870 "detected automatically."
24874 #: ../src/guestfs-actions.pod:180
24876 "Automatic detection of the format opens you up to a potential security hole "
24877 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24878 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24879 "you should think about replacing calls to this function with calls to "
24880 "C<guestfs_add_drive_opts>, and specifying the format."
24884 #: ../src/guestfs-actions.pod:191
24885 msgid "guestfs_add_drive_opts"
24889 #: ../src/guestfs-actions.pod:193
24893 " guestfs_add_drive_opts (guestfs_h *g,\n"
24894 " const char *filename,\n"
24900 #: ../src/guestfs-actions.pod:203
24903 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
24904 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
24905 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
24906 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
24911 #: ../src/guestfs-actions.pod:233
24913 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
24914 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
24915 "Possible formats include C<raw> and C<qcow2>."
24919 #: ../src/guestfs-actions.pod:244
24921 "This rarely-used option lets you emulate the behaviour of the deprecated "
24922 "C<guestfs_add_drive_with_if> call (q.v.)"
24926 #: ../src/guestfs-actions.pod:256
24927 msgid "(Added in 1.5.23)"
24931 #: ../src/guestfs-actions.pod:258
24932 msgid "guestfs_add_drive_opts_va"
24936 #: ../src/guestfs-actions.pod:260
24940 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
24941 " const char *filename,\n"
24942 " va_list args);\n"
24947 #: ../src/guestfs-actions.pod:265
24948 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
24952 #: ../src/guestfs-actions.pod:269
24953 msgid "guestfs_add_drive_opts_argv"
24957 #: ../src/guestfs-actions.pod:271
24961 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
24962 " const char *filename,\n"
24963 " const struct guestfs_add_drive_opts_argv *optargs);\n"
24968 #: ../src/guestfs-actions.pod:276
24969 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
24973 #: ../src/guestfs-actions.pod:280
24974 msgid "guestfs_add_drive_ro"
24978 #: ../src/guestfs-actions.pod:282
24982 " guestfs_add_drive_ro (guestfs_h *g,\n"
24983 " const char *filename);\n"
24988 #: ../src/guestfs-actions.pod:286
24990 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
24991 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
24992 "disk is added read-only, with the format being detected automatically."
24996 #: ../src/guestfs-actions.pod:293
24997 msgid "(Added in 1.0.38)"
25001 #: ../src/guestfs-actions.pod:295
25002 msgid "guestfs_add_drive_ro_with_if"
25006 #: ../src/guestfs-actions.pod:297
25010 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
25011 " const char *filename,\n"
25012 " const char *iface);\n"
25017 #: ../src/guestfs-actions.pod:309
25019 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
25020 "QEMU interface emulation to use at run time."
25024 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335
25025 #: ../src/guestfs-actions.pod:2873
25026 msgid "(Added in 1.0.84)"
25030 #: ../src/guestfs-actions.pod:316
25031 msgid "guestfs_add_drive_with_if"
25035 #: ../src/guestfs-actions.pod:318
25039 " guestfs_add_drive_with_if (guestfs_h *g,\n"
25040 " const char *filename,\n"
25041 " const char *iface);\n"
25046 #: ../src/guestfs-actions.pod:330
25048 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
25049 "QEMU interface emulation to use at run time."
25053 #: ../src/guestfs-actions.pod:337
25054 msgid "guestfs_aug_clear"
25058 #: ../src/guestfs-actions.pod:339
25062 " guestfs_aug_clear (guestfs_h *g,\n"
25063 " const char *augpath);\n"
25068 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2601
25069 msgid "(Added in 1.3.4)"
25073 #: ../src/guestfs-actions.pod:350
25074 msgid "guestfs_aug_close"
25078 #: ../src/guestfs-actions.pod:352
25082 " guestfs_aug_close (guestfs_h *g);\n"
25087 #: ../src/guestfs-actions.pod:355
25089 "Close the current Augeas handle and free up any resources used by it. After "
25090 "calling this, you have to call C<guestfs_aug_init> again before you can use "
25091 "any other Augeas functions."
25095 #: ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:387
25096 #: ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:419
25097 #: ../src/guestfs-actions.pod:482 ../src/guestfs-actions.pod:502
25098 #: ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:547
25099 #: ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:575
25100 #: ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:607
25101 #: ../src/guestfs-actions.pod:6313
25102 msgid "(Added in 0.7)"
25106 #: ../src/guestfs-actions.pod:364
25107 msgid "guestfs_aug_defnode"
25111 #: ../src/guestfs-actions.pod:366
25114 " struct guestfs_int_bool *\n"
25115 " guestfs_aug_defnode (guestfs_h *g,\n"
25116 " const char *name,\n"
25117 " const char *expr,\n"
25118 " const char *val);\n"
25123 #: ../src/guestfs-actions.pod:375
25125 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25126 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25127 "containing that single node."
25131 #: ../src/guestfs-actions.pod:383
25133 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25134 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25138 #: ../src/guestfs-actions.pod:389
25139 msgid "guestfs_aug_defvar"
25143 #: ../src/guestfs-actions.pod:391
25147 " guestfs_aug_defvar (guestfs_h *g,\n"
25148 " const char *name,\n"
25149 " const char *expr);\n"
25154 #: ../src/guestfs-actions.pod:407
25155 msgid "guestfs_aug_get"
25159 #: ../src/guestfs-actions.pod:409
25163 " guestfs_aug_get (guestfs_h *g,\n"
25164 " const char *augpath);\n"
25169 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:980
25170 #: ../src/guestfs-actions.pod:998 ../src/guestfs-actions.pod:1058
25171 #: ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1177
25172 #: ../src/guestfs-actions.pod:1658 ../src/guestfs-actions.pod:1675
25173 #: ../src/guestfs-actions.pod:1694 ../src/guestfs-actions.pod:1828
25174 #: ../src/guestfs-actions.pod:2016 ../src/guestfs-actions.pod:2128
25175 #: ../src/guestfs-actions.pod:2291 ../src/guestfs-actions.pod:2308
25176 #: ../src/guestfs-actions.pod:2375 ../src/guestfs-actions.pod:2418
25177 #: ../src/guestfs-actions.pod:2439 ../src/guestfs-actions.pod:2624
25178 #: ../src/guestfs-actions.pod:2838 ../src/guestfs-actions.pod:3042
25179 #: ../src/guestfs-actions.pod:3144 ../src/guestfs-actions.pod:3248
25180 #: ../src/guestfs-actions.pod:3267 ../src/guestfs-actions.pod:3482
25181 #: ../src/guestfs-actions.pod:3510 ../src/guestfs-actions.pod:3531
25182 #: ../src/guestfs-actions.pod:3565 ../src/guestfs-actions.pod:3628
25183 #: ../src/guestfs-actions.pod:3648 ../src/guestfs-actions.pod:3668
25184 #: ../src/guestfs-actions.pod:4295 ../src/guestfs-actions.pod:4648
25185 #: ../src/guestfs-actions.pod:4818 ../src/guestfs-actions.pod:4928
25186 #: ../src/guestfs-actions.pod:5824 ../src/guestfs-actions.pod:6025
25187 #: ../src/guestfs-actions.pod:6211 ../src/guestfs-actions.pod:6389
25188 #: ../src/guestfs-actions.pod:6438 ../src/guestfs-actions.pod:7110
25189 #: ../src/guestfs-actions.pod:7126 ../src/guestfs-actions.pod:7150
25190 #: ../src/guestfs-actions.pod:7174 ../src/guestfs-actions.pod:7848
25191 #: ../src/guestfs-actions.pod:7867 ../src/guestfs-actions.pod:7885
25192 #: ../src/guestfs-actions.pod:8059 ../src/guestfs-actions.pod:8376
25194 "This function returns a string, or NULL on error. I<The caller must free "
25195 "the returned string after use>."
25199 #: ../src/guestfs-actions.pod:421
25200 msgid "guestfs_aug_init"
25204 #: ../src/guestfs-actions.pod:423
25208 " guestfs_aug_init (guestfs_h *g,\n"
25209 " const char *root,\n"
25215 #: ../src/guestfs-actions.pod:432
25216 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25220 #: ../src/guestfs-actions.pod:457
25222 "This option is only useful when debugging Augeas lenses. Use of this option "
25223 "may require additional memory for the libguestfs appliance. You may need to "
25224 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25225 "C<guestfs_set_memsize>."
25229 #: ../src/guestfs-actions.pod:472
25230 msgid "Do not load the tree in C<guestfs_aug_init>."
25234 #: ../src/guestfs-actions.pod:476
25235 msgid "To close the handle, you can call C<guestfs_aug_close>."
25239 #: ../src/guestfs-actions.pod:484
25240 msgid "guestfs_aug_insert"
25244 #: ../src/guestfs-actions.pod:486
25248 " guestfs_aug_insert (guestfs_h *g,\n"
25249 " const char *augpath,\n"
25250 " const char *label,\n"
25256 #: ../src/guestfs-actions.pod:504
25257 msgid "guestfs_aug_load"
25261 #: ../src/guestfs-actions.pod:506
25265 " guestfs_aug_load (guestfs_h *g);\n"
25270 #: ../src/guestfs-actions.pod:518
25271 msgid "guestfs_aug_ls"
25275 #: ../src/guestfs-actions.pod:520
25279 " guestfs_aug_ls (guestfs_h *g,\n"
25280 " const char *augpath);\n"
25285 #: ../src/guestfs-actions.pod:524
25287 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25288 "sorting the resulting nodes into alphabetical order."
25292 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543
25293 #: ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1196
25294 #: ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:1862
25295 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:1984
25296 #: ../src/guestfs-actions.pod:2230 ../src/guestfs-actions.pod:2696
25297 #: ../src/guestfs-actions.pod:2712 ../src/guestfs-actions.pod:2731
25298 #: ../src/guestfs-actions.pod:2796 ../src/guestfs-actions.pod:2820
25299 #: ../src/guestfs-actions.pod:2891 ../src/guestfs-actions.pod:2940
25300 #: ../src/guestfs-actions.pod:3209 ../src/guestfs-actions.pod:3584
25301 #: ../src/guestfs-actions.pod:3864 ../src/guestfs-actions.pod:4178
25302 #: ../src/guestfs-actions.pod:4195 ../src/guestfs-actions.pod:4215
25303 #: ../src/guestfs-actions.pod:4277 ../src/guestfs-actions.pod:4382
25304 #: ../src/guestfs-actions.pod:4790 ../src/guestfs-actions.pod:5547
25305 #: ../src/guestfs-actions.pod:6183 ../src/guestfs-actions.pod:6309
25306 #: ../src/guestfs-actions.pod:6423 ../src/guestfs-actions.pod:7190
25307 #: ../src/guestfs-actions.pod:7251 ../src/guestfs-actions.pod:7306
25308 #: ../src/guestfs-actions.pod:7452 ../src/guestfs-actions.pod:7476
25309 #: ../src/guestfs-actions.pod:7952 ../src/guestfs-actions.pod:7972
25310 #: ../src/guestfs-actions.pod:8019 ../src/guestfs-actions.pod:8213
25311 #: ../src/guestfs-actions.pod:8232 ../src/guestfs-actions.pod:8326
25312 #: ../src/guestfs-actions.pod:8345 ../src/guestfs-actions.pod:8391
25313 #: ../src/guestfs-actions.pod:8410
25315 "This function returns a NULL-terminated array of strings (like L<environ(3)"
25316 ">), or NULL if there was an error. I<The caller must free the strings and "
25317 "the array after use>."
25321 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1121
25322 #: ../src/guestfs-actions.pod:1139 ../src/guestfs-actions.pod:1900
25323 #: ../src/guestfs-actions.pod:3942 ../src/guestfs-actions.pod:3973
25324 #: ../src/guestfs-actions.pod:4631 ../src/guestfs-actions.pod:4681
25325 #: ../src/guestfs-actions.pod:4868 ../src/guestfs-actions.pod:4901
25326 #: ../src/guestfs-actions.pod:5064 ../src/guestfs-actions.pod:5551
25327 #: ../src/guestfs-actions.pod:6124 ../src/guestfs-actions.pod:6521
25328 #: ../src/guestfs-actions.pod:6535 ../src/guestfs-actions.pod:6547
25329 #: ../src/guestfs-actions.pod:7031 ../src/guestfs-actions.pod:7690
25330 #: ../src/guestfs-actions.pod:7703 ../src/guestfs-actions.pod:7936
25331 #: ../src/guestfs-actions.pod:8201
25332 msgid "(Added in 0.8)"
25336 #: ../src/guestfs-actions.pod:533
25337 msgid "guestfs_aug_match"
25341 #: ../src/guestfs-actions.pod:535
25345 " guestfs_aug_match (guestfs_h *g,\n"
25346 " const char *augpath);\n"
25351 #: ../src/guestfs-actions.pod:549
25352 msgid "guestfs_aug_mv"
25356 #: ../src/guestfs-actions.pod:551
25360 " guestfs_aug_mv (guestfs_h *g,\n"
25361 " const char *src,\n"
25362 " const char *dest);\n"
25367 #: ../src/guestfs-actions.pod:563
25368 msgid "guestfs_aug_rm"
25372 #: ../src/guestfs-actions.pod:565
25376 " guestfs_aug_rm (guestfs_h *g,\n"
25377 " const char *augpath);\n"
25382 #: ../src/guestfs-actions.pod:577
25383 msgid "guestfs_aug_save"
25387 #: ../src/guestfs-actions.pod:579
25391 " guestfs_aug_save (guestfs_h *g);\n"
25396 #: ../src/guestfs-actions.pod:584
25398 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25403 #: ../src/guestfs-actions.pod:591
25404 msgid "guestfs_aug_set"
25408 #: ../src/guestfs-actions.pod:593
25412 " guestfs_aug_set (guestfs_h *g,\n"
25413 " const char *augpath,\n"
25414 " const char *val);\n"
25419 #: ../src/guestfs-actions.pod:600
25421 "In the Augeas API, it is possible to clear a node by setting the value to "
25422 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25423 "this call. Instead you must use the C<guestfs_aug_clear> call."
25427 #: ../src/guestfs-actions.pod:609
25428 msgid "guestfs_available"
25432 #: ../src/guestfs-actions.pod:611
25436 " guestfs_available (guestfs_h *g,\n"
25437 " char *const *groups);\n"
25442 #: ../src/guestfs-actions.pod:619
25444 "The libguestfs groups, and the functions that those groups correspond to, "
25445 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25446 "runtime by calling C<guestfs_available_all_groups>."
25450 #: ../src/guestfs-actions.pod:643
25451 msgid "You must call C<guestfs_launch> before calling this function."
25455 #: ../src/guestfs-actions.pod:665
25457 "This call was added in version C<1.0.80>. In previous versions of "
25458 "libguestfs all you could do would be to speculatively execute a command to "
25459 "find out if the daemon implemented it. See also C<guestfs_version>."
25463 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1645
25464 msgid "(Added in 1.0.80)"
25468 #: ../src/guestfs-actions.pod:676
25469 msgid "guestfs_available_all_groups"
25473 #: ../src/guestfs-actions.pod:678
25477 " guestfs_available_all_groups (guestfs_h *g);\n"
25482 #: ../src/guestfs-actions.pod:681
25484 "This command returns a list of all optional groups that this daemon knows "
25485 "about. Note this returns both supported and unsupported groups. To find "
25486 "out which ones the daemon can actually support you have to call "
25487 "C<guestfs_available> on each member of the returned list."
25491 #: ../src/guestfs-actions.pod:687
25492 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25496 #: ../src/guestfs-actions.pod:693
25497 msgid "(Added in 1.3.15)"
25501 #: ../src/guestfs-actions.pod:695
25502 msgid "guestfs_base64_in"
25506 #: ../src/guestfs-actions.pod:697
25510 " guestfs_base64_in (guestfs_h *g,\n"
25511 " const char *base64file,\n"
25512 " const char *filename);\n"
25517 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25518 msgid "(Added in 1.3.5)"
25522 #: ../src/guestfs-actions.pod:709
25523 msgid "guestfs_base64_out"
25527 #: ../src/guestfs-actions.pod:711
25531 " guestfs_base64_out (guestfs_h *g,\n"
25532 " const char *filename,\n"
25533 " const char *base64file);\n"
25538 #: ../src/guestfs-actions.pod:723
25539 msgid "guestfs_blockdev_flushbufs"
25543 #: ../src/guestfs-actions.pod:725
25547 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25548 " const char *device);\n"
25553 #: ../src/guestfs-actions.pod:736 ../src/guestfs-actions.pod:753
25554 #: ../src/guestfs-actions.pod:768 ../src/guestfs-actions.pod:784
25555 #: ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:821
25556 #: ../src/guestfs-actions.pod:835 ../src/guestfs-actions.pod:853
25557 #: ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:881
25558 msgid "(Added in 0.9.3)"
25562 #: ../src/guestfs-actions.pod:738
25563 msgid "guestfs_blockdev_getbsz"
25567 #: ../src/guestfs-actions.pod:740
25571 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25572 " const char *device);\n"
25577 #: ../src/guestfs-actions.pod:755
25578 msgid "guestfs_blockdev_getro"
25582 #: ../src/guestfs-actions.pod:757
25586 " guestfs_blockdev_getro (guestfs_h *g,\n"
25587 " const char *device);\n"
25592 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1883
25593 #: ../src/guestfs-actions.pod:1898 ../src/guestfs-actions.pod:2387
25594 #: ../src/guestfs-actions.pod:2398 ../src/guestfs-actions.pod:2470
25595 #: ../src/guestfs-actions.pod:2496 ../src/guestfs-actions.pod:2536
25596 #: ../src/guestfs-actions.pod:2551 ../src/guestfs-actions.pod:2587
25597 #: ../src/guestfs-actions.pod:2610 ../src/guestfs-actions.pod:3685
25598 #: ../src/guestfs-actions.pod:3701 ../src/guestfs-actions.pod:3719
25599 #: ../src/guestfs-actions.pod:3881 ../src/guestfs-actions.pod:3895
25600 #: ../src/guestfs-actions.pod:3910 ../src/guestfs-actions.pod:3924
25601 #: ../src/guestfs-actions.pod:3940 ../src/guestfs-actions.pod:3955
25602 #: ../src/guestfs-actions.pod:3971 ../src/guestfs-actions.pod:3985
25603 #: ../src/guestfs-actions.pod:3998 ../src/guestfs-actions.pod:4012
25604 #: ../src/guestfs-actions.pod:4027 ../src/guestfs-actions.pod:4042
25605 #: ../src/guestfs-actions.pod:4055 ../src/guestfs-actions.pod:4069
25606 #: ../src/guestfs-actions.pod:5788
25607 msgid "This function returns a C truth value on success or -1 on error."
25611 #: ../src/guestfs-actions.pod:770
25612 msgid "guestfs_blockdev_getsize64"
25616 #: ../src/guestfs-actions.pod:772
25620 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25621 " const char *device);\n"
25626 #: ../src/guestfs-actions.pod:778
25627 msgid "See also C<guestfs_blockdev_getsz>."
25631 #: ../src/guestfs-actions.pod:786
25632 msgid "guestfs_blockdev_getss"
25636 #: ../src/guestfs-actions.pod:788
25640 " guestfs_blockdev_getss (guestfs_h *g,\n"
25641 " const char *device);\n"
25646 #: ../src/guestfs-actions.pod:795
25648 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25653 #: ../src/guestfs-actions.pod:804
25654 msgid "guestfs_blockdev_getsz"
25658 #: ../src/guestfs-actions.pod:806
25662 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25663 " const char *device);\n"
25668 #: ../src/guestfs-actions.pod:813
25670 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25671 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25675 #: ../src/guestfs-actions.pod:823
25676 msgid "guestfs_blockdev_rereadpt"
25680 #: ../src/guestfs-actions.pod:825
25684 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25685 " const char *device);\n"
25690 #: ../src/guestfs-actions.pod:837
25691 msgid "guestfs_blockdev_setbsz"
25695 #: ../src/guestfs-actions.pod:839
25699 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25700 " const char *device,\n"
25701 " int blocksize);\n"
25706 #: ../src/guestfs-actions.pod:855
25707 msgid "guestfs_blockdev_setro"
25711 #: ../src/guestfs-actions.pod:857
25715 " guestfs_blockdev_setro (guestfs_h *g,\n"
25716 " const char *device);\n"
25721 #: ../src/guestfs-actions.pod:869
25722 msgid "guestfs_blockdev_setrw"
25726 #: ../src/guestfs-actions.pod:871
25730 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25731 " const char *device);\n"
25736 #: ../src/guestfs-actions.pod:883
25737 msgid "guestfs_btrfs_filesystem_resize"
25741 #: ../src/guestfs-actions.pod:885
25745 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25746 " const char *mountpoint,\n"
25752 #: ../src/guestfs-actions.pod:895
25755 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25760 #: ../src/guestfs-actions.pod:918
25761 msgid "(Added in 1.11.17)"
25765 #: ../src/guestfs-actions.pod:920
25766 msgid "guestfs_btrfs_filesystem_resize_va"
25770 #: ../src/guestfs-actions.pod:922
25774 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
25775 " const char *mountpoint,\n"
25776 " va_list args);\n"
25781 #: ../src/guestfs-actions.pod:927
25782 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
25786 #: ../src/guestfs-actions.pod:931
25787 msgid "guestfs_btrfs_filesystem_resize_argv"
25791 #: ../src/guestfs-actions.pod:933
25795 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
25796 " const char *mountpoint,\n"
25797 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
25802 #: ../src/guestfs-actions.pod:938
25803 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
25807 #: ../src/guestfs-actions.pod:942
25808 msgid "guestfs_case_sensitive_path"
25812 #: ../src/guestfs-actions.pod:944
25816 " guestfs_case_sensitive_path (guestfs_h *g,\n"
25817 " const char *path);\n"
25822 #: ../src/guestfs-actions.pod:970
25824 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
25825 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
25826 "how the directories were originally created under Windows)."
25830 #: ../src/guestfs-actions.pod:978
25831 msgid "See also C<guestfs_realpath>."
25835 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:7870
25836 msgid "(Added in 1.0.75)"
25840 #: ../src/guestfs-actions.pod:985
25841 msgid "guestfs_cat"
25845 #: ../src/guestfs-actions.pod:987
25849 " guestfs_cat (guestfs_h *g,\n"
25850 " const char *path);\n"
25855 #: ../src/guestfs-actions.pod:993
25857 "Note that this function cannot correctly handle binary files (specifically, "
25858 "files containing C<\\0> character which is treated as end of string). For "
25859 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
25860 "functions which have a more complex interface."
25864 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4199
25865 #: ../src/guestfs-actions.pod:4281 ../src/guestfs-actions.pod:4298
25866 #: ../src/guestfs-actions.pod:4386 ../src/guestfs-actions.pod:4794
25867 #: ../src/guestfs-actions.pod:4808 ../src/guestfs-actions.pod:6187
25868 #: ../src/guestfs-actions.pod:6201 ../src/guestfs-actions.pod:8023
25869 #: ../src/guestfs-actions.pod:8037
25870 msgid "(Added in 0.4)"
25874 #: ../src/guestfs-actions.pod:1006
25875 msgid "guestfs_checksum"
25879 #: ../src/guestfs-actions.pod:1008
25883 " guestfs_checksum (guestfs_h *g,\n"
25884 " const char *csumtype,\n"
25885 " const char *path);\n"
25890 #: ../src/guestfs-actions.pod:1054
25891 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
25895 #: ../src/guestfs-actions.pod:1056
25896 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
25900 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1720
25901 #: ../src/guestfs-actions.pod:2578 ../src/guestfs-actions.pod:3897
25902 #: ../src/guestfs-actions.pod:3926 ../src/guestfs-actions.pod:3987
25903 #: ../src/guestfs-actions.pod:4014 ../src/guestfs-actions.pod:7726
25904 msgid "(Added in 1.0.2)"
25908 #: ../src/guestfs-actions.pod:1063
25909 msgid "guestfs_checksum_device"
25913 #: ../src/guestfs-actions.pod:1065
25917 " guestfs_checksum_device (guestfs_h *g,\n"
25918 " const char *csumtype,\n"
25919 " const char *device);\n"
25924 #: ../src/guestfs-actions.pod:1070
25926 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25927 "device named C<device>. For the types of checksums supported see the "
25928 "C<guestfs_checksum> command."
25932 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5618
25933 #: ../src/guestfs-actions.pod:5753 ../src/guestfs-actions.pod:5790
25934 #: ../src/guestfs-actions.pod:5808 ../src/guestfs-actions.pod:5990
25935 #: ../src/guestfs-actions.pod:7635 ../src/guestfs-actions.pod:7649
25936 #: ../src/guestfs-actions.pod:8049
25937 msgid "(Added in 1.3.2)"
25941 #: ../src/guestfs-actions.pod:1079
25942 msgid "guestfs_checksums_out"
25946 #: ../src/guestfs-actions.pod:1081
25950 " guestfs_checksums_out (guestfs_h *g,\n"
25951 " const char *csumtype,\n"
25952 " const char *directory,\n"
25953 " const char *sumsfile);\n"
25958 #: ../src/guestfs-actions.pod:1101
25959 msgid "(Added in 1.3.7)"
25963 #: ../src/guestfs-actions.pod:1103
25964 msgid "guestfs_chmod"
25968 #: ../src/guestfs-actions.pod:1105
25972 " guestfs_chmod (guestfs_h *g,\n"
25974 " const char *path);\n"
25979 #: ../src/guestfs-actions.pod:1123
25980 msgid "guestfs_chown"
25984 #: ../src/guestfs-actions.pod:1125
25988 " guestfs_chown (guestfs_h *g,\n"
25991 " const char *path);\n"
25996 #: ../src/guestfs-actions.pod:1141
25997 msgid "guestfs_command"
26001 #: ../src/guestfs-actions.pod:1143
26005 " guestfs_command (guestfs_h *g,\n"
26006 " char *const *arguments);\n"
26011 #: ../src/guestfs-actions.pod:1152
26013 "The single parameter is an argv-style list of arguments. The first element "
26014 "is the name of the program to run. Subsequent elements are parameters. The "
26015 "list must be non-empty (ie. must contain a program name). Note that the "
26016 "command runs directly, and is I<not> invoked via the shell (see "
26021 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203
26022 #: ../src/guestfs-actions.pod:2019
26023 msgid "(Added in 0.9.1)"
26027 #: ../src/guestfs-actions.pod:1185
26028 msgid "guestfs_command_lines"
26032 #: ../src/guestfs-actions.pod:1187
26036 " guestfs_command_lines (guestfs_h *g,\n"
26037 " char *const *arguments);\n"
26042 #: ../src/guestfs-actions.pod:1191
26044 "This is the same as C<guestfs_command>, but splits the result into a list of "
26049 #: ../src/guestfs-actions.pod:1194
26050 msgid "See also: C<guestfs_sh_lines>"
26054 #: ../src/guestfs-actions.pod:1205
26055 msgid "guestfs_compress_device_out"
26059 #: ../src/guestfs-actions.pod:1207
26063 " guestfs_compress_device_out (guestfs_h *g,\n"
26064 " const char *ctype,\n"
26065 " const char *device,\n"
26066 " const char *zdevice,\n"
26072 #: ../src/guestfs-actions.pod:1219
26075 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
26080 #: ../src/guestfs-actions.pod:1224
26082 "The C<ctype> and optional C<level> parameters have the same meaning as in "
26083 "C<guestfs_compress_out>."
26087 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288
26088 #: ../src/guestfs-actions.pod:2564 ../src/guestfs-actions.pod:6907
26089 msgid "(Added in 1.13.15)"
26093 #: ../src/guestfs-actions.pod:1231
26094 msgid "guestfs_compress_device_out_va"
26098 #: ../src/guestfs-actions.pod:1233
26102 " guestfs_compress_device_out_va (guestfs_h *g,\n"
26103 " const char *ctype,\n"
26104 " const char *device,\n"
26105 " const char *zdevice,\n"
26106 " va_list args);\n"
26111 #: ../src/guestfs-actions.pod:1240
26112 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
26116 #: ../src/guestfs-actions.pod:1244
26117 msgid "guestfs_compress_device_out_argv"
26121 #: ../src/guestfs-actions.pod:1246
26125 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
26126 " const char *ctype,\n"
26127 " const char *device,\n"
26128 " const char *zdevice,\n"
26129 " const struct guestfs_compress_device_out_argv *optargs);\n"
26134 #: ../src/guestfs-actions.pod:1253
26135 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
26139 #: ../src/guestfs-actions.pod:1257
26140 msgid "guestfs_compress_out"
26144 #: ../src/guestfs-actions.pod:1259
26148 " guestfs_compress_out (guestfs_h *g,\n"
26149 " const char *ctype,\n"
26150 " const char *file,\n"
26151 " const char *zfile,\n"
26157 #: ../src/guestfs-actions.pod:1271
26160 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26165 #: ../src/guestfs-actions.pod:1290
26166 msgid "guestfs_compress_out_va"
26170 #: ../src/guestfs-actions.pod:1292
26174 " guestfs_compress_out_va (guestfs_h *g,\n"
26175 " const char *ctype,\n"
26176 " const char *file,\n"
26177 " const char *zfile,\n"
26178 " va_list args);\n"
26183 #: ../src/guestfs-actions.pod:1299
26184 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26188 #: ../src/guestfs-actions.pod:1303
26189 msgid "guestfs_compress_out_argv"
26193 #: ../src/guestfs-actions.pod:1305
26197 " guestfs_compress_out_argv (guestfs_h *g,\n"
26198 " const char *ctype,\n"
26199 " const char *file,\n"
26200 " const char *zfile,\n"
26201 " const struct guestfs_compress_out_argv *optargs);\n"
26206 #: ../src/guestfs-actions.pod:1312
26207 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26211 #: ../src/guestfs-actions.pod:1316
26212 msgid "guestfs_config"
26216 #: ../src/guestfs-actions.pod:1318
26220 " guestfs_config (guestfs_h *g,\n"
26221 " const char *qemuparam,\n"
26222 " const char *qemuvalue);\n"
26227 #: ../src/guestfs-actions.pod:1336
26228 msgid "guestfs_copy_device_to_device"
26232 #: ../src/guestfs-actions.pod:1338
26236 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26237 " const char *src,\n"
26238 " const char *dest,\n"
26244 #: ../src/guestfs-actions.pod:1349
26247 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26248 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26249 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26254 #: ../src/guestfs-actions.pod:1353
26256 "The four calls C<guestfs_copy_device_to_device>, "
26257 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26258 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26259 "destination (device|file)."
26263 #: ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1425
26264 #: ../src/guestfs-actions.pod:1476 ../src/guestfs-actions.pod:1532
26265 #: ../src/guestfs-actions.pod:1584 ../src/guestfs-actions.pod:1715
26266 #: ../src/guestfs-actions.pod:1746 ../src/guestfs-actions.pod:1791
26267 #: ../src/guestfs-actions.pod:2168 ../src/guestfs-actions.pod:2190
26268 #: ../src/guestfs-actions.pod:4097 ../src/guestfs-actions.pod:7721
26269 #: ../src/guestfs-actions.pod:7755 ../src/guestfs-actions.pod:8262
26270 #: ../src/guestfs-actions.pod:8285
26272 "This long-running command can generate progress notification messages so "
26273 "that the caller can display a progress bar or indicator. To receive these "
26274 "messages, the caller must register a progress event callback. See L<guestfs"
26275 "(3)/GUESTFS_EVENT_PROGRESS>."
26279 #: ../src/guestfs-actions.pod:1379
26280 msgid "guestfs_copy_device_to_device_va"
26284 #: ../src/guestfs-actions.pod:1381
26288 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26289 " const char *src,\n"
26290 " const char *dest,\n"
26291 " va_list args);\n"
26296 #: ../src/guestfs-actions.pod:1387
26297 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26301 #: ../src/guestfs-actions.pod:1391
26302 msgid "guestfs_copy_device_to_device_argv"
26306 #: ../src/guestfs-actions.pod:1393
26310 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26311 " const char *src,\n"
26312 " const char *dest,\n"
26313 " const struct guestfs_copy_device_to_device_argv *optargs);\n"
26318 #: ../src/guestfs-actions.pod:1399
26319 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26323 #: ../src/guestfs-actions.pod:1403
26324 msgid "guestfs_copy_device_to_file"
26328 #: ../src/guestfs-actions.pod:1405
26332 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26333 " const char *src,\n"
26334 " const char *dest,\n"
26340 #: ../src/guestfs-actions.pod:1416
26343 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26344 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26345 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26350 #: ../src/guestfs-actions.pod:1420 ../src/guestfs-actions.pod:1471
26351 #: ../src/guestfs-actions.pod:1522
26353 "See C<guestfs_copy_device_to_device> for a general overview of this call."
26357 #: ../src/guestfs-actions.pod:1430
26358 msgid "guestfs_copy_device_to_file_va"
26362 #: ../src/guestfs-actions.pod:1432
26366 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26367 " const char *src,\n"
26368 " const char *dest,\n"
26369 " va_list args);\n"
26374 #: ../src/guestfs-actions.pod:1438
26375 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26379 #: ../src/guestfs-actions.pod:1442
26380 msgid "guestfs_copy_device_to_file_argv"
26384 #: ../src/guestfs-actions.pod:1444
26388 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26389 " const char *src,\n"
26390 " const char *dest,\n"
26391 " const struct guestfs_copy_device_to_file_argv *optargs);\n"
26396 #: ../src/guestfs-actions.pod:1450
26397 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26401 #: ../src/guestfs-actions.pod:1454
26402 msgid "guestfs_copy_file_to_device"
26406 #: ../src/guestfs-actions.pod:1456
26410 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26411 " const char *src,\n"
26412 " const char *dest,\n"
26418 #: ../src/guestfs-actions.pod:1467
26421 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26422 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26423 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26428 #: ../src/guestfs-actions.pod:1481
26429 msgid "guestfs_copy_file_to_device_va"
26433 #: ../src/guestfs-actions.pod:1483
26437 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26438 " const char *src,\n"
26439 " const char *dest,\n"
26440 " va_list args);\n"
26445 #: ../src/guestfs-actions.pod:1489
26446 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26450 #: ../src/guestfs-actions.pod:1493
26451 msgid "guestfs_copy_file_to_device_argv"
26455 #: ../src/guestfs-actions.pod:1495
26459 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26460 " const char *src,\n"
26461 " const char *dest,\n"
26462 " const struct guestfs_copy_file_to_device_argv *optargs);\n"
26467 #: ../src/guestfs-actions.pod:1501
26468 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26472 #: ../src/guestfs-actions.pod:1505
26473 msgid "guestfs_copy_file_to_file"
26477 #: ../src/guestfs-actions.pod:1507
26481 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26482 " const char *src,\n"
26483 " const char *dest,\n"
26489 #: ../src/guestfs-actions.pod:1518
26492 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26493 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26494 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26499 #: ../src/guestfs-actions.pod:1525
26501 "This is B<not> the function you want for copying files. This is for copying "
26502 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26503 "C<guestfs_mv> for general file copying and moving functions."
26507 #: ../src/guestfs-actions.pod:1537
26508 msgid "guestfs_copy_file_to_file_va"
26512 #: ../src/guestfs-actions.pod:1539
26516 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26517 " const char *src,\n"
26518 " const char *dest,\n"
26519 " va_list args);\n"
26524 #: ../src/guestfs-actions.pod:1545
26525 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26529 #: ../src/guestfs-actions.pod:1549
26530 msgid "guestfs_copy_file_to_file_argv"
26534 #: ../src/guestfs-actions.pod:1551
26538 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26539 " const char *src,\n"
26540 " const char *dest,\n"
26541 " const struct guestfs_copy_file_to_file_argv *optargs);\n"
26546 #: ../src/guestfs-actions.pod:1557
26547 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26551 #: ../src/guestfs-actions.pod:1561
26552 msgid "guestfs_copy_size"
26556 #: ../src/guestfs-actions.pod:1563
26560 " guestfs_copy_size (guestfs_h *g,\n"
26561 " const char *src,\n"
26562 " const char *dest,\n"
26563 " int64_t size);\n"
26568 #: ../src/guestfs-actions.pod:1569 ../src/guestfs-actions.pod:1626
26570 "I<This function is deprecated.> In new code, use the L</"
26571 "guestfs_copy_device_to_device> call instead."
26575 #: ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:4821
26576 #: ../src/guestfs-actions.pod:6214 ../src/guestfs-actions.pod:7956
26577 #: ../src/guestfs-actions.pod:7976 ../src/guestfs-actions.pod:8062
26578 msgid "(Added in 1.0.87)"
26582 #: ../src/guestfs-actions.pod:1591
26587 #: ../src/guestfs-actions.pod:1593
26591 " guestfs_cp (guestfs_h *g,\n"
26592 " const char *src,\n"
26593 " const char *dest);\n"
26598 #: ../src/guestfs-actions.pod:1603 ../src/guestfs-actions.pod:1617
26599 #: ../src/guestfs-actions.pod:1697 ../src/guestfs-actions.pod:1771
26600 #: ../src/guestfs-actions.pod:1885 ../src/guestfs-actions.pod:5565
26601 #: ../src/guestfs-actions.pod:6058
26602 msgid "(Added in 1.0.18)"
26606 #: ../src/guestfs-actions.pod:1605
26607 msgid "guestfs_cp_a"
26611 #: ../src/guestfs-actions.pod:1607
26615 " guestfs_cp_a (guestfs_h *g,\n"
26616 " const char *src,\n"
26617 " const char *dest);\n"
26622 #: ../src/guestfs-actions.pod:1619
26627 #: ../src/guestfs-actions.pod:1621
26631 " guestfs_dd (guestfs_h *g,\n"
26632 " const char *src,\n"
26633 " const char *dest);\n"
26638 #: ../src/guestfs-actions.pod:1638
26640 "If the destination is a device, it must be as large or larger than the "
26641 "source file or device, otherwise the copy will fail. This command cannot do "
26642 "partial copies (see C<guestfs_copy_device_to_device>)."
26646 #: ../src/guestfs-actions.pod:1647
26651 #: ../src/guestfs-actions.pod:1649
26655 " guestfs_df (guestfs_h *g);\n"
26660 #: ../src/guestfs-actions.pod:1654 ../src/guestfs-actions.pod:1671
26662 "This command is mostly useful for interactive sessions. It is I<not> "
26663 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
26668 #: ../src/guestfs-actions.pod:1661 ../src/guestfs-actions.pod:1678
26669 #: ../src/guestfs-actions.pod:1796 ../src/guestfs-actions.pod:2803
26670 #: ../src/guestfs-actions.pod:2827 ../src/guestfs-actions.pod:2895
26671 #: ../src/guestfs-actions.pod:4931 ../src/guestfs-actions.pod:5465
26672 #: ../src/guestfs-actions.pod:7459 ../src/guestfs-actions.pod:7483
26673 #: ../src/guestfs-actions.pod:8102 ../src/guestfs-actions.pod:8115
26674 #: ../src/guestfs-actions.pod:8128
26675 msgid "(Added in 1.0.54)"
26679 #: ../src/guestfs-actions.pod:1663
26680 msgid "guestfs_df_h"
26684 #: ../src/guestfs-actions.pod:1665
26688 " guestfs_df_h (guestfs_h *g);\n"
26693 #: ../src/guestfs-actions.pod:1680
26694 msgid "guestfs_dmesg"
26698 #: ../src/guestfs-actions.pod:1682
26702 " guestfs_dmesg (guestfs_h *g);\n"
26707 #: ../src/guestfs-actions.pod:1689
26709 "Another way to get the same information is to enable verbose messages with "
26710 "C<guestfs_set_verbose> or by setting the environment variable "
26711 "C<LIBGUESTFS_DEBUG=1> before running the program."
26715 #: ../src/guestfs-actions.pod:1699
26716 msgid "guestfs_download"
26720 #: ../src/guestfs-actions.pod:1701
26724 " guestfs_download (guestfs_h *g,\n"
26725 " const char *remotefilename,\n"
26726 " const char *filename);\n"
26731 #: ../src/guestfs-actions.pod:1711
26732 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
26736 #: ../src/guestfs-actions.pod:1722
26737 msgid "guestfs_download_offset"
26741 #: ../src/guestfs-actions.pod:1724
26745 " guestfs_download_offset (guestfs_h *g,\n"
26746 " const char *remotefilename,\n"
26747 " const char *filename,\n"
26748 " int64_t offset,\n"
26749 " int64_t size);\n"
26754 #: ../src/guestfs-actions.pod:1737
26756 "Note that there is no limit on the amount of data that can be downloaded "
26757 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
26758 "full amount unless an error occurs."
26762 #: ../src/guestfs-actions.pod:1742
26763 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26767 #: ../src/guestfs-actions.pod:1751 ../src/guestfs-actions.pod:7760
26768 msgid "(Added in 1.5.17)"
26772 #: ../src/guestfs-actions.pod:1753
26773 msgid "guestfs_drop_caches"
26777 #: ../src/guestfs-actions.pod:1755
26781 " guestfs_drop_caches (guestfs_h *g,\n"
26782 " int whattodrop);\n"
26787 #: ../src/guestfs-actions.pod:1773
26792 #: ../src/guestfs-actions.pod:1775
26796 " guestfs_du (guestfs_h *g,\n"
26797 " const char *path);\n"
26802 #: ../src/guestfs-actions.pod:1798
26803 msgid "guestfs_e2fsck_f"
26807 #: ../src/guestfs-actions.pod:1800
26811 " guestfs_e2fsck_f (guestfs_h *g,\n"
26812 " const char *device);\n"
26817 #: ../src/guestfs-actions.pod:1808
26819 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
26820 "Normally you should use C<guestfs_fsck>."
26824 #: ../src/guestfs-actions.pod:1813
26825 msgid "(Added in 1.0.29)"
26829 #: ../src/guestfs-actions.pod:1815
26830 msgid "guestfs_echo_daemon"
26834 #: ../src/guestfs-actions.pod:1817
26838 " guestfs_echo_daemon (guestfs_h *g,\n"
26839 " char *const *words);\n"
26844 #: ../src/guestfs-actions.pod:1826
26845 msgid "See also C<guestfs_ping_daemon>."
26849 #: ../src/guestfs-actions.pod:1831 ../src/guestfs-actions.pod:2589
26850 #: ../src/guestfs-actions.pod:6931
26851 msgid "(Added in 1.0.69)"
26855 #: ../src/guestfs-actions.pod:1833
26856 msgid "guestfs_egrep"
26860 #: ../src/guestfs-actions.pod:1835
26864 " guestfs_egrep (guestfs_h *g,\n"
26865 " const char *regex,\n"
26866 " const char *path);\n"
26871 #: ../src/guestfs-actions.pod:1850 ../src/guestfs-actions.pod:1869
26872 #: ../src/guestfs-actions.pod:1926 ../src/guestfs-actions.pod:1972
26873 #: ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:2719
26874 #: ../src/guestfs-actions.pod:2738 ../src/guestfs-actions.pod:2916
26875 #: ../src/guestfs-actions.pod:2929 ../src/guestfs-actions.pod:2944
26876 #: ../src/guestfs-actions.pod:2990 ../src/guestfs-actions.pod:3012
26877 #: ../src/guestfs-actions.pod:3025 ../src/guestfs-actions.pod:4311
26878 #: ../src/guestfs-actions.pod:4325 ../src/guestfs-actions.pod:4338
26879 #: ../src/guestfs-actions.pod:4352 ../src/guestfs-actions.pod:5353
26880 #: ../src/guestfs-actions.pod:6392 ../src/guestfs-actions.pod:6441
26881 #: ../src/guestfs-actions.pod:7327 ../src/guestfs-actions.pod:7339
26882 #: ../src/guestfs-actions.pod:7352 ../src/guestfs-actions.pod:7365
26883 #: ../src/guestfs-actions.pod:7387 ../src/guestfs-actions.pod:7400
26884 #: ../src/guestfs-actions.pod:7413 ../src/guestfs-actions.pod:7426
26885 #: ../src/guestfs-actions.pod:8220 ../src/guestfs-actions.pod:8239
26886 #: ../src/guestfs-actions.pod:8333 ../src/guestfs-actions.pod:8352
26887 #: ../src/guestfs-actions.pod:8398 ../src/guestfs-actions.pod:8417
26888 msgid "(Added in 1.0.66)"
26892 #: ../src/guestfs-actions.pod:1852
26893 msgid "guestfs_egrepi"
26897 #: ../src/guestfs-actions.pod:1854
26901 " guestfs_egrepi (guestfs_h *g,\n"
26902 " const char *regex,\n"
26903 " const char *path);\n"
26908 #: ../src/guestfs-actions.pod:1871
26909 msgid "guestfs_equal"
26913 #: ../src/guestfs-actions.pod:1873
26917 " guestfs_equal (guestfs_h *g,\n"
26918 " const char *file1,\n"
26919 " const char *file2);\n"
26924 #: ../src/guestfs-actions.pod:1887
26925 msgid "guestfs_exists"
26929 #: ../src/guestfs-actions.pod:1889
26933 " guestfs_exists (guestfs_h *g,\n"
26934 " const char *path);\n"
26939 #: ../src/guestfs-actions.pod:1896
26940 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
26944 #: ../src/guestfs-actions.pod:1902
26945 msgid "guestfs_fallocate"
26949 #: ../src/guestfs-actions.pod:1904
26953 " guestfs_fallocate (guestfs_h *g,\n"
26954 " const char *path,\n"
26960 #: ../src/guestfs-actions.pod:1909
26962 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
26967 #: ../src/guestfs-actions.pod:1928
26968 msgid "guestfs_fallocate64"
26972 #: ../src/guestfs-actions.pod:1930
26976 " guestfs_fallocate64 (guestfs_h *g,\n"
26977 " const char *path,\n"
26983 #: ../src/guestfs-actions.pod:1939
26985 "Note that this call allocates disk blocks for the file. To create a sparse "
26986 "file use C<guestfs_truncate_size> instead."
26990 #: ../src/guestfs-actions.pod:1942
26992 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
26993 "oversight it only allowed 30 bit lengths to be specified, effectively "
26994 "limiting the maximum size of files created through that call to 1GB."
26998 #: ../src/guestfs-actions.pod:1953
26999 msgid "(Added in 1.3.17)"
27003 #: ../src/guestfs-actions.pod:1955
27004 msgid "guestfs_fgrep"
27008 #: ../src/guestfs-actions.pod:1957
27012 " guestfs_fgrep (guestfs_h *g,\n"
27013 " const char *pattern,\n"
27014 " const char *path);\n"
27019 #: ../src/guestfs-actions.pod:1974
27020 msgid "guestfs_fgrepi"
27024 #: ../src/guestfs-actions.pod:1976
27028 " guestfs_fgrepi (guestfs_h *g,\n"
27029 " const char *pattern,\n"
27030 " const char *path);\n"
27035 #: ../src/guestfs-actions.pod:1993
27036 msgid "guestfs_file"
27040 #: ../src/guestfs-actions.pod:1995
27044 " guestfs_file (guestfs_h *g,\n"
27045 " const char *path);\n"
27050 #: ../src/guestfs-actions.pod:2013
27052 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
27053 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
27057 #: ../src/guestfs-actions.pod:2021
27058 msgid "guestfs_file_architecture"
27062 #: ../src/guestfs-actions.pod:2023
27066 " guestfs_file_architecture (guestfs_h *g,\n"
27067 " const char *filename);\n"
27072 #: ../src/guestfs-actions.pod:2131 ../src/guestfs-actions.pod:2294
27073 #: ../src/guestfs-actions.pod:2311 ../src/guestfs-actions.pod:3045
27074 #: ../src/guestfs-actions.pod:3147 ../src/guestfs-actions.pod:3213
27075 #: ../src/guestfs-actions.pod:3400 ../src/guestfs-actions.pod:3418
27076 #: ../src/guestfs-actions.pod:3458 ../src/guestfs-actions.pod:3534
27077 #: ../src/guestfs-actions.pod:3631 ../src/guestfs-actions.pod:3868
27078 #: ../src/guestfs-actions.pod:4000
27079 msgid "(Added in 1.5.3)"
27083 #: ../src/guestfs-actions.pod:2133
27084 msgid "guestfs_filesize"
27088 #: ../src/guestfs-actions.pod:2135
27092 " guestfs_filesize (guestfs_h *g,\n"
27093 " const char *file);\n"
27098 #: ../src/guestfs-actions.pod:2141
27100 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
27101 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
27102 "devices, use C<guestfs_blockdev_getsize64>."
27106 #: ../src/guestfs-actions.pod:2147
27107 msgid "(Added in 1.0.82)"
27111 #: ../src/guestfs-actions.pod:2149
27112 msgid "guestfs_fill"
27116 #: ../src/guestfs-actions.pod:2151
27120 " guestfs_fill (guestfs_h *g,\n"
27123 " const char *path);\n"
27128 #: ../src/guestfs-actions.pod:2161
27130 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
27131 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
27132 "bytes use C<guestfs_fill_pattern>."
27136 #: ../src/guestfs-actions.pod:2173
27137 msgid "(Added in 1.0.79)"
27141 #: ../src/guestfs-actions.pod:2175
27142 msgid "guestfs_fill_pattern"
27146 #: ../src/guestfs-actions.pod:2177
27150 " guestfs_fill_pattern (guestfs_h *g,\n"
27151 " const char *pattern,\n"
27153 " const char *path);\n"
27158 #: ../src/guestfs-actions.pod:2183
27160 "This function is like C<guestfs_fill> except that it creates a new file of "
27161 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
27162 "pattern is truncated if necessary to ensure the length of the file is "
27163 "exactly C<len> bytes."
27167 #: ../src/guestfs-actions.pod:2195
27168 msgid "(Added in 1.3.12)"
27172 #: ../src/guestfs-actions.pod:2197
27173 msgid "guestfs_find"
27177 #: ../src/guestfs-actions.pod:2199
27181 " guestfs_find (guestfs_h *g,\n"
27182 " const char *directory);\n"
27187 #: ../src/guestfs-actions.pod:2215
27189 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27193 #: ../src/guestfs-actions.pod:2228
27194 msgid "See also C<guestfs_find0>."
27198 #: ../src/guestfs-actions.pod:2237 ../src/guestfs-actions.pod:4758
27199 #: ../src/guestfs-actions.pod:6476
27200 msgid "(Added in 1.0.27)"
27204 #: ../src/guestfs-actions.pod:2239
27205 msgid "guestfs_find0"
27209 #: ../src/guestfs-actions.pod:2241
27213 " guestfs_find0 (guestfs_h *g,\n"
27214 " const char *directory,\n"
27215 " const char *files);\n"
27220 #: ../src/guestfs-actions.pod:2250
27222 "This command works the same way as C<guestfs_find> with the following "
27227 #: ../src/guestfs-actions.pod:2277
27228 msgid "(Added in 1.0.74)"
27232 #: ../src/guestfs-actions.pod:2279
27233 msgid "guestfs_findfs_label"
27237 #: ../src/guestfs-actions.pod:2281
27241 " guestfs_findfs_label (guestfs_h *g,\n"
27242 " const char *label);\n"
27247 #: ../src/guestfs-actions.pod:2289
27248 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27252 #: ../src/guestfs-actions.pod:2296
27253 msgid "guestfs_findfs_uuid"
27257 #: ../src/guestfs-actions.pod:2298
27261 " guestfs_findfs_uuid (guestfs_h *g,\n"
27262 " const char *uuid);\n"
27267 #: ../src/guestfs-actions.pod:2306
27268 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27272 #: ../src/guestfs-actions.pod:2313
27273 msgid "guestfs_fsck"
27277 #: ../src/guestfs-actions.pod:2315
27281 " guestfs_fsck (guestfs_h *g,\n"
27282 " const char *fstype,\n"
27283 " const char *device);\n"
27288 #: ../src/guestfs-actions.pod:2350 ../src/guestfs-actions.pod:8267
27289 msgid "(Added in 1.0.16)"
27293 #: ../src/guestfs-actions.pod:2352
27294 msgid "guestfs_get_append"
27298 #: ../src/guestfs-actions.pod:2354
27302 " guestfs_get_append (guestfs_h *g);\n"
27307 #: ../src/guestfs-actions.pod:2362
27309 "This function returns a string which may be NULL. There is no way to return "
27310 "an error from this function. The string is owned by the guest handle and "
27311 "must I<not> be freed."
27315 #: ../src/guestfs-actions.pod:2366 ../src/guestfs-actions.pod:6154
27316 #: ../src/guestfs-actions.pod:6636 ../src/guestfs-actions.pod:7094
27317 #: ../src/guestfs-actions.pod:7113 ../src/guestfs-actions.pod:7129
27318 #: ../src/guestfs-actions.pod:7153 ../src/guestfs-actions.pod:7907
27319 #: ../src/guestfs-actions.pod:7922 ../src/guestfs-actions.pod:8314
27320 msgid "(Added in 1.0.26)"
27324 #: ../src/guestfs-actions.pod:2368
27325 msgid "guestfs_get_attach_method"
27329 #: ../src/guestfs-actions.pod:2370
27333 " guestfs_get_attach_method (guestfs_h *g);\n"
27338 #: ../src/guestfs-actions.pod:2373
27339 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27343 #: ../src/guestfs-actions.pod:2378 ../src/guestfs-actions.pod:6666
27344 msgid "(Added in 1.9.8)"
27348 #: ../src/guestfs-actions.pod:2380
27349 msgid "guestfs_get_autosync"
27353 #: ../src/guestfs-actions.pod:2382
27357 " guestfs_get_autosync (guestfs_h *g);\n"
27362 #: ../src/guestfs-actions.pod:2391
27363 msgid "guestfs_get_direct"
27367 #: ../src/guestfs-actions.pod:2393
27371 " guestfs_get_direct (guestfs_h *g);\n"
27376 #: ../src/guestfs-actions.pod:2400 ../src/guestfs-actions.pod:6707
27377 msgid "(Added in 1.0.72)"
27381 #: ../src/guestfs-actions.pod:2402
27382 msgid "guestfs_get_e2label"
27386 #: ../src/guestfs-actions.pod:2404
27390 " guestfs_get_e2label (guestfs_h *g,\n"
27391 " const char *device);\n"
27396 #: ../src/guestfs-actions.pod:2408
27398 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27403 #: ../src/guestfs-actions.pod:2421 ../src/guestfs-actions.pod:2442
27404 #: ../src/guestfs-actions.pod:6725 ../src/guestfs-actions.pod:6744
27405 msgid "(Added in 1.0.15)"
27409 #: ../src/guestfs-actions.pod:2423
27410 msgid "guestfs_get_e2uuid"
27414 #: ../src/guestfs-actions.pod:2425
27418 " guestfs_get_e2uuid (guestfs_h *g,\n"
27419 " const char *device);\n"
27424 #: ../src/guestfs-actions.pod:2429
27426 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27431 #: ../src/guestfs-actions.pod:2444
27432 msgid "guestfs_get_memsize"
27436 #: ../src/guestfs-actions.pod:2446
27440 " guestfs_get_memsize (guestfs_h *g);\n"
27445 #: ../src/guestfs-actions.pod:2452
27447 "If C<guestfs_set_memsize> was not called on this handle, and if "
27448 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27449 "value for memsize."
27453 #: ../src/guestfs-actions.pod:2461 ../src/guestfs-actions.pod:5049
27454 #: ../src/guestfs-actions.pod:5258 ../src/guestfs-actions.pod:5277
27455 #: ../src/guestfs-actions.pod:5296 ../src/guestfs-actions.pod:5308
27456 #: ../src/guestfs-actions.pod:5325 ../src/guestfs-actions.pod:5338
27457 #: ../src/guestfs-actions.pod:6379 ../src/guestfs-actions.pod:6765
27458 #: ../src/guestfs-actions.pod:7061 ../src/guestfs-actions.pod:7676
27459 msgid "(Added in 1.0.55)"
27463 #: ../src/guestfs-actions.pod:2463
27464 msgid "guestfs_get_network"
27468 #: ../src/guestfs-actions.pod:2465
27472 " guestfs_get_network (guestfs_h *g);\n"
27477 #: ../src/guestfs-actions.pod:2472 ../src/guestfs-actions.pod:6784
27478 msgid "(Added in 1.5.4)"
27482 #: ../src/guestfs-actions.pod:2474
27483 msgid "guestfs_get_path"
27487 #: ../src/guestfs-actions.pod:2476
27491 " guestfs_get_path (guestfs_h *g);\n"
27496 #: ../src/guestfs-actions.pod:2484 ../src/guestfs-actions.pod:2524
27498 "This function returns a string, or NULL on error. The string is owned by "
27499 "the guest handle and must I<not> be freed."
27503 #: ../src/guestfs-actions.pod:2489
27504 msgid "guestfs_get_pgroup"
27508 #: ../src/guestfs-actions.pod:2491
27512 " guestfs_get_pgroup (guestfs_h *g);\n"
27517 #: ../src/guestfs-actions.pod:2498 ../src/guestfs-actions.pod:6820
27518 #: ../src/guestfs-actions.pod:8168
27519 msgid "(Added in 1.11.18)"
27523 #: ../src/guestfs-actions.pod:2500
27524 msgid "guestfs_get_pid"
27528 #: ../src/guestfs-actions.pod:2502
27532 " guestfs_get_pid (guestfs_h *g);\n"
27537 #: ../src/guestfs-actions.pod:2512
27538 msgid "(Added in 1.0.56)"
27542 #: ../src/guestfs-actions.pod:2514
27543 msgid "guestfs_get_qemu"
27547 #: ../src/guestfs-actions.pod:2516
27551 " guestfs_get_qemu (guestfs_h *g);\n"
27556 #: ../src/guestfs-actions.pod:2527 ../src/guestfs-actions.pod:6848
27557 msgid "(Added in 1.0.6)"
27561 #: ../src/guestfs-actions.pod:2529
27562 msgid "guestfs_get_recovery_proc"
27566 #: ../src/guestfs-actions.pod:2531
27570 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27575 #: ../src/guestfs-actions.pod:2538 ../src/guestfs-actions.pod:4122
27576 #: ../src/guestfs-actions.pod:4453 ../src/guestfs-actions.pod:4856
27577 #: ../src/guestfs-actions.pod:4888 ../src/guestfs-actions.pod:6084
27578 #: ../src/guestfs-actions.pod:6427 ../src/guestfs-actions.pod:6872
27579 #: ../src/guestfs-actions.pod:7579 ../src/guestfs-actions.pod:7599
27580 #: ../src/guestfs-actions.pod:7791
27581 msgid "(Added in 1.0.77)"
27585 #: ../src/guestfs-actions.pod:2540
27586 msgid "guestfs_get_selinux"
27590 #: ../src/guestfs-actions.pod:2542
27594 " guestfs_get_selinux (guestfs_h *g);\n"
27599 #: ../src/guestfs-actions.pod:2545
27601 "This returns the current setting of the selinux flag which is passed to the "
27602 "appliance at boot time. See C<guestfs_set_selinux>."
27606 #: ../src/guestfs-actions.pod:2553 ../src/guestfs-actions.pod:2627
27607 #: ../src/guestfs-actions.pod:6891 ../src/guestfs-actions.pod:6965
27608 msgid "(Added in 1.0.67)"
27612 #: ../src/guestfs-actions.pod:2555
27613 msgid "guestfs_get_smp"
27617 #: ../src/guestfs-actions.pod:2557
27621 " guestfs_get_smp (guestfs_h *g);\n"
27626 #: ../src/guestfs-actions.pod:2566
27627 msgid "guestfs_get_state"
27631 #: ../src/guestfs-actions.pod:2568
27635 " guestfs_get_state (guestfs_h *g);\n"
27640 #: ../src/guestfs-actions.pod:2580
27641 msgid "guestfs_get_trace"
27645 #: ../src/guestfs-actions.pod:2582
27649 " guestfs_get_trace (guestfs_h *g);\n"
27654 #: ../src/guestfs-actions.pod:2591
27655 msgid "guestfs_get_umask"
27659 #: ../src/guestfs-actions.pod:2593
27663 " guestfs_get_umask (guestfs_h *g);\n"
27668 #: ../src/guestfs-actions.pod:2596
27670 "Return the current umask. By default the umask is C<022> unless it has been "
27671 "set by calling C<guestfs_umask>."
27675 #: ../src/guestfs-actions.pod:2603
27676 msgid "guestfs_get_verbose"
27680 #: ../src/guestfs-actions.pod:2605
27684 " guestfs_get_verbose (guestfs_h *g);\n"
27689 #: ../src/guestfs-actions.pod:2614
27690 msgid "guestfs_getcon"
27694 #: ../src/guestfs-actions.pod:2616
27698 " guestfs_getcon (guestfs_h *g);\n"
27703 #: ../src/guestfs-actions.pod:2621
27705 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
27709 #: ../src/guestfs-actions.pod:2629
27710 msgid "guestfs_getxattr"
27714 #: ../src/guestfs-actions.pod:2631
27718 " guestfs_getxattr (guestfs_h *g,\n"
27719 " const char *path,\n"
27720 " const char *name,\n"
27721 " size_t *size_r);\n"
27726 #: ../src/guestfs-actions.pod:2637
27728 "Get a single extended attribute from file C<path> named C<name>. This call "
27729 "follows symlinks. If you want to lookup an extended attribute for the "
27730 "symlink itself, use C<guestfs_lgetxattr>."
27734 #: ../src/guestfs-actions.pod:2641 ../src/guestfs-actions.pod:4136
27736 "Normally it is better to get all extended attributes from a file in one go "
27737 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
27738 "implementations are buggy and do not provide a way to list out attributes. "
27739 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27740 "extended attributes you want in advance and call this function."
27744 #: ../src/guestfs-actions.pod:2651
27745 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27749 #: ../src/guestfs-actions.pod:2653 ../src/guestfs-actions.pod:2866
27750 #: ../src/guestfs-actions.pod:3348 ../src/guestfs-actions.pod:4148
27751 #: ../src/guestfs-actions.pod:6077 ../src/guestfs-actions.pod:6103
27752 #: ../src/guestfs-actions.pod:6284
27754 "This function returns a buffer, or NULL on error. The size of the returned "
27755 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
27760 #: ../src/guestfs-actions.pod:2657 ../src/guestfs-actions.pod:4152
27761 msgid "(Added in 1.7.24)"
27765 #: ../src/guestfs-actions.pod:2659
27766 msgid "guestfs_getxattrs"
27770 #: ../src/guestfs-actions.pod:2661
27773 " struct guestfs_xattr_list *\n"
27774 " guestfs_getxattrs (guestfs_h *g,\n"
27775 " const char *path);\n"
27780 #: ../src/guestfs-actions.pod:2671
27781 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27785 #: ../src/guestfs-actions.pod:2673 ../src/guestfs-actions.pod:4164
27786 #: ../src/guestfs-actions.pod:4852
27788 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
27789 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27793 #: ../src/guestfs-actions.pod:2677 ../src/guestfs-actions.pod:4168
27794 #: ../src/guestfs-actions.pod:4367 ../src/guestfs-actions.pod:4403
27795 #: ../src/guestfs-actions.pod:6457 ../src/guestfs-actions.pod:6984
27796 #: ../src/guestfs-actions.pod:8379
27797 msgid "(Added in 1.0.59)"
27801 #: ../src/guestfs-actions.pod:2679
27802 msgid "guestfs_glob_expand"
27806 #: ../src/guestfs-actions.pod:2681
27810 " guestfs_glob_expand (guestfs_h *g,\n"
27811 " const char *pattern);\n"
27816 #: ../src/guestfs-actions.pod:2700 ../src/guestfs-actions.pod:7177
27817 #: ../src/guestfs-actions.pod:7194
27818 msgid "(Added in 1.0.50)"
27822 #: ../src/guestfs-actions.pod:2702
27823 msgid "guestfs_grep"
27827 #: ../src/guestfs-actions.pod:2704
27831 " guestfs_grep (guestfs_h *g,\n"
27832 " const char *regex,\n"
27833 " const char *path);\n"
27838 #: ../src/guestfs-actions.pod:2721
27839 msgid "guestfs_grepi"
27843 #: ../src/guestfs-actions.pod:2723
27847 " guestfs_grepi (guestfs_h *g,\n"
27848 " const char *regex,\n"
27849 " const char *path);\n"
27854 #: ../src/guestfs-actions.pod:2740
27855 msgid "guestfs_grub_install"
27859 #: ../src/guestfs-actions.pod:2742
27863 " guestfs_grub_install (guestfs_h *g,\n"
27864 " const char *root,\n"
27865 " const char *device);\n"
27870 #: ../src/guestfs-actions.pod:2785
27871 msgid "(Added in 1.0.17)"
27875 #: ../src/guestfs-actions.pod:2787
27876 msgid "guestfs_head"
27880 #: ../src/guestfs-actions.pod:2789
27884 " guestfs_head (guestfs_h *g,\n"
27885 " const char *path);\n"
27890 #: ../src/guestfs-actions.pod:2805
27891 msgid "guestfs_head_n"
27895 #: ../src/guestfs-actions.pod:2807
27899 " guestfs_head_n (guestfs_h *g,\n"
27901 " const char *path);\n"
27906 #: ../src/guestfs-actions.pod:2829
27907 msgid "guestfs_hexdump"
27911 #: ../src/guestfs-actions.pod:2831
27915 " guestfs_hexdump (guestfs_h *g,\n"
27916 " const char *path);\n"
27921 #: ../src/guestfs-actions.pod:2844 ../src/guestfs-actions.pod:7258
27922 #: ../src/guestfs-actions.pod:7313
27923 msgid "(Added in 1.0.22)"
27927 #: ../src/guestfs-actions.pod:2846
27928 msgid "guestfs_initrd_cat"
27932 #: ../src/guestfs-actions.pod:2848
27936 " guestfs_initrd_cat (guestfs_h *g,\n"
27937 " const char *initrdpath,\n"
27938 " const char *filename,\n"
27939 " size_t *size_r);\n"
27944 #: ../src/guestfs-actions.pod:2864
27945 msgid "See also C<guestfs_initrd_list>."
27949 #: ../src/guestfs-actions.pod:2875
27950 msgid "guestfs_initrd_list"
27954 #: ../src/guestfs-actions.pod:2877
27958 " guestfs_initrd_list (guestfs_h *g,\n"
27959 " const char *path);\n"
27964 #: ../src/guestfs-actions.pod:2897
27965 msgid "guestfs_inotify_add_watch"
27969 #: ../src/guestfs-actions.pod:2899
27973 " guestfs_inotify_add_watch (guestfs_h *g,\n"
27974 " const char *path,\n"
27980 #: ../src/guestfs-actions.pod:2918
27981 msgid "guestfs_inotify_close"
27985 #: ../src/guestfs-actions.pod:2920
27989 " guestfs_inotify_close (guestfs_h *g);\n"
27994 #: ../src/guestfs-actions.pod:2931
27995 msgid "guestfs_inotify_files"
27999 #: ../src/guestfs-actions.pod:2933
28003 " guestfs_inotify_files (guestfs_h *g);\n"
28008 #: ../src/guestfs-actions.pod:2936
28010 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
28011 "returns a list of pathnames of objects that were touched. The returned "
28012 "pathnames are sorted and deduplicated."
28016 #: ../src/guestfs-actions.pod:2946
28017 msgid "guestfs_inotify_init"
28021 #: ../src/guestfs-actions.pod:2948
28025 " guestfs_inotify_init (guestfs_h *g,\n"
28026 " int maxevents);\n"
28031 #: ../src/guestfs-actions.pod:2956
28033 "C<maxevents> is the maximum number of events which will be queued up between "
28034 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
28035 "passed as C<0>, then the kernel (or previously set) default is used. For "
28036 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
28037 "throws away events, but records the fact that it threw them away by setting "
28038 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
28039 "C<guestfs_inotify_read>)."
28043 #: ../src/guestfs-actions.pod:2966
28045 "Before any events are generated, you have to add some watches to the "
28046 "internal watch list. See: C<guestfs_inotify_add_watch>, "
28047 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
28051 #: ../src/guestfs-actions.pod:2972
28053 "Queued up events should be read periodically by calling "
28054 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
28055 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
28056 "often enough then you risk the internal queue overflowing."
28060 #: ../src/guestfs-actions.pod:2979
28062 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
28063 "This also removes any watches automatically."
28067 #: ../src/guestfs-actions.pod:2992
28068 msgid "guestfs_inotify_read"
28072 #: ../src/guestfs-actions.pod:2994
28075 " struct guestfs_inotify_event_list *\n"
28076 " guestfs_inotify_read (guestfs_h *g);\n"
28081 #: ../src/guestfs-actions.pod:3008
28083 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
28084 "there was an error. I<The caller must call "
28085 "C<guestfs_free_inotify_event_list> after use>."
28089 #: ../src/guestfs-actions.pod:3014
28090 msgid "guestfs_inotify_rm_watch"
28094 #: ../src/guestfs-actions.pod:3016
28098 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
28104 #: ../src/guestfs-actions.pod:3020
28106 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
28110 #: ../src/guestfs-actions.pod:3027
28111 msgid "guestfs_inspect_get_arch"
28115 #: ../src/guestfs-actions.pod:3029
28119 " guestfs_inspect_get_arch (guestfs_h *g,\n"
28120 " const char *root);\n"
28125 #: ../src/guestfs-actions.pod:3033
28127 "This returns the architecture of the inspected operating system. The "
28128 "possible return values are listed under C<guestfs_file_architecture>."
28132 #: ../src/guestfs-actions.pod:3047
28133 msgid "guestfs_inspect_get_distro"
28137 #: ../src/guestfs-actions.pod:3049
28141 " guestfs_inspect_get_distro (guestfs_h *g,\n"
28142 " const char *root);\n"
28147 #: ../src/guestfs-actions.pod:3149
28148 msgid "guestfs_inspect_get_drive_mappings"
28152 #: ../src/guestfs-actions.pod:3151
28156 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
28157 " const char *root);\n"
28162 #: ../src/guestfs-actions.pod:3180
28164 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28165 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
28169 #: ../src/guestfs-actions.pod:3184 ../src/guestfs-actions.pod:3452
28170 #: ../src/guestfs-actions.pod:4255 ../src/guestfs-actions.pod:5527
28171 #: ../src/guestfs-actions.pod:7615
28173 "This function returns a NULL-terminated array of strings, or NULL if there "
28174 "was an error. The array of strings will always have length C<2n+1>, where "
28175 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
28176 "caller must free the strings and the array after use>."
28180 #: ../src/guestfs-actions.pod:3190 ../src/guestfs-actions.pod:3651
28181 msgid "(Added in 1.9.17)"
28185 #: ../src/guestfs-actions.pod:3192
28186 msgid "guestfs_inspect_get_filesystems"
28190 #: ../src/guestfs-actions.pod:3194
28194 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
28195 " const char *root);\n"
28200 #: ../src/guestfs-actions.pod:3206
28202 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28203 "C<guestfs_inspect_get_mountpoints>."
28207 #: ../src/guestfs-actions.pod:3215
28208 msgid "guestfs_inspect_get_format"
28212 #: ../src/guestfs-actions.pod:3217
28216 " guestfs_inspect_get_format (guestfs_h *g,\n"
28217 " const char *root);\n"
28222 #: ../src/guestfs-actions.pod:3251 ../src/guestfs-actions.pod:3687
28223 #: ../src/guestfs-actions.pod:3703 ../src/guestfs-actions.pod:3721
28224 #: ../src/guestfs-actions.pod:6495
28225 msgid "(Added in 1.9.4)"
28229 #: ../src/guestfs-actions.pod:3253
28230 msgid "guestfs_inspect_get_hostname"
28234 #: ../src/guestfs-actions.pod:3255
28238 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28239 " const char *root);\n"
28244 #: ../src/guestfs-actions.pod:3270
28245 msgid "(Added in 1.7.9)"
28249 #: ../src/guestfs-actions.pod:3272
28250 msgid "guestfs_inspect_get_icon"
28254 #: ../src/guestfs-actions.pod:3274
28258 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28259 " const char *root,\n"
28260 " size_t *size_r,\n"
28266 #: ../src/guestfs-actions.pod:3285
28269 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28270 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28275 #: ../src/guestfs-actions.pod:3352 ../src/guestfs-actions.pod:4182
28276 #: ../src/guestfs-actions.pod:5426
28277 msgid "(Added in 1.11.12)"
28281 #: ../src/guestfs-actions.pod:3354
28282 msgid "guestfs_inspect_get_icon_va"
28286 #: ../src/guestfs-actions.pod:3356
28290 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28291 " const char *root,\n"
28292 " size_t *size_r,\n"
28293 " va_list args);\n"
28298 #: ../src/guestfs-actions.pod:3362
28299 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28303 #: ../src/guestfs-actions.pod:3366
28304 msgid "guestfs_inspect_get_icon_argv"
28308 #: ../src/guestfs-actions.pod:3368
28312 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28313 " const char *root,\n"
28314 " size_t *size_r,\n"
28315 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
28320 #: ../src/guestfs-actions.pod:3374
28321 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28325 #: ../src/guestfs-actions.pod:3378
28326 msgid "guestfs_inspect_get_major_version"
28330 #: ../src/guestfs-actions.pod:3380
28334 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28335 " const char *root);\n"
28340 #: ../src/guestfs-actions.pod:3402
28341 msgid "guestfs_inspect_get_minor_version"
28345 #: ../src/guestfs-actions.pod:3404
28349 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28350 " const char *root);\n"
28355 #: ../src/guestfs-actions.pod:3413
28357 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28358 "C<guestfs_inspect_get_major_version>."
28362 #: ../src/guestfs-actions.pod:3420
28363 msgid "guestfs_inspect_get_mountpoints"
28367 #: ../src/guestfs-actions.pod:3422
28371 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28372 " const char *root);\n"
28377 #: ../src/guestfs-actions.pod:3443
28379 "For operating systems like Windows which still use drive letters, this call "
28380 "will only return an entry for the first drive \"mounted on\" C</>. For "
28381 "information about the mapping of drive letters to partitions, see "
28382 "C<guestfs_inspect_get_drive_mappings>."
28386 #: ../src/guestfs-actions.pod:3449
28388 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28389 "C<guestfs_inspect_get_filesystems>."
28393 #: ../src/guestfs-actions.pod:3460
28394 msgid "guestfs_inspect_get_package_format"
28398 #: ../src/guestfs-actions.pod:3462
28402 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28403 " const char *root);\n"
28408 #: ../src/guestfs-actions.pod:3466
28410 "This function and C<guestfs_inspect_get_package_management> return the "
28411 "package format and package management tool used by the inspected operating "
28412 "system. For example for Fedora these functions would return C<rpm> (package "
28413 "format) and C<yum> (package management)."
28417 #: ../src/guestfs-actions.pod:3485 ../src/guestfs-actions.pod:3513
28418 msgid "(Added in 1.7.5)"
28422 #: ../src/guestfs-actions.pod:3487
28423 msgid "guestfs_inspect_get_package_management"
28427 #: ../src/guestfs-actions.pod:3489
28431 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28432 " const char *root);\n"
28437 #: ../src/guestfs-actions.pod:3493
28439 "C<guestfs_inspect_get_package_format> and this function return the package "
28440 "format and package management tool used by the inspected operating system. "
28441 "For example for Fedora these functions would return C<rpm> (package format) "
28442 "and C<yum> (package management)."
28446 #: ../src/guestfs-actions.pod:3515
28447 msgid "guestfs_inspect_get_product_name"
28451 #: ../src/guestfs-actions.pod:3517
28455 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28456 " const char *root);\n"
28461 #: ../src/guestfs-actions.pod:3536
28462 msgid "guestfs_inspect_get_product_variant"
28466 #: ../src/guestfs-actions.pod:3538
28470 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28471 " const char *root);\n"
28476 #: ../src/guestfs-actions.pod:3561
28478 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28479 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28483 #: ../src/guestfs-actions.pod:3568
28484 msgid "(Added in 1.9.13)"
28488 #: ../src/guestfs-actions.pod:3570
28489 msgid "guestfs_inspect_get_roots"
28493 #: ../src/guestfs-actions.pod:3572
28497 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28502 #: ../src/guestfs-actions.pod:3575
28504 "This function is a convenient way to get the list of root devices, as "
28505 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28506 "the whole inspection process."
28510 #: ../src/guestfs-actions.pod:3579
28512 "This returns an empty list if either no root devices were found or the "
28513 "caller has not called C<guestfs_inspect_os>."
28517 #: ../src/guestfs-actions.pod:3588
28518 msgid "(Added in 1.7.3)"
28522 #: ../src/guestfs-actions.pod:3590
28523 msgid "guestfs_inspect_get_type"
28527 #: ../src/guestfs-actions.pod:3592
28531 " guestfs_inspect_get_type (guestfs_h *g,\n"
28532 " const char *root);\n"
28537 #: ../src/guestfs-actions.pod:3633
28538 msgid "guestfs_inspect_get_windows_current_control_set"
28542 #: ../src/guestfs-actions.pod:3635
28546 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28547 " const char *root);\n"
28552 #: ../src/guestfs-actions.pod:3653
28553 msgid "guestfs_inspect_get_windows_systemroot"
28557 #: ../src/guestfs-actions.pod:3655
28561 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28562 " const char *root);\n"
28567 #: ../src/guestfs-actions.pod:3671
28568 msgid "(Added in 1.5.25)"
28572 #: ../src/guestfs-actions.pod:3673
28573 msgid "guestfs_inspect_is_live"
28577 #: ../src/guestfs-actions.pod:3675
28581 " guestfs_inspect_is_live (guestfs_h *g,\n"
28582 " const char *root);\n"
28587 #: ../src/guestfs-actions.pod:3679
28589 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28590 "disk), then this returns true if a live image was detected on the disk."
28594 #: ../src/guestfs-actions.pod:3689
28595 msgid "guestfs_inspect_is_multipart"
28599 #: ../src/guestfs-actions.pod:3691
28603 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28604 " const char *root);\n"
28609 #: ../src/guestfs-actions.pod:3695
28611 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28612 "disk), then this returns true if the disk is part of a set."
28616 #: ../src/guestfs-actions.pod:3705
28617 msgid "guestfs_inspect_is_netinst"
28621 #: ../src/guestfs-actions.pod:3707
28625 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28626 " const char *root);\n"
28631 #: ../src/guestfs-actions.pod:3711
28633 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28634 "disk), then this returns true if the disk is a network installer, ie. not a "
28635 "self-contained install CD but one which is likely to require network access "
28636 "to complete the install."
28640 #: ../src/guestfs-actions.pod:3723
28641 msgid "guestfs_inspect_list_applications"
28645 #: ../src/guestfs-actions.pod:3725
28648 " struct guestfs_application_list *\n"
28649 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28650 " const char *root);\n"
28655 #: ../src/guestfs-actions.pod:3731
28657 "I<Note:> This call works differently from other parts of the inspection "
28658 "API. You have to call C<guestfs_inspect_os>, then "
28659 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28660 "this. Listing applications is a significantly more difficult operation "
28661 "which requires access to the full filesystem. Also note that unlike the "
28662 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28663 "the libguestfs handle, this call actually reads parts of the mounted "
28664 "filesystems during the call."
28668 #: ../src/guestfs-actions.pod:3821
28670 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28671 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28676 #: ../src/guestfs-actions.pod:3825
28677 msgid "(Added in 1.7.8)"
28681 #: ../src/guestfs-actions.pod:3827
28682 msgid "guestfs_inspect_os"
28686 #: ../src/guestfs-actions.pod:3829
28690 " guestfs_inspect_os (guestfs_h *g);\n"
28695 #: ../src/guestfs-actions.pod:3845
28697 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28698 "functions in order to query further information about each operating system, "
28699 "such as the name and version."
28703 #: ../src/guestfs-actions.pod:3850
28705 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
28706 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
28707 "the contents. This should be called with no disks currently mounted. The "
28708 "function may also use Augeas, so any existing Augeas handle will be closed."
28712 #: ../src/guestfs-actions.pod:3862 ../src/guestfs-actions.pod:4193
28713 #: ../src/guestfs-actions.pod:4275
28714 msgid "See also C<guestfs_list_filesystems>."
28718 #: ../src/guestfs-actions.pod:3870
28719 msgid "guestfs_is_blockdev"
28723 #: ../src/guestfs-actions.pod:3872
28727 " guestfs_is_blockdev (guestfs_h *g,\n"
28728 " const char *path);\n"
28733 #: ../src/guestfs-actions.pod:3879 ../src/guestfs-actions.pod:3908
28734 #: ../src/guestfs-actions.pod:3938 ../src/guestfs-actions.pod:3953
28735 #: ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:4025
28736 #: ../src/guestfs-actions.pod:4040
28737 msgid "See also C<guestfs_stat>."
28741 #: ../src/guestfs-actions.pod:3883 ../src/guestfs-actions.pod:3912
28742 #: ../src/guestfs-actions.pod:3957 ../src/guestfs-actions.pod:4029
28743 #: ../src/guestfs-actions.pod:4044
28744 msgid "(Added in 1.5.10)"
28748 #: ../src/guestfs-actions.pod:3885
28749 msgid "guestfs_is_busy"
28753 #: ../src/guestfs-actions.pod:3887
28757 " guestfs_is_busy (guestfs_h *g);\n"
28762 #: ../src/guestfs-actions.pod:3899
28763 msgid "guestfs_is_chardev"
28767 #: ../src/guestfs-actions.pod:3901
28771 " guestfs_is_chardev (guestfs_h *g,\n"
28772 " const char *path);\n"
28777 #: ../src/guestfs-actions.pod:3914
28778 msgid "guestfs_is_config"
28782 #: ../src/guestfs-actions.pod:3916
28786 " guestfs_is_config (guestfs_h *g);\n"
28791 #: ../src/guestfs-actions.pod:3928
28792 msgid "guestfs_is_dir"
28796 #: ../src/guestfs-actions.pod:3930
28800 " guestfs_is_dir (guestfs_h *g,\n"
28801 " const char *path);\n"
28806 #: ../src/guestfs-actions.pod:3944
28807 msgid "guestfs_is_fifo"
28811 #: ../src/guestfs-actions.pod:3946
28815 " guestfs_is_fifo (guestfs_h *g,\n"
28816 " const char *path);\n"
28821 #: ../src/guestfs-actions.pod:3959
28822 msgid "guestfs_is_file"
28826 #: ../src/guestfs-actions.pod:3961
28830 " guestfs_is_file (guestfs_h *g,\n"
28831 " const char *path);\n"
28836 #: ../src/guestfs-actions.pod:3975
28837 msgid "guestfs_is_launching"
28841 #: ../src/guestfs-actions.pod:3977
28845 " guestfs_is_launching (guestfs_h *g);\n"
28850 #: ../src/guestfs-actions.pod:3989
28851 msgid "guestfs_is_lv"
28855 #: ../src/guestfs-actions.pod:3991
28859 " guestfs_is_lv (guestfs_h *g,\n"
28860 " const char *device);\n"
28865 #: ../src/guestfs-actions.pod:4002
28866 msgid "guestfs_is_ready"
28870 #: ../src/guestfs-actions.pod:4004
28874 " guestfs_is_ready (guestfs_h *g);\n"
28879 #: ../src/guestfs-actions.pod:4016
28880 msgid "guestfs_is_socket"
28884 #: ../src/guestfs-actions.pod:4018
28888 " guestfs_is_socket (guestfs_h *g,\n"
28889 " const char *path);\n"
28894 #: ../src/guestfs-actions.pod:4031
28895 msgid "guestfs_is_symlink"
28899 #: ../src/guestfs-actions.pod:4033
28903 " guestfs_is_symlink (guestfs_h *g,\n"
28904 " const char *path);\n"
28909 #: ../src/guestfs-actions.pod:4046
28910 msgid "guestfs_is_zero"
28914 #: ../src/guestfs-actions.pod:4048
28918 " guestfs_is_zero (guestfs_h *g,\n"
28919 " const char *path);\n"
28924 #: ../src/guestfs-actions.pod:4057 ../src/guestfs-actions.pod:4071
28925 msgid "(Added in 1.11.8)"
28929 #: ../src/guestfs-actions.pod:4059
28930 msgid "guestfs_is_zero_device"
28934 #: ../src/guestfs-actions.pod:4061
28938 " guestfs_is_zero_device (guestfs_h *g,\n"
28939 " const char *device);\n"
28944 #: ../src/guestfs-actions.pod:4073
28945 msgid "guestfs_kill_subprocess"
28949 #: ../src/guestfs-actions.pod:4075
28953 " guestfs_kill_subprocess (guestfs_h *g);\n"
28958 #: ../src/guestfs-actions.pod:4084
28959 msgid "guestfs_launch"
28963 #: ../src/guestfs-actions.pod:4086
28967 " guestfs_launch (guestfs_h *g);\n"
28972 #: ../src/guestfs-actions.pod:4104
28973 msgid "guestfs_lchown"
28977 #: ../src/guestfs-actions.pod:4106
28981 " guestfs_lchown (guestfs_h *g,\n"
28984 " const char *path);\n"
28989 #: ../src/guestfs-actions.pod:4112
28991 "Change the file owner to C<owner> and group to C<group>. This is like "
28992 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
28993 "changed, not the target."
28997 #: ../src/guestfs-actions.pod:4124
28998 msgid "guestfs_lgetxattr"
29002 #: ../src/guestfs-actions.pod:4126
29006 " guestfs_lgetxattr (guestfs_h *g,\n"
29007 " const char *path,\n"
29008 " const char *name,\n"
29009 " size_t *size_r);\n"
29014 #: ../src/guestfs-actions.pod:4146
29015 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
29019 #: ../src/guestfs-actions.pod:4154
29020 msgid "guestfs_lgetxattrs"
29024 #: ../src/guestfs-actions.pod:4156
29027 " struct guestfs_xattr_list *\n"
29028 " guestfs_lgetxattrs (guestfs_h *g,\n"
29029 " const char *path);\n"
29034 #: ../src/guestfs-actions.pod:4160
29036 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
29037 "then it returns the extended attributes of the link itself."
29041 #: ../src/guestfs-actions.pod:4170
29042 msgid "guestfs_list_9p"
29046 #: ../src/guestfs-actions.pod:4172
29050 " guestfs_list_9p (guestfs_h *g);\n"
29055 #: ../src/guestfs-actions.pod:4184
29056 msgid "guestfs_list_devices"
29060 #: ../src/guestfs-actions.pod:4186
29064 " guestfs_list_devices (guestfs_h *g);\n"
29069 #: ../src/guestfs-actions.pod:4201
29070 msgid "guestfs_list_dm_devices"
29074 #: ../src/guestfs-actions.pod:4203
29078 " guestfs_list_dm_devices (guestfs_h *g);\n"
29083 #: ../src/guestfs-actions.pod:4208
29085 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
29086 "previous call to C<guestfs_luks_open>."
29090 #: ../src/guestfs-actions.pod:4211
29092 "Device mapper devices which correspond to logical volumes are I<not> "
29093 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
29098 #: ../src/guestfs-actions.pod:4219 ../src/guestfs-actions.pod:5665
29099 msgid "(Added in 1.11.15)"
29103 #: ../src/guestfs-actions.pod:4221
29104 msgid "guestfs_list_filesystems"
29108 #: ../src/guestfs-actions.pod:4223
29112 " guestfs_list_filesystems (guestfs_h *g);\n"
29117 #: ../src/guestfs-actions.pod:4243
29119 "This command runs other libguestfs commands, which might include "
29120 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
29121 "soon after launch and only when nothing is mounted."
29125 #: ../src/guestfs-actions.pod:4247
29127 "Not all of the filesystems returned will be mountable. In particular, swap "
29128 "partitions are returned in the list. Also this command does not check that "
29129 "each filesystem found is valid and mountable, and some filesystems might be "
29130 "mountable but require special options. Filesystems may not all belong to a "
29131 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
29135 #: ../src/guestfs-actions.pod:4261 ../src/guestfs-actions.pod:6028
29136 msgid "(Added in 1.5.15)"
29140 #: ../src/guestfs-actions.pod:4263
29141 msgid "guestfs_list_partitions"
29145 #: ../src/guestfs-actions.pod:4265
29149 " guestfs_list_partitions (guestfs_h *g);\n"
29154 #: ../src/guestfs-actions.pod:4272
29156 "This does not return logical volumes. For that you will need to call "
29161 #: ../src/guestfs-actions.pod:4283
29166 #: ../src/guestfs-actions.pod:4285
29170 " guestfs_ll (guestfs_h *g,\n"
29171 " const char *directory);\n"
29176 #: ../src/guestfs-actions.pod:4300
29181 #: ../src/guestfs-actions.pod:4302
29185 " guestfs_ln (guestfs_h *g,\n"
29186 " const char *target,\n"
29187 " const char *linkname);\n"
29192 #: ../src/guestfs-actions.pod:4313
29193 msgid "guestfs_ln_f"
29197 #: ../src/guestfs-actions.pod:4315
29201 " guestfs_ln_f (guestfs_h *g,\n"
29202 " const char *target,\n"
29203 " const char *linkname);\n"
29208 #: ../src/guestfs-actions.pod:4327
29209 msgid "guestfs_ln_s"
29213 #: ../src/guestfs-actions.pod:4329
29217 " guestfs_ln_s (guestfs_h *g,\n"
29218 " const char *target,\n"
29219 " const char *linkname);\n"
29224 #: ../src/guestfs-actions.pod:4340
29225 msgid "guestfs_ln_sf"
29229 #: ../src/guestfs-actions.pod:4342
29233 " guestfs_ln_sf (guestfs_h *g,\n"
29234 " const char *target,\n"
29235 " const char *linkname);\n"
29240 #: ../src/guestfs-actions.pod:4354
29241 msgid "guestfs_lremovexattr"
29245 #: ../src/guestfs-actions.pod:4356
29249 " guestfs_lremovexattr (guestfs_h *g,\n"
29250 " const char *xattr,\n"
29251 " const char *path);\n"
29256 #: ../src/guestfs-actions.pod:4361
29258 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29259 "link, then it removes an extended attribute of the link itself."
29263 #: ../src/guestfs-actions.pod:4369
29268 #: ../src/guestfs-actions.pod:4371
29272 " guestfs_ls (guestfs_h *g,\n"
29273 " const char *directory);\n"
29278 #: ../src/guestfs-actions.pod:4379
29280 "This command is mostly useful for interactive sessions. Programs should "
29281 "probably use C<guestfs_readdir> instead."
29285 #: ../src/guestfs-actions.pod:4388
29286 msgid "guestfs_lsetxattr"
29290 #: ../src/guestfs-actions.pod:4390
29294 " guestfs_lsetxattr (guestfs_h *g,\n"
29295 " const char *xattr,\n"
29296 " const char *val,\n"
29298 " const char *path);\n"
29303 #: ../src/guestfs-actions.pod:4397
29305 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29306 "then it sets an extended attribute of the link itself."
29310 #: ../src/guestfs-actions.pod:4405
29311 msgid "guestfs_lstat"
29315 #: ../src/guestfs-actions.pod:4407
29318 " struct guestfs_stat *\n"
29319 " guestfs_lstat (guestfs_h *g,\n"
29320 " const char *path);\n"
29325 #: ../src/guestfs-actions.pod:4413
29327 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29328 "link, then the link is stat-ed, not the file it refers to."
29332 #: ../src/guestfs-actions.pod:4419 ../src/guestfs-actions.pod:7218
29334 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29335 "error. I<The caller must call C<guestfs_free_stat> after use>."
29339 #: ../src/guestfs-actions.pod:4423 ../src/guestfs-actions.pod:7222
29340 #: ../src/guestfs-actions.pod:7240 ../src/guestfs-actions.pod:7621
29341 msgid "(Added in 0.9.2)"
29345 #: ../src/guestfs-actions.pod:4425
29346 msgid "guestfs_lstatlist"
29350 #: ../src/guestfs-actions.pod:4427
29353 " struct guestfs_stat_list *\n"
29354 " guestfs_lstatlist (guestfs_h *g,\n"
29355 " const char *path,\n"
29356 " char *const *names);\n"
29361 #: ../src/guestfs-actions.pod:4432
29363 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29364 "files, where all files are in the directory C<path>. C<names> is the list "
29365 "of files from this directory."
29369 #: ../src/guestfs-actions.pod:4441
29371 "This call is intended for programs that want to efficiently list a directory "
29372 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
29373 "for a similarly efficient call for getting extended attributes. Very long "
29374 "directory listings might cause the protocol message size to be exceeded, "
29375 "causing this call to fail. The caller must split up such requests into "
29376 "smaller groups of names."
29380 #: ../src/guestfs-actions.pod:4449
29382 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29383 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29387 #: ../src/guestfs-actions.pod:4455
29388 msgid "guestfs_luks_add_key"
29392 #: ../src/guestfs-actions.pod:4457
29396 " guestfs_luks_add_key (guestfs_h *g,\n"
29397 " const char *device,\n"
29398 " const char *key,\n"
29399 " const char *newkey,\n"
29405 #: ../src/guestfs-actions.pod:4469
29407 "Note that if C<keyslot> already contains a key, then this command will "
29408 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
29412 #: ../src/guestfs-actions.pod:4475 ../src/guestfs-actions.pod:4515
29413 #: ../src/guestfs-actions.pod:4538 ../src/guestfs-actions.pod:4558
29414 #: ../src/guestfs-actions.pod:4593 ../src/guestfs-actions.pod:4612
29416 "This function takes a key or passphrase parameter which could contain "
29417 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29422 #: ../src/guestfs-actions.pod:4479 ../src/guestfs-actions.pod:4519
29423 #: ../src/guestfs-actions.pod:4542 ../src/guestfs-actions.pod:4562
29424 msgid "(Added in 1.5.2)"
29428 #: ../src/guestfs-actions.pod:4481
29429 msgid "guestfs_luks_close"
29433 #: ../src/guestfs-actions.pod:4483
29437 " guestfs_luks_close (guestfs_h *g,\n"
29438 " const char *device);\n"
29443 #: ../src/guestfs-actions.pod:4487
29445 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29446 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
29447 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
29448 "underlying block device."
29452 #: ../src/guestfs-actions.pod:4495 ../src/guestfs-actions.pod:4597
29453 #: ../src/guestfs-actions.pod:4616 ../src/guestfs-actions.pod:4666
29454 #: ../src/guestfs-actions.pod:4714
29455 msgid "(Added in 1.5.1)"
29459 #: ../src/guestfs-actions.pod:4497
29460 msgid "guestfs_luks_format"
29464 #: ../src/guestfs-actions.pod:4499
29468 " guestfs_luks_format (guestfs_h *g,\n"
29469 " const char *device,\n"
29470 " const char *key,\n"
29476 #: ../src/guestfs-actions.pod:4521
29477 msgid "guestfs_luks_format_cipher"
29481 #: ../src/guestfs-actions.pod:4523
29485 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29486 " const char *device,\n"
29487 " const char *key,\n"
29489 " const char *cipher);\n"
29494 #: ../src/guestfs-actions.pod:4530
29496 "This command is the same as C<guestfs_luks_format> but it also allows you to "
29497 "set the C<cipher> used."
29501 #: ../src/guestfs-actions.pod:4544
29502 msgid "guestfs_luks_kill_slot"
29506 #: ../src/guestfs-actions.pod:4546
29510 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29511 " const char *device,\n"
29512 " const char *key,\n"
29518 #: ../src/guestfs-actions.pod:4564
29519 msgid "guestfs_luks_open"
29523 #: ../src/guestfs-actions.pod:4566
29527 " guestfs_luks_open (guestfs_h *g,\n"
29528 " const char *device,\n"
29529 " const char *key,\n"
29530 " const char *mapname);\n"
29535 #: ../src/guestfs-actions.pod:4584
29537 "If this block device contains LVM volume groups, then calling "
29538 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29543 #: ../src/guestfs-actions.pod:4588
29544 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29548 #: ../src/guestfs-actions.pod:4599
29549 msgid "guestfs_luks_open_ro"
29553 #: ../src/guestfs-actions.pod:4601
29557 " guestfs_luks_open_ro (guestfs_h *g,\n"
29558 " const char *device,\n"
29559 " const char *key,\n"
29560 " const char *mapname);\n"
29565 #: ../src/guestfs-actions.pod:4607
29567 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29572 #: ../src/guestfs-actions.pod:4618
29573 msgid "guestfs_lvcreate"
29577 #: ../src/guestfs-actions.pod:4620
29581 " guestfs_lvcreate (guestfs_h *g,\n"
29582 " const char *logvol,\n"
29583 " const char *volgroup,\n"
29589 #: ../src/guestfs-actions.pod:4633
29590 msgid "guestfs_lvm_canonical_lv_name"
29594 #: ../src/guestfs-actions.pod:4635
29598 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29599 " const char *lvname);\n"
29604 #: ../src/guestfs-actions.pod:4646
29605 msgid "See also C<guestfs_is_lv>."
29609 #: ../src/guestfs-actions.pod:4651
29610 msgid "(Added in 1.5.24)"
29614 #: ../src/guestfs-actions.pod:4653
29615 msgid "guestfs_lvm_clear_filter"
29619 #: ../src/guestfs-actions.pod:4655
29623 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29628 #: ../src/guestfs-actions.pod:4658
29630 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29631 "see every block device."
29635 #: ../src/guestfs-actions.pod:4668
29636 msgid "guestfs_lvm_remove_all"
29640 #: ../src/guestfs-actions.pod:4670
29644 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29649 #: ../src/guestfs-actions.pod:4683
29650 msgid "guestfs_lvm_set_filter"
29654 #: ../src/guestfs-actions.pod:4685
29658 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29659 " char *const *devices);\n"
29664 #: ../src/guestfs-actions.pod:4716
29665 msgid "guestfs_lvremove"
29669 #: ../src/guestfs-actions.pod:4718
29673 " guestfs_lvremove (guestfs_h *g,\n"
29674 " const char *device);\n"
29679 #: ../src/guestfs-actions.pod:4730 ../src/guestfs-actions.pod:6141
29680 #: ../src/guestfs-actions.pod:7991
29681 msgid "(Added in 1.0.13)"
29685 #: ../src/guestfs-actions.pod:4732
29686 msgid "guestfs_lvrename"
29690 #: ../src/guestfs-actions.pod:4734
29694 " guestfs_lvrename (guestfs_h *g,\n"
29695 " const char *logvol,\n"
29696 " const char *newlogvol);\n"
29701 #: ../src/guestfs-actions.pod:4743 ../src/guestfs-actions.pod:8004
29702 msgid "(Added in 1.0.83)"
29706 #: ../src/guestfs-actions.pod:4745
29707 msgid "guestfs_lvresize"
29711 #: ../src/guestfs-actions.pod:4747
29715 " guestfs_lvresize (guestfs_h *g,\n"
29716 " const char *device,\n"
29722 #: ../src/guestfs-actions.pod:4760
29723 msgid "guestfs_lvresize_free"
29727 #: ../src/guestfs-actions.pod:4762
29731 " guestfs_lvresize_free (guestfs_h *g,\n"
29732 " const char *lv,\n"
29738 #: ../src/guestfs-actions.pod:4775
29739 msgid "(Added in 1.3.3)"
29743 #: ../src/guestfs-actions.pod:4777
29744 msgid "guestfs_lvs"
29748 #: ../src/guestfs-actions.pod:4779
29752 " guestfs_lvs (guestfs_h *g);\n"
29757 #: ../src/guestfs-actions.pod:4788
29758 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29762 #: ../src/guestfs-actions.pod:4796
29763 msgid "guestfs_lvs_full"
29767 #: ../src/guestfs-actions.pod:4798
29770 " struct guestfs_lvm_lv_list *\n"
29771 " guestfs_lvs_full (guestfs_h *g);\n"
29776 #: ../src/guestfs-actions.pod:4804
29778 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29779 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
29783 #: ../src/guestfs-actions.pod:4810
29784 msgid "guestfs_lvuuid"
29788 #: ../src/guestfs-actions.pod:4812
29792 " guestfs_lvuuid (guestfs_h *g,\n"
29793 " const char *device);\n"
29798 #: ../src/guestfs-actions.pod:4823
29799 msgid "guestfs_lxattrlist"
29803 #: ../src/guestfs-actions.pod:4825
29806 " struct guestfs_xattr_list *\n"
29807 " guestfs_lxattrlist (guestfs_h *g,\n"
29808 " const char *path,\n"
29809 " char *const *names);\n"
29814 #: ../src/guestfs-actions.pod:4844
29816 "This call is intended for programs that want to efficiently list a directory "
29817 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
29818 "a similarly efficient call for getting standard stats. Very long directory "
29819 "listings might cause the protocol message size to be exceeded, causing this "
29820 "call to fail. The caller must split up such requests into smaller groups of "
29825 #: ../src/guestfs-actions.pod:4858
29826 msgid "guestfs_mkdir"
29830 #: ../src/guestfs-actions.pod:4860
29834 " guestfs_mkdir (guestfs_h *g,\n"
29835 " const char *path);\n"
29840 #: ../src/guestfs-actions.pod:4870
29841 msgid "guestfs_mkdir_mode"
29845 #: ../src/guestfs-actions.pod:4872
29849 " guestfs_mkdir_mode (guestfs_h *g,\n"
29850 " const char *path,\n"
29856 #: ../src/guestfs-actions.pod:4884
29857 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
29861 #: ../src/guestfs-actions.pod:4890
29862 msgid "guestfs_mkdir_p"
29866 #: ../src/guestfs-actions.pod:4892
29870 " guestfs_mkdir_p (guestfs_h *g,\n"
29871 " const char *path);\n"
29876 #: ../src/guestfs-actions.pod:4903
29877 msgid "guestfs_mkdtemp"
29881 #: ../src/guestfs-actions.pod:4905
29885 " guestfs_mkdtemp (guestfs_h *g,\n"
29886 " const char *template);\n"
29891 #: ../src/guestfs-actions.pod:4933
29892 msgid "guestfs_mke2fs_J"
29896 #: ../src/guestfs-actions.pod:4935
29900 " guestfs_mke2fs_J (guestfs_h *g,\n"
29901 " const char *fstype,\n"
29902 " int blocksize,\n"
29903 " const char *device,\n"
29904 " const char *journal);\n"
29909 #: ../src/guestfs-actions.pod:4948
29910 msgid "See also C<guestfs_mke2journal>."
29914 #: ../src/guestfs-actions.pod:4952 ../src/guestfs-actions.pod:4970
29915 #: ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5004
29916 #: ../src/guestfs-actions.pod:5018 ../src/guestfs-actions.pod:5032
29917 #: ../src/guestfs-actions.pod:5091 ../src/guestfs-actions.pod:5368
29918 msgid "(Added in 1.0.68)"
29922 #: ../src/guestfs-actions.pod:4954
29923 msgid "guestfs_mke2fs_JL"
29927 #: ../src/guestfs-actions.pod:4956
29931 " guestfs_mke2fs_JL (guestfs_h *g,\n"
29932 " const char *fstype,\n"
29933 " int blocksize,\n"
29934 " const char *device,\n"
29935 " const char *label);\n"
29940 #: ../src/guestfs-actions.pod:4966
29941 msgid "See also C<guestfs_mke2journal_L>."
29945 #: ../src/guestfs-actions.pod:4972
29946 msgid "guestfs_mke2fs_JU"
29950 #: ../src/guestfs-actions.pod:4974
29954 " guestfs_mke2fs_JU (guestfs_h *g,\n"
29955 " const char *fstype,\n"
29956 " int blocksize,\n"
29957 " const char *device,\n"
29958 " const char *uuid);\n"
29963 #: ../src/guestfs-actions.pod:4984
29964 msgid "See also C<guestfs_mke2journal_U>."
29968 #: ../src/guestfs-actions.pod:4990
29969 msgid "guestfs_mke2journal"
29973 #: ../src/guestfs-actions.pod:4992
29977 " guestfs_mke2journal (guestfs_h *g,\n"
29978 " int blocksize,\n"
29979 " const char *device);\n"
29984 #: ../src/guestfs-actions.pod:5006
29985 msgid "guestfs_mke2journal_L"
29989 #: ../src/guestfs-actions.pod:5008
29993 " guestfs_mke2journal_L (guestfs_h *g,\n"
29994 " int blocksize,\n"
29995 " const char *label,\n"
29996 " const char *device);\n"
30001 #: ../src/guestfs-actions.pod:5020
30002 msgid "guestfs_mke2journal_U"
30006 #: ../src/guestfs-actions.pod:5022
30010 " guestfs_mke2journal_U (guestfs_h *g,\n"
30011 " int blocksize,\n"
30012 " const char *uuid,\n"
30013 " const char *device);\n"
30018 #: ../src/guestfs-actions.pod:5034
30019 msgid "guestfs_mkfifo"
30023 #: ../src/guestfs-actions.pod:5036
30027 " guestfs_mkfifo (guestfs_h *g,\n"
30029 " const char *path);\n"
30034 #: ../src/guestfs-actions.pod:5041
30036 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
30037 "is just a convenient wrapper around C<guestfs_mknod>."
30041 #: ../src/guestfs-actions.pod:5051
30042 msgid "guestfs_mkfs"
30046 #: ../src/guestfs-actions.pod:5053
30050 " guestfs_mkfs (guestfs_h *g,\n"
30051 " const char *fstype,\n"
30052 " const char *device);\n"
30057 #: ../src/guestfs-actions.pod:5066
30058 msgid "guestfs_mkfs_b"
30062 #: ../src/guestfs-actions.pod:5068
30066 " guestfs_mkfs_b (guestfs_h *g,\n"
30067 " const char *fstype,\n"
30068 " int blocksize,\n"
30069 " const char *device);\n"
30074 #: ../src/guestfs-actions.pod:5074
30076 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
30081 #: ../src/guestfs-actions.pod:5081
30083 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
30084 "block size of the resulting filesystem. Supported block sizes depend on the "
30085 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
30089 #: ../src/guestfs-actions.pod:5093
30090 msgid "guestfs_mkfs_opts"
30094 #: ../src/guestfs-actions.pod:5095
30098 " guestfs_mkfs_opts (guestfs_h *g,\n"
30099 " const char *fstype,\n"
30100 " const char *device,\n"
30106 #: ../src/guestfs-actions.pod:5106
30109 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
30110 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
30111 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
30112 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
30117 #: ../src/guestfs-actions.pod:5154
30118 msgid "(Added in 1.7.19)"
30122 #: ../src/guestfs-actions.pod:5156
30123 msgid "guestfs_mkfs_opts_va"
30127 #: ../src/guestfs-actions.pod:5158
30131 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
30132 " const char *fstype,\n"
30133 " const char *device,\n"
30134 " va_list args);\n"
30139 #: ../src/guestfs-actions.pod:5164
30140 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
30144 #: ../src/guestfs-actions.pod:5168
30145 msgid "guestfs_mkfs_opts_argv"
30149 #: ../src/guestfs-actions.pod:5170
30153 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
30154 " const char *fstype,\n"
30155 " const char *device,\n"
30156 " const struct guestfs_mkfs_opts_argv *optargs);\n"
30161 #: ../src/guestfs-actions.pod:5176
30162 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
30166 #: ../src/guestfs-actions.pod:5180
30167 msgid "guestfs_mkmountpoint"
30171 #: ../src/guestfs-actions.pod:5182
30175 " guestfs_mkmountpoint (guestfs_h *g,\n"
30176 " const char *exemptpath);\n"
30181 #: ../src/guestfs-actions.pod:5186
30183 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
30184 "that can be used to create extra mountpoints before mounting the first "
30189 #: ../src/guestfs-actions.pod:5210
30191 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
30192 "may get unexpected errors if you try to mix these calls. It is safest to "
30193 "manually unmount filesystems and remove mountpoints after use."
30197 #: ../src/guestfs-actions.pod:5214
30199 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
30200 "first, so for this to work for manual mountpoints, you must ensure that the "
30201 "innermost mountpoints have the longest pathnames, as in the example code "
30206 #: ../src/guestfs-actions.pod:5221
30208 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
30209 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
30210 "can also trigger these issues."
30214 #: ../src/guestfs-actions.pod:5227 ../src/guestfs-actions.pod:5533
30215 #: ../src/guestfs-actions.pod:6561
30216 msgid "(Added in 1.0.62)"
30220 #: ../src/guestfs-actions.pod:5229
30221 msgid "guestfs_mknod"
30225 #: ../src/guestfs-actions.pod:5231
30229 " guestfs_mknod (guestfs_h *g,\n"
30233 " const char *path);\n"
30238 #: ../src/guestfs-actions.pod:5246
30240 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30241 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30242 "regular file). These constants are available in the standard Linux header "
30243 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30244 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
30245 "the appropriate constant for you."
30249 #: ../src/guestfs-actions.pod:5260
30250 msgid "guestfs_mknod_b"
30254 #: ../src/guestfs-actions.pod:5262
30258 " guestfs_mknod_b (guestfs_h *g,\n"
30262 " const char *path);\n"
30267 #: ../src/guestfs-actions.pod:5269
30269 "This call creates a block device node called C<path> with mode C<mode> and "
30270 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30271 "wrapper around C<guestfs_mknod>."
30275 #: ../src/guestfs-actions.pod:5279
30276 msgid "guestfs_mknod_c"
30280 #: ../src/guestfs-actions.pod:5281
30284 " guestfs_mknod_c (guestfs_h *g,\n"
30288 " const char *path);\n"
30293 #: ../src/guestfs-actions.pod:5288
30295 "This call creates a char device node called C<path> with mode C<mode> and "
30296 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30297 "wrapper around C<guestfs_mknod>."
30301 #: ../src/guestfs-actions.pod:5298
30302 msgid "guestfs_mkswap"
30306 #: ../src/guestfs-actions.pod:5300
30310 " guestfs_mkswap (guestfs_h *g,\n"
30311 " const char *device);\n"
30316 #: ../src/guestfs-actions.pod:5310
30317 msgid "guestfs_mkswap_L"
30321 #: ../src/guestfs-actions.pod:5312
30325 " guestfs_mkswap_L (guestfs_h *g,\n"
30326 " const char *label,\n"
30327 " const char *device);\n"
30332 #: ../src/guestfs-actions.pod:5327
30333 msgid "guestfs_mkswap_U"
30337 #: ../src/guestfs-actions.pod:5329
30341 " guestfs_mkswap_U (guestfs_h *g,\n"
30342 " const char *uuid,\n"
30343 " const char *device);\n"
30348 #: ../src/guestfs-actions.pod:5340
30349 msgid "guestfs_mkswap_file"
30353 #: ../src/guestfs-actions.pod:5342
30357 " guestfs_mkswap_file (guestfs_h *g,\n"
30358 " const char *path);\n"
30363 #: ../src/guestfs-actions.pod:5348
30365 "This command just writes a swap file signature to an existing file. To "
30366 "create the file itself, use something like C<guestfs_fallocate>."
30370 #: ../src/guestfs-actions.pod:5355
30371 msgid "guestfs_modprobe"
30375 #: ../src/guestfs-actions.pod:5357
30379 " guestfs_modprobe (guestfs_h *g,\n"
30380 " const char *modulename);\n"
30385 #: ../src/guestfs-actions.pod:5370
30386 msgid "guestfs_mount"
30390 #: ../src/guestfs-actions.pod:5372
30394 " guestfs_mount (guestfs_h *g,\n"
30395 " const char *device,\n"
30396 " const char *mountpoint);\n"
30401 #: ../src/guestfs-actions.pod:5391
30403 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30404 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30405 "problems for users. If your program might need to work with older versions "
30406 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30407 "for the first parameter if you don't want any options)."
30411 #: ../src/guestfs-actions.pod:5402
30412 msgid "guestfs_mount_9p"
30416 #: ../src/guestfs-actions.pod:5404
30420 " guestfs_mount_9p (guestfs_h *g,\n"
30421 " const char *mounttag,\n"
30422 " const char *mountpoint,\n"
30428 #: ../src/guestfs-actions.pod:5415
30431 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30436 #: ../src/guestfs-actions.pod:5428
30437 msgid "guestfs_mount_9p_va"
30441 #: ../src/guestfs-actions.pod:5430
30445 " guestfs_mount_9p_va (guestfs_h *g,\n"
30446 " const char *mounttag,\n"
30447 " const char *mountpoint,\n"
30448 " va_list args);\n"
30453 #: ../src/guestfs-actions.pod:5436
30454 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30458 #: ../src/guestfs-actions.pod:5440
30459 msgid "guestfs_mount_9p_argv"
30463 #: ../src/guestfs-actions.pod:5442
30467 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30468 " const char *mounttag,\n"
30469 " const char *mountpoint,\n"
30470 " const struct guestfs_mount_9p_argv *optargs);\n"
30475 #: ../src/guestfs-actions.pod:5448
30476 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30480 #: ../src/guestfs-actions.pod:5452
30481 msgid "guestfs_mount_loop"
30485 #: ../src/guestfs-actions.pod:5454
30489 " guestfs_mount_loop (guestfs_h *g,\n"
30490 " const char *file,\n"
30491 " const char *mountpoint);\n"
30496 #: ../src/guestfs-actions.pod:5467
30497 msgid "guestfs_mount_options"
30501 #: ../src/guestfs-actions.pod:5469
30505 " guestfs_mount_options (guestfs_h *g,\n"
30506 " const char *options,\n"
30507 " const char *device,\n"
30508 " const char *mountpoint);\n"
30513 #: ../src/guestfs-actions.pod:5475
30515 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30516 "the mount options as for the L<mount(8)> I<-o> flag."
30520 #: ../src/guestfs-actions.pod:5485 ../src/guestfs-actions.pod:5499
30521 #: ../src/guestfs-actions.pod:5516
30522 msgid "(Added in 1.0.10)"
30526 #: ../src/guestfs-actions.pod:5487
30527 msgid "guestfs_mount_ro"
30531 #: ../src/guestfs-actions.pod:5489
30535 " guestfs_mount_ro (guestfs_h *g,\n"
30536 " const char *device,\n"
30537 " const char *mountpoint);\n"
30542 #: ../src/guestfs-actions.pod:5494
30544 "This is the same as the C<guestfs_mount> command, but it mounts the "
30545 "filesystem with the read-only (I<-o ro>) flag."
30549 #: ../src/guestfs-actions.pod:5501
30550 msgid "guestfs_mount_vfs"
30554 #: ../src/guestfs-actions.pod:5503
30558 " guestfs_mount_vfs (guestfs_h *g,\n"
30559 " const char *options,\n"
30560 " const char *vfstype,\n"
30561 " const char *device,\n"
30562 " const char *mountpoint);\n"
30567 #: ../src/guestfs-actions.pod:5510
30569 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30570 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
30575 #: ../src/guestfs-actions.pod:5518
30576 msgid "guestfs_mountpoints"
30580 #: ../src/guestfs-actions.pod:5520
30584 " guestfs_mountpoints (guestfs_h *g);\n"
30589 #: ../src/guestfs-actions.pod:5523
30591 "This call is similar to C<guestfs_mounts>. That call returns a list of "
30592 "devices. This one returns a hash table (map) of device name to directory "
30593 "where the device is mounted."
30597 #: ../src/guestfs-actions.pod:5535
30598 msgid "guestfs_mounts"
30602 #: ../src/guestfs-actions.pod:5537
30606 " guestfs_mounts (guestfs_h *g);\n"
30611 #: ../src/guestfs-actions.pod:5545
30612 msgid "See also: C<guestfs_mountpoints>"
30616 #: ../src/guestfs-actions.pod:5553
30621 #: ../src/guestfs-actions.pod:5555
30625 " guestfs_mv (guestfs_h *g,\n"
30626 " const char *src,\n"
30627 " const char *dest);\n"
30632 #: ../src/guestfs-actions.pod:5567
30633 msgid "guestfs_ntfs_3g_probe"
30637 #: ../src/guestfs-actions.pod:5569
30641 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
30643 " const char *device);\n"
30648 #: ../src/guestfs-actions.pod:5588
30649 msgid "(Added in 1.0.43)"
30653 #: ../src/guestfs-actions.pod:5590
30654 msgid "guestfs_ntfsresize"
30658 #: ../src/guestfs-actions.pod:5592
30662 " guestfs_ntfsresize (guestfs_h *g,\n"
30663 " const char *device);\n"
30668 #: ../src/guestfs-actions.pod:5596 ../src/guestfs-actions.pod:5696
30670 "I<This function is deprecated.> In new code, use the L</"
30671 "guestfs_ntfsresize_opts> call instead."
30675 #: ../src/guestfs-actions.pod:5620
30676 msgid "guestfs_ntfsresize_opts"
30680 #: ../src/guestfs-actions.pod:5622
30684 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
30685 " const char *device,\n"
30691 #: ../src/guestfs-actions.pod:5632
30694 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
30695 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
30700 #: ../src/guestfs-actions.pod:5652
30702 "After the resize operation, the filesystem is always marked as requiring a "
30703 "consistency check (for safety). You have to boot into Windows to perform "
30704 "this check and clear this condition. If you I<don't> set the C<force> "
30705 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
30706 "times on a single filesystem without booting into Windows between each "
30711 #: ../src/guestfs-actions.pod:5667
30712 msgid "guestfs_ntfsresize_opts_va"
30716 #: ../src/guestfs-actions.pod:5669
30720 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
30721 " const char *device,\n"
30722 " va_list args);\n"
30727 #: ../src/guestfs-actions.pod:5674
30728 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
30732 #: ../src/guestfs-actions.pod:5678
30733 msgid "guestfs_ntfsresize_opts_argv"
30737 #: ../src/guestfs-actions.pod:5680
30741 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30742 " const char *device,\n"
30743 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
30748 #: ../src/guestfs-actions.pod:5685
30749 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30753 #: ../src/guestfs-actions.pod:5689
30754 msgid "guestfs_ntfsresize_size"
30758 #: ../src/guestfs-actions.pod:5691
30762 " guestfs_ntfsresize_size (guestfs_h *g,\n"
30763 " const char *device,\n"
30764 " int64_t size);\n"
30769 #: ../src/guestfs-actions.pod:5703
30771 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
30772 "to specify the new size (in bytes) explicitly."
30776 #: ../src/guestfs-actions.pod:5708 ../src/guestfs-actions.pod:6168
30777 #: ../src/guestfs-actions.pod:6241 ../src/guestfs-actions.pod:6509
30778 #: ../src/guestfs-actions.pod:8148
30779 msgid "(Added in 1.3.14)"
30783 #: ../src/guestfs-actions.pod:5710
30784 msgid "guestfs_part_add"
30788 #: ../src/guestfs-actions.pod:5712
30792 " guestfs_part_add (guestfs_h *g,\n"
30793 " const char *device,\n"
30794 " const char *prlogex,\n"
30795 " int64_t startsect,\n"
30796 " int64_t endsect);\n"
30801 #: ../src/guestfs-actions.pod:5719
30803 "This command adds a partition to C<device>. If there is no partition table "
30804 "on the device, call C<guestfs_part_init> first."
30808 #: ../src/guestfs-actions.pod:5731
30810 "Creating a partition which covers the whole disk is not so easy. Use "
30811 "C<guestfs_part_disk> to do that."
30815 #: ../src/guestfs-actions.pod:5736 ../src/guestfs-actions.pod:5774
30816 #: ../src/guestfs-actions.pod:5827 ../src/guestfs-actions.pod:5911
30817 #: ../src/guestfs-actions.pod:5949 ../src/guestfs-actions.pod:5968
30818 #: ../src/guestfs-actions.pod:6008
30819 msgid "(Added in 1.0.78)"
30823 #: ../src/guestfs-actions.pod:5738
30824 msgid "guestfs_part_del"
30828 #: ../src/guestfs-actions.pod:5740
30832 " guestfs_part_del (guestfs_h *g,\n"
30833 " const char *device,\n"
30839 #: ../src/guestfs-actions.pod:5755
30840 msgid "guestfs_part_disk"
30844 #: ../src/guestfs-actions.pod:5757
30848 " guestfs_part_disk (guestfs_h *g,\n"
30849 " const char *device,\n"
30850 " const char *parttype);\n"
30855 #: ../src/guestfs-actions.pod:5762
30857 "This command is simply a combination of C<guestfs_part_init> followed by "
30858 "C<guestfs_part_add> to create a single primary partition covering the whole "
30863 #: ../src/guestfs-actions.pod:5766
30865 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
30866 "possible values are described in C<guestfs_part_init>."
30870 #: ../src/guestfs-actions.pod:5776
30871 msgid "guestfs_part_get_bootable"
30875 #: ../src/guestfs-actions.pod:5778
30879 " guestfs_part_get_bootable (guestfs_h *g,\n"
30880 " const char *device,\n"
30886 #: ../src/guestfs-actions.pod:5786
30887 msgid "See also C<guestfs_part_set_bootable>."
30891 #: ../src/guestfs-actions.pod:5792
30892 msgid "guestfs_part_get_mbr_id"
30896 #: ../src/guestfs-actions.pod:5794
30900 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
30901 " const char *device,\n"
30907 #: ../src/guestfs-actions.pod:5802 ../src/guestfs-actions.pod:5984
30909 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
30910 "undefined results for other partition table types (see "
30911 "C<guestfs_part_get_parttype>)."
30915 #: ../src/guestfs-actions.pod:5810
30916 msgid "guestfs_part_get_parttype"
30920 #: ../src/guestfs-actions.pod:5812
30924 " guestfs_part_get_parttype (guestfs_h *g,\n"
30925 " const char *device);\n"
30930 #: ../src/guestfs-actions.pod:5819
30932 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30933 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30934 "possible, although unusual. See C<guestfs_part_init> for a full list."
30938 #: ../src/guestfs-actions.pod:5829
30939 msgid "guestfs_part_init"
30943 #: ../src/guestfs-actions.pod:5831
30947 " guestfs_part_init (guestfs_h *g,\n"
30948 " const char *device,\n"
30949 " const char *parttype);\n"
30954 #: ../src/guestfs-actions.pod:5840
30956 "Initially there are no partitions. Following this, you should call "
30957 "C<guestfs_part_add> for each partition required."
30961 #: ../src/guestfs-actions.pod:5913
30962 msgid "guestfs_part_list"
30966 #: ../src/guestfs-actions.pod:5915
30969 " struct guestfs_partition_list *\n"
30970 " guestfs_part_list (guestfs_h *g,\n"
30971 " const char *device);\n"
30976 #: ../src/guestfs-actions.pod:5932
30978 "Start of the partition I<in bytes>. To get sectors you have to divide by "
30979 "the device's sector size, see C<guestfs_blockdev_getss>."
30983 #: ../src/guestfs-actions.pod:5945
30985 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
30986 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
30991 #: ../src/guestfs-actions.pod:5951
30992 msgid "guestfs_part_set_bootable"
30996 #: ../src/guestfs-actions.pod:5953
31000 " guestfs_part_set_bootable (guestfs_h *g,\n"
31001 " const char *device,\n"
31003 " int bootable);\n"
31008 #: ../src/guestfs-actions.pod:5970
31009 msgid "guestfs_part_set_mbr_id"
31013 #: ../src/guestfs-actions.pod:5972
31017 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
31018 " const char *device,\n"
31025 #: ../src/guestfs-actions.pod:5992
31026 msgid "guestfs_part_set_name"
31030 #: ../src/guestfs-actions.pod:5994
31034 " guestfs_part_set_name (guestfs_h *g,\n"
31035 " const char *device,\n"
31037 " const char *name);\n"
31042 #: ../src/guestfs-actions.pod:6010
31043 msgid "guestfs_part_to_dev"
31047 #: ../src/guestfs-actions.pod:6012
31051 " guestfs_part_to_dev (guestfs_h *g,\n"
31052 " const char *partition);\n"
31057 #: ../src/guestfs-actions.pod:6020 ../src/guestfs-actions.pod:6039
31059 "The named partition must exist, for example as a string returned from "
31060 "C<guestfs_list_partitions>."
31064 #: ../src/guestfs-actions.pod:6023
31065 msgid "See also C<guestfs_part_to_partnum>."
31069 #: ../src/guestfs-actions.pod:6030
31070 msgid "guestfs_part_to_partnum"
31074 #: ../src/guestfs-actions.pod:6032
31078 " guestfs_part_to_partnum (guestfs_h *g,\n"
31079 " const char *partition);\n"
31084 #: ../src/guestfs-actions.pod:6042
31085 msgid "See also C<guestfs_part_to_dev>."
31089 #: ../src/guestfs-actions.pod:6046
31090 msgid "guestfs_ping_daemon"
31094 #: ../src/guestfs-actions.pod:6048
31098 " guestfs_ping_daemon (guestfs_h *g);\n"
31103 #: ../src/guestfs-actions.pod:6060
31104 msgid "guestfs_pread"
31108 #: ../src/guestfs-actions.pod:6062
31112 " guestfs_pread (guestfs_h *g,\n"
31113 " const char *path,\n"
31115 " int64_t offset,\n"
31116 " size_t *size_r);\n"
31121 #: ../src/guestfs-actions.pod:6075
31122 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
31126 #: ../src/guestfs-actions.pod:6086
31127 msgid "guestfs_pread_device"
31131 #: ../src/guestfs-actions.pod:6088
31135 " guestfs_pread_device (guestfs_h *g,\n"
31136 " const char *device,\n"
31138 " int64_t offset,\n"
31139 " size_t *size_r);\n"
31144 #: ../src/guestfs-actions.pod:6101
31145 msgid "See also C<guestfs_pread>."
31149 #: ../src/guestfs-actions.pod:6110
31150 msgid "(Added in 1.5.21)"
31154 #: ../src/guestfs-actions.pod:6112
31155 msgid "guestfs_pvcreate"
31159 #: ../src/guestfs-actions.pod:6114
31163 " guestfs_pvcreate (guestfs_h *g,\n"
31164 " const char *device);\n"
31169 #: ../src/guestfs-actions.pod:6126
31170 msgid "guestfs_pvremove"
31174 #: ../src/guestfs-actions.pod:6128
31178 " guestfs_pvremove (guestfs_h *g,\n"
31179 " const char *device);\n"
31184 #: ../src/guestfs-actions.pod:6143
31185 msgid "guestfs_pvresize"
31189 #: ../src/guestfs-actions.pod:6145
31193 " guestfs_pvresize (guestfs_h *g,\n"
31194 " const char *device);\n"
31199 #: ../src/guestfs-actions.pod:6156
31200 msgid "guestfs_pvresize_size"
31204 #: ../src/guestfs-actions.pod:6158
31208 " guestfs_pvresize_size (guestfs_h *g,\n"
31209 " const char *device,\n"
31210 " int64_t size);\n"
31215 #: ../src/guestfs-actions.pod:6163
31217 "This command is the same as C<guestfs_pvresize> except that it allows you to "
31218 "specify the new size (in bytes) explicitly."
31222 #: ../src/guestfs-actions.pod:6170
31223 msgid "guestfs_pvs"
31227 #: ../src/guestfs-actions.pod:6172
31231 " guestfs_pvs (guestfs_h *g);\n"
31236 #: ../src/guestfs-actions.pod:6181
31237 msgid "See also C<guestfs_pvs_full>."
31241 #: ../src/guestfs-actions.pod:6189
31242 msgid "guestfs_pvs_full"
31246 #: ../src/guestfs-actions.pod:6191
31249 " struct guestfs_lvm_pv_list *\n"
31250 " guestfs_pvs_full (guestfs_h *g);\n"
31255 #: ../src/guestfs-actions.pod:6197
31257 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31258 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
31262 #: ../src/guestfs-actions.pod:6203
31263 msgid "guestfs_pvuuid"
31267 #: ../src/guestfs-actions.pod:6205
31271 " guestfs_pvuuid (guestfs_h *g,\n"
31272 " const char *device);\n"
31277 #: ../src/guestfs-actions.pod:6216
31278 msgid "guestfs_pwrite"
31282 #: ../src/guestfs-actions.pod:6218
31286 " guestfs_pwrite (guestfs_h *g,\n"
31287 " const char *path,\n"
31288 " const char *content,\n"
31289 " size_t content_size,\n"
31290 " int64_t offset);\n"
31295 #: ../src/guestfs-actions.pod:6234
31296 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31300 #: ../src/guestfs-actions.pod:6243
31301 msgid "guestfs_pwrite_device"
31305 #: ../src/guestfs-actions.pod:6245
31309 " guestfs_pwrite_device (guestfs_h *g,\n"
31310 " const char *device,\n"
31311 " const char *content,\n"
31312 " size_t content_size,\n"
31313 " int64_t offset);\n"
31318 #: ../src/guestfs-actions.pod:6260
31319 msgid "See also C<guestfs_pwrite>."
31323 #: ../src/guestfs-actions.pod:6267
31324 msgid "(Added in 1.5.20)"
31328 #: ../src/guestfs-actions.pod:6269
31329 msgid "guestfs_read_file"
31333 #: ../src/guestfs-actions.pod:6271
31337 " guestfs_read_file (guestfs_h *g,\n"
31338 " const char *path,\n"
31339 " size_t *size_r);\n"
31344 #: ../src/guestfs-actions.pod:6279
31346 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
31347 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31348 "function is limited in the total size of file that can be handled."
31352 #: ../src/guestfs-actions.pod:6291
31353 msgid "(Added in 1.0.63)"
31357 #: ../src/guestfs-actions.pod:6293
31358 msgid "guestfs_read_lines"
31362 #: ../src/guestfs-actions.pod:6295
31366 " guestfs_read_lines (guestfs_h *g,\n"
31367 " const char *path);\n"
31372 #: ../src/guestfs-actions.pod:6304
31374 "Note that this function cannot correctly handle binary files (specifically, "
31375 "files containing C<\\0> character which is treated as end of line). For "
31376 "those you need to use the C<guestfs_read_file> function which has a more "
31377 "complex interface."
31381 #: ../src/guestfs-actions.pod:6315
31382 msgid "guestfs_readdir"
31386 #: ../src/guestfs-actions.pod:6317
31389 " struct guestfs_dirent_list *\n"
31390 " guestfs_readdir (guestfs_h *g,\n"
31391 " const char *dir);\n"
31396 #: ../src/guestfs-actions.pod:6371
31398 "This function is primarily intended for use by programs. To get a simple "
31399 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31400 "consumption, use C<guestfs_ll>."
31404 #: ../src/guestfs-actions.pod:6375
31406 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31407 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
31411 #: ../src/guestfs-actions.pod:6381
31412 msgid "guestfs_readlink"
31416 #: ../src/guestfs-actions.pod:6383
31420 " guestfs_readlink (guestfs_h *g,\n"
31421 " const char *path);\n"
31426 #: ../src/guestfs-actions.pod:6394
31427 msgid "guestfs_readlinklist"
31431 #: ../src/guestfs-actions.pod:6396
31435 " guestfs_readlinklist (guestfs_h *g,\n"
31436 " const char *path,\n"
31437 " char *const *names);\n"
31442 #: ../src/guestfs-actions.pod:6429
31443 msgid "guestfs_realpath"
31447 #: ../src/guestfs-actions.pod:6431
31451 " guestfs_realpath (guestfs_h *g,\n"
31452 " const char *path);\n"
31457 #: ../src/guestfs-actions.pod:6443
31458 msgid "guestfs_removexattr"
31462 #: ../src/guestfs-actions.pod:6445
31466 " guestfs_removexattr (guestfs_h *g,\n"
31467 " const char *xattr,\n"
31468 " const char *path);\n"
31473 #: ../src/guestfs-actions.pod:6453
31474 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31478 #: ../src/guestfs-actions.pod:6459
31479 msgid "guestfs_resize2fs"
31483 #: ../src/guestfs-actions.pod:6461
31487 " guestfs_resize2fs (guestfs_h *g,\n"
31488 " const char *device);\n"
31493 #: ../src/guestfs-actions.pod:6468
31495 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31496 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31497 "sometimes gives an error about this and sometimes not. In any case, it is "
31498 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31502 #: ../src/guestfs-actions.pod:6478
31503 msgid "guestfs_resize2fs_M"
31507 #: ../src/guestfs-actions.pod:6480
31511 " guestfs_resize2fs_M (guestfs_h *g,\n"
31512 " const char *device);\n"
31517 #: ../src/guestfs-actions.pod:6484
31519 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31520 "resized to its minimum size. This works like the I<-M> option to the "
31521 "C<resize2fs> command."
31525 #: ../src/guestfs-actions.pod:6488
31527 "To get the resulting size of the filesystem you should call "
31528 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31529 "These two numbers, multiplied together, give the resulting size of the "
31530 "minimal filesystem in bytes."
31534 #: ../src/guestfs-actions.pod:6497
31535 msgid "guestfs_resize2fs_size"
31539 #: ../src/guestfs-actions.pod:6499
31543 " guestfs_resize2fs_size (guestfs_h *g,\n"
31544 " const char *device,\n"
31545 " int64_t size);\n"
31550 #: ../src/guestfs-actions.pod:6504
31552 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31553 "to specify the new size (in bytes) explicitly."
31557 #: ../src/guestfs-actions.pod:6511
31562 #: ../src/guestfs-actions.pod:6513
31566 " guestfs_rm (guestfs_h *g,\n"
31567 " const char *path);\n"
31572 #: ../src/guestfs-actions.pod:6523
31573 msgid "guestfs_rm_rf"
31577 #: ../src/guestfs-actions.pod:6525
31581 " guestfs_rm_rf (guestfs_h *g,\n"
31582 " const char *path);\n"
31587 #: ../src/guestfs-actions.pod:6537
31588 msgid "guestfs_rmdir"
31592 #: ../src/guestfs-actions.pod:6539
31596 " guestfs_rmdir (guestfs_h *g,\n"
31597 " const char *path);\n"
31602 #: ../src/guestfs-actions.pod:6549
31603 msgid "guestfs_rmmountpoint"
31607 #: ../src/guestfs-actions.pod:6551
31611 " guestfs_rmmountpoint (guestfs_h *g,\n"
31612 " const char *exemptpath);\n"
31617 #: ../src/guestfs-actions.pod:6555
31619 "This calls removes a mountpoint that was previously created with "
31620 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
31624 #: ../src/guestfs-actions.pod:6563
31625 msgid "guestfs_scrub_device"
31629 #: ../src/guestfs-actions.pod:6565
31633 " guestfs_scrub_device (guestfs_h *g,\n"
31634 " const char *device);\n"
31639 #: ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6598
31640 #: ../src/guestfs-actions.pod:6617
31641 msgid "(Added in 1.0.52)"
31645 #: ../src/guestfs-actions.pod:6582
31646 msgid "guestfs_scrub_file"
31650 #: ../src/guestfs-actions.pod:6584
31654 " guestfs_scrub_file (guestfs_h *g,\n"
31655 " const char *file);\n"
31660 #: ../src/guestfs-actions.pod:6600
31661 msgid "guestfs_scrub_freespace"
31665 #: ../src/guestfs-actions.pod:6602
31669 " guestfs_scrub_freespace (guestfs_h *g,\n"
31670 " const char *dir);\n"
31675 #: ../src/guestfs-actions.pod:6606
31677 "This command creates the directory C<dir> and then fills it with files until "
31678 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
31679 "and deletes them. The intention is to scrub any free space on the partition "
31680 "containing C<dir>."
31684 #: ../src/guestfs-actions.pod:6619
31685 msgid "guestfs_set_append"
31689 #: ../src/guestfs-actions.pod:6621
31693 " guestfs_set_append (guestfs_h *g,\n"
31694 " const char *append);\n"
31699 #: ../src/guestfs-actions.pod:6638
31700 msgid "guestfs_set_attach_method"
31704 #: ../src/guestfs-actions.pod:6640
31708 " guestfs_set_attach_method (guestfs_h *g,\n"
31709 " const char *attachmethod);\n"
31714 #: ../src/guestfs-actions.pod:6668
31715 msgid "guestfs_set_autosync"
31719 #: ../src/guestfs-actions.pod:6670
31723 " guestfs_set_autosync (guestfs_h *g,\n"
31724 " int autosync);\n"
31729 #: ../src/guestfs-actions.pod:6686
31730 msgid "guestfs_set_direct"
31734 #: ../src/guestfs-actions.pod:6688
31738 " guestfs_set_direct (guestfs_h *g,\n"
31744 #: ../src/guestfs-actions.pod:6696
31746 "One consequence of this is that log messages aren't caught by the library "
31747 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
31752 #: ../src/guestfs-actions.pod:6709
31753 msgid "guestfs_set_e2label"
31757 #: ../src/guestfs-actions.pod:6711
31761 " guestfs_set_e2label (guestfs_h *g,\n"
31762 " const char *device,\n"
31763 " const char *label);\n"
31768 #: ../src/guestfs-actions.pod:6720
31770 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
31771 "the existing label on a filesystem."
31775 #: ../src/guestfs-actions.pod:6727
31776 msgid "guestfs_set_e2uuid"
31780 #: ../src/guestfs-actions.pod:6729
31784 " guestfs_set_e2uuid (guestfs_h *g,\n"
31785 " const char *device,\n"
31786 " const char *uuid);\n"
31791 #: ../src/guestfs-actions.pod:6739
31793 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
31794 "the existing UUID of a filesystem."
31798 #: ../src/guestfs-actions.pod:6746
31799 msgid "guestfs_set_memsize"
31803 #: ../src/guestfs-actions.pod:6748
31807 " guestfs_set_memsize (guestfs_h *g,\n"
31813 #: ../src/guestfs-actions.pod:6752
31815 "This sets the memory size in megabytes allocated to the qemu subprocess. "
31816 "This only has any effect if called before C<guestfs_launch>."
31820 #: ../src/guestfs-actions.pod:6767
31821 msgid "guestfs_set_network"
31825 #: ../src/guestfs-actions.pod:6769
31829 " guestfs_set_network (guestfs_h *g,\n"
31835 #: ../src/guestfs-actions.pod:6779
31837 "You must call this before calling C<guestfs_launch>, otherwise it has no "
31842 #: ../src/guestfs-actions.pod:6786
31843 msgid "guestfs_set_path"
31847 #: ../src/guestfs-actions.pod:6788
31851 " guestfs_set_path (guestfs_h *g,\n"
31852 " const char *searchpath);\n"
31857 #: ../src/guestfs-actions.pod:6803
31858 msgid "guestfs_set_pgroup"
31862 #: ../src/guestfs-actions.pod:6805
31866 " guestfs_set_pgroup (guestfs_h *g,\n"
31872 #: ../src/guestfs-actions.pod:6822
31873 msgid "guestfs_set_qemu"
31877 #: ../src/guestfs-actions.pod:6824
31881 " guestfs_set_qemu (guestfs_h *g,\n"
31882 " const char *qemu);\n"
31887 #: ../src/guestfs-actions.pod:6850
31888 msgid "guestfs_set_recovery_proc"
31892 #: ../src/guestfs-actions.pod:6852
31896 " guestfs_set_recovery_proc (guestfs_h *g,\n"
31897 " int recoveryproc);\n"
31902 #: ../src/guestfs-actions.pod:6856
31904 "If this is called with the parameter C<false> then C<guestfs_launch> does "
31905 "not create a recovery process. The purpose of the recovery process is to "
31906 "stop runaway qemu processes in the case where the main program aborts "
31911 #: ../src/guestfs-actions.pod:6861
31913 "This only has any effect if called before C<guestfs_launch>, and the default "
31918 #: ../src/guestfs-actions.pod:6874
31919 msgid "guestfs_set_selinux"
31923 #: ../src/guestfs-actions.pod:6876
31927 " guestfs_set_selinux (guestfs_h *g,\n"
31933 #: ../src/guestfs-actions.pod:6893
31934 msgid "guestfs_set_smp"
31938 #: ../src/guestfs-actions.pod:6895
31942 " guestfs_set_smp (guestfs_h *g,\n"
31948 #: ../src/guestfs-actions.pod:6903
31949 msgid "This function must be called before C<guestfs_launch>."
31953 #: ../src/guestfs-actions.pod:6909
31954 msgid "guestfs_set_trace"
31958 #: ../src/guestfs-actions.pod:6911
31962 " guestfs_set_trace (guestfs_h *g,\n"
31968 #: ../src/guestfs-actions.pod:6925
31970 "Trace messages are normally sent to C<stderr>, unless you register a "
31971 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31975 #: ../src/guestfs-actions.pod:6933
31976 msgid "guestfs_set_verbose"
31980 #: ../src/guestfs-actions.pod:6935
31984 " guestfs_set_verbose (guestfs_h *g,\n"
31990 #: ../src/guestfs-actions.pod:6944
31992 "Verbose messages are normally sent to C<stderr>, unless you register a "
31993 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31997 #: ../src/guestfs-actions.pod:6952
31998 msgid "guestfs_setcon"
32002 #: ../src/guestfs-actions.pod:6954
32006 " guestfs_setcon (guestfs_h *g,\n"
32007 " const char *context);\n"
32012 #: ../src/guestfs-actions.pod:6967
32013 msgid "guestfs_setxattr"
32017 #: ../src/guestfs-actions.pod:6969
32021 " guestfs_setxattr (guestfs_h *g,\n"
32022 " const char *xattr,\n"
32023 " const char *val,\n"
32025 " const char *path);\n"
32030 #: ../src/guestfs-actions.pod:6980
32031 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
32035 #: ../src/guestfs-actions.pod:6986
32036 msgid "guestfs_sfdisk"
32040 #: ../src/guestfs-actions.pod:6988
32044 " guestfs_sfdisk (guestfs_h *g,\n"
32045 " const char *device,\n"
32049 " char *const *lines);\n"
32054 #: ../src/guestfs-actions.pod:6996 ../src/guestfs-actions.pod:7040
32055 #: ../src/guestfs-actions.pod:7074
32057 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
32062 #: ../src/guestfs-actions.pod:7023
32064 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
32068 #: ../src/guestfs-actions.pod:7033
32069 msgid "guestfs_sfdiskM"
32073 #: ../src/guestfs-actions.pod:7035
32077 " guestfs_sfdiskM (guestfs_h *g,\n"
32078 " const char *device,\n"
32079 " char *const *lines);\n"
32084 #: ../src/guestfs-actions.pod:7047
32086 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
32087 "partition sizes are specified in megabytes only (rounded to the nearest "
32088 "cylinder) and you don't need to specify the cyls, heads and sectors "
32089 "parameters which were rarely if ever used anyway."
32093 #: ../src/guestfs-actions.pod:7053
32095 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
32096 "C<guestfs_part_disk>"
32100 #: ../src/guestfs-actions.pod:7063
32101 msgid "guestfs_sfdisk_N"
32105 #: ../src/guestfs-actions.pod:7065
32109 " guestfs_sfdisk_N (guestfs_h *g,\n"
32110 " const char *device,\n"
32115 " const char *line);\n"
32120 #: ../src/guestfs-actions.pod:7084
32122 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
32123 "for the cyls/heads/sectors parameters."
32127 #: ../src/guestfs-actions.pod:7087
32128 msgid "See also: C<guestfs_part_add>"
32132 #: ../src/guestfs-actions.pod:7096
32133 msgid "guestfs_sfdisk_disk_geometry"
32137 #: ../src/guestfs-actions.pod:7098
32141 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
32142 " const char *device);\n"
32147 #: ../src/guestfs-actions.pod:7102
32149 "This displays the disk geometry of C<device> read from the partition table. "
32150 "Especially in the case where the underlying block device has been resized, "
32151 "this can be different from the kernel's idea of the geometry (see "
32152 "C<guestfs_sfdisk_kernel_geometry>)."
32156 #: ../src/guestfs-actions.pod:7115
32157 msgid "guestfs_sfdisk_kernel_geometry"
32161 #: ../src/guestfs-actions.pod:7117
32165 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
32166 " const char *device);\n"
32171 #: ../src/guestfs-actions.pod:7131
32172 msgid "guestfs_sfdisk_l"
32176 #: ../src/guestfs-actions.pod:7133
32180 " guestfs_sfdisk_l (guestfs_h *g,\n"
32181 " const char *device);\n"
32186 #: ../src/guestfs-actions.pod:7137
32188 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
32193 #: ../src/guestfs-actions.pod:7148
32194 msgid "See also: C<guestfs_part_list>"
32198 #: ../src/guestfs-actions.pod:7155
32203 #: ../src/guestfs-actions.pod:7157
32207 " guestfs_sh (guestfs_h *g,\n"
32208 " const char *command);\n"
32213 #: ../src/guestfs-actions.pod:7164
32214 msgid "This is like C<guestfs_command>, but passes the command to:"
32218 #: ../src/guestfs-actions.pod:7172
32219 msgid "All the provisos about C<guestfs_command> apply to this call."
32223 #: ../src/guestfs-actions.pod:7179
32224 msgid "guestfs_sh_lines"
32228 #: ../src/guestfs-actions.pod:7181
32232 " guestfs_sh_lines (guestfs_h *g,\n"
32233 " const char *command);\n"
32238 #: ../src/guestfs-actions.pod:7185
32240 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32245 #: ../src/guestfs-actions.pod:7188
32246 msgid "See also: C<guestfs_command_lines>"
32250 #: ../src/guestfs-actions.pod:7196
32251 msgid "guestfs_sleep"
32255 #: ../src/guestfs-actions.pod:7198
32259 " guestfs_sleep (guestfs_h *g,\n"
32265 #: ../src/guestfs-actions.pod:7206
32266 msgid "(Added in 1.0.41)"
32270 #: ../src/guestfs-actions.pod:7208 ../src/guestfs-structs.pod:109
32271 msgid "guestfs_stat"
32275 #: ../src/guestfs-actions.pod:7210
32278 " struct guestfs_stat *\n"
32279 " guestfs_stat (guestfs_h *g,\n"
32280 " const char *path);\n"
32285 #: ../src/guestfs-actions.pod:7224 ../src/guestfs-structs.pod:135
32286 msgid "guestfs_statvfs"
32290 #: ../src/guestfs-actions.pod:7226
32293 " struct guestfs_statvfs *\n"
32294 " guestfs_statvfs (guestfs_h *g,\n"
32295 " const char *path);\n"
32300 #: ../src/guestfs-actions.pod:7236
32302 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
32303 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
32307 #: ../src/guestfs-actions.pod:7242
32308 msgid "guestfs_strings"
32312 #: ../src/guestfs-actions.pod:7244
32316 " guestfs_strings (guestfs_h *g,\n"
32317 " const char *path);\n"
32322 #: ../src/guestfs-actions.pod:7260
32323 msgid "guestfs_strings_e"
32327 #: ../src/guestfs-actions.pod:7262
32331 " guestfs_strings_e (guestfs_h *g,\n"
32332 " const char *encoding,\n"
32333 " const char *path);\n"
32338 #: ../src/guestfs-actions.pod:7267
32340 "This is like the C<guestfs_strings> command, but allows you to specify the "
32341 "encoding of strings that are looked for in the source file C<path>."
32345 #: ../src/guestfs-actions.pod:7277
32347 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32348 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32352 #: ../src/guestfs-actions.pod:7315
32353 msgid "guestfs_swapoff_device"
32357 #: ../src/guestfs-actions.pod:7317
32361 " guestfs_swapoff_device (guestfs_h *g,\n"
32362 " const char *device);\n"
32367 #: ../src/guestfs-actions.pod:7321
32369 "This command disables the libguestfs appliance swap device or partition "
32370 "named C<device>. See C<guestfs_swapon_device>."
32374 #: ../src/guestfs-actions.pod:7329
32375 msgid "guestfs_swapoff_file"
32379 #: ../src/guestfs-actions.pod:7331
32383 " guestfs_swapoff_file (guestfs_h *g,\n"
32384 " const char *file);\n"
32389 #: ../src/guestfs-actions.pod:7341
32390 msgid "guestfs_swapoff_label"
32394 #: ../src/guestfs-actions.pod:7343
32398 " guestfs_swapoff_label (guestfs_h *g,\n"
32399 " const char *label);\n"
32404 #: ../src/guestfs-actions.pod:7354
32405 msgid "guestfs_swapoff_uuid"
32409 #: ../src/guestfs-actions.pod:7356
32413 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32414 " const char *uuid);\n"
32419 #: ../src/guestfs-actions.pod:7367
32420 msgid "guestfs_swapon_device"
32424 #: ../src/guestfs-actions.pod:7369
32428 " guestfs_swapon_device (guestfs_h *g,\n"
32429 " const char *device);\n"
32434 #: ../src/guestfs-actions.pod:7373
32436 "This command enables the libguestfs appliance to use the swap device or "
32437 "partition named C<device>. The increased memory is made available for all "
32438 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32442 #: ../src/guestfs-actions.pod:7389
32443 msgid "guestfs_swapon_file"
32447 #: ../src/guestfs-actions.pod:7391
32451 " guestfs_swapon_file (guestfs_h *g,\n"
32452 " const char *file);\n"
32457 #: ../src/guestfs-actions.pod:7395
32459 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32464 #: ../src/guestfs-actions.pod:7402
32465 msgid "guestfs_swapon_label"
32469 #: ../src/guestfs-actions.pod:7404
32473 " guestfs_swapon_label (guestfs_h *g,\n"
32474 " const char *label);\n"
32479 #: ../src/guestfs-actions.pod:7408
32481 "This command enables swap to a labeled swap partition. See "
32482 "C<guestfs_swapon_device> for other notes."
32486 #: ../src/guestfs-actions.pod:7415
32487 msgid "guestfs_swapon_uuid"
32491 #: ../src/guestfs-actions.pod:7417
32495 " guestfs_swapon_uuid (guestfs_h *g,\n"
32496 " const char *uuid);\n"
32501 #: ../src/guestfs-actions.pod:7421
32503 "This command enables swap to a swap partition with the given UUID. See "
32504 "C<guestfs_swapon_device> for other notes."
32508 #: ../src/guestfs-actions.pod:7428
32509 msgid "guestfs_sync"
32513 #: ../src/guestfs-actions.pod:7430
32517 " guestfs_sync (guestfs_h *g);\n"
32522 #: ../src/guestfs-actions.pod:7443
32523 msgid "guestfs_tail"
32527 #: ../src/guestfs-actions.pod:7445
32531 " guestfs_tail (guestfs_h *g,\n"
32532 " const char *path);\n"
32537 #: ../src/guestfs-actions.pod:7461
32538 msgid "guestfs_tail_n"
32542 #: ../src/guestfs-actions.pod:7463
32546 " guestfs_tail_n (guestfs_h *g,\n"
32548 " const char *path);\n"
32553 #: ../src/guestfs-actions.pod:7485
32554 msgid "guestfs_tar_in"
32558 #: ../src/guestfs-actions.pod:7487
32562 " guestfs_tar_in (guestfs_h *g,\n"
32563 " const char *tarfile,\n"
32564 " const char *directory);\n"
32569 #: ../src/guestfs-actions.pod:7495
32571 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32575 #: ../src/guestfs-actions.pod:7500 ../src/guestfs-actions.pod:7517
32576 #: ../src/guestfs-actions.pod:7533 ../src/guestfs-actions.pod:7549
32577 msgid "(Added in 1.0.3)"
32581 #: ../src/guestfs-actions.pod:7502
32582 msgid "guestfs_tar_out"
32586 #: ../src/guestfs-actions.pod:7504
32590 " guestfs_tar_out (guestfs_h *g,\n"
32591 " const char *directory,\n"
32592 " const char *tarfile);\n"
32597 #: ../src/guestfs-actions.pod:7512
32599 "To download a compressed tarball, use C<guestfs_tgz_out> or "
32600 "C<guestfs_txz_out>."
32604 #: ../src/guestfs-actions.pod:7519
32605 msgid "guestfs_tgz_in"
32609 #: ../src/guestfs-actions.pod:7521
32613 " guestfs_tgz_in (guestfs_h *g,\n"
32614 " const char *tarball,\n"
32615 " const char *directory);\n"
32620 #: ../src/guestfs-actions.pod:7529
32621 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
32625 #: ../src/guestfs-actions.pod:7535
32626 msgid "guestfs_tgz_out"
32630 #: ../src/guestfs-actions.pod:7537
32634 " guestfs_tgz_out (guestfs_h *g,\n"
32635 " const char *directory,\n"
32636 " const char *tarball);\n"
32641 #: ../src/guestfs-actions.pod:7545
32642 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
32646 #: ../src/guestfs-actions.pod:7551
32647 msgid "guestfs_touch"
32651 #: ../src/guestfs-actions.pod:7553
32655 " guestfs_touch (guestfs_h *g,\n"
32656 " const char *path);\n"
32661 #: ../src/guestfs-actions.pod:7568
32662 msgid "guestfs_truncate"
32666 #: ../src/guestfs-actions.pod:7570
32670 " guestfs_truncate (guestfs_h *g,\n"
32671 " const char *path);\n"
32676 #: ../src/guestfs-actions.pod:7581
32677 msgid "guestfs_truncate_size"
32681 #: ../src/guestfs-actions.pod:7583
32685 " guestfs_truncate_size (guestfs_h *g,\n"
32686 " const char *path,\n"
32687 " int64_t size);\n"
32692 #: ../src/guestfs-actions.pod:7591
32694 "If the current file size is less than C<size> then the file is extended to "
32695 "the required size with zero bytes. This creates a sparse file (ie. disk "
32696 "blocks are not allocated for the file until you write to it). To create a "
32697 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
32701 #: ../src/guestfs-actions.pod:7601
32702 msgid "guestfs_tune2fs_l"
32706 #: ../src/guestfs-actions.pod:7603
32710 " guestfs_tune2fs_l (guestfs_h *g,\n"
32711 " const char *device);\n"
32716 #: ../src/guestfs-actions.pod:7623
32717 msgid "guestfs_txz_in"
32721 #: ../src/guestfs-actions.pod:7625
32725 " guestfs_txz_in (guestfs_h *g,\n"
32726 " const char *tarball,\n"
32727 " const char *directory);\n"
32732 #: ../src/guestfs-actions.pod:7637
32733 msgid "guestfs_txz_out"
32737 #: ../src/guestfs-actions.pod:7639
32741 " guestfs_txz_out (guestfs_h *g,\n"
32742 " const char *directory,\n"
32743 " const char *tarball);\n"
32748 #: ../src/guestfs-actions.pod:7651
32749 msgid "guestfs_umask"
32753 #: ../src/guestfs-actions.pod:7653
32757 " guestfs_umask (guestfs_h *g,\n"
32763 #: ../src/guestfs-actions.pod:7669
32765 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
32766 "C<guestfs_mkdir>."
32770 #: ../src/guestfs-actions.pod:7678
32771 msgid "guestfs_umount"
32775 #: ../src/guestfs-actions.pod:7680
32779 " guestfs_umount (guestfs_h *g,\n"
32780 " const char *pathordevice);\n"
32785 #: ../src/guestfs-actions.pod:7692
32786 msgid "guestfs_umount_all"
32790 #: ../src/guestfs-actions.pod:7694
32794 " guestfs_umount_all (guestfs_h *g);\n"
32799 #: ../src/guestfs-actions.pod:7705
32800 msgid "guestfs_upload"
32804 #: ../src/guestfs-actions.pod:7707
32808 " guestfs_upload (guestfs_h *g,\n"
32809 " const char *filename,\n"
32810 " const char *remotefilename);\n"
32815 #: ../src/guestfs-actions.pod:7717
32816 msgid "See also C<guestfs_download>."
32820 #: ../src/guestfs-actions.pod:7728
32821 msgid "guestfs_upload_offset"
32825 #: ../src/guestfs-actions.pod:7730
32829 " guestfs_upload_offset (guestfs_h *g,\n"
32830 " const char *filename,\n"
32831 " const char *remotefilename,\n"
32832 " int64_t offset);\n"
32837 #: ../src/guestfs-actions.pod:7746
32839 "Note that there is no limit on the amount of data that can be uploaded with "
32840 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
32841 "full amount unless an error occurs."
32845 #: ../src/guestfs-actions.pod:7751
32846 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
32850 #: ../src/guestfs-actions.pod:7762
32851 msgid "guestfs_utimens"
32855 #: ../src/guestfs-actions.pod:7764
32859 " guestfs_utimens (guestfs_h *g,\n"
32860 " const char *path,\n"
32861 " int64_t atsecs,\n"
32862 " int64_t atnsecs,\n"
32863 " int64_t mtsecs,\n"
32864 " int64_t mtnsecs);\n"
32869 #: ../src/guestfs-actions.pod:7793 ../src/guestfs-structs.pod:175
32870 msgid "guestfs_version"
32874 #: ../src/guestfs-actions.pod:7795
32877 " struct guestfs_version *\n"
32878 " guestfs_version (guestfs_h *g);\n"
32883 #: ../src/guestfs-actions.pod:7823
32885 "I<Note:> Don't use this call to test for availability of features. In "
32886 "enterprise distributions we backport features from later versions into "
32887 "earlier versions, making this an unreliable way to test for features. Use "
32888 "C<guestfs_available> instead."
32892 #: ../src/guestfs-actions.pod:7829
32894 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
32895 "error. I<The caller must call C<guestfs_free_version> after use>."
32899 #: ../src/guestfs-actions.pod:7833
32900 msgid "(Added in 1.0.58)"
32904 #: ../src/guestfs-actions.pod:7835
32905 msgid "guestfs_vfs_label"
32909 #: ../src/guestfs-actions.pod:7837
32913 " guestfs_vfs_label (guestfs_h *g,\n"
32914 " const char *device);\n"
32919 #: ../src/guestfs-actions.pod:7846
32920 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
32924 #: ../src/guestfs-actions.pod:7851 ../src/guestfs-actions.pod:7888
32925 msgid "(Added in 1.3.18)"
32929 #: ../src/guestfs-actions.pod:7853
32930 msgid "guestfs_vfs_type"
32934 #: ../src/guestfs-actions.pod:7855
32938 " guestfs_vfs_type (guestfs_h *g,\n"
32939 " const char *device);\n"
32944 #: ../src/guestfs-actions.pod:7872
32945 msgid "guestfs_vfs_uuid"
32949 #: ../src/guestfs-actions.pod:7874
32953 " guestfs_vfs_uuid (guestfs_h *g,\n"
32954 " const char *device);\n"
32959 #: ../src/guestfs-actions.pod:7883
32960 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
32964 #: ../src/guestfs-actions.pod:7890
32965 msgid "guestfs_vg_activate"
32969 #: ../src/guestfs-actions.pod:7892
32973 " guestfs_vg_activate (guestfs_h *g,\n"
32975 " char *const *volgroups);\n"
32980 #: ../src/guestfs-actions.pod:7909
32981 msgid "guestfs_vg_activate_all"
32985 #: ../src/guestfs-actions.pod:7911
32989 " guestfs_vg_activate_all (guestfs_h *g,\n"
32990 " int activate);\n"
32995 #: ../src/guestfs-actions.pod:7924
32996 msgid "guestfs_vgcreate"
33000 #: ../src/guestfs-actions.pod:7926
33004 " guestfs_vgcreate (guestfs_h *g,\n"
33005 " const char *volgroup,\n"
33006 " char *const *physvols);\n"
33011 #: ../src/guestfs-actions.pod:7938
33012 msgid "guestfs_vglvuuids"
33016 #: ../src/guestfs-actions.pod:7940
33020 " guestfs_vglvuuids (guestfs_h *g,\n"
33021 " const char *vgname);\n"
33026 #: ../src/guestfs-actions.pod:7947
33028 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
33029 "associate logical volumes and volume groups."
33033 #: ../src/guestfs-actions.pod:7950
33034 msgid "See also C<guestfs_vgpvuuids>."
33038 #: ../src/guestfs-actions.pod:7958
33039 msgid "guestfs_vgpvuuids"
33043 #: ../src/guestfs-actions.pod:7960
33047 " guestfs_vgpvuuids (guestfs_h *g,\n"
33048 " const char *vgname);\n"
33053 #: ../src/guestfs-actions.pod:7967
33055 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
33056 "associate physical volumes and volume groups."
33060 #: ../src/guestfs-actions.pod:7970
33061 msgid "See also C<guestfs_vglvuuids>."
33065 #: ../src/guestfs-actions.pod:7978
33066 msgid "guestfs_vgremove"
33070 #: ../src/guestfs-actions.pod:7980
33074 " guestfs_vgremove (guestfs_h *g,\n"
33075 " const char *vgname);\n"
33080 #: ../src/guestfs-actions.pod:7993
33081 msgid "guestfs_vgrename"
33085 #: ../src/guestfs-actions.pod:7995
33089 " guestfs_vgrename (guestfs_h *g,\n"
33090 " const char *volgroup,\n"
33091 " const char *newvolgroup);\n"
33096 #: ../src/guestfs-actions.pod:8006
33097 msgid "guestfs_vgs"
33101 #: ../src/guestfs-actions.pod:8008
33105 " guestfs_vgs (guestfs_h *g);\n"
33110 #: ../src/guestfs-actions.pod:8017
33111 msgid "See also C<guestfs_vgs_full>."
33115 #: ../src/guestfs-actions.pod:8025
33116 msgid "guestfs_vgs_full"
33120 #: ../src/guestfs-actions.pod:8027
33123 " struct guestfs_lvm_vg_list *\n"
33124 " guestfs_vgs_full (guestfs_h *g);\n"
33129 #: ../src/guestfs-actions.pod:8033
33131 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
33132 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
33136 #: ../src/guestfs-actions.pod:8039
33137 msgid "guestfs_vgscan"
33141 #: ../src/guestfs-actions.pod:8041
33145 " guestfs_vgscan (guestfs_h *g);\n"
33150 #: ../src/guestfs-actions.pod:8051
33151 msgid "guestfs_vguuid"
33155 #: ../src/guestfs-actions.pod:8053
33159 " guestfs_vguuid (guestfs_h *g,\n"
33160 " const char *vgname);\n"
33165 #: ../src/guestfs-actions.pod:8064
33166 msgid "guestfs_wait_ready"
33170 #: ../src/guestfs-actions.pod:8066
33174 " guestfs_wait_ready (guestfs_h *g);\n"
33179 #: ../src/guestfs-actions.pod:8069
33181 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
33186 #: ../src/guestfs-actions.pod:8076
33187 msgid "This function is a no op."
33191 #: ../src/guestfs-actions.pod:8078
33193 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
33194 "calling C<guestfs_launch> to wait for the launch to complete. However this "
33195 "is no longer necessary because C<guestfs_launch> now does the waiting."
33199 #: ../src/guestfs-actions.pod:8083
33201 "If you see any calls to this function in code then you can just remove them, "
33202 "unless you want to retain compatibility with older versions of the API."
33206 #: ../src/guestfs-actions.pod:8091
33207 msgid "guestfs_wc_c"
33211 #: ../src/guestfs-actions.pod:8093
33215 " guestfs_wc_c (guestfs_h *g,\n"
33216 " const char *path);\n"
33221 #: ../src/guestfs-actions.pod:8104
33222 msgid "guestfs_wc_l"
33226 #: ../src/guestfs-actions.pod:8106
33230 " guestfs_wc_l (guestfs_h *g,\n"
33231 " const char *path);\n"
33236 #: ../src/guestfs-actions.pod:8117
33237 msgid "guestfs_wc_w"
33241 #: ../src/guestfs-actions.pod:8119
33245 " guestfs_wc_w (guestfs_h *g,\n"
33246 " const char *path);\n"
33251 #: ../src/guestfs-actions.pod:8130
33252 msgid "guestfs_write"
33256 #: ../src/guestfs-actions.pod:8132
33260 " guestfs_write (guestfs_h *g,\n"
33261 " const char *path,\n"
33262 " const char *content,\n"
33263 " size_t content_size);\n"
33268 #: ../src/guestfs-actions.pod:8141
33269 msgid "See also C<guestfs_write_append>."
33273 #: ../src/guestfs-actions.pod:8150
33274 msgid "guestfs_write_append"
33278 #: ../src/guestfs-actions.pod:8152
33282 " guestfs_write_append (guestfs_h *g,\n"
33283 " const char *path,\n"
33284 " const char *content,\n"
33285 " size_t content_size);\n"
33290 #: ../src/guestfs-actions.pod:8161
33291 msgid "See also C<guestfs_write>."
33295 #: ../src/guestfs-actions.pod:8170
33296 msgid "guestfs_write_file"
33300 #: ../src/guestfs-actions.pod:8172
33304 " guestfs_write_file (guestfs_h *g,\n"
33305 " const char *path,\n"
33306 " const char *content,\n"
33312 #: ../src/guestfs-actions.pod:8178
33314 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33319 #: ../src/guestfs-actions.pod:8203
33320 msgid "guestfs_zegrep"
33324 #: ../src/guestfs-actions.pod:8205
33328 " guestfs_zegrep (guestfs_h *g,\n"
33329 " const char *regex,\n"
33330 " const char *path);\n"
33335 #: ../src/guestfs-actions.pod:8222
33336 msgid "guestfs_zegrepi"
33340 #: ../src/guestfs-actions.pod:8224
33344 " guestfs_zegrepi (guestfs_h *g,\n"
33345 " const char *regex,\n"
33346 " const char *path);\n"
33351 #: ../src/guestfs-actions.pod:8241
33352 msgid "guestfs_zero"
33356 #: ../src/guestfs-actions.pod:8243
33360 " guestfs_zero (guestfs_h *g,\n"
33361 " const char *device);\n"
33366 #: ../src/guestfs-actions.pod:8257
33368 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33369 "C<guestfs_is_zero_device>"
33373 #: ../src/guestfs-actions.pod:8269
33374 msgid "guestfs_zero_device"
33378 #: ../src/guestfs-actions.pod:8271
33382 " guestfs_zero_device (guestfs_h *g,\n"
33383 " const char *device);\n"
33388 #: ../src/guestfs-actions.pod:8275
33390 "This command writes zeroes over the entire C<device>. Compare with "
33391 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33395 #: ../src/guestfs-actions.pod:8293
33396 msgid "(Added in 1.3.1)"
33400 #: ../src/guestfs-actions.pod:8295
33401 msgid "guestfs_zerofree"
33405 #: ../src/guestfs-actions.pod:8297
33409 " guestfs_zerofree (guestfs_h *g,\n"
33410 " const char *device);\n"
33415 #: ../src/guestfs-actions.pod:8316
33416 msgid "guestfs_zfgrep"
33420 #: ../src/guestfs-actions.pod:8318
33424 " guestfs_zfgrep (guestfs_h *g,\n"
33425 " const char *pattern,\n"
33426 " const char *path);\n"
33431 #: ../src/guestfs-actions.pod:8335
33432 msgid "guestfs_zfgrepi"
33436 #: ../src/guestfs-actions.pod:8337
33440 " guestfs_zfgrepi (guestfs_h *g,\n"
33441 " const char *pattern,\n"
33442 " const char *path);\n"
33447 #: ../src/guestfs-actions.pod:8354
33448 msgid "guestfs_zfile"
33452 #: ../src/guestfs-actions.pod:8356
33456 " guestfs_zfile (guestfs_h *g,\n"
33457 " const char *meth,\n"
33458 " const char *path);\n"
33463 #: ../src/guestfs-actions.pod:8361
33465 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33470 #: ../src/guestfs-actions.pod:8373
33472 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33477 #: ../src/guestfs-actions.pod:8381
33478 msgid "guestfs_zgrep"
33482 #: ../src/guestfs-actions.pod:8383
33486 " guestfs_zgrep (guestfs_h *g,\n"
33487 " const char *regex,\n"
33488 " const char *path);\n"
33493 #: ../src/guestfs-actions.pod:8400
33494 msgid "guestfs_zgrepi"
33498 #: ../src/guestfs-actions.pod:8402
33502 " guestfs_zgrepi (guestfs_h *g,\n"
33503 " const char *regex,\n"
33504 " const char *path);\n"
33509 #: ../src/guestfs-availability.pod:3
33514 #: ../src/guestfs-availability.pod:5
33516 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
33517 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
33518 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
33519 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
33520 "L</guestfs_aug_save> L</guestfs_aug_set>"
33524 #: ../src/guestfs-availability.pod:21
33529 #: ../src/guestfs-availability.pod:23
33530 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
33534 #: ../src/guestfs-availability.pod:26
33539 #: ../src/guestfs-availability.pod:28
33540 msgid "The following functions: L</guestfs_grub_install>"
33544 #: ../src/guestfs-availability.pod:31
33549 #: ../src/guestfs-availability.pod:33
33551 "The following functions: L</guestfs_inotify_add_watch> L</"
33552 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
33553 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
33557 #: ../src/guestfs-availability.pod:41
33558 msgid "B<linuxfsuuid>"
33562 #: ../src/guestfs-availability.pod:43
33564 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
33565 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
33569 #: ../src/guestfs-availability.pod:50
33570 msgid "B<linuxmodules>"
33574 #: ../src/guestfs-availability.pod:52
33575 msgid "The following functions: L</guestfs_modprobe>"
33579 #: ../src/guestfs-availability.pod:55
33580 msgid "B<linuxxattrs>"
33584 #: ../src/guestfs-availability.pod:57
33586 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
33587 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
33588 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
33589 "guestfs_setxattr>"
33593 #: ../src/guestfs-availability.pod:68
33598 #: ../src/guestfs-availability.pod:70
33600 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
33601 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
33602 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
33606 #: ../src/guestfs-availability.pod:79
33611 #: ../src/guestfs-availability.pod:81
33613 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
33614 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
33615 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
33616 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
33617 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
33618 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
33619 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
33623 #: ../src/guestfs-availability.pod:104
33628 #: ../src/guestfs-availability.pod:106
33630 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
33631 "guestfs_mknod_b> L</guestfs_mknod_c>"
33635 #: ../src/guestfs-availability.pod:112
33640 #: ../src/guestfs-availability.pod:114
33641 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
33645 #: ../src/guestfs-availability.pod:117
33646 msgid "B<ntfsprogs>"
33650 #: ../src/guestfs-availability.pod:119
33652 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
33653 "L</guestfs_ntfsresize_size>"
33657 #: ../src/guestfs-availability.pod:124
33658 msgid "B<realpath>"
33662 #: ../src/guestfs-availability.pod:126
33663 msgid "The following functions: L</guestfs_realpath>"
33667 #: ../src/guestfs-availability.pod:129
33672 #: ../src/guestfs-availability.pod:131
33674 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
33675 "guestfs_scrub_freespace>"
33679 #: ../src/guestfs-availability.pod:136
33684 #: ../src/guestfs-availability.pod:138
33685 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
33689 #: ../src/guestfs-availability.pod:142
33694 #: ../src/guestfs-availability.pod:144
33695 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
33699 #: ../src/guestfs-availability.pod:148
33700 msgid "B<zerofree>"
33704 #: ../src/guestfs-availability.pod:150
33705 msgid "The following functions: L</guestfs_zerofree>"
33709 #: ../src/guestfs-structs.pod:1
33710 msgid "guestfs_int_bool"
33714 #: ../src/guestfs-structs.pod:3
33717 " struct guestfs_int_bool {\n"
33725 #: ../src/guestfs-structs.pod:8
33728 " struct guestfs_int_bool_list {\n"
33729 " uint32_t len; /* Number of elements in list. */\n"
33730 " struct guestfs_int_bool *val; /* Elements. */\n"
33736 #: ../src/guestfs-structs.pod:13
33739 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
33740 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
33745 #: ../src/guestfs-structs.pod:16
33746 msgid "guestfs_lvm_pv"
33750 #: ../src/guestfs-structs.pod:18
33753 " struct guestfs_lvm_pv {\n"
33754 " char *pv_name;\n"
33755 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33756 " char pv_uuid[32];\n"
33758 " uint64_t pv_size;\n"
33759 " uint64_t dev_size;\n"
33760 " uint64_t pv_free;\n"
33761 " uint64_t pv_used;\n"
33762 " char *pv_attr;\n"
33763 " int64_t pv_pe_count;\n"
33764 " int64_t pv_pe_alloc_count;\n"
33765 " char *pv_tags;\n"
33766 " uint64_t pe_start;\n"
33767 " int64_t pv_mda_count;\n"
33768 " uint64_t pv_mda_free;\n"
33774 #: ../src/guestfs-structs.pod:36
33777 " struct guestfs_lvm_pv_list {\n"
33778 " uint32_t len; /* Number of elements in list. */\n"
33779 " struct guestfs_lvm_pv *val; /* Elements. */\n"
33785 #: ../src/guestfs-structs.pod:41
33788 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
33789 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
33794 #: ../src/guestfs-structs.pod:44
33795 msgid "guestfs_lvm_vg"
33799 #: ../src/guestfs-structs.pod:46
33802 " struct guestfs_lvm_vg {\n"
33803 " char *vg_name;\n"
33804 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33805 " char vg_uuid[32];\n"
33807 " char *vg_attr;\n"
33808 " uint64_t vg_size;\n"
33809 " uint64_t vg_free;\n"
33810 " char *vg_sysid;\n"
33811 " uint64_t vg_extent_size;\n"
33812 " int64_t vg_extent_count;\n"
33813 " int64_t vg_free_count;\n"
33814 " int64_t max_lv;\n"
33815 " int64_t max_pv;\n"
33816 " int64_t pv_count;\n"
33817 " int64_t lv_count;\n"
33818 " int64_t snap_count;\n"
33819 " int64_t vg_seqno;\n"
33820 " char *vg_tags;\n"
33821 " int64_t vg_mda_count;\n"
33822 " uint64_t vg_mda_free;\n"
33828 #: ../src/guestfs-structs.pod:69
33831 " struct guestfs_lvm_vg_list {\n"
33832 " uint32_t len; /* Number of elements in list. */\n"
33833 " struct guestfs_lvm_vg *val; /* Elements. */\n"
33839 #: ../src/guestfs-structs.pod:74
33842 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
33843 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
33848 #: ../src/guestfs-structs.pod:77
33849 msgid "guestfs_lvm_lv"
33853 #: ../src/guestfs-structs.pod:79
33856 " struct guestfs_lvm_lv {\n"
33857 " char *lv_name;\n"
33858 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33859 " char lv_uuid[32];\n"
33860 " char *lv_attr;\n"
33861 " int64_t lv_major;\n"
33862 " int64_t lv_minor;\n"
33863 " int64_t lv_kernel_major;\n"
33864 " int64_t lv_kernel_minor;\n"
33865 " uint64_t lv_size;\n"
33866 " int64_t seg_count;\n"
33868 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33869 " float snap_percent;\n"
33870 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33871 " float copy_percent;\n"
33872 " char *move_pv;\n"
33873 " char *lv_tags;\n"
33874 " char *mirror_log;\n"
33875 " char *modules;\n"
33881 #: ../src/guestfs-structs.pod:101
33884 " struct guestfs_lvm_lv_list {\n"
33885 " uint32_t len; /* Number of elements in list. */\n"
33886 " struct guestfs_lvm_lv *val; /* Elements. */\n"
33892 #: ../src/guestfs-structs.pod:106
33895 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
33896 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
33901 #: ../src/guestfs-structs.pod:111
33904 " struct guestfs_stat {\n"
33908 " int64_t nlink;\n"
33913 " int64_t blksize;\n"
33914 " int64_t blocks;\n"
33915 " int64_t atime;\n"
33916 " int64_t mtime;\n"
33917 " int64_t ctime;\n"
33923 #: ../src/guestfs-structs.pod:127
33926 " struct guestfs_stat_list {\n"
33927 " uint32_t len; /* Number of elements in list. */\n"
33928 " struct guestfs_stat *val; /* Elements. */\n"
33934 #: ../src/guestfs-structs.pod:132
33937 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
33938 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
33943 #: ../src/guestfs-structs.pod:137
33946 " struct guestfs_statvfs {\n"
33947 " int64_t bsize;\n"
33948 " int64_t frsize;\n"
33949 " int64_t blocks;\n"
33950 " int64_t bfree;\n"
33951 " int64_t bavail;\n"
33952 " int64_t files;\n"
33953 " int64_t ffree;\n"
33954 " int64_t favail;\n"
33957 " int64_t namemax;\n"
33963 #: ../src/guestfs-structs.pod:151
33966 " struct guestfs_statvfs_list {\n"
33967 " uint32_t len; /* Number of elements in list. */\n"
33968 " struct guestfs_statvfs *val; /* Elements. */\n"
33974 #: ../src/guestfs-structs.pod:156
33977 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
33978 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
33983 #: ../src/guestfs-structs.pod:159
33984 msgid "guestfs_dirent"
33988 #: ../src/guestfs-structs.pod:161
33991 " struct guestfs_dirent {\n"
34000 #: ../src/guestfs-structs.pod:167
34003 " struct guestfs_dirent_list {\n"
34004 " uint32_t len; /* Number of elements in list. */\n"
34005 " struct guestfs_dirent *val; /* Elements. */\n"
34011 #: ../src/guestfs-structs.pod:172
34014 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
34015 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
34020 #: ../src/guestfs-structs.pod:177
34023 " struct guestfs_version {\n"
34024 " int64_t major;\n"
34025 " int64_t minor;\n"
34026 " int64_t release;\n"
34033 #: ../src/guestfs-structs.pod:184
34036 " struct guestfs_version_list {\n"
34037 " uint32_t len; /* Number of elements in list. */\n"
34038 " struct guestfs_version *val; /* Elements. */\n"
34044 #: ../src/guestfs-structs.pod:189
34047 " void guestfs_free_version (struct guestfs_free_version *);\n"
34048 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
34053 #: ../src/guestfs-structs.pod:192
34054 msgid "guestfs_xattr"
34058 #: ../src/guestfs-structs.pod:194
34061 " struct guestfs_xattr {\n"
34062 " char *attrname;\n"
34063 " /* The next two fields describe a byte array. */\n"
34064 " uint32_t attrval_len;\n"
34065 " char *attrval;\n"
34071 #: ../src/guestfs-structs.pod:201
34074 " struct guestfs_xattr_list {\n"
34075 " uint32_t len; /* Number of elements in list. */\n"
34076 " struct guestfs_xattr *val; /* Elements. */\n"
34082 #: ../src/guestfs-structs.pod:206
34085 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
34086 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
34091 #: ../src/guestfs-structs.pod:209
34092 msgid "guestfs_inotify_event"
34096 #: ../src/guestfs-structs.pod:211
34099 " struct guestfs_inotify_event {\n"
34100 " int64_t in_wd;\n"
34101 " uint32_t in_mask;\n"
34102 " uint32_t in_cookie;\n"
34103 " char *in_name;\n"
34109 #: ../src/guestfs-structs.pod:218
34112 " struct guestfs_inotify_event_list {\n"
34113 " uint32_t len; /* Number of elements in list. */\n"
34114 " struct guestfs_inotify_event *val; /* Elements. */\n"
34120 #: ../src/guestfs-structs.pod:223
34123 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
34124 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
34129 #: ../src/guestfs-structs.pod:226
34130 msgid "guestfs_partition"
34134 #: ../src/guestfs-structs.pod:228
34137 " struct guestfs_partition {\n"
34138 " int32_t part_num;\n"
34139 " uint64_t part_start;\n"
34140 " uint64_t part_end;\n"
34141 " uint64_t part_size;\n"
34147 #: ../src/guestfs-structs.pod:235
34150 " struct guestfs_partition_list {\n"
34151 " uint32_t len; /* Number of elements in list. */\n"
34152 " struct guestfs_partition *val; /* Elements. */\n"
34158 #: ../src/guestfs-structs.pod:240
34161 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
34162 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
34167 #: ../src/guestfs-structs.pod:243
34168 msgid "guestfs_application"
34172 #: ../src/guestfs-structs.pod:245
34175 " struct guestfs_application {\n"
34176 " char *app_name;\n"
34177 " char *app_display_name;\n"
34178 " int32_t app_epoch;\n"
34179 " char *app_version;\n"
34180 " char *app_release;\n"
34181 " char *app_install_path;\n"
34182 " char *app_trans_path;\n"
34183 " char *app_publisher;\n"
34184 " char *app_url;\n"
34185 " char *app_source_package;\n"
34186 " char *app_summary;\n"
34187 " char *app_description;\n"
34193 #: ../src/guestfs-structs.pod:260
34196 " struct guestfs_application_list {\n"
34197 " uint32_t len; /* Number of elements in list. */\n"
34198 " struct guestfs_application *val; /* Elements. */\n"
34204 #: ../src/guestfs-structs.pod:265
34207 " void guestfs_free_application (struct guestfs_free_application *);\n"
34208 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
34213 #: ../src/guestfs.pod:5
34214 msgid "guestfs - Library for accessing and modifying virtual machine images"
34218 #: ../src/guestfs.pod:11
34221 " guestfs_h *g = guestfs_create ();\n"
34222 " guestfs_add_drive (g, \"guest.img\");\n"
34223 " guestfs_launch (g);\n"
34224 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34225 " guestfs_touch (g, \"/hello\");\n"
34226 " guestfs_umount (g, \"/\");\n"
34227 " guestfs_close (g);\n"
34230 " guestfs_h *g = guestfs_create ();\n"
34231 " guestfs_add_drive (g, \"guest.img\");\n"
34232 " guestfs_launch (g);\n"
34233 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34234 " guestfs_touch (g, \"/hello\");\n"
34235 " guestfs_umount (g, \"/\");\n"
34236 " guestfs_close (g);\n"
34240 #: ../src/guestfs.pod:25
34242 "Libguestfs is a library for accessing and modifying guest disk images. "
34243 "Amongst the things this is good for: making batch configuration changes to "
34244 "guests, getting disk used/free statistics (see also: virt-df), migrating "
34245 "between virtualization systems (see also: virt-p2v), performing partial "
34246 "backups, performing partial guest clones, cloning guests and changing "
34247 "registry/UUID/hostname info, and much else besides."
34251 #: ../src/guestfs.pod:33
34253 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
34254 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
34255 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34260 #: ../src/guestfs.pod:38
34262 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34263 "what filesystem is in each LV, etc.). It can also run commands in the "
34264 "context of the guest. Also you can access filesystems over FUSE."
34268 #: ../src/guestfs.pod:43
34270 "Libguestfs is a library that can be linked with C and C++ management "
34271 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
34272 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
34277 #: ../src/guestfs.pod:48
34279 "You don't need to be root to use libguestfs, although obviously you do need "
34280 "enough permissions to access the disk images."
34284 #: ../src/guestfs.pod:51
34286 "Libguestfs is a large API because it can do many things. For a gentle "
34287 "introduction, please read the L</API OVERVIEW> section next."
34291 #: ../src/guestfs.pod:54
34293 "There are also some example programs in the L<guestfs-examples(3)> manual "
34298 #: ../src/guestfs.pod:57
34299 msgid "API OVERVIEW"
34303 #: ../src/guestfs.pod:59
34305 "This section provides a gentler overview of the libguestfs API. We also try "
34306 "to group API calls together, where that may not be obvious from reading "
34307 "about the individual calls in the main section of this manual."
34311 #: ../src/guestfs.pod:64
34316 #: ../src/guestfs.pod:66
34318 "Before you can use libguestfs calls, you have to create a handle. Then you "
34319 "must add at least one disk image to the handle, followed by launching the "
34320 "handle, then performing whatever operations you want, and finally closing "
34321 "the handle. By convention we use the single letter C<g> for the name of the "
34322 "handle variable, although of course you can use any name you want."
34326 #: ../src/guestfs.pod:73
34327 msgid "The general structure of all libguestfs-using programs looks like this:"
34331 #: ../src/guestfs.pod:76
34334 " guestfs_h *g = guestfs_create ();\n"
34339 #: ../src/guestfs.pod:78
34342 " /* Call guestfs_add_drive additional times if there are\n"
34343 " * multiple disk images.\n"
34345 " guestfs_add_drive (g, \"guest.img\");\n"
34350 #: ../src/guestfs.pod:83
34353 " /* Most manipulation calls won't work until you've launched\n"
34354 " * the handle 'g'. You have to do this _after_ adding drives\n"
34355 " * and _before_ other commands.\n"
34357 " guestfs_launch (g);\n"
34362 #: ../src/guestfs.pod:89
34365 " /* Now you can examine what partitions, LVs etc are available.\n"
34367 " char **partitions = guestfs_list_partitions (g);\n"
34368 " char **logvols = guestfs_lvs (g);\n"
34373 #: ../src/guestfs.pod:94
34376 " /* To access a filesystem in the image, you must mount it.\n"
34378 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34383 #: ../src/guestfs.pod:98
34386 " /* Now you can perform filesystem actions on the guest\n"
34389 " guestfs_touch (g, \"/hello\");\n"
34394 #: ../src/guestfs.pod:103
34397 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34398 " * it is done automatically when you close the handle. See\n"
34399 " * discussion of autosync in this page.\n"
34401 " guestfs_sync (g);\n"
34406 #: ../src/guestfs.pod:109
34409 " /* Close the handle 'g'. */\n"
34410 " guestfs_close (g);\n"
34415 #: ../src/guestfs.pod:112
34417 "The code above doesn't include any error checking. In real code you should "
34418 "check return values carefully for errors. In general all functions that "
34419 "return integers return C<-1> on error, and all functions that return "
34420 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34421 "how to handle errors, and consult the documentation for each function call "
34422 "below to see precisely how they return error indications. See L<guestfs-"
34423 "examples(3)> for fully worked examples."
34427 #: ../src/guestfs.pod:121
34428 msgid "DISK IMAGES"
34432 #: ../src/guestfs.pod:123
34434 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34435 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34436 "actual block device, or simply an empty file of zeroes that you have created "
34437 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
34442 #: ../src/guestfs.pod:129
34444 "The call you should use in modern code for adding drives is L</"
34445 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34446 "specifying that the format is raw, do:"
34450 #: ../src/guestfs.pod:133
34453 " guestfs_add_drive_opts (g, filename,\n"
34454 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34460 #: ../src/guestfs.pod:137
34461 msgid "You can add a disk read-only using:"
34465 #: ../src/guestfs.pod:139
34468 " guestfs_add_drive_opts (g, filename,\n"
34469 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34470 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34476 #: ../src/guestfs.pod:144
34478 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34479 "libguestfs won't modify the file."
34483 #: ../src/guestfs.pod:147
34485 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34486 "by a virtual machine. Adding it read-write will almost certainly cause disk "
34487 "corruption, but adding it read-only is safe."
34491 #: ../src/guestfs.pod:151
34493 "You must add at least one disk image, and you may add multiple disk images. "
34494 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
34495 "first one you added), C</dev/sdb> (for the second one you added), etc."
34499 #: ../src/guestfs.pod:156
34501 "Once L</guestfs_launch> has been called you cannot add any more images. You "
34502 "can call L</guestfs_list_devices> to get a list of the device names, in the "
34503 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
34507 #: ../src/guestfs.pod:161
34512 #: ../src/guestfs.pod:163
34514 "Before you can read or write files, create directories and so on in a disk "
34515 "image that contains filesystems, you have to mount those filesystems using "
34516 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
34517 "a disk image contains (for example) one partition with a filesystem on that "
34518 "partition, then you can mount it directly:"
34522 #: ../src/guestfs.pod:170
34525 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
34530 #: ../src/guestfs.pod:172
34532 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
34533 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
34534 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
34535 "that these are libguestfs virtual devices, and are nothing to do with host "
34540 #: ../src/guestfs.pod:178
34542 "If you are given a disk image and you don't know what it contains then you "
34543 "have to find out. Libguestfs can do that too: use L</"
34544 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
34545 "LVs, and either try mounting each to see what is mountable, or else examine "
34546 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
34547 "filesystems, use L</guestfs_list_filesystems>."
34551 #: ../src/guestfs.pod:186
34553 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
34554 "L</INSPECTION> below). But you might find it easier to look at higher level "
34555 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
34559 #: ../src/guestfs.pod:191
34561 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
34562 "several other variations of the C<guestfs_mount_*> call."
34566 #: ../src/guestfs.pod:194
34567 msgid "FILESYSTEM ACCESS AND MODIFICATION"
34571 #: ../src/guestfs.pod:196
34573 "The majority of the libguestfs API consists of fairly low-level calls for "
34574 "accessing and modifying the files, directories, symlinks etc on mounted "
34575 "filesystems. There are over a hundred such calls which you can find listed "
34576 "in detail below in this man page, and we don't even pretend to cover them "
34577 "all in this overview."
34581 #: ../src/guestfs.pod:202
34583 "Specify filenames as full paths, starting with C<\"/\"> and including the "
34588 #: ../src/guestfs.pod:205
34590 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
34591 "the file called C<\"etc/passwd\"> then you could do:"
34595 #: ../src/guestfs.pod:208
34598 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
34603 #: ../src/guestfs.pod:210
34605 "This would return C<data> as a newly allocated buffer containing the full "
34606 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
34607 "or C<NULL> if there was an error."
34611 #: ../src/guestfs.pod:214
34613 "As another example, to create a top-level directory on that filesystem "
34614 "called C<\"var\"> you would do:"
34618 #: ../src/guestfs.pod:217
34621 " guestfs_mkdir (g, \"/var\");\n"
34626 #: ../src/guestfs.pod:219
34627 msgid "To create a symlink you could do:"
34631 #: ../src/guestfs.pod:221
34634 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
34635 " \"/etc/rc3.d/S30portmap\");\n"
34640 #: ../src/guestfs.pod:224
34642 "Libguestfs will reject attempts to use relative paths and there is no "
34643 "concept of a current working directory."
34647 #: ../src/guestfs.pod:227
34649 "Libguestfs can return errors in many situations: for example if the "
34650 "filesystem isn't writable, or if a file or directory that you requested "
34651 "doesn't exist. If you are using the C API (documented here) you have to "
34652 "check for those error conditions after each call. (Other language bindings "
34653 "turn these errors into exceptions)."
34657 #: ../src/guestfs.pod:233
34659 "File writes are affected by the per-handle umask, set by calling L</"
34660 "guestfs_umask> and defaulting to 022. See L</UMASK>."
34664 #: ../src/guestfs.pod:236
34665 msgid "PARTITIONING"
34669 #: ../src/guestfs.pod:238
34671 "Libguestfs contains API calls to read, create and modify partition tables on "
34676 #: ../src/guestfs.pod:241
34678 "In the common case where you want to create a single partition covering the "
34679 "whole disk, you should use the L</guestfs_part_disk> call:"
34683 #: ../src/guestfs.pod:245
34686 " const char *parttype = \"mbr\";\n"
34687 " if (disk_is_larger_than_2TB)\n"
34688 " parttype = \"gpt\";\n"
34689 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
34694 #: ../src/guestfs.pod:250
34696 "Obviously this effectively wipes anything that was on that disk image before."
34700 #: ../src/guestfs.pod:253
34705 #: ../src/guestfs.pod:255
34707 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
34708 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
34709 "you familiarize yourself with the concepts of physical volumes, volume "
34710 "groups and logical volumes."
34714 #: ../src/guestfs.pod:260
34716 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
34717 "tldp.org/HOWTO/LVM-HOWTO/>."
34721 #: ../src/guestfs.pod:263
34722 msgid "DOWNLOADING"
34726 #: ../src/guestfs.pod:265
34728 "Use L</guestfs_cat> to download small, text only files. This call is "
34729 "limited to files which are less than 2 MB and which cannot contain any ASCII "
34730 "NUL (C<\\0>) characters. However the API is very simple to use."
34734 #: ../src/guestfs.pod:269
34736 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
34737 "bit data, since it returns a (pointer, size) pair. However it is still "
34738 "limited to \"small\" files, less than 2 MB."
34742 #: ../src/guestfs.pod:273
34744 "L</guestfs_download> can be used to download any file, with no limits on "
34745 "content or size (even files larger than 4 GB)."
34749 #: ../src/guestfs.pod:276
34751 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
34755 #: ../src/guestfs.pod:279
34760 #: ../src/guestfs.pod:281
34762 "It's often the case that you want to write a file or files to the disk image."
34766 #: ../src/guestfs.pod:284
34768 "To write a small file with fixed content, use L</guestfs_write>. To create "
34769 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
34770 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
34771 "of other functions for creating test files, for example L</guestfs_fill> and "
34772 "L</guestfs_fill_pattern>."
34776 #: ../src/guestfs.pod:290
34778 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
34779 "file content or size (even files larger than 4 GB)."
34783 #: ../src/guestfs.pod:293
34785 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
34789 #: ../src/guestfs.pod:295
34791 "However the fastest way to upload I<large numbers of arbitrary files> is to "
34792 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
34793 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
34794 "in a predictable way (eg. adding it last after all other drives) then you "
34795 "can get the device name from L</guestfs_list_devices> and mount it directly "
34796 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
34797 "portable between kernel versions, and they don't support labels or UUIDs. "
34798 "If you want to pre-build an image or you need to mount it using a label or "
34799 "UUID, use an ISO image instead."
34803 #: ../src/guestfs.pod:306
34808 #: ../src/guestfs.pod:308
34810 "There are various different commands for copying between files and devices "
34811 "and in and out of the guest filesystem. These are summarised in the table "
34816 #: ../src/guestfs.pod:314
34817 msgid "B<file> to B<file>"
34821 #: ../src/guestfs.pod:316
34823 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
34824 "directories recursively."
34828 #: ../src/guestfs.pod:319
34830 "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
34834 #: ../src/guestfs.pod:322
34835 msgid "B<file> to B<device>"
34839 #: ../src/guestfs.pod:324
34840 msgid "B<device> to B<file>"
34844 #: ../src/guestfs.pod:326
34845 msgid "B<device> to B<device>"
34849 #: ../src/guestfs.pod:328
34851 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or L</"
34852 "guestfs_copy_device_to_device>."
34856 #: ../src/guestfs.pod:331
34857 msgid "Example: duplicate the contents of an LV:"
34861 #: ../src/guestfs.pod:333
34864 " guestfs_copy_device_to_device (g,\n"
34865 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34866 " /* -1 marks the end of the list of optional parameters */\n"
34872 #: ../src/guestfs.pod:338
34874 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
34875 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
34876 "optional C<size> parameter:"
34880 #: ../src/guestfs.pod:342
34883 " guestfs_copy_device_to_device (g,\n"
34884 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34885 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
34891 #: ../src/guestfs.pod:347
34892 msgid "B<file on the host> to B<file or device>"
34896 #: ../src/guestfs.pod:349
34897 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
34901 #: ../src/guestfs.pod:351
34902 msgid "B<file or device> to B<file on the host>"
34906 #: ../src/guestfs.pod:353
34907 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
34911 #: ../src/guestfs.pod:357
34912 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
34916 #: ../src/guestfs.pod:359
34918 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
34919 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
34920 "appears you can only upload and download to files. However many Un*x-like "
34921 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
34922 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
34923 "and arbitrary file descriptor N."
34927 #: ../src/guestfs.pod:367
34928 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
34932 #: ../src/guestfs.pod:370
34935 " guestfs_download (g, filename, \"/dev/stdout\");\n"
34940 #: ../src/guestfs.pod:372
34941 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
34945 #: ../src/guestfs.pod:374
34948 " char devfd[64];\n"
34949 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
34950 " guestfs_tar_out (g, \"/\", devfd);\n"
34955 #: ../src/guestfs.pod:378
34956 msgid "LISTING FILES"
34960 #: ../src/guestfs.pod:380
34962 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
34963 "L<guestfish(1)>-equivalent command C<ll>)."
34967 #: ../src/guestfs.pod:383
34969 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
34970 "programs, as a flat list of strings."
34974 #: ../src/guestfs.pod:386
34976 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
34977 "directory, plus additional information about each one. It is more "
34978 "equivalent to using the L<readdir(3)> call on a local filesystem."
34982 #: ../src/guestfs.pod:390
34984 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
34988 #: ../src/guestfs.pod:393
34989 msgid "RUNNING COMMANDS"
34993 #: ../src/guestfs.pod:395
34995 "Although libguestfs is primarily an API for manipulating files inside guest "
34996 "images, we also provide some limited facilities for running commands inside "
35001 #: ../src/guestfs.pod:399
35002 msgid "There are many limitations to this:"
35006 #: ../src/guestfs.pod:405
35008 "The kernel version that the command runs under will be different from what "
35013 #: ../src/guestfs.pod:410
35015 "If the command needs to communicate with daemons, then most likely they "
35016 "won't be running."
35020 #: ../src/guestfs.pod:415
35021 msgid "The command will be running in limited memory."
35025 #: ../src/guestfs.pod:419
35027 "The network may not be available unless you enable it (see L</"
35028 "guestfs_set_network>)."
35032 #: ../src/guestfs.pod:424
35033 msgid "Only supports Linux guests (not Windows, BSD, etc)."
35037 #: ../src/guestfs.pod:428
35039 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
35043 #: ../src/guestfs.pod:433
35045 "For SELinux guests, you may need to enable SELinux and load policy first. "
35046 "See L</SELINUX> in this manpage."
35050 #: ../src/guestfs.pod:438
35052 "I<Security:> It is not safe to run commands from untrusted, possibly "
35053 "malicious guests. These commands may attempt to exploit your program by "
35054 "sending unexpected output. They could also try to exploit the Linux kernel "
35055 "or qemu provided by the libguestfs appliance. They could use the network "
35056 "provided by the libguestfs appliance to bypass ordinary network partitions "
35057 "and firewalls. They could use the elevated privileges or different SELinux "
35058 "context of your program to their advantage."
35062 #: ../src/guestfs.pod:447
35064 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
35065 "(a script which runs when the guest next boots normally), and to have this "
35066 "script run the commands you want in the normal context of the running guest, "
35067 "network security and so on. For information about other security issues, "
35068 "see L</SECURITY>."
35072 #: ../src/guestfs.pod:455
35074 "The two main API calls to run commands are L</guestfs_command> and L</"
35075 "guestfs_sh> (there are also variations)."
35079 #: ../src/guestfs.pod:458
35081 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
35082 "shell globs, redirections, etc will work."
35086 #: ../src/guestfs.pod:461
35087 msgid "CONFIGURATION FILES"
35091 #: ../src/guestfs.pod:463
35093 "To read and write configuration files in Linux guest filesystems, we "
35094 "strongly recommend using Augeas. For example, Augeas understands how to "
35095 "read and write, say, a Linux shadow password file or X.org configuration "
35096 "file, and so avoids you having to write that code."
35100 #: ../src/guestfs.pod:468
35102 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
35103 "document Augeas itself here because there is excellent documentation on the "
35104 "L<http://augeas.net/> website."
35108 #: ../src/guestfs.pod:472
35110 "If you don't want to use Augeas (you fool!) then try calling L</"
35111 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
35116 #: ../src/guestfs.pod:476
35121 #: ../src/guestfs.pod:478
35123 "We support SELinux guests. To ensure that labeling happens correctly in "
35124 "SELinux guests, you need to enable SELinux and load the guest's policy:"
35128 #: ../src/guestfs.pod:486
35129 msgid "Before launching, do:"
35133 #: ../src/guestfs.pod:488
35136 " guestfs_set_selinux (g, 1);\n"
35141 #: ../src/guestfs.pod:492
35143 "After mounting the guest's filesystem(s), load the policy. This is best "
35144 "done by running the L<load_policy(8)> command in the guest itself:"
35148 #: ../src/guestfs.pod:496
35151 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
35156 #: ../src/guestfs.pod:498
35158 "(Older versions of C<load_policy> require you to specify the name of the "
35163 #: ../src/guestfs.pod:503
35165 "Optionally, set the security context for the API. The correct security "
35166 "context to use can only be known by inspecting the guest. As an example:"
35170 #: ../src/guestfs.pod:507
35173 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
35178 #: ../src/guestfs.pod:511
35179 msgid "This will work for running commands and editing existing files."
35183 #: ../src/guestfs.pod:513
35185 "When new files are created, you may need to label them explicitly, for "
35186 "example by running the external command C<restorecon pathname>."
35190 #: ../src/guestfs.pod:517
35195 #: ../src/guestfs.pod:519
35197 "Certain calls are affected by the current file mode creation mask (the "
35198 "\"umask\"). In particular ones which create files or directories, such as "
35199 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
35200 "either the default mode that the file is created with or modifies the mode "
35205 #: ../src/guestfs.pod:525
35207 "The default umask is C<022>, so files are created with modes such as C<0644> "
35208 "and directories with C<0755>."
35212 #: ../src/guestfs.pod:528
35214 "There are two ways to avoid being affected by umask. Either set umask to 0 "
35215 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
35216 "guestfs_chmod> after creating each file or directory."
35220 #: ../src/guestfs.pod:532
35221 msgid "For more information about umask, see L<umask(2)>."
35225 #: ../src/guestfs.pod:536
35227 "Libguestfs allows you to access Linux guests which have been encrypted using "
35228 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
35229 "standard. This includes nearly all whole disk encryption systems used by "
35230 "modern Linux guests."
35234 #: ../src/guestfs.pod:542
35236 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
35237 "returns the string C<crypto_LUKS>)."
35241 #: ../src/guestfs.pod:545
35243 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
35244 "will require the passphrase!"
35248 #: ../src/guestfs.pod:548
35250 "Opening a LUKS device creates a new device mapper device called C</dev/"
35251 "mapper/mapname> (where C<mapname> is the string you supply to L</"
35252 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
35253 "from and encrypted to the underlying block device respectively."
35257 #: ../src/guestfs.pod:554
35259 "LVM volume groups on the device can be made visible by calling L</"
35260 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
35261 "(s) can now be mounted in the usual way."
35265 #: ../src/guestfs.pod:558
35267 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
35268 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35269 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
35270 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35271 "underlying encrypted block device)."
35275 #: ../src/guestfs.pod:565
35280 #: ../src/guestfs.pod:567
35282 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35283 "contains operating systems, an install CD or a live CD. (These APIs used to "
35284 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
35285 "version 1.5.3 the most frequently used part of this library has been "
35286 "rewritten in C and moved into the core code)."
35290 #: ../src/guestfs.pod:574
35292 "Add all disks belonging to the unknown virtual machine and call L</"
35293 "guestfs_launch> in the usual way."
35297 #: ../src/guestfs.pod:577
35299 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
35300 "and certain heuristics, and returns a list of operating systems that were "
35301 "found. An empty list means none were found. A single element is the root "
35302 "filesystem of the operating system. For dual- or multi-boot guests, "
35303 "multiple roots can be returned, each one corresponding to a separate "
35304 "operating system. (Multi-boot virtual machines are extremely rare in the "
35305 "world of virtualization, but since this scenario can happen, we have built "
35306 "libguestfs to deal with it.)"
35310 #: ../src/guestfs.pod:586
35312 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35313 "to get additional details about that operating system. For example, call L</"
35314 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
35315 "Windows and Linux-based operating systems respectively."
35319 #: ../src/guestfs.pod:592
35321 "Un*x-like and Linux-based operating systems usually consist of several "
35322 "filesystems which are mounted at boot time (for example, a separate boot "
35323 "partition mounted on C</boot>). The inspection rules are able to detect how "
35324 "filesystems correspond to mount points. Call "
35325 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35326 "hash table like this example:"
35330 #: ../src/guestfs.pod:599
35333 " /boot => /dev/sda1\n"
35334 " / => /dev/vg_guest/lv_root\n"
35335 " /usr => /dev/vg_guest/lv_usr\n"
35340 #: ../src/guestfs.pod:603
35342 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35343 "filesystems as suggested."
35347 #: ../src/guestfs.pod:606
35349 "Be careful to mount filesystems in the right order (eg. C</> before C</"
35350 "usr>). Sorting the keys of the hash by length, shortest first, should work."
35354 #: ../src/guestfs.pod:610
35356 "Inspection currently only works for some common operating systems. "
35357 "Contributors are welcome to send patches for other operating systems that we "
35358 "currently cannot detect."
35362 #: ../src/guestfs.pod:614
35364 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35365 "for more details. The L</guestfs_inspect_os> function just ignores any "
35366 "encrypted devices."
35370 #: ../src/guestfs.pod:618
35372 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35373 "inspection and caches the results in the guest handle. Subsequent calls to "
35374 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
35375 "read the disks. If you change the content of the guest disks, you can redo "
35376 "inspection by calling L</guestfs_inspect_os> again. (L</"
35377 "guestfs_inspect_list_applications> works a little differently from the other "
35378 "calls and does read the disks. See documentation for that function for "
35383 #: ../src/guestfs.pod:627
35384 msgid "INSPECTING INSTALL DISKS"
35388 #: ../src/guestfs.pod:629
35390 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35395 #: ../src/guestfs.pod:632
35397 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35398 "system, which currently can be C<installed> (a regular operating system) or "
35399 "C<installer> (some sort of install disk)."
35403 #: ../src/guestfs.pod:636
35405 "Further information is available about the operating system that can be "
35406 "installed using the regular inspection APIs like L</"
35407 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
35411 #: ../src/guestfs.pod:641
35413 "Some additional information specific to installer disks is also available "
35414 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
35415 "guestfs_inspect_is_multipart> calls."
35419 #: ../src/guestfs.pod:646
35420 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35424 #: ../src/guestfs.pod:648
35426 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
35427 "ntfs-3g.org/> driver."
35431 #: ../src/guestfs.pod:651
35432 msgid "DRIVE LETTERS AND PATHS"
35436 #: ../src/guestfs.pod:653
35438 "DOS and Windows still use drive letters, and the filesystems are always "
35439 "treated as case insensitive by Windows itself, and therefore you might find "
35440 "a Windows configuration file referring to a path like C<c:\\windows"
35441 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
35442 "might be referred to as C</WINDOWS/System32>."
35446 #: ../src/guestfs.pod:659
35448 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35449 "L</guestfs_inspect_get_drive_mappings>)"
35453 #: ../src/guestfs.pod:662
35455 "Dealing with separator characters (backslash vs forward slash) is outside "
35456 "the scope of libguestfs, but usually a simple character replacement will "
35461 #: ../src/guestfs.pod:666
35463 "To resolve the case insensitivity of paths, call L</"
35464 "guestfs_case_sensitive_path>."
35468 #: ../src/guestfs.pod:669
35469 msgid "ACCESSING THE WINDOWS REGISTRY"
35473 #: ../src/guestfs.pod:671
35475 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35476 "files, through the library C<hivex> which is part of the libguestfs project "
35477 "although ships as a separate tarball. You have to locate and download the "
35478 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35479 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
35480 "reg(1)> for more help on this issue."
35484 #: ../src/guestfs.pod:679
35485 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
35489 #: ../src/guestfs.pod:681
35491 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
35492 "provide something which looks like a Linux symlink. The way it tries to do "
35493 "the rewriting is described here:"
35497 #: ../src/guestfs.pod:685
35499 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
35504 #: ../src/guestfs.pod:687
35506 "The essential problem is that ntfs-3g simply does not have enough "
35507 "information to do a correct job. NTFS links can contain drive letters and "
35508 "references to external device GUIDs that ntfs-3g has no way of resolving. "
35509 "It is almost certainly the case that libguestfs callers should ignore what "
35510 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
35514 #: ../src/guestfs.pod:694
35516 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
35517 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
35518 "attribute, and read the raw reparse data from that (you can find the format "
35519 "documented in various places around the web)."
35523 #: ../src/guestfs.pod:699
35524 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
35528 #: ../src/guestfs.pod:701
35530 "There are other useful extended attributes that can be read from ntfs-3g "
35531 "filesystems (using L</guestfs_getxattr>). See:"
35535 #: ../src/guestfs.pod:704
35537 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
35541 #: ../src/guestfs.pod:706
35542 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
35546 #: ../src/guestfs.pod:708
35548 "Although we don't want to discourage you from using the C API, we will "
35549 "mention here that the same API is also available in other languages."
35553 #: ../src/guestfs.pod:711
35555 "The API is broadly identical in all supported languages. This means that "
35556 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
35557 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
35558 "OCaml. In other words, a straightforward, predictable isomorphism between "
35563 #: ../src/guestfs.pod:717
35565 "Error messages are automatically transformed into exceptions if the language "
35570 #: ../src/guestfs.pod:720
35572 "We don't try to \"object orientify\" parts of the API in OO languages, "
35573 "although contributors are welcome to write higher level APIs above what we "
35574 "provide in their favourite languages if they wish."
35578 #: ../src/guestfs.pod:726
35583 #: ../src/guestfs.pod:728
35585 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
35586 "identical to the C API. C++ classes and exceptions are not used."
35590 #: ../src/guestfs.pod:732
35595 #: ../src/guestfs.pod:734
35597 "The C# bindings are highly experimental. Please read the warnings at the "
35598 "top of C<csharp/Libguestfs.cs>."
35602 #: ../src/guestfs.pod:737
35607 #: ../src/guestfs.pod:739
35608 msgid "See L<guestfs-erlang(3)>."
35612 #: ../src/guestfs.pod:741
35617 #: ../src/guestfs.pod:743
35619 "This is the only language binding that is working but incomplete. Only "
35620 "calls which return simple integers have been bound in Haskell, and we are "
35621 "looking for help to complete this binding."
35625 #: ../src/guestfs.pod:747
35630 #: ../src/guestfs.pod:749
35632 "Full documentation is contained in the Javadoc which is distributed with "
35633 "libguestfs. For examples, see L<guestfs-java(3)>."
35637 #: ../src/guestfs.pod:752
35642 #: ../src/guestfs.pod:754
35643 msgid "See L<guestfs-ocaml(3)>."
35647 #: ../src/guestfs.pod:756
35652 #: ../src/guestfs.pod:758
35653 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
35657 #: ../src/guestfs.pod:760
35662 #: ../src/guestfs.pod:762
35664 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
35665 "the php-libguestfs package for your distribution."
35669 #: ../src/guestfs.pod:765
35670 msgid "The PHP binding only works correctly on 64 bit machines."
35674 #: ../src/guestfs.pod:767
35679 #: ../src/guestfs.pod:769
35680 msgid "See L<guestfs-python(3)>."
35684 #: ../src/guestfs.pod:771
35689 #: ../src/guestfs.pod:773
35690 msgid "See L<guestfs-ruby(3)>."
35694 #: ../src/guestfs.pod:775
35695 msgid "B<shell scripts>"
35699 #: ../src/guestfs.pod:777
35700 msgid "See L<guestfish(1)>."
35704 #: ../src/guestfs.pod:781
35705 msgid "LIBGUESTFS GOTCHAS"
35709 #: ../src/guestfs.pod:783
35711 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
35712 "system [...] that works in the way it is documented but is counterintuitive "
35713 "and almost invites mistakes.\""
35717 #: ../src/guestfs.pod:787
35719 "Since we developed libguestfs and the associated tools, there are several "
35720 "things we would have designed differently, but are now stuck with for "
35721 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
35722 "release, you can expect these to change. Beware of them."
35726 #: ../src/guestfs.pod:795
35727 msgid "Autosync / forgetting to sync."
35731 #: ../src/guestfs.pod:797
35733 "I<Update:> Autosync is enabled by default for all API users starting from "
35734 "libguestfs 1.5.24. This section only applies to older versions."
35738 #: ../src/guestfs.pod:800
35740 "When modifying a filesystem from C or another language, you B<must> unmount "
35741 "all filesystems and call L</guestfs_sync> explicitly before you close the "
35742 "libguestfs handle. You can also call:"
35746 #: ../src/guestfs.pod:804
35749 " guestfs_set_autosync (g, 1);\n"
35754 #: ../src/guestfs.pod:806
35756 "to have the unmount/sync done automatically for you when the handle 'g' is "
35757 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
35761 #: ../src/guestfs.pod:810
35763 "If you forget to do this, then it is entirely possible that your changes "
35764 "won't be written out, or will be partially written, or (very rarely) that "
35765 "you'll get disk corruption."
35769 #: ../src/guestfs.pod:814
35771 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
35772 "guestfish scripts that forget to sync will work just fine, which can make "
35773 "this very puzzling if you are trying to debug a problem."
35777 #: ../src/guestfs.pod:818
35778 msgid "Mount option C<-o sync> should not be the default."
35782 #: ../src/guestfs.pod:820
35784 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
35785 "libguestfs 1.13.16. This section only applies to older versions."
35789 #: ../src/guestfs.pod:823
35791 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
35792 "However C<-o sync> does not add any reliability benefit, but does have a "
35793 "very large performance impact."
35797 #: ../src/guestfs.pod:827
35799 "The work around is to use L</guestfs_mount_options> and set the mount "
35800 "options that you actually want to use."
35804 #: ../src/guestfs.pod:830
35805 msgid "Read-only should be the default."
35809 #: ../src/guestfs.pod:832
35811 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
35812 "specify I<--rw> if you want to make changes to the image."
35816 #: ../src/guestfs.pod:835
35817 msgid "This would reduce the potential to corrupt live VM images."
35821 #: ../src/guestfs.pod:837
35823 "Note that many filesystems change the disk when you just mount and unmount, "
35824 "even if you didn't perform any writes. You need to use L</"
35825 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
35829 #: ../src/guestfs.pod:841
35830 msgid "guestfish command line is hard to use."
35834 #: ../src/guestfs.pod:843
35836 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
35837 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
35838 "exist, so it fails. In earlier versions of guestfish the error message was "
35839 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
35840 "we should have used C<guestfish -c command> to run commands."
35844 #: ../src/guestfs.pod:850
35845 msgid "guestfish megabyte modifiers don't work right on all commands"
35849 #: ../src/guestfs.pod:852
35851 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
35852 "other modifiers). What guestfish actually does is to multiply the number "
35853 "part by the modifier part and pass the result to the C API. However this "
35854 "doesn't work for a few APIs which aren't expecting bytes, but are already "
35855 "expecting some other unit (eg. megabytes)."
35859 #: ../src/guestfs.pod:859
35860 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
35864 #: ../src/guestfs.pod:861
35867 " lvcreate LV VG 100M\n"
35872 #: ../src/guestfs.pod:863
35874 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
35875 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
35876 "megabytes * megabytes) logical volume. The error message you get from this "
35877 "is also a little obscure."
35881 #: ../src/guestfs.pod:868
35883 "This could be fixed in the generator by specially marking parameters and "
35884 "return values which take bytes or other units."
35888 #: ../src/guestfs.pod:871
35889 msgid "Ambiguity between devices and paths"
35893 #: ../src/guestfs.pod:873
35895 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
35896 "sdb2>) and a similar pathname. A file might just happen to be called "
35897 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
35901 #: ../src/guestfs.pod:878
35903 "In the current API we usually resolve this ambiguity by having two separate "
35904 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
35905 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
35906 "detecting if the path supplied begins with C</dev/>."
35910 #: ../src/guestfs.pod:884
35912 "To avoid both the ambiguity and the need to duplicate some calls, we could "
35913 "make paths/devices into structured names. One way to do this would be to "
35914 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
35915 "aspect of grub. Another way would be to use a structured type, equivalent "
35916 "to this OCaml type:"
35920 #: ../src/guestfs.pod:890
35923 " type path = Path of string | Device of int | Partition of int * int\n"
35928 #: ../src/guestfs.pod:892
35929 msgid "which would allow you to pass arguments like:"
35933 #: ../src/guestfs.pod:894
35936 " Path \"/foo/bar\"\n"
35937 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
35938 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
35939 " Path \"/dev/sdb2\" (* not a device *)\n"
35944 #: ../src/guestfs.pod:899
35946 "As you can see there are still problems to resolve even with this "
35947 "representation. Also consider how it might work in guestfish."
35951 #: ../src/guestfs.pod:904
35952 msgid "KEYS AND PASSPHRASES"
35956 #: ../src/guestfs.pod:906
35958 "Certain libguestfs calls take a parameter that contains sensitive key "
35959 "material, passed in as a C string."
35963 #: ../src/guestfs.pod:909
35965 "In the future we would hope to change the libguestfs implementation so that "
35966 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
35967 "swap. However this is I<not> done at the moment, because of the complexity "
35968 "of such an implementation."
35972 #: ../src/guestfs.pod:914
35974 "Therefore you should be aware that any key parameter you pass to libguestfs "
35975 "might end up being written out to the swap partition. If this is a concern, "
35976 "scrub the swap partition or don't use libguestfs on encrypted devices."
35980 #: ../src/guestfs.pod:919
35981 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
35985 #: ../src/guestfs.pod:921
35987 "All high-level libguestfs actions are synchronous. If you want to use "
35988 "libguestfs asynchronously then you must create a thread."
35992 #: ../src/guestfs.pod:924
35994 "Only use the handle from a single thread. Either use the handle exclusively "
35995 "from one thread, or provide your own mutex so that two threads cannot issue "
35996 "calls on the same handle at the same time."
36000 #: ../src/guestfs.pod:928
36002 "See the graphical program guestfs-browser for one possible architecture for "
36003 "multithreaded programs using libvirt and libguestfs."
36007 #: ../src/guestfs.pod:931
36012 #: ../src/guestfs.pod:933
36014 "Libguestfs needs a supermin appliance, which it finds by looking along an "
36019 #: ../src/guestfs.pod:936
36021 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
36022 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
36026 #: ../src/guestfs.pod:939
36028 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
36029 "to change the directories that libguestfs will search in. The value is a "
36030 "colon-separated list of paths. The current directory is I<not> searched "
36031 "unless the path contains an empty element or C<.>. For example "
36032 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
36033 "then C</usr/lib/guestfs>."
36037 #: ../src/guestfs.pod:946
36038 msgid "QEMU WRAPPERS"
36042 #: ../src/guestfs.pod:948
36044 "If you want to compile your own qemu, run qemu from a non-standard location, "
36045 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
36050 #: ../src/guestfs.pod:952
36052 "There is one important rule to remember: you I<must C<exec qemu>> as the "
36053 "last command in the shell script (so that qemu replaces the shell and "
36054 "becomes the direct child of the libguestfs-using program). If you don't do "
36055 "this, then the qemu process won't be cleaned up correctly."
36059 #: ../src/guestfs.pod:957
36061 "Here is an example of a wrapper, where I have built my own copy of qemu from "
36066 #: ../src/guestfs.pod:960
36070 " qemudir=/home/rjones/d/qemu\n"
36071 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
36076 #: ../src/guestfs.pod:964
36078 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
36079 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
36084 #: ../src/guestfs.pod:968
36087 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
36092 #: ../src/guestfs.pod:970
36094 "Note that libguestfs also calls qemu with the -help and -version options in "
36095 "order to determine features."
36099 #: ../src/guestfs.pod:973
36101 "Wrappers can also be used to edit the options passed to qemu. In the "
36102 "following example, the C<-machine ...> option (C<-machine> and the following "
36103 "argument) are removed from the command line and replaced with C<-machine pc,"
36104 "accel=tcg>. The while loop iterates over the options until it finds the "
36105 "right one to remove, putting the remaining options into the C<args> array."
36109 #: ../src/guestfs.pod:982
36113 " while [ $# -gt 0 ]; do\n"
36114 " case \"$1\" in\n"
36118 " args[i]=\"$1\"\n"
36127 #: ../src/guestfs.pod:994
36130 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
36135 #: ../src/guestfs.pod:996
36136 msgid "ATTACHING TO RUNNING DAEMONS"
36140 #: ../src/guestfs.pod:998
36142 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
36143 "babies. Use with caution."
36147 #: ../src/guestfs.pod:1001
36149 "I<Note (2):> This section explains how to attach to a running daemon from a "
36150 "low level perspective. For most users, simply using virt tools such as "
36151 "L<guestfish(1)> with the I<--live> option will \"just work\"."
36155 #: ../src/guestfs.pod:1005
36156 msgid "Using guestfs_set_attach_method"
36160 #: ../src/guestfs.pod:1007
36162 "By calling L</guestfs_set_attach_method> you can change how the library "
36163 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
36164 "ARCHITECTURE> for some background)."
36168 #: ../src/guestfs.pod:1011
36170 "The normal attach method is C<appliance>, where a small appliance is created "
36171 "containing the daemon, and then the library connects to this."
36175 #: ../src/guestfs.pod:1014
36177 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
36178 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
36179 "daemon over the Unix domain socket."
36183 #: ../src/guestfs.pod:1018
36185 "The normal use for this is to connect to a running virtual machine that "
36186 "contains a C<guestfsd> daemon, and send commands so you can read and write "
36187 "files inside the live virtual machine."
36191 #: ../src/guestfs.pod:1022
36192 msgid "Using guestfs_add_domain with live flag"
36196 #: ../src/guestfs.pod:1024
36198 "L</guestfs_add_domain> provides some help for getting the correct attach "
36199 "method. If you pass the C<live> option to this function, then (if the "
36200 "virtual machine is running) it will examine the libvirt XML looking for a "
36201 "virtio-serial channel to connect to:"
36205 #: ../src/guestfs.pod:1030
36212 " <channel type='unix'>\n"
36213 " <source mode='bind' path='/path/to/socket'/>\n"
36214 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
36223 #: ../src/guestfs.pod:1042
36225 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
36226 "method to C<unix:/path/to/socket>."
36230 #: ../src/guestfs.pod:1045
36232 "Some of the libguestfs tools (including guestfish) support a I<--live> "
36233 "option which is passed through to L</guestfs_add_domain> thus allowing you "
36234 "to attach to and modify live virtual machines."
36238 #: ../src/guestfs.pod:1049
36240 "The virtual machine needs to have been set up beforehand so that it has the "
36241 "virtio-serial channel and so that guestfsd is running inside it."
36245 #: ../src/guestfs.pod:1053
36246 msgid "ABI GUARANTEE"
36250 #: ../src/guestfs.pod:1055
36252 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36253 "actions as outlined in this section. Although we will deprecate some "
36254 "actions, for example if they get replaced by newer calls, we will keep the "
36255 "old actions forever. This allows you the developer to program in confidence "
36256 "against the libguestfs API."
36260 #: ../src/guestfs.pod:1061
36261 msgid "BLOCK DEVICE NAMING"
36265 #: ../src/guestfs.pod:1063
36267 "In the kernel there is now quite a profusion of schemata for naming block "
36268 "devices (in this context, by I<block device> I mean a physical or virtual "
36269 "hard drive). The original Linux IDE driver used names starting with C</dev/"
36270 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
36271 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
36272 "for the old IDE driver (particularly for SATA devices) those devices also "
36273 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
36274 "paravirtualized drivers. This has created several different naming systems, "
36275 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
36279 #: ../src/guestfs.pod:1075
36281 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36282 "Linux kernel to access block devices. We can run a variety of appliances "
36283 "based on a variety of Linux kernels."
36287 #: ../src/guestfs.pod:1079
36289 "This causes a problem for libguestfs because many API calls use device or "
36290 "partition names. Working scripts and the recipe (example) scripts that we "
36291 "make available over the internet could fail if the naming scheme changes."
36295 #: ../src/guestfs.pod:1084
36297 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36298 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
36299 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
36300 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36304 #: ../src/guestfs.pod:1090
36306 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
36307 "L</guestfs_list_partitions> and similar calls return the true names of the "
36308 "devices and partitions as known to the appliance."
36312 #: ../src/guestfs.pod:1095
36313 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36317 #: ../src/guestfs.pod:1097
36319 "Usually this translation is transparent. However in some (very rare) cases "
36320 "you may need to know the exact algorithm. Such cases include where you use "
36321 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
36322 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
36326 #: ../src/guestfs.pod:1103
36328 "The algorithm is applied only to I<parameters> which are known to be either "
36329 "device or partition names. Return values from functions such as L</"
36330 "guestfs_list_devices> are never changed."
36334 #: ../src/guestfs.pod:1111
36335 msgid "Is the string a parameter which is a device or partition name?"
36339 #: ../src/guestfs.pod:1115
36340 msgid "Does the string begin with C</dev/sd>?"
36344 #: ../src/guestfs.pod:1119
36346 "Does the named device exist? If so, we use that device. However if I<not> "
36347 "then we continue with this algorithm."
36351 #: ../src/guestfs.pod:1124
36352 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36356 #: ../src/guestfs.pod:1126
36357 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36361 #: ../src/guestfs.pod:1128
36362 msgid "If that named device exists, use it. If not, continue."
36366 #: ../src/guestfs.pod:1132
36367 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36371 #: ../src/guestfs.pod:1134
36372 msgid "If that named device exists, use it. If not, return an error."
36376 #: ../src/guestfs.pod:1138
36377 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36381 #: ../src/guestfs.pod:1140
36383 "Although the standard naming scheme and automatic translation is useful for "
36384 "simple programs and guestfish scripts, for larger programs it is best not to "
36385 "rely on this mechanism."
36389 #: ../src/guestfs.pod:1144
36391 "Where possible for maximum future portability programs using libguestfs "
36392 "should use these future-proof techniques:"
36396 #: ../src/guestfs.pod:1151
36398 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36399 "device names, and then use those names directly."
36403 #: ../src/guestfs.pod:1154
36405 "Since those device names exist by definition, they will never be translated."
36409 #: ../src/guestfs.pod:1159
36411 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36412 "filesystem labels."
36416 #: ../src/guestfs.pod:1166
36418 "This section discusses security implications of using libguestfs, "
36419 "particularly with untrusted or malicious guests or disk images."
36423 #: ../src/guestfs.pod:1169
36424 msgid "GENERAL SECURITY CONSIDERATIONS"
36428 #: ../src/guestfs.pod:1171
36430 "Be careful with any files or data that you download from a guest (by "
36431 "\"download\" we mean not just the L</guestfs_download> command but any "
36432 "command that reads files, filenames, directories or anything else from a "
36433 "disk image). An attacker could manipulate the data to fool your program "
36434 "into doing the wrong thing. Consider cases such as:"
36438 #: ../src/guestfs.pod:1181
36439 msgid "the data (file etc) not being present"
36443 #: ../src/guestfs.pod:1185
36444 msgid "being present but empty"
36448 #: ../src/guestfs.pod:1189
36449 msgid "being much larger than normal"
36453 #: ../src/guestfs.pod:1193
36454 msgid "containing arbitrary 8 bit data"
36458 #: ../src/guestfs.pod:1197
36459 msgid "being in an unexpected character encoding"
36463 #: ../src/guestfs.pod:1201
36464 msgid "containing homoglyphs."
36468 #: ../src/guestfs.pod:1205
36469 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36473 #: ../src/guestfs.pod:1207
36475 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36476 "(VFS) module can sometimes be escalated into exploits by deliberately "
36477 "creating a malicious, malformed filesystem. These exploits are very severe "
36478 "for two reasons. Firstly there are very many filesystem drivers in the "
36479 "kernel, and many of them are infrequently used and not much developer "
36480 "attention has been paid to the code. Linux userspace helps potential "
36481 "crackers by detecting the filesystem type and automatically choosing the "
36482 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36483 "the administrator. Secondly, a kernel-level exploit is like a local root "
36484 "exploit (worse in some ways), giving immediate and total access to the "
36485 "system right down to the hardware level."
36489 #: ../src/guestfs.pod:1220
36491 "That explains why you should never mount a filesystem from an untrusted "
36492 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
36493 "inside a qemu virtual machine, usually running as a non-root user. The "
36494 "attacker would need to write a filesystem which first exploited the kernel, "
36495 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
36496 "the libguestfs protocol, and finally to be as serious as the host kernel "
36497 "exploit it would need to escalate its privileges to root. This multi-step "
36498 "escalation, performed by a static piece of data, is thought to be extremely "
36499 "hard to do, although we never say 'never' about security issues."
36503 #: ../src/guestfs.pod:1231
36505 "In any case callers can reduce the attack surface by forcing the filesystem "
36506 "type when mounting (use L</guestfs_mount_vfs>)."
36510 #: ../src/guestfs.pod:1234
36511 msgid "PROTOCOL SECURITY"
36515 #: ../src/guestfs.pod:1236
36517 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
36518 "defined upper message size. However a program that uses libguestfs must "
36519 "also take care - for example you can write a program that downloads a binary "
36520 "from a disk image and executes it locally, and no amount of protocol "
36521 "security will save you from the consequences."
36525 #: ../src/guestfs.pod:1242
36526 msgid "INSPECTION SECURITY"
36530 #: ../src/guestfs.pod:1244
36532 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
36533 "directly from the guest, and these could contain any 8 bit data. Callers "
36534 "should be careful to escape these before printing them to a structured file "
36535 "(for example, use HTML escaping if creating a web page)."
36539 #: ../src/guestfs.pod:1250
36541 "Guest configuration may be altered in unusual ways by the administrator of "
36542 "the virtual machine, and may not reflect reality (particularly for untrusted "
36543 "or actively malicious guests). For example we parse the hostname from "
36544 "configuration files like C</etc/sysconfig/network> that we find in the "
36545 "guest, but the guest administrator can easily manipulate these files to "
36546 "provide the wrong hostname."
36550 #: ../src/guestfs.pod:1258
36552 "The inspection API parses guest configuration using two external libraries: "
36553 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
36554 "designed to be robust in the face of malicious data, although denial of "
36555 "service attacks are still possible, for example with oversized configuration "
36560 #: ../src/guestfs.pod:1264
36561 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
36565 #: ../src/guestfs.pod:1266
36567 "Be very cautious about running commands from the guest. By running a "
36568 "command in the guest, you are giving CPU time to a binary that you do not "
36569 "control, under the same user account as the library, albeit wrapped in qemu "
36570 "virtualization. More information and alternatives can be found in the "
36571 "section L</RUNNING COMMANDS>."
36575 #: ../src/guestfs.pod:1272
36576 msgid "CVE-2010-3851"
36580 #: ../src/guestfs.pod:1274
36581 msgid "https://bugzilla.redhat.com/642934"
36585 #: ../src/guestfs.pod:1276
36587 "This security bug concerns the automatic disk format detection that qemu "
36588 "does on disk images."
36592 #: ../src/guestfs.pod:1279
36594 "A raw disk image is just the raw bytes, there is no header. Other disk "
36595 "images like qcow2 contain a special header. Qemu deals with this by looking "
36596 "for one of the known headers, and if none is found then assuming the disk "
36597 "image must be raw."
36601 #: ../src/guestfs.pod:1284
36603 "This allows a guest which has been given a raw disk image to write some "
36604 "other header. At next boot (or when the disk image is accessed by "
36605 "libguestfs) qemu would do autodetection and think the disk image format was, "
36606 "say, qcow2 based on the header written by the guest."
36610 #: ../src/guestfs.pod:1289
36612 "This in itself would not be a problem, but qcow2 offers many features, one "
36613 "of which is to allow a disk image to refer to another image (called the "
36614 "\"backing disk\"). It does this by placing the path to the backing disk "
36615 "into the qcow2 header. This path is not validated and could point to any "
36616 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
36617 "\"holes\" in the qcow2 disk image, which of course is completely under the "
36618 "control of the attacker."
36622 #: ../src/guestfs.pod:1297
36624 "In libguestfs this is rather hard to exploit except under two circumstances:"
36628 #: ../src/guestfs.pod:1304
36629 msgid "You have enabled the network or have opened the disk in write mode."
36633 #: ../src/guestfs.pod:1308
36635 "You are also running untrusted code from the guest (see L</RUNNING "
36640 #: ../src/guestfs.pod:1313
36642 "The way to avoid this is to specify the expected disk format when adding "
36643 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
36644 "should always do this if the disk is raw format, and it's a good idea for "
36649 #: ../src/guestfs.pod:1318
36651 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
36652 "format is fetched from libvirt and passed through."
36656 #: ../src/guestfs.pod:1321
36658 "For libguestfs tools, use the I<--format> command line parameter as "
36663 #: ../src/guestfs.pod:1324
36664 msgid "CONNECTION MANAGEMENT"
36668 #: ../src/guestfs.pod:1326
36669 msgid "guestfs_h *"
36673 #: ../src/guestfs.pod:1328
36675 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
36676 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
36677 "handle and release all resources used."
36681 #: ../src/guestfs.pod:1332
36683 "For information on using multiple handles and threads, see the section L</"
36684 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
36688 #: ../src/guestfs.pod:1335
36689 msgid "guestfs_create"
36693 #: ../src/guestfs.pod:1337
36696 " guestfs_h *guestfs_create (void);\n"
36701 #: ../src/guestfs.pod:1339
36702 msgid "Create a connection handle."
36706 #: ../src/guestfs.pod:1341
36708 "On success this returns a non-NULL pointer to a handle. On error it returns "
36713 #: ../src/guestfs.pod:1344
36715 "You have to \"configure\" the handle after creating it. This includes "
36716 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
36717 "handle at least once."
36721 #: ../src/guestfs.pod:1348
36722 msgid "After configuring the handle, you have to call L</guestfs_launch>."
36726 #: ../src/guestfs.pod:1350
36728 "You may also want to configure error handling for the handle. See the L</"
36729 "ERROR HANDLING> section below."
36733 #: ../src/guestfs.pod:1353
36734 msgid "guestfs_close"
36738 #: ../src/guestfs.pod:1355
36741 " void guestfs_close (guestfs_h *g);\n"
36746 #: ../src/guestfs.pod:1357
36747 msgid "This closes the connection handle and frees up all resources used."
36751 #: ../src/guestfs.pod:1359
36753 "If autosync was set on the handle and the handle was launched, then this "
36754 "implicitly calls various functions to unmount filesystems and sync the "
36755 "disk. See L</guestfs_set_autosync> for more details."
36759 #: ../src/guestfs.pod:1363
36760 msgid "If a close callback was set on the handle, then it is called."
36764 #: ../src/guestfs.pod:1365
36765 msgid "ERROR HANDLING"
36769 #: ../src/guestfs.pod:1367
36771 "API functions can return errors. For example, almost all functions that "
36772 "return C<int> will return C<-1> to indicate an error."
36776 #: ../src/guestfs.pod:1370
36778 "Additional information is available for errors: an error message string and "
36779 "optionally an error number (errno) if the thing that failed was a system "
36784 #: ../src/guestfs.pod:1374
36786 "You can get at the additional information about the last error on the handle "
36787 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
36788 "up an error handler with L</guestfs_set_error_handler>."
36792 #: ../src/guestfs.pod:1379
36794 "When the handle is created, a default error handler is installed which "
36795 "prints the error message string to C<stderr>. For small short-running "
36796 "command line programs it is sufficient to do:"
36800 #: ../src/guestfs.pod:1383
36803 " if (guestfs_launch (g) == -1)\n"
36804 " exit (EXIT_FAILURE);\n"
36809 #: ../src/guestfs.pod:1386
36811 "since the default error handler will ensure that an error message has been "
36812 "printed to C<stderr> before the program exits."
36816 #: ../src/guestfs.pod:1389
36818 "For other programs the caller will almost certainly want to install an "
36819 "alternate error handler or do error handling in-line like this:"
36823 #: ../src/guestfs.pod:1392
36826 " /* This disables the default behaviour of printing errors\n"
36828 " guestfs_set_error_handler (g, NULL, NULL);\n"
36833 #: ../src/guestfs.pod:1396
36836 " if (guestfs_launch (g) == -1) {\n"
36837 " /* Examine the error message and print it etc. */\n"
36838 " char *msg = guestfs_last_error (g);\n"
36839 " int errnum = guestfs_last_errno (g);\n"
36840 " fprintf (stderr, \"%s\", msg);\n"
36841 " if (errnum != 0)\n"
36842 " fprintf (stderr, \": %s\", strerror (errnum));\n"
36843 " fprintf (stderr, \"\\n\");\n"
36850 #: ../src/guestfs.pod:1407
36852 "Out of memory errors are handled differently. The default action is to call "
36853 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
36854 "guestfs_set_out_of_memory_handler>."
36858 #: ../src/guestfs.pod:1411
36860 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
36861 "because there is no handle if this happens there is no way to get additional "
36862 "error information. However L</guestfs_create> is supposed to be a "
36863 "lightweight operation which can only fail because of insufficient memory (it "
36864 "returns NULL in this case)."
36868 #: ../src/guestfs.pod:1417
36869 msgid "guestfs_last_error"
36873 #: ../src/guestfs.pod:1419
36876 " const char *guestfs_last_error (guestfs_h *g);\n"
36881 #: ../src/guestfs.pod:1421
36883 "This returns the last error message that happened on C<g>. If there has not "
36884 "been an error since the handle was created, then this returns C<NULL>."
36888 #: ../src/guestfs.pod:1425
36890 "The lifetime of the returned string is until the next error occurs, or L</"
36891 "guestfs_close> is called."
36895 #: ../src/guestfs.pod:1428
36896 msgid "guestfs_last_errno"
36900 #: ../src/guestfs.pod:1430
36903 " int guestfs_last_errno (guestfs_h *g);\n"
36908 #: ../src/guestfs.pod:1432
36909 msgid "This returns the last error number (errno) that happened on C<g>."
36913 #: ../src/guestfs.pod:1434
36914 msgid "If successful, an errno integer not equal to zero is returned."
36918 #: ../src/guestfs.pod:1436
36920 "If no error, this returns 0. This call can return 0 in three situations:"
36924 #: ../src/guestfs.pod:1443
36925 msgid "There has not been any error on the handle."
36929 #: ../src/guestfs.pod:1447
36931 "There has been an error but the errno was meaningless. This corresponds to "
36932 "the case where the error did not come from a failed system call, but for "
36933 "some other reason."
36937 #: ../src/guestfs.pod:1453
36939 "There was an error from a failed system call, but for some reason the errno "
36940 "was not captured and returned. This usually indicates a bug in libguestfs."
36944 #: ../src/guestfs.pod:1459
36946 "Libguestfs tries to convert the errno from inside the applicance into a "
36947 "corresponding errno for the caller (not entirely trivial: the appliance "
36948 "might be running a completely different operating system from the library "
36949 "and error numbers are not standardized across Un*xen). If this could not be "
36950 "done, then the error is translated to C<EINVAL>. In practice this should "
36951 "only happen in very rare circumstances."
36955 #: ../src/guestfs.pod:1467
36956 msgid "guestfs_set_error_handler"
36960 #: ../src/guestfs.pod:1469
36963 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
36965 " const char *msg);\n"
36966 " void guestfs_set_error_handler (guestfs_h *g,\n"
36967 " guestfs_error_handler_cb cb,\n"
36968 " void *opaque);\n"
36973 #: ../src/guestfs.pod:1476
36975 "The callback C<cb> will be called if there is an error. The parameters "
36976 "passed to the callback are an opaque data pointer and the error message "
36981 #: ../src/guestfs.pod:1480
36983 "C<errno> is not passed to the callback. To get that the callback must call "
36984 "L</guestfs_last_errno>."
36988 #: ../src/guestfs.pod:1483
36990 "Note that the message string C<msg> is freed as soon as the callback "
36991 "function returns, so if you want to stash it somewhere you must make your "
36996 #: ../src/guestfs.pod:1487
36997 msgid "The default handler prints messages on C<stderr>."
37001 #: ../src/guestfs.pod:1489
37002 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
37006 #: ../src/guestfs.pod:1491
37007 msgid "guestfs_get_error_handler"
37011 #: ../src/guestfs.pod:1493
37014 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
37015 " void **opaque_rtn);\n"
37020 #: ../src/guestfs.pod:1496
37021 msgid "Returns the current error handler callback."
37025 #: ../src/guestfs.pod:1498
37026 msgid "guestfs_set_out_of_memory_handler"
37030 #: ../src/guestfs.pod:1500
37033 " typedef void (*guestfs_abort_cb) (void);\n"
37034 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
37035 " guestfs_abort_cb);\n"
37040 #: ../src/guestfs.pod:1504
37042 "The callback C<cb> will be called if there is an out of memory situation. "
37043 "I<Note this callback must not return>."
37047 #: ../src/guestfs.pod:1507
37048 msgid "The default is to call L<abort(3)>."
37052 #: ../src/guestfs.pod:1509
37054 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
37058 #: ../src/guestfs.pod:1512
37059 msgid "guestfs_get_out_of_memory_handler"
37063 #: ../src/guestfs.pod:1514
37066 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
37071 #: ../src/guestfs.pod:1516
37072 msgid "This returns the current out of memory handler."
37076 #: ../src/guestfs.pod:1518
37081 #: ../src/guestfs.pod:1522
37086 #: ../src/guestfs.pod:1524
37091 #: ../src/guestfs.pod:1526
37092 msgid "AVAILABILITY"
37096 #: ../src/guestfs.pod:1528
37097 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
37101 #: ../src/guestfs.pod:1530
37103 "Using L</guestfs_available> you can test availability of the following "
37104 "groups of functions. This test queries the appliance to see if the "
37105 "appliance you are currently using supports the functionality."
37109 #: ../src/guestfs.pod:1535
37110 msgid "@AVAILABILITY@"
37114 #: ../src/guestfs.pod:1537
37115 msgid "GUESTFISH supported COMMAND"
37119 #: ../src/guestfs.pod:1539
37121 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
37122 "prints out the available groups and whether they are supported by this build "
37123 "of libguestfs. Note however that you have to do C<run> first."
37127 #: ../src/guestfs.pod:1544
37128 msgid "SINGLE CALLS AT COMPILE TIME"
37132 #: ../src/guestfs.pod:1546
37134 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
37135 "function, such as:"
37139 #: ../src/guestfs.pod:1549
37142 " #define LIBGUESTFS_HAVE_DD 1\n"
37147 #: ../src/guestfs.pod:1551
37148 msgid "if L</guestfs_dd> is available."
37152 #: ../src/guestfs.pod:1553
37154 "Before version 1.5.8, if you needed to test whether a single libguestfs "
37155 "function is available at compile time, we recommended using build tools such "
37156 "as autoconf or cmake. For example in autotools you could use:"
37160 #: ../src/guestfs.pod:1558
37163 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
37164 " AC_CHECK_FUNCS([guestfs_dd])\n"
37169 #: ../src/guestfs.pod:1561
37171 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
37176 #: ../src/guestfs.pod:1564
37177 msgid "SINGLE CALLS AT RUN TIME"
37181 #: ../src/guestfs.pod:1566
37183 "Testing at compile time doesn't guarantee that a function really exists in "
37184 "the library. The reason is that you might be dynamically linked against a "
37185 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
37186 "This situation unfortunately results in a segmentation fault, which is a "
37187 "shortcoming of the C dynamic linking system itself."
37191 #: ../src/guestfs.pod:1573
37193 "You can use L<dlopen(3)> to test if a function is available at run time, as "
37194 "in this example program (note that you still need the compile time check as "
37199 #: ../src/guestfs.pod:1577
37202 " #include <stdio.h>\n"
37203 " #include <stdlib.h>\n"
37204 " #include <unistd.h>\n"
37205 " #include <dlfcn.h>\n"
37206 " #include <guestfs.h>\n"
37211 #: ../src/guestfs.pod:1583
37216 " #ifdef LIBGUESTFS_HAVE_DD\n"
37218 " int has_function;\n"
37223 #: ../src/guestfs.pod:1589
37226 " /* Test if the function guestfs_dd is really available. */\n"
37227 " dl = dlopen (NULL, RTLD_LAZY);\n"
37229 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
37230 " exit (EXIT_FAILURE);\n"
37232 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
37238 #: ../src/guestfs.pod:1598
37241 " if (!has_function)\n"
37242 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
37244 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
37245 " /* Now it's safe to call\n"
37246 " guestfs_dd (g, \"foo\", \"bar\");\n"
37250 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37257 #: ../src/guestfs.pod:1611
37259 "You may think the above is an awful lot of hassle, and it is. There are "
37260 "other ways outside of the C linking system to ensure that this kind of "
37261 "incompatibility never arises, such as using package versioning:"
37265 #: ../src/guestfs.pod:1616
37268 " Requires: libguestfs >= 1.0.80\n"
37273 #: ../src/guestfs.pod:1618
37274 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37278 #: ../src/guestfs.pod:1620
37280 "A recent feature of the API is the introduction of calls which take optional "
37281 "arguments. In C these are declared 3 ways. The main way is as a call which "
37282 "takes variable arguments (ie. C<...>), as in this example:"
37286 #: ../src/guestfs.pod:1625
37289 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37294 #: ../src/guestfs.pod:1627
37296 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37297 "call with no optional arguments specified:"
37301 #: ../src/guestfs.pod:1630
37304 " guestfs_add_drive_opts (g, filename, -1);\n"
37309 #: ../src/guestfs.pod:1632
37310 msgid "With a single optional argument:"
37314 #: ../src/guestfs.pod:1634
37317 " guestfs_add_drive_opts (g, filename,\n"
37318 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37324 #: ../src/guestfs.pod:1638
37329 #: ../src/guestfs.pod:1640
37332 " guestfs_add_drive_opts (g, filename,\n"
37333 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37334 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37340 #: ../src/guestfs.pod:1645
37342 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37347 #: ../src/guestfs.pod:1648
37348 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37352 #: ../src/guestfs.pod:1650
37354 "The second variant has the same name with the suffix C<_va>, which works the "
37355 "same way but takes a C<va_list>. See the C manual for details. For the "
37356 "example function, this is declared:"
37360 #: ../src/guestfs.pod:1654
37363 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37364 " va_list args);\n"
37369 #: ../src/guestfs.pod:1657
37370 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37374 #: ../src/guestfs.pod:1659
37376 "The third variant is useful where you need to construct these calls. You "
37377 "pass in a structure where you fill in the optional fields. The structure "
37378 "has a bitmask as the first element which you must set to indicate which "
37379 "fields you have filled in. For our example function the structure and call "
37384 #: ../src/guestfs.pod:1665
37387 " struct guestfs_add_drive_opts_argv {\n"
37388 " uint64_t bitmask;\n"
37390 " const char *format;\n"
37393 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37394 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37399 #: ../src/guestfs.pod:1674
37400 msgid "You could call it like this:"
37404 #: ../src/guestfs.pod:1676
37407 " struct guestfs_add_drive_opts_argv optargs = {\n"
37408 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37409 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37410 " .readonly = 1,\n"
37411 " .format = \"qcow2\"\n"
37417 #: ../src/guestfs.pod:1683
37420 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37425 #: ../src/guestfs.pod:1691
37426 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37430 #: ../src/guestfs.pod:1696
37431 msgid "You do not need to fill in all fields of the structure."
37435 #: ../src/guestfs.pod:1700
37437 "There must be a one-to-one correspondence between fields of the structure "
37438 "that are filled in, and bits set in the bitmask."
37442 #: ../src/guestfs.pod:1705
37443 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37447 #: ../src/guestfs.pod:1707
37449 "In other languages, optional arguments are expressed in the way that is "
37450 "natural for that language. We refer you to the language-specific "
37451 "documentation for more details on that."
37455 #: ../src/guestfs.pod:1711
37456 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37460 #: ../src/guestfs.pod:1713
37461 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37465 #: ../src/guestfs.pod:1715
37467 "B<Note:> This section documents the generic event mechanism introduced in "
37468 "libguestfs 1.10, which you should use in new code if possible. The old "
37469 "functions C<guestfs_set_log_message_callback>, "
37470 "C<guestfs_set_subprocess_quit_callback>, "
37471 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37472 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37473 "page. Because of the ABI guarantee, the old functions continue to work."
37477 #: ../src/guestfs.pod:1724
37479 "Handles generate events when certain things happen, such as log messages "
37480 "being generated, progress messages during long-running operations, or the "
37481 "handle being closed. The API calls described below let you register a "
37482 "callback to be called when events happen. You can register multiple "
37483 "callbacks (for the same, different or overlapping sets of events), and "
37484 "individually remove callbacks. If callbacks are not removed, then they "
37485 "remain in force until the handle is closed."
37489 #: ../src/guestfs.pod:1732
37491 "In the current implementation, events are only generated synchronously: that "
37492 "means that events (and hence callbacks) can only happen while you are in the "
37493 "middle of making another libguestfs call. The callback is called in the "
37498 #: ../src/guestfs.pod:1737
37500 "Events may contain a payload, usually nothing (void), an array of 64 bit "
37501 "unsigned integers, or a message buffer. Payloads are discussed later on."
37505 #: ../src/guestfs.pod:1741
37506 msgid "CLASSES OF EVENTS"
37510 #: ../src/guestfs.pod:1745
37511 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
37515 #: ../src/guestfs.pod:1748
37517 "The callback function will be called while the handle is being closed "
37518 "(synchronously from L</guestfs_close>)."
37522 #: ../src/guestfs.pod:1751
37524 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
37525 "handles that are open when the program exits. This means that this callback "
37526 "might be called indirectly from L<exit(3)>, which can cause unexpected "
37527 "problems in higher-level languages (eg. if your HLL interpreter has already "
37528 "been cleaned up by the time this is called, and if your callback then jumps "
37529 "into some HLL function)."
37533 #: ../src/guestfs.pod:1758
37535 "If no callback is registered: the handle is closed without any callback "
37540 #: ../src/guestfs.pod:1761
37541 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
37545 #: ../src/guestfs.pod:1764
37547 "The callback function will be called when the child process quits, either "
37548 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
37549 "corresponds to a transition from any state to the CONFIG state)."
37553 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
37554 msgid "If no callback is registered: the event is ignored."
37558 #: ../src/guestfs.pod:1770
37559 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
37563 #: ../src/guestfs.pod:1773
37565 "The callback function will be called when the child process becomes ready "
37566 "first time after it has been launched. (This corresponds to a transition "
37567 "from LAUNCHING to the READY state)."
37571 #: ../src/guestfs.pod:1779
37572 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
37576 #: ../src/guestfs.pod:1782
37578 "Some long-running operations can generate progress messages. If this "
37579 "callback is registered, then it will be called each time a progress message "
37580 "is generated (usually two seconds after the operation started, and three "
37581 "times per second thereafter until it completes, although the frequency may "
37582 "change in future versions)."
37586 #: ../src/guestfs.pod:1788
37588 "The callback receives in the payload four unsigned 64 bit numbers which are "
37589 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
37593 #: ../src/guestfs.pod:1791
37595 "The units of C<total> are not defined, although for some operations C<total> "
37596 "may relate in some way to the amount of data to be transferred (eg. in bytes "
37597 "or megabytes), and C<position> may be the portion which has been transferred."
37601 #: ../src/guestfs.pod:1796
37602 msgid "The only defined and stable parts of the API are:"
37606 #: ../src/guestfs.pod:1802
37608 "The callback can display to the user some type of progress bar or indicator "
37609 "which shows the ratio of C<position>:C<total>."
37613 #: ../src/guestfs.pod:1807
37614 msgid "0 E<lt>= C<position> E<lt>= C<total>"
37618 #: ../src/guestfs.pod:1811
37620 "If any progress notification is sent during a call, then a final progress "
37621 "notification is always sent when C<position> = C<total> (I<unless> the call "
37622 "fails with an error)."
37626 #: ../src/guestfs.pod:1815
37628 "This is to simplify caller code, so callers can easily set the progress "
37629 "indicator to \"100%\" at the end of the operation, without requiring special "
37630 "code to detect this case."
37634 #: ../src/guestfs.pod:1821
37636 "For some calls we are unable to estimate the progress of the call, but we "
37637 "can still generate progress messages to indicate activity. This is known as "
37638 "\"pulse mode\", and is directly supported by certain progress bar "
37639 "implementations (eg. GtkProgressBar)."
37643 #: ../src/guestfs.pod:1826
37645 "For these calls, zero or more progress messages are generated with "
37646 "C<position = 0> and C<total = 1>, followed by a final message with "
37647 "C<position = total = 1>."
37651 #: ../src/guestfs.pod:1830
37653 "As noted above, if the call fails with an error then the final message may "
37654 "not be generated."
37658 #: ../src/guestfs.pod:1835
37660 "The callback also receives the procedure number (C<proc_nr>) and serial "
37661 "number (C<serial>) of the call. These are only useful for debugging "
37662 "protocol issues, and the callback can normally ignore them. The callback "
37663 "may want to print these numbers in error messages or debugging messages."
37667 #: ../src/guestfs.pod:1841
37668 msgid "If no callback is registered: progress messages are discarded."
37672 #: ../src/guestfs.pod:1843
37673 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
37677 #: ../src/guestfs.pod:1846
37679 "The callback function is called whenever a log message is generated by qemu, "
37680 "the appliance kernel, guestfsd (daemon), or utility programs."
37684 #: ../src/guestfs.pod:1849
37686 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
37687 "guestfs_launch>) then additional debug messages are generated."
37691 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
37693 "If no callback is registered: the messages are discarded unless the verbose "
37694 "flag is set in which case they are sent to stderr. You can override the "
37695 "printing of verbose messages to stderr by setting up a callback."
37699 #: ../src/guestfs.pod:1857
37700 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
37704 #: ../src/guestfs.pod:1860
37706 "The callback function is called whenever a log message is generated by the "
37707 "library part of libguestfs."
37711 #: ../src/guestfs.pod:1863
37713 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
37714 "messages are generated."
37718 #: ../src/guestfs.pod:1871
37719 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
37723 #: ../src/guestfs.pod:1874
37725 "The callback function is called whenever a trace message is generated. This "
37726 "only applies if the trace flag (L</guestfs_set_trace>) is set."
37730 #: ../src/guestfs.pod:1877
37732 "If no callback is registered: the messages are sent to stderr. You can "
37733 "override the printing of trace messages to stderr by setting up a callback."
37737 #: ../src/guestfs.pod:1881
37738 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
37742 #: ../src/guestfs.pod:1884
37744 "The callback function is called whenever a libguestfs function is entered."
37748 #: ../src/guestfs.pod:1887
37750 "The payload is a string which contains the name of the function that we are "
37751 "entering (not including C<guestfs_> prefix)."
37755 #: ../src/guestfs.pod:1890
37757 "Note that libguestfs functions can call themselves, so you may see many "
37758 "events from a single call. A few libguestfs functions do not generate this "
37763 #: ../src/guestfs.pod:1898
37764 msgid "guestfs_set_event_callback"
37768 #: ../src/guestfs.pod:1900
37771 " int guestfs_set_event_callback (guestfs_h *g,\n"
37772 " guestfs_event_callback cb,\n"
37773 " uint64_t event_bitmask,\n"
37775 " void *opaque);\n"
37780 #: ../src/guestfs.pod:1906
37782 "This function registers a callback (C<cb>) for all event classes in the "
37783 "C<event_bitmask>."
37787 #: ../src/guestfs.pod:1909
37789 "For example, to register for all log message events, you could call this "
37790 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
37791 "To register a single callback for all possible classes of events, use "
37792 "C<GUESTFS_EVENT_ALL>."
37796 #: ../src/guestfs.pod:1915
37797 msgid "C<flags> should always be passed as 0."
37801 #: ../src/guestfs.pod:1917
37803 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
37804 "it for any purpose."
37808 #: ../src/guestfs.pod:1920
37810 "The return value is the event handle (an integer) which you can use to "
37811 "delete the callback (see below)."
37815 #: ../src/guestfs.pod:1923
37817 "If there is an error, this function returns C<-1>, and sets the error in the "
37818 "handle in the usual way (see L</guestfs_last_error> etc.)"
37822 #: ../src/guestfs.pod:1926
37824 "Callbacks remain in effect until they are deleted, or until the handle is "
37829 #: ../src/guestfs.pod:1929
37831 "In the case where multiple callbacks are registered for a particular event "
37832 "class, all of the callbacks are called. The order in which multiple "
37833 "callbacks are called is not defined."
37837 #: ../src/guestfs.pod:1933
37838 msgid "guestfs_delete_event_callback"
37842 #: ../src/guestfs.pod:1935
37845 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
37850 #: ../src/guestfs.pod:1937
37852 "Delete a callback that was previously registered. C<event_handle> should be "
37853 "the integer that was returned by a previous call to "
37854 "C<guestfs_set_event_callback> on the same handle."
37858 #: ../src/guestfs.pod:1941
37859 msgid "guestfs_event_callback"
37863 #: ../src/guestfs.pod:1943
37866 " typedef void (*guestfs_event_callback) (\n"
37869 " uint64_t event,\n"
37870 " int event_handle,\n"
37872 " const char *buf, size_t buf_len,\n"
37873 " const uint64_t *array, size_t array_len);\n"
37878 #: ../src/guestfs.pod:1952
37880 "This is the type of the event callback function that you have to provide."
37884 #: ../src/guestfs.pod:1955
37886 "The basic parameters are: the handle (C<g>), the opaque user pointer "
37887 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
37888 "handle, and C<flags> which in the current API you should ignore."
37892 #: ../src/guestfs.pod:1959
37894 "The remaining parameters contain the event payload (if any). Each event may "
37895 "contain a payload, which usually relates to the event class, but for future "
37896 "proofing your code should be written to handle any payload for any event "
37901 #: ../src/guestfs.pod:1964
37903 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
37904 "there is no message buffer). Note that this message buffer can contain "
37905 "arbitrary 8 bit data, including NUL bytes."
37909 #: ../src/guestfs.pod:1968
37911 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
37912 "moment this is only used for progress messages."
37916 #: ../src/guestfs.pod:1971
37917 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
37921 #: ../src/guestfs.pod:1973
37923 "One motivation for the generic event API was to allow GUI programs to "
37924 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
37925 "unconditionally to C<stderr>."
37929 #: ../src/guestfs.pod:1977
37931 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
37932 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
37933 "messages are not events; you must capture error messages separately)."
37937 #: ../src/guestfs.pod:1982
37939 "Programs have to set up a callback to capture the classes of events of "
37944 #: ../src/guestfs.pod:1985
37948 " guestfs_set_event_callback\n"
37949 " (g, message_callback,\n"
37950 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
37951 " GUESTFS_EVENT_TRACE,\n"
37952 " 0, NULL) == -1)\n"
37953 " if (eh == -1) {\n"
37954 " // handle error in the usual way\n"
37960 #: ../src/guestfs.pod:1995
37962 "The callback can then direct messages to the appropriate place. In this "
37963 "example, messages are directed to syslog:"
37967 #: ../src/guestfs.pod:1998
37971 " message_callback (\n"
37974 " uint64_t event,\n"
37975 " int event_handle,\n"
37977 " const char *buf, size_t buf_len,\n"
37978 " const uint64_t *array, size_t array_len)\n"
37980 " const int priority = LOG_USER|LOG_INFO;\n"
37981 " if (buf_len > 0)\n"
37982 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
37988 #: ../src/guestfs.pod:2013
37989 msgid "CANCELLING LONG TRANSFERS"
37993 #: ../src/guestfs.pod:2015
37995 "Some operations can be cancelled by the caller while they are in progress. "
37996 "Currently only operations that involve uploading or downloading data can be "
37997 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
37998 "parameters in the generator)."
38002 #: ../src/guestfs.pod:2020
38003 msgid "guestfs_user_cancel"
38007 #: ../src/guestfs.pod:2022
38010 " void guestfs_user_cancel (guestfs_h *g);\n"
38015 #: ../src/guestfs.pod:2024
38017 "C<guestfs_user_cancel> cancels the current upload or download operation."
38021 #: ../src/guestfs.pod:2027
38023 "Unlike most other libguestfs calls, this function is signal safe and thread "
38024 "safe. You can call it from a signal handler or from another thread, without "
38025 "needing to do any locking."
38029 #: ../src/guestfs.pod:2031
38031 "The transfer that was in progress (if there is one) will stop shortly "
38032 "afterwards, and will return an error. The errno (see L</"
38033 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
38034 "out if the operation was cancelled or failed because of another error."
38038 #: ../src/guestfs.pod:2037
38040 "No cleanup is performed: for example, if a file was being uploaded then "
38041 "after cancellation there may be a partially uploaded file. It is the "
38042 "caller's responsibility to clean up if necessary."
38046 #: ../src/guestfs.pod:2041
38047 msgid "There are two common places that you might call C<guestfs_user_cancel>."
38051 #: ../src/guestfs.pod:2043
38053 "In an interactive text-based program, you might call it from a C<SIGINT> "
38054 "signal handler so that pressing C<^C> cancels the current operation. (You "
38055 "also need to call L</guestfs_set_pgroup> so that child processes don't "
38056 "receive the C<^C> signal)."
38060 #: ../src/guestfs.pod:2048
38062 "In a graphical program, when the main thread is displaying a progress bar "
38063 "with a cancel button, wire up the cancel button to call this function."
38067 #: ../src/guestfs.pod:2052
38068 msgid "PRIVATE DATA AREA"
38072 #: ../src/guestfs.pod:2054
38074 "You can attach named pieces of private data to the libguestfs handle, fetch "
38075 "them by name, and walk over them, for the lifetime of the handle. This is "
38076 "called the private data area and is only available from the C API."
38080 #: ../src/guestfs.pod:2059
38081 msgid "To attach a named piece of data, use the following call:"
38085 #: ../src/guestfs.pod:2061
38088 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
38093 #: ../src/guestfs.pod:2063
38095 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
38096 "pointer (which can be C<NULL>). Any previous item with the same key is "
38101 #: ../src/guestfs.pod:2067
38103 "You can use any C<key> you want, but your key should I<not> start with an "
38104 "underscore character. Keys beginning with an underscore character are "
38105 "reserved for internal libguestfs purposes (eg. for implementing language "
38106 "bindings). It is recommended that you prefix the key with some unique "
38107 "string to avoid collisions with other users."
38111 #: ../src/guestfs.pod:2073
38112 msgid "To retrieve the pointer, use:"
38116 #: ../src/guestfs.pod:2075
38119 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
38124 #: ../src/guestfs.pod:2077
38126 "This function returns C<NULL> if either no data is found associated with "
38127 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
38132 #: ../src/guestfs.pod:2081
38134 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
38135 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
38136 "all. In particular, libguestfs does I<not> try to free the data when the "
38137 "handle is closed. If the data must be freed, then the caller must either "
38138 "free it before calling L</guestfs_close> or must set up a close callback to "
38139 "do it (see L</GUESTFS_EVENT_CLOSE>)."
38143 #: ../src/guestfs.pod:2088
38144 msgid "To walk over all entries, use these two functions:"
38148 #: ../src/guestfs.pod:2090
38151 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
38156 #: ../src/guestfs.pod:2092
38159 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
38164 #: ../src/guestfs.pod:2094
38166 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
38167 "not have any particular meaning -- keys are not returned in any defined "
38168 "order). A pointer to the key is returned in C<*key_rtn> and the "
38169 "corresponding data pointer is returned from the function. C<NULL> is "
38170 "returned if there are no keys stored in the handle."
38174 #: ../src/guestfs.pod:2100
38176 "C<guestfs_next_private> returns the next key, pointer pair. The return "
38177 "value of this function is also C<NULL> is there are no further entries to "
38182 #: ../src/guestfs.pod:2104
38183 msgid "Notes about walking over entries:"
38187 #: ../src/guestfs.pod:2110
38189 "You must not call C<guestfs_set_private> while walking over the entries."
38193 #: ../src/guestfs.pod:2115
38195 "The handle maintains an internal iterator which is reset when you call "
38196 "C<guestfs_first_private>. This internal iterator is invalidated when you "
38197 "call C<guestfs_set_private>."
38201 #: ../src/guestfs.pod:2121
38202 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
38206 #: ../src/guestfs.pod:2123
38209 " guestfs_set_private (g, key, NULL);\n"
38214 #: ../src/guestfs.pod:2125
38215 msgid "then that C<key> is not returned when walking."
38219 #: ../src/guestfs.pod:2129
38221 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
38222 "C<guestfs_next_private> or C<guestfs_set_private>."
38226 #: ../src/guestfs.pod:2135
38228 "The following example code shows how to print all keys and data pointers "
38229 "that are associated with the handle C<g>:"
38233 #: ../src/guestfs.pod:2138
38236 " const char *key;\n"
38237 " void *data = guestfs_first_private (g, &key);\n"
38238 " while (data != NULL)\n"
38240 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38241 " data = guestfs_next_private (g, &key);\n"
38247 #: ../src/guestfs.pod:2146
38249 "More commonly you are only interested in keys that begin with an application-"
38250 "specific prefix C<foo_>. Modify the loop like so:"
38254 #: ../src/guestfs.pod:2149
38257 " const char *key;\n"
38258 " void *data = guestfs_first_private (g, &key);\n"
38259 " while (data != NULL)\n"
38261 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38262 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38263 " data = guestfs_next_private (g, &key);\n"
38269 #: ../src/guestfs.pod:2158
38271 "If you need to modify keys while walking, then you have to jump back to the "
38272 "beginning of the loop. For example, to delete all keys prefixed with "
38277 #: ../src/guestfs.pod:2162
38280 " const char *key;\n"
38283 " data = guestfs_first_private (g, &key);\n"
38284 " while (data != NULL)\n"
38286 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38288 " guestfs_set_private (g, key, NULL);\n"
38289 " /* note that 'key' pointer is now invalid, and so is\n"
38290 " the internal iterator */\n"
38293 " data = guestfs_next_private (g, &key);\n"
38299 #: ../src/guestfs.pod:2178
38301 "Note that the above loop is guaranteed to terminate because the keys are "
38302 "being deleted, but other manipulations of keys within the loop might not "
38303 "terminate unless you also maintain an indication of which keys have been "
38308 #: ../src/guestfs.pod:2183
38313 #: ../src/guestfs.pod:2185
38315 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38316 "true of any library, not just libguestfs. However libguestfs also contains "
38317 "static markers to help in probing internal operations."
38321 #: ../src/guestfs.pod:2189
38322 msgid "You can list all the static markers by doing:"
38326 #: ../src/guestfs.pod:2191
38329 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38330 " .provider(\"guestfs\").mark(\"*\")'\n"
38335 #: ../src/guestfs.pod:2194
38337 "B<Note:> These static markers are I<not> part of the stable API and may "
38338 "change in future versions."
38342 #: ../src/guestfs.pod:2197
38343 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38347 #: ../src/guestfs.pod:2199
38349 "This script contains examples of displaying both the static markers and some "
38350 "ordinary C entry points:"
38354 #: ../src/guestfs.pod:2202
38362 #: ../src/guestfs.pod:2204
38365 " function display_time () {\n"
38366 " now = gettimeofday_us ();\n"
38369 " delta = now - last;\n"
38375 #: ../src/guestfs.pod:2211
38378 " printf (\"%d (+%d):\", now, delta);\n"
38384 #: ../src/guestfs.pod:2214
38389 " printf (\"ready\\n\");\n"
38395 #: ../src/guestfs.pod:2219
38398 " /* Display all calls to static markers. */\n"
38399 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38400 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38401 " display_time();\n"
38402 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38408 #: ../src/guestfs.pod:2226
38411 " /* Display all calls to guestfs_mkfs* functions. */\n"
38412 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38413 " .function(\"guestfs_mkfs*\") ? {\n"
38414 " display_time();\n"
38415 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38421 #: ../src/guestfs.pod:2233
38423 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38424 "program. Note that you either have to be root, or you have to add yourself "
38425 "to several special stap groups. Consult the systemtap documentation for "
38426 "more information."
38430 #: ../src/guestfs.pod:2238
38433 " # stap /tmp/test.stap\n"
38439 #: ../src/guestfs.pod:2241
38440 msgid "In another terminal, run a guestfish command such as this:"
38444 #: ../src/guestfs.pod:2245
38445 msgid "In the first terminal, stap trace output similar to this is shown:"
38449 #: ../src/guestfs.pod:2247
38452 " 1318248056692655 (+0):\tlaunch_start\n"
38453 " 1318248056692850 (+195): launch_build_appliance_start\n"
38454 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38455 " 1318248056838059 (+19774): launch_run_qemu\n"
38456 " 1318248061071167 (+4233108): launch_end\n"
38457 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f device=0x1024e60\n"
38462 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38467 #: ../src/guestfs.pod:2256
38469 "<!-- old anchor for the next section --> <a name="
38470 "\"state_machine_and_low_level_event_api\"/>"
38474 #: ../src/guestfs.pod:2261
38475 msgid "ARCHITECTURE"
38479 #: ../src/guestfs.pod:2263
38481 "Internally, libguestfs is implemented by running an appliance (a special "
38482 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38483 "process of the main program."
38487 #: ../src/guestfs.pod:2267
38490 " ___________________\n"
38492 " | main program |\n"
38494 " | | child process / appliance\n"
38495 " | | __________________________\n"
38497 " +-------------------+ RPC | +-----------------+ |\n"
38498 " | libguestfs <--------------------> guestfsd | |\n"
38499 " | | | +-----------------+ |\n"
38500 " \\___________________/ | | Linux kernel | |\n"
38501 " | +--^--------------+ |\n"
38502 " \\_________|________________/\n"
38504 " _______v______\n"
38507 " | disk image |\n"
38508 " \\______________/\n"
38513 #: ../src/guestfs.pod:2287
38515 "The library, linked to the main program, creates the child process and hence "
38516 "the appliance in the L</guestfs_launch> function."
38520 #: ../src/guestfs.pod:2290
38522 "Inside the appliance is a Linux kernel and a complete stack of userspace "
38523 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
38524 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
38525 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
38526 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
38527 "attached to the qemu process which translates device access by the "
38528 "appliance's Linux kernel into accesses to the image."
38532 #: ../src/guestfs.pod:2299
38534 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
38535 "Although the disk image you are attached to might also be used by some "
38536 "virtual machine, libguestfs doesn't know or care about this. (But you will "
38537 "care if both libguestfs's qemu process and your virtual machine are trying "
38538 "to update the disk image at the same time, since these usually results in "
38539 "massive disk corruption)."
38543 #: ../src/guestfs.pod:2306
38544 msgid "STATE MACHINE"
38548 #: ../src/guestfs.pod:2308
38549 msgid "libguestfs uses a state machine to model the child process:"
38553 #: ../src/guestfs.pod:2310
38557 " guestfs_create\n"
38565 " / | \\ \\ guestfs_launch\n"
38566 " / | _\\__V______\n"
38568 " / | | LAUNCHING |\n"
38569 " / | \\___________/\n"
38571 " / | guestfs_launch\n"
38573 " ______ / __|____V\n"
38574 " / \\ ------> / \\\n"
38575 " | BUSY | | READY |\n"
38576 " \\______/ <------ \\________/\n"
38581 #: ../src/guestfs.pod:2332
38583 "The normal transitions are (1) CONFIG (when the handle is created, but there "
38584 "is no child process), (2) LAUNCHING (when the child process is booting up), "
38585 "(3) alternating between READY and BUSY as commands are issued to, and "
38586 "carried out by, the child process."
38590 #: ../src/guestfs.pod:2337
38592 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
38593 "asynchronously at any time (eg. due to some internal error), and that causes "
38594 "the state to transition back to CONFIG."
38598 #: ../src/guestfs.pod:2341
38600 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
38601 "issued when in the CONFIG state."
38605 #: ../src/guestfs.pod:2344
38607 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
38608 "L</guestfs_launch> blocks until the child process is READY to accept "
38609 "commands (or until some failure or timeout). L</guestfs_launch> internally "
38610 "moves the state from CONFIG to LAUNCHING while it is running."
38614 #: ../src/guestfs.pod:2350
38616 "API actions such as L</guestfs_mount> can only be issued when in the READY "
38617 "state. These API calls block waiting for the command to be carried out (ie. "
38618 "the state to transition to BUSY and then back to READY). There are no non-"
38619 "blocking versions, and no way to issue more than one command per handle at "
38624 #: ../src/guestfs.pod:2356
38626 "Finally, the child process sends asynchronous messages back to the main "
38627 "program, such as kernel log messages. You can register a callback to "
38628 "receive these messages."
38632 #: ../src/guestfs.pod:2360
38637 #: ../src/guestfs.pod:2362
38638 msgid "APPLIANCE BOOT PROCESS"
38642 #: ../src/guestfs.pod:2364
38644 "This process has evolved and continues to evolve. The description here "
38645 "corresponds only to the current version of libguestfs and is provided for "
38646 "information only."
38650 #: ../src/guestfs.pod:2368
38652 "In order to follow the stages involved below, enable libguestfs debugging "
38653 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
38657 #: ../src/guestfs.pod:2373
38658 msgid "Create the appliance"
38662 #: ../src/guestfs.pod:2375
38664 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
38665 "initrd and the appliance."
38669 #: ../src/guestfs.pod:2378
38671 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
38672 "directory if C<TMPDIR> is set)."
38676 #: ../src/guestfs.pod:2381
38678 "For a complete description of how the appliance is created and cached, read "
38679 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
38683 #: ../src/guestfs.pod:2385
38684 msgid "Start qemu and boot the kernel"
38688 #: ../src/guestfs.pod:2387
38689 msgid "qemu is invoked to boot the kernel."
38693 #: ../src/guestfs.pod:2389
38694 msgid "Run the initrd"
38698 #: ../src/guestfs.pod:2391
38700 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
38701 "appliance. The purpose of the initrd is to load enough kernel modules in "
38702 "order that the appliance itself can be mounted and started."
38706 #: ../src/guestfs.pod:2395
38708 "The initrd is a cpio archive called C</var/tmp/.guestfs-E<lt>UIDE<gt>/"
38713 #: ../src/guestfs.pod:2398
38715 "When the initrd has started you will see messages showing that kernel "
38716 "modules are being loaded, similar to this:"
38720 #: ../src/guestfs.pod:2401
38723 " febootstrap: ext2 mini initrd starting up\n"
38724 " febootstrap: mounting /sys\n"
38725 " febootstrap: internal insmod libcrc32c.ko\n"
38726 " febootstrap: internal insmod crc32c-intel.ko\n"
38731 #: ../src/guestfs.pod:2406
38732 msgid "Find and mount the appliance device"
38736 #: ../src/guestfs.pod:2408
38738 "The appliance is a sparse file containing an ext2 filesystem which contains "
38739 "a familiar (although reduced in size) Linux operating system. It would "
38740 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
38744 #: ../src/guestfs.pod:2412
38746 "The regular disks being inspected by libguestfs are the first devices "
38747 "exposed by qemu (eg. as C</dev/vda>)."
38751 #: ../src/guestfs.pod:2415
38753 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
38754 "there was only one regular disk)."
38758 #: ../src/guestfs.pod:2418
38760 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
38761 "and switch root into the appliance, and run C</init> from the appliance."
38765 #: ../src/guestfs.pod:2422
38766 msgid "If this works successfully you will see messages such as:"
38770 #: ../src/guestfs.pod:2424
38773 " febootstrap: picked /sys/block/vdb/dev as root device\n"
38774 " febootstrap: creating /dev/root as block special 252:16\n"
38775 " febootstrap: mounting new root on /root\n"
38776 " febootstrap: chroot\n"
38777 " Starting /init script ...\n"
38782 #: ../src/guestfs.pod:2430
38784 "Note that C<Starting /init script ...> indicates that the appliance's init "
38785 "script is now running."
38789 #: ../src/guestfs.pod:2433
38790 msgid "Initialize the appliance"
38794 #: ../src/guestfs.pod:2435
38796 "The appliance itself now initializes itself. This involves starting certain "
38797 "processes like C<udev>, possibly printing some debug information, and "
38798 "finally running the daemon (C<guestfsd>)."
38802 #: ../src/guestfs.pod:2439
38807 #: ../src/guestfs.pod:2441
38809 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
38814 #: ../src/guestfs.pod:2444
38817 " verbose daemon enabled\n"
38822 #: ../src/guestfs.pod:2446
38824 "The daemon expects to see a named virtio-serial port exposed by qemu and "
38825 "connected on the other end to the library."
38829 #: ../src/guestfs.pod:2449
38831 "The daemon connects to this port (and hence to the library) and sends a four "
38832 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
38833 "protocol (see below)."
38837 #: ../src/guestfs.pod:2455
38838 msgid "COMMUNICATION PROTOCOL"
38842 #: ../src/guestfs.pod:2457
38844 "Don't rely on using this protocol directly. This section documents how it "
38845 "currently works, but it may change at any time."
38849 #: ../src/guestfs.pod:2460
38851 "The protocol used to talk between the library and the daemon running inside "
38852 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
38853 "1014, RFC 1832, RFC 4506)."
38857 #: ../src/guestfs.pod:2464
38859 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
38860 "this file is automatically generated)."
38864 #: ../src/guestfs.pod:2467
38866 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
38867 "and C<FileOut> parameters, which are handled with very simple request/reply "
38868 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
38869 "parameters, which use the same request and reply messages, but they may also "
38870 "be followed by files sent using a chunked encoding."
38874 #: ../src/guestfs.pod:2474
38875 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
38879 #: ../src/guestfs.pod:2476
38880 msgid "For ordinary functions, the request message is:"
38884 #: ../src/guestfs.pod:2478
38887 " total length (header + arguments,\n"
38888 " but not including the length word itself)\n"
38889 " struct guestfs_message_header (encoded as XDR)\n"
38890 " struct guestfs_<foo>_args (encoded as XDR)\n"
38895 #: ../src/guestfs.pod:2483
38897 "The total length field allows the daemon to allocate a fixed size buffer "
38898 "into which it slurps the rest of the message. As a result, the total length "
38899 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
38900 "effective size of any request is limited to somewhere under this size."
38904 #: ../src/guestfs.pod:2489
38906 "Note also that many functions don't take any arguments, in which case the "
38907 "C<guestfs_I<foo>_args> is completely omitted."
38911 #: ../src/guestfs.pod:2492
38913 "The header contains the procedure number (C<guestfs_proc>) which is how the "
38914 "receiver knows what type of args structure to expect, or none at all."
38918 #: ../src/guestfs.pod:2496
38920 "For functions that take optional arguments, the optional arguments are "
38921 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
38922 "arguments. A bitmask in the header indicates which optional arguments are "
38923 "meaningful. The bitmask is also checked to see if it contains bits set "
38924 "which the daemon does not know about (eg. if more optional arguments were "
38925 "added in a later version of the library), and this causes the call to be "
38930 #: ../src/guestfs.pod:2504
38931 msgid "The reply message for ordinary functions is:"
38935 #: ../src/guestfs.pod:2506
38938 " total length (header + ret,\n"
38939 " but not including the length word itself)\n"
38940 " struct guestfs_message_header (encoded as XDR)\n"
38941 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38946 #: ../src/guestfs.pod:2511
38948 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
38949 "functions that return no formal return values."
38953 #: ../src/guestfs.pod:2514
38955 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
38959 #: ../src/guestfs.pod:2517
38961 "In the case of an error, a flag is set in the header, and the reply message "
38962 "is slightly changed:"
38966 #: ../src/guestfs.pod:2520
38969 " total length (header + error,\n"
38970 " but not including the length word itself)\n"
38971 " struct guestfs_message_header (encoded as XDR)\n"
38972 " struct guestfs_message_error (encoded as XDR)\n"
38977 #: ../src/guestfs.pod:2525
38979 "The C<guestfs_message_error> structure contains the error message as a "
38984 #: ../src/guestfs.pod:2528
38985 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
38989 #: ../src/guestfs.pod:2530
38991 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
38992 "The normal request message is sent (see above). However this is followed by "
38993 "a sequence of file chunks."
38997 #: ../src/guestfs.pod:2534
39000 " total length (header + arguments,\n"
39001 " but not including the length word itself,\n"
39002 " and not including the chunks)\n"
39003 " struct guestfs_message_header (encoded as XDR)\n"
39004 " struct guestfs_<foo>_args (encoded as XDR)\n"
39005 " sequence of chunks for FileIn param #0\n"
39006 " sequence of chunks for FileIn param #1 etc.\n"
39011 #: ../src/guestfs.pod:2542
39012 msgid "The \"sequence of chunks\" is:"
39016 #: ../src/guestfs.pod:2544
39019 " length of chunk (not including length word itself)\n"
39020 " struct guestfs_chunk (encoded as XDR)\n"
39021 " length of chunk\n"
39022 " struct guestfs_chunk (encoded as XDR)\n"
39024 " length of chunk\n"
39025 " struct guestfs_chunk (with data.data_len == 0)\n"
39030 #: ../src/guestfs.pod:2552
39032 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
39033 "is set in the final chunk to indicate either successful completion or early "
39038 #: ../src/guestfs.pod:2556
39040 "At time of writing there are no functions that have more than one FileIn "
39041 "parameter. However this is (theoretically) supported, by sending the "
39042 "sequence of chunks for each FileIn parameter one after another (from left to "
39047 #: ../src/guestfs.pod:2561
39049 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
39050 "transfer. The library does this by sending a chunk with a special flag set "
39051 "to indicate cancellation. When the daemon sees this, it cancels the whole "
39052 "RPC, does I<not> send any reply, and goes back to reading the next request."
39056 #: ../src/guestfs.pod:2567
39058 "The daemon may also cancel. It does this by writing a special word "
39059 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
39060 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
39061 "cancel chunk). The special word is chosen so that even if cancellation "
39062 "happens right at the end of the transfer (after the library has finished "
39063 "writing and has started listening for the reply), the \"spurious\" cancel "
39064 "flag will not be confused with the reply message."
39068 #: ../src/guestfs.pod:2576
39070 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
39071 "limit), and also files where the size is not known in advance (eg. from "
39072 "pipes or sockets). However the chunks are rather small "
39073 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
39074 "to keep much in memory."
39078 #: ../src/guestfs.pod:2582
39079 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
39083 #: ../src/guestfs.pod:2584
39085 "The protocol for FileOut parameters is exactly the same as for FileIn "
39086 "parameters, but with the roles of daemon and library reversed."
39090 #: ../src/guestfs.pod:2587
39093 " total length (header + ret,\n"
39094 " but not including the length word itself,\n"
39095 " and not including the chunks)\n"
39096 " struct guestfs_message_header (encoded as XDR)\n"
39097 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39098 " sequence of chunks for FileOut param #0\n"
39099 " sequence of chunks for FileOut param #1 etc.\n"
39104 #: ../src/guestfs.pod:2595
39105 msgid "INITIAL MESSAGE"
39109 #: ../src/guestfs.pod:2597
39111 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
39112 "which indicates that the guest and daemon is alive. This is what L</"
39113 "guestfs_launch> waits for."
39117 #: ../src/guestfs.pod:2601
39118 msgid "PROGRESS NOTIFICATION MESSAGES"
39122 #: ../src/guestfs.pod:2603
39124 "The daemon may send progress notification messages at any time. These are "
39125 "distinguished by the normal length word being replaced by "
39126 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
39130 #: ../src/guestfs.pod:2607
39132 "The library turns them into progress callbacks (see L</"
39133 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
39138 #: ../src/guestfs.pod:2611
39140 "The daemon self-limits the frequency of progress messages it sends (see "
39141 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
39146 #: ../src/guestfs.pod:2615
39147 msgid "LIBGUESTFS VERSION NUMBERS"
39151 #: ../src/guestfs.pod:2617
39153 "Since April 2010, libguestfs has started to make separate development and "
39154 "stable releases, along with corresponding branches in our git repository. "
39155 "These separate releases can be identified by version number:"
39159 #: ../src/guestfs.pod:2622
39162 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
39163 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
39169 " | `-------- sub-version\n"
39171 " `------ always '1' because we don't change the ABI\n"
39176 #: ../src/guestfs.pod:2633
39177 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
39181 #: ../src/guestfs.pod:2635
39183 "As time passes we cherry pick fixes from the development branch and backport "
39184 "those into the stable branch, the effect being that the stable branch should "
39185 "get more stable and less buggy over time. So the stable releases are ideal "
39186 "for people who don't need new features but would just like the software to "
39191 #: ../src/guestfs.pod:2641
39192 msgid "Our criteria for backporting changes are:"
39196 #: ../src/guestfs.pod:2647
39198 "Documentation changes which don't affect any code are backported unless the "
39199 "documentation refers to a future feature which is not in stable."
39203 #: ../src/guestfs.pod:2653
39205 "Bug fixes which are not controversial, fix obvious problems, and have been "
39206 "well tested are backported."
39210 #: ../src/guestfs.pod:2658
39212 "Simple rearrangements of code which shouldn't affect how it works get "
39213 "backported. This is so that the code in the two branches doesn't get too "
39214 "far out of step, allowing us to backport future fixes more easily."
39218 #: ../src/guestfs.pod:2664
39220 "We I<don't> backport new features, new APIs, new tools etc, except in one "
39221 "exceptional case: the new feature is required in order to implement an "
39222 "important bug fix."
39226 #: ../src/guestfs.pod:2670
39228 "A new stable branch starts when we think the new features in development are "
39229 "substantial and compelling enough over the current stable branch to warrant "
39230 "it. When that happens we create new stable and development versions 1.N.0 "
39231 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
39232 "stable at this point, but by backporting fixes from development, that branch "
39233 "will stabilize over time."
39237 #: ../src/guestfs.pod:2678
39238 msgid "EXTENDING LIBGUESTFS"
39242 #: ../src/guestfs.pod:2680
39243 msgid "ADDING A NEW API ACTION"
39247 #: ../src/guestfs.pod:2682
39249 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
39250 "documentation) are generated, and this makes it easy to extend the "
39255 #: ../src/guestfs.pod:2686
39256 msgid "To add a new API action there are two changes:"
39260 #: ../src/guestfs.pod:2692
39262 "You need to add a description of the call (name, parameters, return type, "
39263 "tests, documentation) to C<generator/generator_actions.ml>."
39267 #: ../src/guestfs.pod:2695
39269 "There are two sorts of API action, depending on whether the call goes "
39270 "through to the daemon in the appliance, or is serviced entirely by the "
39271 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
39272 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39273 "an example of the latter, since a trace flag is maintained in the handle and "
39274 "all tracing is done on the library side."
39278 #: ../src/guestfs.pod:2703
39280 "Most new actions are of the first type, and get added to the "
39281 "C<daemon_functions> list. Each function has a unique procedure number used "
39282 "in the RPC protocol which is assigned to that action when we publish "
39283 "libguestfs and cannot be reused. Take the latest procedure number and "
39288 #: ../src/guestfs.pod:2709
39290 "For library-only actions of the second type, add to the "
39291 "C<non_daemon_functions> list. Since these functions are serviced by the "
39292 "library and do not travel over the RPC mechanism to the daemon, these "
39293 "functions do not need a procedure number, and so the procedure number is set "
39298 #: ../src/guestfs.pod:2717
39299 msgid "Implement the action (in C):"
39303 #: ../src/guestfs.pod:2719
39305 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39306 "C<daemon/> directory."
39310 #: ../src/guestfs.pod:2722
39312 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39313 "(note: double underscore) in the C<src/> directory."
39317 #: ../src/guestfs.pod:2725
39318 msgid "In either case, use another function as an example of what to do."
39322 #: ../src/guestfs.pod:2729
39323 msgid "After making these changes, use C<make> to compile."
39327 #: ../src/guestfs.pod:2731
39329 "Note that you don't need to implement the RPC, language bindings, manual "
39330 "pages or anything else. It's all automatically generated from the OCaml "
39335 #: ../src/guestfs.pod:2735
39336 msgid "ADDING TESTS FOR AN API ACTION"
39340 #: ../src/guestfs.pod:2737
39342 "You can supply zero or as many tests as you want per API call. The tests "
39343 "can either be added as part of the API description (C<generator/"
39344 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
39345 "into C<regressions/>. Note that adding a script to C<regressions/> is "
39346 "slower, so if possible use the first method."
39350 #: ../src/guestfs.pod:2743
39352 "The following describes the test environment used when you add an API test "
39353 "in C<generator_actions.ml>."
39357 #: ../src/guestfs.pod:2746
39358 msgid "The test environment has 4 block devices:"
39362 #: ../src/guestfs.pod:2750
39363 msgid "C</dev/sda> 500MB"
39367 #: ../src/guestfs.pod:2752
39368 msgid "General block device for testing."
39372 #: ../src/guestfs.pod:2754
39373 msgid "C</dev/sdb> 50MB"
39377 #: ../src/guestfs.pod:2756
39379 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39384 #: ../src/guestfs.pod:2759
39385 msgid "C</dev/sdc> 10MB"
39389 #: ../src/guestfs.pod:2761
39390 msgid "Used in a few tests where two block devices are needed."
39394 #: ../src/guestfs.pod:2763
39395 msgid "C</dev/sdd>"
39399 #: ../src/guestfs.pod:2765
39400 msgid "ISO with fixed content (see C<images/test.iso>)."
39404 #: ../src/guestfs.pod:2769
39406 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39407 "appliance and block devices are reused between tests. So don't try testing "
39408 "L</guestfs_kill_subprocess> :-x"
39412 #: ../src/guestfs.pod:2773
39414 "Each test starts with an initial scenario, selected using one of the "
39415 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39416 "initialize the disks mentioned above in a particular way as documented in "
39417 "C<generator_types.ml>. You should not assume anything about the previous "
39418 "contents of other disks that are not initialized."
39422 #: ../src/guestfs.pod:2779
39424 "You can add a prerequisite clause to any individual test. This is a run-"
39425 "time check, which, if it fails, causes the test to be skipped. Useful if "
39426 "testing a command which might not work on all variations of libguestfs "
39427 "builds. A test that has prerequisite of C<Always> means to run "
39432 #: ../src/guestfs.pod:2785
39434 "In addition, packagers can skip individual tests by setting environment "
39435 "variables before running C<make check>."
39439 #: ../src/guestfs.pod:2788
39442 " SKIP_TEST_<CMD>_<NUM>=1\n"
39447 #: ../src/guestfs.pod:2790
39448 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39452 #: ../src/guestfs.pod:2792
39457 #: ../src/guestfs.pod:2794
39460 " SKIP_TEST_<CMD>=1\n"
39465 #: ../src/guestfs.pod:2796
39466 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39470 #: ../src/guestfs.pod:2798
39471 msgid "Packagers can run only certain tests by setting for example:"
39475 #: ../src/guestfs.pod:2800
39478 " TEST_ONLY=\"vfs_type zerofree\"\n"
39483 #: ../src/guestfs.pod:2802
39485 "See C<capitests/tests.c> for more details of how these environment variables "
39490 #: ../src/guestfs.pod:2805
39491 msgid "DEBUGGING NEW API ACTIONS"
39495 #: ../src/guestfs.pod:2807
39496 msgid "Test new actions work before submitting them."
39500 #: ../src/guestfs.pod:2809
39501 msgid "You can use guestfish to try out new commands."
39505 #: ../src/guestfs.pod:2811
39507 "Debugging the daemon is a problem because it runs inside a minimal "
39508 "environment. However you can fprintf messages in the daemon to stderr, and "
39509 "they will show up if you use C<guestfish -v>."
39513 #: ../src/guestfs.pod:2815
39514 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
39518 #: ../src/guestfs.pod:2817
39520 "Our C source code generally adheres to some basic code-formatting "
39521 "conventions. The existing code base is not totally consistent on this "
39522 "front, but we do prefer that contributed code be formatted similarly. In "
39523 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
39524 "indentation level, and other than that, follow the K&R style."
39528 #: ../src/guestfs.pod:2823
39530 "If you use Emacs, add the following to one of one of your start-up files (e."
39531 "g., ~/.emacs), to help ensure that you get indentation right:"
39535 #: ../src/guestfs.pod:2826
39538 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
39539 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
39540 " (add-hook 'find-file-hook\n"
39541 " '(lambda () (if (and buffer-file-name\n"
39542 " (string-match \"/libguestfs\\\\>\"\n"
39543 " (buffer-file-name))\n"
39544 " (not (string-equal mode-name \"Change Log\"))\n"
39545 " (not (string-equal mode-name \"Makefile\")))\n"
39546 " (setq indent-tabs-mode nil))))\n"
39551 #: ../src/guestfs.pod:2836
39554 " ;;; When editing C sources in libguestfs, use this style.\n"
39555 " (defun libguestfs-c-mode ()\n"
39556 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
39558 " (c-set-style \"K&R\")\n"
39559 " (setq c-indent-level 2)\n"
39560 " (setq c-basic-offset 2))\n"
39561 " (add-hook 'c-mode-hook\n"
39562 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
39563 " (buffer-file-name))\n"
39564 " (libguestfs-c-mode))))\n"
39569 #: ../src/guestfs.pod:2848
39570 msgid "Enable warnings when compiling (and fix any problems this finds):"
39574 #: ../src/guestfs.pod:2851
39577 " ./configure --enable-gcc-warnings\n"
39582 #: ../src/guestfs.pod:2853
39583 msgid "Useful targets are:"
39587 #: ../src/guestfs.pod:2855
39590 " make syntax-check # checks the syntax of the C code\n"
39591 " make check # runs the test suite\n"
39596 #: ../src/guestfs.pod:2858
39597 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
39601 #: ../src/guestfs.pod:2860
39603 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
39604 "which are used to do shell quoting."
39608 #: ../src/guestfs.pod:2865
39613 #: ../src/guestfs.pod:2867
39615 "Simple shell quoted string. Any spaces or other shell characters are "
39620 #: ../src/guestfs.pod:2870
39625 #: ../src/guestfs.pod:2872
39627 "Same as C<%Q> except the string is treated as a path which is prefixed by "
39632 #: ../src/guestfs.pod:2879
39635 " asprintf (&cmd, \"cat %R\", path);\n"
39640 #: ../src/guestfs.pod:2881
39641 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
39645 #: ../src/guestfs.pod:2883
39647 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
39648 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
39649 "they are not passed via the shell (instead, straight to exec). You probably "
39650 "want to use the C<sysroot_path()> function however."
39654 #: ../src/guestfs.pod:2889
39655 msgid "SUBMITTING YOUR NEW API ACTIONS"
39659 #: ../src/guestfs.pod:2891
39661 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
39662 "libguestfs> and CC to L<rjones@redhat.com>."
39666 #: ../src/guestfs.pod:2895
39667 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
39671 #: ../src/guestfs.pod:2897
39672 msgid "We support i18n (gettext anyhow) in the library."
39676 #: ../src/guestfs.pod:2899
39678 "However many messages come from the daemon, and we don't translate those at "
39679 "the moment. One reason is that the appliance generally has all locale files "
39680 "removed from it, because they take up a lot of space. So we'd have to readd "
39681 "some of those, as well as copying our PO files into the appliance."
39685 #: ../src/guestfs.pod:2905
39687 "Debugging messages are never translated, since they are intended for the "
39692 #: ../src/guestfs.pod:2908
39693 msgid "SOURCE CODE SUBDIRECTORIES"
39697 #: ../src/guestfs.pod:2912
39702 #: ../src/guestfs.pod:2914
39703 msgid "L<virt-alignment-scan(1)> command and documentation."
39707 #: ../src/guestfs.pod:2918
39708 msgid "The libguestfs appliance, build scripts and so on."
39712 #: ../src/guestfs.pod:2920
39713 msgid "C<capitests>"
39717 #: ../src/guestfs.pod:2922
39718 msgid "Automated tests of the C API."
39722 #: ../src/guestfs.pod:2924
39727 #: ../src/guestfs.pod:2926
39729 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
39734 #: ../src/guestfs.pod:2929
39739 #: ../src/guestfs.pod:2931
39741 "Safety and liveness tests of components that libguestfs depends upon (not of "
39742 "libguestfs itself). Mainly this is for qemu and the kernel."
39746 #: ../src/guestfs.pod:2934
39751 #: ../src/guestfs.pod:2936
39753 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
39754 "command and documentation."
39758 #: ../src/guestfs.pod:2939
39763 #: ../src/guestfs.pod:2941
39764 msgid "Outside contributions, experimental parts."
39768 #: ../src/guestfs.pod:2943
39773 #: ../src/guestfs.pod:2945
39775 "The daemon that runs inside the libguestfs appliance and carries out actions."
39779 #: ../src/guestfs.pod:2948
39784 #: ../src/guestfs.pod:2950
39785 msgid "L<virt-df(1)> command and documentation."
39789 #: ../src/guestfs.pod:2952
39794 #: ../src/guestfs.pod:2954
39795 msgid "L<virt-edit(1)> command and documentation."
39799 #: ../src/guestfs.pod:2956
39800 msgid "C<examples>"
39804 #: ../src/guestfs.pod:2958
39805 msgid "C API example code."
39809 #: ../src/guestfs.pod:2960
39814 #: ../src/guestfs.pod:2962
39816 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
39817 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
39818 "L<virt-tar-out(1)>."
39822 #: ../src/guestfs.pod:2966
39827 #: ../src/guestfs.pod:2968
39829 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
39833 #: ../src/guestfs.pod:2970
39834 msgid "C<generator>"
39838 #: ../src/guestfs.pod:2972
39840 "The crucially important generator, used to automatically generate large "
39841 "amounts of boilerplate C code for things like RPC and bindings."
39845 #: ../src/guestfs.pod:2975
39850 #: ../src/guestfs.pod:2977
39851 msgid "Files used by the test suite."
39855 #: ../src/guestfs.pod:2979
39856 msgid "Some \"phony\" guest images which we test against."
39860 #: ../src/guestfs.pod:2981
39861 msgid "C<inspector>"
39865 #: ../src/guestfs.pod:2983
39866 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
39870 #: ../src/guestfs.pod:2985
39875 #: ../src/guestfs.pod:2987
39876 msgid "Logo used on the website. The fish is called Arthur by the way."
39880 #: ../src/guestfs.pod:2989
39885 #: ../src/guestfs.pod:2991
39886 msgid "M4 macros used by autoconf."
39890 #: ../src/guestfs.pod:2993
39895 #: ../src/guestfs.pod:2995
39896 msgid "Translations of simple gettext strings."
39900 #: ../src/guestfs.pod:2997
39905 #: ../src/guestfs.pod:2999
39907 "The build infrastructure and PO files for translations of manpages and POD "
39908 "files. Eventually this will be combined with the C<po> directory, but that "
39909 "is rather complicated."
39913 #: ../src/guestfs.pod:3003
39914 msgid "C<regressions>"
39918 #: ../src/guestfs.pod:3005
39919 msgid "Regression tests."
39923 #: ../src/guestfs.pod:3007
39928 #: ../src/guestfs.pod:3009
39929 msgid "L<virt-rescue(1)> command and documentation."
39933 #: ../src/guestfs.pod:3011
39938 #: ../src/guestfs.pod:3013
39939 msgid "L<virt-resize(1)> command and documentation."
39943 #: ../src/guestfs.pod:3015
39944 msgid "C<sparsify>"
39948 #: ../src/guestfs.pod:3017
39949 msgid "L<virt-sparsify(1)> command and documentation."
39953 #: ../src/guestfs.pod:3019
39958 #: ../src/guestfs.pod:3021
39959 msgid "Source code to the C library."
39963 #: ../src/guestfs.pod:3023
39968 #: ../src/guestfs.pod:3025
39970 "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
39974 #: ../src/guestfs.pod:3027
39975 msgid "C<test-tool>"
39979 #: ../src/guestfs.pod:3029
39981 "Test tool for end users to test if their qemu/kernel combination will work "
39986 #: ../src/guestfs.pod:3032
39991 #: ../src/guestfs.pod:3034
39996 #: ../src/guestfs.pod:3036
40001 #: ../src/guestfs.pod:3038
40006 #: ../src/guestfs.pod:3040
40011 #: ../src/guestfs.pod:3042
40016 #: ../src/guestfs.pod:3044
40021 #: ../src/guestfs.pod:3046
40026 #: ../src/guestfs.pod:3048
40031 #: ../src/guestfs.pod:3050
40032 msgid "Language bindings."
40036 #: ../src/guestfs.pod:3054
40037 msgid "MAKING A STABLE RELEASE"
40041 #: ../src/guestfs.pod:3056
40043 "When we make a stable release, there are several steps documented here. See "
40044 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
40049 #: ../src/guestfs.pod:3064
40051 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
40055 #: ../src/guestfs.pod:3069
40056 msgid "Finalize RELEASE-NOTES."
40060 #: ../src/guestfs.pod:3073
40061 msgid "Update ROADMAP."
40065 #: ../src/guestfs.pod:3077
40066 msgid "Run C<src/api-support/update-from-tarballs.sh>."
40070 #: ../src/guestfs.pod:3081
40071 msgid "Push and pull from Transifex."
40075 #: ../src/guestfs.pod:3083
40080 #: ../src/guestfs.pod:3085
40088 #: ../src/guestfs.pod:3087
40089 msgid "to push the latest POT files to Transifex. Then run:"
40093 #: ../src/guestfs.pod:3089
40101 #: ../src/guestfs.pod:3091
40102 msgid "which is a wrapper to pull the latest translated C<*.po> files."
40106 #: ../src/guestfs.pod:3095
40108 "Create new stable and development directories under L<http://libguestfs.org/"
40113 #: ../src/guestfs.pod:3100
40114 msgid "Create the branch in git:"
40118 #: ../src/guestfs.pod:3102
40121 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
40122 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
40123 " git branch stable-1.XX\n"
40124 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
40129 #: ../src/guestfs.pod:3109
40134 #: ../src/guestfs.pod:3111
40135 msgid "PROTOCOL LIMITS"
40139 #: ../src/guestfs.pod:3113
40141 "Internally libguestfs uses a message-based protocol to pass API calls and "
40142 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
40143 "plenty more detail about this). The maximum message size used by the "
40144 "protocol is slightly less than 4 MB. For some API calls you may need to be "
40145 "aware of this limit. The API calls which may be affected are individually "
40146 "documented, with a link back to this section of the documentation."
40150 #: ../src/guestfs.pod:3121
40152 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
40153 "a simple string. Because this string is at some point internally encoded as "
40154 "a message, the maximum size that it can return is slightly under 4 MB. If "
40155 "the requested file is larger than this then you will get an error."
40159 #: ../src/guestfs.pod:3127
40161 "In order to transfer large files into and out of the guest filesystem, you "
40162 "need to use particular calls that support this. The sections L</UPLOADING> "
40163 "and L</DOWNLOADING> document how to do this."
40167 #: ../src/guestfs.pod:3131
40169 "You might also consider mounting the disk image using our FUSE filesystem "
40170 "support (L<guestmount(1)>)."
40174 #: ../src/guestfs.pod:3134
40175 msgid "MAXIMUM NUMBER OF DISKS"
40179 #: ../src/guestfs.pod:3136
40180 msgid "When using virtio disks (the default) the current limit is B<25> disks."
40184 #: ../src/guestfs.pod:3139
40186 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
40187 "slots. However febootstrap only understands disks with names C</dev/vda> "
40188 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
40193 #: ../src/guestfs.pod:3144
40195 "We are working to substantially raise this limit in future versions but it "
40196 "requires complex changes to qemu."
40200 #: ../src/guestfs.pod:3147
40202 "In future versions of libguestfs it should also be possible to \"hot plug\" "
40203 "disks (add and remove disks after calling L</guestfs_launch>). This also "
40204 "requires changes to qemu."
40208 #: ../src/guestfs.pod:3151
40209 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
40213 #: ../src/guestfs.pod:3153
40214 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
40218 #: ../src/guestfs.pod:3155
40220 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
40221 "vda>, and C</dev/vda1> through C</dev/vda15>)."
40225 #: ../src/guestfs.pod:3158
40227 "If you attach a disk with more than 15 partitions, the extra partitions are "
40228 "ignored by libguestfs."
40232 #: ../src/guestfs.pod:3161
40233 msgid "MAXIMUM SIZE OF A DISK"
40237 #: ../src/guestfs.pod:3163
40238 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
40242 #: ../src/guestfs.pod:3165
40244 "We have tested block devices up to 1 exabyte (2**60 or "
40245 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
40250 #: ../src/guestfs.pod:3169
40252 "Although libguestfs probably does not impose any limit, the underlying host "
40253 "storage will. If you store disk images on a host ext4 filesystem, then the "
40254 "maximum size will be limited by the maximum ext4 file size (currently 16 "
40255 "TB). If you store disk images as host logical volumes then you are limited "
40256 "by the maximum size of an LV."
40260 #: ../src/guestfs.pod:3175
40262 "For the hugest disk image files, we recommend using XFS on the host for "
40267 #: ../src/guestfs.pod:3178
40268 msgid "MAXIMUM SIZE OF A PARTITION"
40272 #: ../src/guestfs.pod:3180
40274 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
40275 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
40276 "address a partition located beyond 2 TB on the disk."
40280 #: ../src/guestfs.pod:3184
40282 "It is recommended that you use GPT partitions on disks which are larger than "
40283 "this size. GPT uses 64 bit sector numbers and so can address partitions "
40284 "which are theoretically larger than the largest disk we could support."
40288 #: ../src/guestfs.pod:3189
40289 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40293 #: ../src/guestfs.pod:3191
40295 "This depends on the filesystem type. libguestfs itself does not impose any "
40296 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40297 "what these limits are."
40301 #: ../src/guestfs.pod:3195
40302 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40306 #: ../src/guestfs.pod:3197
40308 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
40309 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40310 "uploads and downloads."
40314 #: ../src/guestfs.pod:3201
40315 msgid "INSPECTION LIMITS"
40319 #: ../src/guestfs.pod:3203
40321 "The inspection code has several arbitrary limits on things like the size of "
40322 "Windows Registry hive it will read, and the length of product name. These "
40323 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40324 "memory and disk space on the host, and should not be reached in practice. "
40325 "See the source code for more information."
40329 #: ../src/guestfs.pod:3229
40331 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40332 "effect as calling C<guestfs_set_verbose (g, 1)>."
40336 #: ../src/guestfs.pod:3241
40338 "Set the path that libguestfs uses to search for a supermin appliance. See "
40339 "the discussion of paths in section L</PATH> above."
40343 #: ../src/guestfs.pod:3250
40344 msgid "See also L</QEMU WRAPPERS> above."
40348 #: ../src/guestfs.pod:3254
40350 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40351 "effect as calling C<guestfs_set_trace (g, 1)>."
40355 #: ../src/guestfs.pod:3272
40357 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
40358 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
40359 "L<guestfish(1)>, L<guestmount(1)>, L<virt-alignment-scan(1)>, L<virt-cat(1)"
40360 ">, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, "
40361 "L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40362 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue"
40363 "(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar"
40364 "(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
40365 "L<febootstrap(1)>, L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)"
40366 ">, L<http://libguestfs.org/>."
40370 #: ../src/guestfs.pod:3308
40372 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
40373 "(8)>, L<disktype(1)>."
40377 #: ../src/guestfs.pod:3315 ../tools/virt-make-fs.pl:571
40378 #: ../tools/virt-win-reg.pl:772
40383 #: ../src/guestfs.pod:3317
40384 msgid "To get a list of bugs against libguestfs use this link:"
40388 #: ../src/guestfs.pod:3319
40390 "L<https://bugzilla.redhat.com/buglist.cgi?"
40391 "component=libguestfs&product=Virtualization+Tools>"
40395 #: ../src/guestfs.pod:3321
40396 msgid "To report a new bug against libguestfs use this link:"
40400 #: ../src/guestfs.pod:3323
40402 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
40403 "component=libguestfs&product=Virtualization+Tools>"
40407 #: ../src/guestfs.pod:3325
40408 msgid "When reporting a bug, please check:"
40412 #: ../src/guestfs.pod:3331
40413 msgid "That the bug hasn't been reported already."
40417 #: ../src/guestfs.pod:3335
40418 msgid "That you are testing a recent version."
40422 #: ../src/guestfs.pod:3339
40423 msgid "Describe the bug accurately, and give a way to reproduce it."
40427 #: ../src/guestfs.pod:3343
40429 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
40434 #: ../test-tool/libguestfs-test-tool.pod:5
40435 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40439 #: ../test-tool/libguestfs-test-tool.pod:9
40442 " libguestfs-test-tool [--options]\n"
40447 #: ../test-tool/libguestfs-test-tool.pod:13
40449 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40450 "to check basic libguestfs functionality is working. This is needed because "
40451 "libguestfs occasionally breaks for reasons beyond our control: usually "
40452 "because of changes in the underlying qemu or kernel packages, or the host "
40457 #: ../test-tool/libguestfs-test-tool.pod:19
40458 msgid "If you suspect a problem in libguestfs, then just run:"
40462 #: ../test-tool/libguestfs-test-tool.pod:21
40465 " libguestfs-test-tool\n"
40470 #: ../test-tool/libguestfs-test-tool.pod:23
40471 msgid "It will print lots of diagnostic messages."
40475 #: ../test-tool/libguestfs-test-tool.pod:25
40476 msgid "If it runs to completion successfully, you will see this near the end:"
40480 #: ../test-tool/libguestfs-test-tool.pod:27
40483 " ===== TEST FINISHED OK =====\n"
40488 #: ../test-tool/libguestfs-test-tool.pod:29
40489 msgid "and the test tool will exit with code 0."
40493 #: ../test-tool/libguestfs-test-tool.pod:31
40495 "If it fails (and/or exits with non-zero error code), please paste the "
40496 "I<complete, unedited> output of the test tool into a bug report. More "
40497 "information about reporting bugs can be found on the L<http://libguestfs.org/"
40502 #: ../test-tool/libguestfs-test-tool.pod:42
40503 msgid "Display short usage information and exit."
40507 #: ../test-tool/libguestfs-test-tool.pod:44
40508 msgid "B<--qemu qemu_binary>"
40512 #: ../test-tool/libguestfs-test-tool.pod:46
40514 "If you have downloaded another qemu binary, point this option at the full "
40515 "path of the binary to try it."
40519 #: ../test-tool/libguestfs-test-tool.pod:49
40520 msgid "B<--qemudir qemu_source_dir>"
40524 #: ../test-tool/libguestfs-test-tool.pod:51
40526 "If you have compiled qemu from source, point this option at the source "
40527 "directory to try it."
40531 #: ../test-tool/libguestfs-test-tool.pod:54
40536 #: ../test-tool/libguestfs-test-tool.pod:56
40537 msgid "B<--timeout N>"
40541 #: ../test-tool/libguestfs-test-tool.pod:58
40543 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
40544 "minutes) which does not usually need to be adjusted."
40548 #: ../test-tool/libguestfs-test-tool.pod:63
40549 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
40553 #: ../test-tool/libguestfs-test-tool.pod:65
40555 "If you have compiled another version of qemu from source and would like to "
40556 "try that, then you can use the I<--qemudir> option to point to the qemu "
40557 "source directory."
40561 #: ../test-tool/libguestfs-test-tool.pod:69
40563 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
40564 "option to point to the binary."
40568 #: ../test-tool/libguestfs-test-tool.pod:72
40570 "Note when using these options, you can ignore the business of qemu wrapper "
40571 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
40572 "wrapper script for you if one is needed."
40576 #: ../test-tool/libguestfs-test-tool.pod:76
40577 msgid "TRYING OUT A DIFFERENT KERNEL"
40581 #: ../test-tool/libguestfs-test-tool.pod:78
40583 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
40584 "libguestfs tries. You do this by setting the environment variables "
40585 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
40589 #: ../test-tool/libguestfs-test-tool.pod:82
40591 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
40596 #: ../test-tool/libguestfs-test-tool.pod:85
40597 msgid "SELF-DIAGNOSIS"
40601 #: ../test-tool/libguestfs-test-tool.pod:87
40603 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
40604 "produced by libguestfs-test-tool and/or possible errors."
40608 #: ../test-tool/libguestfs-test-tool.pod:92
40610 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
40611 "I<1> if there was an error."
40615 #: ../test-tool/libguestfs-test-tool.pod:97
40617 "For the full list of environment variables which may affect libguestfs, "
40618 "please see the L<guestfs(3)> manual page."
40622 #: ../test-tool/libguestfs-test-tool.pod:102
40623 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
40627 #: ../tools/virt-list-filesystems.pl:32
40629 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
40633 #: ../tools/virt-list-filesystems.pl:36
40636 " virt-list-filesystems [--options] domname\n"
40641 #: ../tools/virt-list-filesystems.pl:38
40644 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
40649 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
40651 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
40656 #: ../tools/virt-list-filesystems.pl:45
40658 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
40659 "are contained in a virtual machine or disk image."
40663 #: ../tools/virt-list-filesystems.pl:49
40665 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
40666 "functionality. For more complex cases you should look at the L<guestfish(1)"
40671 #: ../tools/virt-list-filesystems.pl:112
40673 "With this option, C<virt-list-filesystems> displays the type of each "
40674 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
40678 #: ../tools/virt-list-filesystems.pl:119
40683 #: ../tools/virt-list-filesystems.pl:123
40685 "Normally we only show mountable filesystems. If this option is given then "
40686 "swap devices are shown too."
40690 #: ../tools/virt-list-filesystems.pl:197
40692 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
40693 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
40694 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40698 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
40699 msgid "Copyright (C) 2009 Red Hat Inc."
40703 #: ../tools/virt-list-partitions.pl:32
40705 "virt-list-partitions - List partitions in a virtual machine or disk image"
40709 #: ../tools/virt-list-partitions.pl:36
40712 " virt-list-partitions [--options] domname\n"
40717 #: ../tools/virt-list-partitions.pl:38
40720 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
40725 #: ../tools/virt-list-partitions.pl:45
40727 "C<virt-list-partitions> is a command line tool to list the partitions that "
40728 "are contained in a virtual machine or disk image. It is mainly useful as a "
40729 "first step to using L<virt-resize(1)>."
40733 #: ../tools/virt-list-partitions.pl:50
40735 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
40736 "functionality. For more complex cases you should look at the L<guestfish(1)"
40741 #: ../tools/virt-list-partitions.pl:113
40742 msgid "Show sizes in human-readable form (eg. \"1G\")."
40746 #: ../tools/virt-list-partitions.pl:123
40748 "With this option, C<virt-list-partitions> displays the type and size of each "
40749 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
40753 #: ../tools/virt-list-partitions.pl:130
40758 #: ../tools/virt-list-partitions.pl:132
40763 #: ../tools/virt-list-partitions.pl:134
40765 "Display the total size of each block device (as a separate row or rows)."
40769 #: ../tools/virt-list-partitions.pl:267
40771 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
40772 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
40773 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40777 #: ../tools/virt-list-partitions.pl:283
40778 msgid "Copyright (C) 2009-2010 Red Hat Inc."
40782 #: ../tools/virt-make-fs.pl:37
40783 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
40787 #: ../tools/virt-make-fs.pl:41
40790 " virt-make-fs [--options] input.tar output.img\n"
40795 #: ../tools/virt-make-fs.pl:43
40798 " virt-make-fs [--options] input.tar.gz output.img\n"
40803 #: ../tools/virt-make-fs.pl:45
40806 " virt-make-fs [--options] directory output.img\n"
40811 #: ../tools/virt-make-fs.pl:49
40813 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
40814 "archive or some files in a directory. It is similar to tools like L<mkisofs"
40815 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
40816 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
40817 "you want to attach these filesystems to existing virtual machines (eg. to "
40818 "import large amounts of read-only data to a VM)."
40822 #: ../tools/virt-make-fs.pl:57
40823 msgid "Basic usage is:"
40827 #: ../tools/virt-make-fs.pl:59
40830 " virt-make-fs input output.img\n"
40835 #: ../tools/virt-make-fs.pl:61
40837 "where C<input> is either a directory containing files that you want to add, "
40838 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
40839 "C<output.img> is a disk image. The input type is detected automatically. "
40840 "The output disk image defaults to a raw ext2 sparse image unless you specify "
40841 "extra flags (see L</OPTIONS> below)."
40845 #: ../tools/virt-make-fs.pl:67
40846 msgid "FILESYSTEM TYPE"
40850 #: ../tools/virt-make-fs.pl:69
40852 "The default filesystem type is C<ext2>. Just about any filesystem type that "
40853 "libguestfs supports can be used (but I<not> read-only formats like "
40854 "ISO9660). Here are some of the more common choices:"
40858 #: ../tools/virt-make-fs.pl:75
40863 #: ../tools/virt-make-fs.pl:77
40865 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
40866 "you are not going to use the filesystem in a way that requires the journal, "
40867 "then this is just wasted overhead."
40871 #: ../tools/virt-make-fs.pl:81
40872 msgid "I<ntfs> or I<vfat>"
40876 #: ../tools/virt-make-fs.pl:83
40877 msgid "Useful if exporting data to a Windows guest."
40881 #: ../tools/virt-make-fs.pl:85
40883 "I<Note for vfat>: The tar archive or local directory must only contain files "
40884 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
40885 "program running within libguestfs is unable to change the ownership of non-"
40886 "root files, since vfat itself does not support this."
40890 #: ../tools/virt-make-fs.pl:90
40895 #: ../tools/virt-make-fs.pl:92
40897 "Lower overhead than C<ext2>, but certain limitations on filename length and "
40898 "total filesystem size."
40902 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116
40903 #: ../tools/virt-make-fs.pl:149
40908 #: ../tools/virt-make-fs.pl:99
40911 " virt-make-fs --type=minix input minixfs.img\n"
40916 #: ../tools/virt-make-fs.pl:101
40917 msgid "TO PARTITION OR NOT TO PARTITION"
40921 #: ../tools/virt-make-fs.pl:103
40922 msgid "Optionally virt-make-fs can add a partition table to the output disk."
40926 #: ../tools/virt-make-fs.pl:105
40928 "Adding a partition can make the disk image more compatible with certain "
40929 "virtualized operating systems which don't expect to see a filesystem "
40930 "directly located on a block device (Linux doesn't care and will happily "
40931 "handle both types)."
40935 #: ../tools/virt-make-fs.pl:110
40937 "On the other hand, if you have a partition table then the output image is no "
40938 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
40939 "directly on a partitioned disk image. (However libguestfs tools such as "
40940 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
40944 #: ../tools/virt-make-fs.pl:118
40945 msgid "Add an MBR partition:"
40949 #: ../tools/virt-make-fs.pl:120
40952 " virt-make-fs --partition -- input disk.img\n"
40957 #: ../tools/virt-make-fs.pl:122
40959 "If the output disk image could be terabyte-sized or larger, it's better to "
40960 "use an EFI/GPT-compatible partition table:"
40964 #: ../tools/virt-make-fs.pl:125
40967 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
40972 #: ../tools/virt-make-fs.pl:127
40973 msgid "EXTRA SPACE"
40977 #: ../tools/virt-make-fs.pl:129
40979 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
40980 "the files that it contains, but might have extra space. Depending on how "
40981 "you are going to use the output, you might think this extra space is wasted "
40982 "and want to minimize it, or you might want to leave space so that more files "
40983 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
40984 "but you can use the I<--size> flag to leave space in the filesystem if you "
40989 #: ../tools/virt-make-fs.pl:137
40991 "An alternative way to leave extra space but not make the output image any "
40992 "bigger is to use an alternative disk image format (instead of the default "
40993 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
40994 "image format (check your hypervisor supports this before using it). This "
40995 "allows you to choose a large I<--size> but the extra space won't actually be "
40996 "allocated in the image until you try to store something in it."
41000 #: ../tools/virt-make-fs.pl:145
41002 "Don't forget that you can also use local commands including L<resize2fs(8)> "
41003 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
41004 "to build another image from scratch."
41008 #: ../tools/virt-make-fs.pl:151
41011 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
41016 #: ../tools/virt-make-fs.pl:179
41017 msgid "Enable debugging information."
41021 #: ../tools/virt-make-fs.pl:185
41022 msgid "B<--size=E<lt>NE<gt>>"
41026 #: ../tools/virt-make-fs.pl:187
41027 msgid "B<--size=+E<lt>NE<gt>>"
41031 #: ../tools/virt-make-fs.pl:189
41032 msgid "B<-s E<lt>NE<gt>>"
41036 #: ../tools/virt-make-fs.pl:191
41037 msgid "B<-s +E<lt>NE<gt>>"
41041 #: ../tools/virt-make-fs.pl:193
41043 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
41047 #: ../tools/virt-make-fs.pl:196
41049 "If this option is I<not> given, then the output image will be just large "
41050 "enough to contain all the files, with not much wasted space."
41054 #: ../tools/virt-make-fs.pl:199
41056 "To choose a fixed size output disk, specify an absolute number followed by b/"
41057 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41058 "Petabytes or Exabytes. This must be large enough to contain all the input "
41059 "files, else you will get an error."
41063 #: ../tools/virt-make-fs.pl:204
41065 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
41066 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41067 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
41068 "the input files, and (approximately) an extra 200 MB free space."
41072 #: ../tools/virt-make-fs.pl:210
41074 "Note that virt-make-fs estimates free space, and therefore will not produce "
41075 "filesystems containing precisely the free space requested. (It is much more "
41076 "expensive and time-consuming to produce a filesystem which has precisely the "
41077 "desired free space)."
41081 #: ../tools/virt-make-fs.pl:219
41082 msgid "B<--format=E<lt>fmtE<gt>>"
41086 #: ../tools/virt-make-fs.pl:221
41087 msgid "B<-F E<lt>fmtE<gt>>"
41091 #: ../tools/virt-make-fs.pl:223
41092 msgid "Choose the output disk image format."
41096 #: ../tools/virt-make-fs.pl:225
41097 msgid "The default is C<raw> (raw sparse disk image)."
41101 #: ../tools/virt-make-fs.pl:227
41103 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
41104 "that would really make sense here is C<qcow2>."
41108 #: ../tools/virt-make-fs.pl:234
41109 msgid "B<--type=E<lt>fsE<gt>>"
41113 #: ../tools/virt-make-fs.pl:236
41114 msgid "B<-t E<lt>fsE<gt>>"
41118 #: ../tools/virt-make-fs.pl:238
41119 msgid "Choose the output filesystem type."
41123 #: ../tools/virt-make-fs.pl:240
41124 msgid "The default is C<ext2>."
41128 #: ../tools/virt-make-fs.pl:242
41130 "Any filesystem which is supported read-write by libguestfs can be used here."
41134 #: ../tools/virt-make-fs.pl:249
41135 msgid "B<--partition>"
41139 #: ../tools/virt-make-fs.pl:251
41140 msgid "B<--partition=E<lt>parttypeE<gt>>"
41144 #: ../tools/virt-make-fs.pl:253
41146 "If specified, this flag adds an MBR partition table to the output disk image."
41150 #: ../tools/virt-make-fs.pl:256
41152 "You can change the partition table type, eg. I<--partition=gpt> for large "
41157 #: ../tools/virt-make-fs.pl:259
41159 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
41160 "might consider the next parameter to be the partition type. For example:"
41164 #: ../tools/virt-make-fs.pl:263
41167 " virt-make-fs --partition input.tar output.img\n"
41172 #: ../tools/virt-make-fs.pl:265
41174 "would cause virt-make-fs to think you wanted to use a partition type of "
41175 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
41176 "dash) between options and the input and output arguments:"
41180 #: ../tools/virt-make-fs.pl:269
41183 " virt-make-fs --partition -- input.tar output.img\n"
41188 #: ../tools/virt-make-fs.pl:271
41189 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
41193 #: ../tools/virt-make-fs.pl:559
41195 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
41196 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
41197 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
41201 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
41203 "When reporting bugs, please enable debugging and capture the I<complete> "
41208 #: ../tools/virt-make-fs.pl:576
41211 " export LIBGUESTFS_DEBUG=1\n"
41212 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
41217 #: ../tools/virt-make-fs.pl:579
41219 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
41224 #: ../tools/virt-tar.pl:33
41225 msgid "virt-tar - Extract or upload files to a virtual machine"
41229 #: ../tools/virt-tar.pl:37
41232 " virt-tar [--options] -x domname directory tarball\n"
41237 #: ../tools/virt-tar.pl:39
41240 " virt-tar [--options] -u domname tarball directory\n"
41245 #: ../tools/virt-tar.pl:41
41248 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
41253 #: ../tools/virt-tar.pl:43
41256 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
41261 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
41266 #: ../tools/virt-tar.pl:47
41268 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
41269 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
41273 #: ../tools/virt-tar.pl:52
41274 msgid "Download C</home> from the VM into a local tarball:"
41278 #: ../tools/virt-tar.pl:54
41281 " virt-tar -x domname /home home.tar\n"
41286 #: ../tools/virt-tar.pl:56
41289 " virt-tar -zx domname /home home.tar.gz\n"
41294 #: ../tools/virt-tar.pl:58
41295 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41299 #: ../tools/virt-tar.pl:60
41302 " virt-tar -u domname uploadstuff.tar /tmp\n"
41307 #: ../tools/virt-tar.pl:62
41310 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41315 #: ../tools/virt-tar.pl:66
41317 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41318 "virtual machines. If you do this, you risk disk corruption in the VM. "
41319 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41323 #: ../tools/virt-tar.pl:71
41325 "You can use I<-x> (extract) on live virtual machines, but you might get "
41326 "inconsistent results or errors if there is filesystem activity inside the "
41327 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41328 "work, but the only way to guarantee consistent results is if the virtual "
41329 "machine is shut down."
41333 #: ../tools/virt-tar.pl:79
41335 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41336 "parts of a guest filesystem. There are many possibilities: making backups, "
41337 "uploading data files, snooping on guest activity, fixing or customizing "
41342 #: ../tools/virt-tar.pl:84
41344 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41345 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
41346 "should look at the L<guestfish(1)> tool."
41350 #: ../tools/virt-tar.pl:88
41352 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41353 "its contents (recursively) from the virtual machine into a local tarball. "
41354 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
41355 "virtual machine. You cannot use these two options together."
41359 #: ../tools/virt-tar.pl:94
41361 "In addition, you may need to use the I<-z> (gZip) option to enable "
41362 "compression. When uploading, you have to specify I<-z> if the upload file "
41363 "is compressed because virt-tar won't detect this on its own."
41367 #: ../tools/virt-tar.pl:98
41369 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41370 "example it cannot do PKZip files or bzip2 compression. If you want that "
41371 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41372 "the L<libguestfs(3)> API)."
41376 #: ../tools/virt-tar.pl:160
41377 msgid "B<--extract>"
41381 #: ../tools/virt-tar.pl:162
41382 msgid "B<--download>"
41386 #: ../tools/virt-tar.pl:164
41391 #: ../tools/virt-tar.pl:166
41392 msgid "B<--upload>"
41396 #: ../tools/virt-tar.pl:168
41398 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41403 #: ../tools/virt-tar.pl:171
41405 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41406 "Please read the L</WARNING> section above before using this option."
41410 #: ../tools/virt-tar.pl:175
41411 msgid "You must specify exactly one of these options."
41415 #: ../tools/virt-tar.pl:181
41420 #: ../tools/virt-tar.pl:183
41425 #: ../tools/virt-tar.pl:185
41426 msgid "Specify that the input or output tarball is gzip-compressed."
41430 #: ../tools/virt-tar.pl:298
41432 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
41433 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
41434 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
41439 #: ../tools/virt-win-reg.pl:37
41441 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
41445 #: ../tools/virt-win-reg.pl:41
41448 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41453 #: ../tools/virt-win-reg.pl:43
41456 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41461 #: ../tools/virt-win-reg.pl:45
41464 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41469 #: ../tools/virt-win-reg.pl:47
41472 " virt-win-reg --merge domname [input.reg ...]\n"
41477 #: ../tools/virt-win-reg.pl:49
41480 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41485 #: ../tools/virt-win-reg.pl:53
41487 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41488 "virtual machines. If you do this, you I<will> get irreversible disk "
41489 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41490 "but doesn't catch all cases."
41494 #: ../tools/virt-win-reg.pl:58
41496 "Modifying the Windows Registry is an inherently risky operation. The format "
41497 "is deliberately obscure and undocumented, and Registry changes can leave the "
41498 "system unbootable. Therefore when using the I<--merge> option, make sure "
41499 "you have a reliable backup first."
41503 #: ../tools/virt-win-reg.pl:65
41505 "This program can export and merge Windows Registry entries from a Windows "
41510 #: ../tools/virt-win-reg.pl:68
41512 "The first parameter is the libvirt guest name or the raw disk image of a "
41517 #: ../tools/virt-win-reg.pl:71
41519 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
41520 "exported (recursively). For example:"
41524 #: ../tools/virt-win-reg.pl:74
41527 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
41532 #: ../tools/virt-win-reg.pl:76
41534 "You can also display single values from within registry keys, for example:"
41538 #: ../tools/virt-win-reg.pl:79
41541 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
41542 " $ virt-win-reg Windows7 $cvkey ProductName\n"
41543 " Windows 7 Enterprise\n"
41548 #: ../tools/virt-win-reg.pl:83
41550 "With I<--merge>, you can merge a textual regedit file into the Windows "
41555 #: ../tools/virt-win-reg.pl:86
41558 " $ virt-win-reg --merge Windows7 changes.reg\n"
41563 #: ../tools/virt-win-reg.pl:90
41565 "This program is only meant for simple access to the registry. If you want "
41566 "to do complicated things with the registry, we suggest you download the "
41567 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
41568 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
41569 "L<hivexregedit(1)>."
41573 #: ../tools/virt-win-reg.pl:159
41578 #: ../tools/virt-win-reg.pl:161
41580 "In merge mode, this merges a textual regedit file into the Windows Registry "
41581 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
41582 "displays or exports Registry entries instead."
41586 #: ../tools/virt-win-reg.pl:165
41588 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
41589 "result in disk corruption. However exporting (without this flag) is always "
41594 #: ../tools/virt-win-reg.pl:173
41595 msgid "B<--encoding> UTF-16LE|ASCII"
41599 #: ../tools/virt-win-reg.pl:175
41601 "When merging (only), you may need to specify the encoding for strings to be "
41602 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
41603 "(3)/ENCODING STRINGS>."
41607 #: ../tools/virt-win-reg.pl:179
41609 "The default is to use UTF-16LE, which should work with recent versions of "
41614 #: ../tools/virt-win-reg.pl:186
41615 msgid "B<--unsafe-printable-strings>"
41619 #: ../tools/virt-win-reg.pl:188
41621 "When exporting (only), assume strings are UTF-16LE and print them as strings "
41622 "instead of hex sequences. Remove the final zero codepoint from strings if "
41627 #: ../tools/virt-win-reg.pl:192
41629 "This is unsafe and does not preserve the fidelity of strings in the original "
41630 "Registry for various reasons:"
41634 #: ../tools/virt-win-reg.pl:199
41636 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
41637 "other encodings will be corrupted by this transformation."
41641 #: ../tools/virt-win-reg.pl:204
41643 "Assumes that everything which has type 1 or 2 is really a string and that "
41644 "everything else is not a string, but the type field in real Registries is "
41649 #: ../tools/virt-win-reg.pl:210
41651 "Loses information about whether a zero codepoint followed the string in the "
41656 #: ../tools/virt-win-reg.pl:215
41658 "This all happens because the Registry itself contains no information about "
41659 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
41663 #: ../tools/virt-win-reg.pl:219
41665 "You should only use this option for quick hacking and debugging of the "
41666 "Registry contents, and I<never> use it if the output is going to be passed "
41667 "into another program or stored in another Registry."
41671 #: ../tools/virt-win-reg.pl:556
41672 msgid "SUPPORTED SYSTEMS"
41676 #: ../tools/virt-win-reg.pl:558
41678 "The program currently supports Windows NT-derived guests starting with "
41679 "Windows XP through to at least Windows 7."
41683 #: ../tools/virt-win-reg.pl:561
41684 msgid "The following Registry keys are supported:"
41688 #: ../tools/virt-win-reg.pl:565
41689 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
41693 #: ../tools/virt-win-reg.pl:567
41694 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
41698 #: ../tools/virt-win-reg.pl:569
41699 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
41703 #: ../tools/virt-win-reg.pl:571
41704 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
41708 #: ../tools/virt-win-reg.pl:573
41709 msgid "C<HKEY_USERS\\.DEFAULT>"
41713 #: ../tools/virt-win-reg.pl:575
41714 msgid "C<HKEY_USERS\\I<SID>>"
41718 #: ../tools/virt-win-reg.pl:577
41719 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
41723 #: ../tools/virt-win-reg.pl:579
41724 msgid "C<HKEY_USERS\\I<username>>"
41728 #: ../tools/virt-win-reg.pl:581
41730 "where I<username> is a local user name (this is a libguestfs extension)."
41734 #: ../tools/virt-win-reg.pl:585
41736 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
41741 #: ../tools/virt-win-reg.pl:588
41743 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
41744 "supported (there is no \"current user\")."
41748 #: ../tools/virt-win-reg.pl:591
41753 #: ../tools/virt-win-reg.pl:593
41755 "C<virt-win-reg> expects that regedit files have already been reencoded in "
41756 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
41757 "style line endings. Since Windows regedit files are often in UTF-16LE with "
41758 "Windows-style line endings, you may need to reencode the whole file before "
41759 "or after processing."
41763 #: ../tools/virt-win-reg.pl:599
41765 "To reencode a file from Windows format to Linux (before processing it with "
41766 "the I<--merge> option), you would do something like this:"
41770 #: ../tools/virt-win-reg.pl:602
41773 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
41778 #: ../tools/virt-win-reg.pl:604
41780 "To go in the opposite direction, after exporting and before sending the file "
41781 "to a Windows user, do something like this:"
41785 #: ../tools/virt-win-reg.pl:607
41788 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
41793 #: ../tools/virt-win-reg.pl:609
41794 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
41798 #: ../tools/virt-win-reg.pl:611
41800 "If you are unsure about the current encoding, use the L<file(1)> command. "
41801 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
41802 "style (CRLF) line endings, like this:"
41806 #: ../tools/virt-win-reg.pl:615
41809 " $ file software.reg\n"
41810 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
41811 " with CRLF line terminators\n"
41816 #: ../tools/virt-win-reg.pl:619
41817 msgid "This file would need conversion before you could I<--merge> it."
41821 #: ../tools/virt-win-reg.pl:621
41822 msgid "CurrentControlSet etc."
41826 #: ../tools/virt-win-reg.pl:623
41828 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
41829 "Registry at the level of the hive file, and therefore you cannot modify "
41834 #: ../tools/virt-win-reg.pl:627
41836 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
41837 "circumstances it might refer to another control set. The way to find out is "
41838 "to look at the C<HKLM\\SYSTEM\\Select> key:"
41842 #: ../tools/virt-win-reg.pl:631
41845 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
41846 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
41847 " \"Current\"=dword:00000001\n"
41848 " \"Default\"=dword:00000001\n"
41849 " \"Failed\"=dword:00000000\n"
41850 " \"LastKnownGood\"=dword:00000002\n"
41855 #: ../tools/virt-win-reg.pl:638
41856 msgid "\"Current\" is the one which Windows will choose when it boots."
41860 #: ../tools/virt-win-reg.pl:640
41862 "Similarly, other C<Current...> keys in the path may need to be replaced."
41866 #: ../tools/virt-win-reg.pl:643
41867 msgid "DELETING REGISTRY KEYS AND VALUES"
41871 #: ../tools/virt-win-reg.pl:645
41872 msgid "To delete a whole registry key, use the syntax:"
41876 #: ../tools/virt-win-reg.pl:647
41879 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
41884 #: ../tools/virt-win-reg.pl:649
41885 msgid "To delete a single value within a key, use the syntax:"
41889 #: ../tools/virt-win-reg.pl:651
41892 " [HKEY_LOCAL_MACHINE\\Foo]\n"
41898 #: ../tools/virt-win-reg.pl:654
41899 msgid "WINDOWS TIPS"
41903 #: ../tools/virt-win-reg.pl:656
41905 "Note that some of these tips modify the guest disk image. The guest I<must> "
41906 "be shut off, else you will get disk corruption."
41910 #: ../tools/virt-win-reg.pl:659
41911 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
41915 #: ../tools/virt-win-reg.pl:661
41917 "Prepare a DOS batch script, VBScript or executable. Upload this using "
41918 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
41919 "is uploaded into C<C:\\>:"
41923 #: ../tools/virt-win-reg.pl:665
41926 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
41931 #: ../tools/virt-win-reg.pl:667
41932 msgid "Prepare a regedit file containing the registry change:"
41936 #: ../tools/virt-win-reg.pl:669
41939 " cat > test.reg <<'EOF'\n"
41940 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
41941 " \"Test\"=\"c:\\\\test.bat\"\n"
41947 #: ../tools/virt-win-reg.pl:674
41949 "In this example we use the key C<RunOnce> which means that the script will "
41950 "run precisely once when the first user logs in. If you want it to run every "
41951 "time a user logs in, replace C<RunOnce> with C<Run>."
41955 #: ../tools/virt-win-reg.pl:678
41956 msgid "Now update the registry:"
41960 #: ../tools/virt-win-reg.pl:680
41963 " virt-win-reg --merge WindowsGuest test.reg\n"
41968 #: ../tools/virt-win-reg.pl:682
41969 msgid "INSTALLING A SERVICE"
41973 #: ../tools/virt-win-reg.pl:684
41975 "This section assumes you are familiar with Windows services, and you either "
41976 "have a program which handles the Windows Service Control Protocol directly "
41977 "or you want to run any program using a service wrapper like SrvAny or the "
41982 #: ../tools/virt-win-reg.pl:689
41984 "First upload the program and optionally the service wrapper. In this case "
41985 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
41989 #: ../tools/virt-win-reg.pl:693
41992 " guestfish -i -d WindowsGuest <<EOF\n"
41993 " upload rhsrvany.exe /rhsrvany.exe\n"
41994 " upload test.exe /test.exe\n"
42000 #: ../tools/virt-win-reg.pl:698
42002 "Prepare a regedit file containing the registry changes. In this example, "
42003 "the first registry change is needed for the service itself or the service "
42004 "wrapper (if used). The second registry change is only needed because I am "
42005 "using the RHSrvAny service wrapper."
42009 #: ../tools/virt-win-reg.pl:703
42012 " cat > service.reg <<'EOF'\n"
42013 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
42014 " \"Type\"=dword:00000010\n"
42015 " \"Start\"=dword:00000002\n"
42016 " \"ErrorControl\"=dword:00000001\n"
42017 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
42018 " \"DisplayName\"=\"RHSrvAny\"\n"
42019 " \"ObjectName\"=\"NetworkService\"\n"
42024 #: ../tools/virt-win-reg.pl:712
42027 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
42028 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
42029 " \"PWD\"=\"c:\\\\Temp\"\n"
42035 #: ../tools/virt-win-reg.pl:723
42037 "For use of C<ControlSet001> see the section above in this manual page. You "
42038 "may need to adjust this according to the control set that is in use by the "
42043 #: ../tools/virt-win-reg.pl:729
42045 "C<\"ObjectName\"> controls the privileges that the service will have. An "
42046 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
42047 "privileged account."
42051 #: ../tools/virt-win-reg.pl:735
42053 "For the meaning of the magic numbers, see this Microsoft KB article: "
42054 "L<http://support.microsoft.com/kb/103000>."
42058 #: ../tools/virt-win-reg.pl:740
42059 msgid "Update the registry:"
42063 #: ../tools/virt-win-reg.pl:742
42066 " virt-win-reg --merge WindowsGuest service.reg\n"
42071 #: ../tools/virt-win-reg.pl:746
42073 "Be careful when passing parameters containing C<\\> (backslash) in the "
42074 "shell. Usually you will have to use 'single quotes' or double backslashes "
42075 "(but not both) to protect them from the shell."
42079 #: ../tools/virt-win-reg.pl:750
42080 msgid "Paths and value names are case-insensitive."
42084 #: ../tools/virt-win-reg.pl:759
42086 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
42087 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
42088 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42092 #: ../tools/virt-win-reg.pl:777
42095 " export LIBGUESTFS_DEBUG=1\n"
42096 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
42101 #: ../tools/virt-win-reg.pl:780
42103 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."