1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.13.18\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-10-05 18:11+0200\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
21 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3 ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3 ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3 ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3 ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3 ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3 ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3 ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3 ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3 ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3 ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30 ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31 ../tools/virt-win-reg.pl:35
26 #: ../align/virt-alignment-scan.pod:5
27 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
31 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7 ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7 ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7 ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7 ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7 ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7 ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7 ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7 ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7 ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34 ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35 ../tools/virt-win-reg.pl:39
36 #: ../align/virt-alignment-scan.pod:9
39 " virt-alignment-scan [--options]\n"
44 #: ../align/virt-alignment-scan.pod:11
47 " virt-alignment-scan [--options] -d domname\n"
52 #: ../align/virt-alignment-scan.pod:13
55 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
60 #: ../align/virt-alignment-scan.pod:15 ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27 ../erlang/examples/guestfs-erlang.pod:16 ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18 ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18 ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77 ../tools/virt-win-reg.pl:63
65 #: ../align/virt-alignment-scan.pod:17
67 "When older operating systems install themselves, the partitioning tools "
68 "place partitions at a sector misaligned with the underlying storage "
69 "(commonly the first partition starts on sector C<63>). Misaligned "
70 "partitions can result in an operating system issuing more I/O than should be "
75 #: ../align/virt-alignment-scan.pod:23
77 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
78 "machines and disk images and warns you if there are alignment problems."
82 #: ../align/virt-alignment-scan.pod:27
84 "Currently there is no virt tool for fixing alignment problems, except to "
85 "reinstall the operating system. The following NetApp document summarises "
86 "the problem and possible solutions: "
87 "L<http://media.netapp.com/documents/tr-3747.pdf>"
91 #: ../align/virt-alignment-scan.pod:32
96 #: ../align/virt-alignment-scan.pod:34
97 msgid "To run this tool on a disk image directly, use the I<-a> option:"
101 #: ../align/virt-alignment-scan.pod:36
104 " $ virt-alignment-scan -a winxp.img\n"
105 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
110 #: ../align/virt-alignment-scan.pod:39
113 " $ virt-alignment-scan -a fedora16.img\n"
114 " /dev/sda1 1048576 1024K ok\n"
115 " /dev/sda2 2097152 2048K ok\n"
116 " /dev/sda3 526385152 2048K ok\n"
121 #: ../align/virt-alignment-scan.pod:44
123 "To run the tool on a guest known to libvirt, use the I<-d> option and "
124 "possibly the I<-c> option:"
128 #: ../align/virt-alignment-scan.pod:47
131 " # virt-alignment-scan -d RHEL5\n"
132 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
133 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
138 #: ../align/virt-alignment-scan.pod:51
141 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
142 " /dev/sda1 1048576 1024K ok\n"
143 " /dev/sda2 105906176 1024K ok\n"
144 " /dev/sdb1 65536 64K ok\n"
149 #: ../align/virt-alignment-scan.pod:56
151 "The output consists of 4 or more whitespace-separated columns. Only the "
152 "first 4 columns are signficant if you want to parse this from a program. "
157 #: ../align/virt-alignment-scan.pod:62
162 #: ../align/virt-alignment-scan.pod:64
164 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
165 "on the first block device)"
169 #: ../align/virt-alignment-scan.pod:67
174 #: ../align/virt-alignment-scan.pod:69
175 msgid "the start of the partition in bytes"
179 #: ../align/virt-alignment-scan.pod:71
184 #: ../align/virt-alignment-scan.pod:73
185 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
189 #: ../align/virt-alignment-scan.pod:75
194 #: ../align/virt-alignment-scan.pod:77
196 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
197 "can cause performance problems"
201 #: ../align/virt-alignment-scan.pod:80
206 #: ../align/virt-alignment-scan.pod:82
207 msgid "optional free-text explanation."
211 #: ../align/virt-alignment-scan.pod:86
213 "The exit code from the program changes depending on whether poorly aligned "
214 "partitions were found. See L</EXIT STATUS> below."
218 #: ../align/virt-alignment-scan.pod:89
219 msgid "If you just want the exit code with no output, use the I<-q> option."
223 #: ../align/virt-alignment-scan.pod:91 ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62 ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45 ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42 ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:83 ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84 ../resize/virt-resize.pod:241 ../sparsify/virt-sparsify.pod:99 ../test-tool/libguestfs-test-tool.pod:36 ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54 ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103 ../tools/virt-win-reg.pl:96
228 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 ../fish/guestfish.pod:152 ../fuse/guestmount.pod:151 ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88 ../resize/virt-resize.pod:245 ../sparsify/virt-sparsify.pod:103 ../test-tool/libguestfs-test-tool.pod:40 ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62 ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111 ../tools/virt-win-reg.pl:104
233 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106
234 msgid "Display brief help."
238 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92
243 #: ../align/virt-alignment-scan.pod:101 ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94
244 msgid "B<--add> file"
248 #: ../align/virt-alignment-scan.pod:103
249 msgid "Add I<file> which should be a disk image from a virtual machine."
253 #: ../align/virt-alignment-scan.pod:105 ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 ../fish/guestfish.pod:174 ../fuse/guestmount.pod:93 ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100
255 "The format of the disk image is auto-detected. To override this and force a "
256 "particular format use the I<--format=..> option."
260 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:107
265 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:109
266 msgid "B<--connect> URI"
270 #: ../align/virt-alignment-scan.pod:112 ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
272 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
273 "to the default libvirt hypervisor."
277 #: ../align/virt-alignment-scan.pod:115 ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:114
279 "If you specify guest block devices directly (I<-a>), then libvirt is not "
284 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117
289 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119
290 msgid "B<--domain> guest"
294 #: ../align/virt-alignment-scan.pod:122 ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121
296 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
301 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../df/virt-df.pod:101 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:133 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124
302 msgid "B<--format=raw|qcow2|..>"
306 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:126
311 #: ../align/virt-alignment-scan.pod:129 ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:137 ../rescue/virt-rescue.pod:128
313 "The default for the I<-a> option is to auto-detect the format of the disk "
314 "image. Using this forces the disk format for I<-a> options which follow on "
315 "the command line. Using I<--format> with no argument switches back to "
316 "auto-detection for subsequent I<-a> options."
320 #: ../align/virt-alignment-scan.pod:134 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336 ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2791
325 #: ../align/virt-alignment-scan.pod:136
328 " virt-alignment-scan --format=raw -a disk.img\n"
333 #: ../align/virt-alignment-scan.pod:138 ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:137
334 msgid "forces raw format (no auto-detection) for C<disk.img>."
338 #: ../align/virt-alignment-scan.pod:140
341 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
346 #: ../align/virt-alignment-scan.pod:142 ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:141
348 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
349 "auto-detection for C<another.img>."
353 #: ../align/virt-alignment-scan.pod:145 ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144
355 "If you have untrusted raw-format guest disk images, you should use this "
356 "option to specify the disk format. This avoids a possible security problem "
357 "with malicious guests (CVE-2010-3851)."
361 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:414 ../sparsify/virt-sparsify.pod:153
366 #: ../align/virt-alignment-scan.pod:151 ../resize/virt-resize.pod:416 ../sparsify/virt-sparsify.pod:155
371 #: ../align/virt-alignment-scan.pod:153
373 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
378 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 ../df/virt-df.pod:173 ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 ../fuse/guestmount.pod:257 ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:182 ../sparsify/virt-sparsify.pod:159
383 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 ../df/virt-df.pod:175 ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 ../fuse/guestmount.pod:259 ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:184 ../sparsify/virt-sparsify.pod:161
388 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 ../df/virt-df.pod:177 ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:186 ../sparsify/virt-sparsify.pod:163
389 msgid "Enable verbose messages for debugging."
393 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 ../df/virt-df.pod:179 ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 ../fuse/guestmount.pod:263 ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:484 ../sparsify/virt-sparsify.pod:165
398 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 ../df/virt-df.pod:181 ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 ../fuse/guestmount.pod:265 ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:190 ../resize/virt-resize.pod:486 ../sparsify/virt-sparsify.pod:167 ../tools/virt-list-filesystems.pl:69 ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169 ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
403 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 ../df/virt-df.pod:183 ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:192 ../resize/virt-resize.pod:488 ../sparsify/virt-sparsify.pod:169 ../tools/virt-list-filesystems.pl:71 ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171 ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
404 msgid "Display version number and exit."
408 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 ../df/virt-df.pod:185 ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 ../fuse/guestmount.pod:278 ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:203 ../sparsify/virt-sparsify.pod:171 ../tools/virt-tar.pl:158
413 #: ../align/virt-alignment-scan.pod:170 ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 ../df/virt-df.pod:187 ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:205 ../sparsify/virt-sparsify.pod:173
414 msgid "Enable tracing of libguestfs API calls."
418 #: ../align/virt-alignment-scan.pod:174 ../cat/virt-cat.pod:191 ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:483 ../df/virt-df.pod:215 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352 ../rescue/virt-rescue.pod:266 ../resize/virt-resize.pod:601 ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:532 ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:733
419 msgid "SHELL QUOTING"
423 #: ../align/virt-alignment-scan.pod:176 ../cat/virt-cat.pod:193 ../cat/virt-filesystems.pod:367 ../cat/virt-ls.pod:485 ../df/virt-df.pod:217 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354 ../rescue/virt-rescue.pod:268 ../resize/virt-resize.pod:603 ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:534 ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:741
425 "Libvirt guest names can contain arbitrary characters, some of which have "
426 "meaning to the shell such as C<#> and space. You may need to quote or "
427 "escape these characters on the command line. See the shell manual page "
428 "L<sh(1)> for details."
432 #: ../align/virt-alignment-scan.pod:181 ../cat/virt-cat.pod:198 ../cat/virt-filesystems.pod:372 ../cat/virt-ls.pod:490 ../df/virt-df.pod:222 ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1081 ../fuse/guestmount.pod:303 ../inspector/virt-inspector.pod:375 ../resize/virt-resize.pod:608 ../sparsify/virt-sparsify.pod:227 ../test-tool/libguestfs-test-tool.pod:90
437 #: ../align/virt-alignment-scan.pod:183
438 msgid "This program returns:"
442 #: ../align/virt-alignment-scan.pod:187
447 #: ../align/virt-alignment-scan.pod:189
448 msgid "successful exit, all partitions are aligned E<ge> 64K for best performance"
452 #: ../align/virt-alignment-scan.pod:191
457 #: ../align/virt-alignment-scan.pod:193
458 msgid "an error scanning the disk image or guest"
462 #: ../align/virt-alignment-scan.pod:195
467 #: ../align/virt-alignment-scan.pod:197
469 "successful exit, some partitions have alignment E<lt> 64K which can result "
470 "in poor performance on high end network storage"
474 #: ../align/virt-alignment-scan.pod:200
479 #: ../align/virt-alignment-scan.pod:202
481 "successful exit, some partitions have alignment E<lt> 4K which can result in "
482 "poor performance on most hypervisors"
486 #: ../align/virt-alignment-scan.pod:207 ../cat/virt-cat.pod:203 ../cat/virt-filesystems.pod:377 ../cat/virt-ls.pod:495 ../df/virt-df.pod:227 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../fish/guestfish.pod:1235 ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:308 ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45 ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39 ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288 ../resize/virt-resize.pod:613 ../ruby/examples/guestfs-ruby.pod:36 ../sparsify/virt-sparsify.pod:251 ../src/guestfs.pod:3179 ../test-tool/libguestfs-test-tool.pod:100 ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265 ../tools/virt-make-fs.pl:539 ../tools/virt-tar.pl:296 ../tools/virt-win-reg.pl:746
491 #: ../align/virt-alignment-scan.pod:209
493 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
494 "L<http://libguestfs.org/>."
498 #: ../align/virt-alignment-scan.pod:214 ../cat/virt-cat.pod:212 ../cat/virt-filesystems.pod:388 ../cat/virt-ls.pod:507 ../df/virt-df.pod:235 ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:296 ../resize/virt-resize.pod:635 ../sparsify/virt-sparsify.pod:264 ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277 ../tools/virt-make-fs.pl:564 ../tools/virt-tar.pl:311 ../tools/virt-win-reg.pl:772
503 #: ../align/virt-alignment-scan.pod:216 ../cat/virt-cat.pod:214 ../cat/virt-filesystems.pod:390 ../cat/virt-ls.pod:509 ../df/virt-df.pod:237 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395 ../rescue/virt-rescue.pod:298 ../resize/virt-resize.pod:637 ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210 ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:566 ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:774
504 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
508 #: ../align/virt-alignment-scan.pod:218 ../cat/virt-cat.pod:216 ../cat/virt-filesystems.pod:392 ../cat/virt-ls.pod:511 ../df/virt-df.pod:239 ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 ../fish/guestfish.pod:1266 ../fish/virt-copy-in.pod:64 ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62 ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:323 ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62 ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56 ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300 ../resize/virt-resize.pod:639 ../ruby/examples/guestfs-ruby.pod:52 ../sparsify/virt-sparsify.pod:268 ../src/guestfs.pod:3259 ../test-tool/libguestfs-test-tool.pod:110 ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281 ../tools/virt-make-fs.pl:568 ../tools/virt-tar.pl:315 ../tools/virt-win-reg.pl:776
513 #: ../align/virt-alignment-scan.pod:220 ../sparsify/virt-sparsify.pod:270
514 msgid "Copyright (C) 2011 Red Hat Inc."
518 #: ../align/virt-alignment-scan.pod:222 ../cat/virt-cat.pod:220 ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:515 ../df/virt-df.pod:243 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1271 ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58 ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60 ../fuse/guestmount.pod:328 ../inspector/virt-inspector.pod:407 ../rescue/virt-rescue.pod:304 ../resize/virt-resize.pod:643 ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285 ../tools/virt-make-fs.pl:572 ../tools/virt-tar.pl:319 ../tools/virt-win-reg.pl:780
520 "This program is free software; you can redistribute it and/or modify it "
521 "under the terms of the GNU General Public License as published by the Free "
522 "Software Foundation; either version 2 of the License, or (at your option) "
527 #: ../align/virt-alignment-scan.pod:227 ../cat/virt-cat.pod:225 ../cat/virt-filesystems.pod:401 ../cat/virt-ls.pod:520 ../df/virt-df.pod:248 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1276 ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63 ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65 ../fuse/guestmount.pod:333 ../inspector/virt-inspector.pod:412 ../rescue/virt-rescue.pod:309 ../resize/virt-resize.pod:648 ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290 ../tools/virt-make-fs.pl:577 ../tools/virt-tar.pl:324 ../tools/virt-win-reg.pl:785
529 "This program is distributed in the hope that it will be useful, but WITHOUT "
530 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
531 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
536 #: ../align/virt-alignment-scan.pod:232 ../cat/virt-cat.pod:230 ../cat/virt-filesystems.pod:406 ../cat/virt-ls.pod:525 ../df/virt-df.pod:253 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1281 ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68 ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70 ../fuse/guestmount.pod:338 ../inspector/virt-inspector.pod:417 ../rescue/virt-rescue.pod:314 ../resize/virt-resize.pod:653 ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125 ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295 ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:329 ../tools/virt-win-reg.pl:790
538 "You should have received a copy of the GNU General Public License along with "
539 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
540 "Ave, Cambridge, MA 02139, USA."
544 #: ../cat/virt-cat.pod:5
545 msgid "virt-cat - Display files in a virtual machine"
549 #: ../cat/virt-cat.pod:9
552 " virt-cat [--options] -d domname file [file ...]\n"
557 #: ../cat/virt-cat.pod:11
560 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
565 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 ../inspector/virt-inspector.pod:13
570 #: ../cat/virt-cat.pod:15
573 " virt-cat domname file\n"
578 #: ../cat/virt-cat.pod:17
581 " virt-cat disk.img file\n"
586 #: ../cat/virt-cat.pod:21
588 "C<virt-cat> is a command line tool to display the contents of C<file> where "
589 "C<file> exists in the named virtual machine (or disk image)."
593 #: ../cat/virt-cat.pod:24
595 "Multiple filenames can be given, in which case they are concatenated "
596 "together. Each filename must be a full path, starting at the root directory "
597 "(starting with '/')."
601 #: ../cat/virt-cat.pod:28
603 "C<virt-cat> can be used to quickly view a file. To edit a file, use "
604 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
605 "tool (see L</USING GUESTFISH> below)."
609 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43 ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41 ../fish/guestfish.pod:1018 ../fish/virt-copy-in.pod:29 ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30 ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39 ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75 ../tools/virt-tar.pl:50
614 #: ../cat/virt-cat.pod:34
615 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
619 #: ../cat/virt-cat.pod:37
622 " virt-cat -d mydomain /etc/fstab\n"
627 #: ../cat/virt-cat.pod:39
628 msgid "List syslog messages from a VM disk image file:"
632 #: ../cat/virt-cat.pod:41
635 " virt-cat -a disk.img /var/log/messages | tail\n"
640 #: ../cat/virt-cat.pod:43
641 msgid "Find out what DHCP IP address a VM acquired:"
645 #: ../cat/virt-cat.pod:45
648 " virt-cat -d mydomain /var/log/messages | \\\n"
649 " grep 'dhclient: bound to' | tail\n"
654 #: ../cat/virt-cat.pod:48
655 msgid "Find out what packages were recently installed:"
659 #: ../cat/virt-cat.pod:50
662 " virt-cat -d mydomain /var/log/yum.log | tail\n"
667 #: ../cat/virt-cat.pod:52
668 msgid "Find out who is logged on inside a virtual machine:"
672 #: ../cat/virt-cat.pod:54
675 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
681 #: ../cat/virt-cat.pod:57
682 msgid "or who was logged on:"
686 #: ../cat/virt-cat.pod:59
689 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
690 " last -f /tmp/wtmp\n"
695 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103 ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74 ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
697 "Add I<file> which should be a disk image from a virtual machine. If the "
698 "virtual machine has multiple block devices, you must supply all of them with "
699 "separate I<-a> options."
703 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148 ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217 ../fuse/guestmount.pod:126 ../inspector/virt-inspector.pod:92
704 msgid "B<--echo-keys>"
708 #: ../cat/virt-cat.pod:100
710 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
711 "so you cannot see what you are typing. If you are not worried about Tempest "
712 "attacks and there is no one else in the room you can specify this flag to "
713 "see what you are typing."
717 #: ../cat/virt-cat.pod:116
720 " virt-cat --format=raw -a disk.img file\n"
725 #: ../cat/virt-cat.pod:120
728 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
733 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200 ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289 ../fuse/guestmount.pod:163 ../inspector/virt-inspector.pod:114
734 msgid "B<--keys-from-stdin>"
738 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202 ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291 ../fuse/guestmount.pod:165 ../inspector/virt-inspector.pod:116
740 "Read key or passphrase parameters from stdin. The default is to try to read "
741 "passphrases from the user by opening C</dev/tty>."
745 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:209
746 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
750 #: ../cat/virt-cat.pod:154
751 msgid "Previous versions of virt-cat allowed you to write either:"
755 #: ../cat/virt-cat.pod:156
758 " virt-cat disk.img [disk.img ...] file\n"
763 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:215
768 #: ../cat/virt-cat.pod:160
771 " virt-cat guestname file\n"
776 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:219
778 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
779 "the confusing case where a disk image might have the same name as a guest."
783 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:223
784 msgid "For compatibility the old style is still supported."
788 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:297
789 msgid "USING GUESTFISH"
793 #: ../cat/virt-cat.pod:170
795 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
796 "C<virt-cat> doesn't work."
800 #: ../cat/virt-cat.pod:173
801 msgid "Using C<virt-cat> is approximately equivalent to doing:"
805 #: ../cat/virt-cat.pod:175
808 " guestfish --ro -i -d domname download file -\n"
813 #: ../cat/virt-cat.pod:177
815 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
816 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
820 #: ../cat/virt-cat.pod:181
822 "The command above uses libguestfs's guest inspection feature and so does not "
823 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
824 "disk images that don't contain guests. To display a file from a disk image "
829 #: ../cat/virt-cat.pod:186
832 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
837 #: ../cat/virt-cat.pod:188
839 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
840 "the disk image, and C<file> is the full path to the file."
844 #: ../cat/virt-cat.pod:200 ../cat/virt-filesystems.pod:374 ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:305 ../inspector/virt-inspector.pod:377 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:229
845 msgid "This program returns 0 if successful, or non-zero if there was an error."
849 #: ../cat/virt-cat.pod:205
851 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
852 "L<virt-tar-out(1)>, L<http://libguestfs.org/>."
856 #: ../cat/virt-cat.pod:218 ../inspector/virt-inspector.pod:405 ../resize/virt-resize.pod:641
857 msgid "Copyright (C) 2010-2011 Red Hat Inc."
861 #: ../cat/virt-filesystems.pod:5
863 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
864 "virtual machine or disk image"
868 #: ../cat/virt-filesystems.pod:9
871 " virt-filesystems [--options] -d domname\n"
876 #: ../cat/virt-filesystems.pod:11
879 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
884 #: ../cat/virt-filesystems.pod:15
886 "This tool allows you to discover filesystems, partitions, logical volumes, "
887 "and their sizes in a disk image or virtual machine. It is a replacement for "
888 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
892 #: ../cat/virt-filesystems.pod:20
894 "One use for this tool is from shell scripts to iterate over all filesystems "
899 #: ../cat/virt-filesystems.pod:23
902 " for fs in $(virt-filesystems -a disk.img); do\n"
909 #: ../cat/virt-filesystems.pod:27
911 "Another use is to list partitions before using another tool to modify those "
912 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
913 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
917 #: ../cat/virt-filesystems.pod:32
919 "Various command line options control what this program displays. You need "
920 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
921 "guest respectively. If you just specify that then the program shows "
922 "filesystems found, one per line, like this:"
926 #: ../cat/virt-filesystems.pod:37
929 " $ virt-filesystems -a disk.img\n"
931 " /dev/vg_guest/lv_root\n"
936 #: ../cat/virt-filesystems.pod:41
937 msgid "If you add I<-l> or I<--long> then the output includes extra information:"
941 #: ../cat/virt-filesystems.pod:44
944 " $ virt-filesystems -a disk.img -l\n"
945 " Name Type VFS Label Size\n"
946 " /dev/sda1 filesystem ext4 boot 524288000\n"
947 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
952 #: ../cat/virt-filesystems.pod:49
954 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
959 #: ../cat/virt-filesystems.pod:52
962 " $ virt-filesystems -a disk.img --extra\n"
964 " /dev/vg_guest/lv_root\n"
965 " /dev/vg_guest/lv_swap\n"
966 " /dev/vg_guest/lv_data\n"
971 #: ../cat/virt-filesystems.pod:58
972 msgid "If you add I<--partitions> then partitions are shown instead of filesystems:"
976 #: ../cat/virt-filesystems.pod:60
979 " $ virt-filesystems -a disk.img --partitions\n"
986 #: ../cat/virt-filesystems.pod:64
988 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, "
989 "I<--physical-volumes>, I<--block-devices> to list those items."
993 #: ../cat/virt-filesystems.pod:67
995 "You can use these options in combination as well (if you want a combination "
996 "including filesystems, you have to add I<--filesystems>). Notice that some "
997 "items fall into several categories (eg. C</dev/sda1> might be both a "
998 "partition and a filesystem). These items are listed several times. To get "
999 "a list which includes absolutely everything that virt-filesystems knows "
1000 "about, use the I<--all> option."
1004 #: ../cat/virt-filesystems.pod:74
1006 "UUIDs (because they are quite long) are not shown by default. Add the "
1007 "I<--uuid> option to display device and filesystem UUIDs in the long output."
1011 #: ../cat/virt-filesystems.pod:78
1013 "I<--all --long --uuid> is a useful combination to display all possible "
1014 "information about everything."
1018 #: ../cat/virt-filesystems.pod:81
1021 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1022 " Name Type VFS Label Size Parent UUID\n"
1023 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1024 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1025 " /dev/sda1 partition - - 100M /dev/sda -\n"
1026 " /dev/sda2 partition - - 20G /dev/sda -\n"
1027 " /dev/sda device - - 20G - -\n"
1032 #: ../cat/virt-filesystems.pod:89
1033 msgid "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1037 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1042 #: ../cat/virt-filesystems.pod:112
1044 "Display everything. This is currently the same as specifying these options: "
1045 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, "
1046 "I<--logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may "
1047 "be added to this list in future)."
1051 #: ../cat/virt-filesystems.pod:117
1052 msgid "See also I<--long>."
1056 #: ../cat/virt-filesystems.pod:119
1057 msgid "B<--blkdevs>"
1061 #: ../cat/virt-filesystems.pod:121
1062 msgid "B<--block-devices>"
1066 #: ../cat/virt-filesystems.pod:123
1067 msgid "Display block devices."
1071 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1076 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1078 "Write out the results in CSV format (comma-separated values). This format "
1079 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1080 "ABOUT CSV FORMAT> below."
1084 #: ../cat/virt-filesystems.pod:150
1086 "When prompting for keys and passphrases, virt-filesystems normally turns "
1087 "echoing off so you cannot see what you are typing. If you are not worried "
1088 "about Tempest attacks and there is no one else in the room you can specify "
1089 "this flag to see what you are typing."
1093 #: ../cat/virt-filesystems.pod:155
1098 #: ../cat/virt-filesystems.pod:157
1100 "This causes filesystems that are not ordinary, mountable filesystems to be "
1101 "displayed. This category includes swapspace, and filesystems that are empty "
1102 "or contain unknown data."
1106 #: ../cat/virt-filesystems.pod:161
1107 msgid "This option implies I<--filesystems>."
1111 #: ../cat/virt-filesystems.pod:163
1112 msgid "B<--filesystems>"
1116 #: ../cat/virt-filesystems.pod:165
1118 "Display mountable filesystems. If no display option was selected then this "
1119 "option is implied."
1123 #: ../cat/virt-filesystems.pod:168
1124 msgid "With I<--extra>, non-mountable filesystems are shown too."
1128 #: ../cat/virt-filesystems.pod:181
1131 " virt-filesystems --format=raw -a disk.img\n"
1136 #: ../cat/virt-filesystems.pod:185
1139 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1144 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352 ../df/virt-df.pod:125 ../fish/guestfish.pod:156 ../tools/virt-list-partitions.pl:109
1149 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354 ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1150 msgid "B<--human-readable>"
1154 #: ../cat/virt-filesystems.pod:198
1155 msgid "In I<--long> mode, display sizes in human-readable format."
1159 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366 ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1164 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368 ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1169 #: ../cat/virt-filesystems.pod:209
1170 msgid "Display extra columns of data (\"long format\")."
1174 #: ../cat/virt-filesystems.pod:211
1175 msgid "A title row is added unless you also specify I<--no-title>."
1179 #: ../cat/virt-filesystems.pod:213
1181 "The extra columns displayed depend on what output you select, and the "
1182 "ordering of columns may change in future versions. Use the title row, "
1183 "I<--csv> output and/or L<csvtool(1)> to match columns to data in external "
1188 #: ../cat/virt-filesystems.pod:218
1190 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1191 "default is to show raw numbers of I<bytes>."
1195 #: ../cat/virt-filesystems.pod:221
1196 msgid "Use I<--uuid> to display UUIDs too."
1200 #: ../cat/virt-filesystems.pod:223
1205 #: ../cat/virt-filesystems.pod:225
1206 msgid "B<--logvols>"
1210 #: ../cat/virt-filesystems.pod:227
1211 msgid "B<--logical-volumes>"
1215 #: ../cat/virt-filesystems.pod:229
1217 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1218 "of whether the LVs contain filesystems."
1222 #: ../cat/virt-filesystems.pod:232
1223 msgid "B<--no-title>"
1227 #: ../cat/virt-filesystems.pod:234
1228 msgid "In I<--long> mode, don't add a title row."
1232 #: ../cat/virt-filesystems.pod:236
1234 "Note that the order of the columns is not fixed, and may change in future "
1235 "versions of virt-filesystems, so using this option may give you unexpected "
1240 #: ../cat/virt-filesystems.pod:240
1245 #: ../cat/virt-filesystems.pod:242
1246 msgid "B<--partitions>"
1250 #: ../cat/virt-filesystems.pod:244
1252 "Display partitions. In this mode, these are displayed irrespective of "
1253 "whether the partitions contain filesystems."
1257 #: ../cat/virt-filesystems.pod:247
1262 #: ../cat/virt-filesystems.pod:249
1263 msgid "B<--physvols>"
1267 #: ../cat/virt-filesystems.pod:251
1268 msgid "B<--physical-volumes>"
1272 #: ../cat/virt-filesystems.pod:253
1273 msgid "Display LVM physical volumes."
1277 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1282 #: ../cat/virt-filesystems.pod:257
1287 #: ../cat/virt-filesystems.pod:259
1288 msgid "In I<--long> mode, display UUIDs as well."
1292 #: ../cat/virt-filesystems.pod:273
1297 #: ../cat/virt-filesystems.pod:275
1298 msgid "B<--volgroups>"
1302 #: ../cat/virt-filesystems.pod:277
1303 msgid "B<--volume-groups>"
1307 #: ../cat/virt-filesystems.pod:279
1308 msgid "Display LVM volume groups."
1312 #: ../cat/virt-filesystems.pod:287
1317 #: ../cat/virt-filesystems.pod:289
1319 "Note that columns in the output are subject to reordering and change in "
1320 "future versions of this tool."
1324 #: ../cat/virt-filesystems.pod:294
1329 #: ../cat/virt-filesystems.pod:296
1330 msgid "The filesystem, partition, block device or LVM name."
1334 #: ../cat/virt-filesystems.pod:298
1336 "For device and partition names these are displayed as canonical libguestfs "
1337 "names, so that for example C</dev/sda2> is the second partition on the first "
1342 #: ../cat/virt-filesystems.pod:302
1344 "If the I<--long> option is B<not> specified, then only the name column is "
1345 "shown in the output."
1349 #: ../cat/virt-filesystems.pod:305
1354 #: ../cat/virt-filesystems.pod:307
1355 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1359 #: ../cat/virt-filesystems.pod:309
1364 #: ../cat/virt-filesystems.pod:311
1366 "If there is a filesystem, then this column displays the filesystem type if "
1367 "one could be detected, eg. C<ext4>."
1371 #: ../cat/virt-filesystems.pod:314
1376 #: ../cat/virt-filesystems.pod:316
1378 "If the object has a label (used for identifying and mounting filesystems) "
1379 "then this column contains the label."
1383 #: ../cat/virt-filesystems.pod:319
1388 #: ../cat/virt-filesystems.pod:321
1390 "The size of the object in bytes. If the I<--human> option is used then the "
1391 "size is displayed in a human-readable form."
1395 #: ../cat/virt-filesystems.pod:324
1400 #: ../cat/virt-filesystems.pod:326
1402 "The parent column records the parent relationship between objects. For "
1403 "example, if the object is a partition, then this column contains the name of "
1404 "the containing device. If the object is a logical volume, then this column "
1405 "is the name of the volume group."
1409 #: ../cat/virt-filesystems.pod:331
1414 #: ../cat/virt-filesystems.pod:333
1416 "If the object has a UUID (used for identifying and mounting filesystems and "
1417 "block devices) then this column contains the UUID as a string."
1421 #: ../cat/virt-filesystems.pod:337
1422 msgid "The UUID is only displayed if the I<--uuid> option is given."
1426 #: ../cat/virt-filesystems.pod:341 ../cat/virt-ls.pod:459 ../df/virt-df.pod:191
1427 msgid "NOTE ABOUT CSV FORMAT"
1431 #: ../cat/virt-filesystems.pod:343 ../cat/virt-ls.pod:461 ../df/virt-df.pod:193
1433 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
1434 "should be easy to parse, but it is definitely not easy to parse."
1438 #: ../cat/virt-filesystems.pod:346 ../cat/virt-ls.pod:464 ../df/virt-df.pod:196
1440 "Myth: Just split fields at commas. Reality: This does I<not> work "
1441 "reliably. This example has two columns:"
1445 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:467 ../df/virt-df.pod:199
1448 " \"foo,bar\",baz\n"
1453 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:469 ../df/virt-df.pod:201
1455 "Myth: Read the file one line at a time. Reality: This does I<not> work "
1456 "reliably. This example has one row:"
1460 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:472 ../df/virt-df.pod:204
1469 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:475 ../df/virt-df.pod:207
1471 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
1472 "packaged in major Linux distributions)."
1476 #: ../cat/virt-filesystems.pod:360 ../cat/virt-ls.pod:478 ../df/virt-df.pod:210
1478 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
1479 "or Python's built-in csv library)."
1483 #: ../cat/virt-filesystems.pod:363 ../cat/virt-ls.pod:481 ../df/virt-df.pod:213
1484 msgid "Most spreadsheets and databases can import CSV directly."
1488 #: ../cat/virt-filesystems.pod:379
1490 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
1491 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, "
1492 "L<http://libguestfs.org/>."
1496 #: ../cat/virt-filesystems.pod:394 ../tools/virt-make-fs.pl:570 ../tools/virt-win-reg.pl:778
1497 msgid "Copyright (C) 2010 Red Hat Inc."
1501 #: ../cat/virt-ls.pod:5
1502 msgid "virt-ls - List files in a virtual machine"
1506 #: ../cat/virt-ls.pod:9
1509 " virt-ls [--options] -d domname directory [directory ...]\n"
1514 #: ../cat/virt-ls.pod:11
1517 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory "
1523 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
1528 #: ../cat/virt-ls.pod:15
1531 " virt-ls [--options] domname directory\n"
1536 #: ../cat/virt-ls.pod:17
1539 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1544 #: ../cat/virt-ls.pod:21
1546 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1547 "more from a virtual machine or disk image."
1551 #: ../cat/virt-ls.pod:24
1553 "Multiple directory names can be given, in which case the output from each is "
1558 #: ../cat/virt-ls.pod:27
1560 "To list directories from a libvirt guest use the I<-d> option to specify the "
1561 "name of the guest. For a disk image, use the I<-a> option."
1565 #: ../cat/virt-ls.pod:31
1567 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1568 "may need to use L<guestfish(1)>, or write a program directly to the "
1569 "L<guestfs(3)> API."
1573 #: ../cat/virt-ls.pod:37
1574 msgid "Get a list of all files and directories in a virtual machine:"
1578 #: ../cat/virt-ls.pod:39
1581 " virt-ls -R -d guest /\n"
1586 #: ../cat/virt-ls.pod:41
1587 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1591 #: ../cat/virt-ls.pod:43
1594 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1599 #: ../cat/virt-ls.pod:45
1600 msgid "List all public-writable directories in a Linux virtual machine:"
1604 #: ../cat/virt-ls.pod:47
1607 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1612 #: ../cat/virt-ls.pod:49
1613 msgid "List all Unix domain sockets in a Linux virtual machine:"
1617 #: ../cat/virt-ls.pod:51
1620 " virt-ls -lR -d guest / | grep '^s'\n"
1625 #: ../cat/virt-ls.pod:53
1626 msgid "List all regular files with filenames ending in '.png':"
1630 #: ../cat/virt-ls.pod:55
1633 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1638 #: ../cat/virt-ls.pod:57
1639 msgid "To display files larger than 10MB in home directories:"
1643 #: ../cat/virt-ls.pod:59
1646 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1651 #: ../cat/virt-ls.pod:61
1652 msgid "Find everything modified in the last 7 days:"
1656 #: ../cat/virt-ls.pod:63
1659 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1664 #: ../cat/virt-ls.pod:65
1665 msgid "Find regular files modified in the last 24 hours:"
1669 #: ../cat/virt-ls.pod:67
1672 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
1677 #: ../cat/virt-ls.pod:69
1678 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
1682 #: ../cat/virt-ls.pod:71
1684 "Find the differences between files in a guest and an earlier snapshot of the "
1689 #: ../cat/virt-ls.pod:74
1692 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
1693 " virt-ls -lR -a current.img / --uids --time-t > new\n"
1694 " diff -u old new | less\n"
1699 #: ../cat/virt-ls.pod:78
1701 "The commands above won't find files where the content has changed but the "
1702 "metadata (eg. file size and modification date) is the same. To do that, you "
1703 "need to add the I<--checksum> parameter to both C<virt-ls> commands. "
1704 "I<--checksum> can be quite slow since it has to read and compute a checksum "
1705 "of every regular file in the virtual machine."
1709 #: ../cat/virt-ls.pod:84
1710 msgid "OUTPUT MODES"
1714 #: ../cat/virt-ls.pod:86
1716 "C<virt-ls> has four output modes, controlled by different combinations of "
1717 "the I<-l> and I<-R> options."
1721 #: ../cat/virt-ls.pod:89
1722 msgid "SIMPLE LISTING"
1726 #: ../cat/virt-ls.pod:91
1727 msgid "A simple listing is like the ordinary L<ls(1)> command:"
1731 #: ../cat/virt-ls.pod:93
1734 " $ virt-ls -d guest /\n"
1742 #: ../cat/virt-ls.pod:98
1743 msgid "LONG LISTING"
1747 #: ../cat/virt-ls.pod:100
1749 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
1750 "(more specifically, like the C<guestfs_ll> function)."
1754 #: ../cat/virt-ls.pod:103
1757 " $ virt-ls -l -d guest /\n"
1759 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
1760 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
1766 #: ../cat/virt-ls.pod:109
1768 "Note that while this is useful for displaying a directory, do not try "
1769 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
1774 #: ../cat/virt-ls.pod:113
1775 msgid "RECURSIVE LISTING"
1779 #: ../cat/virt-ls.pod:115
1781 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
1782 "and directories recursively:"
1786 #: ../cat/virt-ls.pod:118
1789 " $ virt-ls -R -d guest /tmp\n"
1797 #: ../cat/virt-ls.pod:123
1799 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
1800 "converts C<\\0> characters to C<\\n>."
1804 #: ../cat/virt-ls.pod:126
1805 msgid "RECURSIVE LONG LISTING"
1809 #: ../cat/virt-ls.pod:128
1811 "Using I<-lR> options together changes the output to display directories "
1812 "recursively, with file stats, and optionally other features such as "
1813 "checksums and extended attributes."
1817 #: ../cat/virt-ls.pod:132
1819 "Most of the interesting features of C<virt-ls> are only available when using "
1824 #: ../cat/virt-ls.pod:135
1826 "The fields are normally space-separated. Filenames are B<not> quoted, so "
1827 "you cannot use the output in another program (because filenames can contain "
1828 "spaces and other unsafe characters). If the guest was untrusted and someone "
1829 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
1830 "on you by creating filenames with embedded newline characters. To B<safely> "
1831 "parse the output in another program, use the I<--csv> (Comma-Separated "
1836 #: ../cat/virt-ls.pod:143
1838 "Note that this output format is completely unrelated to the C<ls -lR> "
1843 #: ../cat/virt-ls.pod:146
1846 " $ virt-ls -lR -d guest /bin\n"
1847 " d 0555 4096 /bin\n"
1848 " - 0755 123 /bin/alsaunmute\n"
1849 " - 0755 28328 /bin/arch\n"
1850 " l 0777 4 /bin/awk -> gawk\n"
1851 " - 0755 27216 /bin/basename\n"
1852 " - 0755 943360 /bin/bash\n"
1858 #: ../cat/virt-ls.pod:155
1859 msgid "These basic fields are always shown:"
1863 #: ../cat/virt-ls.pod:159
1868 #: ../cat/virt-ls.pod:161
1870 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
1871 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
1872 "link), C<s> (socket) or C<u> (unknown)."
1876 #: ../cat/virt-ls.pod:171
1881 #: ../cat/virt-ls.pod:173
1882 msgid "The Unix permissions, displayed as a 4 digit octal number."
1886 #: ../cat/virt-ls.pod:175
1891 #: ../cat/virt-ls.pod:177
1893 "The size of the file. This is shown in bytes unless I<-h> or "
1894 "I<--human-readable> option is given, in which case this is shown as a "
1895 "human-readable number."
1899 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4245
1904 #: ../cat/virt-ls.pod:183
1905 msgid "The full path of the file or directory."
1909 #: ../cat/virt-ls.pod:185
1914 #: ../cat/virt-ls.pod:187
1915 msgid "For symbolic links only, the link target."
1919 #: ../cat/virt-ls.pod:191
1921 "In I<-lR> mode, additional command line options enable the display of more "
1926 #: ../cat/virt-ls.pod:194
1928 "With the I<--uids> flag, these additional fields are displayed before the "
1933 #: ../cat/virt-ls.pod:199
1938 #: ../cat/virt-ls.pod:201
1943 #: ../cat/virt-ls.pod:203
1945 "The UID and GID of the owner of the file (displayed numerically). Note "
1946 "these only make sense in the context of a Unix-like guest."
1950 #: ../cat/virt-ls.pod:208
1951 msgid "With the I<--times> flag, these additional fields are displayed:"
1955 #: ../cat/virt-ls.pod:212
1960 #: ../cat/virt-ls.pod:214
1961 msgid "The time of last access."
1965 #: ../cat/virt-ls.pod:216
1970 #: ../cat/virt-ls.pod:218
1971 msgid "The time of last modification."
1975 #: ../cat/virt-ls.pod:220
1980 #: ../cat/virt-ls.pod:222
1981 msgid "The time of last status change."
1985 #: ../cat/virt-ls.pod:226
1987 "The time fields are displayed as string dates and times, unless one of the "
1988 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
1992 #: ../cat/virt-ls.pod:229
1993 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
1997 #: ../cat/virt-ls.pod:233
2002 #: ../cat/virt-ls.pod:235
2004 "The device containing the file (displayed as major:minor). This may not "
2005 "match devices as known to the guest."
2009 #: ../cat/virt-ls.pod:238
2014 #: ../cat/virt-ls.pod:240
2015 msgid "The inode number."
2019 #: ../cat/virt-ls.pod:242
2024 #: ../cat/virt-ls.pod:244
2025 msgid "The number of hard links."
2029 #: ../cat/virt-ls.pod:246
2034 #: ../cat/virt-ls.pod:248
2035 msgid "For block and char special files, the device (displayed as major:minor)."
2039 #: ../cat/virt-ls.pod:251
2044 #: ../cat/virt-ls.pod:253
2045 msgid "The number of 512 byte blocks allocated to the file."
2049 #: ../cat/virt-ls.pod:257
2051 "With the I<--checksum> flag, the checksum of the file contents is shown "
2052 "(only for regular files). Computing file checksums can take a considerable "
2057 #: ../cat/virt-ls.pod:280
2058 msgid "B<--checksum>"
2062 #: ../cat/virt-ls.pod:282
2063 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2067 #: ../cat/virt-ls.pod:284
2069 "Display checksum over file contents for regular files. With no argument, "
2070 "this defaults to using I<md5>. Using an argument, you can select the "
2071 "checksum type to use."
2075 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358 ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408 ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2077 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2082 #: ../cat/virt-ls.pod:316
2084 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2085 "so you cannot see what you are typing. If you are not worried about Tempest "
2086 "attacks and there is no one else in the room you can specify this flag to "
2087 "see what you are typing."
2091 #: ../cat/virt-ls.pod:321
2092 msgid "B<--extra-stats>"
2096 #: ../cat/virt-ls.pod:323
2097 msgid "Display extra stats."
2101 #: ../cat/virt-ls.pod:339
2104 " virt-ls --format=raw -a disk.img /dir\n"
2109 #: ../cat/virt-ls.pod:343
2112 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2117 #: ../cat/virt-ls.pod:356
2118 msgid "Display file sizes in human-readable format."
2122 #: ../cat/virt-ls.pod:370
2127 #: ../cat/virt-ls.pod:372
2128 msgid "B<--recursive>"
2132 #: ../cat/virt-ls.pod:374
2134 "Select the mode. With neither of these options, C<virt-ls> produces a "
2135 "simple, flat list of the files in the named directory. See L</SIMPLE "
2140 #: ../cat/virt-ls.pod:378
2142 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See "
2147 #: ../cat/virt-ls.pod:381
2149 "C<virt-ls -R> produces a recursive list of files starting at the named "
2150 "directory. See L</RECURSIVE LISTING>."
2154 #: ../cat/virt-ls.pod:384
2156 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2157 "parsed. See L</RECURSIVE LONG LISTING>."
2161 #: ../cat/virt-ls.pod:387
2166 #: ../cat/virt-ls.pod:389
2167 msgid "Display time fields."
2171 #: ../cat/virt-ls.pod:394
2172 msgid "B<--time-days>"
2176 #: ../cat/virt-ls.pod:396
2177 msgid "Display time fields as days before now (negative if in the future)."
2181 #: ../cat/virt-ls.pod:398
2183 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2184 "of the file is between 0 and 86399 seconds."
2188 #: ../cat/virt-ls.pod:404
2189 msgid "B<--time-relative>"
2193 #: ../cat/virt-ls.pod:406
2194 msgid "Display time fields as seconds before now (negative if in the future)."
2198 #: ../cat/virt-ls.pod:411
2203 #: ../cat/virt-ls.pod:413
2204 msgid "Display time fields as seconds since the Unix epoch."
2208 #: ../cat/virt-ls.pod:418
2213 #: ../cat/virt-ls.pod:420
2214 msgid "Display UID and GID fields."
2218 #: ../cat/virt-ls.pod:445
2219 msgid "Previous versions of virt-ls allowed you to write either:"
2223 #: ../cat/virt-ls.pod:447
2226 " virt-ls disk.img [disk.img ...] /dir\n"
2231 #: ../cat/virt-ls.pod:451
2234 " virt-ls guestname /dir\n"
2239 #: ../cat/virt-ls.pod:497
2241 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, "
2242 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
2243 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
2247 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374 ../rescue/virt-rescue.pod:302
2248 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2252 #: ../df/virt-df.pod:5
2253 msgid "virt-df - Display free space on virtual filesystems"
2257 #: ../df/virt-df.pod:9
2260 " virt-df [--options]\n"
2265 #: ../df/virt-df.pod:11
2268 " virt-df [--options] -d domname\n"
2273 #: ../df/virt-df.pod:13
2276 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
2281 #: ../df/virt-df.pod:17
2284 " virt-df [--options] domname\n"
2289 #: ../df/virt-df.pod:19
2292 " virt-df [--options] disk.img [disk.img ...]\n"
2297 #: ../df/virt-df.pod:23
2299 "C<virt-df> is a command line tool to display free space on virtual machine "
2300 "filesystems. Unlike other tools, it doesn't just display the size of disk "
2301 "allocated to a virtual machine, but can look inside disk images to see how "
2302 "much space is really being used."
2306 #: ../df/virt-df.pod:28
2308 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
2309 "to get a list of all active and inactive guests, and performs a C<df>-type "
2310 "operation on each one in turn, printing out the results."
2314 #: ../df/virt-df.pod:32
2316 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
2317 "C<df>-type operation on either the single named libvirt domain, or on the "
2318 "disk image(s) listed on the command line (which must all belong to a single "
2319 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
2320 "single guest>. If you want to run on multiple guests, then you have to "
2321 "invoke C<virt-df> multiple times."
2325 #: ../df/virt-df.pod:39
2327 "Use the I<--csv> option to get a format which can be easily parsed by other "
2328 "programs. Other options are similar to the standard L<df(1)> command."
2332 #: ../df/virt-df.pod:45
2334 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
2335 "output human-readable:"
2339 #: ../df/virt-df.pod:48
2342 " # virt-df -d F14x64 -h\n"
2343 " Filesystem Size Used Available Use%\n"
2344 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
2345 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
2350 #: ../df/virt-df.pod:53
2351 msgid "Show disk usage for a disk image file called C<test.img>:"
2355 #: ../df/virt-df.pod:55
2358 " $ virt-df -a test1.img\n"
2359 " Filesystem 1K-blocks Used Available Use%\n"
2360 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
2365 #: ../df/virt-df.pod:112
2368 " virt-df --format=raw -a disk.img\n"
2373 #: ../df/virt-df.pod:116
2376 " virt-df --format=raw -a disk.img --format -a another.img\n"
2381 #: ../df/virt-df.pod:129
2382 msgid "Print sizes in human-readable format."
2386 #: ../df/virt-df.pod:131
2387 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
2391 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:155
2396 #: ../df/virt-df.pod:135
2401 #: ../df/virt-df.pod:137
2402 msgid "Print inodes instead of blocks."
2406 #: ../df/virt-df.pod:139
2407 msgid "B<--one-per-guest>"
2411 #: ../df/virt-df.pod:141
2413 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
2414 "disks from several guests to a single libguestfs appliance."
2418 #: ../df/virt-df.pod:144
2419 msgid "You might use this option in the following circumstances:"
2423 #: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266 ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276 ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291 ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102 ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132 ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227 ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235 ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:398 ../fish/guestfish-actions.pod:405 ../fish/guestfish-actions.pod:412 ../fish/guestfish-actions.pod:1139 ../fish/guestfish-actions.pod:1143 ../fish/guestfish-actions.pod:1147 ../fish/guestfish-actions.pod:1151 ../fish/guestfish-actions.pod:1159 ../fish/guestfish-actions.pod:1163 ../fish/guestfish-actions.pod:1167 ../fish/guestfish-actions.pod:1177 ../fish/guestfish-actions.pod:1181 ../fish/guestfish-actions.pod:1185 ../fish/guestfish-actions.pod:1275 ../fish/guestfish-actions.pod:1279 ../fish/guestfish-actions.pod:1284 ../fish/guestfish-actions.pod:1289 ../fish/guestfish-actions.pod:1331 ../fish/guestfish-actions.pod:1335 ../fish/guestfish-actions.pod:1340 ../fish/guestfish-actions.pod:1596 ../fish/guestfish-actions.pod:1603 ../fish/guestfish-actions.pod:1610 ../fish/guestfish-actions.pod:2005 ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2019 ../fish/guestfish-actions.pod:2026 ../fish/guestfish-actions.pod:2033 ../fish/guestfish.pod:445 ../fish/guestfish.pod:449 ../fish/guestfish.pod:453 ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393 ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:282 ../resize/virt-resize.pod:286 ../resize/virt-resize.pod:295 ../resize/virt-resize.pod:301 ../sparsify/virt-sparsify.pod:32 ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43 ../sparsify/virt-sparsify.pod:49 ../sparsify/virt-sparsify.pod:54 ../sparsify/virt-sparsify.pod:58 ../sparsify/virt-sparsify.pod:64 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:588 ../src/guestfs-actions.pod:596 ../src/guestfs-actions.pod:603 ../src/guestfs-actions.pod:610 ../src/guestfs-actions.pod:1778 ../src/guestfs-actions.pod:1782 ../src/guestfs-actions.pod:1786 ../src/guestfs-actions.pod:1790 ../src/guestfs-actions.pod:1798 ../src/guestfs-actions.pod:1802 ../src/guestfs-actions.pod:1806 ../src/guestfs-actions.pod:1816 ../src/guestfs-actions.pod:1820 ../src/guestfs-actions.pod:1824 ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:1966 ../src/guestfs-actions.pod:1971 ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:2037 ../src/guestfs-actions.pod:2041 ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2461 ../src/guestfs-actions.pod:2468 ../src/guestfs-actions.pod:2475 ../src/guestfs-actions.pod:3012 ../src/guestfs-actions.pod:3018 ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3040 ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398 ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411 ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1094 ../src/guestfs.pod:1098 ../src/guestfs.pod:1102 ../src/guestfs.pod:1107 ../src/guestfs.pod:1115 ../src/guestfs.pod:1134 ../src/guestfs.pod:1142 ../src/guestfs.pod:1164 ../src/guestfs.pod:1168 ../src/guestfs.pod:1172 ../src/guestfs.pod:1176 ../src/guestfs.pod:1180 ../src/guestfs.pod:1184 ../src/guestfs.pod:1674 ../src/guestfs.pod:1679 ../src/guestfs.pod:1683 ../src/guestfs.pod:1785 ../src/guestfs.pod:1790 ../src/guestfs.pod:1794 ../src/guestfs.pod:1804 ../src/guestfs.pod:2093 ../src/guestfs.pod:2098 ../src/guestfs.pod:2104 ../src/guestfs.pod:2112 ../src/guestfs.pod:2559 ../src/guestfs.pod:2565 ../src/guestfs.pod:2570 ../src/guestfs.pod:2576 ../src/guestfs.pod:2971 ../src/guestfs.pod:2976 ../src/guestfs.pod:2980 ../src/guestfs.pod:2984 ../src/guestfs.pod:2988 ../src/guestfs.pod:3002 ../src/guestfs.pod:3007 ../src/guestfs.pod:3236 ../src/guestfs.pod:3240 ../src/guestfs.pod:3244 ../src/guestfs.pod:3248 ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:710 ../tools/virt-win-reg.pl:716 ../tools/virt-win-reg.pl:722
2428 #: ../df/virt-df.pod:150
2430 "If you think an untrusted guest might actively try to exploit the libguestfs "
2431 "appliance kernel, then this prevents one guest from interfering with the "
2432 "stats printed for another guest."
2436 #: ../df/virt-df.pod:156
2438 "If the kernel has a bug which stops it from accessing a filesystem in one "
2439 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
2440 "and report stats for further guests."
2444 #: ../df/virt-df.pod:165
2446 "Print UUIDs instead of names. This is useful for following a guest even "
2447 "when the guest is migrated or renamed, or when two guests happen to have the "
2452 #: ../df/virt-df.pod:169
2454 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
2455 "images, we still print the disk image name even when this option is "
2460 #: ../df/virt-df.pod:229
2462 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
2463 "L<http://libguestfs.org/>."
2467 #: ../edit/virt-edit.pod:5
2468 msgid "virt-edit - Edit a file in a virtual machine"
2472 #: ../edit/virt-edit.pod:9
2475 " virt-edit [--options] -d domname file [file ...]\n"
2480 #: ../edit/virt-edit.pod:11
2483 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
2488 #: ../edit/virt-edit.pod:13
2491 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
2496 #: ../edit/virt-edit.pod:17
2499 " virt-edit domname file\n"
2504 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
2507 " virt-edit disk.img [disk.img ...] file\n"
2512 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23 ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15 ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19 ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
2517 #: ../edit/virt-edit.pod:23
2519 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
2520 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
2521 "doing this, but doesn't catch all cases."
2525 #: ../edit/virt-edit.pod:29
2527 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
2528 "exists in the named virtual machine (or disk image)."
2532 #: ../edit/virt-edit.pod:32
2534 "Multiple filenames can be given, in which case they are each edited in "
2535 "turn. Each filename must be a full path, starting at the root directory "
2536 "(starting with '/')."
2540 #: ../edit/virt-edit.pod:36
2541 msgid "If you want to just view a file, use L<virt-cat(1)>."
2545 #: ../edit/virt-edit.pod:38
2547 "For more complex cases you should look at the L<guestfish(1)> tool (see "
2548 "L</USING GUESTFISH> below)."
2552 #: ../edit/virt-edit.pod:41
2554 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
2555 "that and much more."
2559 #: ../edit/virt-edit.pod:46
2560 msgid "Edit the named files interactively:"
2564 #: ../edit/virt-edit.pod:48
2567 " virt-edit -d mydomain /boot/grub/grub.conf\n"
2572 #: ../edit/virt-edit.pod:50
2575 " virt-edit -d mydomain /etc/passwd\n"
2580 #: ../edit/virt-edit.pod:52
2581 msgid "For Windows guests, some Windows paths are understood:"
2585 #: ../edit/virt-edit.pod:54
2588 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
2593 #: ../edit/virt-edit.pod:56
2595 "If Perl is installed, you can also edit files non-interactively (see "
2596 "L</NON-INTERACTIVE EDITING> below). To change the init default level to 5:"
2600 #: ../edit/virt-edit.pod:60
2603 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
2608 #: ../edit/virt-edit.pod:81
2609 msgid "B<-b> extension"
2613 #: ../edit/virt-edit.pod:83
2614 msgid "B<--backup> extension"
2618 #: ../edit/virt-edit.pod:85
2620 "Create a backup of the original file I<in the guest disk image>. The backup "
2621 "has the original filename with C<extension> added."
2625 #: ../edit/virt-edit.pod:88
2627 "Usually the first character of C<extension> would be a dot C<.> so you would "
2632 #: ../edit/virt-edit.pod:91
2635 " virt-edit -b .orig [etc]\n"
2640 #: ../edit/virt-edit.pod:93
2641 msgid "By default, no backup file is made."
2645 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181 ../fuse/guestmount.pod:96 ../inspector/virt-inspector.pod:74 ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78 ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
2650 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183 ../fuse/guestmount.pod:98 ../inspector/virt-inspector.pod:76 ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80 ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
2651 msgid "B<--connect URI>"
2655 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84 ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134 ../tools/virt-win-reg.pl:135
2657 "If you specify guest block devices directly, then libvirt is not used at "
2662 #: ../edit/virt-edit.pod:114
2664 "When prompting for keys and passphrases, virt-edit normally turns echoing "
2665 "off so you cannot see what you are typing. If you are not worried about "
2666 "Tempest attacks and there is no one else in the room you can specify this "
2667 "flag to see what you are typing."
2671 #: ../edit/virt-edit.pod:119
2676 #: ../edit/virt-edit.pod:121
2677 msgid "B<--expr> EXPR"
2681 #: ../edit/virt-edit.pod:123
2683 "Instead of launching the external editor, non-interactively apply the Perl "
2684 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
2689 #: ../edit/virt-edit.pod:127
2691 "Be careful to properly quote the expression to prevent it from being altered "
2696 #: ../edit/virt-edit.pod:130
2697 msgid "Note that this option is only available when Perl 5 is installed."
2701 #: ../edit/virt-edit.pod:132
2702 msgid "B<--format> raw|qcow2|..."
2706 #: ../edit/virt-edit.pod:143
2709 " virt-edit --format=raw -a disk.img file\n"
2714 #: ../edit/virt-edit.pod:147
2717 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
2722 #: ../edit/virt-edit.pod:181
2723 msgid "Previous versions of virt-edit allowed you to write either:"
2727 #: ../edit/virt-edit.pod:187
2730 " virt-edit guestname file\n"
2735 #: ../edit/virt-edit.pod:195
2736 msgid "NON-INTERACTIVE EDITING"
2740 #: ../edit/virt-edit.pod:197
2742 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
2743 "administrator can interactively edit the file."
2747 #: ../edit/virt-edit.pod:200
2749 "There are two ways also to use C<virt-edit> from scripts in order to make "
2750 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
2751 "like this, it's less error-prone to write scripts directly using the "
2752 "libguestfs API and Augeas for configuration file editing.)"
2756 #: ../edit/virt-edit.pod:206
2758 "The first method is to temporarily set C<$EDITOR> to any script or program "
2759 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
2760 "update C<tmpfile> in place however it likes."
2764 #: ../edit/virt-edit.pod:210
2766 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
2767 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
2768 "instances of C<foo> with C<bar> in a file:"
2772 #: ../edit/virt-edit.pod:214
2775 " virt-edit -d domname filename -e 's/foo/bar/'\n"
2780 #: ../edit/virt-edit.pod:216
2782 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
2783 "For example to delete root's password you could do:"
2787 #: ../edit/virt-edit.pod:219
2790 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
2795 #: ../edit/virt-edit.pod:221
2797 "What really happens is that the snippet is evaluated as a Perl expression "
2798 "for each line of the file. The line, including the final C<\\n>, is passed "
2799 "in C<$_> and the expression should update C<$_> or leave it unchanged."
2803 #: ../edit/virt-edit.pod:226
2805 "To delete a line, set C<$_> to the empty string. For example, to delete the "
2806 "C<apache> user account from the password file you can do:"
2810 #: ../edit/virt-edit.pod:229
2813 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
2818 #: ../edit/virt-edit.pod:231
2820 "To insert a line, prepend or append it to C<$_>. However appending lines to "
2821 "the end of the file is rather difficult this way since there is no concept "
2822 "of \"last line of the file\" - your expression just doesn't get called "
2823 "again. You might want to use the first method (setting C<$EDITOR>) if you "
2828 #: ../edit/virt-edit.pod:237
2830 "The variable C<$lineno> contains the current line number. As is "
2831 "traditional, the first line in the file is number C<1>."
2835 #: ../edit/virt-edit.pod:240
2837 "The return value from the expression is ignored, but the expression may call "
2838 "C<die> in order to abort the whole program, leaving the original file "
2843 #: ../edit/virt-edit.pod:244
2845 "Remember when matching the end of a line that C<$_> may contain the final "
2846 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
2847 "newline then neither of these. Thus to match or substitute some text at the "
2848 "end of a line, use this regular expression:"
2852 #: ../edit/virt-edit.pod:249
2855 " /some text(\\r?\\n)?$/\n"
2860 #: ../edit/virt-edit.pod:251
2862 "Alternately, use the perl C<chomp> function, being careful not to chomp "
2863 "C<$_> itself (since that would remove all newlines from the file):"
2867 #: ../edit/virt-edit.pod:255
2870 " my $m = $_; chomp $m; $m =~ /some text$/\n"
2875 #: ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
2876 msgid "WINDOWS PATHS"
2880 #: ../edit/virt-edit.pod:259
2882 "C<virt-edit> has a limited ability to understand Windows drive letters and "
2883 "paths (eg. C<E:\\foo\\bar.txt>)."
2887 #: ../edit/virt-edit.pod:262
2888 msgid "If and only if the guest is running Windows then:"
2892 #: ../edit/virt-edit.pod:268
2894 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
2895 "to the correct filesystem."
2899 #: ../edit/virt-edit.pod:273
2901 "Any backslash (C<\\>) characters in the path are replaced with forward "
2902 "slashes so that libguestfs can process it."
2906 #: ../edit/virt-edit.pod:278
2908 "The path is resolved case insensitively to locate the file that should be "
2913 #: ../edit/virt-edit.pod:283
2914 msgid "There are some known shortcomings:"
2918 #: ../edit/virt-edit.pod:289
2919 msgid "Some NTFS symbolic links may not be followed correctly."
2923 #: ../edit/virt-edit.pod:293
2924 msgid "NTFS junction points that cross filesystems are not followed."
2928 #: ../edit/virt-edit.pod:299
2930 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
2931 "C<virt-edit> doesn't work."
2935 #: ../edit/virt-edit.pod:302
2936 msgid "Using C<virt-edit> is approximately equivalent to doing:"
2940 #: ../edit/virt-edit.pod:304
2943 " guestfish --rw -i -d domname edit /file\n"
2948 #: ../edit/virt-edit.pod:306
2950 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
2955 #: ../edit/virt-edit.pod:309
2957 "The command above uses libguestfs's guest inspection feature and so does not "
2958 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
2959 "disk images that don't contain guests. To edit a file on a disk image "
2964 #: ../edit/virt-edit.pod:314
2967 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
2972 #: ../edit/virt-edit.pod:316
2974 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
2975 "the disk image to edit, and C</file> is the full path to the file."
2979 #: ../edit/virt-edit.pod:320
2981 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
2982 "C<write> or C<upload> instead:"
2986 #: ../edit/virt-edit.pod:323
2989 " guestfish --rw -i -d domname touch /newfile\n"
2994 #: ../edit/virt-edit.pod:325
2997 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
3002 #: ../edit/virt-edit.pod:327
3005 " guestfish --rw -i -d domname upload localfile /newfile\n"
3010 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1086 ../rescue/virt-rescue.pod:261 ../sparsify/virt-sparsify.pod:232 ../src/guestfs.pod:3118 ../test-tool/libguestfs-test-tool.pod:95
3011 msgid "ENVIRONMENT VARIABLES"
3015 #: ../edit/virt-edit.pod:333
3020 #: ../edit/virt-edit.pod:335
3022 "If set, this string is used as the editor. It may contain arguments, "
3023 "eg. C<\"emacs -nw\">"
3027 #: ../edit/virt-edit.pod:338
3028 msgid "If not set, C<vi> is used."
3032 #: ../edit/virt-edit.pod:356
3034 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
3035 "L<virt-tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
3036 "L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
3040 #: ../erlang/examples/guestfs-erlang.pod:5
3041 msgid "guestfs-erlang - How to use libguestfs from Erlang"
3045 #: ../erlang/examples/guestfs-erlang.pod:9
3048 " {ok, G} = guestfs:create(),\n"
3049 " ok = guestfs:add_drive_opts(G, Disk,\n"
3050 " [{format, \"raw\"}, {readonly, true}]),\n"
3051 " ok = guestfs:launch(G),\n"
3052 " [Device] = guestfs:list_devices(G),\n"
3053 " ok = guestfs:close(G).\n"
3058 #: ../erlang/examples/guestfs-erlang.pod:18
3060 "This manual page documents how to call libguestfs from the Erlang "
3061 "programming language. This page just documents the differences from the C "
3062 "API and gives some examples. If you are not familiar with using libguestfs, "
3063 "you also need to read L<guestfs(3)>."
3067 #: ../erlang/examples/guestfs-erlang.pod:23
3068 msgid "OPENING AND CLOSING THE HANDLE"
3072 #: ../erlang/examples/guestfs-erlang.pod:25
3074 "The Erlang bindings are implemented using an external program called "
3075 "C<erl-guestfs>. This program must be on the current PATH, or else you "
3076 "should specify the full path to the program:"
3080 #: ../erlang/examples/guestfs-erlang.pod:29
3083 " {ok, G} = guestfs:create().\n"
3088 #: ../erlang/examples/guestfs-erlang.pod:31
3091 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
3096 #: ../erlang/examples/guestfs-erlang.pod:33
3097 msgid "C<G> is the libguestfs handle which you should pass to other functions."
3101 #: ../erlang/examples/guestfs-erlang.pod:36
3102 msgid "To close the handle:"
3106 #: ../erlang/examples/guestfs-erlang.pod:38
3109 " ok = guestfs:close(G).\n"
3114 #: ../erlang/examples/guestfs-erlang.pod:40
3115 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
3119 #: ../erlang/examples/guestfs-erlang.pod:42
3121 "For functions that take optional arguments, the first arguments are the "
3122 "non-optional ones. The last argument is a list of tuples supplying the "
3123 "remaining optional arguments."
3127 #: ../erlang/examples/guestfs-erlang.pod:46
3130 " ok = guestfs:add_drive_opts(G, Disk,\n"
3131 " [{format, \"raw\"}, {readonly, true}]).\n"
3136 #: ../erlang/examples/guestfs-erlang.pod:49
3137 msgid "If the last argument would be an empty list, you can also omit it:"
3141 #: ../erlang/examples/guestfs-erlang.pod:51
3144 " ok = guestfs:add_drive_opts(G, Disk).\n"
3149 #: ../erlang/examples/guestfs-erlang.pod:53
3150 msgid "RETURN VALUES AND ERRORS"
3154 #: ../erlang/examples/guestfs-erlang.pod:55
3156 "On success, most functions return a C<Result> term (which could be a list, "
3157 "string, tuple etc.). If there is nothing for the function to return, then "
3158 "the atom C<ok> is returned."
3162 #: ../erlang/examples/guestfs-erlang.pod:59
3163 msgid "On error, you would see one of the following tuples:"
3167 #: ../erlang/examples/guestfs-erlang.pod:63
3168 msgid "C<{error, Msg, Errno}>"
3172 #: ../erlang/examples/guestfs-erlang.pod:65
3173 msgid "This indicates an ordinary error from the function."
3177 #: ../erlang/examples/guestfs-erlang.pod:67
3179 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
3184 #: ../erlang/examples/guestfs-erlang.pod:70
3185 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
3189 #: ../erlang/examples/guestfs-erlang.pod:72
3190 msgid "C<{unknown, Function}>"
3194 #: ../erlang/examples/guestfs-erlang.pod:74
3196 "This indicates that the function you called is not known. Generally this "
3197 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
3198 "which you should not do."
3202 #: ../erlang/examples/guestfs-erlang.pod:78
3203 msgid "C<Function> is the name of the unknown function."
3207 #: ../erlang/examples/guestfs-erlang.pod:80
3208 msgid "C<{unknownarg, Arg}>"
3212 #: ../erlang/examples/guestfs-erlang.pod:82
3214 "This indicates that you called a function with optional arguments, with an "
3215 "unknown argument name."
3219 #: ../erlang/examples/guestfs-erlang.pod:85
3220 msgid "C<Arg> is the name of the unknown argument."
3224 #: ../erlang/examples/guestfs-erlang.pod:89 ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37 ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31 ../python/examples/guestfs-python.pod:34 ../ruby/examples/guestfs-ruby.pod:28
3225 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
3229 #: ../erlang/examples/guestfs-erlang.pod:91 ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39 ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33 ../python/examples/guestfs-python.pod:36 ../ruby/examples/guestfs-ruby.pod:30
3234 #: ../erlang/examples/guestfs-erlang.pod:93 ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41 ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35 ../python/examples/guestfs-python.pod:38 ../ruby/examples/guestfs-ruby.pod:32
3235 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
3239 #: ../erlang/examples/guestfs-erlang.pod:95 ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43 ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37 ../python/examples/guestfs-python.pod:40 ../ruby/examples/guestfs-ruby.pod:34
3244 #: ../erlang/examples/guestfs-erlang.pod:99
3246 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, "
3247 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
3248 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://www.erlang.org/>. "
3249 "L<http://libguestfs.org/>."
3253 #: ../erlang/examples/guestfs-erlang.pod:110 ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397 ../fish/guestfish.pod:1262 ../fish/virt-copy-in.pod:60 ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58 ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:319 ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58 ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52 ../python/examples/guestfs-python.pod:54 ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3255 ../test-tool/libguestfs-test-tool.pod:106
3258 #: ../erlang/examples/guestfs-erlang.pod:112 ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399 ../fish/guestfish.pod:1264 ../fish/virt-copy-in.pod:62 ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60 ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:321 ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93 ../perl/examples/guestfs-perl.pod:54 ../python/examples/guestfs-python.pod:56 ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3257 ../test-tool/libguestfs-test-tool.pod:108
3259 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3263 #: ../erlang/examples/guestfs-erlang.pod:116 ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
3264 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
3268 #: ../erlang/examples/guestfs-erlang.pod:118 ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405 ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99 ../perl/examples/guestfs-perl.pod:60 ../python/examples/guestfs-python.pod:62 ../ruby/examples/guestfs-ruby.pod:56
3270 "The examples in this manual page may be freely copied, modified and "
3271 "distributed without any restrictions."
3275 #: ../erlang/examples/guestfs-erlang.pod:121 ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408 ../java/examples/guestfs-java.pod:69 ../ocaml/examples/guestfs-ocaml.pod:102 ../perl/examples/guestfs-perl.pod:63 ../python/examples/guestfs-python.pod:65 ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3264
3277 "This library is free software; you can redistribute it and/or modify it "
3278 "under the terms of the GNU Lesser General Public License as published by the "
3279 "Free Software Foundation; either version 2 of the License, or (at your "
3280 "option) any later version."
3284 #: ../erlang/examples/guestfs-erlang.pod:126 ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413 ../java/examples/guestfs-java.pod:74 ../ocaml/examples/guestfs-ocaml.pod:107 ../perl/examples/guestfs-perl.pod:68 ../python/examples/guestfs-python.pod:70 ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3269
3286 "This library is distributed in the hope that it will be useful, but WITHOUT "
3287 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3288 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3293 #: ../erlang/examples/guestfs-erlang.pod:131 ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418 ../java/examples/guestfs-java.pod:79 ../ocaml/examples/guestfs-ocaml.pod:112 ../perl/examples/guestfs-perl.pod:73 ../python/examples/guestfs-python.pod:75 ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3274
3295 "You should have received a copy of the GNU Lesser General Public License "
3296 "along with this library; if not, write to the Free Software Foundation, "
3297 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3301 #: ../examples/guestfs-examples.pod:5
3302 msgid "guestfs-examples - Examples of using libguestfs from C"
3306 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
3309 " #include <guestfs.h>\n"
3314 #: ../examples/guestfs-examples.pod:11
3317 " guestfs_h *g = guestfs_create ();\n"
3318 " guestfs_add_drive_ro (g, \"disk.img\");\n"
3319 " guestfs_launch (g);\n"
3324 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
3327 " cc prog.c -o prog -lguestfs\n"
3329 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
3334 #: ../examples/guestfs-examples.pod:21
3336 "This manual page contains examples of calling libguestfs from the C "
3337 "programming language. If you are not familiar with using libguestfs, you "
3338 "also need to read L<guestfs(3)>."
3342 #: ../examples/guestfs-examples.pod:35
3344 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
3345 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
3346 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
3350 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97 ../python/examples/guestfs-python.pod:60 ../ruby/examples/guestfs-ruby.pod:54
3351 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
3355 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
3360 #: ../examples/guestfs-recipes.pod:5
3362 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
3363 "here. The only way which works for both sorts of output is to just write "
3364 "the URL directly. Do NOT use L<...> for URLs."
3368 #: ../examples/guestfs-recipes.pod:9
3370 "We break with tradition here and don't use ALL CAPS for the section "
3371 "headings, as this makes them much easier to read."
3375 #: ../examples/guestfs-recipes.pod:16
3376 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
3380 #: ../examples/guestfs-recipes.pod:20
3382 "This page contains recipes for and links to things you can do using "
3383 "libguestfs, L<guestfish(1)> and the virt tools."
3387 #: ../examples/guestfs-recipes.pod:23
3388 msgid "Audit a virtual machine for setuid files"
3392 #: ../examples/guestfs-recipes.pod:25
3394 "The link below contains a small program which can be used to audit a Linux "
3395 "virtual machine to see what setuid and setgid files it contains."
3399 #: ../examples/guestfs-recipes.pod:28
3400 msgid "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-files/#content"
3404 #: ../examples/guestfs-recipes.pod:30
3405 msgid "Change the background image in a Windows XP VM"
3409 #: ../examples/guestfs-recipes.pod:32
3411 "The links below explain how to use L<guestfish(1)> to change the background "
3412 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
3413 "be substantially different for each version of Windows."
3417 #: ../examples/guestfs-recipes.pod:37
3419 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html "
3420 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
3424 #: ../examples/guestfs-recipes.pod:40
3425 msgid "Cloning a virtual machine (Linux)"
3429 #: ../examples/guestfs-recipes.pod:42
3431 "The guestfish technique described in the link below works well for most "
3432 "Linux VMs. Depending on the Linux distro you may need to change the paths "
3437 #: ../examples/guestfs-recipes.pod:46
3438 msgid "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/#content"
3442 #: ../examples/guestfs-recipes.pod:48
3444 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
3449 #: ../examples/guestfs-recipes.pod:51
3450 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
3454 #: ../examples/guestfs-recipes.pod:53
3455 msgid "Cloning a virtual machine (Windows)"
3459 #: ../examples/guestfs-recipes.pod:55
3461 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
3462 "straightforward. Currently there is code in the Aeolus Oz project which "
3463 "does this (using libguestfs). As part of our review of the virt-clone tool, "
3464 "we may add sysprepping ability."
3468 #: ../examples/guestfs-recipes.pod:60
3470 "https://github.com/clalancette/oz "
3471 "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
3475 #: ../examples/guestfs-recipes.pod:63
3476 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
3480 #: ../examples/guestfs-recipes.pod:65
3481 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
3485 #: ../examples/guestfs-recipes.pod:67
3488 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
3493 #: ../examples/guestfs-recipes.pod:69
3494 msgid "To export just a subdirectory, eg. C</files>, do:"
3498 #: ../examples/guestfs-recipes.pod:71
3501 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
3506 #: ../examples/guestfs-recipes.pod:73
3507 msgid "Create empty disk images"
3511 #: ../examples/guestfs-recipes.pod:75
3513 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
3514 "The useful guide below explains the options available."
3518 #: ../examples/guestfs-recipes.pod:78
3519 msgid "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/#content"
3523 #: ../examples/guestfs-recipes.pod:80
3524 msgid "Dump raw filesystem content from inside a disk image or VM"
3528 #: ../examples/guestfs-recipes.pod:82
3530 "You can use the L<guestfish(1)> C<download> command to extract the raw "
3531 "filesystem content from any filesystem in a disk image or a VM (even one "
3532 "which is encrypted or buried inside an LV):"
3536 #: ../examples/guestfs-recipes.pod:86
3539 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
3544 #: ../examples/guestfs-recipes.pod:88
3547 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
3552 #: ../examples/guestfs-recipes.pod:90
3553 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
3557 #: ../examples/guestfs-recipes.pod:92
3558 msgid "Edit grub configuration in a VM"
3562 #: ../examples/guestfs-recipes.pod:94
3563 msgid "You can use this to:"
3567 #: ../examples/guestfs-recipes.pod:100
3568 msgid "Fix a virtual machine that does not boot."
3572 #: ../examples/guestfs-recipes.pod:104
3573 msgid "Change which kernel is used to boot the VM."
3577 #: ../examples/guestfs-recipes.pod:108
3578 msgid "Change kernel command line options."
3582 #: ../examples/guestfs-recipes.pod:112
3583 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
3587 #: ../examples/guestfs-recipes.pod:114
3590 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
3595 #: ../examples/guestfs-recipes.pod:116
3597 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
3602 #: ../examples/guestfs-recipes.pod:119
3605 " virt-rescue -d BrokenGuest\n"
3610 #: ../examples/guestfs-recipes.pod:121
3611 msgid "Export any directory from a VM"
3615 #: ../examples/guestfs-recipes.pod:123
3616 msgid "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
3620 #: ../examples/guestfs-recipes.pod:126
3623 " virt-copy-out -d Guest /home .\n"
3628 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1327 ../fish/guestfish-actions.pod:1592 ../fish/guestfish-actions.pod:2001 ../src/guestfs-actions.pod:18 ../src/guestfs-actions.pod:2033 ../src/guestfs-actions.pod:2457 ../src/guestfs-actions.pod:3008 ../src/guestfs.pod:1670 ../tools/virt-win-reg.pl:706
3633 #: ../examples/guestfs-recipes.pod:134
3635 "The final dot of the command is not a printing error. It means we want to "
3636 "copy out to the current directory."
3640 #: ../examples/guestfs-recipes.pod:139
3641 msgid "This creates a directory called C<home> under the current directory."
3645 #: ../examples/guestfs-recipes.pod:143
3647 "If the guest is a Windows guest then you can use drive letters and "
3648 "backslashes, but you must prefix the path with C<win:> and quote it to "
3649 "protect it from the shell, like this:"
3653 #: ../examples/guestfs-recipes.pod:147
3656 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
3661 #: ../examples/guestfs-recipes.pod:149
3662 msgid "To get the output as a compressed tarball, do:"
3666 #: ../examples/guestfs-recipes.pod:151
3669 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
3674 #: ../examples/guestfs-recipes.pod:153
3676 "Although it sounds tempting, this is usually not a reliable way to get a "
3677 "backup from a running guest. See the entry in the FAQ: "
3678 "http://libguestfs.org/FAQ.html#backup"
3682 #: ../examples/guestfs-recipes.pod:157
3683 msgid "Find out which user is using the most space"
3687 #: ../examples/guestfs-recipes.pod:159
3689 "This simple script examines a Linux guest to find out which user is using "
3690 "the most space in their home directory:"
3694 #: ../examples/guestfs-recipes.pod:162
3702 #: ../examples/guestfs-recipes.pod:164
3710 #: ../examples/guestfs-recipes.pod:166
3719 #: ../examples/guestfs-recipes.pod:169
3722 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
3727 #: ../examples/guestfs-recipes.pod:171
3730 " for d in $(guestfish --remote ls \"$dir\"); do\n"
3731 " echo -n \"$dir/$d\"\n"
3733 " guestfish --remote du \"$dir/$d\";\n"
3734 " done | sort -nr -k 2\n"
3739 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
3742 " guestfish --remote exit\n"
3747 #: ../examples/guestfs-recipes.pod:179
3748 msgid "Get DHCP address from a VM"
3752 #: ../examples/guestfs-recipes.pod:181
3754 "The link below explains the many different possible techniques for getting "
3755 "the last assigned DHCP address of a virtual machine."
3759 #: ../examples/guestfs-recipes.pod:184
3760 msgid "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-a-virtual-machine-disk-image/#content"
3764 #: ../examples/guestfs-recipes.pod:186
3766 "In the libguestfs source examples directory you will find the latest version "
3767 "of the C<virt-dhcp-address.c> program."
3771 #: ../examples/guestfs-recipes.pod:189
3772 msgid "Get the operating system product name string"
3776 #: ../examples/guestfs-recipes.pod:191
3777 msgid "Save the following script into a file called C<product-name.sh>:"
3781 #: ../examples/guestfs-recipes.pod:193
3786 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
3787 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
3788 " guestfish --remote inspect-get-product-name \"$root\"\n"
3789 " guestfish --remote exit\n"
3794 #: ../examples/guestfs-recipes.pod:200
3795 msgid "Make the script executable and run it on a named guest:"
3799 #: ../examples/guestfs-recipes.pod:202
3802 " # product-name.sh RHEL60x64\n"
3803 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
3808 #: ../examples/guestfs-recipes.pod:205
3810 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
3811 "C<xpath> command line tool or from your favourite programming language:"
3815 #: ../examples/guestfs-recipes.pod:209
3818 " # virt-inspector RHEL60x64 > xml\n"
3819 " # xpath '//product_name' < xml\n"
3822 " <product_name>Red Hat Enterprise Linux Server release 6.0 "
3823 "(Santiago)</product_name>\n"
3828 #: ../examples/guestfs-recipes.pod:215
3829 msgid "Get the default boot kernel for a Linux VM"
3833 #: ../examples/guestfs-recipes.pod:217
3835 "The link below contains a program to print the default boot kernel for a "
3840 #: ../examples/guestfs-recipes.pod:220
3841 msgid "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-kernel-for-a-vm/#content"
3845 #: ../examples/guestfs-recipes.pod:222
3847 "It uses Augeas, and the technique is generally applicable for many different "
3852 #: ../examples/guestfs-recipes.pod:229
3853 msgid "listing the user accounts in the guest"
3857 #: ../examples/guestfs-recipes.pod:233
3858 msgid "what repositories is it configured to use"
3862 #: ../examples/guestfs-recipes.pod:237
3863 msgid "what NTP servers does it connect to"
3867 #: ../examples/guestfs-recipes.pod:241
3868 msgid "what were the boot messages last time it booted"
3872 #: ../examples/guestfs-recipes.pod:245
3873 msgid "listing who was logged in recently"
3877 #: ../examples/guestfs-recipes.pod:249
3878 msgid "http://augeas.net/"
3882 #: ../examples/guestfs-recipes.pod:251
3883 msgid "Install RPMs in a guest"
3887 #: ../examples/guestfs-recipes.pod:253
3889 "The link below contains a method to install RPMs in a guest. In fact the "
3890 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
3891 "installs them next time the guest is booted. You could use this technique "
3892 "to install vital security updates in an offline guest."
3896 #: ../examples/guestfs-recipes.pod:259
3897 msgid "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
3901 #: ../examples/guestfs-recipes.pod:261
3902 msgid "List applications installed in a VM"
3906 #: ../examples/guestfs-recipes.pod:263
3907 msgid "Save the following to a file C<list-apps.sh>:"
3911 #: ../examples/guestfs-recipes.pod:265
3916 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
3917 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
3918 " guestfish --remote inspect-list-applications \"$root\"\n"
3919 " guestfish --remote exit\n"
3924 #: ../examples/guestfs-recipes.pod:272
3926 "Make the file executable and then you can run it on any named virtual "
3931 #: ../examples/guestfs-recipes.pod:275
3934 " # list-apps.sh WinGuest\n"
3936 " app_name: Mozilla Firefox (3.6.12)\n"
3937 " app_display_name: Mozilla Firefox (3.6.12)\n"
3939 " app_version: 3.6.12 (en-GB)\n"
3941 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
3942 " app_trans_path:\n"
3943 " app_publisher: Mozilla\n"
3944 " app_url: http://www.mozilla.com/en-GB/\n"
3945 " app_source_package:\n"
3947 " app_description: Mozilla Firefox\n"
3950 " app_name: VLC media player\n"
3951 " app_display_name: VLC media player 1.1.5\n"
3953 " app_version: 1.1.5\n"
3955 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
3956 " app_trans_path:\n"
3957 " app_publisher: VideoLAN\n"
3958 " app_url: http://www.videolan.org/\n"
3959 " app_source_package:\n"
3961 " app_description:\n"
3967 #: ../examples/guestfs-recipes.pod:305
3969 "If you want to run the script on disk images (instead of libvirt virtual "
3970 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also "
3971 "L<virt-inspector(1)>."
3975 #: ../examples/guestfs-recipes.pod:309
3976 msgid "List files and directories in a VM"
3980 #: ../examples/guestfs-recipes.pod:311
3981 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
3985 #: ../examples/guestfs-recipes.pod:313
3988 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
3993 #: ../examples/guestfs-recipes.pod:315
3994 msgid "List services in a Windows VM"
3998 #: ../examples/guestfs-recipes.pod:317
4000 "The link below contains a script that can be used to list out the services "
4001 "from a Windows VM, and whether those services run at boot time or are loaded "
4006 #: ../examples/guestfs-recipes.pod:321
4007 msgid "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/#content"
4011 #: ../examples/guestfs-recipes.pod:323
4012 msgid "Make a disk image sparse"
4016 #: ../examples/guestfs-recipes.pod:325
4018 "The link below contains some guides for making a disk image sparse (or "
4019 "reintroducing sparseness)."
4023 #: ../examples/guestfs-recipes.pod:328
4024 msgid "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
4028 #: ../examples/guestfs-recipes.pod:330
4029 msgid "Monitor disk usage over time"
4033 #: ../examples/guestfs-recipes.pod:332
4035 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
4036 "The link below contains a guide."
4040 #: ../examples/guestfs-recipes.pod:335
4041 msgid "http://virt-tools.org/learning/advanced-virt-df/"
4045 #: ../examples/guestfs-recipes.pod:337
4046 msgid "Reading the Windows Event Log from Windows Vista (or later)"
4050 #: ../examples/guestfs-recipes.pod:339
4052 "L<guestfish(1)> plus the tools described in the link below can be used to "
4053 "read out the Windows Event Log from any virtual machine running Windows "
4054 "Vista or a later version."
4058 #: ../examples/guestfs-recipes.pod:343
4059 msgid "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-guestfish/#content"
4063 #: ../examples/guestfs-recipes.pod:345
4064 msgid "Remove root password (Linux)"
4068 #: ../examples/guestfs-recipes.pod:347
4070 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
4071 "files. One use is to remove the root password from a Linux guest:"
4075 #: ../examples/guestfs-recipes.pod:350
4078 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
4083 #: ../examples/guestfs-recipes.pod:352
4084 msgid "Remove Administrator password (Windows)"
4088 #: ../examples/guestfs-recipes.pod:354
4090 "The link below contains one technique for removing the Administrator "
4091 "password from a Windows VM, or to be more precise, it gives you a command "
4092 "prompt the next time you log in which you can use to bypass any security:"
4096 #: ../examples/guestfs-recipes.pod:359
4097 msgid "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-administrator-password-with-guestfish/"
4101 #: ../examples/guestfs-recipes.pod:361
4102 msgid "Unpack a live CD"
4106 #: ../examples/guestfs-recipes.pod:363
4108 "Linux live CDs often contain multiple layers of disk images wrapped like a "
4109 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
4110 "layers, as outlined in the guide below."
4114 #: ../examples/guestfs-recipes.pod:367
4115 msgid "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-cd/#content"
4119 #: ../examples/guestfs-recipes.pod:369
4120 msgid "Uploading and downloading files"
4124 #: ../examples/guestfs-recipes.pod:371
4126 "The link below contains general tips on uploading (copying in) and "
4127 "downloading (copying out) files from VMs."
4131 #: ../examples/guestfs-recipes.pod:374
4132 msgid "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
4136 #: ../examples/guestfs-recipes.pod:376
4137 msgid "Use libguestfs tools on VMware ESX guests"
4141 #: ../examples/guestfs-recipes.pod:378
4143 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
4144 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
4148 #: ../examples/guestfs-recipes.pod:382
4149 msgid "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-guests/#content"
4153 #: ../examples/guestfs-recipes.pod:386
4155 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, "
4156 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
4157 "L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
4158 "L<http://libguestfs.org/>."
4162 #: ../examples/guestfs-recipes.pod:403
4163 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
4167 #: ../fish/guestfish-actions.pod:1
4172 #: ../fish/guestfish-actions.pod:3
4175 " add-cdrom filename\n"
4180 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
4181 msgid "This function adds a virtual CD-ROM disk image to the guest."
4185 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
4186 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
4190 #: ../fish/guestfish-actions.pod:15
4192 "This call checks for the existence of C<filename>. This stops you from "
4193 "specifying other types of drive which are supported by qemu such as C<nbd:> "
4194 "and C<http:> URLs. To specify those, use the general L</config> call "
4199 #: ../fish/guestfish-actions.pod:22
4201 "If you just want to add an ISO file (often you use this as an efficient way "
4202 "to transfer large files into the guest), then you should probably use "
4203 "L</add-drive-ro> instead."
4207 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:163 ../fish/guestfish-actions.pod:177
4209 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
4214 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:166 ../fish/guestfish-actions.pod:180 ../fish/guestfish-actions.pod:1026 ../fish/guestfish-actions.pod:1386 ../fish/guestfish-actions.pod:1400 ../fish/guestfish-actions.pod:3157 ../fish/guestfish-actions.pod:3468 ../fish/guestfish-actions.pod:3516 ../fish/guestfish-actions.pod:4429 ../fish/guestfish-actions.pod:4452 ../fish/guestfish-actions.pod:4474 ../fish/guestfish-actions.pod:4512 ../fish/guestfish-actions.pod:5161 ../fish/guestfish-actions.pod:5267 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273 ../src/guestfs-actions.pod:1619 ../src/guestfs-actions.pod:2118 ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:4771 ../src/guestfs-actions.pod:5293 ../src/guestfs-actions.pod:5393 ../src/guestfs-actions.pod:6675 ../src/guestfs-actions.pod:6719 ../src/guestfs-actions.pod:6753 ../src/guestfs-actions.pod:6816 ../src/guestfs-actions.pod:7748 ../src/guestfs-actions.pod:7857 ../src/guestfs-actions.pod:8040
4216 "Deprecated functions will not be removed from the API, but the fact that "
4217 "they are deprecated indicates that there are problems with correct use of "
4222 #: ../fish/guestfish-actions.pod:35
4227 #: ../fish/guestfish-actions.pod:37
4232 #: ../fish/guestfish-actions.pod:39
4235 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] "
4241 #: ../fish/guestfish-actions.pod:41
4243 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
4244 "It works by connecting to libvirt, requesting the domain and domain XML from "
4245 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
4249 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:64
4251 "The number of disks added is returned. This operation is atomic: if an "
4252 "error is returned, then no disks are added."
4256 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:67
4258 "This function does some minimal checks to make sure the libvirt domain is "
4259 "not running (unless C<readonly> is true). In a future version we will try "
4260 "to acquire the libvirt lock on each disk."
4264 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:71
4266 "Disks must be accessible locally. This often means that adding disks from a "
4267 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
4268 "unless those disks are accessible via the same device path locally too."
4272 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:76
4274 "The optional C<libvirturi> parameter sets the libvirt URI (see "
4275 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
4276 "default libvirt URI (or one set through an environment variable, see the "
4277 "libvirt documentation for full details)."
4281 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:82
4283 "The optional C<live> flag controls whether this call will try to connect to "
4284 "a running virtual machine C<guestfsd> process if it sees a suitable "
4285 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
4286 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
4287 "DAEMONS> for more information."
4291 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:89
4293 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
4294 "passed instead of the domain name. The C<dom> string is treated as a UUID "
4295 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
4300 #: ../fish/guestfish-actions.pod:76
4302 "The other optional parameters are passed directly through to "
4303 "L</add-drive-opts>."
4307 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143 ../fish/guestfish-actions.pod:573 ../fish/guestfish-actions.pod:784 ../fish/guestfish-actions.pod:805 ../fish/guestfish-actions.pod:2040 ../fish/guestfish-actions.pod:3206 ../fish/guestfish-actions.pod:3369 ../fish/guestfish-actions.pod:3504
4309 "This command has one or more optional arguments. See L</OPTIONAL "
4314 #: ../fish/guestfish-actions.pod:81
4319 #: ../fish/guestfish-actions.pod:83
4322 " add-drive filename\n"
4327 #: ../fish/guestfish-actions.pod:85
4329 "This function is the equivalent of calling L</add-drive-opts> with no "
4330 "optional parameters, so the disk is added writable, with the format being "
4331 "detected automatically."
4335 #: ../fish/guestfish-actions.pod:89
4337 "Automatic detection of the format opens you up to a potential security hole "
4338 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4339 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4340 "you should think about replacing calls to this function with calls to "
4341 "L</add-drive-opts>, and specifying the format."
4345 #: ../fish/guestfish-actions.pod:96
4346 msgid "add-drive-opts"
4350 #: ../fish/guestfish-actions.pod:98
4355 #: ../fish/guestfish-actions.pod:100
4358 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
4363 #: ../fish/guestfish-actions.pod:102 ../src/guestfs-actions.pod:160
4365 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4366 "The first time you call this function, the disk appears as C</dev/sda>, the "
4367 "second time as C</dev/sdb>, and so on."
4371 #: ../fish/guestfish-actions.pod:107 ../src/guestfs-actions.pod:165
4373 "You don't necessarily need to be root when using libguestfs. However you "
4374 "obviously do need sufficient permissions to access the filename for whatever "
4375 "operations you want to perform (ie. read access if you just want to read the "
4376 "image or write access if you want to modify the image)."
4380 #: ../fish/guestfish-actions.pod:113 ../src/guestfs-actions.pod:171
4381 msgid "This call checks that C<filename> exists."
4385 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3168 ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4808
4386 msgid "The optional arguments are:"
4390 #: ../fish/guestfish-actions.pod:119 ../src/guestfs-actions.pod:177
4395 #: ../fish/guestfish-actions.pod:121 ../src/guestfs-actions.pod:179
4397 "If true then the image is treated as read-only. Writes are still allowed, "
4398 "but they are stored in a temporary snapshot overlay which is discarded at "
4399 "the end. The disk that you add is not modified."
4403 #: ../fish/guestfish-actions.pod:125 ../src/guestfs-actions.pod:183
4408 #: ../fish/guestfish-actions.pod:127
4410 "This forces the image format. If you omit this (or use L</add-drive> or "
4411 "L</add-drive-ro>) then the format is automatically detected. Possible "
4412 "formats include C<raw> and C<qcow2>."
4416 #: ../fish/guestfish-actions.pod:131 ../src/guestfs-actions.pod:189
4418 "Automatic detection of the format opens you up to a potential security hole "
4419 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4420 "RHBZ#642934. Specifying the format closes this security hole."
4424 #: ../fish/guestfish-actions.pod:136 ../src/guestfs-actions.pod:194
4429 #: ../fish/guestfish-actions.pod:138
4431 "This rarely-used option lets you emulate the behaviour of the deprecated "
4432 "L</add-drive-with-if> call (q.v.)"
4436 #: ../fish/guestfish-actions.pod:145
4437 msgid "add-drive-ro"
4441 #: ../fish/guestfish-actions.pod:147
4446 #: ../fish/guestfish-actions.pod:149
4449 " add-drive-ro filename\n"
4454 #: ../fish/guestfish-actions.pod:151
4456 "This function is the equivalent of calling L</add-drive-opts> with the "
4457 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
4458 "is added read-only, with the format being detected automatically."
4462 #: ../fish/guestfish-actions.pod:156
4463 msgid "add-drive-ro-with-if"
4467 #: ../fish/guestfish-actions.pod:158
4470 " add-drive-ro-with-if filename iface\n"
4475 #: ../fish/guestfish-actions.pod:160
4477 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
4478 "interface emulation to use at run time."
4482 #: ../fish/guestfish-actions.pod:170
4483 msgid "add-drive-with-if"
4487 #: ../fish/guestfish-actions.pod:172
4490 " add-drive-with-if filename iface\n"
4495 #: ../fish/guestfish-actions.pod:174
4497 "This is the same as L</add-drive> but it allows you to specify the QEMU "
4498 "interface emulation to use at run time."
4502 #: ../fish/guestfish-actions.pod:184
4507 #: ../fish/guestfish-actions.pod:186
4510 " aug-clear augpath\n"
4515 #: ../fish/guestfish-actions.pod:188 ../src/guestfs-actions.pod:290
4517 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4518 "L<augtool(1)> C<clear> command."
4522 #: ../fish/guestfish-actions.pod:191
4527 #: ../fish/guestfish-actions.pod:193
4535 #: ../fish/guestfish-actions.pod:195
4537 "Close the current Augeas handle and free up any resources used by it. After "
4538 "calling this, you have to call L</aug-init> again before you can use any "
4539 "other Augeas functions."
4543 #: ../fish/guestfish-actions.pod:200
4548 #: ../fish/guestfish-actions.pod:202
4551 " aug-defnode name expr val\n"
4556 #: ../fish/guestfish-actions.pod:204 ../src/guestfs-actions.pod:319
4557 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4561 #: ../fish/guestfish-actions.pod:207
4563 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4564 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
4565 "containing that single node."
4569 #: ../fish/guestfish-actions.pod:211 ../src/guestfs-actions.pod:326
4571 "On success this returns a pair containing the number of nodes in the "
4572 "nodeset, and a boolean flag if a node was created."
4576 #: ../fish/guestfish-actions.pod:215
4581 #: ../fish/guestfish-actions.pod:217
4584 " aug-defvar name expr\n"
4589 #: ../fish/guestfish-actions.pod:219 ../src/guestfs-actions.pod:343
4591 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4592 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4596 #: ../fish/guestfish-actions.pod:223 ../src/guestfs-actions.pod:347
4598 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4599 "evaluates to something which is not a nodeset."
4603 #: ../fish/guestfish-actions.pod:226
4608 #: ../fish/guestfish-actions.pod:228
4611 " aug-get augpath\n"
4616 #: ../fish/guestfish-actions.pod:230 ../src/guestfs-actions.pod:360
4618 "Look up the value associated with C<path>. If C<path> matches exactly one "
4619 "node, the C<value> is returned."
4623 #: ../fish/guestfish-actions.pod:233
4628 #: ../fish/guestfish-actions.pod:235
4631 " aug-init root flags\n"
4636 #: ../fish/guestfish-actions.pod:237 ../src/guestfs-actions.pod:375
4638 "Create a new Augeas handle for editing configuration files. If there was "
4639 "any previous Augeas handle associated with this guestfs session, then it is "
4644 #: ../fish/guestfish-actions.pod:241
4645 msgid "You must call this before using any other L</aug-*> commands."
4649 #: ../fish/guestfish-actions.pod:244 ../src/guestfs-actions.pod:382
4650 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4654 #: ../fish/guestfish-actions.pod:247 ../src/guestfs-actions.pod:385
4656 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4657 "logical I<or> of the following integers:"
4661 #: ../fish/guestfish-actions.pod:253 ../src/guestfs-actions.pod:391
4662 msgid "C<AUG_SAVE_BACKUP> = 1"
4666 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:393
4667 msgid "Keep the original file with a C<.augsave> extension."
4671 #: ../fish/guestfish-actions.pod:257 ../src/guestfs-actions.pod:395
4672 msgid "C<AUG_SAVE_NEWFILE> = 2"
4676 #: ../fish/guestfish-actions.pod:259 ../src/guestfs-actions.pod:397
4678 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4679 "original. Overrides C<AUG_SAVE_BACKUP>."
4683 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:400
4684 msgid "C<AUG_TYPE_CHECK> = 4"
4688 #: ../fish/guestfish-actions.pod:264 ../src/guestfs-actions.pod:402
4689 msgid "Typecheck lenses."
4693 #: ../fish/guestfish-actions.pod:266
4695 "This option is only useful when debugging Augeas lenses. Use of this option "
4696 "may require additional memory for the libguestfs appliance. You may need to "
4697 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
4701 #: ../fish/guestfish-actions.pod:271 ../src/guestfs-actions.pod:409
4702 msgid "C<AUG_NO_STDINC> = 8"
4706 #: ../fish/guestfish-actions.pod:273 ../src/guestfs-actions.pod:411
4707 msgid "Do not use standard load path for modules."
4711 #: ../fish/guestfish-actions.pod:275 ../src/guestfs-actions.pod:413
4712 msgid "C<AUG_SAVE_NOOP> = 16"
4716 #: ../fish/guestfish-actions.pod:277 ../src/guestfs-actions.pod:415
4717 msgid "Make save a no-op, just record what would have been changed."
4721 #: ../fish/guestfish-actions.pod:279 ../src/guestfs-actions.pod:417
4722 msgid "C<AUG_NO_LOAD> = 32"
4726 #: ../fish/guestfish-actions.pod:281
4727 msgid "Do not load the tree in L</aug-init>."
4731 #: ../fish/guestfish-actions.pod:285
4732 msgid "To close the handle, you can call L</aug-close>."
4736 #: ../fish/guestfish-actions.pod:287 ../src/guestfs-actions.pod:425
4737 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4741 #: ../fish/guestfish-actions.pod:289
4746 #: ../fish/guestfish-actions.pod:291
4749 " aug-insert augpath label true|false\n"
4754 #: ../fish/guestfish-actions.pod:293 ../src/guestfs-actions.pod:439
4756 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4757 "or after C<path> (depending on the boolean flag C<before>)."
4761 #: ../fish/guestfish-actions.pod:297 ../src/guestfs-actions.pod:443
4763 "C<path> must match exactly one existing node in the tree, and C<label> must "
4764 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4768 #: ../fish/guestfish-actions.pod:301
4773 #: ../fish/guestfish-actions.pod:303
4781 #: ../fish/guestfish-actions.pod:305 ../src/guestfs-actions.pod:456
4782 msgid "Load files into the tree."
4786 #: ../fish/guestfish-actions.pod:307 ../src/guestfs-actions.pod:458
4787 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4791 #: ../fish/guestfish-actions.pod:310
4796 #: ../fish/guestfish-actions.pod:312
4804 #: ../fish/guestfish-actions.pod:314
4806 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
4807 "resulting nodes into alphabetical order."
4811 #: ../fish/guestfish-actions.pod:317
4816 #: ../fish/guestfish-actions.pod:319
4819 " aug-match augpath\n"
4824 #: ../fish/guestfish-actions.pod:321 ../src/guestfs-actions.pod:486
4826 "Returns a list of paths which match the path expression C<path>. The "
4827 "returned paths are sufficiently qualified so that they match exactly one "
4828 "node in the current tree."
4832 #: ../fish/guestfish-actions.pod:325
4837 #: ../fish/guestfish-actions.pod:327
4840 " aug-mv src dest\n"
4845 #: ../fish/guestfish-actions.pod:329 ../src/guestfs-actions.pod:503
4847 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4848 "C<dest> is overwritten if it exists."
4852 #: ../fish/guestfish-actions.pod:332
4857 #: ../fish/guestfish-actions.pod:334
4865 #: ../fish/guestfish-actions.pod:336 ../src/guestfs-actions.pod:516
4866 msgid "Remove C<path> and all of its children."
4870 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:518
4871 msgid "On success this returns the number of entries which were removed."
4875 #: ../fish/guestfish-actions.pod:340
4880 #: ../fish/guestfish-actions.pod:342
4888 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:529
4889 msgid "This writes all pending changes to disk."
4893 #: ../fish/guestfish-actions.pod:346
4895 "The flags which were passed to L</aug-init> affect exactly how files are "
4900 #: ../fish/guestfish-actions.pod:349
4905 #: ../fish/guestfish-actions.pod:351
4908 " aug-set augpath val\n"
4913 #: ../fish/guestfish-actions.pod:353 ../src/guestfs-actions.pod:545
4914 msgid "Set the value associated with C<path> to C<val>."
4918 #: ../fish/guestfish-actions.pod:355
4920 "In the Augeas API, it is possible to clear a node by setting the value to "
4921 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4922 "this call. Instead you must use the L</aug-clear> call."
4926 #: ../fish/guestfish-actions.pod:360
4931 #: ../fish/guestfish-actions.pod:362
4934 " available 'groups ...'\n"
4939 #: ../fish/guestfish-actions.pod:364 ../src/guestfs-actions.pod:562
4941 "This command is used to check the availability of some groups of "
4942 "functionality in the appliance, which not all builds of the libguestfs "
4943 "appliance will be able to provide."
4947 #: ../fish/guestfish-actions.pod:368
4949 "The libguestfs groups, and the functions that those groups correspond to, "
4950 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4951 "runtime by calling L</available-all-groups>."
4955 #: ../fish/guestfish-actions.pod:373 ../src/guestfs-actions.pod:571
4957 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
4958 "\"augeas\"]> would check for the availability of the Linux inotify functions "
4959 "and Augeas (configuration file editing) functions."
4963 #: ../fish/guestfish-actions.pod:378 ../src/guestfs-actions.pod:576
4964 msgid "The command returns no error if I<all> requested groups are available."
4968 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:578
4970 "It fails with an error if one or more of the requested groups is unavailable "
4975 #: ../fish/guestfish-actions.pod:383 ../src/guestfs-actions.pod:581
4977 "If an unknown group name is included in the list of groups then an error is "
4982 #: ../fish/guestfish-actions.pod:386 ../src/guestfs-actions.pod:584
4987 #: ../fish/guestfish-actions.pod:392
4988 msgid "You must call L</launch> before calling this function."
4992 #: ../fish/guestfish-actions.pod:394 ../src/guestfs-actions.pod:592
4994 "The reason is because we don't know what groups are supported by the "
4995 "appliance/daemon until it is running and can be queried."
4999 #: ../fish/guestfish-actions.pod:400 ../src/guestfs-actions.pod:598
5001 "If a group of functions is available, this does not necessarily mean that "
5002 "they will work. You still have to check for errors when calling individual "
5003 "API functions even if they are available."
5007 #: ../fish/guestfish-actions.pod:407 ../src/guestfs-actions.pod:605
5009 "It is usually the job of distro packagers to build complete functionality "
5010 "into the libguestfs appliance. Upstream libguestfs, if built from source "
5011 "with all requirements satisfied, will support everything."
5015 #: ../fish/guestfish-actions.pod:414
5017 "This call was added in version C<1.0.80>. In previous versions of "
5018 "libguestfs all you could do would be to speculatively execute a command to "
5019 "find out if the daemon implemented it. See also L</version>."
5023 #: ../fish/guestfish-actions.pod:421
5024 msgid "available-all-groups"
5028 #: ../fish/guestfish-actions.pod:423
5031 " available-all-groups\n"
5036 #: ../fish/guestfish-actions.pod:425
5038 "This command returns a list of all optional groups that this daemon knows "
5039 "about. Note this returns both supported and unsupported groups. To find "
5040 "out which ones the daemon can actually support you have to call "
5041 "L</available> on each member of the returned list."
5045 #: ../fish/guestfish-actions.pod:431
5046 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
5050 #: ../fish/guestfish-actions.pod:433
5055 #: ../fish/guestfish-actions.pod:435
5058 " base64-in (base64file|-) filename\n"
5063 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:649
5064 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
5068 #: ../fish/guestfish-actions.pod:440 ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:698 ../fish/guestfish-actions.pod:782 ../fish/guestfish-actions.pod:803 ../fish/guestfish-actions.pod:902 ../fish/guestfish-actions.pod:921 ../fish/guestfish-actions.pod:1295 ../fish/guestfish-actions.pod:4732 ../fish/guestfish-actions.pod:4744 ../fish/guestfish-actions.pod:4755 ../fish/guestfish-actions.pod:4766 ../fish/guestfish-actions.pod:4818 ../fish/guestfish-actions.pod:4827 ../fish/guestfish-actions.pod:4881 ../fish/guestfish-actions.pod:4904
5069 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
5073 #: ../fish/guestfish-actions.pod:442
5078 #: ../fish/guestfish-actions.pod:444
5081 " base64-out filename (base64file|-)\n"
5086 #: ../fish/guestfish-actions.pod:446 ../src/guestfs-actions.pod:663
5088 "This command downloads the contents of C<filename>, writing it out to local "
5089 "file C<base64file> encoded as base64."
5093 #: ../fish/guestfish-actions.pod:451
5094 msgid "blockdev-flushbufs"
5098 #: ../fish/guestfish-actions.pod:453
5101 " blockdev-flushbufs device\n"
5106 #: ../fish/guestfish-actions.pod:455 ../src/guestfs-actions.pod:676
5107 msgid "This tells the kernel to flush internal buffers associated with C<device>."
5111 #: ../fish/guestfish-actions.pod:458 ../fish/guestfish-actions.pod:469 ../fish/guestfish-actions.pod:478 ../fish/guestfish-actions.pod:488 ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:513 ../fish/guestfish-actions.pod:521 ../fish/guestfish-actions.pod:532 ../fish/guestfish-actions.pod:540 ../fish/guestfish-actions.pod:548 ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:711 ../src/guestfs-actions.pod:727 ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:778 ../src/guestfs-actions.pod:796 ../src/guestfs-actions.pod:810 ../src/guestfs-actions.pod:824
5112 msgid "This uses the L<blockdev(8)> command."
5116 #: ../fish/guestfish-actions.pod:460
5117 msgid "blockdev-getbsz"
5121 #: ../fish/guestfish-actions.pod:462
5124 " blockdev-getbsz device\n"
5129 #: ../fish/guestfish-actions.pod:464 ../src/guestfs-actions.pod:691
5130 msgid "This returns the block size of a device."
5134 #: ../fish/guestfish-actions.pod:466 ../fish/guestfish-actions.pod:529 ../src/guestfs-actions.pod:693 ../src/guestfs-actions.pod:793
5136 "(Note this is different from both I<size in blocks> and I<filesystem block "
5141 #: ../fish/guestfish-actions.pod:471
5142 msgid "blockdev-getro"
5146 #: ../fish/guestfish-actions.pod:473
5149 " blockdev-getro device\n"
5154 #: ../fish/guestfish-actions.pod:475 ../src/guestfs-actions.pod:708
5156 "Returns a boolean indicating if the block device is read-only (true if "
5157 "read-only, false if not)."
5161 #: ../fish/guestfish-actions.pod:480
5162 msgid "blockdev-getsize64"
5166 #: ../fish/guestfish-actions.pod:482
5169 " blockdev-getsize64 device\n"
5174 #: ../fish/guestfish-actions.pod:484 ../src/guestfs-actions.pod:723
5175 msgid "This returns the size of the device in bytes."
5179 #: ../fish/guestfish-actions.pod:486
5180 msgid "See also L</blockdev-getsz>."
5184 #: ../fish/guestfish-actions.pod:490
5185 msgid "blockdev-getss"
5189 #: ../fish/guestfish-actions.pod:492
5192 " blockdev-getss device\n"
5197 #: ../fish/guestfish-actions.pod:494 ../src/guestfs-actions.pod:739
5199 "This returns the size of sectors on a block device. Usually 512, but can be "
5200 "larger for modern devices."
5204 #: ../fish/guestfish-actions.pod:497
5205 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
5209 #: ../fish/guestfish-actions.pod:502
5210 msgid "blockdev-getsz"
5214 #: ../fish/guestfish-actions.pod:504
5217 " blockdev-getsz device\n"
5222 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:757
5224 "This returns the size of the device in units of 512-byte sectors (even if "
5225 "the sectorsize isn't 512 bytes ... weird)."
5229 #: ../fish/guestfish-actions.pod:509
5231 "See also L</blockdev-getss> for the real sector size of the device, and "
5232 "L</blockdev-getsize64> for the more useful I<size in bytes>."
5236 #: ../fish/guestfish-actions.pod:515
5237 msgid "blockdev-rereadpt"
5241 #: ../fish/guestfish-actions.pod:517
5244 " blockdev-rereadpt device\n"
5249 #: ../fish/guestfish-actions.pod:519 ../src/guestfs-actions.pod:776
5250 msgid "Reread the partition table on C<device>."
5254 #: ../fish/guestfish-actions.pod:523
5255 msgid "blockdev-setbsz"
5259 #: ../fish/guestfish-actions.pod:525
5262 " blockdev-setbsz device blocksize\n"
5267 #: ../fish/guestfish-actions.pod:527 ../src/guestfs-actions.pod:791
5268 msgid "This sets the block size of a device."
5272 #: ../fish/guestfish-actions.pod:534
5273 msgid "blockdev-setro"
5277 #: ../fish/guestfish-actions.pod:536
5280 " blockdev-setro device\n"
5285 #: ../fish/guestfish-actions.pod:538 ../src/guestfs-actions.pod:808
5286 msgid "Sets the block device named C<device> to read-only."
5290 #: ../fish/guestfish-actions.pod:542
5291 msgid "blockdev-setrw"
5295 #: ../fish/guestfish-actions.pod:544
5298 " blockdev-setrw device\n"
5303 #: ../fish/guestfish-actions.pod:546 ../src/guestfs-actions.pod:822
5304 msgid "Sets the block device named C<device> to read-write."
5308 #: ../fish/guestfish-actions.pod:550
5309 msgid "btrfs-filesystem-resize"
5313 #: ../fish/guestfish-actions.pod:552
5316 " btrfs-filesystem-resize mountpoint [size:..]\n"
5321 #: ../fish/guestfish-actions.pod:554 ../src/guestfs-actions.pod:844
5322 msgid "This command resizes a btrfs filesystem."
5326 #: ../fish/guestfish-actions.pod:556 ../src/guestfs-actions.pod:846
5328 "Note that unlike other resize calls, the filesystem has to be mounted and "
5329 "the parameter is the mountpoint not the device (this is a requirement of "
5334 #: ../fish/guestfish-actions.pod:560 ../fish/guestfish-actions.pod:3479 ../src/guestfs-actions.pod:850 ../src/guestfs-actions.pod:5332
5335 msgid "The optional parameters are:"
5339 #: ../fish/guestfish-actions.pod:564 ../fish/guestfish-actions.pod:3483 ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:5336
5344 #: ../fish/guestfish-actions.pod:566 ../src/guestfs-actions.pod:856
5346 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
5347 "resized to the maximum size."
5351 #: ../fish/guestfish-actions.pod:571 ../src/guestfs-actions.pod:861
5352 msgid "See also L<btrfs(8)>."
5356 #: ../fish/guestfish-actions.pod:575
5357 msgid "case-sensitive-path"
5361 #: ../fish/guestfish-actions.pod:577
5364 " case-sensitive-path path\n"
5369 #: ../fish/guestfish-actions.pod:579 ../src/guestfs-actions.pod:895
5371 "This can be used to resolve case insensitive paths on a filesystem which is "
5372 "case sensitive. The use case is to resolve paths which you have read from "
5373 "Windows configuration files or the Windows Registry, to the true path."
5377 #: ../fish/guestfish-actions.pod:584 ../src/guestfs-actions.pod:900
5379 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5380 "(and probably others), which is that although the underlying filesystem is "
5381 "case-insensitive, the driver exports the filesystem to Linux as "
5386 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:905
5388 "One consequence of this is that special directories such as C<c:\\windows> "
5389 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5390 "precise details of how they were created. In Windows itself this would not "
5395 #: ../fish/guestfish-actions.pod:595 ../src/guestfs-actions.pod:911
5397 "Bug or feature? You decide: "
5398 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
5402 #: ../fish/guestfish-actions.pod:598 ../src/guestfs-actions.pod:914
5404 "This function resolves the true case of each element in the path and returns "
5405 "the case-sensitive path."
5409 #: ../fish/guestfish-actions.pod:601
5411 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
5412 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5413 "how the directories were originally created under Windows)."
5417 #: ../fish/guestfish-actions.pod:606 ../src/guestfs-actions.pod:922
5418 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5422 #: ../fish/guestfish-actions.pod:609
5423 msgid "See also L</realpath>."
5427 #: ../fish/guestfish-actions.pod:611
5432 #: ../fish/guestfish-actions.pod:613
5440 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3899 ../src/guestfs-actions.pod:938 ../src/guestfs-actions.pod:5975
5441 msgid "Return the contents of the file named C<path>."
5445 #: ../fish/guestfish-actions.pod:617
5447 "Note that this function cannot correctly handle binary files (specifically, "
5448 "files containing C<\\0> character which is treated as end of string). For "
5449 "those you need to use the L</read-file> or L</download> functions which have "
5450 "a more complex interface."
5454 #: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:757 ../fish/guestfish-actions.pod:769 ../fish/guestfish-actions.pod:980 ../fish/guestfish-actions.pod:990 ../fish/guestfish-actions.pod:1057 ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1259 ../fish/guestfish-actions.pod:1572 ../fish/guestfish-actions.pod:1582 ../fish/guestfish-actions.pod:1632 ../fish/guestfish-actions.pod:1647 ../fish/guestfish-actions.pod:1657 ../fish/guestfish-actions.pod:1676 ../fish/guestfish-actions.pod:3769 ../fish/guestfish-actions.pod:3784 ../fish/guestfish-actions.pod:3860 ../fish/guestfish-actions.pod:3877 ../fish/guestfish-actions.pod:3892 ../fish/guestfish-actions.pod:4573 ../fish/guestfish-actions.pod:4619 ../fish/guestfish-actions.pod:4704 ../fish/guestfish-actions.pod:4719 ../fish/guestfish-actions.pod:5125 ../fish/guestfish-actions.pod:5137 ../fish/guestfish-actions.pod:5155 ../fish/guestfish-actions.pod:5172 ../fish/guestfish-actions.pod:5182 ../fish/guestfish-actions.pod:5239 ../fish/guestfish-actions.pod:5249 ../fish/guestfish-actions.pod:5278 ../fish/guestfish-actions.pod:5288 ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:1127 ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1554 ../src/guestfs-actions.pod:1573 ../src/guestfs-actions.pod:1676 ../src/guestfs-actions.pod:1695 ../src/guestfs-actions.pod:1941 ../src/guestfs-actions.pod:2423 ../src/guestfs-actions.pod:2442 ../src/guestfs-actions.pod:2507 ../src/guestfs-actions.pod:2531 ../src/guestfs-actions.pod:2548 ../src/guestfs-actions.pod:2577 ../src/guestfs-actions.pod:5757 ../src/guestfs-actions.pod:5783 ../src/guestfs-actions.pod:5914 ../src/guestfs-actions.pod:5940 ../src/guestfs-actions.pod:5964 ../src/guestfs-actions.pod:6931 ../src/guestfs-actions.pod:6986 ../src/guestfs-actions.pod:7132 ../src/guestfs-actions.pod:7156 ../src/guestfs-actions.pod:7821 ../src/guestfs-actions.pod:7841 ../src/guestfs-actions.pod:7874 ../src/guestfs-actions.pod:7893 ../src/guestfs-actions.pod:7912 ../src/guestfs-actions.pod:8006 ../src/guestfs-actions.pod:8025 ../src/guestfs-actions.pod:8071 ../src/guestfs-actions.pod:8090
5456 "Because of the message protocol, there is a transfer limit of somewhere "
5457 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5461 #: ../fish/guestfish-actions.pod:625
5466 #: ../fish/guestfish-actions.pod:627
5469 " checksum csumtype path\n"
5474 #: ../fish/guestfish-actions.pod:629 ../src/guestfs-actions.pod:960
5475 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5479 #: ../fish/guestfish-actions.pod:632 ../src/guestfs-actions.pod:963
5481 "The type of checksum to compute is given by the C<csumtype> parameter which "
5482 "must have one of the following values:"
5486 #: ../fish/guestfish-actions.pod:637 ../src/guestfs-actions.pod:968
5491 #: ../fish/guestfish-actions.pod:639 ../src/guestfs-actions.pod:970
5493 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5498 #: ../fish/guestfish-actions.pod:642 ../src/guestfs-actions.pod:973
5503 #: ../fish/guestfish-actions.pod:644 ../src/guestfs-actions.pod:975
5504 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5508 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:977
5513 #: ../fish/guestfish-actions.pod:648 ../src/guestfs-actions.pod:979
5514 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5518 #: ../fish/guestfish-actions.pod:650 ../src/guestfs-actions.pod:981
5523 #: ../fish/guestfish-actions.pod:652 ../src/guestfs-actions.pod:983
5524 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5528 #: ../fish/guestfish-actions.pod:654 ../src/guestfs-actions.pod:985
5533 #: ../fish/guestfish-actions.pod:656 ../src/guestfs-actions.pod:987
5534 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5538 #: ../fish/guestfish-actions.pod:658 ../src/guestfs-actions.pod:989
5543 #: ../fish/guestfish-actions.pod:660 ../src/guestfs-actions.pod:991
5544 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5548 #: ../fish/guestfish-actions.pod:662 ../src/guestfs-actions.pod:993
5553 #: ../fish/guestfish-actions.pod:664 ../src/guestfs-actions.pod:995
5554 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5558 #: ../fish/guestfish-actions.pod:668 ../src/guestfs-actions.pod:999
5559 msgid "The checksum is returned as a printable string."
5563 #: ../fish/guestfish-actions.pod:670
5564 msgid "To get the checksum for a device, use L</checksum-device>."
5568 #: ../fish/guestfish-actions.pod:672
5569 msgid "To get the checksums for many files, use L</checksums-out>."
5573 #: ../fish/guestfish-actions.pod:674
5574 msgid "checksum-device"
5578 #: ../fish/guestfish-actions.pod:676
5581 " checksum-device csumtype device\n"
5586 #: ../fish/guestfish-actions.pod:678
5588 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5589 "device named C<device>. For the types of checksums supported see the "
5590 "L</checksum> command."
5594 #: ../fish/guestfish-actions.pod:682
5595 msgid "checksums-out"
5599 #: ../fish/guestfish-actions.pod:684
5602 " checksums-out csumtype directory (sumsfile|-)\n"
5607 #: ../fish/guestfish-actions.pod:686 ../src/guestfs-actions.pod:1034
5609 "This command computes the checksums of all regular files in C<directory> and "
5610 "then emits a list of those checksums to the local output file C<sumsfile>."
5614 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1038
5616 "This can be used for verifying the integrity of a virtual machine. However "
5617 "to be properly secure you should pay attention to the output of the checksum "
5618 "command (it uses the ones from GNU coreutils). In particular when the "
5619 "filename is not printable, coreutils uses a special backslash syntax. For "
5620 "more information, see the GNU coreutils info file."
5624 #: ../fish/guestfish-actions.pod:700
5629 #: ../fish/guestfish-actions.pod:702
5632 " chmod mode path\n"
5637 #: ../fish/guestfish-actions.pod:704 ../src/guestfs-actions.pod:1057
5639 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5644 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1060
5646 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5647 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5652 #: ../fish/guestfish-actions.pod:711 ../fish/guestfish-actions.pod:3132 ../fish/guestfish-actions.pod:3271 ../fish/guestfish-actions.pod:3281 ../fish/guestfish-actions.pod:3291 ../src/guestfs-actions.pod:1064 ../src/guestfs-actions.pod:4739 ../src/guestfs-actions.pod:4948 ../src/guestfs-actions.pod:4967 ../src/guestfs-actions.pod:4986
5653 msgid "The mode actually set is affected by the umask."
5657 #: ../fish/guestfish-actions.pod:713
5662 #: ../fish/guestfish-actions.pod:715
5665 " chown owner group path\n"
5670 #: ../fish/guestfish-actions.pod:717 ../src/guestfs-actions.pod:1078
5671 msgid "Change the file owner to C<owner> and group to C<group>."
5675 #: ../fish/guestfish-actions.pod:719 ../fish/guestfish-actions.pod:2567 ../src/guestfs-actions.pod:1080 ../src/guestfs-actions.pod:3810
5677 "Only numeric uid and gid are supported. If you want to use names, you will "
5678 "need to locate and parse the password file yourself (Augeas support makes "
5679 "this relatively easy)."
5683 #: ../fish/guestfish-actions.pod:723
5688 #: ../fish/guestfish-actions.pod:725
5691 " command 'arguments ...'\n"
5696 #: ../fish/guestfish-actions.pod:727 ../src/guestfs-actions.pod:1094
5698 "This call runs a command from the guest filesystem. The filesystem must be "
5699 "mounted, and must contain a compatible operating system (ie. something "
5700 "Linux, with the same or compatible processor architecture)."
5704 #: ../fish/guestfish-actions.pod:732
5706 "The single parameter is an argv-style list of arguments. The first element "
5707 "is the name of the program to run. Subsequent elements are parameters. The "
5708 "list must be non-empty (ie. must contain a program name). Note that the "
5709 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
5713 #: ../fish/guestfish-actions.pod:739 ../src/guestfs-actions.pod:1106
5714 msgid "The return value is anything printed to I<stdout> by the command."
5718 #: ../fish/guestfish-actions.pod:742 ../src/guestfs-actions.pod:1109
5720 "If the command returns a non-zero exit status, then this function returns an "
5721 "error message. The error message string is the content of I<stderr> from "
5726 #: ../fish/guestfish-actions.pod:746 ../src/guestfs-actions.pod:1113
5728 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
5729 "C</bin>. If you require a program from another location, you should provide "
5730 "the full path in the first parameter."
5734 #: ../fish/guestfish-actions.pod:751 ../src/guestfs-actions.pod:1118
5736 "Shared libraries and data files required by the program must be available on "
5737 "filesystems which are mounted in the correct places. It is the caller's "
5738 "responsibility to ensure all filesystems that are needed are mounted at the "
5743 #: ../fish/guestfish-actions.pod:760
5744 msgid "command-lines"
5748 #: ../fish/guestfish-actions.pod:762
5751 " command-lines 'arguments ...'\n"
5756 #: ../fish/guestfish-actions.pod:764
5757 msgid "This is the same as L</command>, but splits the result into a list of lines."
5761 #: ../fish/guestfish-actions.pod:767
5762 msgid "See also: L</sh-lines>"
5766 #: ../fish/guestfish-actions.pod:772
5767 msgid "compress-device-out"
5771 #: ../fish/guestfish-actions.pod:774
5774 " compress-device-out ctype device (zdevice|-) [level:..]\n"
5779 #: ../fish/guestfish-actions.pod:776 ../src/guestfs-actions.pod:1168
5781 "This command compresses C<device> and writes it out to the local file "
5786 #: ../fish/guestfish-actions.pod:779
5788 "The C<ctype> and optional C<level> parameters have the same meaning as in "
5793 #: ../fish/guestfish-actions.pod:786
5794 msgid "compress-out"
5798 #: ../fish/guestfish-actions.pod:788
5801 " compress-out ctype file (zfile|-) [level:..]\n"
5806 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1220
5808 "This command compresses C<file> and writes it out to the local file "
5813 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1223
5815 "The compression program used is controlled by the C<ctype> parameter. "
5816 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
5817 "Some compression types may not be supported by particular builds of "
5818 "libguestfs, in which case you will get an error containing the substring "
5819 "\"not supported\"."
5823 #: ../fish/guestfish-actions.pod:799 ../src/guestfs-actions.pod:1229
5825 "The optional C<level> parameter controls compression level. The meaning and "
5826 "default for this parameter depends on the compression program being used."
5830 #: ../fish/guestfish-actions.pod:807
5835 #: ../fish/guestfish-actions.pod:809
5838 " config qemuparam qemuvalue\n"
5843 #: ../fish/guestfish-actions.pod:811 ../src/guestfs-actions.pod:1270
5845 "This can be used to add arbitrary qemu command line parameters of the form "
5846 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
5847 "setting some parameters which would interfere with parameters that we use."
5851 #: ../fish/guestfish-actions.pod:816 ../src/guestfs-actions.pod:1275
5852 msgid "The first character of C<param> string must be a C<-> (dash)."
5856 #: ../fish/guestfish-actions.pod:818 ../src/guestfs-actions.pod:1277
5857 msgid "C<value> can be NULL."
5861 #: ../fish/guestfish-actions.pod:820
5866 #: ../fish/guestfish-actions.pod:822
5869 " copy-size src dest size\n"
5874 #: ../fish/guestfish-actions.pod:824 ../src/guestfs-actions.pod:1291
5876 "This command copies exactly C<size> bytes from one source device or file "
5877 "C<src> to another destination device or file C<dest>."
5881 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1294
5883 "Note this will fail if the source is too short or if the destination is not "
5888 #: ../fish/guestfish-actions.pod:830
5893 #: ../fish/guestfish-actions.pod:832
5901 #: ../fish/guestfish-actions.pod:834 ../src/guestfs-actions.pod:1313
5903 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5904 "destination filename or destination directory."
5908 #: ../fish/guestfish-actions.pod:837
5913 #: ../fish/guestfish-actions.pod:839
5921 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1327
5923 "This copies a file or directory from C<src> to C<dest> recursively using the "
5928 #: ../fish/guestfish-actions.pod:844
5933 #: ../fish/guestfish-actions.pod:846
5941 #: ../fish/guestfish-actions.pod:848 ../src/guestfs-actions.pod:1341
5943 "This command copies from one source device or file C<src> to another "
5944 "destination device or file C<dest>. Normally you would use this to copy to "
5945 "or from a device or partition, for example to duplicate a filesystem."
5949 #: ../fish/guestfish-actions.pod:853
5951 "If the destination is a device, it must be as large or larger than the "
5952 "source file or device, otherwise the copy will fail. This command cannot do "
5953 "partial copies (see L</copy-size>)."
5957 #: ../fish/guestfish-actions.pod:857
5962 #: ../fish/guestfish-actions.pod:859
5970 #: ../fish/guestfish-actions.pod:861 ../src/guestfs-actions.pod:1359
5971 msgid "This command runs the C<df> command to report disk space used."
5975 #: ../fish/guestfish-actions.pod:863 ../fish/guestfish-actions.pod:874
5977 "This command is mostly useful for interactive sessions. It is I<not> "
5978 "intended that you try to parse the output string. Use L</statvfs> from "
5983 #: ../fish/guestfish-actions.pod:867
5988 #: ../fish/guestfish-actions.pod:869
5996 #: ../fish/guestfish-actions.pod:871 ../src/guestfs-actions.pod:1375
5998 "This command runs the C<df -h> command to report disk space used in "
5999 "human-readable format."
6003 #: ../fish/guestfish-actions.pod:878
6008 #: ../fish/guestfish-actions.pod:880
6016 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1392
6018 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6019 "This is sometimes useful for extended debugging of problems."
6023 #: ../fish/guestfish-actions.pod:886
6025 "Another way to get the same information is to enable verbose messages with "
6026 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
6027 "before running the program."
6031 #: ../fish/guestfish-actions.pod:891
6036 #: ../fish/guestfish-actions.pod:893
6039 " download remotefilename (filename|-)\n"
6044 #: ../fish/guestfish-actions.pod:895 ../fish/guestfish-actions.pod:908 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1438
6046 "Download file C<remotefilename> and save it as C<filename> on the local "
6051 #: ../fish/guestfish-actions.pod:898 ../fish/guestfish-actions.pod:4877 ../src/guestfs-actions.pod:1416 ../src/guestfs-actions.pod:7391
6052 msgid "C<filename> can also be a named pipe."
6056 #: ../fish/guestfish-actions.pod:900
6057 msgid "See also L</upload>, L</cat>."
6061 #: ../fish/guestfish-actions.pod:904
6062 msgid "download-offset"
6066 #: ../fish/guestfish-actions.pod:906
6069 " download-offset remotefilename (filename|-) offset size\n"
6074 #: ../fish/guestfish-actions.pod:911 ../src/guestfs-actions.pod:1441
6076 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6077 "region must be within the file or device)."
6081 #: ../fish/guestfish-actions.pod:914
6083 "Note that there is no limit on the amount of data that can be downloaded "
6084 "with this call, unlike with L</pread>, and this call always reads the full "
6085 "amount unless an error occurs."
6089 #: ../fish/guestfish-actions.pod:919
6090 msgid "See also L</download>, L</pread>."
6094 #: ../fish/guestfish-actions.pod:923
6099 #: ../fish/guestfish-actions.pod:925
6102 " drop-caches whattodrop\n"
6107 #: ../fish/guestfish-actions.pod:927 ../src/guestfs-actions.pod:1466
6109 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6110 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6111 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6115 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1471
6116 msgid "Setting C<whattodrop> to 3 should drop everything."
6120 #: ../fish/guestfish-actions.pod:934 ../src/guestfs-actions.pod:1473
6122 "This automatically calls L<sync(2)> before the operation, so that the "
6123 "maximum guest memory is freed."
6127 #: ../fish/guestfish-actions.pod:937
6132 #: ../fish/guestfish-actions.pod:939
6140 #: ../fish/guestfish-actions.pod:941 ../src/guestfs-actions.pod:1486
6142 "This command runs the C<du -s> command to estimate file space usage for "
6147 #: ../fish/guestfish-actions.pod:944 ../src/guestfs-actions.pod:1489
6149 "C<path> can be a file or a directory. If C<path> is a directory then the "
6150 "estimate includes the contents of the directory and all subdirectories "
6155 #: ../fish/guestfish-actions.pod:948 ../src/guestfs-actions.pod:1493
6156 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6160 #: ../fish/guestfish-actions.pod:951
6165 #: ../fish/guestfish-actions.pod:953
6168 " e2fsck-f device\n"
6173 #: ../fish/guestfish-actions.pod:955 ../src/guestfs-actions.pod:1511
6175 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6176 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
6181 #: ../fish/guestfish-actions.pod:959
6183 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
6184 "should use L</fsck>."
6188 #: ../fish/guestfish-actions.pod:962
6193 #: ../fish/guestfish-actions.pod:964
6196 " echo-daemon 'words ...'\n"
6201 #: ../fish/guestfish-actions.pod:966 ../src/guestfs-actions.pod:1528
6203 "This command concatenates the list of C<words> passed with single spaces "
6204 "between them and returns the resulting string."
6208 #: ../fish/guestfish-actions.pod:969 ../src/guestfs-actions.pod:1531
6209 msgid "You can use this command to test the connection through to the daemon."
6213 #: ../fish/guestfish-actions.pod:971
6214 msgid "See also L</ping-daemon>."
6218 #: ../fish/guestfish-actions.pod:973
6223 #: ../fish/guestfish-actions.pod:975
6226 " egrep regex path\n"
6231 #: ../fish/guestfish-actions.pod:977 ../src/guestfs-actions.pod:1547
6232 msgid "This calls the external C<egrep> program and returns the matching lines."
6236 #: ../fish/guestfish-actions.pod:983
6241 #: ../fish/guestfish-actions.pod:985
6244 " egrepi regex path\n"
6249 #: ../fish/guestfish-actions.pod:987 ../src/guestfs-actions.pod:1566
6250 msgid "This calls the external C<egrep -i> program and returns the matching lines."
6254 #: ../fish/guestfish-actions.pod:993
6259 #: ../fish/guestfish-actions.pod:995
6262 " equal file1 file2\n"
6267 #: ../fish/guestfish-actions.pod:997 ../src/guestfs-actions.pod:1585
6269 "This compares the two files C<file1> and C<file2> and returns true if their "
6270 "content is exactly equal, or false otherwise."
6274 #: ../fish/guestfish-actions.pod:1000 ../src/guestfs-actions.pod:1588
6275 msgid "The external L<cmp(1)> program is used for the comparison."
6279 #: ../fish/guestfish-actions.pod:1002
6284 #: ../fish/guestfish-actions.pod:1004
6292 #: ../fish/guestfish-actions.pod:1006 ../src/guestfs-actions.pod:1600
6294 "This returns C<true> if and only if there is a file, directory (or anything) "
6295 "with the given C<path> name."
6299 #: ../fish/guestfish-actions.pod:1009
6300 msgid "See also L</is-file>, L</is-dir>, L</stat>."
6304 #: ../fish/guestfish-actions.pod:1011
6309 #: ../fish/guestfish-actions.pod:1013
6312 " fallocate path len\n"
6317 #: ../fish/guestfish-actions.pod:1015 ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1623 ../src/guestfs-actions.pod:1642
6319 "This command preallocates a file (containing zero bytes) named C<path> of "
6320 "size C<len> bytes. If the file exists already, it is overwritten."
6324 #: ../fish/guestfish-actions.pod:1019 ../src/guestfs-actions.pod:1627
6326 "Do not confuse this with the guestfish-specific C<alloc> command which "
6327 "allocates a file in the host and attaches it as a device."
6331 #: ../fish/guestfish-actions.pod:1023
6333 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
6338 #: ../fish/guestfish-actions.pod:1030
6343 #: ../fish/guestfish-actions.pod:1032
6346 " fallocate64 path len\n"
6351 #: ../fish/guestfish-actions.pod:1038
6353 "Note that this call allocates disk blocks for the file. To create a sparse "
6354 "file use L</truncate-size> instead."
6358 #: ../fish/guestfish-actions.pod:1041
6360 "The deprecated call L</fallocate> does the same, but owing to an oversight "
6361 "it only allowed 30 bit lengths to be specified, effectively limiting the "
6362 "maximum size of files created through that call to 1GB."
6366 #: ../fish/guestfish-actions.pod:1046 ../src/guestfs-actions.pod:1654
6368 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6369 "commands which create a file in the host and attach it as a device."
6373 #: ../fish/guestfish-actions.pod:1050
6378 #: ../fish/guestfish-actions.pod:1052
6381 " fgrep pattern path\n"
6386 #: ../fish/guestfish-actions.pod:1054 ../src/guestfs-actions.pod:1669
6387 msgid "This calls the external C<fgrep> program and returns the matching lines."
6391 #: ../fish/guestfish-actions.pod:1060
6396 #: ../fish/guestfish-actions.pod:1062
6399 " fgrepi pattern path\n"
6404 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1688
6405 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
6409 #: ../fish/guestfish-actions.pod:1070
6414 #: ../fish/guestfish-actions.pod:1072
6422 #: ../fish/guestfish-actions.pod:1074 ../src/guestfs-actions.pod:1706
6424 "This call uses the standard L<file(1)> command to determine the type or "
6425 "contents of the file."
6429 #: ../fish/guestfish-actions.pod:1077 ../src/guestfs-actions.pod:1709
6431 "This call will also transparently look inside various types of compressed "
6436 #: ../fish/guestfish-actions.pod:1080 ../src/guestfs-actions.pod:1712
6438 "The exact command which runs is C<file -zb path>. Note in particular that "
6439 "the filename is not prepended to the output (the I<-b> option)."
6443 #: ../fish/guestfish-actions.pod:1084 ../src/guestfs-actions.pod:1716
6445 "The output depends on the output of the underlying L<file(1)> command and it "
6446 "can change in future in ways beyond our control. In other words, the output "
6447 "is not guaranteed by the ABI."
6451 #: ../fish/guestfish-actions.pod:1088
6453 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
6454 "(etc), L</is-zero>."
6458 #: ../fish/guestfish-actions.pod:1091
6459 msgid "file-architecture"
6463 #: ../fish/guestfish-actions.pod:1093
6466 " file-architecture filename\n"
6471 #: ../fish/guestfish-actions.pod:1095 ../src/guestfs-actions.pod:1734
6473 "This detects the architecture of the binary C<filename>, and returns it if "
6478 #: ../fish/guestfish-actions.pod:1098 ../src/guestfs-actions.pod:1737
6479 msgid "Currently defined architectures are:"
6483 #: ../fish/guestfish-actions.pod:1102 ../src/guestfs-actions.pod:1741
6488 #: ../fish/guestfish-actions.pod:1104 ../src/guestfs-actions.pod:1743
6490 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6491 "irrespective of the precise processor requirements of the binary."
6495 #: ../fish/guestfish-actions.pod:1107 ../src/guestfs-actions.pod:1746
6500 #: ../fish/guestfish-actions.pod:1109 ../src/guestfs-actions.pod:1748
6501 msgid "64 bit x86-64."
6505 #: ../fish/guestfish-actions.pod:1111 ../src/guestfs-actions.pod:1750
6510 #: ../fish/guestfish-actions.pod:1113 ../src/guestfs-actions.pod:1752
6511 msgid "32 bit SPARC."
6515 #: ../fish/guestfish-actions.pod:1115 ../src/guestfs-actions.pod:1754
6520 #: ../fish/guestfish-actions.pod:1117 ../src/guestfs-actions.pod:1756
6521 msgid "64 bit SPARC V9 and above."
6525 #: ../fish/guestfish-actions.pod:1119 ../src/guestfs-actions.pod:1758
6530 #: ../fish/guestfish-actions.pod:1121 ../src/guestfs-actions.pod:1760
6531 msgid "Intel Itanium."
6535 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1762
6540 #: ../fish/guestfish-actions.pod:1125 ../src/guestfs-actions.pod:1764
6541 msgid "32 bit Power PC."
6545 #: ../fish/guestfish-actions.pod:1127 ../src/guestfs-actions.pod:1766
6550 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1768
6551 msgid "64 bit Power PC."
6555 #: ../fish/guestfish-actions.pod:1133 ../src/guestfs-actions.pod:1772
6556 msgid "Libguestfs may return other architecture strings in future."
6560 #: ../fish/guestfish-actions.pod:1135 ../src/guestfs-actions.pod:1774
6561 msgid "The function works on at least the following types of files:"
6565 #: ../fish/guestfish-actions.pod:1141 ../src/guestfs-actions.pod:1780
6566 msgid "many types of Un*x and Linux binary"
6570 #: ../fish/guestfish-actions.pod:1145 ../src/guestfs-actions.pod:1784
6571 msgid "many types of Un*x and Linux shared library"
6575 #: ../fish/guestfish-actions.pod:1149 ../src/guestfs-actions.pod:1788
6576 msgid "Windows Win32 and Win64 binaries"
6580 #: ../fish/guestfish-actions.pod:1153 ../src/guestfs-actions.pod:1792
6581 msgid "Windows Win32 and Win64 DLLs"
6585 #: ../fish/guestfish-actions.pod:1155 ../src/guestfs-actions.pod:1794
6586 msgid "Win32 binaries and DLLs return C<i386>."
6590 #: ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1796
6591 msgid "Win64 binaries and DLLs return C<x86_64>."
6595 #: ../fish/guestfish-actions.pod:1161 ../src/guestfs-actions.pod:1800
6596 msgid "Linux kernel modules"
6600 #: ../fish/guestfish-actions.pod:1165 ../src/guestfs-actions.pod:1804
6601 msgid "Linux new-style initrd images"
6605 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1808
6606 msgid "some non-x86 Linux vmlinuz kernels"
6610 #: ../fish/guestfish-actions.pod:1173 ../src/guestfs-actions.pod:1812
6611 msgid "What it can't do currently:"
6615 #: ../fish/guestfish-actions.pod:1179 ../src/guestfs-actions.pod:1818
6616 msgid "static libraries (libfoo.a)"
6620 #: ../fish/guestfish-actions.pod:1183 ../src/guestfs-actions.pod:1822
6621 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6625 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1826
6626 msgid "x86 Linux vmlinuz kernels"
6630 #: ../fish/guestfish-actions.pod:1189 ../src/guestfs-actions.pod:1828
6632 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6633 "compressed code, and are horribly hard to unpack. If you want to find the "
6634 "architecture of a kernel, use the architecture of the associated initrd or "
6635 "kernel module(s) instead."
6639 #: ../fish/guestfish-actions.pod:1196
6644 #: ../fish/guestfish-actions.pod:1198
6652 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:1846
6653 msgid "This command returns the size of C<file> in bytes."
6657 #: ../fish/guestfish-actions.pod:1202
6659 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
6660 "L</is-file> etc. To get the size of block devices, use "
6661 "L</blockdev-getsize64>."
6665 #: ../fish/guestfish-actions.pod:1206
6670 #: ../fish/guestfish-actions.pod:1208
6673 " fill c len path\n"
6678 #: ../fish/guestfish-actions.pod:1210 ../src/guestfs-actions.pod:1864
6680 "This command creates a new file called C<path>. The initial content of the "
6681 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
6686 #: ../fish/guestfish-actions.pod:1214
6688 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6689 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
6694 #: ../fish/guestfish-actions.pod:1219
6695 msgid "fill-pattern"
6699 #: ../fish/guestfish-actions.pod:1221
6702 " fill-pattern pattern len path\n"
6707 #: ../fish/guestfish-actions.pod:1223
6709 "This function is like L</fill> except that it creates a new file of length "
6710 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
6711 "is truncated if necessary to ensure the length of the file is exactly C<len> "
6716 #: ../fish/guestfish-actions.pod:1228
6721 #: ../fish/guestfish-actions.pod:1230
6729 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:1910
6731 "This command lists out all files and directories, recursively, starting at "
6732 "C<directory>. It is essentially equivalent to running the shell command "
6733 "C<find directory -print> but some post-processing happens on the output, "
6738 #: ../fish/guestfish-actions.pod:1237 ../src/guestfs-actions.pod:1915
6740 "This returns a list of strings I<without any prefix>. Thus if the directory "
6745 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:1918
6755 #: ../fish/guestfish-actions.pod:1244
6756 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
6760 #: ../fish/guestfish-actions.pod:1247 ../src/guestfs-actions.pod:1925
6771 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:1930
6772 msgid "If C<directory> is not a directory, then this command returns an error."
6776 #: ../fish/guestfish-actions.pod:1255 ../src/guestfs-actions.pod:1933
6777 msgid "The returned list is sorted."
6781 #: ../fish/guestfish-actions.pod:1257
6782 msgid "See also L</find0>."
6786 #: ../fish/guestfish-actions.pod:1262
6791 #: ../fish/guestfish-actions.pod:1264
6794 " find0 directory (files|-)\n"
6799 #: ../fish/guestfish-actions.pod:1266 ../src/guestfs-actions.pod:1953
6801 "This command lists out all files and directories, recursively, starting at "
6802 "C<directory>, placing the resulting list in the external file called "
6807 #: ../fish/guestfish-actions.pod:1270
6808 msgid "This command works the same way as L</find> with the following exceptions:"
6812 #: ../fish/guestfish-actions.pod:1277 ../src/guestfs-actions.pod:1964
6813 msgid "The resulting list is written to an external file."
6817 #: ../fish/guestfish-actions.pod:1281 ../src/guestfs-actions.pod:1968
6819 "Items (filenames) in the result are separated by C<\\0> characters. See "
6820 "L<find(1)> option I<-print0>."
6824 #: ../fish/guestfish-actions.pod:1286 ../src/guestfs-actions.pod:1973
6825 msgid "This command is not limited in the number of names that it can return."
6829 #: ../fish/guestfish-actions.pod:1291 ../src/guestfs-actions.pod:1978
6830 msgid "The result list is not sorted."
6834 #: ../fish/guestfish-actions.pod:1297
6835 msgid "findfs-label"
6839 #: ../fish/guestfish-actions.pod:1299
6842 " findfs-label label\n"
6847 #: ../fish/guestfish-actions.pod:1301 ../src/guestfs-actions.pod:1992
6849 "This command searches the filesystems and returns the one which has the "
6850 "given label. An error is returned if no such filesystem can be found."
6854 #: ../fish/guestfish-actions.pod:1305
6855 msgid "To find the label of a filesystem, use L</vfs-label>."
6859 #: ../fish/guestfish-actions.pod:1307
6864 #: ../fish/guestfish-actions.pod:1309
6867 " findfs-uuid uuid\n"
6872 #: ../fish/guestfish-actions.pod:1311 ../src/guestfs-actions.pod:2009
6874 "This command searches the filesystems and returns the one which has the "
6875 "given UUID. An error is returned if no such filesystem can be found."
6879 #: ../fish/guestfish-actions.pod:1315
6880 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
6884 #: ../fish/guestfish-actions.pod:1317
6889 #: ../fish/guestfish-actions.pod:1319
6892 " fsck fstype device\n"
6897 #: ../fish/guestfish-actions.pod:1321 ../src/guestfs-actions.pod:2027
6899 "This runs the filesystem checker (fsck) on C<device> which should have "
6900 "filesystem type C<fstype>."
6904 #: ../fish/guestfish-actions.pod:1324 ../src/guestfs-actions.pod:2030
6906 "The returned integer is the status. See L<fsck(8)> for the list of status "
6907 "codes from C<fsck>."
6911 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2039
6912 msgid "Multiple status codes can be summed together."
6916 #: ../fish/guestfish-actions.pod:1337 ../src/guestfs-actions.pod:2043
6918 "A non-zero return code can mean \"success\", for example if errors have been "
6919 "corrected on the filesystem."
6923 #: ../fish/guestfish-actions.pod:1342 ../src/guestfs-actions.pod:2048
6924 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6928 #: ../fish/guestfish-actions.pod:1347 ../src/guestfs-actions.pod:2053
6929 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6933 #: ../fish/guestfish-actions.pod:1349
6938 #: ../fish/guestfish-actions.pod:1351
6946 #: ../fish/guestfish-actions.pod:1353 ../src/guestfs-actions.pod:2064
6948 "Return the additional kernel options which are added to the guest kernel "
6953 #: ../fish/guestfish-actions.pod:1356 ../src/guestfs-actions.pod:2067
6954 msgid "If C<NULL> then no options are added."
6958 #: ../fish/guestfish-actions.pod:1358
6959 msgid "get-attach-method"
6963 #: ../fish/guestfish-actions.pod:1360
6966 " get-attach-method\n"
6971 #: ../fish/guestfish-actions.pod:1362
6972 msgid "Return the current attach method. See L</set-attach-method>."
6976 #: ../fish/guestfish-actions.pod:1364
6977 msgid "get-autosync"
6981 #: ../fish/guestfish-actions.pod:1366
6989 #: ../fish/guestfish-actions.pod:1368 ../src/guestfs-actions.pod:2092
6990 msgid "Get the autosync flag."
6994 #: ../fish/guestfish-actions.pod:1370
6999 #: ../fish/guestfish-actions.pod:1372
7007 #: ../fish/guestfish-actions.pod:1374 ../src/guestfs-actions.pod:2103
7008 msgid "Return the direct appliance mode flag."
7012 #: ../fish/guestfish-actions.pod:1376
7017 #: ../fish/guestfish-actions.pod:1378
7020 " get-e2label device\n"
7025 #: ../fish/guestfish-actions.pod:1380 ../src/guestfs-actions.pod:2122
7026 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7030 #: ../fish/guestfish-actions.pod:1383
7032 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
7037 #: ../fish/guestfish-actions.pod:1390
7042 #: ../fish/guestfish-actions.pod:1392
7045 " get-e2uuid device\n"
7050 #: ../fish/guestfish-actions.pod:1394 ../src/guestfs-actions.pod:2143
7051 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7055 #: ../fish/guestfish-actions.pod:1397
7057 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
7062 #: ../fish/guestfish-actions.pod:1404
7067 #: ../fish/guestfish-actions.pod:1406
7075 #: ../fish/guestfish-actions.pod:1408 ../src/guestfs-actions.pod:2156
7076 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
7080 #: ../fish/guestfish-actions.pod:1411
7082 "If L</set-memsize> was not called on this handle, and if "
7083 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7084 "value for memsize."
7088 #: ../fish/guestfish-actions.pod:1415 ../fish/guestfish-actions.pod:1472 ../fish/guestfish-actions.pod:4225 ../fish/guestfish-actions.pod:4327 ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:2255 ../src/guestfs-actions.pod:6436 ../src/guestfs-actions.pod:6562
7089 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7093 #: ../fish/guestfish-actions.pod:1418
7098 #: ../fish/guestfish-actions.pod:1420
7106 #: ../fish/guestfish-actions.pod:1422 ../src/guestfs-actions.pod:2175
7107 msgid "This returns the enable network flag."
7111 #: ../fish/guestfish-actions.pod:1424
7116 #: ../fish/guestfish-actions.pod:1426
7124 #: ../fish/guestfish-actions.pod:1428 ../src/guestfs-actions.pod:2186
7125 msgid "Return the current search path."
7129 #: ../fish/guestfish-actions.pod:1430 ../src/guestfs-actions.pod:2188
7131 "This is always non-NULL. If it wasn't set already, then this will return "
7136 #: ../fish/guestfish-actions.pod:1433
7141 #: ../fish/guestfish-actions.pod:1435
7149 #: ../fish/guestfish-actions.pod:1437 ../src/guestfs-actions.pod:2201
7150 msgid "This returns the process group flag."
7154 #: ../fish/guestfish-actions.pod:1439
7159 #: ../fish/guestfish-actions.pod:1441
7164 #: ../fish/guestfish-actions.pod:1443
7172 #: ../fish/guestfish-actions.pod:1445 ../src/guestfs-actions.pod:2212
7174 "Return the process ID of the qemu subprocess. If there is no qemu "
7175 "subprocess, then this will return an error."
7179 #: ../fish/guestfish-actions.pod:1448 ../src/guestfs-actions.pod:2215
7180 msgid "This is an internal call used for debugging and testing."
7184 #: ../fish/guestfish-actions.pod:1450
7189 #: ../fish/guestfish-actions.pod:1452
7197 #: ../fish/guestfish-actions.pod:1454 ../src/guestfs-actions.pod:2226
7198 msgid "Return the current qemu binary."
7202 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2228
7204 "This is always non-NULL. If it wasn't set already, then this will return "
7205 "the default qemu binary name."
7209 #: ../fish/guestfish-actions.pod:1459
7210 msgid "get-recovery-proc"
7214 #: ../fish/guestfish-actions.pod:1461
7217 " get-recovery-proc\n"
7222 #: ../fish/guestfish-actions.pod:1463 ../src/guestfs-actions.pod:2241
7223 msgid "Return the recovery process enabled flag."
7227 #: ../fish/guestfish-actions.pod:1465
7232 #: ../fish/guestfish-actions.pod:1467
7240 #: ../fish/guestfish-actions.pod:1469
7242 "This returns the current setting of the selinux flag which is passed to the "
7243 "appliance at boot time. See L</set-selinux>."
7247 #: ../fish/guestfish-actions.pod:1475
7252 #: ../fish/guestfish-actions.pod:1477
7260 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2267
7261 msgid "This returns the number of virtual CPUs assigned to the appliance."
7265 #: ../fish/guestfish-actions.pod:1481
7270 #: ../fish/guestfish-actions.pod:1483
7278 #: ../fish/guestfish-actions.pod:1485 ../src/guestfs-actions.pod:2278
7280 "This returns the current state as an opaque integer. This is only useful "
7281 "for printing debug and internal error messages."
7285 #: ../fish/guestfish-actions.pod:1488 ../fish/guestfish-actions.pod:2434 ../fish/guestfish-actions.pod:2452 ../fish/guestfish-actions.pod:2490 ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:2281 ../src/guestfs-actions.pod:3587 ../src/guestfs-actions.pod:3616 ../src/guestfs-actions.pod:3677 ../src/guestfs-actions.pod:3704
7286 msgid "For more information on states, see L<guestfs(3)>."
7290 #: ../fish/guestfish-actions.pod:1490
7295 #: ../fish/guestfish-actions.pod:1492
7303 #: ../fish/guestfish-actions.pod:1494 ../src/guestfs-actions.pod:2292
7304 msgid "Return the command trace flag."
7308 #: ../fish/guestfish-actions.pod:1496
7313 #: ../fish/guestfish-actions.pod:1498
7321 #: ../fish/guestfish-actions.pod:1500
7323 "Return the current umask. By default the umask is C<022> unless it has been "
7324 "set by calling L</umask>."
7328 #: ../fish/guestfish-actions.pod:1503
7333 #: ../fish/guestfish-actions.pod:1505
7341 #: ../fish/guestfish-actions.pod:1507 ../src/guestfs-actions.pod:2315
7342 msgid "This returns the verbose messages flag."
7346 #: ../fish/guestfish-actions.pod:1509
7351 #: ../fish/guestfish-actions.pod:1511
7359 #: ../fish/guestfish-actions.pod:1513 ../src/guestfs-actions.pod:2326
7360 msgid "This gets the SELinux security context of the daemon."
7364 #: ../fish/guestfish-actions.pod:1515
7365 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
7369 #: ../fish/guestfish-actions.pod:1518
7374 #: ../fish/guestfish-actions.pod:1520
7377 " getxattr path name\n"
7382 #: ../fish/guestfish-actions.pod:1522
7384 "Get a single extended attribute from file C<path> named C<name>. This call "
7385 "follows symlinks. If you want to lookup an extended attribute for the "
7386 "symlink itself, use L</lgetxattr>."
7390 #: ../fish/guestfish-actions.pod:1526 ../fish/guestfish-actions.pod:2579
7392 "Normally it is better to get all extended attributes from a file in one go "
7393 "by calling L</getxattrs>. However some Linux filesystem implementations are "
7394 "buggy and do not provide a way to list out attributes. For these "
7395 "filesystems (notably ntfs-3g) you have to know the names of the extended "
7396 "attributes you want in advance and call this function."
7400 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:2586 ../src/guestfs-actions.pod:2355 ../src/guestfs-actions.pod:3837
7402 "Extended attribute values are blobs of binary data. If there is no extended "
7403 "attribute named C<name>, this returns an error."
7407 #: ../fish/guestfish-actions.pod:1536
7408 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
7412 #: ../fish/guestfish-actions.pod:1538
7417 #: ../fish/guestfish-actions.pod:1540
7425 #: ../fish/guestfish-actions.pod:1542 ../src/guestfs-actions.pod:2372
7426 msgid "This call lists the extended attributes of the file or directory C<path>."
7430 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2375
7432 "At the system call level, this is a combination of the L<listxattr(2)> and "
7433 "L<getxattr(2)> calls."
7437 #: ../fish/guestfish-actions.pod:1548
7438 msgid "See also: L</lgetxattrs>, L<attr(5)>."
7442 #: ../fish/guestfish-actions.pod:1550
7447 #: ../fish/guestfish-actions.pod:1552
7450 " glob-expand pattern\n"
7455 #: ../fish/guestfish-actions.pod:1554 ../src/guestfs-actions.pod:2392
7457 "This command searches for all the pathnames matching C<pattern> according to "
7458 "the wildcard expansion rules used by the shell."
7462 #: ../fish/guestfish-actions.pod:1558 ../src/guestfs-actions.pod:2396
7463 msgid "If no paths match, then this returns an empty list (note: not an error)."
7467 #: ../fish/guestfish-actions.pod:1561 ../src/guestfs-actions.pod:2399
7469 "It is just a wrapper around the C L<glob(3)> function with flags "
7470 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
7474 #: ../fish/guestfish-actions.pod:1565
7479 #: ../fish/guestfish-actions.pod:1567
7482 " grep regex path\n"
7487 #: ../fish/guestfish-actions.pod:1569 ../src/guestfs-actions.pod:2416
7488 msgid "This calls the external C<grep> program and returns the matching lines."
7492 #: ../fish/guestfish-actions.pod:1575
7497 #: ../fish/guestfish-actions.pod:1577
7500 " grepi regex path\n"
7505 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2435
7506 msgid "This calls the external C<grep -i> program and returns the matching lines."
7510 #: ../fish/guestfish-actions.pod:1585
7511 msgid "grub-install"
7515 #: ../fish/guestfish-actions.pod:1587
7518 " grub-install root device\n"
7523 #: ../fish/guestfish-actions.pod:1589 ../src/guestfs-actions.pod:2454
7525 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
7526 "with the root directory being C<root>."
7530 #: ../fish/guestfish-actions.pod:1598 ../src/guestfs-actions.pod:2463
7532 "There is currently no way in the API to install grub2, which is used by most "
7533 "modern Linux guests. It is possible to run the grub2 command from the "
7534 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
7538 #: ../fish/guestfish-actions.pod:1605 ../src/guestfs-actions.pod:2470
7540 "This uses C<grub-install> from the host. Unfortunately grub is not always "
7541 "compatible with itself, so this only works in rather narrow circumstances. "
7542 "Careful testing with each guest version is advisable."
7546 #: ../fish/guestfish-actions.pod:1612 ../src/guestfs-actions.pod:2477
7548 "If grub-install reports the error \"No suitable drive was found in the "
7549 "generated device map.\" it may be that you need to create a "
7550 "C</boot/grub/device.map> file first that contains the mapping between grub "
7551 "device names and Linux device names. It is usually sufficient to create a "
7556 #: ../fish/guestfish-actions.pod:1619 ../src/guestfs-actions.pod:2484
7564 #: ../fish/guestfish-actions.pod:1621 ../src/guestfs-actions.pod:2486
7565 msgid "replacing C</dev/vda> with the name of the installation device."
7569 #: ../fish/guestfish-actions.pod:1625
7574 #: ../fish/guestfish-actions.pod:1627
7582 #: ../fish/guestfish-actions.pod:1629 ../src/guestfs-actions.pod:2500
7584 "This command returns up to the first 10 lines of a file as a list of "
7589 #: ../fish/guestfish-actions.pod:1635
7594 #: ../fish/guestfish-actions.pod:1637
7597 " head-n nrlines path\n"
7602 #: ../fish/guestfish-actions.pod:1639 ../src/guestfs-actions.pod:2519
7604 "If the parameter C<nrlines> is a positive number, this returns the first "
7605 "C<nrlines> lines of the file C<path>."
7609 #: ../fish/guestfish-actions.pod:1642 ../src/guestfs-actions.pod:2522
7611 "If the parameter C<nrlines> is a negative number, this returns lines from "
7612 "the file C<path>, excluding the last C<nrlines> lines."
7616 #: ../fish/guestfish-actions.pod:1645 ../fish/guestfish-actions.pod:4717 ../src/guestfs-actions.pod:2525 ../src/guestfs-actions.pod:7150
7617 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7621 #: ../fish/guestfish-actions.pod:1650
7626 #: ../fish/guestfish-actions.pod:1652
7634 #: ../fish/guestfish-actions.pod:1654 ../src/guestfs-actions.pod:2542
7636 "This runs C<hexdump -C> on the given C<path>. The result is the "
7637 "human-readable, canonical hex dump of the file."
7641 #: ../fish/guestfish-actions.pod:1660
7646 #: ../fish/guestfish-actions.pod:1662
7649 " initrd-cat initrdpath filename\n"
7654 #: ../fish/guestfish-actions.pod:1664 ../src/guestfs-actions.pod:2561
7656 "This command unpacks the file C<filename> from the initrd file called "
7657 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7662 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2565
7664 "For example, in guestfish you could use the following command to examine the "
7665 "boot script (usually called C</init>) contained in a Linux initrd or "
7670 #: ../fish/guestfish-actions.pod:1672 ../src/guestfs-actions.pod:2569
7673 " initrd-cat /boot/initrd-<version>.img init\n"
7678 #: ../fish/guestfish-actions.pod:1674
7679 msgid "See also L</initrd-list>."
7683 #: ../fish/guestfish-actions.pod:1679
7688 #: ../fish/guestfish-actions.pod:1681
7691 " initrd-list path\n"
7696 #: ../fish/guestfish-actions.pod:1683 ../src/guestfs-actions.pod:2588
7697 msgid "This command lists out files contained in an initrd."
7701 #: ../fish/guestfish-actions.pod:1685 ../src/guestfs-actions.pod:2590
7703 "The files are listed without any initial C</> character. The files are "
7704 "listed in the order they appear (not necessarily alphabetical). Directory "
7705 "names are listed as separate items."
7709 #: ../fish/guestfish-actions.pod:1689 ../src/guestfs-actions.pod:2594
7711 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7712 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7717 #: ../fish/guestfish-actions.pod:1693
7718 msgid "inotify-add-watch"
7722 #: ../fish/guestfish-actions.pod:1695
7725 " inotify-add-watch path mask\n"
7730 #: ../fish/guestfish-actions.pod:1697 ../src/guestfs-actions.pod:2611
7731 msgid "Watch C<path> for the events listed in C<mask>."
7735 #: ../fish/guestfish-actions.pod:1699 ../src/guestfs-actions.pod:2613
7737 "Note that if C<path> is a directory then events within that directory are "
7738 "watched, but this does I<not> happen recursively (in subdirectories)."
7742 #: ../fish/guestfish-actions.pod:1703 ../src/guestfs-actions.pod:2617
7744 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7745 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7749 #: ../fish/guestfish-actions.pod:1707
7750 msgid "inotify-close"
7754 #: ../fish/guestfish-actions.pod:1709
7762 #: ../fish/guestfish-actions.pod:1711 ../src/guestfs-actions.pod:2630
7764 "This closes the inotify handle which was previously opened by inotify_init. "
7765 "It removes all watches, throws away any pending events, and deallocates all "
7770 #: ../fish/guestfish-actions.pod:1715
7771 msgid "inotify-files"
7775 #: ../fish/guestfish-actions.pod:1717
7783 #: ../fish/guestfish-actions.pod:1719
7785 "This function is a helpful wrapper around L</inotify-read> which just "
7786 "returns a list of pathnames of objects that were touched. The returned "
7787 "pathnames are sorted and deduplicated."
7791 #: ../fish/guestfish-actions.pod:1723
7792 msgid "inotify-init"
7796 #: ../fish/guestfish-actions.pod:1725
7799 " inotify-init maxevents\n"
7804 #: ../fish/guestfish-actions.pod:1727 ../src/guestfs-actions.pod:2659
7806 "This command creates a new inotify handle. The inotify subsystem can be "
7807 "used to notify events which happen to objects in the guest filesystem."
7811 #: ../fish/guestfish-actions.pod:1731
7813 "C<maxevents> is the maximum number of events which will be queued up between "
7814 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
7815 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
7816 "default was 16384 events. Beyond this limit, the kernel throws away events, "
7817 "but records the fact that it threw them away by setting a flag "
7818 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
7822 #: ../fish/guestfish-actions.pod:1741
7824 "Before any events are generated, you have to add some watches to the "
7825 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
7826 "L</inotify-watch-all>."
7830 #: ../fish/guestfish-actions.pod:1747
7832 "Queued up events should be read periodically by calling L</inotify-read> (or "
7833 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
7834 "If you don't read the events out often enough then you risk the internal "
7835 "queue overflowing."
7839 #: ../fish/guestfish-actions.pod:1754
7841 "The handle should be closed after use by calling L</inotify-close>. This "
7842 "also removes any watches automatically."
7846 #: ../fish/guestfish-actions.pod:1758 ../src/guestfs-actions.pod:2690
7848 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7849 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7850 "that there is one global inotify handle per libguestfs instance."
7854 #: ../fish/guestfish-actions.pod:1763
7855 msgid "inotify-read"
7859 #: ../fish/guestfish-actions.pod:1765
7867 #: ../fish/guestfish-actions.pod:1767 ../src/guestfs-actions.pod:2704
7869 "Return the complete queue of events that have happened since the previous "
7874 #: ../fish/guestfish-actions.pod:1770 ../src/guestfs-actions.pod:2707
7875 msgid "If no events have happened, this returns an empty list."
7879 #: ../fish/guestfish-actions.pod:1772 ../src/guestfs-actions.pod:2709
7881 "I<Note>: In order to make sure that all events have been read, you must call "
7882 "this function repeatedly until it returns an empty list. The reason is that "
7883 "the call will read events up to the maximum appliance-to-host message size "
7884 "and leave remaining events in the queue."
7888 #: ../fish/guestfish-actions.pod:1778
7889 msgid "inotify-rm-watch"
7893 #: ../fish/guestfish-actions.pod:1780
7896 " inotify-rm-watch wd\n"
7901 #: ../fish/guestfish-actions.pod:1782
7902 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
7906 #: ../fish/guestfish-actions.pod:1785
7907 msgid "inspect-get-arch"
7911 #: ../fish/guestfish-actions.pod:1787
7914 " inspect-get-arch root\n"
7919 #: ../fish/guestfish-actions.pod:1789
7921 "This returns the architecture of the inspected operating system. The "
7922 "possible return values are listed under L</file-architecture>."
7926 #: ../fish/guestfish-actions.pod:1793 ../src/guestfs-actions.pod:2744
7928 "If the architecture could not be determined, then the string C<unknown> is "
7933 #: ../fish/guestfish-actions.pod:1796 ../fish/guestfish-actions.pod:1883 ../fish/guestfish-actions.pod:1962 ../fish/guestfish-actions.pod:1974 ../fish/guestfish-actions.pod:2058 ../fish/guestfish-actions.pod:2119 ../fish/guestfish-actions.pod:2140 ../fish/guestfish-actions.pod:2154 ../fish/guestfish-actions.pod:2194 ../fish/guestfish-actions.pod:2226 ../fish/guestfish-actions.pod:2239 ../fish/guestfish-actions.pod:2252 ../fish/guestfish-actions.pod:2262 ../fish/guestfish-actions.pod:2272 ../fish/guestfish-actions.pod:2284 ../fish/guestfish-actions.pod:2380 ../fish/guestfish-actions.pod:2414 ../src/guestfs-actions.pod:2747 ../src/guestfs-actions.pod:2841 ../src/guestfs-actions.pod:2945 ../src/guestfs-actions.pod:2964 ../src/guestfs-actions.pod:3095 ../src/guestfs-actions.pod:3178 ../src/guestfs-actions.pod:3206 ../src/guestfs-actions.pod:3227 ../src/guestfs-actions.pod:3280 ../src/guestfs-actions.pod:3320 ../src/guestfs-actions.pod:3340 ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:3377 ../src/guestfs-actions.pod:3393 ../src/guestfs-actions.pod:3411 ../src/guestfs-actions.pod:3513 ../src/guestfs-actions.pod:3554
7934 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7938 #: ../fish/guestfish-actions.pod:1798
7939 msgid "inspect-get-distro"
7943 #: ../fish/guestfish-actions.pod:1800
7946 " inspect-get-distro root\n"
7951 #: ../fish/guestfish-actions.pod:1802 ../src/guestfs-actions.pod:2760
7952 msgid "This returns the distro (distribution) of the inspected operating system."
7956 #: ../fish/guestfish-actions.pod:1805 ../src/guestfs-actions.pod:2763
7957 msgid "Currently defined distros are:"
7961 #: ../fish/guestfish-actions.pod:1809 ../src/guestfs-actions.pod:2767
7962 msgid "\"archlinux\""
7966 #: ../fish/guestfish-actions.pod:1811 ../src/guestfs-actions.pod:2769
7971 #: ../fish/guestfish-actions.pod:1813 ../src/guestfs-actions.pod:2771
7976 #: ../fish/guestfish-actions.pod:1815 ../src/guestfs-actions.pod:2773
7981 #: ../fish/guestfish-actions.pod:1817 ../src/guestfs-actions.pod:2775
7986 #: ../fish/guestfish-actions.pod:1819 ../src/guestfs-actions.pod:2777
7991 #: ../fish/guestfish-actions.pod:1821 ../src/guestfs-actions.pod:2779
7996 #: ../fish/guestfish-actions.pod:1823 ../src/guestfs-actions.pod:2781
8001 #: ../fish/guestfish-actions.pod:1825 ../src/guestfs-actions.pod:2783
8006 #: ../fish/guestfish-actions.pod:1827 ../src/guestfs-actions.pod:2785
8011 #: ../fish/guestfish-actions.pod:1829 ../src/guestfs-actions.pod:2787
8012 msgid "\"linuxmint\""
8016 #: ../fish/guestfish-actions.pod:1831 ../src/guestfs-actions.pod:2789
8021 #: ../fish/guestfish-actions.pod:1833 ../src/guestfs-actions.pod:2791
8022 msgid "\"mandriva\""
8026 #: ../fish/guestfish-actions.pod:1835 ../src/guestfs-actions.pod:2793
8031 #: ../fish/guestfish-actions.pod:1837 ../src/guestfs-actions.pod:2795
8036 #: ../fish/guestfish-actions.pod:1839 ../src/guestfs-actions.pod:2797
8041 #: ../fish/guestfish-actions.pod:1841 ../src/guestfs-actions.pod:2799
8046 #: ../fish/guestfish-actions.pod:1843 ../src/guestfs-actions.pod:2801
8051 #: ../fish/guestfish-actions.pod:1845 ../src/guestfs-actions.pod:2803
8052 msgid "\"redhat-based\""
8056 #: ../fish/guestfish-actions.pod:1847 ../src/guestfs-actions.pod:2805
8057 msgid "Some Red Hat-derived distro."
8061 #: ../fish/guestfish-actions.pod:1849 ../src/guestfs-actions.pod:2807
8066 #: ../fish/guestfish-actions.pod:1851 ../src/guestfs-actions.pod:2809
8067 msgid "Red Hat Enterprise Linux."
8071 #: ../fish/guestfish-actions.pod:1853 ../src/guestfs-actions.pod:2811
8072 msgid "\"scientificlinux\""
8076 #: ../fish/guestfish-actions.pod:1855 ../src/guestfs-actions.pod:2813
8077 msgid "Scientific Linux."
8081 #: ../fish/guestfish-actions.pod:1857 ../src/guestfs-actions.pod:2815
8082 msgid "\"slackware\""
8086 #: ../fish/guestfish-actions.pod:1859 ../src/guestfs-actions.pod:2817
8091 #: ../fish/guestfish-actions.pod:1861 ../src/guestfs-actions.pod:2819
8092 msgid "\"ttylinux\""
8096 #: ../fish/guestfish-actions.pod:1863 ../src/guestfs-actions.pod:2821
8101 #: ../fish/guestfish-actions.pod:1865 ../src/guestfs-actions.pod:2823
8106 #: ../fish/guestfish-actions.pod:1867 ../src/guestfs-actions.pod:2825
8111 #: ../fish/guestfish-actions.pod:1869 ../fish/guestfish-actions.pod:1953 ../fish/guestfish-actions.pod:2217 ../src/guestfs-actions.pod:2827 ../src/guestfs-actions.pod:2936 ../src/guestfs-actions.pod:3311
8116 #: ../fish/guestfish-actions.pod:1871 ../src/guestfs-actions.pod:2829
8117 msgid "The distro could not be determined."
8121 #: ../fish/guestfish-actions.pod:1873 ../fish/guestfish-actions.pod:2209 ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:3303
8126 #: ../fish/guestfish-actions.pod:1875 ../src/guestfs-actions.pod:2833
8128 "Windows does not have distributions. This string is returned if the OS type "
8133 #: ../fish/guestfish-actions.pod:1880 ../fish/guestfish-actions.pod:1959 ../fish/guestfish-actions.pod:2223 ../src/guestfs-actions.pod:2838 ../src/guestfs-actions.pod:2942 ../src/guestfs-actions.pod:3317
8135 "Future versions of libguestfs may return other strings here. The caller "
8136 "should be prepared to handle any string."
8140 #: ../fish/guestfish-actions.pod:1885
8141 msgid "inspect-get-drive-mappings"
8145 #: ../fish/guestfish-actions.pod:1887
8148 " inspect-get-drive-mappings root\n"
8153 #: ../fish/guestfish-actions.pod:1889 ../src/guestfs-actions.pod:2854
8155 "This call is useful for Windows which uses a primitive system of assigning "
8156 "drive letters (like \"C:\") to partitions. This inspection API examines the "
8157 "Windows Registry to find out how disks/partitions are mapped to drive "
8158 "letters, and returns a hash table as in the example below:"
8162 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:2860
8172 #: ../fish/guestfish-actions.pod:1899 ../src/guestfs-actions.pod:2864
8174 "Note that keys are drive letters. For Windows, the key is case insensitive "
8175 "and just contains the drive letter, without the customary colon separator "
8180 #: ../fish/guestfish-actions.pod:1903 ../src/guestfs-actions.pod:2868
8182 "In future we may support other operating systems that also used drive "
8183 "letters, but the keys for those might not be case insensitive and might be "
8184 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
8189 #: ../fish/guestfish-actions.pod:1908 ../src/guestfs-actions.pod:2873
8191 "For Windows guests, currently only hard drive mappings are returned. "
8192 "Removable disks (eg. DVD-ROMs) are ignored."
8196 #: ../fish/guestfish-actions.pod:1911 ../src/guestfs-actions.pod:2876
8198 "For guests that do not use drive mappings, or if the drive mappings could "
8199 "not be determined, this returns an empty hash table."
8203 #: ../fish/guestfish-actions.pod:1914
8205 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8206 "L</inspect-get-mountpoints>, L</inspect-get-filesystems>."
8210 #: ../fish/guestfish-actions.pod:1918
8211 msgid "inspect-get-filesystems"
8215 #: ../fish/guestfish-actions.pod:1920
8218 " inspect-get-filesystems root\n"
8223 #: ../fish/guestfish-actions.pod:1922 ../src/guestfs-actions.pod:2897
8225 "This returns a list of all the filesystems that we think are associated with "
8226 "this operating system. This includes the root filesystem, other ordinary "
8227 "filesystems, and non-mounted devices like swap partitions."
8231 #: ../fish/guestfish-actions.pod:1927 ../src/guestfs-actions.pod:2902
8233 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8234 "to be shared between operating systems."
8238 #: ../fish/guestfish-actions.pod:1930
8240 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8241 "L</inspect-get-mountpoints>."
8245 #: ../fish/guestfish-actions.pod:1933
8246 msgid "inspect-get-format"
8250 #: ../fish/guestfish-actions.pod:1935
8253 " inspect-get-format root\n"
8258 #: ../fish/guestfish-actions.pod:1937 ../src/guestfs-actions.pod:2920
8260 "This returns the format of the inspected operating system. You can use it "
8261 "to detect install images, live CDs and similar."
8265 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:2923
8266 msgid "Currently defined formats are:"
8270 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:2927
8271 msgid "\"installed\""
8275 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:2929
8276 msgid "This is an installed operating system."
8280 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:2931
8281 msgid "\"installer\""
8285 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:2933
8287 "The disk image being inspected is not an installed operating system, but a "
8288 "I<bootable> install disk, live CD, or similar."
8292 #: ../fish/guestfish-actions.pod:1955 ../src/guestfs-actions.pod:2938
8293 msgid "The format of this disk image is not known."
8297 #: ../fish/guestfish-actions.pod:1964
8298 msgid "inspect-get-hostname"
8302 #: ../fish/guestfish-actions.pod:1966
8305 " inspect-get-hostname root\n"
8310 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:2958
8312 "This function returns the hostname of the operating system as found by "
8313 "inspection of the guest's configuration files."
8317 #: ../fish/guestfish-actions.pod:1971 ../src/guestfs-actions.pod:2961
8319 "If the hostname could not be determined, then the string C<unknown> is "
8324 #: ../fish/guestfish-actions.pod:1976
8325 msgid "inspect-get-icon"
8329 #: ../fish/guestfish-actions.pod:1978
8332 " inspect-get-icon root [favicon:..] [highquality:..]\n"
8337 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:2987
8339 "This function returns an icon corresponding to the inspected operating "
8340 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
8341 "to PNG if necessary)."
8345 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:2991
8347 "If it was not possible to get an icon this function returns a zero-length "
8348 "(non-NULL) buffer. I<Callers must check for this case>."
8352 #: ../fish/guestfish-actions.pod:1987 ../src/guestfs-actions.pod:2994
8354 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
8355 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
8356 "this file will be returned. You can disable favicons by passing the "
8357 "optional C<favicon> boolean as false (default is true)."
8361 #: ../fish/guestfish-actions.pod:1993 ../src/guestfs-actions.pod:3000
8363 "If finding the favicon fails, then we look in other places in the guest for "
8368 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3003
8370 "If the optional C<highquality> boolean is true then only high quality icons "
8371 "are returned, which means only icons of high resolution with an alpha "
8372 "channel. The default (false) is to return any icon we can, even if it is of "
8373 "substandard quality."
8377 #: ../fish/guestfish-actions.pod:2007 ../src/guestfs-actions.pod:3014
8379 "Unlike most other inspection API calls, the guest's disks must be mounted up "
8380 "before you call this, since it needs to read information from the guest "
8381 "filesystem during the call."
8385 #: ../fish/guestfish-actions.pod:2013 ../src/guestfs-actions.pod:3020
8387 "B<Security:> The icon data comes from the untrusted guest, and should be "
8388 "treated with caution. PNG files have been known to contain exploits. "
8389 "Ensure that libpng (or other relevant libraries) are fully up to date before "
8390 "trying to process or display the icon."
8394 #: ../fish/guestfish-actions.pod:2021 ../src/guestfs-actions.pod:3028
8396 "The PNG image returned can be any size. It might not be square. Libguestfs "
8397 "tries to return the largest, highest quality icon available. The "
8398 "application must scale the icon to the required size."
8402 #: ../fish/guestfish-actions.pod:2028 ../src/guestfs-actions.pod:3035
8404 "Extracting icons from Windows guests requires the external C<wrestool> "
8405 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
8406 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
8407 "installed separately."
8411 #: ../fish/guestfish-actions.pod:2035 ../src/guestfs-actions.pod:3042
8413 "Operating system icons are usually trademarks. Seek legal advice before "
8414 "using trademarks in applications."
8418 #: ../fish/guestfish-actions.pod:2042
8419 msgid "inspect-get-major-version"
8423 #: ../fish/guestfish-actions.pod:2044
8426 " inspect-get-major-version root\n"
8431 #: ../fish/guestfish-actions.pod:2046 ../src/guestfs-actions.pod:3083
8432 msgid "This returns the major version number of the inspected operating system."
8436 #: ../fish/guestfish-actions.pod:2049 ../src/guestfs-actions.pod:3086
8438 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8439 "popular public names used by the operating system. Notably the operating "
8440 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8441 "1). You can find out the real versions corresponding to releases of Windows "
8442 "by consulting Wikipedia or MSDN."
8446 #: ../fish/guestfish-actions.pod:2056 ../fish/guestfish-actions.pod:2067 ../src/guestfs-actions.pod:3093 ../src/guestfs-actions.pod:3110
8447 msgid "If the version could not be determined, then C<0> is returned."
8451 #: ../fish/guestfish-actions.pod:2060
8452 msgid "inspect-get-minor-version"
8456 #: ../fish/guestfish-actions.pod:2062
8459 " inspect-get-minor-version root\n"
8464 #: ../fish/guestfish-actions.pod:2064 ../src/guestfs-actions.pod:3107
8465 msgid "This returns the minor version number of the inspected operating system."
8469 #: ../fish/guestfish-actions.pod:2069
8471 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8472 "L</inspect-get-major-version>."
8476 #: ../fish/guestfish-actions.pod:2072
8477 msgid "inspect-get-mountpoints"
8481 #: ../fish/guestfish-actions.pod:2074
8484 " inspect-get-mountpoints root\n"
8489 #: ../fish/guestfish-actions.pod:2076 ../src/guestfs-actions.pod:3125
8491 "This returns a hash of where we think the filesystems associated with this "
8492 "operating system should be mounted. Callers should note that this is at "
8493 "best an educated guess made by reading configuration files such as "
8494 "C</etc/fstab>. I<In particular note> that this may return filesystems which "
8495 "are non-existent or not mountable and callers should be prepared to handle "
8496 "or ignore failures if they try to mount them."
8500 #: ../fish/guestfish-actions.pod:2085 ../src/guestfs-actions.pod:3134
8502 "Each element in the returned hashtable has a key which is the path of the "
8503 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8504 "mounted there (eg. C</dev/sda1>)."
8508 #: ../fish/guestfish-actions.pod:2090 ../src/guestfs-actions.pod:3139
8509 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
8513 #: ../fish/guestfish-actions.pod:2093
8515 "For operating systems like Windows which still use drive letters, this call "
8516 "will only return an entry for the first drive \"mounted on\" C</>. For "
8517 "information about the mapping of drive letters to partitions, see "
8518 "L</inspect-get-drive-mappings>."
8522 #: ../fish/guestfish-actions.pod:2099
8524 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8525 "L</inspect-get-filesystems>."
8529 #: ../fish/guestfish-actions.pod:2102
8530 msgid "inspect-get-package-format"
8534 #: ../fish/guestfish-actions.pod:2104
8537 " inspect-get-package-format root\n"
8542 #: ../fish/guestfish-actions.pod:2106
8544 "This function and L</inspect-get-package-management> return the package "
8545 "format and package management tool used by the inspected operating system. "
8546 "For example for Fedora these functions would return C<rpm> (package format) "
8547 "and C<yum> (package management)."
8551 #: ../fish/guestfish-actions.pod:2112 ../src/guestfs-actions.pod:3171
8553 "This returns the string C<unknown> if we could not determine the package "
8554 "format I<or> if the operating system does not have a real packaging system "
8559 #: ../fish/guestfish-actions.pod:2116 ../src/guestfs-actions.pod:3175
8561 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
8562 "Future versions of libguestfs may return other strings."
8566 #: ../fish/guestfish-actions.pod:2121
8567 msgid "inspect-get-package-management"
8571 #: ../fish/guestfish-actions.pod:2123
8574 " inspect-get-package-management root\n"
8579 #: ../fish/guestfish-actions.pod:2125
8581 "L</inspect-get-package-format> and this function return the package format "
8582 "and package management tool used by the inspected operating system. For "
8583 "example for Fedora these functions would return C<rpm> (package format) and "
8584 "C<yum> (package management)."
8588 #: ../fish/guestfish-actions.pod:2131 ../src/guestfs-actions.pod:3197
8590 "This returns the string C<unknown> if we could not determine the package "
8591 "management tool I<or> if the operating system does not have a real packaging "
8592 "system (eg. Windows)."
8596 #: ../fish/guestfish-actions.pod:2135 ../src/guestfs-actions.pod:3201
8598 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
8599 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
8600 "libguestfs may return other strings."
8604 #: ../fish/guestfish-actions.pod:2142
8605 msgid "inspect-get-product-name"
8609 #: ../fish/guestfish-actions.pod:2144
8612 " inspect-get-product-name root\n"
8617 #: ../fish/guestfish-actions.pod:2146 ../src/guestfs-actions.pod:3219
8619 "This returns the product name of the inspected operating system. The "
8620 "product name is generally some freeform string which can be displayed to the "
8621 "user, but should not be parsed by programs."
8625 #: ../fish/guestfish-actions.pod:2151 ../src/guestfs-actions.pod:3224
8627 "If the product name could not be determined, then the string C<unknown> is "
8632 #: ../fish/guestfish-actions.pod:2156
8633 msgid "inspect-get-product-variant"
8637 #: ../fish/guestfish-actions.pod:2158
8640 " inspect-get-product-variant root\n"
8645 #: ../fish/guestfish-actions.pod:2160 ../src/guestfs-actions.pod:3240
8646 msgid "This returns the product variant of the inspected operating system."
8650 #: ../fish/guestfish-actions.pod:2163 ../src/guestfs-actions.pod:3243
8652 "For Windows guests, this returns the contents of the Registry key "
8653 "C<HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> "
8654 "which is usually a string such as C<Client> or C<Server> (other values are "
8655 "possible). This can be used to distinguish consumer and enterprise versions "
8656 "of Windows that have the same version number (for example, Windows 7 and "
8657 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
8658 "the latter is C<Server>)."
8662 #: ../fish/guestfish-actions.pod:2172 ../src/guestfs-actions.pod:3252
8664 "For enterprise Linux guests, in future we intend this to return the product "
8665 "variant such as C<Desktop>, C<Server> and so on. But this is not "
8666 "implemented at present."
8670 #: ../fish/guestfish-actions.pod:2176 ../src/guestfs-actions.pod:3256
8672 "If the product variant could not be determined, then the string C<unknown> "
8677 #: ../fish/guestfish-actions.pod:2179
8679 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8680 "L</inspect-get-product-name>, L</inspect-get-major-version>."
8684 #: ../fish/guestfish-actions.pod:2183
8685 msgid "inspect-get-roots"
8689 #: ../fish/guestfish-actions.pod:2185
8692 " inspect-get-roots\n"
8697 #: ../fish/guestfish-actions.pod:2187
8699 "This function is a convenient way to get the list of root devices, as "
8700 "returned from a previous call to L</inspect-os>, but without redoing the "
8701 "whole inspection process."
8705 #: ../fish/guestfish-actions.pod:2191
8707 "This returns an empty list if either no root devices were found or the "
8708 "caller has not called L</inspect-os>."
8712 #: ../fish/guestfish-actions.pod:2196
8713 msgid "inspect-get-type"
8717 #: ../fish/guestfish-actions.pod:2198
8720 " inspect-get-type root\n"
8725 #: ../fish/guestfish-actions.pod:2200 ../src/guestfs-actions.pod:3294
8727 "This returns the type of the inspected operating system. Currently defined "
8732 #: ../fish/guestfish-actions.pod:2205 ../src/guestfs-actions.pod:3299
8737 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3301
8738 msgid "Any Linux-based operating system."
8742 #: ../fish/guestfish-actions.pod:2211 ../src/guestfs-actions.pod:3305
8743 msgid "Any Microsoft Windows operating system."
8747 #: ../fish/guestfish-actions.pod:2213 ../src/guestfs-actions.pod:3307
8752 #: ../fish/guestfish-actions.pod:2215 ../src/guestfs-actions.pod:3309
8757 #: ../fish/guestfish-actions.pod:2219 ../src/guestfs-actions.pod:3313
8758 msgid "The operating system type could not be determined."
8762 #: ../fish/guestfish-actions.pod:2228
8763 msgid "inspect-get-windows-current-control-set"
8767 #: ../fish/guestfish-actions.pod:2230
8770 " inspect-get-windows-current-control-set root\n"
8775 #: ../fish/guestfish-actions.pod:2232 ../src/guestfs-actions.pod:3333
8777 "This returns the Windows CurrentControlSet of the inspected guest. The "
8778 "CurrentControlSet is a registry key name such as C<ControlSet001>."
8782 #: ../fish/guestfish-actions.pod:2235 ../src/guestfs-actions.pod:3336
8784 "This call assumes that the guest is Windows and that the Registry could be "
8785 "examined by inspection. If this is not the case then an error is returned."
8789 #: ../fish/guestfish-actions.pod:2241
8790 msgid "inspect-get-windows-systemroot"
8794 #: ../fish/guestfish-actions.pod:2243
8797 " inspect-get-windows-systemroot root\n"
8802 #: ../fish/guestfish-actions.pod:2245 ../src/guestfs-actions.pod:3353
8804 "This returns the Windows systemroot of the inspected guest. The systemroot "
8805 "is a directory path such as C</WINDOWS>."
8809 #: ../fish/guestfish-actions.pod:2248 ../src/guestfs-actions.pod:3356
8811 "This call assumes that the guest is Windows and that the systemroot could be "
8812 "determined by inspection. If this is not the case then an error is "
8817 #: ../fish/guestfish-actions.pod:2254
8818 msgid "inspect-is-live"
8822 #: ../fish/guestfish-actions.pod:2256
8825 " inspect-is-live root\n"
8830 #: ../fish/guestfish-actions.pod:2258
8832 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
8833 "then this returns true if a live image was detected on the disk."
8837 #: ../fish/guestfish-actions.pod:2264
8838 msgid "inspect-is-multipart"
8842 #: ../fish/guestfish-actions.pod:2266
8845 " inspect-is-multipart root\n"
8850 #: ../fish/guestfish-actions.pod:2268
8852 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
8853 "then this returns true if the disk is part of a set."
8857 #: ../fish/guestfish-actions.pod:2274
8858 msgid "inspect-is-netinst"
8862 #: ../fish/guestfish-actions.pod:2276
8865 " inspect-is-netinst root\n"
8870 #: ../fish/guestfish-actions.pod:2278
8872 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
8873 "then this returns true if the disk is a network installer, ie. not a "
8874 "self-contained install CD but one which is likely to require network access "
8875 "to complete the install."
8879 #: ../fish/guestfish-actions.pod:2286
8880 msgid "inspect-list-applications"
8884 #: ../fish/guestfish-actions.pod:2288
8887 " inspect-list-applications root\n"
8892 #: ../fish/guestfish-actions.pod:2290 ../src/guestfs-actions.pod:3423
8893 msgid "Return the list of applications installed in the operating system."
8897 #: ../fish/guestfish-actions.pod:2292
8899 "I<Note:> This call works differently from other parts of the inspection "
8900 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
8901 "then mount up the disks, before calling this. Listing applications is a "
8902 "significantly more difficult operation which requires access to the full "
8903 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
8904 "are just returning data cached in the libguestfs handle, this call actually "
8905 "reads parts of the mounted filesystems during the call."
8909 #: ../fish/guestfish-actions.pod:2302 ../src/guestfs-actions.pod:3435
8911 "This returns an empty list if the inspection code was not able to determine "
8912 "the list of applications."
8916 #: ../fish/guestfish-actions.pod:2305 ../src/guestfs-actions.pod:3438
8917 msgid "The application structure contains the following fields:"
8921 #: ../fish/guestfish-actions.pod:2309 ../src/guestfs-actions.pod:3442
8926 #: ../fish/guestfish-actions.pod:2311 ../src/guestfs-actions.pod:3444
8928 "The name of the application. For Red Hat-derived and Debian-derived Linux "
8929 "guests, this is the package name."
8933 #: ../fish/guestfish-actions.pod:2314 ../src/guestfs-actions.pod:3447
8934 msgid "C<app_display_name>"
8938 #: ../fish/guestfish-actions.pod:2316 ../src/guestfs-actions.pod:3449
8940 "The display name of the application, sometimes localized to the install "
8941 "language of the guest operating system."
8945 #: ../fish/guestfish-actions.pod:2319 ../src/guestfs-actions.pod:3452
8947 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
8948 "to display something can use C<app_name> instead."
8952 #: ../fish/guestfish-actions.pod:2322 ../src/guestfs-actions.pod:3455
8953 msgid "C<app_epoch>"
8957 #: ../fish/guestfish-actions.pod:2324 ../src/guestfs-actions.pod:3457
8959 "For package managers which use epochs, this contains the epoch of the "
8960 "package (an integer). If unavailable, this is returned as C<0>."
8964 #: ../fish/guestfish-actions.pod:2327 ../src/guestfs-actions.pod:3460
8965 msgid "C<app_version>"
8969 #: ../fish/guestfish-actions.pod:2329 ../src/guestfs-actions.pod:3462
8971 "The version string of the application or package. If unavailable this is "
8972 "returned as an empty string C<\"\">."
8976 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3465
8977 msgid "C<app_release>"
8981 #: ../fish/guestfish-actions.pod:2334 ../src/guestfs-actions.pod:3467
8983 "The release string of the application or package, for package managers that "
8984 "use this. If unavailable this is returned as an empty string C<\"\">."
8988 #: ../fish/guestfish-actions.pod:2338 ../src/guestfs-actions.pod:3471
8989 msgid "C<app_install_path>"
8993 #: ../fish/guestfish-actions.pod:2340 ../src/guestfs-actions.pod:3473
8995 "The installation path of the application (on operating systems such as "
8996 "Windows which use installation paths). This path is in the format used by "
8997 "the guest operating system, it is not a libguestfs path."
9001 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3478
9002 msgid "If unavailable this is returned as an empty string C<\"\">."
9006 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3480
9007 msgid "C<app_trans_path>"
9011 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3482
9013 "The install path translated into a libguestfs path. If unavailable this is "
9014 "returned as an empty string C<\"\">."
9018 #: ../fish/guestfish-actions.pod:2352 ../src/guestfs-actions.pod:3485
9019 msgid "C<app_publisher>"
9023 #: ../fish/guestfish-actions.pod:2354 ../src/guestfs-actions.pod:3487
9025 "The name of the publisher of the application, for package managers that use "
9026 "this. If unavailable this is returned as an empty string C<\"\">."
9030 #: ../fish/guestfish-actions.pod:2358 ../src/guestfs-actions.pod:3491
9035 #: ../fish/guestfish-actions.pod:2360 ../src/guestfs-actions.pod:3493
9037 "The URL (eg. upstream URL) of the application. If unavailable this is "
9038 "returned as an empty string C<\"\">."
9042 #: ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3496
9043 msgid "C<app_source_package>"
9047 #: ../fish/guestfish-actions.pod:2365 ../src/guestfs-actions.pod:3498
9049 "For packaging systems which support this, the name of the source package. "
9050 "If unavailable this is returned as an empty string C<\"\">."
9054 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3501
9055 msgid "C<app_summary>"
9059 #: ../fish/guestfish-actions.pod:2370 ../src/guestfs-actions.pod:3503
9061 "A short (usually one line) description of the application or package. If "
9062 "unavailable this is returned as an empty string C<\"\">."
9066 #: ../fish/guestfish-actions.pod:2373 ../src/guestfs-actions.pod:3506
9067 msgid "C<app_description>"
9071 #: ../fish/guestfish-actions.pod:2375 ../src/guestfs-actions.pod:3508
9073 "A longer description of the application or package. If unavailable this is "
9074 "returned as an empty string C<\"\">."
9078 #: ../fish/guestfish-actions.pod:2382
9083 #: ../fish/guestfish-actions.pod:2384
9091 #: ../fish/guestfish-actions.pod:2386 ../src/guestfs-actions.pod:3526
9093 "This function uses other libguestfs functions and certain heuristics to "
9094 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
9095 "for operating systems."
9099 #: ../fish/guestfish-actions.pod:2390 ../src/guestfs-actions.pod:3530
9100 msgid "The list returned is empty if no operating systems were found."
9104 #: ../fish/guestfish-actions.pod:2392 ../src/guestfs-actions.pod:3532
9106 "If one operating system was found, then this returns a list with a single "
9107 "element, which is the name of the root filesystem of this operating system. "
9108 "It is also possible for this function to return a list containing more than "
9109 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
9110 "element being the root filesystem of one of the operating systems."
9114 #: ../fish/guestfish-actions.pod:2399
9116 "You can pass the root string(s) returned to other L</inspect-get-*> "
9117 "functions in order to query further information about each operating system, "
9118 "such as the name and version."
9122 #: ../fish/guestfish-actions.pod:2404
9124 "This function uses other libguestfs features such as L</mount-ro> and "
9125 "L</umount-all> in order to mount and unmount filesystems and look at the "
9126 "contents. This should be called with no disks currently mounted. The "
9127 "function may also use Augeas, so any existing Augeas handle will be closed."
9131 #: ../fish/guestfish-actions.pod:2410 ../src/guestfs-actions.pod:3550
9133 "This function cannot decrypt encrypted disks. The caller must do that first "
9134 "(supplying the necessary keys) if the disk is encrypted."
9138 #: ../fish/guestfish-actions.pod:2416 ../fish/guestfish-actions.pod:2614 ../fish/guestfish-actions.pod:2673
9139 msgid "See also L</list-filesystems>."
9143 #: ../fish/guestfish-actions.pod:2418
9148 #: ../fish/guestfish-actions.pod:2420
9151 " is-blockdev path\n"
9156 #: ../fish/guestfish-actions.pod:2422 ../src/guestfs-actions.pod:3570
9158 "This returns C<true> if and only if there is a block device with the given "
9163 #: ../fish/guestfish-actions.pod:2425 ../fish/guestfish-actions.pod:2443 ../fish/guestfish-actions.pod:2462 ../fish/guestfish-actions.pod:2471 ../fish/guestfish-actions.pod:2481 ../fish/guestfish-actions.pod:2515 ../fish/guestfish-actions.pod:2524
9164 msgid "See also L</stat>."
9168 #: ../fish/guestfish-actions.pod:2427
9173 #: ../fish/guestfish-actions.pod:2429
9181 #: ../fish/guestfish-actions.pod:2431 ../src/guestfs-actions.pod:3584
9183 "This returns true iff this handle is busy processing a command (in the "
9188 #: ../fish/guestfish-actions.pod:2436
9193 #: ../fish/guestfish-actions.pod:2438
9196 " is-chardev path\n"
9201 #: ../fish/guestfish-actions.pod:2440 ../src/guestfs-actions.pod:3599
9203 "This returns C<true> if and only if there is a character device with the "
9204 "given C<path> name."
9208 #: ../fish/guestfish-actions.pod:2445
9213 #: ../fish/guestfish-actions.pod:2447
9221 #: ../fish/guestfish-actions.pod:2449 ../src/guestfs-actions.pod:3613
9223 "This returns true iff this handle is being configured (in the C<CONFIG> "
9228 #: ../fish/guestfish-actions.pod:2454
9233 #: ../fish/guestfish-actions.pod:2456
9241 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3628
9243 "This returns C<true> if and only if there is a directory with the given "
9244 "C<path> name. Note that it returns false for other objects like files."
9248 #: ../fish/guestfish-actions.pod:2464
9253 #: ../fish/guestfish-actions.pod:2466
9261 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3644
9263 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
9264 "given C<path> name."
9268 #: ../fish/guestfish-actions.pod:2473
9273 #: ../fish/guestfish-actions.pod:2475
9281 #: ../fish/guestfish-actions.pod:2477 ../src/guestfs-actions.pod:3659
9283 "This returns C<true> if and only if there is a regular file with the given "
9284 "C<path> name. Note that it returns false for other objects like "
9289 #: ../fish/guestfish-actions.pod:2483
9290 msgid "is-launching"
9294 #: ../fish/guestfish-actions.pod:2485
9302 #: ../fish/guestfish-actions.pod:2487 ../src/guestfs-actions.pod:3674
9304 "This returns true iff this handle is launching the subprocess (in the "
9305 "C<LAUNCHING> state)."
9309 #: ../fish/guestfish-actions.pod:2492
9314 #: ../fish/guestfish-actions.pod:2494
9322 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3689
9324 "This command tests whether C<device> is a logical volume, and returns true "
9325 "iff this is the case."
9329 #: ../fish/guestfish-actions.pod:2499
9334 #: ../fish/guestfish-actions.pod:2501
9342 #: ../fish/guestfish-actions.pod:2503 ../src/guestfs-actions.pod:3701
9344 "This returns true iff this handle is ready to accept commands (in the "
9349 #: ../fish/guestfish-actions.pod:2508
9354 #: ../fish/guestfish-actions.pod:2510
9362 #: ../fish/guestfish-actions.pod:2512 ../src/guestfs-actions.pod:3716
9364 "This returns C<true> if and only if there is a Unix domain socket with the "
9365 "given C<path> name."
9369 #: ../fish/guestfish-actions.pod:2517
9374 #: ../fish/guestfish-actions.pod:2519
9377 " is-symlink path\n"
9382 #: ../fish/guestfish-actions.pod:2521 ../src/guestfs-actions.pod:3731
9384 "This returns C<true> if and only if there is a symbolic link with the given "
9389 #: ../fish/guestfish-actions.pod:2526
9394 #: ../fish/guestfish-actions.pod:2528
9402 #: ../fish/guestfish-actions.pod:2530 ../src/guestfs-actions.pod:3746
9404 "This returns true iff the file exists and the file is empty or it contains "
9409 #: ../fish/guestfish-actions.pod:2533
9410 msgid "is-zero-device"
9414 #: ../fish/guestfish-actions.pod:2535
9417 " is-zero-device device\n"
9422 #: ../fish/guestfish-actions.pod:2537 ../src/guestfs-actions.pod:3759
9423 msgid "This returns true iff the device exists and contains all zero bytes."
9427 #: ../fish/guestfish-actions.pod:2539 ../src/guestfs-actions.pod:3761
9428 msgid "Note that for large devices this can take a long time to run."
9432 #: ../fish/guestfish-actions.pod:2541
9433 msgid "kill-subprocess"
9437 #: ../fish/guestfish-actions.pod:2543
9440 " kill-subprocess\n"
9445 #: ../fish/guestfish-actions.pod:2545 ../src/guestfs-actions.pod:3772
9446 msgid "This kills the qemu subprocess. You should never need to call this."
9450 #: ../fish/guestfish-actions.pod:2547
9455 #: ../fish/guestfish-actions.pod:2549
9460 #: ../fish/guestfish-actions.pod:2551
9468 #: ../fish/guestfish-actions.pod:2553 ../src/guestfs-actions.pod:3783
9470 "Internally libguestfs is implemented by running a virtual machine using "
9475 #: ../fish/guestfish-actions.pod:2556 ../src/guestfs-actions.pod:3786
9477 "You should call this after configuring the handle (eg. adding drives) but "
9478 "before performing any actions."
9482 #: ../fish/guestfish-actions.pod:2559
9487 #: ../fish/guestfish-actions.pod:2561
9490 " lchown owner group path\n"
9495 #: ../fish/guestfish-actions.pod:2563
9497 "Change the file owner to C<owner> and group to C<group>. This is like "
9498 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
9503 #: ../fish/guestfish-actions.pod:2571
9508 #: ../fish/guestfish-actions.pod:2573
9511 " lgetxattr path name\n"
9516 #: ../fish/guestfish-actions.pod:2575 ../src/guestfs-actions.pod:3826
9518 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
9519 "is a symlink, then this call returns an extended attribute from the symlink."
9523 #: ../fish/guestfish-actions.pod:2589
9524 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
9528 #: ../fish/guestfish-actions.pod:2591
9533 #: ../fish/guestfish-actions.pod:2593
9536 " lgetxattrs path\n"
9541 #: ../fish/guestfish-actions.pod:2595
9543 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
9544 "it returns the extended attributes of the link itself."
9548 #: ../fish/guestfish-actions.pod:2599
9553 #: ../fish/guestfish-actions.pod:2601
9561 #: ../fish/guestfish-actions.pod:2603 ../src/guestfs-actions.pod:3869
9563 "List all 9p filesystems attached to the guest. A list of mount tags is "
9568 #: ../fish/guestfish-actions.pod:2606
9569 msgid "list-devices"
9573 #: ../fish/guestfish-actions.pod:2608
9581 #: ../fish/guestfish-actions.pod:2610 ../src/guestfs-actions.pod:3883
9582 msgid "List all the block devices."
9586 #: ../fish/guestfish-actions.pod:2612 ../src/guestfs-actions.pod:3885
9587 msgid "The full block device names are returned, eg. C</dev/sda>."
9591 #: ../fish/guestfish-actions.pod:2616
9592 msgid "list-dm-devices"
9596 #: ../fish/guestfish-actions.pod:2618
9599 " list-dm-devices\n"
9604 #: ../fish/guestfish-actions.pod:2620 ../src/guestfs-actions.pod:3900
9605 msgid "List all device mapper devices."
9609 #: ../fish/guestfish-actions.pod:2622
9611 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
9612 "previous call to L</luks-open>."
9616 #: ../fish/guestfish-actions.pod:2625
9618 "Device mapper devices which correspond to logical volumes are I<not> "
9619 "returned in this list. Call L</lvs> if you want to list logical volumes."
9623 #: ../fish/guestfish-actions.pod:2629
9624 msgid "list-filesystems"
9628 #: ../fish/guestfish-actions.pod:2631
9631 " list-filesystems\n"
9636 #: ../fish/guestfish-actions.pod:2633 ../src/guestfs-actions.pod:3920
9638 "This inspection command looks for filesystems on partitions, block devices "
9639 "and logical volumes, returning a list of devices containing filesystems and "
9644 #: ../fish/guestfish-actions.pod:2637 ../src/guestfs-actions.pod:3924
9646 "The return value is a hash, where the keys are the devices containing "
9647 "filesystems, and the values are the filesystem types. For example:"
9651 #: ../fish/guestfish-actions.pod:2641 ../src/guestfs-actions.pod:3928
9654 " \"/dev/sda1\" => \"ntfs\"\n"
9655 " \"/dev/sda2\" => \"ext2\"\n"
9656 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
9657 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
9662 #: ../fish/guestfish-actions.pod:2646 ../src/guestfs-actions.pod:3933
9664 "The value can have the special value \"unknown\", meaning the content of the "
9665 "device is undetermined or empty. \"swap\" means a Linux swap partition."
9669 #: ../fish/guestfish-actions.pod:2650
9671 "This command runs other libguestfs commands, which might include L</mount> "
9672 "and L</umount>, and therefore you should use this soon after launch and only "
9673 "when nothing is mounted."
9677 #: ../fish/guestfish-actions.pod:2654
9679 "Not all of the filesystems returned will be mountable. In particular, swap "
9680 "partitions are returned in the list. Also this command does not check that "
9681 "each filesystem found is valid and mountable, and some filesystems might be "
9682 "mountable but require special options. Filesystems may not all belong to a "
9683 "single logical operating system (use L</inspect-os> to look for OSes)."
9687 #: ../fish/guestfish-actions.pod:2662
9688 msgid "list-partitions"
9692 #: ../fish/guestfish-actions.pod:2664
9695 " list-partitions\n"
9700 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:3962
9701 msgid "List all the partitions detected on all block devices."
9705 #: ../fish/guestfish-actions.pod:2668 ../src/guestfs-actions.pod:3964
9706 msgid "The full partition device names are returned, eg. C</dev/sda1>"
9710 #: ../fish/guestfish-actions.pod:2670
9712 "This does not return logical volumes. For that you will need to call "
9717 #: ../fish/guestfish-actions.pod:2675
9722 #: ../fish/guestfish-actions.pod:2677
9730 #: ../fish/guestfish-actions.pod:2679 ../src/guestfs-actions.pod:3983
9732 "List the files in C<directory> (relative to the root directory, there is no "
9733 "cwd) in the format of 'ls -la'."
9737 #: ../fish/guestfish-actions.pod:2682 ../src/guestfs-actions.pod:3986
9739 "This command is mostly useful for interactive sessions. It is I<not> "
9740 "intended that you try to parse the output string."
9744 #: ../fish/guestfish-actions.pod:2685
9749 #: ../fish/guestfish-actions.pod:2687
9752 " ln target linkname\n"
9757 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:4001
9758 msgid "This command creates a hard link using the C<ln> command."
9762 #: ../fish/guestfish-actions.pod:2691
9767 #: ../fish/guestfish-actions.pod:2693
9770 " ln-f target linkname\n"
9775 #: ../fish/guestfish-actions.pod:2695 ../src/guestfs-actions.pod:4014
9777 "This command creates a hard link using the C<ln -f> command. The I<-f> "
9778 "option removes the link (C<linkname>) if it exists already."
9782 #: ../fish/guestfish-actions.pod:2698
9787 #: ../fish/guestfish-actions.pod:2700
9790 " ln-s target linkname\n"
9795 #: ../fish/guestfish-actions.pod:2702 ../src/guestfs-actions.pod:4028
9796 msgid "This command creates a symbolic link using the C<ln -s> command."
9800 #: ../fish/guestfish-actions.pod:2704
9805 #: ../fish/guestfish-actions.pod:2706
9808 " ln-sf target linkname\n"
9813 #: ../fish/guestfish-actions.pod:2708 ../src/guestfs-actions.pod:4041
9815 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
9816 "option removes the link (C<linkname>) if it exists already."
9820 #: ../fish/guestfish-actions.pod:2711
9821 msgid "lremovexattr"
9825 #: ../fish/guestfish-actions.pod:2713
9828 " lremovexattr xattr path\n"
9833 #: ../fish/guestfish-actions.pod:2715
9835 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
9836 "it removes an extended attribute of the link itself."
9840 #: ../fish/guestfish-actions.pod:2719
9845 #: ../fish/guestfish-actions.pod:2721
9853 #: ../fish/guestfish-actions.pod:2723 ../src/guestfs-actions.pod:4069
9855 "List the files in C<directory> (relative to the root directory, there is no "
9856 "cwd). The '.' and '..' entries are not returned, but hidden files are "
9861 #: ../fish/guestfish-actions.pod:2727
9863 "This command is mostly useful for interactive sessions. Programs should "
9864 "probably use L</readdir> instead."
9868 #: ../fish/guestfish-actions.pod:2730
9873 #: ../fish/guestfish-actions.pod:2732
9876 " lsetxattr xattr val vallen path\n"
9881 #: ../fish/guestfish-actions.pod:2734
9883 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
9884 "sets an extended attribute of the link itself."
9888 #: ../fish/guestfish-actions.pod:2738
9893 #: ../fish/guestfish-actions.pod:2740
9901 #: ../fish/guestfish-actions.pod:2742 ../fish/guestfish-actions.pod:4552 ../src/guestfs-actions.pod:4105 ../src/guestfs-actions.pod:6890
9902 msgid "Returns file information for the given C<path>."
9906 #: ../fish/guestfish-actions.pod:2744
9908 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
9909 "the link is stat-ed, not the file it refers to."
9913 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4111
9914 msgid "This is the same as the C<lstat(2)> system call."
9918 #: ../fish/guestfish-actions.pod:2750
9923 #: ../fish/guestfish-actions.pod:2752
9926 " lstatlist path 'names ...'\n"
9931 #: ../fish/guestfish-actions.pod:2754
9933 "This call allows you to perform the L</lstat> operation on multiple files, "
9934 "where all files are in the directory C<path>. C<names> is the list of files "
9935 "from this directory."
9939 #: ../fish/guestfish-actions.pod:2758 ../src/guestfs-actions.pod:4130
9941 "On return you get a list of stat structs, with a one-to-one correspondence "
9942 "to the C<names> list. If any name did not exist or could not be lstat'd, "
9943 "then the C<ino> field of that structure is set to C<-1>."
9947 #: ../fish/guestfish-actions.pod:2763
9949 "This call is intended for programs that want to efficiently list a directory "
9950 "contents without making many round-trips. See also L</lxattrlist> for a "
9951 "similarly efficient call for getting extended attributes. Very long "
9952 "directory listings might cause the protocol message size to be exceeded, "
9953 "causing this call to fail. The caller must split up such requests into "
9954 "smaller groups of names."
9958 #: ../fish/guestfish-actions.pod:2771
9959 msgid "luks-add-key"
9963 #: ../fish/guestfish-actions.pod:2773
9966 " luks-add-key device keyslot\n"
9971 #: ../fish/guestfish-actions.pod:2775 ../src/guestfs-actions.pod:4158
9973 "This command adds a new key on LUKS device C<device>. C<key> is any "
9974 "existing key, and is used to access the device. C<newkey> is the new key to "
9975 "add. C<keyslot> is the key slot that will be replaced."
9979 #: ../fish/guestfish-actions.pod:2780
9981 "Note that if C<keyslot> already contains a key, then this command will "
9982 "fail. You have to use L</luks-kill-slot> first to remove that key."
9986 #: ../fish/guestfish-actions.pod:2784 ../fish/guestfish-actions.pod:2806 ../fish/guestfish-actions.pod:2819 ../fish/guestfish-actions.pod:2833 ../fish/guestfish-actions.pod:2859 ../fish/guestfish-actions.pod:2869
9988 "This command has one or more key or passphrase parameters. Guestfish will "
9989 "prompt for these separately."
9993 #: ../fish/guestfish-actions.pod:2787
9998 #: ../fish/guestfish-actions.pod:2789
10001 " luks-close device\n"
10006 #: ../fish/guestfish-actions.pod:2791
10008 "This closes a LUKS device that was created earlier by L</luks-open> or "
10009 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
10010 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
10011 "underlying block device."
10015 #: ../fish/guestfish-actions.pod:2797
10016 msgid "luks-format"
10020 #: ../fish/guestfish-actions.pod:2799
10023 " luks-format device keyslot\n"
10028 #: ../fish/guestfish-actions.pod:2801 ../src/guestfs-actions.pod:4199
10030 "This command erases existing data on C<device> and formats the device as a "
10031 "LUKS encrypted device. C<key> is the initial key, which is added to key "
10032 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
10036 #: ../fish/guestfish-actions.pod:2809 ../fish/guestfish-actions.pod:2822 ../fish/guestfish-actions.pod:2909 ../fish/guestfish-actions.pod:3560 ../fish/guestfish-actions.pod:4086 ../fish/guestfish-actions.pod:4423 ../fish/guestfish-actions.pod:4446 ../fish/guestfish-actions.pod:4468 ../fish/guestfish-actions.pod:5214 ../src/guestfs-actions.pod:4206 ../src/guestfs-actions.pod:4229 ../src/guestfs-actions.pod:4372 ../src/guestfs-actions.pod:5465 ../src/guestfs-actions.pod:6253 ../src/guestfs-actions.pod:6704 ../src/guestfs-actions.pod:6734 ../src/guestfs-actions.pod:6767 ../src/guestfs-actions.pod:7966
10038 "B<This command is dangerous. Without careful use you can easily destroy all "
10043 #: ../fish/guestfish-actions.pod:2812
10044 msgid "luks-format-cipher"
10048 #: ../fish/guestfish-actions.pod:2814
10051 " luks-format-cipher device keyslot cipher\n"
10056 #: ../fish/guestfish-actions.pod:2816
10058 "This command is the same as L</luks-format> but it also allows you to set "
10059 "the C<cipher> used."
10063 #: ../fish/guestfish-actions.pod:2825
10064 msgid "luks-kill-slot"
10068 #: ../fish/guestfish-actions.pod:2827
10071 " luks-kill-slot device keyslot\n"
10076 #: ../fish/guestfish-actions.pod:2829 ../src/guestfs-actions.pod:4246
10078 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
10079 "device C<device>. C<key> must be one of the I<other> keys."
10083 #: ../fish/guestfish-actions.pod:2836
10088 #: ../fish/guestfish-actions.pod:2838
10091 " luks-open device mapname\n"
10096 #: ../fish/guestfish-actions.pod:2840 ../src/guestfs-actions.pod:4266
10098 "This command opens a block device which has been encrypted according to the "
10099 "Linux Unified Key Setup (LUKS) standard."
10103 #: ../fish/guestfish-actions.pod:2843 ../src/guestfs-actions.pod:4269
10104 msgid "C<device> is the encrypted block device or partition."
10108 #: ../fish/guestfish-actions.pod:2845 ../src/guestfs-actions.pod:4271
10110 "The caller must supply one of the keys associated with the LUKS block "
10111 "device, in the C<key> parameter."
10115 #: ../fish/guestfish-actions.pod:2848 ../src/guestfs-actions.pod:4274
10117 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
10118 "writes to this block device are decrypted from and encrypted to the "
10119 "underlying C<device> respectively."
10123 #: ../fish/guestfish-actions.pod:2852
10125 "If this block device contains LVM volume groups, then calling L</vgscan> "
10126 "followed by L</vg-activate-all> will make them visible."
10130 #: ../fish/guestfish-actions.pod:2856
10131 msgid "Use L</list-dm-devices> to list all device mapper devices."
10135 #: ../fish/guestfish-actions.pod:2862
10136 msgid "luks-open-ro"
10140 #: ../fish/guestfish-actions.pod:2864
10143 " luks-open-ro device mapname\n"
10148 #: ../fish/guestfish-actions.pod:2866
10150 "This is the same as L</luks-open> except that a read-only mapping is "
10155 #: ../fish/guestfish-actions.pod:2872
10160 #: ../fish/guestfish-actions.pod:2874
10163 " lvcreate logvol volgroup mbytes\n"
10168 #: ../fish/guestfish-actions.pod:2876 ../src/guestfs-actions.pod:4320
10170 "This creates an LVM logical volume called C<logvol> on the volume group "
10171 "C<volgroup>, with C<size> megabytes."
10175 #: ../fish/guestfish-actions.pod:2879
10176 msgid "lvm-canonical-lv-name"
10180 #: ../fish/guestfish-actions.pod:2881
10183 " lvm-canonical-lv-name lvname\n"
10188 #: ../fish/guestfish-actions.pod:2883 ../src/guestfs-actions.pod:4333
10190 "This converts alternative naming schemes for LVs that you might find to the "
10191 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
10196 #: ../fish/guestfish-actions.pod:2887 ../src/guestfs-actions.pod:4337
10198 "This command returns an error if the C<lvname> parameter does not refer to a "
10203 #: ../fish/guestfish-actions.pod:2890
10204 msgid "See also L</is-lv>."
10208 #: ../fish/guestfish-actions.pod:2892
10209 msgid "lvm-clear-filter"
10213 #: ../fish/guestfish-actions.pod:2894
10216 " lvm-clear-filter\n"
10221 #: ../fish/guestfish-actions.pod:2896
10223 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
10228 #: ../fish/guestfish-actions.pod:2899 ../fish/guestfish-actions.pod:2930 ../src/guestfs-actions.pod:4355 ../src/guestfs-actions.pod:4397
10229 msgid "This command also clears the LVM cache and performs a volume group scan."
10233 #: ../fish/guestfish-actions.pod:2902
10234 msgid "lvm-remove-all"
10238 #: ../fish/guestfish-actions.pod:2904
10241 " lvm-remove-all\n"
10246 #: ../fish/guestfish-actions.pod:2906 ../src/guestfs-actions.pod:4367
10248 "This command removes all LVM logical volumes, volume groups and physical "
10253 #: ../fish/guestfish-actions.pod:2912
10254 msgid "lvm-set-filter"
10258 #: ../fish/guestfish-actions.pod:2914
10261 " lvm-set-filter 'devices ...'\n"
10266 #: ../fish/guestfish-actions.pod:2916 ../src/guestfs-actions.pod:4383
10268 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
10269 "block devices in the list C<devices>, and will ignore all other attached "
10274 #: ../fish/guestfish-actions.pod:2920 ../src/guestfs-actions.pod:4387
10276 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
10277 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
10278 "there are two types of duplication possible: either cloned PVs/VGs which "
10279 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
10280 "same name. In normal operation you cannot create this situation, but you "
10281 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
10282 "inside the LVM metadata."
10286 #: ../fish/guestfish-actions.pod:2933 ../src/guestfs-actions.pod:4400
10287 msgid "You can filter whole block devices or individual partitions."
10291 #: ../fish/guestfish-actions.pod:2935 ../src/guestfs-actions.pod:4402
10293 "You cannot use this if any VG is currently in use (eg. contains a mounted "
10294 "filesystem), even if you are not filtering out that VG."
10298 #: ../fish/guestfish-actions.pod:2939
10303 #: ../fish/guestfish-actions.pod:2941
10306 " lvremove device\n"
10311 #: ../fish/guestfish-actions.pod:2943 ../src/guestfs-actions.pod:4416
10313 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
10314 "LV, such as C</dev/VG/LV>."
10318 #: ../fish/guestfish-actions.pod:2946 ../src/guestfs-actions.pod:4419
10320 "You can also remove all LVs in a volume group by specifying the VG name, "
10325 #: ../fish/guestfish-actions.pod:2949
10330 #: ../fish/guestfish-actions.pod:2951
10333 " lvrename logvol newlogvol\n"
10338 #: ../fish/guestfish-actions.pod:2953 ../src/guestfs-actions.pod:4433
10339 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
10343 #: ../fish/guestfish-actions.pod:2955
10348 #: ../fish/guestfish-actions.pod:2957
10351 " lvresize device mbytes\n"
10356 #: ../fish/guestfish-actions.pod:2959 ../src/guestfs-actions.pod:4446
10358 "This resizes (expands or shrinks) an existing LVM logical volume to "
10359 "C<mbytes>. When reducing, data in the reduced part is lost."
10363 #: ../fish/guestfish-actions.pod:2963
10364 msgid "lvresize-free"
10368 #: ../fish/guestfish-actions.pod:2965
10371 " lvresize-free lv percent\n"
10376 #: ../fish/guestfish-actions.pod:2967 ../src/guestfs-actions.pod:4461
10378 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
10379 "remaining free space in the volume group. Commonly you would call this with "
10380 "pc = 100 which expands the logical volume as much as possible, using all "
10381 "remaining free space in the volume group."
10385 #: ../fish/guestfish-actions.pod:2973
10390 #: ../fish/guestfish-actions.pod:2975
10398 #: ../fish/guestfish-actions.pod:2977 ../src/guestfs-actions.pod:4476
10400 "List all the logical volumes detected. This is the equivalent of the "
10401 "L<lvs(8)> command."
10405 #: ../fish/guestfish-actions.pod:2980 ../src/guestfs-actions.pod:4479
10407 "This returns a list of the logical volume device names "
10408 "(eg. C</dev/VolGroup00/LogVol00>)."
10412 #: ../fish/guestfish-actions.pod:2983
10413 msgid "See also L</lvs-full>, L</list-filesystems>."
10417 #: ../fish/guestfish-actions.pod:2985
10422 #: ../fish/guestfish-actions.pod:2987
10430 #: ../fish/guestfish-actions.pod:2989 ../src/guestfs-actions.pod:4495
10432 "List all the logical volumes detected. This is the equivalent of the "
10433 "L<lvs(8)> command. The \"full\" version includes all fields."
10437 #: ../fish/guestfish-actions.pod:2992
10442 #: ../fish/guestfish-actions.pod:2994
10450 #: ../fish/guestfish-actions.pod:2996 ../src/guestfs-actions.pod:4510
10451 msgid "This command returns the UUID of the LVM LV C<device>."
10455 #: ../fish/guestfish-actions.pod:2998
10460 #: ../fish/guestfish-actions.pod:3000
10463 " lxattrlist path 'names ...'\n"
10468 #: ../fish/guestfish-actions.pod:3002 ../src/guestfs-actions.pod:4524
10470 "This call allows you to get the extended attributes of multiple files, where "
10471 "all files are in the directory C<path>. C<names> is the list of files from "
10476 #: ../fish/guestfish-actions.pod:3006 ../src/guestfs-actions.pod:4528
10478 "On return you get a flat list of xattr structs which must be interpreted "
10479 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
10480 "C<attrval> in this struct is zero-length to indicate there was an error "
10481 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
10482 "number (the number of following attributes for this file, which could be "
10483 "C<\"0\">). Then after the first xattr struct are the zero or more "
10484 "attributes for the first named file. This repeats for the second and "
10485 "subsequent files."
10489 #: ../fish/guestfish-actions.pod:3016
10491 "This call is intended for programs that want to efficiently list a directory "
10492 "contents without making many round-trips. See also L</lstatlist> for a "
10493 "similarly efficient call for getting standard stats. Very long directory "
10494 "listings might cause the protocol message size to be exceeded, causing this "
10495 "call to fail. The caller must split up such requests into smaller groups of "
10500 #: ../fish/guestfish-actions.pod:3024
10505 #: ../fish/guestfish-actions.pod:3026
10513 #: ../fish/guestfish-actions.pod:3028 ../src/guestfs-actions.pod:4558
10514 msgid "Create a directory named C<path>."
10518 #: ../fish/guestfish-actions.pod:3030
10523 #: ../fish/guestfish-actions.pod:3032
10526 " mkdir-mode path mode\n"
10531 #: ../fish/guestfish-actions.pod:3034 ../src/guestfs-actions.pod:4571
10533 "This command creates a directory, setting the initial permissions of the "
10534 "directory to C<mode>."
10538 #: ../fish/guestfish-actions.pod:3037 ../src/guestfs-actions.pod:4574
10540 "For common Linux filesystems, the actual mode which is set will be C<mode & "
10541 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
10546 #: ../fish/guestfish-actions.pod:3041
10547 msgid "See also L</mkdir>, L</umask>"
10551 #: ../fish/guestfish-actions.pod:3043
10556 #: ../fish/guestfish-actions.pod:3045
10564 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4590
10566 "Create a directory named C<path>, creating any parent directories as "
10567 "necessary. This is like the C<mkdir -p> shell command."
10571 #: ../fish/guestfish-actions.pod:3050
10576 #: ../fish/guestfish-actions.pod:3052
10579 " mkdtemp template\n"
10584 #: ../fish/guestfish-actions.pod:3054 ../src/guestfs-actions.pod:4603
10586 "This command creates a temporary directory. The C<template> parameter "
10587 "should be a full pathname for the temporary directory name with the final "
10588 "six characters being \"XXXXXX\"."
10592 #: ../fish/guestfish-actions.pod:3059 ../src/guestfs-actions.pod:4608
10594 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
10595 "being suitable for Windows filesystems."
10599 #: ../fish/guestfish-actions.pod:3062 ../src/guestfs-actions.pod:4611
10600 msgid "The name of the temporary directory that was created is returned."
10604 #: ../fish/guestfish-actions.pod:3065 ../src/guestfs-actions.pod:4614
10605 msgid "The temporary directory is created with mode 0700 and is owned by root."
10609 #: ../fish/guestfish-actions.pod:3068 ../src/guestfs-actions.pod:4617
10611 "The caller is responsible for deleting the temporary directory and its "
10612 "contents after use."
10616 #: ../fish/guestfish-actions.pod:3071 ../src/guestfs-actions.pod:4620
10617 msgid "See also: L<mkdtemp(3)>"
10621 #: ../fish/guestfish-actions.pod:3073
10626 #: ../fish/guestfish-actions.pod:3075
10629 " mke2fs-J fstype blocksize device journal\n"
10634 #: ../fish/guestfish-actions.pod:3077 ../src/guestfs-actions.pod:4636
10636 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10637 "C<journal>. It is equivalent to the command:"
10641 #: ../fish/guestfish-actions.pod:3081 ../src/guestfs-actions.pod:4640
10644 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10649 #: ../fish/guestfish-actions.pod:3083
10650 msgid "See also L</mke2journal>."
10654 #: ../fish/guestfish-actions.pod:3085
10659 #: ../fish/guestfish-actions.pod:3087
10662 " mke2fs-JL fstype blocksize device label\n"
10667 #: ../fish/guestfish-actions.pod:3089 ../src/guestfs-actions.pod:4657
10669 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10670 "the journal labeled C<label>."
10674 #: ../fish/guestfish-actions.pod:3092
10675 msgid "See also L</mke2journal-L>."
10679 #: ../fish/guestfish-actions.pod:3094
10684 #: ../fish/guestfish-actions.pod:3096
10687 " mke2fs-JU fstype blocksize device uuid\n"
10692 #: ../fish/guestfish-actions.pod:3098 ../src/guestfs-actions.pod:4675
10694 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10695 "the journal with UUID C<uuid>."
10699 #: ../fish/guestfish-actions.pod:3101
10700 msgid "See also L</mke2journal-U>."
10704 #: ../fish/guestfish-actions.pod:3103
10705 msgid "mke2journal"
10709 #: ../fish/guestfish-actions.pod:3105
10712 " mke2journal blocksize device\n"
10717 #: ../fish/guestfish-actions.pod:3107 ../src/guestfs-actions.pod:4691
10719 "This creates an ext2 external journal on C<device>. It is equivalent to the "
10724 #: ../fish/guestfish-actions.pod:3110 ../src/guestfs-actions.pod:4694
10727 " mke2fs -O journal_dev -b blocksize device\n"
10732 #: ../fish/guestfish-actions.pod:3112
10733 msgid "mke2journal-L"
10737 #: ../fish/guestfish-actions.pod:3114
10740 " mke2journal-L blocksize label device\n"
10745 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4708
10746 msgid "This creates an ext2 external journal on C<device> with label C<label>."
10750 #: ../fish/guestfish-actions.pod:3118
10751 msgid "mke2journal-U"
10755 #: ../fish/guestfish-actions.pod:3120
10758 " mke2journal-U blocksize uuid device\n"
10763 #: ../fish/guestfish-actions.pod:3122 ../src/guestfs-actions.pod:4722
10764 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
10768 #: ../fish/guestfish-actions.pod:3124
10773 #: ../fish/guestfish-actions.pod:3126
10776 " mkfifo mode path\n"
10781 #: ../fish/guestfish-actions.pod:3128
10783 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
10784 "is just a convenient wrapper around L</mknod>."
10788 #: ../fish/guestfish-actions.pod:3134
10793 #: ../fish/guestfish-actions.pod:3136
10796 " mkfs fstype device\n"
10801 #: ../fish/guestfish-actions.pod:3138 ../src/guestfs-actions.pod:4752
10803 "This creates a filesystem on C<device> (usually a partition or LVM logical "
10804 "volume). The filesystem type is C<fstype>, for example C<ext3>."
10808 #: ../fish/guestfish-actions.pod:3142
10813 #: ../fish/guestfish-actions.pod:3144
10816 " mkfs-b fstype blocksize device\n"
10821 #: ../fish/guestfish-actions.pod:3146
10823 "This call is similar to L</mkfs>, but it allows you to control the block "
10824 "size of the resulting filesystem. Supported block sizes depend on the "
10825 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
10829 #: ../fish/guestfish-actions.pod:3151 ../fish/guestfish-actions.pod:3178 ../src/guestfs-actions.pod:4780 ../src/guestfs-actions.pod:4818
10831 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
10836 #: ../fish/guestfish-actions.pod:3154
10838 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
10843 #: ../fish/guestfish-actions.pod:3161
10848 #: ../fish/guestfish-actions.pod:3163
10851 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] "
10852 "[sectorsize:..]\n"
10857 #: ../fish/guestfish-actions.pod:3165 ../src/guestfs-actions.pod:4805
10859 "This function creates a filesystem on C<device>. The filesystem type is "
10860 "C<fstype>, for example C<ext3>."
10864 #: ../fish/guestfish-actions.pod:3172 ../src/guestfs-actions.pod:4812
10865 msgid "C<blocksize>"
10869 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4814
10871 "The filesystem block size. Supported block sizes depend on the filesystem "
10872 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
10877 #: ../fish/guestfish-actions.pod:3181 ../src/guestfs-actions.pod:4821
10878 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
10882 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4823
10883 msgid "C<features>"
10887 #: ../fish/guestfish-actions.pod:3185 ../src/guestfs-actions.pod:4825
10888 msgid "This passes the I<-O> parameter to the external mkfs program."
10892 #: ../fish/guestfish-actions.pod:3187 ../src/guestfs-actions.pod:4827
10894 "For certain filesystem types, this allows extra filesystem features to be "
10895 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
10899 #: ../fish/guestfish-actions.pod:3191 ../src/guestfs-actions.pod:4831
10901 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
10906 #: ../fish/guestfish-actions.pod:3194 ../src/guestfs-actions.pod:4834
10911 #: ../fish/guestfish-actions.pod:3196 ../src/guestfs-actions.pod:4836
10913 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
10914 "sets the inode size (only for ext2/3/4 filesystems at present)."
10918 #: ../fish/guestfish-actions.pod:3199 ../src/guestfs-actions.pod:4839
10919 msgid "C<sectorsize>"
10923 #: ../fish/guestfish-actions.pod:3201 ../src/guestfs-actions.pod:4841
10925 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
10926 "sets sector size for ufs filesystem."
10930 #: ../fish/guestfish-actions.pod:3208
10931 msgid "mkmountpoint"
10935 #: ../fish/guestfish-actions.pod:3210
10938 " mkmountpoint exemptpath\n"
10943 #: ../fish/guestfish-actions.pod:3212
10945 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
10946 "to create extra mountpoints before mounting the first filesystem."
10950 #: ../fish/guestfish-actions.pod:3216 ../src/guestfs-actions.pod:4884
10952 "These calls are I<only> necessary in some very limited circumstances, mainly "
10953 "the case where you want to mount a mix of unrelated and/or read-only "
10954 "filesystems together."
10958 #: ../fish/guestfish-actions.pod:3220 ../src/guestfs-actions.pod:4888
10960 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
10961 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
10962 "inside that. You can unpack this as follows in guestfish:"
10966 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4893
10969 " add-ro Fedora-11-i686-Live.iso\n"
10971 " mkmountpoint /cd\n"
10972 " mkmountpoint /sqsh\n"
10973 " mkmountpoint /ext3fs\n"
10974 " mount /dev/sda /cd\n"
10975 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
10976 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
10981 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4902
10982 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
10986 #: ../fish/guestfish-actions.pod:3236
10988 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
10989 "unexpected errors if you try to mix these calls. It is safest to manually "
10990 "unmount filesystems and remove mountpoints after use."
10994 #: ../fish/guestfish-actions.pod:3240
10996 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
10997 "for this to work for manual mountpoints, you must ensure that the innermost "
10998 "mountpoints have the longest pathnames, as in the example code above."
11002 #: ../fish/guestfish-actions.pod:3245 ../src/guestfs-actions.pod:4913
11003 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
11007 #: ../fish/guestfish-actions.pod:3247
11009 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
11010 "L</umount-all> to be called when the handle is closed which can also trigger "
11015 #: ../fish/guestfish-actions.pod:3251
11020 #: ../fish/guestfish-actions.pod:3253
11023 " mknod mode devmajor devminor path\n"
11028 #: ../fish/guestfish-actions.pod:3255 ../src/guestfs-actions.pod:4932
11030 "This call creates block or character special devices, or named pipes "
11035 #: ../fish/guestfish-actions.pod:3258 ../src/guestfs-actions.pod:4935
11037 "The C<mode> parameter should be the mode, using the standard constants. "
11038 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
11039 "used when creating block and character special devices."
11043 #: ../fish/guestfish-actions.pod:3263
11045 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
11046 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
11047 "regular file). These constants are available in the standard Linux header "
11048 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
11049 "wrappers around this command which bitwise OR in the appropriate constant "
11054 #: ../fish/guestfish-actions.pod:3273
11059 #: ../fish/guestfish-actions.pod:3275
11062 " mknod-b mode devmajor devminor path\n"
11067 #: ../fish/guestfish-actions.pod:3277
11069 "This call creates a block device node called C<path> with mode C<mode> and "
11070 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11071 "wrapper around L</mknod>."
11075 #: ../fish/guestfish-actions.pod:3283
11080 #: ../fish/guestfish-actions.pod:3285
11083 " mknod-c mode devmajor devminor path\n"
11088 #: ../fish/guestfish-actions.pod:3287
11090 "This call creates a char device node called C<path> with mode C<mode> and "
11091 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11092 "wrapper around L</mknod>."
11096 #: ../fish/guestfish-actions.pod:3293
11101 #: ../fish/guestfish-actions.pod:3295
11109 #: ../fish/guestfish-actions.pod:3297 ../src/guestfs-actions.pod:4998
11110 msgid "Create a swap partition on C<device>."
11114 #: ../fish/guestfish-actions.pod:3299
11119 #: ../fish/guestfish-actions.pod:3301
11122 " mkswap-L label device\n"
11127 #: ../fish/guestfish-actions.pod:3303 ../src/guestfs-actions.pod:5011
11128 msgid "Create a swap partition on C<device> with label C<label>."
11132 #: ../fish/guestfish-actions.pod:3305 ../src/guestfs-actions.pod:5013
11134 "Note that you cannot attach a swap label to a block device "
11135 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
11136 "the kernel or swap tools."
11140 #: ../fish/guestfish-actions.pod:3309
11145 #: ../fish/guestfish-actions.pod:3311
11148 " mkswap-U uuid device\n"
11153 #: ../fish/guestfish-actions.pod:3313 ../src/guestfs-actions.pod:5028
11154 msgid "Create a swap partition on C<device> with UUID C<uuid>."
11158 #: ../fish/guestfish-actions.pod:3315
11159 msgid "mkswap-file"
11163 #: ../fish/guestfish-actions.pod:3317
11166 " mkswap-file path\n"
11171 #: ../fish/guestfish-actions.pod:3319 ../src/guestfs-actions.pod:5040
11172 msgid "Create a swap file."
11176 #: ../fish/guestfish-actions.pod:3321
11178 "This command just writes a swap file signature to an existing file. To "
11179 "create the file itself, use something like L</fallocate>."
11183 #: ../fish/guestfish-actions.pod:3324
11188 #: ../fish/guestfish-actions.pod:3326
11191 " modprobe modulename\n"
11196 #: ../fish/guestfish-actions.pod:3328 ../src/guestfs-actions.pod:5055
11197 msgid "This loads a kernel module in the appliance."
11201 #: ../fish/guestfish-actions.pod:3330 ../src/guestfs-actions.pod:5057
11203 "The kernel module must have been whitelisted when libguestfs was built (see "
11204 "C<appliance/kmod.whitelist.in> in the source)."
11208 #: ../fish/guestfish-actions.pod:3333
11213 #: ../fish/guestfish-actions.pod:3335
11216 " mount device mountpoint\n"
11221 #: ../fish/guestfish-actions.pod:3337 ../src/guestfs-actions.pod:5071
11223 "Mount a guest disk at a position in the filesystem. Block devices are named "
11224 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
11225 "those block devices contain partitions, they will have the usual names "
11226 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
11230 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5077
11232 "The rules are the same as for L<mount(2)>: A filesystem must first be "
11233 "mounted on C</> before others can be mounted. Other filesystems can only be "
11234 "mounted on directories which already exist."
11238 #: ../fish/guestfish-actions.pod:3348 ../src/guestfs-actions.pod:5082
11240 "The mounted filesystem is writable, if we have sufficient permissions on the "
11241 "underlying device."
11245 #: ../fish/guestfish-actions.pod:3351
11247 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
11248 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
11249 "problems for users. If your program might need to work with older versions "
11250 "of libguestfs, use L</mount-options> instead (using an empty string for the "
11251 "first parameter if you don't want any options)."
11255 #: ../fish/guestfish-actions.pod:3358
11260 #: ../fish/guestfish-actions.pod:3360
11263 " mount-9p mounttag mountpoint [options:..]\n"
11268 #: ../fish/guestfish-actions.pod:3362 ../src/guestfs-actions.pod:5111
11270 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
11275 #: ../fish/guestfish-actions.pod:3365 ../src/guestfs-actions.pod:5114
11277 "If required, C<trans=virtio> will be automatically added to the options. "
11278 "Any other options required can be passed in the optional C<options> "
11283 #: ../fish/guestfish-actions.pod:3371
11288 #: ../fish/guestfish-actions.pod:3373
11291 " mount-loop file mountpoint\n"
11296 #: ../fish/guestfish-actions.pod:3375 ../src/guestfs-actions.pod:5153
11298 "This command lets you mount C<file> (a filesystem image in a file) on a "
11299 "mount point. It is entirely equivalent to the command C<mount -o loop file "
11304 #: ../fish/guestfish-actions.pod:3379
11305 msgid "mount-options"
11309 #: ../fish/guestfish-actions.pod:3381
11312 " mount-options options device mountpoint\n"
11317 #: ../fish/guestfish-actions.pod:3383
11319 "This is the same as the L</mount> command, but it allows you to set the "
11320 "mount options as for the L<mount(8)> I<-o> flag."
11324 #: ../fish/guestfish-actions.pod:3387 ../src/guestfs-actions.pod:5173
11326 "If the C<options> parameter is an empty string, then no options are passed "
11327 "(all options default to whatever the filesystem uses)."
11331 #: ../fish/guestfish-actions.pod:3391
11336 #: ../fish/guestfish-actions.pod:3393
11339 " mount-ro device mountpoint\n"
11344 #: ../fish/guestfish-actions.pod:3395
11346 "This is the same as the L</mount> command, but it mounts the filesystem with "
11347 "the read-only (I<-o ro>) flag."
11351 #: ../fish/guestfish-actions.pod:3398
11356 #: ../fish/guestfish-actions.pod:3400
11359 " mount-vfs options vfstype device mountpoint\n"
11364 #: ../fish/guestfish-actions.pod:3402
11366 "This is the same as the L</mount> command, but it allows you to set both the "
11367 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
11371 #: ../fish/guestfish-actions.pod:3406
11372 msgid "mountpoints"
11376 #: ../fish/guestfish-actions.pod:3408
11384 #: ../fish/guestfish-actions.pod:3410
11386 "This call is similar to L</mounts>. That call returns a list of devices. "
11387 "This one returns a hash table (map) of device name to directory where the "
11388 "device is mounted."
11392 #: ../fish/guestfish-actions.pod:3414
11397 #: ../fish/guestfish-actions.pod:3416
11405 #: ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:5234
11407 "This returns the list of currently mounted filesystems. It returns the list "
11408 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
11412 #: ../fish/guestfish-actions.pod:3421 ../src/guestfs-actions.pod:5237
11413 msgid "Some internal mounts are not shown."
11417 #: ../fish/guestfish-actions.pod:3423
11418 msgid "See also: L</mountpoints>"
11422 #: ../fish/guestfish-actions.pod:3425
11427 #: ../fish/guestfish-actions.pod:3427
11435 #: ../fish/guestfish-actions.pod:3429 ../src/guestfs-actions.pod:5254
11437 "This moves a file from C<src> to C<dest> where C<dest> is either a "
11438 "destination filename or destination directory."
11442 #: ../fish/guestfish-actions.pod:3432
11443 msgid "ntfs-3g-probe"
11447 #: ../fish/guestfish-actions.pod:3434
11450 " ntfs-3g-probe true|false device\n"
11455 #: ../fish/guestfish-actions.pod:3436 ../src/guestfs-actions.pod:5268
11457 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
11458 "C<device> for mountability. (Not all NTFS volumes can be mounted "
11459 "read-write, and some cannot be mounted at all)."
11463 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5272
11465 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
11466 "can be mounted read-write. Set it to false if you want to test if the "
11467 "volume can be mounted read-only."
11471 #: ../fish/guestfish-actions.pod:3444 ../src/guestfs-actions.pod:5276
11473 "The return value is an integer which C<0> if the operation would succeed, or "
11474 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
11478 #: ../fish/guestfish-actions.pod:3448
11483 #: ../fish/guestfish-actions.pod:3450
11486 " ntfsresize device\n"
11491 #: ../fish/guestfish-actions.pod:3452 ../fish/guestfish-actions.pod:3476 ../src/guestfs-actions.pod:5297 ../src/guestfs-actions.pod:5329
11493 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
11494 "size of the underlying device."
11498 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5300
11500 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
11501 "consistency check (for safety). You have to boot into Windows to perform "
11502 "this check and clear this condition. Furthermore, ntfsresize refuses to "
11503 "resize filesystems which have been marked in this way. So in effect it is "
11504 "not possible to call ntfsresize multiple times on a single filesystem "
11505 "without booting into Windows between each resize."
11509 #: ../fish/guestfish-actions.pod:3463 ../fish/guestfish-actions.pod:3502 ../src/guestfs-actions.pod:5308 ../src/guestfs-actions.pod:5355
11510 msgid "See also L<ntfsresize(8)>."
11514 #: ../fish/guestfish-actions.pod:3465 ../fish/guestfish-actions.pod:3513
11516 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
11521 #: ../fish/guestfish-actions.pod:3472
11522 msgid "ntfsresize-opts"
11526 #: ../fish/guestfish-actions.pod:3474
11529 " ntfsresize-opts device [size:..] [force:..]\n"
11534 #: ../fish/guestfish-actions.pod:3485 ../src/guestfs-actions.pod:5338
11536 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
11537 "resized to fit the container (eg. partition)."
11541 #: ../fish/guestfish-actions.pod:3488 ../src/guestfs-actions.pod:5341
11546 #: ../fish/guestfish-actions.pod:3490 ../src/guestfs-actions.pod:5343
11548 "If this option is true, then force the resize of the filesystem even if the "
11549 "filesystem is marked as requiring a consistency check."
11553 #: ../fish/guestfish-actions.pod:3493
11555 "After the resize operation, the filesystem is always marked as requiring a "
11556 "consistency check (for safety). You have to boot into Windows to perform "
11557 "this check and clear this condition. If you I<don't> set the C<force> "
11558 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
11559 "a single filesystem without booting into Windows between each resize."
11563 #: ../fish/guestfish-actions.pod:3506
11564 msgid "ntfsresize-size"
11568 #: ../fish/guestfish-actions.pod:3508
11571 " ntfsresize-size device size\n"
11576 #: ../fish/guestfish-actions.pod:3510
11578 "This command is the same as L</ntfsresize> except that it allows you to "
11579 "specify the new size (in bytes) explicitly."
11583 #: ../fish/guestfish-actions.pod:3520
11588 #: ../fish/guestfish-actions.pod:3522
11591 " part-add device prlogex startsect endsect\n"
11596 #: ../fish/guestfish-actions.pod:3524
11598 "This command adds a partition to C<device>. If there is no partition table "
11599 "on the device, call L</part-init> first."
11603 #: ../fish/guestfish-actions.pod:3527 ../src/guestfs-actions.pod:5416
11605 "The C<prlogex> parameter is the type of partition. Normally you should pass "
11606 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
11607 "C<logical>) and C<e> (or C<extended>) partition types."
11611 #: ../fish/guestfish-actions.pod:3532 ../src/guestfs-actions.pod:5421
11613 "C<startsect> and C<endsect> are the start and end of the partition in "
11614 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
11615 "from the end of the disk (C<-1> is the last sector)."
11619 #: ../fish/guestfish-actions.pod:3536
11621 "Creating a partition which covers the whole disk is not so easy. Use "
11622 "L</part-disk> to do that."
11626 #: ../fish/guestfish-actions.pod:3539
11631 #: ../fish/guestfish-actions.pod:3541
11634 " part-del device partnum\n"
11639 #: ../fish/guestfish-actions.pod:3543 ../src/guestfs-actions.pod:5439
11640 msgid "This command deletes the partition numbered C<partnum> on C<device>."
11644 #: ../fish/guestfish-actions.pod:3545 ../src/guestfs-actions.pod:5441
11646 "Note that in the case of MBR partitioning, deleting an extended partition "
11647 "also deletes any logical partitions it contains."
11651 #: ../fish/guestfish-actions.pod:3549
11656 #: ../fish/guestfish-actions.pod:3551
11659 " part-disk device parttype\n"
11664 #: ../fish/guestfish-actions.pod:3553
11666 "This command is simply a combination of L</part-init> followed by "
11667 "L</part-add> to create a single primary partition covering the whole disk."
11671 #: ../fish/guestfish-actions.pod:3557
11673 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
11674 "possible values are described in L</part-init>."
11678 #: ../fish/guestfish-actions.pod:3563
11679 msgid "part-get-bootable"
11683 #: ../fish/guestfish-actions.pod:3565
11686 " part-get-bootable device partnum\n"
11691 #: ../fish/guestfish-actions.pod:3567 ../src/guestfs-actions.pod:5477
11693 "This command returns true if the partition C<partnum> on C<device> has the "
11694 "bootable flag set."
11698 #: ../fish/guestfish-actions.pod:3570
11699 msgid "See also L</part-set-bootable>."
11703 #: ../fish/guestfish-actions.pod:3572
11704 msgid "part-get-mbr-id"
11708 #: ../fish/guestfish-actions.pod:3574
11711 " part-get-mbr-id device partnum\n"
11716 #: ../fish/guestfish-actions.pod:3576 ../src/guestfs-actions.pod:5493
11718 "Returns the MBR type byte (also known as the ID byte) from the numbered "
11719 "partition C<partnum>."
11723 #: ../fish/guestfish-actions.pod:3579 ../fish/guestfish-actions.pod:3723
11725 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
11726 "undefined results for other partition table types (see "
11727 "L</part-get-parttype>)."
11731 #: ../fish/guestfish-actions.pod:3583
11732 msgid "part-get-parttype"
11736 #: ../fish/guestfish-actions.pod:3585
11739 " part-get-parttype device\n"
11744 #: ../fish/guestfish-actions.pod:3587 ../src/guestfs-actions.pod:5510
11746 "This command examines the partition table on C<device> and returns the "
11747 "partition table type (format) being used."
11751 #: ../fish/guestfish-actions.pod:3590
11753 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
11754 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
11755 "possible, although unusual. See L</part-init> for a full list."
11759 #: ../fish/guestfish-actions.pod:3595
11764 #: ../fish/guestfish-actions.pod:3597
11767 " part-init device parttype\n"
11772 #: ../fish/guestfish-actions.pod:3599 ../src/guestfs-actions.pod:5530
11774 "This creates an empty partition table on C<device> of one of the partition "
11775 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
11776 "(for large disks)."
11780 #: ../fish/guestfish-actions.pod:3603
11782 "Initially there are no partitions. Following this, you should call "
11783 "L</part-add> for each partition required."
11787 #: ../fish/guestfish-actions.pod:3606 ../src/guestfs-actions.pod:5537
11788 msgid "Possible values for C<parttype> are:"
11792 #: ../fish/guestfish-actions.pod:3610 ../src/guestfs-actions.pod:5541
11797 #: ../fish/guestfish-actions.pod:3612 ../src/guestfs-actions.pod:5543
11802 #: ../fish/guestfish-actions.pod:3614 ../src/guestfs-actions.pod:5545
11803 msgid "Intel EFI / GPT partition table."
11807 #: ../fish/guestfish-actions.pod:3616 ../src/guestfs-actions.pod:5547
11809 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
11810 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
11811 "the C<mbr> format."
11815 #: ../fish/guestfish-actions.pod:3620 ../src/guestfs-actions.pod:5551
11820 #: ../fish/guestfish-actions.pod:3622 ../src/guestfs-actions.pod:5553
11825 #: ../fish/guestfish-actions.pod:3624 ../src/guestfs-actions.pod:5555
11827 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
11828 "Windows. This partition type will B<only> work for device sizes up to 2 "
11829 "TB. For large disks we recommend using C<gpt>."
11833 #: ../fish/guestfish-actions.pod:3631 ../src/guestfs-actions.pod:5562
11834 msgid "Other partition table types that may work but are not supported include:"
11838 #: ../fish/guestfish-actions.pod:3636 ../src/guestfs-actions.pod:5567
11843 #: ../fish/guestfish-actions.pod:3638 ../src/guestfs-actions.pod:5569
11844 msgid "AIX disk labels."
11848 #: ../fish/guestfish-actions.pod:3640 ../src/guestfs-actions.pod:5571
11853 #: ../fish/guestfish-actions.pod:3642 ../src/guestfs-actions.pod:5573
11858 #: ../fish/guestfish-actions.pod:3644 ../src/guestfs-actions.pod:5575
11859 msgid "Amiga \"Rigid Disk Block\" format."
11863 #: ../fish/guestfish-actions.pod:3646 ../src/guestfs-actions.pod:5577
11868 #: ../fish/guestfish-actions.pod:3648 ../src/guestfs-actions.pod:5579
11869 msgid "BSD disk labels."
11873 #: ../fish/guestfish-actions.pod:3650 ../src/guestfs-actions.pod:5581
11878 #: ../fish/guestfish-actions.pod:3652 ../src/guestfs-actions.pod:5583
11879 msgid "DASD, used on IBM mainframes."
11883 #: ../fish/guestfish-actions.pod:3654 ../src/guestfs-actions.pod:5585
11888 #: ../fish/guestfish-actions.pod:3656 ../src/guestfs-actions.pod:5587
11889 msgid "MIPS/SGI volumes."
11893 #: ../fish/guestfish-actions.pod:3658 ../src/guestfs-actions.pod:5589
11898 #: ../fish/guestfish-actions.pod:3660 ../src/guestfs-actions.pod:5591
11899 msgid "Old Mac partition format. Modern Macs use C<gpt>."
11903 #: ../fish/guestfish-actions.pod:3662 ../src/guestfs-actions.pod:5593
11908 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5595
11909 msgid "NEC PC-98 format, common in Japan apparently."
11913 #: ../fish/guestfish-actions.pod:3666 ../src/guestfs-actions.pod:5597
11918 #: ../fish/guestfish-actions.pod:3668 ../src/guestfs-actions.pod:5599
11919 msgid "Sun disk labels."
11923 #: ../fish/guestfish-actions.pod:3672
11928 #: ../fish/guestfish-actions.pod:3674
11931 " part-list device\n"
11936 #: ../fish/guestfish-actions.pod:3676 ../src/guestfs-actions.pod:5613
11938 "This command parses the partition table on C<device> and returns the list of "
11939 "partitions found."
11943 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5616
11944 msgid "The fields in the returned structure are:"
11948 #: ../fish/guestfish-actions.pod:3683 ../src/guestfs-actions.pod:5620
11949 msgid "B<part_num>"
11953 #: ../fish/guestfish-actions.pod:3685 ../src/guestfs-actions.pod:5622
11954 msgid "Partition number, counting from 1."
11958 #: ../fish/guestfish-actions.pod:3687 ../src/guestfs-actions.pod:5624
11959 msgid "B<part_start>"
11963 #: ../fish/guestfish-actions.pod:3689
11965 "Start of the partition I<in bytes>. To get sectors you have to divide by "
11966 "the device's sector size, see L</blockdev-getss>."
11970 #: ../fish/guestfish-actions.pod:3692 ../src/guestfs-actions.pod:5629
11971 msgid "B<part_end>"
11975 #: ../fish/guestfish-actions.pod:3694 ../src/guestfs-actions.pod:5631
11976 msgid "End of the partition in bytes."
11980 #: ../fish/guestfish-actions.pod:3696 ../src/guestfs-actions.pod:5633
11981 msgid "B<part_size>"
11985 #: ../fish/guestfish-actions.pod:3698 ../src/guestfs-actions.pod:5635
11986 msgid "Size of the partition in bytes."
11990 #: ../fish/guestfish-actions.pod:3702
11991 msgid "part-set-bootable"
11995 #: ../fish/guestfish-actions.pod:3704
11998 " part-set-bootable device partnum true|false\n"
12003 #: ../fish/guestfish-actions.pod:3706 ../src/guestfs-actions.pod:5653
12005 "This sets the bootable flag on partition numbered C<partnum> on device "
12006 "C<device>. Note that partitions are numbered from 1."
12010 #: ../fish/guestfish-actions.pod:3709 ../src/guestfs-actions.pod:5656
12012 "The bootable flag is used by some operating systems (notably Windows) to "
12013 "determine which partition to boot from. It is by no means universally "
12018 #: ../fish/guestfish-actions.pod:3713
12019 msgid "part-set-mbr-id"
12023 #: ../fish/guestfish-actions.pod:3715
12026 " part-set-mbr-id device partnum idbyte\n"
12031 #: ../fish/guestfish-actions.pod:3717 ../src/guestfs-actions.pod:5672
12033 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
12034 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
12035 "documentation are in fact hexadecimal numbers, but usually documented "
12036 "without any leading \"0x\" which might be confusing."
12040 #: ../fish/guestfish-actions.pod:3727
12041 msgid "part-set-name"
12045 #: ../fish/guestfish-actions.pod:3729
12048 " part-set-name device partnum name\n"
12053 #: ../fish/guestfish-actions.pod:3731 ../src/guestfs-actions.pod:5694
12055 "This sets the partition name on partition numbered C<partnum> on device "
12056 "C<device>. Note that partitions are numbered from 1."
12060 #: ../fish/guestfish-actions.pod:3734 ../src/guestfs-actions.pod:5697
12062 "The partition name can only be set on certain types of partition table. "
12063 "This works on C<gpt> but not on C<mbr> partitions."
12067 #: ../fish/guestfish-actions.pod:3737
12068 msgid "part-to-dev"
12072 #: ../fish/guestfish-actions.pod:3739
12075 " part-to-dev partition\n"
12080 #: ../fish/guestfish-actions.pod:3741 ../src/guestfs-actions.pod:5710
12082 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
12083 "partition number, returning the device name (eg. \"/dev/sdb\")."
12087 #: ../fish/guestfish-actions.pod:3745
12089 "The named partition must exist, for example as a string returned from "
12090 "L</list-partitions>."
12094 #: ../fish/guestfish-actions.pod:3748
12095 msgid "ping-daemon"
12099 #: ../fish/guestfish-actions.pod:3750
12107 #: ../fish/guestfish-actions.pod:3752 ../src/guestfs-actions.pod:5727
12109 "This is a test probe into the guestfs daemon running inside the qemu "
12110 "subprocess. Calling this function checks that the daemon responds to the "
12111 "ping message, without affecting the daemon or attached block device(s) in "
12116 #: ../fish/guestfish-actions.pod:3757
12121 #: ../fish/guestfish-actions.pod:3759
12124 " pread path count offset\n"
12129 #: ../fish/guestfish-actions.pod:3761 ../src/guestfs-actions.pod:5745
12131 "This command lets you read part of a file. It reads C<count> bytes of the "
12132 "file, starting at C<offset>, from file C<path>."
12136 #: ../fish/guestfish-actions.pod:3764 ../fish/guestfish-actions.pod:3779 ../src/guestfs-actions.pod:5748 ../src/guestfs-actions.pod:5774
12138 "This may read fewer bytes than requested. For further details see the "
12139 "L<pread(2)> system call."
12143 #: ../fish/guestfish-actions.pod:3767
12144 msgid "See also L</pwrite>, L</pread-device>."
12148 #: ../fish/guestfish-actions.pod:3772
12149 msgid "pread-device"
12153 #: ../fish/guestfish-actions.pod:3774
12156 " pread-device device count offset\n"
12161 #: ../fish/guestfish-actions.pod:3776 ../src/guestfs-actions.pod:5771
12163 "This command lets you read part of a file. It reads C<count> bytes of "
12164 "C<device>, starting at C<offset>."
12168 #: ../fish/guestfish-actions.pod:3782
12169 msgid "See also L</pread>."
12173 #: ../fish/guestfish-actions.pod:3787
12178 #: ../fish/guestfish-actions.pod:3789
12181 " pvcreate device\n"
12186 #: ../fish/guestfish-actions.pod:3791 ../src/guestfs-actions.pod:5794
12188 "This creates an LVM physical volume on the named C<device>, where C<device> "
12189 "should usually be a partition name such as C</dev/sda1>."
12193 #: ../fish/guestfish-actions.pod:3795
12198 #: ../fish/guestfish-actions.pod:3797
12201 " pvremove device\n"
12206 #: ../fish/guestfish-actions.pod:3799 ../src/guestfs-actions.pod:5808
12208 "This wipes a physical volume C<device> so that LVM will no longer recognise "
12213 #: ../fish/guestfish-actions.pod:3802 ../src/guestfs-actions.pod:5811
12215 "The implementation uses the C<pvremove> command which refuses to wipe "
12216 "physical volumes that contain any volume groups, so you have to remove those "
12221 #: ../fish/guestfish-actions.pod:3806
12226 #: ../fish/guestfish-actions.pod:3808
12229 " pvresize device\n"
12234 #: ../fish/guestfish-actions.pod:3810 ../src/guestfs-actions.pod:5825
12236 "This resizes (expands or shrinks) an existing LVM physical volume to match "
12237 "the new size of the underlying device."
12241 #: ../fish/guestfish-actions.pod:3813
12242 msgid "pvresize-size"
12246 #: ../fish/guestfish-actions.pod:3815
12249 " pvresize-size device size\n"
12254 #: ../fish/guestfish-actions.pod:3817
12256 "This command is the same as L</pvresize> except that it allows you to "
12257 "specify the new size (in bytes) explicitly."
12261 #: ../fish/guestfish-actions.pod:3820
12266 #: ../fish/guestfish-actions.pod:3822
12274 #: ../fish/guestfish-actions.pod:3824 ../src/guestfs-actions.pod:5851
12276 "List all the physical volumes detected. This is the equivalent of the "
12277 "L<pvs(8)> command."
12281 #: ../fish/guestfish-actions.pod:3827 ../src/guestfs-actions.pod:5854
12283 "This returns a list of just the device names that contain PVs "
12284 "(eg. C</dev/sda2>)."
12288 #: ../fish/guestfish-actions.pod:3830
12289 msgid "See also L</pvs-full>."
12293 #: ../fish/guestfish-actions.pod:3832
12298 #: ../fish/guestfish-actions.pod:3834
12306 #: ../fish/guestfish-actions.pod:3836 ../src/guestfs-actions.pod:5870
12308 "List all the physical volumes detected. This is the equivalent of the "
12309 "L<pvs(8)> command. The \"full\" version includes all fields."
12313 #: ../fish/guestfish-actions.pod:3839
12318 #: ../fish/guestfish-actions.pod:3841
12326 #: ../fish/guestfish-actions.pod:3843 ../src/guestfs-actions.pod:5885
12327 msgid "This command returns the UUID of the LVM PV C<device>."
12331 #: ../fish/guestfish-actions.pod:3845
12336 #: ../fish/guestfish-actions.pod:3847
12339 " pwrite path content offset\n"
12344 #: ../fish/guestfish-actions.pod:3849 ../src/guestfs-actions.pod:5901
12346 "This command writes to part of a file. It writes the data buffer C<content> "
12347 "to the file C<path> starting at offset C<offset>."
12351 #: ../fish/guestfish-actions.pod:3852 ../src/guestfs-actions.pod:5904
12353 "This command implements the L<pwrite(2)> system call, and like that system "
12354 "call it may not write the full data requested. The return value is the "
12355 "number of bytes that were actually written to the file. This could even be "
12356 "0, although short writes are unlikely for regular files in ordinary "
12361 #: ../fish/guestfish-actions.pod:3858
12362 msgid "See also L</pread>, L</pwrite-device>."
12366 #: ../fish/guestfish-actions.pod:3863
12367 msgid "pwrite-device"
12371 #: ../fish/guestfish-actions.pod:3865
12374 " pwrite-device device content offset\n"
12379 #: ../fish/guestfish-actions.pod:3867 ../src/guestfs-actions.pod:5928
12381 "This command writes to part of a device. It writes the data buffer "
12382 "C<content> to C<device> starting at offset C<offset>."
12386 #: ../fish/guestfish-actions.pod:3870 ../src/guestfs-actions.pod:5931
12388 "This command implements the L<pwrite(2)> system call, and like that system "
12389 "call it may not write the full data requested (although short writes to disk "
12390 "devices and partitions are probably impossible with standard Linux kernels)."
12394 #: ../fish/guestfish-actions.pod:3875
12395 msgid "See also L</pwrite>."
12399 #: ../fish/guestfish-actions.pod:3880
12404 #: ../fish/guestfish-actions.pod:3882
12407 " read-file path\n"
12412 #: ../fish/guestfish-actions.pod:3884 ../src/guestfs-actions.pod:5952
12413 msgid "This calls returns the contents of the file C<path> as a buffer."
12417 #: ../fish/guestfish-actions.pod:3887
12419 "Unlike L</cat>, this function can correctly handle files that contain "
12420 "embedded ASCII NUL characters. However unlike L</download>, this function "
12421 "is limited in the total size of file that can be handled."
12425 #: ../fish/guestfish-actions.pod:3895
12430 #: ../fish/guestfish-actions.pod:3897
12433 " read-lines path\n"
12438 #: ../fish/guestfish-actions.pod:3901 ../src/guestfs-actions.pod:5977
12440 "The file contents are returned as a list of lines. Trailing C<LF> and "
12441 "C<CRLF> character sequences are I<not> returned."
12445 #: ../fish/guestfish-actions.pod:3904
12447 "Note that this function cannot correctly handle binary files (specifically, "
12448 "files containing C<\\0> character which is treated as end of line). For "
12449 "those you need to use the L</read-file> function which has a more complex "
12454 #: ../fish/guestfish-actions.pod:3909
12459 #: ../fish/guestfish-actions.pod:3911
12467 #: ../fish/guestfish-actions.pod:3913 ../src/guestfs-actions.pod:5997
12468 msgid "This returns the list of directory entries in directory C<dir>."
12472 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:5999
12474 "All entries in the directory are returned, including C<.> and C<..>. The "
12475 "entries are I<not> sorted, but returned in the same order as the underlying "
12480 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:6003
12482 "Also this call returns basic file type information about each file. The "
12483 "C<ftyp> field will contain one of the following characters:"
12487 #: ../fish/guestfish-actions.pod:3924 ../src/guestfs-actions.pod:6008
12492 #: ../fish/guestfish-actions.pod:3926 ../src/guestfs-actions.pod:6010
12493 msgid "Block special"
12497 #: ../fish/guestfish-actions.pod:3928 ../src/guestfs-actions.pod:6012
12502 #: ../fish/guestfish-actions.pod:3930 ../src/guestfs-actions.pod:6014
12503 msgid "Char special"
12507 #: ../fish/guestfish-actions.pod:3932 ../src/guestfs-actions.pod:6016
12512 #: ../fish/guestfish-actions.pod:3934 ../src/guestfs-actions.pod:6018
12517 #: ../fish/guestfish-actions.pod:3936 ../src/guestfs-actions.pod:6020
12522 #: ../fish/guestfish-actions.pod:3938 ../src/guestfs-actions.pod:6022
12523 msgid "FIFO (named pipe)"
12527 #: ../fish/guestfish-actions.pod:3940 ../src/guestfs-actions.pod:6024
12532 #: ../fish/guestfish-actions.pod:3942 ../src/guestfs-actions.pod:6026
12533 msgid "Symbolic link"
12537 #: ../fish/guestfish-actions.pod:3944 ../src/guestfs-actions.pod:6028
12542 #: ../fish/guestfish-actions.pod:3946 ../src/guestfs-actions.pod:6030
12543 msgid "Regular file"
12547 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6032
12552 #: ../fish/guestfish-actions.pod:3950 ../src/guestfs-actions.pod:6034
12557 #: ../fish/guestfish-actions.pod:3952 ../src/guestfs-actions.pod:6036
12562 #: ../fish/guestfish-actions.pod:3954 ../src/guestfs-actions.pod:6038
12563 msgid "Unknown file type"
12567 #: ../fish/guestfish-actions.pod:3956 ../src/guestfs-actions.pod:6040
12572 #: ../fish/guestfish-actions.pod:3958 ../src/guestfs-actions.pod:6042
12573 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
12577 #: ../fish/guestfish-actions.pod:3963
12579 "This function is primarily intended for use by programs. To get a simple "
12580 "list of names, use L</ls>. To get a printable directory for human "
12581 "consumption, use L</ll>."
12585 #: ../fish/guestfish-actions.pod:3967
12590 #: ../fish/guestfish-actions.pod:3969
12598 #: ../fish/guestfish-actions.pod:3971 ../src/guestfs-actions.pod:6063
12599 msgid "This command reads the target of a symbolic link."
12603 #: ../fish/guestfish-actions.pod:3973
12604 msgid "readlinklist"
12608 #: ../fish/guestfish-actions.pod:3975
12611 " readlinklist path 'names ...'\n"
12616 #: ../fish/guestfish-actions.pod:3977 ../src/guestfs-actions.pod:6077
12618 "This call allows you to do a C<readlink> operation on multiple files, where "
12619 "all files are in the directory C<path>. C<names> is the list of files from "
12624 #: ../fish/guestfish-actions.pod:3981 ../src/guestfs-actions.pod:6081
12626 "On return you get a list of strings, with a one-to-one correspondence to the "
12627 "C<names> list. Each string is the value of the symbolic link."
12631 #: ../fish/guestfish-actions.pod:3985 ../src/guestfs-actions.pod:6085
12633 "If the C<readlink(2)> operation fails on any name, then the corresponding "
12634 "result string is the empty string C<\"\">. However the whole operation is "
12635 "completed even if there were C<readlink(2)> errors, and so you can call this "
12636 "function with names where you don't know if they are symbolic links already "
12637 "(albeit slightly less efficient)."
12641 #: ../fish/guestfish-actions.pod:3992 ../src/guestfs-actions.pod:6092
12643 "This call is intended for programs that want to efficiently list a directory "
12644 "contents without making many round-trips. Very long directory listings "
12645 "might cause the protocol message size to be exceeded, causing this call to "
12646 "fail. The caller must split up such requests into smaller groups of names."
12650 #: ../fish/guestfish-actions.pod:3999
12655 #: ../fish/guestfish-actions.pod:4001
12663 #: ../fish/guestfish-actions.pod:4003 ../src/guestfs-actions.pod:6111
12665 "Return the canonicalized absolute pathname of C<path>. The returned path "
12666 "has no C<.>, C<..> or symbolic link path elements."
12670 #: ../fish/guestfish-actions.pod:4006
12671 msgid "removexattr"
12675 #: ../fish/guestfish-actions.pod:4008
12678 " removexattr xattr path\n"
12683 #: ../fish/guestfish-actions.pod:4010 ../src/guestfs-actions.pod:6126
12684 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
12688 #: ../fish/guestfish-actions.pod:4013
12689 msgid "See also: L</lremovexattr>, L<attr(5)>."
12693 #: ../fish/guestfish-actions.pod:4015
12698 #: ../fish/guestfish-actions.pod:4017
12701 " resize2fs device\n"
12706 #: ../fish/guestfish-actions.pod:4019 ../src/guestfs-actions.pod:6141
12708 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
12709 "underlying device."
12713 #: ../fish/guestfish-actions.pod:4022
12715 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
12716 "before calling this command. For unknown reasons C<resize2fs> sometimes "
12717 "gives an error about this and sometimes not. In any case, it is always safe "
12718 "to call L</e2fsck-f> before calling this function."
12722 #: ../fish/guestfish-actions.pod:4028
12723 msgid "resize2fs-M"
12727 #: ../fish/guestfish-actions.pod:4030
12730 " resize2fs-M device\n"
12735 #: ../fish/guestfish-actions.pod:4032
12737 "This command is the same as L</resize2fs>, but the filesystem is resized to "
12738 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
12743 #: ../fish/guestfish-actions.pod:4036
12745 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
12746 "and read the C<Block size> and C<Block count> values. These two numbers, "
12747 "multiplied together, give the resulting size of the minimal filesystem in "
12752 #: ../fish/guestfish-actions.pod:4041
12753 msgid "resize2fs-size"
12757 #: ../fish/guestfish-actions.pod:4043
12760 " resize2fs-size device size\n"
12765 #: ../fish/guestfish-actions.pod:4045
12767 "This command is the same as L</resize2fs> except that it allows you to "
12768 "specify the new size (in bytes) explicitly."
12772 #: ../fish/guestfish-actions.pod:4048
12777 #: ../fish/guestfish-actions.pod:4050
12785 #: ../fish/guestfish-actions.pod:4052 ../src/guestfs-actions.pod:6193
12786 msgid "Remove the single file C<path>."
12790 #: ../fish/guestfish-actions.pod:4054
12795 #: ../fish/guestfish-actions.pod:4056
12803 #: ../fish/guestfish-actions.pod:4058 ../src/guestfs-actions.pod:6205
12805 "Remove the file or directory C<path>, recursively removing the contents if "
12806 "its a directory. This is like the C<rm -rf> shell command."
12810 #: ../fish/guestfish-actions.pod:4062
12815 #: ../fish/guestfish-actions.pod:4064
12823 #: ../fish/guestfish-actions.pod:4066 ../src/guestfs-actions.pod:6219
12824 msgid "Remove the single directory C<path>."
12828 #: ../fish/guestfish-actions.pod:4068
12829 msgid "rmmountpoint"
12833 #: ../fish/guestfish-actions.pod:4070
12836 " rmmountpoint exemptpath\n"
12841 #: ../fish/guestfish-actions.pod:4072
12843 "This calls removes a mountpoint that was previously created with "
12844 "L</mkmountpoint>. See L</mkmountpoint> for full details."
12848 #: ../fish/guestfish-actions.pod:4076
12849 msgid "scrub-device"
12853 #: ../fish/guestfish-actions.pod:4078
12856 " scrub-device device\n"
12861 #: ../fish/guestfish-actions.pod:4080 ../src/guestfs-actions.pod:6245
12863 "This command writes patterns over C<device> to make data retrieval more "
12868 #: ../fish/guestfish-actions.pod:4083 ../fish/guestfish-actions.pod:4098 ../fish/guestfish-actions.pod:4111 ../src/guestfs-actions.pod:6248 ../src/guestfs-actions.pod:6269 ../src/guestfs-actions.pod:6288
12870 "It is an interface to the L<scrub(1)> program. See that manual page for "
12875 #: ../fish/guestfish-actions.pod:4089
12880 #: ../fish/guestfish-actions.pod:4091
12883 " scrub-file file\n"
12888 #: ../fish/guestfish-actions.pod:4093 ../src/guestfs-actions.pod:6264
12890 "This command writes patterns over a file to make data retrieval more "
12895 #: ../fish/guestfish-actions.pod:4096 ../src/guestfs-actions.pod:6267
12896 msgid "The file is I<removed> after scrubbing."
12900 #: ../fish/guestfish-actions.pod:4101
12901 msgid "scrub-freespace"
12905 #: ../fish/guestfish-actions.pod:4103
12908 " scrub-freespace dir\n"
12913 #: ../fish/guestfish-actions.pod:4105
12915 "This command creates the directory C<dir> and then fills it with files until "
12916 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
12917 "deletes them. The intention is to scrub any free space on the partition "
12918 "containing C<dir>."
12922 #: ../fish/guestfish-actions.pod:4114
12927 #: ../fish/guestfish-actions.pod:4116
12932 #: ../fish/guestfish-actions.pod:4118
12935 " set-append append\n"
12940 #: ../fish/guestfish-actions.pod:4120 ../src/guestfs-actions.pod:6301
12942 "This function is used to add additional options to the guest kernel command "
12947 #: ../fish/guestfish-actions.pod:4123 ../src/guestfs-actions.pod:6304
12949 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
12950 "environment variable."
12954 #: ../fish/guestfish-actions.pod:4126 ../src/guestfs-actions.pod:6307
12956 "Setting C<append> to C<NULL> means I<no> additional options are passed "
12957 "(libguestfs always adds a few of its own)."
12961 #: ../fish/guestfish-actions.pod:4129
12962 msgid "set-attach-method"
12966 #: ../fish/guestfish-actions.pod:4131
12967 msgid "attach-method"
12971 #: ../fish/guestfish-actions.pod:4133
12974 " set-attach-method attachmethod\n"
12979 #: ../fish/guestfish-actions.pod:4135 ../src/guestfs-actions.pod:6320
12981 "Set the method that libguestfs uses to connect to the back end guestfsd "
12982 "daemon. Possible methods are:"
12986 #: ../fish/guestfish-actions.pod:4140 ../src/guestfs-actions.pod:6325 ../src/guestfs.pod:2830
12987 msgid "C<appliance>"
12991 #: ../fish/guestfish-actions.pod:4142 ../src/guestfs-actions.pod:6327
12993 "Launch an appliance and connect to it. This is the ordinary method and the "
12998 #: ../fish/guestfish-actions.pod:4145 ../src/guestfs-actions.pod:6330
12999 msgid "C<unix:I<path>>"
13003 #: ../fish/guestfish-actions.pod:4147 ../src/guestfs-actions.pod:6332
13004 msgid "Connect to the Unix domain socket I<path>."
13008 #: ../fish/guestfish-actions.pod:4149 ../src/guestfs-actions.pod:6334
13010 "This method lets you connect to an existing daemon or (using virtio-serial) "
13011 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
13012 "RUNNING DAEMONS>."
13016 #: ../fish/guestfish-actions.pod:4155
13017 msgid "set-autosync"
13021 #: ../fish/guestfish-actions.pod:4157
13026 #: ../fish/guestfish-actions.pod:4159
13029 " set-autosync true|false\n"
13034 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6350
13036 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
13037 "effort attempt to make filesystems consistent and synchronized when the "
13038 "handle is closed (also if the program exits without closing handles)."
13042 #: ../fish/guestfish-actions.pod:4166 ../src/guestfs-actions.pod:6355
13044 "This is enabled by default (since libguestfs 1.5.24, previously it was "
13045 "disabled by default)."
13049 #: ../fish/guestfish-actions.pod:4169
13054 #: ../fish/guestfish-actions.pod:4171
13059 #: ../fish/guestfish-actions.pod:4173
13062 " set-direct true|false\n"
13067 #: ../fish/guestfish-actions.pod:4175 ../src/guestfs-actions.pod:6368
13069 "If the direct appliance mode flag is enabled, then stdin and stdout are "
13070 "passed directly through to the appliance once it is launched."
13074 #: ../fish/guestfish-actions.pod:4179
13076 "One consequence of this is that log messages aren't caught by the library "
13077 "and handled by L</set-log-message-callback>, but go straight to stdout."
13081 #: ../fish/guestfish-actions.pod:4183 ../src/guestfs-actions.pod:6376
13082 msgid "You probably don't want to use this unless you know what you are doing."
13086 #: ../fish/guestfish-actions.pod:4186 ../src/guestfs-actions.pod:6379
13087 msgid "The default is disabled."
13091 #: ../fish/guestfish-actions.pod:4188
13092 msgid "set-e2label"
13096 #: ../fish/guestfish-actions.pod:4190
13099 " set-e2label device label\n"
13104 #: ../fish/guestfish-actions.pod:4192 ../src/guestfs-actions.pod:6392
13106 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
13107 "C<label>. Filesystem labels are limited to 16 characters."
13111 #: ../fish/guestfish-actions.pod:4196
13113 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
13114 "label on a filesystem."
13118 #: ../fish/guestfish-actions.pod:4199
13123 #: ../fish/guestfish-actions.pod:4201
13126 " set-e2uuid device uuid\n"
13131 #: ../fish/guestfish-actions.pod:4203 ../src/guestfs-actions.pod:6410
13133 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
13134 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
13135 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
13139 #: ../fish/guestfish-actions.pod:4208
13141 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
13142 "UUID of a filesystem."
13146 #: ../fish/guestfish-actions.pod:4211
13147 msgid "set-memsize"
13151 #: ../fish/guestfish-actions.pod:4213
13156 #: ../fish/guestfish-actions.pod:4215
13159 " set-memsize memsize\n"
13164 #: ../fish/guestfish-actions.pod:4217
13166 "This sets the memory size in megabytes allocated to the qemu subprocess. "
13167 "This only has any effect if called before L</launch>."
13171 #: ../fish/guestfish-actions.pod:4221 ../src/guestfs-actions.pod:6432
13173 "You can also change this by setting the environment variable "
13174 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
13178 #: ../fish/guestfish-actions.pod:4228
13179 msgid "set-network"
13183 #: ../fish/guestfish-actions.pod:4230
13188 #: ../fish/guestfish-actions.pod:4232
13191 " set-network true|false\n"
13196 #: ../fish/guestfish-actions.pod:4234 ../src/guestfs-actions.pod:6449
13198 "If C<network> is true, then the network is enabled in the libguestfs "
13199 "appliance. The default is false."
13203 #: ../fish/guestfish-actions.pod:4237 ../src/guestfs-actions.pod:6452
13205 "This affects whether commands are able to access the network (see "
13206 "L<guestfs(3)/RUNNING COMMANDS>)."
13210 #: ../fish/guestfish-actions.pod:4240
13211 msgid "You must call this before calling L</launch>, otherwise it has no effect."
13215 #: ../fish/guestfish-actions.pod:4243
13220 #: ../fish/guestfish-actions.pod:4247
13223 " set-path searchpath\n"
13228 #: ../fish/guestfish-actions.pod:4249 ../src/guestfs-actions.pod:6468
13229 msgid "Set the path that libguestfs searches for kernel and initrd.img."
13233 #: ../fish/guestfish-actions.pod:4251 ../src/guestfs-actions.pod:6470
13235 "The default is C<$libdir/guestfs> unless overridden by setting "
13236 "C<LIBGUESTFS_PATH> environment variable."
13240 #: ../fish/guestfish-actions.pod:4254 ../src/guestfs-actions.pod:6473
13241 msgid "Setting C<path> to C<NULL> restores the default path."
13245 #: ../fish/guestfish-actions.pod:4256
13250 #: ../fish/guestfish-actions.pod:4258
13255 #: ../fish/guestfish-actions.pod:4260
13258 " set-pgroup true|false\n"
13263 #: ../fish/guestfish-actions.pod:4262 ../src/guestfs-actions.pod:6485
13265 "If C<pgroup> is true, child processes are placed into their own process "
13270 #: ../fish/guestfish-actions.pod:4265 ../src/guestfs-actions.pod:6488
13272 "The practical upshot of this is that signals like C<SIGINT> (from users "
13273 "pressing C<^C>) won't be received by the child process."
13277 #: ../fish/guestfish-actions.pod:4268 ../src/guestfs-actions.pod:6491
13279 "The default for this flag is false, because usually you want C<^C> to kill "
13284 #: ../fish/guestfish-actions.pod:4271
13289 #: ../fish/guestfish-actions.pod:4273
13294 #: ../fish/guestfish-actions.pod:4275
13302 #: ../fish/guestfish-actions.pod:4277 ../src/guestfs-actions.pod:6504
13303 msgid "Set the qemu binary that we will use."
13307 #: ../fish/guestfish-actions.pod:4279 ../src/guestfs-actions.pod:6506
13308 msgid "The default is chosen when the library was compiled by the configure script."
13312 #: ../fish/guestfish-actions.pod:4282 ../src/guestfs-actions.pod:6509
13314 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
13319 #: ../fish/guestfish-actions.pod:4285 ../src/guestfs-actions.pod:6512
13320 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
13324 #: ../fish/guestfish-actions.pod:4287 ../src/guestfs-actions.pod:6514
13326 "Note that you should call this function as early as possible after creating "
13327 "the handle. This is because some pre-launch operations depend on testing "
13328 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
13329 "don't retest features, and so you might see inconsistent results. Using the "
13330 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
13331 "the qemu binary at the same time as the handle is created."
13335 #: ../fish/guestfish-actions.pod:4295
13336 msgid "set-recovery-proc"
13340 #: ../fish/guestfish-actions.pod:4297
13341 msgid "recovery-proc"
13345 #: ../fish/guestfish-actions.pod:4299
13348 " set-recovery-proc true|false\n"
13353 #: ../fish/guestfish-actions.pod:4301
13355 "If this is called with the parameter C<false> then L</launch> does not "
13356 "create a recovery process. The purpose of the recovery process is to stop "
13357 "runaway qemu processes in the case where the main program aborts abruptly."
13361 #: ../fish/guestfish-actions.pod:4306
13363 "This only has any effect if called before L</launch>, and the default is "
13368 #: ../fish/guestfish-actions.pod:4309 ../src/guestfs-actions.pod:6540
13370 "About the only time when you would want to disable this is if the main "
13371 "process will fork itself into the background (\"daemonize\" itself). In "
13372 "this case the recovery process thinks that the main program has disappeared "
13373 "and so kills qemu, which is not very helpful."
13377 #: ../fish/guestfish-actions.pod:4315
13378 msgid "set-selinux"
13382 #: ../fish/guestfish-actions.pod:4317
13387 #: ../fish/guestfish-actions.pod:4319
13390 " set-selinux true|false\n"
13395 #: ../fish/guestfish-actions.pod:4321 ../src/guestfs-actions.pod:6556
13397 "This sets the selinux flag that is passed to the appliance at boot time. "
13398 "The default is C<selinux=0> (disabled)."
13402 #: ../fish/guestfish-actions.pod:4324 ../src/guestfs-actions.pod:6559
13404 "Note that if SELinux is enabled, it is always in Permissive mode "
13405 "(C<enforcing=0>)."
13409 #: ../fish/guestfish-actions.pod:4330
13414 #: ../fish/guestfish-actions.pod:4332
13419 #: ../fish/guestfish-actions.pod:4334
13427 #: ../fish/guestfish-actions.pod:4336 ../src/guestfs-actions.pod:6575
13429 "Change the number of virtual CPUs assigned to the appliance. The default is "
13430 "C<1>. Increasing this may improve performance, though often it has no "
13435 #: ../fish/guestfish-actions.pod:4340
13436 msgid "This function must be called before L</launch>."
13440 #: ../fish/guestfish-actions.pod:4342
13445 #: ../fish/guestfish-actions.pod:4344
13450 #: ../fish/guestfish-actions.pod:4346
13453 " set-trace true|false\n"
13458 #: ../fish/guestfish-actions.pod:4348 ../src/guestfs-actions.pod:6591
13460 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
13461 "return values are traced."
13465 #: ../fish/guestfish-actions.pod:4351 ../src/guestfs-actions.pod:6594
13467 "If you want to trace C API calls into libguestfs (and other libraries) then "
13468 "possibly a better way is to use the external ltrace(1) command."
13472 #: ../fish/guestfish-actions.pod:4355 ../src/guestfs-actions.pod:6598
13474 "Command traces are disabled unless the environment variable "
13475 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
13479 #: ../fish/guestfish-actions.pod:4358
13481 "Trace messages are normally sent to C<stderr>, unless you register a "
13482 "callback to send them somewhere else (see L</set-event-callback>)."
13486 #: ../fish/guestfish-actions.pod:4362
13487 msgid "set-verbose"
13491 #: ../fish/guestfish-actions.pod:4364
13496 #: ../fish/guestfish-actions.pod:4366
13499 " set-verbose true|false\n"
13504 #: ../fish/guestfish-actions.pod:4368 ../src/guestfs-actions.pod:6615
13505 msgid "If C<verbose> is true, this turns on verbose messages."
13509 #: ../fish/guestfish-actions.pod:4370 ../src/guestfs-actions.pod:6617
13511 "Verbose messages are disabled unless the environment variable "
13512 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
13516 #: ../fish/guestfish-actions.pod:4373
13518 "Verbose messages are normally sent to C<stderr>, unless you register a "
13519 "callback to send them somewhere else (see L</set-event-callback>)."
13523 #: ../fish/guestfish-actions.pod:4377
13528 #: ../fish/guestfish-actions.pod:4379
13531 " setcon context\n"
13536 #: ../fish/guestfish-actions.pod:4381 ../src/guestfs-actions.pod:6634
13538 "This sets the SELinux security context of the daemon to the string "
13543 #: ../fish/guestfish-actions.pod:4384 ../src/guestfs-actions.pod:6637
13544 msgid "See the documentation about SELINUX in L<guestfs(3)>."
13548 #: ../fish/guestfish-actions.pod:4386
13553 #: ../fish/guestfish-actions.pod:4388
13556 " setxattr xattr val vallen path\n"
13561 #: ../fish/guestfish-actions.pod:4390 ../src/guestfs-actions.pod:6652
13563 "This call sets the extended attribute named C<xattr> of the file C<path> to "
13564 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
13568 #: ../fish/guestfish-actions.pod:4394
13569 msgid "See also: L</lsetxattr>, L<attr(5)>."
13573 #: ../fish/guestfish-actions.pod:4396
13578 #: ../fish/guestfish-actions.pod:4398
13581 " sfdisk device cyls heads sectors 'lines ...'\n"
13586 #: ../fish/guestfish-actions.pod:4400 ../src/guestfs-actions.pod:6679
13588 "This is a direct interface to the L<sfdisk(8)> program for creating "
13589 "partitions on block devices."
13593 #: ../fish/guestfish-actions.pod:4403 ../src/guestfs-actions.pod:6682
13594 msgid "C<device> should be a block device, for example C</dev/sda>."
13598 #: ../fish/guestfish-actions.pod:4405 ../src/guestfs-actions.pod:6684
13600 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
13601 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
13602 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
13603 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
13604 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
13605 "the kernel) cannot work out the right geometry and you will need to tell it."
13609 #: ../fish/guestfish-actions.pod:4413 ../src/guestfs-actions.pod:6692
13611 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
13612 "refer to the L<sfdisk(8)> manpage."
13616 #: ../fish/guestfish-actions.pod:4416 ../src/guestfs-actions.pod:6695
13618 "To create a single partition occupying the whole disk, you would pass "
13619 "C<lines> as a single element list, when the single element being the string "
13624 #: ../fish/guestfish-actions.pod:4420
13625 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
13629 #: ../fish/guestfish-actions.pod:4426 ../fish/guestfish-actions.pod:4449 ../fish/guestfish-actions.pod:4471
13631 "I<This function is deprecated.> In new code, use the L</part_add> call "
13636 #: ../fish/guestfish-actions.pod:4433
13641 #: ../fish/guestfish-actions.pod:4435
13644 " sfdiskM device 'lines ...'\n"
13649 #: ../fish/guestfish-actions.pod:4437
13651 "This is a simplified interface to the L</sfdisk> command, where partition "
13652 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
13653 "you don't need to specify the cyls, heads and sectors parameters which were "
13654 "rarely if ever used anyway."
13658 #: ../fish/guestfish-actions.pod:4443
13659 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
13663 #: ../fish/guestfish-actions.pod:4456
13668 #: ../fish/guestfish-actions.pod:4458
13671 " sfdisk-N device partnum cyls heads sectors line\n"
13676 #: ../fish/guestfish-actions.pod:4460 ../src/guestfs-actions.pod:6757
13678 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
13679 "(note: C<n> counts from 1)."
13683 #: ../fish/guestfish-actions.pod:4463
13685 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
13686 "cyls/heads/sectors parameters."
13690 #: ../fish/guestfish-actions.pod:4466
13691 msgid "See also: L</part-add>"
13695 #: ../fish/guestfish-actions.pod:4478
13696 msgid "sfdisk-disk-geometry"
13700 #: ../fish/guestfish-actions.pod:4480
13703 " sfdisk-disk-geometry device\n"
13708 #: ../fish/guestfish-actions.pod:4482
13710 "This displays the disk geometry of C<device> read from the partition table. "
13711 "Especially in the case where the underlying block device has been resized, "
13712 "this can be different from the kernel's idea of the geometry (see "
13713 "L</sfdisk-kernel-geometry>)."
13717 #: ../fish/guestfish-actions.pod:4487 ../fish/guestfish-actions.pod:4496 ../src/guestfs-actions.pod:6783 ../src/guestfs-actions.pod:6799
13718 msgid "The result is in human-readable format, and not designed to be parsed."
13722 #: ../fish/guestfish-actions.pod:4490
13723 msgid "sfdisk-kernel-geometry"
13727 #: ../fish/guestfish-actions.pod:4492
13730 " sfdisk-kernel-geometry device\n"
13735 #: ../fish/guestfish-actions.pod:4494 ../src/guestfs-actions.pod:6797
13736 msgid "This displays the kernel's idea of the geometry of C<device>."
13740 #: ../fish/guestfish-actions.pod:4499
13745 #: ../fish/guestfish-actions.pod:4501
13748 " sfdisk-l device\n"
13753 #: ../fish/guestfish-actions.pod:4503 ../src/guestfs-actions.pod:6820
13755 "This displays the partition table on C<device>, in the human-readable output "
13756 "of the L<sfdisk(8)> command. It is not intended to be parsed."
13760 #: ../fish/guestfish-actions.pod:4507
13761 msgid "See also: L</part-list>"
13765 #: ../fish/guestfish-actions.pod:4509
13767 "I<This function is deprecated.> In new code, use the L</part_list> call "
13772 #: ../fish/guestfish-actions.pod:4516
13777 #: ../fish/guestfish-actions.pod:4518
13785 #: ../fish/guestfish-actions.pod:4520 ../src/guestfs-actions.pod:6837
13787 "This call runs a command from the guest filesystem via the guest's "
13792 #: ../fish/guestfish-actions.pod:4523
13793 msgid "This is like L</command>, but passes the command to:"
13797 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6842
13800 " /bin/sh -c \"command\"\n"
13805 #: ../fish/guestfish-actions.pod:4527 ../src/guestfs-actions.pod:6844
13807 "Depending on the guest's shell, this usually results in wildcards being "
13808 "expanded, shell expressions being interpolated and so on."
13812 #: ../fish/guestfish-actions.pod:4531
13813 msgid "All the provisos about L</command> apply to this call."
13817 #: ../fish/guestfish-actions.pod:4533
13822 #: ../fish/guestfish-actions.pod:4535
13825 " sh-lines command\n"
13830 #: ../fish/guestfish-actions.pod:4537
13831 msgid "This is the same as L</sh>, but splits the result into a list of lines."
13835 #: ../fish/guestfish-actions.pod:4540
13836 msgid "See also: L</command-lines>"
13840 #: ../fish/guestfish-actions.pod:4542
13845 #: ../fish/guestfish-actions.pod:4544
13853 #: ../fish/guestfish-actions.pod:4546 ../src/guestfs-actions.pod:6878
13854 msgid "Sleep for C<secs> seconds."
13858 #: ../fish/guestfish-actions.pod:4548
13863 #: ../fish/guestfish-actions.pod:4550
13871 #: ../fish/guestfish-actions.pod:4554 ../src/guestfs-actions.pod:6892
13872 msgid "This is the same as the C<stat(2)> system call."
13876 #: ../fish/guestfish-actions.pod:4556
13881 #: ../fish/guestfish-actions.pod:4558
13889 #: ../fish/guestfish-actions.pod:4560 ../src/guestfs-actions.pod:6906
13891 "Returns file system statistics for any mounted file system. C<path> should "
13892 "be a file or directory in the mounted file system (typically it is the mount "
13893 "point itself, but it doesn't need to be)."
13897 #: ../fish/guestfish-actions.pod:4564 ../src/guestfs-actions.pod:6910
13898 msgid "This is the same as the C<statvfs(2)> system call."
13902 #: ../fish/guestfish-actions.pod:4566
13907 #: ../fish/guestfish-actions.pod:4568
13915 #: ../fish/guestfish-actions.pod:4570 ../src/guestfs-actions.pod:6924
13917 "This runs the L<strings(1)> command on a file and returns the list of "
13918 "printable strings found."
13922 #: ../fish/guestfish-actions.pod:4576
13927 #: ../fish/guestfish-actions.pod:4578
13930 " strings-e encoding path\n"
13935 #: ../fish/guestfish-actions.pod:4580
13937 "This is like the L</strings> command, but allows you to specify the encoding "
13938 "of strings that are looked for in the source file C<path>."
13942 #: ../fish/guestfish-actions.pod:4584 ../src/guestfs-actions.pod:6947
13943 msgid "Allowed encodings are:"
13947 #: ../fish/guestfish-actions.pod:4588 ../src/guestfs-actions.pod:6951
13952 #: ../fish/guestfish-actions.pod:4590
13954 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
13955 "ISO-8859-X (this is what L</strings> uses)."
13959 #: ../fish/guestfish-actions.pod:4593 ../src/guestfs-actions.pod:6956
13964 #: ../fish/guestfish-actions.pod:4595 ../src/guestfs-actions.pod:6958
13965 msgid "Single 8-bit-byte characters."
13969 #: ../fish/guestfish-actions.pod:4597 ../src/guestfs-actions.pod:6960
13974 #: ../fish/guestfish-actions.pod:4599 ../src/guestfs-actions.pod:6962
13975 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
13979 #: ../fish/guestfish-actions.pod:4602 ../src/guestfs-actions.pod:6965
13980 msgid "l (lower case letter L)"
13984 #: ../fish/guestfish-actions.pod:4604 ../src/guestfs-actions.pod:6967
13986 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
13987 "examining binaries in Windows guests."
13991 #: ../fish/guestfish-actions.pod:4607 ../src/guestfs-actions.pod:6970
13996 #: ../fish/guestfish-actions.pod:4609 ../src/guestfs-actions.pod:6972
13997 msgid "32-bit big endian such as UCS-4BE."
14001 #: ../fish/guestfish-actions.pod:4611 ../src/guestfs-actions.pod:6974
14006 #: ../fish/guestfish-actions.pod:4613 ../src/guestfs-actions.pod:6976
14007 msgid "32-bit little endian such as UCS-4LE."
14011 #: ../fish/guestfish-actions.pod:4617 ../src/guestfs-actions.pod:6980
14012 msgid "The returned strings are transcoded to UTF-8."
14016 #: ../fish/guestfish-actions.pod:4622
14017 msgid "swapoff-device"
14021 #: ../fish/guestfish-actions.pod:4624
14024 " swapoff-device device\n"
14029 #: ../fish/guestfish-actions.pod:4626
14031 "This command disables the libguestfs appliance swap device or partition "
14032 "named C<device>. See L</swapon-device>."
14036 #: ../fish/guestfish-actions.pod:4630
14037 msgid "swapoff-file"
14041 #: ../fish/guestfish-actions.pod:4632
14044 " swapoff-file file\n"
14049 #: ../fish/guestfish-actions.pod:4634 ../src/guestfs-actions.pod:7011
14050 msgid "This command disables the libguestfs appliance swap on file."
14054 #: ../fish/guestfish-actions.pod:4636
14055 msgid "swapoff-label"
14059 #: ../fish/guestfish-actions.pod:4638
14062 " swapoff-label label\n"
14067 #: ../fish/guestfish-actions.pod:4640 ../src/guestfs-actions.pod:7023
14069 "This command disables the libguestfs appliance swap on labeled swap "
14074 #: ../fish/guestfish-actions.pod:4643
14075 msgid "swapoff-uuid"
14079 #: ../fish/guestfish-actions.pod:4645
14082 " swapoff-uuid uuid\n"
14087 #: ../fish/guestfish-actions.pod:4647 ../src/guestfs-actions.pod:7036
14089 "This command disables the libguestfs appliance swap partition with the given "
14094 #: ../fish/guestfish-actions.pod:4650
14095 msgid "swapon-device"
14099 #: ../fish/guestfish-actions.pod:4652
14102 " swapon-device device\n"
14107 #: ../fish/guestfish-actions.pod:4654
14109 "This command enables the libguestfs appliance to use the swap device or "
14110 "partition named C<device>. The increased memory is made available for all "
14111 "commands, for example those run using L</command> or L</sh>."
14115 #: ../fish/guestfish-actions.pod:4659 ../src/guestfs-actions.pod:7054
14117 "Note that you should not swap to existing guest swap partitions unless you "
14118 "know what you are doing. They may contain hibernation information, or other "
14119 "information that the guest doesn't want you to trash. You also risk leaking "
14120 "information about the host to the guest this way. Instead, attach a new "
14121 "host device to the guest and swap on that."
14125 #: ../fish/guestfish-actions.pod:4666
14126 msgid "swapon-file"
14130 #: ../fish/guestfish-actions.pod:4668
14133 " swapon-file file\n"
14138 #: ../fish/guestfish-actions.pod:4670
14139 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
14143 #: ../fish/guestfish-actions.pod:4673
14144 msgid "swapon-label"
14148 #: ../fish/guestfish-actions.pod:4675
14151 " swapon-label label\n"
14156 #: ../fish/guestfish-actions.pod:4677
14158 "This command enables swap to a labeled swap partition. See "
14159 "L</swapon-device> for other notes."
14163 #: ../fish/guestfish-actions.pod:4680
14164 msgid "swapon-uuid"
14168 #: ../fish/guestfish-actions.pod:4682
14171 " swapon-uuid uuid\n"
14176 #: ../fish/guestfish-actions.pod:4684
14178 "This command enables swap to a swap partition with the given UUID. See "
14179 "L</swapon-device> for other notes."
14183 #: ../fish/guestfish-actions.pod:4687
14188 #: ../fish/guestfish-actions.pod:4689
14196 #: ../fish/guestfish-actions.pod:4691 ../src/guestfs-actions.pod:7109
14198 "This syncs the disk, so that any writes are flushed through to the "
14199 "underlying disk image."
14203 #: ../fish/guestfish-actions.pod:4694 ../src/guestfs-actions.pod:7112
14205 "You should always call this if you have modified a disk image, before "
14206 "closing the handle."
14210 #: ../fish/guestfish-actions.pod:4697
14215 #: ../fish/guestfish-actions.pod:4699
14223 #: ../fish/guestfish-actions.pod:4701 ../src/guestfs-actions.pod:7125
14224 msgid "This command returns up to the last 10 lines of a file as a list of strings."
14228 #: ../fish/guestfish-actions.pod:4707
14233 #: ../fish/guestfish-actions.pod:4709
14236 " tail-n nrlines path\n"
14241 #: ../fish/guestfish-actions.pod:4711 ../src/guestfs-actions.pod:7144
14243 "If the parameter C<nrlines> is a positive number, this returns the last "
14244 "C<nrlines> lines of the file C<path>."
14248 #: ../fish/guestfish-actions.pod:4714 ../src/guestfs-actions.pod:7147
14250 "If the parameter C<nrlines> is a negative number, this returns lines from "
14251 "the file C<path>, starting with the C<-nrlines>th line."
14255 #: ../fish/guestfish-actions.pod:4722
14260 #: ../fish/guestfish-actions.pod:4724
14263 " tar-in (tarfile|-) directory\n"
14268 #: ../fish/guestfish-actions.pod:4726 ../src/guestfs-actions.pod:7168
14270 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
14271 "tar file) into C<directory>."
14275 #: ../fish/guestfish-actions.pod:4729
14276 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
14280 #: ../fish/guestfish-actions.pod:4734
14285 #: ../fish/guestfish-actions.pod:4736
14288 " tar-out directory (tarfile|-)\n"
14293 #: ../fish/guestfish-actions.pod:4738 ../src/guestfs-actions.pod:7185
14295 "This command packs the contents of C<directory> and downloads it to local "
14300 #: ../fish/guestfish-actions.pod:4741
14301 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
14305 #: ../fish/guestfish-actions.pod:4746
14310 #: ../fish/guestfish-actions.pod:4748
14313 " tgz-in (tarball|-) directory\n"
14318 #: ../fish/guestfish-actions.pod:4750 ../src/guestfs-actions.pod:7202
14320 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
14321 "tar file) into C<directory>."
14325 #: ../fish/guestfish-actions.pod:4753
14326 msgid "To upload an uncompressed tarball, use L</tar-in>."
14330 #: ../fish/guestfish-actions.pod:4757
14335 #: ../fish/guestfish-actions.pod:4759
14338 " tgz-out directory (tarball|-)\n"
14343 #: ../fish/guestfish-actions.pod:4761 ../src/guestfs-actions.pod:7218
14345 "This command packs the contents of C<directory> and downloads it to local "
14350 #: ../fish/guestfish-actions.pod:4764
14351 msgid "To download an uncompressed tarball, use L</tar-out>."
14355 #: ../fish/guestfish-actions.pod:4768
14360 #: ../fish/guestfish-actions.pod:4770
14368 #: ../fish/guestfish-actions.pod:4772 ../src/guestfs-actions.pod:7233
14370 "Touch acts like the L<touch(1)> command. It can be used to update the "
14371 "timestamps on a file, or, if the file does not exist, to create a new "
14372 "zero-length file."
14376 #: ../fish/guestfish-actions.pod:4776 ../src/guestfs-actions.pod:7237
14378 "This command only works on regular files, and will fail on other file types "
14379 "such as directories, symbolic links, block special etc."
14383 #: ../fish/guestfish-actions.pod:4779
14388 #: ../fish/guestfish-actions.pod:4781
14396 #: ../fish/guestfish-actions.pod:4783 ../src/guestfs-actions.pod:7250
14398 "This command truncates C<path> to a zero-length file. The file must exist "
14403 #: ../fish/guestfish-actions.pod:4786
14404 msgid "truncate-size"
14408 #: ../fish/guestfish-actions.pod:4788
14411 " truncate-size path size\n"
14416 #: ../fish/guestfish-actions.pod:4790 ../src/guestfs-actions.pod:7264
14418 "This command truncates C<path> to size C<size> bytes. The file must exist "
14423 #: ../fish/guestfish-actions.pod:4793
14425 "If the current file size is less than C<size> then the file is extended to "
14426 "the required size with zero bytes. This creates a sparse file (ie. disk "
14427 "blocks are not allocated for the file until you write to it). To create a "
14428 "non-sparse file of zeroes, use L</fallocate64> instead."
14432 #: ../fish/guestfish-actions.pod:4799
14437 #: ../fish/guestfish-actions.pod:4801
14440 " tune2fs-l device\n"
14445 #: ../fish/guestfish-actions.pod:4803 ../src/guestfs-actions.pod:7283
14447 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
14452 #: ../fish/guestfish-actions.pod:4806 ../src/guestfs-actions.pod:7286
14454 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
14455 "for more details. The list of fields returned isn't clearly defined, and "
14456 "depends on both the version of C<tune2fs> that libguestfs was built against, "
14457 "and the filesystem itself."
14461 #: ../fish/guestfish-actions.pod:4811
14466 #: ../fish/guestfish-actions.pod:4813
14469 " txz-in (tarball|-) directory\n"
14474 #: ../fish/guestfish-actions.pod:4815 ../src/guestfs-actions.pod:7306
14476 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
14477 "tar file) into C<directory>."
14481 #: ../fish/guestfish-actions.pod:4820
14486 #: ../fish/guestfish-actions.pod:4822
14489 " txz-out directory (tarball|-)\n"
14494 #: ../fish/guestfish-actions.pod:4824 ../src/guestfs-actions.pod:7320
14496 "This command packs the contents of C<directory> and downloads it to local "
14497 "file C<tarball> (as an xz compressed tar archive)."
14501 #: ../fish/guestfish-actions.pod:4829
14506 #: ../fish/guestfish-actions.pod:4831
14514 #: ../fish/guestfish-actions.pod:4833 ../src/guestfs-actions.pod:7333
14516 "This function sets the mask used for creating new files and device nodes to "
14521 #: ../fish/guestfish-actions.pod:4836 ../src/guestfs-actions.pod:7336
14523 "Typical umask values would be C<022> which creates new files with "
14524 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
14525 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
14529 #: ../fish/guestfish-actions.pod:4841 ../src/guestfs-actions.pod:7341
14531 "The default umask is C<022>. This is important because it means that "
14532 "directories and device nodes will be created with C<0644> or C<0755> mode "
14533 "even if you specify C<0777>."
14537 #: ../fish/guestfish-actions.pod:4845
14538 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
14542 #: ../fish/guestfish-actions.pod:4848 ../src/guestfs-actions.pod:7348
14543 msgid "This call returns the previous umask."
14547 #: ../fish/guestfish-actions.pod:4850
14552 #: ../fish/guestfish-actions.pod:4852
14557 #: ../fish/guestfish-actions.pod:4854
14560 " umount pathordevice\n"
14565 #: ../fish/guestfish-actions.pod:4856 ../src/guestfs-actions.pod:7360
14567 "This unmounts the given filesystem. The filesystem may be specified either "
14568 "by its mountpoint (path) or the device which contains the filesystem."
14572 #: ../fish/guestfish-actions.pod:4860
14577 #: ../fish/guestfish-actions.pod:4862
14578 msgid "unmount-all"
14582 #: ../fish/guestfish-actions.pod:4864
14590 #: ../fish/guestfish-actions.pod:4866 ../src/guestfs-actions.pod:7373
14591 msgid "This unmounts all mounted filesystems."
14595 #: ../fish/guestfish-actions.pod:4868 ../src/guestfs-actions.pod:7375
14596 msgid "Some internal mounts are not unmounted by this call."
14600 #: ../fish/guestfish-actions.pod:4870
14605 #: ../fish/guestfish-actions.pod:4872
14608 " upload (filename|-) remotefilename\n"
14613 #: ../fish/guestfish-actions.pod:4874 ../fish/guestfish-actions.pod:4887 ../src/guestfs-actions.pod:7388 ../src/guestfs-actions.pod:7412
14614 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
14618 #: ../fish/guestfish-actions.pod:4879
14619 msgid "See also L</download>."
14623 #: ../fish/guestfish-actions.pod:4883
14624 msgid "upload-offset"
14628 #: ../fish/guestfish-actions.pod:4885
14631 " upload-offset (filename|-) remotefilename offset\n"
14636 #: ../fish/guestfish-actions.pod:4890 ../src/guestfs-actions.pod:7415
14638 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
14639 "The intention is to overwrite parts of existing files or devices, although "
14640 "if a non-existant file is specified then it is created with a \"hole\" "
14641 "before C<offset>. The size of the data written is implicit in the size of "
14642 "the source C<filename>."
14646 #: ../fish/guestfish-actions.pod:4897
14648 "Note that there is no limit on the amount of data that can be uploaded with "
14649 "this call, unlike with L</pwrite>, and this call always writes the full "
14650 "amount unless an error occurs."
14654 #: ../fish/guestfish-actions.pod:4902
14655 msgid "See also L</upload>, L</pwrite>."
14659 #: ../fish/guestfish-actions.pod:4906
14664 #: ../fish/guestfish-actions.pod:4908
14667 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
14672 #: ../fish/guestfish-actions.pod:4910 ../src/guestfs-actions.pod:7448
14673 msgid "This command sets the timestamps of a file with nanosecond precision."
14677 #: ../fish/guestfish-actions.pod:4913 ../src/guestfs-actions.pod:7451
14679 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
14684 #: ../fish/guestfish-actions.pod:4916 ../src/guestfs-actions.pod:7454
14686 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
14687 "nanoseconds from the epoch."
14691 #: ../fish/guestfish-actions.pod:4919 ../src/guestfs-actions.pod:7457
14693 "If the C<*nsecs> field contains the special value C<-1> then the "
14694 "corresponding timestamp is set to the current time. (The C<*secs> field is "
14695 "ignored in this case)."
14699 #: ../fish/guestfish-actions.pod:4923 ../src/guestfs-actions.pod:7461
14701 "If the C<*nsecs> field contains the special value C<-2> then the "
14702 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
14707 #: ../fish/guestfish-actions.pod:4927
14712 #: ../fish/guestfish-actions.pod:4929
14720 #: ../fish/guestfish-actions.pod:4931 ../src/guestfs-actions.pod:7474
14721 msgid "Return the libguestfs version number that the program is linked against."
14725 #: ../fish/guestfish-actions.pod:4934 ../src/guestfs-actions.pod:7477
14727 "Note that because of dynamic linking this is not necessarily the version of "
14728 "libguestfs that you compiled against. You can compile the program, and then "
14729 "at runtime dynamically link against a completely different C<libguestfs.so> "
14734 #: ../fish/guestfish-actions.pod:4939 ../src/guestfs-actions.pod:7482
14736 "This call was added in version C<1.0.58>. In previous versions of "
14737 "libguestfs there was no way to get the version number. From C code you can "
14738 "use dynamic linker functions to find out if this symbol exists (if it "
14739 "doesn't, then it's an earlier version)."
14743 #: ../fish/guestfish-actions.pod:4945 ../src/guestfs-actions.pod:7488
14745 "The call returns a structure with four elements. The first three (C<major>, "
14746 "C<minor> and C<release>) are numbers and correspond to the usual version "
14747 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
14748 "but may be used for distro-specific information."
14752 #: ../fish/guestfish-actions.pod:4951 ../src/guestfs-actions.pod:7494
14753 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
14757 #: ../fish/guestfish-actions.pod:4954 ../src/guestfs-actions.pod:7497
14758 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
14762 #: ../fish/guestfish-actions.pod:4956
14764 "I<Note:> Don't use this call to test for availability of features. In "
14765 "enterprise distributions we backport features from later versions into "
14766 "earlier versions, making this an unreliable way to test for features. Use "
14767 "L</available> instead."
14771 #: ../fish/guestfish-actions.pod:4962
14776 #: ../fish/guestfish-actions.pod:4964
14779 " vfs-label device\n"
14784 #: ../fish/guestfish-actions.pod:4966 ../src/guestfs-actions.pod:7517
14785 msgid "This returns the filesystem label of the filesystem on C<device>."
14789 #: ../fish/guestfish-actions.pod:4969 ../src/guestfs-actions.pod:7520
14790 msgid "If the filesystem is unlabeled, this returns the empty string."
14794 #: ../fish/guestfish-actions.pod:4971
14795 msgid "To find a filesystem from the label, use L</findfs-label>."
14799 #: ../fish/guestfish-actions.pod:4973
14804 #: ../fish/guestfish-actions.pod:4975
14807 " vfs-type device\n"
14812 #: ../fish/guestfish-actions.pod:4977 ../src/guestfs-actions.pod:7535
14814 "This command gets the filesystem type corresponding to the filesystem on "
14819 #: ../fish/guestfish-actions.pod:4980 ../src/guestfs-actions.pod:7538
14821 "For most filesystems, the result is the name of the Linux VFS module which "
14822 "would be used to mount this filesystem if you mounted it without specifying "
14823 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
14827 #: ../fish/guestfish-actions.pod:4985
14832 #: ../fish/guestfish-actions.pod:4987
14835 " vfs-uuid device\n"
14840 #: ../fish/guestfish-actions.pod:4989 ../src/guestfs-actions.pod:7554
14841 msgid "This returns the filesystem UUID of the filesystem on C<device>."
14845 #: ../fish/guestfish-actions.pod:4992 ../src/guestfs-actions.pod:7557
14846 msgid "If the filesystem does not have a UUID, this returns the empty string."
14850 #: ../fish/guestfish-actions.pod:4994
14851 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
14855 #: ../fish/guestfish-actions.pod:4996
14856 msgid "vg-activate"
14860 #: ../fish/guestfish-actions.pod:4998
14863 " vg-activate true|false 'volgroups ...'\n"
14868 #: ../fish/guestfish-actions.pod:5000 ../src/guestfs-actions.pod:7573
14870 "This command activates or (if C<activate> is false) deactivates all logical "
14871 "volumes in the listed volume groups C<volgroups>."
14875 #: ../fish/guestfish-actions.pod:5003 ../src/guestfs-actions.pod:7576
14876 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
14880 #: ../fish/guestfish-actions.pod:5005 ../src/guestfs-actions.pod:7578
14882 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
14883 "activated or deactivated."
14887 #: ../fish/guestfish-actions.pod:5008
14888 msgid "vg-activate-all"
14892 #: ../fish/guestfish-actions.pod:5010
14895 " vg-activate-all true|false\n"
14900 #: ../fish/guestfish-actions.pod:5012 ../src/guestfs-actions.pod:7591
14902 "This command activates or (if C<activate> is false) deactivates all logical "
14903 "volumes in all volume groups."
14907 #: ../fish/guestfish-actions.pod:5015 ../src/guestfs-actions.pod:7594
14908 msgid "This command is the same as running C<vgchange -a y|n>"
14912 #: ../fish/guestfish-actions.pod:5017
14917 #: ../fish/guestfish-actions.pod:5019
14920 " vgcreate volgroup 'physvols ...'\n"
14925 #: ../fish/guestfish-actions.pod:5021 ../src/guestfs-actions.pod:7607
14927 "This creates an LVM volume group called C<volgroup> from the non-empty list "
14928 "of physical volumes C<physvols>."
14932 #: ../fish/guestfish-actions.pod:5024
14937 #: ../fish/guestfish-actions.pod:5026
14940 " vglvuuids vgname\n"
14945 #: ../fish/guestfish-actions.pod:5028 ../src/guestfs-actions.pod:7620
14947 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
14948 "volumes created in this volume group."
14952 #: ../fish/guestfish-actions.pod:5031
14954 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
14955 "logical volumes and volume groups."
14959 #: ../fish/guestfish-actions.pod:5034
14960 msgid "See also L</vgpvuuids>."
14964 #: ../fish/guestfish-actions.pod:5036
14969 #: ../fish/guestfish-actions.pod:5038
14972 " vgpvuuids vgname\n"
14977 #: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7640
14979 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
14980 "volumes that this volume group resides on."
14984 #: ../fish/guestfish-actions.pod:5043
14986 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
14987 "physical volumes and volume groups."
14991 #: ../fish/guestfish-actions.pod:5046
14992 msgid "See also L</vglvuuids>."
14996 #: ../fish/guestfish-actions.pod:5048
15001 #: ../fish/guestfish-actions.pod:5050
15004 " vgremove vgname\n"
15009 #: ../fish/guestfish-actions.pod:5052 ../src/guestfs-actions.pod:7660
15010 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
15014 #: ../fish/guestfish-actions.pod:5054 ../src/guestfs-actions.pod:7662
15015 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
15019 #: ../fish/guestfish-actions.pod:5057
15024 #: ../fish/guestfish-actions.pod:5059
15027 " vgrename volgroup newvolgroup\n"
15032 #: ../fish/guestfish-actions.pod:5061 ../src/guestfs-actions.pod:7676
15033 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
15037 #: ../fish/guestfish-actions.pod:5063
15042 #: ../fish/guestfish-actions.pod:5065
15050 #: ../fish/guestfish-actions.pod:5067 ../src/guestfs-actions.pod:7687
15052 "List all the volumes groups detected. This is the equivalent of the "
15053 "L<vgs(8)> command."
15057 #: ../fish/guestfish-actions.pod:5070 ../src/guestfs-actions.pod:7690
15059 "This returns a list of just the volume group names that were detected "
15060 "(eg. C<VolGroup00>)."
15064 #: ../fish/guestfish-actions.pod:5073
15065 msgid "See also L</vgs-full>."
15069 #: ../fish/guestfish-actions.pod:5075
15074 #: ../fish/guestfish-actions.pod:5077
15082 #: ../fish/guestfish-actions.pod:5079 ../src/guestfs-actions.pod:7706
15084 "List all the volumes groups detected. This is the equivalent of the "
15085 "L<vgs(8)> command. The \"full\" version includes all fields."
15089 #: ../fish/guestfish-actions.pod:5082
15094 #: ../fish/guestfish-actions.pod:5084
15102 #: ../fish/guestfish-actions.pod:5086 ../src/guestfs-actions.pod:7720
15104 "This rescans all block devices and rebuilds the list of LVM physical "
15105 "volumes, volume groups and logical volumes."
15109 #: ../fish/guestfish-actions.pod:5089
15114 #: ../fish/guestfish-actions.pod:5091
15122 #: ../fish/guestfish-actions.pod:5093 ../src/guestfs-actions.pod:7733
15123 msgid "This command returns the UUID of the LVM VG named C<vgname>."
15127 #: ../fish/guestfish-actions.pod:5095
15132 #: ../fish/guestfish-actions.pod:5097
15140 #: ../fish/guestfish-actions.pod:5099 ../src/guestfs-actions.pod:7773
15142 "This command counts the characters in a file, using the C<wc -c> external "
15147 #: ../fish/guestfish-actions.pod:5102
15152 #: ../fish/guestfish-actions.pod:5104
15160 #: ../fish/guestfish-actions.pod:5106 ../src/guestfs-actions.pod:7786
15162 "This command counts the lines in a file, using the C<wc -l> external "
15167 #: ../fish/guestfish-actions.pod:5109
15172 #: ../fish/guestfish-actions.pod:5111
15180 #: ../fish/guestfish-actions.pod:5113 ../src/guestfs-actions.pod:7799
15182 "This command counts the words in a file, using the C<wc -w> external "
15187 #: ../fish/guestfish-actions.pod:5116
15192 #: ../fish/guestfish-actions.pod:5118
15195 " write path content\n"
15200 #: ../fish/guestfish-actions.pod:5120 ../src/guestfs-actions.pod:7814
15202 "This call creates a file called C<path>. The content of the file is the "
15203 "string C<content> (which can contain any 8 bit data)."
15207 #: ../fish/guestfish-actions.pod:5123
15208 msgid "See also L</write-append>."
15212 #: ../fish/guestfish-actions.pod:5128
15213 msgid "write-append"
15217 #: ../fish/guestfish-actions.pod:5130
15220 " write-append path content\n"
15225 #: ../fish/guestfish-actions.pod:5132 ../src/guestfs-actions.pod:7834
15227 "This call appends C<content> to the end of file C<path>. If C<path> does "
15228 "not exist, then a new file is created."
15232 #: ../fish/guestfish-actions.pod:5135
15233 msgid "See also L</write>."
15237 #: ../fish/guestfish-actions.pod:5140
15242 #: ../fish/guestfish-actions.pod:5142
15245 " write-file path content size\n"
15250 #: ../fish/guestfish-actions.pod:5144 ../src/guestfs-actions.pod:7861
15252 "This call creates a file called C<path>. The contents of the file is the "
15253 "string C<content> (which can contain any 8 bit data), with length C<size>."
15257 #: ../fish/guestfish-actions.pod:5148 ../src/guestfs-actions.pod:7865
15259 "As a special case, if C<size> is C<0> then the length is calculated using "
15260 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
15264 #: ../fish/guestfish-actions.pod:5152 ../src/guestfs-actions.pod:7869
15266 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
15267 "I<not> work, even if the length is specified."
15271 #: ../fish/guestfish-actions.pod:5158
15272 msgid "I<This function is deprecated.> In new code, use the L</write> call instead."
15276 #: ../fish/guestfish-actions.pod:5165
15281 #: ../fish/guestfish-actions.pod:5167
15284 " zegrep regex path\n"
15289 #: ../fish/guestfish-actions.pod:5169 ../src/guestfs-actions.pod:7886
15290 msgid "This calls the external C<zegrep> program and returns the matching lines."
15294 #: ../fish/guestfish-actions.pod:5175
15299 #: ../fish/guestfish-actions.pod:5177
15302 " zegrepi regex path\n"
15307 #: ../fish/guestfish-actions.pod:5179 ../src/guestfs-actions.pod:7905
15308 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
15312 #: ../fish/guestfish-actions.pod:5185
15317 #: ../fish/guestfish-actions.pod:5187
15325 #: ../fish/guestfish-actions.pod:5189 ../src/guestfs-actions.pod:7923
15326 msgid "This command writes zeroes over the first few blocks of C<device>."
15330 #: ../fish/guestfish-actions.pod:5191 ../src/guestfs-actions.pod:7925
15332 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
15333 "securely wipe the device). It should be sufficient to remove any partition "
15334 "tables, filesystem superblocks and so on."
15338 #: ../fish/guestfish-actions.pod:5195 ../fish/guestfish-actions.pod:5210 ../src/guestfs-actions.pod:7929 ../src/guestfs-actions.pod:7955
15340 "If blocks are already zero, then this command avoids writing zeroes. This "
15341 "prevents the underlying device from becoming non-sparse or growing "
15346 #: ../fish/guestfish-actions.pod:5199
15347 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
15351 #: ../fish/guestfish-actions.pod:5202
15352 msgid "zero-device"
15356 #: ../fish/guestfish-actions.pod:5204
15359 " zero-device device\n"
15364 #: ../fish/guestfish-actions.pod:5206
15366 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
15367 "which just zeroes the first few blocks of a device."
15371 #: ../fish/guestfish-actions.pod:5217
15376 #: ../fish/guestfish-actions.pod:5219
15379 " zerofree device\n"
15384 #: ../fish/guestfish-actions.pod:5221 ../src/guestfs-actions.pod:7977
15386 "This runs the I<zerofree> program on C<device>. This program claims to zero "
15387 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
15388 "possible to compress the filesystem more effectively."
15392 #: ../fish/guestfish-actions.pod:5226 ../src/guestfs-actions.pod:7982
15393 msgid "You should B<not> run this program if the filesystem is mounted."
15397 #: ../fish/guestfish-actions.pod:5229 ../src/guestfs-actions.pod:7985
15399 "It is possible that using this program can damage the filesystem or data on "
15404 #: ../fish/guestfish-actions.pod:5232
15409 #: ../fish/guestfish-actions.pod:5234
15412 " zfgrep pattern path\n"
15417 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:7999
15418 msgid "This calls the external C<zfgrep> program and returns the matching lines."
15422 #: ../fish/guestfish-actions.pod:5242
15427 #: ../fish/guestfish-actions.pod:5244
15430 " zfgrepi pattern path\n"
15435 #: ../fish/guestfish-actions.pod:5246 ../src/guestfs-actions.pod:8018
15436 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
15440 #: ../fish/guestfish-actions.pod:5252
15445 #: ../fish/guestfish-actions.pod:5254
15448 " zfile meth path\n"
15453 #: ../fish/guestfish-actions.pod:5256 ../src/guestfs-actions.pod:8044
15454 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
15458 #: ../fish/guestfish-actions.pod:5259 ../src/guestfs-actions.pod:8047
15459 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
15463 #: ../fish/guestfish-actions.pod:5261
15464 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
15468 #: ../fish/guestfish-actions.pod:5264
15469 msgid "I<This function is deprecated.> In new code, use the L</file> call instead."
15473 #: ../fish/guestfish-actions.pod:5271
15478 #: ../fish/guestfish-actions.pod:5273
15481 " zgrep regex path\n"
15486 #: ../fish/guestfish-actions.pod:5275 ../src/guestfs-actions.pod:8064
15487 msgid "This calls the external C<zgrep> program and returns the matching lines."
15491 #: ../fish/guestfish-actions.pod:5281
15496 #: ../fish/guestfish-actions.pod:5283
15499 " zgrepi regex path\n"
15504 #: ../fish/guestfish-actions.pod:5285 ../src/guestfs-actions.pod:8083
15505 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
15509 #: ../fish/guestfish-commands.pod:1
15514 #: ../fish/guestfish-commands.pod:3
15519 #: ../fish/guestfish-commands.pod:5
15522 " alloc filename size\n"
15527 #: ../fish/guestfish-commands.pod:7
15529 "This creates an empty (zeroed) file of the given size, and then adds so it "
15530 "can be further examined."
15534 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
15535 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
15539 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
15540 msgid "Size can be specified using standard suffixes, eg. C<1M>."
15544 #: ../fish/guestfish-commands.pod:14
15546 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
15547 "image, see L</PREPARED DISK IMAGES>."
15551 #: ../fish/guestfish-commands.pod:17
15556 #: ../fish/guestfish-commands.pod:19
15559 " copy-in local [local ...] /remotedir\n"
15564 #: ../fish/guestfish-commands.pod:21
15566 "C<copy-in> copies local files or directories recursively into the disk "
15567 "image, placing them in the directory called C</remotedir> (which must "
15568 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
15569 "other commands as necessary."
15573 #: ../fish/guestfish-commands.pod:26
15575 "Multiple local files and directories can be specified, but the last "
15576 "parameter must always be a remote directory. Wildcards cannot be used."
15580 #: ../fish/guestfish-commands.pod:30
15585 #: ../fish/guestfish-commands.pod:32
15588 " copy-out remote [remote ...] localdir\n"
15593 #: ../fish/guestfish-commands.pod:34
15595 "C<copy-out> copies remote files or directories recursively out of the disk "
15596 "image, placing them on the host disk in a local directory called C<localdir> "
15597 "(which must exist). This guestfish meta-command turns into a sequence of "
15598 "L</download>, L</tar-out> and other commands as necessary."
15602 #: ../fish/guestfish-commands.pod:40
15604 "Multiple remote files and directories can be specified, but the last "
15605 "parameter must always be a local directory. To download to the current "
15606 "directory, use C<.> as in:"
15610 #: ../fish/guestfish-commands.pod:44
15613 " copy-out /home .\n"
15618 #: ../fish/guestfish-commands.pod:46
15620 "Wildcards cannot be used in the ordinary command, but you can use them with "
15621 "the help of L</glob> like this:"
15625 #: ../fish/guestfish-commands.pod:49
15628 " glob copy-out /home/* .\n"
15633 #: ../fish/guestfish-commands.pod:51
15638 #: ../fish/guestfish-commands.pod:53
15641 " display filename\n"
15646 #: ../fish/guestfish-commands.pod:55
15648 "Use C<display> (a graphical display program) to display an image file. It "
15649 "downloads the file, and runs C<display> on it."
15653 #: ../fish/guestfish-commands.pod:58
15655 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
15656 "environment variable. For example to use the GNOME display program:"
15660 #: ../fish/guestfish-commands.pod:61
15663 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
15668 #: ../fish/guestfish-commands.pod:63
15669 msgid "See also L<display(1)>."
15673 #: ../fish/guestfish-commands.pod:65
15678 #: ../fish/guestfish-commands.pod:67
15681 " echo [params ...]\n"
15686 #: ../fish/guestfish-commands.pod:69
15687 msgid "This echos the parameters to the terminal."
15691 #: ../fish/guestfish-commands.pod:71
15696 #: ../fish/guestfish-commands.pod:73
15701 #: ../fish/guestfish-commands.pod:75
15706 #: ../fish/guestfish-commands.pod:77
15714 #: ../fish/guestfish-commands.pod:79
15716 "This is used to edit a file. It downloads the file, edits it locally using "
15717 "your editor, then uploads the result."
15721 #: ../fish/guestfish-commands.pod:82
15723 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
15724 "or C<emacs> you will get those corresponding editors."
15728 #: ../fish/guestfish-commands.pod:86
15733 #: ../fish/guestfish-commands.pod:88
15736 " glob command args...\n"
15741 #: ../fish/guestfish-commands.pod:90
15743 "Expand wildcards in any paths in the args list, and run C<command> "
15744 "repeatedly on each matching path."
15748 #: ../fish/guestfish-commands.pod:93
15749 msgid "See L</WILDCARDS AND GLOBBING>."
15753 #: ../fish/guestfish-commands.pod:95
15758 #: ../fish/guestfish-commands.pod:97
15761 " hexedit <filename|device>\n"
15762 " hexedit <filename|device> <max>\n"
15763 " hexedit <filename|device> <start> <max>\n"
15768 #: ../fish/guestfish-commands.pod:101
15770 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
15775 #: ../fish/guestfish-commands.pod:104
15777 "This command works by downloading potentially the whole file or device, "
15778 "editing it locally, then uploading it. If the file or device is large, you "
15779 "have to specify which part you wish to edit by using C<max> and/or C<start> "
15780 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
15781 "usual modifiers allowed such as C<1M> (1 megabyte)."
15785 #: ../fish/guestfish-commands.pod:111
15786 msgid "For example to edit the first few sectors of a disk you might do:"
15790 #: ../fish/guestfish-commands.pod:114
15793 " hexedit /dev/sda 1M\n"
15798 #: ../fish/guestfish-commands.pod:116
15800 "which would allow you to edit anywhere within the first megabyte of the "
15805 #: ../fish/guestfish-commands.pod:119
15806 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
15810 #: ../fish/guestfish-commands.pod:121
15813 " hexedit /dev/sda1 0x400 0x400\n"
15818 #: ../fish/guestfish-commands.pod:123
15819 msgid "(assuming the superblock is in the standard location)."
15823 #: ../fish/guestfish-commands.pod:125
15825 "This command requires the external L<hexedit(1)> program. You can specify "
15826 "another program to use by setting the C<HEXEDITOR> environment variable."
15830 #: ../fish/guestfish-commands.pod:129
15831 msgid "See also L</hexdump>."
15835 #: ../fish/guestfish-commands.pod:131
15840 #: ../fish/guestfish-commands.pod:133
15848 #: ../fish/guestfish-commands.pod:135
15849 msgid "Change the local directory, ie. the current directory of guestfish itself."
15853 #: ../fish/guestfish-commands.pod:138
15854 msgid "Note that C<!cd> won't do what you might expect."
15858 #: ../fish/guestfish-commands.pod:140
15863 #: ../fish/guestfish-commands.pod:142
15868 #: ../fish/guestfish-commands.pod:144
15876 #: ../fish/guestfish-commands.pod:146
15877 msgid "Opens the manual page for guestfish."
15881 #: ../fish/guestfish-commands.pod:148
15886 #: ../fish/guestfish-commands.pod:150
15891 #: ../fish/guestfish-commands.pod:152
15899 #: ../fish/guestfish-commands.pod:154
15907 #: ../fish/guestfish-commands.pod:156
15908 msgid "This is used to view a file."
15912 #: ../fish/guestfish-commands.pod:158
15914 "The default viewer is C<$PAGER>. However if you use the alternate command "
15915 "C<less> you will get the C<less> command specifically."
15919 #: ../fish/guestfish-commands.pod:161
15924 #: ../fish/guestfish-commands.pod:163
15932 #: ../fish/guestfish-commands.pod:165
15934 "Close and reopen the libguestfs handle. It is not necessary to use this "
15935 "normally, because the handle is closed properly when guestfish exits. "
15936 "However this is occasionally useful for testing."
15940 #: ../fish/guestfish-commands.pod:169
15945 #: ../fish/guestfish-commands.pod:171
15948 " setenv VAR value\n"
15953 #: ../fish/guestfish-commands.pod:173
15954 msgid "Set the environment variable C<VAR> to the string C<value>."
15958 #: ../fish/guestfish-commands.pod:175
15959 msgid "To print the value of an environment variable use a shell command such as:"
15963 #: ../fish/guestfish-commands.pod:178
15971 #: ../fish/guestfish-commands.pod:180
15976 #: ../fish/guestfish-commands.pod:182
15979 " sparse filename size\n"
15984 #: ../fish/guestfish-commands.pod:184
15986 "This creates an empty sparse file of the given size, and then adds so it can "
15987 "be further examined."
15991 #: ../fish/guestfish-commands.pod:187
15993 "In all respects it works the same as the L</alloc> command, except that the "
15994 "image file is allocated sparsely, which means that disk blocks are not "
15995 "assigned to the file until they are needed. Sparse disk files only use "
15996 "space when written to, but they are slower and there is a danger you could "
15997 "run out of real disk space during a write operation."
16001 #: ../fish/guestfish-commands.pod:197
16006 #: ../fish/guestfish-commands.pod:199
16014 #: ../fish/guestfish-commands.pod:201
16016 "This command returns a list of the optional groups known to the daemon, and "
16017 "indicates which ones are supported by this build of the libguestfs "
16022 #: ../fish/guestfish-commands.pod:205
16023 msgid "See also L<guestfs(3)/AVAILABILITY>."
16027 #: ../fish/guestfish-commands.pod:207
16032 #: ../fish/guestfish-commands.pod:209
16035 " time command args...\n"
16040 #: ../fish/guestfish-commands.pod:211
16042 "Run the command as usual, but print the elapsed time afterwards. This can "
16043 "be useful for benchmarking operations."
16047 #: ../fish/guestfish-commands.pod:214
16052 #: ../fish/guestfish-commands.pod:216
16060 #: ../fish/guestfish-commands.pod:218
16061 msgid "Remove C<VAR> from the environment."
16065 #: ../fish/guestfish.pod:5
16066 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
16070 #: ../fish/guestfish.pod:9
16073 " guestfish [--options] [commands]\n"
16078 #: ../fish/guestfish.pod:11
16086 #: ../fish/guestfish.pod:13
16089 " guestfish [--ro|--rw] -a disk.img\n"
16094 #: ../fish/guestfish.pod:15
16097 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
16102 #: ../fish/guestfish.pod:17
16105 " guestfish -d libvirt-domain\n"
16110 #: ../fish/guestfish.pod:19
16113 " guestfish [--ro|--rw] -a disk.img -i\n"
16118 #: ../fish/guestfish.pod:21
16121 " guestfish -d libvirt-domain -i\n"
16126 #: ../fish/guestfish.pod:25
16128 "Using guestfish in read/write mode on live virtual machines can be "
16129 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
16130 "option to use guestfish safely if the disk image or virtual machine might be "
16135 #: ../fish/guestfish.pod:32
16137 "Guestfish is a shell and command-line tool for examining and modifying "
16138 "virtual machine filesystems. It uses libguestfs and exposes all of the "
16139 "functionality of the guestfs API, see L<guestfs(3)>."
16143 #: ../fish/guestfish.pod:36
16145 "Guestfish gives you structured access to the libguestfs API, from shell "
16146 "scripts or the command line or interactively. If you want to rescue a "
16147 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
16152 #: ../fish/guestfish.pod:43
16153 msgid "As an interactive shell"
16157 #: ../fish/guestfish.pod:45
16165 #: ../fish/guestfish.pod:47
16168 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
16169 " editing virtual machine filesystems.\n"
16174 #: ../fish/guestfish.pod:50
16177 " Type: 'help' for a list of commands\n"
16178 " 'man' to read the manual\n"
16179 " 'quit' to quit the shell\n"
16184 #: ../fish/guestfish.pod:54
16187 " ><fs> add-ro disk.img\n"
16189 " ><fs> list-filesystems\n"
16190 " /dev/sda1: ext4\n"
16191 " /dev/vg_guest/lv_root: ext4\n"
16192 " /dev/vg_guest/lv_swap: swap\n"
16193 " ><fs> mount /dev/vg_guest/lv_root /\n"
16194 " ><fs> cat /etc/fstab\n"
16196 " # Created by anaconda\n"
16203 #: ../fish/guestfish.pod:67
16204 msgid "From shell scripts"
16208 #: ../fish/guestfish.pod:69
16209 msgid "Create a new C</etc/motd> file in a guest or disk image:"
16213 #: ../fish/guestfish.pod:71
16216 " guestfish <<_EOF_\n"
16219 " mount /dev/vg_guest/lv_root /\n"
16220 " write /etc/motd \"Welcome, new users\"\n"
16226 #: ../fish/guestfish.pod:78
16227 msgid "List the LVM logical volumes in a disk image:"
16231 #: ../fish/guestfish.pod:80
16234 " guestfish -a disk.img --ro <<_EOF_\n"
16242 #: ../fish/guestfish.pod:85
16243 msgid "List all the filesystems in a disk image:"
16247 #: ../fish/guestfish.pod:87
16250 " guestfish -a disk.img --ro <<_EOF_\n"
16252 " list-filesystems\n"
16258 #: ../fish/guestfish.pod:92
16259 msgid "On one command line"
16263 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
16264 msgid "Update C</etc/resolv.conf> in a guest:"
16268 #: ../fish/guestfish.pod:96
16272 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
16273 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
16278 #: ../fish/guestfish.pod:100
16279 msgid "Edit C</boot/grub/grub.conf> interactively:"
16283 #: ../fish/guestfish.pod:102
16286 " guestfish --rw --add disk.img \\\n"
16287 " --mount /dev/vg_guest/lv_root \\\n"
16288 " --mount /dev/sda1:/boot \\\n"
16289 " edit /boot/grub/grub.conf\n"
16294 #: ../fish/guestfish.pod:107
16295 msgid "Mount disks automatically"
16299 #: ../fish/guestfish.pod:109
16301 "Use the I<-i> option to automatically mount the disks from a virtual "
16306 #: ../fish/guestfish.pod:112
16309 " guestfish --ro -a disk.img -i cat /etc/group\n"
16314 #: ../fish/guestfish.pod:114
16317 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
16322 #: ../fish/guestfish.pod:116
16323 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
16327 #: ../fish/guestfish.pod:118
16330 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
16335 #: ../fish/guestfish.pod:120
16336 msgid "As a script interpreter"
16340 #: ../fish/guestfish.pod:122
16341 msgid "Create a 100MB disk containing an ext2-formatted partition:"
16345 #: ../fish/guestfish.pod:124
16348 " #!/usr/bin/guestfish -f\n"
16349 " sparse test1.img 100M\n"
16351 " part-disk /dev/sda mbr\n"
16352 " mkfs ext2 /dev/sda1\n"
16357 #: ../fish/guestfish.pod:130
16358 msgid "Start with a prepared disk"
16362 #: ../fish/guestfish.pod:132
16364 "An alternate way to create a 100MB disk called C<test1.img> containing a "
16365 "single ext2-formatted partition:"
16369 #: ../fish/guestfish.pod:135
16372 " guestfish -N fs\n"
16377 #: ../fish/guestfish.pod:137
16378 msgid "To list what is available do:"
16382 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1009
16385 " guestfish -N help | less\n"
16390 #: ../fish/guestfish.pod:141
16391 msgid "Remote control"
16395 #: ../fish/guestfish.pod:143
16398 " eval \"`guestfish --listen`\"\n"
16399 " guestfish --remote add-ro disk.img\n"
16400 " guestfish --remote run\n"
16401 " guestfish --remote lvs\n"
16406 #: ../fish/guestfish.pod:154
16407 msgid "Displays general help on options."
16411 #: ../fish/guestfish.pod:158
16412 msgid "B<--cmd-help>"
16416 #: ../fish/guestfish.pod:160
16417 msgid "Lists all available guestfish commands."
16421 #: ../fish/guestfish.pod:162
16426 #: ../fish/guestfish.pod:164
16427 msgid "B<--cmd-help cmd>"
16431 #: ../fish/guestfish.pod:166
16432 msgid "Displays detailed help on a single command C<cmd>."
16436 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:87
16437 msgid "B<-a image>"
16441 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:89
16442 msgid "B<--add image>"
16446 #: ../fish/guestfish.pod:172
16447 msgid "Add a block device or virtual machine image to the shell."
16451 #: ../fish/guestfish.pod:177
16453 "Using this flag is mostly equivalent to using the C<add> command, with "
16454 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
16455 "the I<--format=...> flag was given."
16459 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:100
16461 "When used in conjunction with the I<-d> option, this specifies the libvirt "
16462 "URI to use. The default is to use the default libvirt connection."
16466 #: ../fish/guestfish.pod:189
16471 #: ../fish/guestfish.pod:191
16473 "If using the I<--listen> option and a csh-like shell, use this option. See "
16474 "section L</REMOTE CONTROL AND CSH> below."
16478 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:104
16479 msgid "B<-d libvirt-domain>"
16483 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:106
16484 msgid "B<--domain libvirt-domain>"
16488 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:108
16490 "Add disks from the named libvirt domain. If the I<--ro> option is also "
16491 "used, then any libvirt domain can be used. However in write mode, only "
16492 "libvirt domains which are shut down can be named here."
16496 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:112
16497 msgid "Domain UUIDs can be used instead of names."
16501 #: ../fish/guestfish.pod:204
16503 "Using this flag is mostly equivalent to using the C<add-domain> command, "
16504 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
16505 "if the I<--format:...> flag was given."
16509 #: ../fish/guestfish.pod:208
16514 #: ../fish/guestfish.pod:210
16515 msgid "B<--no-dest-paths>"
16519 #: ../fish/guestfish.pod:212
16521 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
16522 "to hit the tab key to complete paths on the guest filesystem, but this "
16523 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
16524 "allow this feature to be disabled."
16528 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:128
16530 "When prompting for keys and passphrases, guestfish normally turns echoing "
16531 "off so you cannot see what you are typing. If you are not worried about "
16532 "Tempest attacks and there is no one else in the room you can specify this "
16533 "flag to see what you are typing."
16537 #: ../fish/guestfish.pod:224
16542 #: ../fish/guestfish.pod:226
16543 msgid "B<--file file>"
16547 #: ../fish/guestfish.pod:228
16548 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
16552 #: ../fish/guestfish.pod:231
16555 " #!/usr/bin/guestfish -f\n"
16560 #: ../fish/guestfish.pod:244
16563 " guestfish --format=raw -a disk.img\n"
16568 #: ../fish/guestfish.pod:248
16571 " guestfish --format=raw -a disk.img --format -a another.img\n"
16576 #: ../fish/guestfish.pod:253
16578 "If you have untrusted raw-format guest disk images, you should use this "
16579 "option to specify the disk format. This avoids a possible security problem "
16580 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
16584 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:157
16585 msgid "B<--inspector>"
16589 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:159
16591 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
16592 "system and mount filesystems as they would be mounted on the real virtual "
16597 #: ../fish/guestfish.pod:266
16598 msgid "Typical usage is either:"
16602 #: ../fish/guestfish.pod:268
16605 " guestfish -d myguest -i\n"
16610 #: ../fish/guestfish.pod:270
16611 msgid "(for an inactive libvirt domain called I<myguest>), or:"
16615 #: ../fish/guestfish.pod:272
16618 " guestfish --ro -d myguest -i\n"
16623 #: ../fish/guestfish.pod:274
16624 msgid "(for active domains, readonly), or specify the block device directly:"
16628 #: ../fish/guestfish.pod:276
16631 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
16636 #: ../fish/guestfish.pod:278
16638 "Note that the command line syntax changed slightly over older versions of "
16639 "guestfish. You can still use the old syntax:"
16643 #: ../fish/guestfish.pod:281
16646 " guestfish [--ro] -i disk.img\n"
16651 #: ../fish/guestfish.pod:283
16654 " guestfish [--ro] -i libvirt-domain\n"
16659 #: ../fish/guestfish.pod:285
16661 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
16662 "then using other commands to mount the filesystems that were found."
16666 #: ../fish/guestfish.pod:294
16667 msgid "B<--listen>"
16671 #: ../fish/guestfish.pod:296
16673 "Fork into the background and listen for remote commands. See section "
16674 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
16678 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:168
16683 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:170
16685 "Connect to a live virtual machine. (Experimental, see "
16686 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
16690 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:173
16691 msgid "B<-m dev[:mountpoint[:options]]>"
16695 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:175
16696 msgid "B<--mount dev[:mountpoint[:options]]>"
16700 #: ../fish/guestfish.pod:308
16701 msgid "Mount the named partition or logical volume on the given mountpoint."
16705 #: ../fish/guestfish.pod:310
16706 msgid "If the mountpoint is omitted, it defaults to C</>."
16710 #: ../fish/guestfish.pod:312
16711 msgid "You have to mount something on C</> before most commands will work."
16715 #: ../fish/guestfish.pod:314
16717 "If any I<-m> or I<--mount> options are given, the guest is automatically "
16722 #: ../fish/guestfish.pod:317
16724 "If you don't know what filesystems a disk image contains, you can either run "
16725 "guestfish without this option, then list the partitions, filesystems and LVs "
16726 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
16727 "commands), or you can use the L<virt-filesystems(1)> program."
16731 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:183
16733 "The third (and rarely used) part of the mount parameter is the list of mount "
16734 "options used to mount the underlying filesystem. If this is not given, then "
16735 "the mount options are either the empty string or C<ro> (the latter if the "
16736 "I<--ro> flag is used). By specifying the mount options, you override this "
16737 "default choice. Probably the only time you would use this is to enable ACLs "
16738 "and/or extended attributes if the filesystem can support them:"
16742 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:191
16745 " -m /dev/sda1:/:acl,user_xattr\n"
16750 #: ../fish/guestfish.pod:333
16751 msgid "Using this flag is equivalent to using the C<mount-options> command."
16755 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:193 ../resize/virt-resize.pod:358
16760 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:195
16761 msgid "B<--no-sync>"
16765 #: ../fish/guestfish.pod:339
16767 "Disable autosync. This is enabled by default. See the discussion of "
16768 "autosync in the L<guestfs(3)> manpage."
16772 #: ../fish/guestfish.pod:342
16777 #: ../fish/guestfish.pod:344
16778 msgid "B<--new type>"
16782 #: ../fish/guestfish.pod:346
16787 #: ../fish/guestfish.pod:348
16789 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
16790 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
16791 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
16796 #: ../fish/guestfish.pod:353
16797 msgid "B<--progress-bars>"
16801 #: ../fish/guestfish.pod:355
16802 msgid "Enable progress bars, even when guestfish is used non-interactively."
16806 #: ../fish/guestfish.pod:357
16808 "Progress bars are enabled by default when guestfish is used as an "
16809 "interactive shell."
16813 #: ../fish/guestfish.pod:360
16814 msgid "B<--no-progress-bars>"
16818 #: ../fish/guestfish.pod:362
16819 msgid "Disable progress bars."
16823 #: ../fish/guestfish.pod:364
16824 msgid "B<--remote[=pid]>"
16828 #: ../fish/guestfish.pod:366
16830 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
16831 "CONTROL GUESTFISH OVER A SOCKET> below."
16835 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:239 ../rescue/virt-rescue.pod:161
16840 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:241 ../rescue/virt-rescue.pod:163
16845 #: ../fish/guestfish.pod:373
16847 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
16848 "mounts are done read-only."
16852 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
16854 "The option must always be used if the disk image or virtual machine might be "
16855 "running, and is generally recommended in cases where you don't need write "
16856 "access to the disk."
16860 #: ../fish/guestfish.pod:380
16862 "Note that prepared disk images created with I<-N> are not affected by this "
16863 "option. Also commands like C<add> are not affected - you have to specify "
16864 "the C<readonly:true> option explicitly if you need it."
16868 #: ../fish/guestfish.pod:384
16869 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
16873 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:253 ../rescue/virt-rescue.pod:173
16874 msgid "B<--selinux>"
16878 #: ../fish/guestfish.pod:388
16879 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
16883 #: ../fish/guestfish.pod:394
16885 "Enable very verbose messages. This is particularly useful if you find a "
16890 #: ../fish/guestfish.pod:401
16891 msgid "Display the guestfish / libguestfs version number and exit."
16895 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:269 ../rescue/virt-rescue.pod:194
16900 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:271 ../rescue/virt-rescue.pod:196
16905 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:273
16907 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
16908 "mounts are done read-write."
16912 #: ../fish/guestfish.pod:410
16913 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
16917 #: ../fish/guestfish.pod:414
16918 msgid "Echo each command before executing it."
16922 #: ../fish/guestfish.pod:418
16923 msgid "COMMANDS ON COMMAND LINE"
16927 #: ../fish/guestfish.pod:420
16928 msgid "Any additional (non-option) arguments are treated as commands to execute."
16932 #: ../fish/guestfish.pod:423
16934 "Commands to execute should be separated by a colon (C<:>), where the colon "
16935 "is a separate parameter. Thus:"
16939 #: ../fish/guestfish.pod:426
16942 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
16947 #: ../fish/guestfish.pod:428
16949 "If there are no additional arguments, then we enter a shell, either an "
16950 "interactive shell with a prompt (if the input is a terminal) or a "
16951 "non-interactive shell."
16955 #: ../fish/guestfish.pod:432
16957 "In either command line mode or non-interactive shell, the first command that "
16958 "gives an error causes the whole shell to exit. In interactive mode (with a "
16959 "prompt) if a command fails, you can continue to enter commands."
16963 #: ../fish/guestfish.pod:437
16964 msgid "USING launch (OR run)"
16968 #: ../fish/guestfish.pod:439
16970 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
16971 "then launch it, then mount any disks you need, and finally issue "
16972 "actions/commands. So the general order of the day is:"
16976 #: ../fish/guestfish.pod:447
16977 msgid "add or -a/--add"
16981 #: ../fish/guestfish.pod:451
16982 msgid "launch (aka run)"
16986 #: ../fish/guestfish.pod:455
16987 msgid "mount or -m/--mount"
16991 #: ../fish/guestfish.pod:459
16992 msgid "any other commands"
16996 #: ../fish/guestfish.pod:463
16998 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
16999 "guest before mounting or performing any other commands."
17003 #: ../fish/guestfish.pod:466
17005 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
17006 "I<--new> options were given then C<run> is done automatically, simply "
17007 "because guestfish can't perform the action you asked for without doing this."
17011 #: ../fish/guestfish.pod:471
17012 msgid "OPENING DISKS FOR READ AND WRITE"
17016 #: ../fish/guestfish.pod:473
17018 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
17019 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
17020 "I<-i> and I<-m> open disk images read-only or for writing."
17024 #: ../fish/guestfish.pod:478
17026 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
17027 "opening disk images supplied on the command line for write. To open a disk "
17028 "image read-only you have to do I<-a image --ro>."
17032 #: ../fish/guestfish.pod:482
17034 "This matters: If you accidentally open a live VM disk image writable then "
17035 "you will cause irreversible disk corruption."
17039 #: ../fish/guestfish.pod:485
17041 "In a future libguestfs we intend to change the default the other way. Disk "
17042 "images will be opened read-only. You will have to either specify "
17043 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
17044 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
17045 "access for disk images specified by those other command line options."
17049 #: ../fish/guestfish.pod:492
17051 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
17052 "which does nothing (it is already the default). However it is highly "
17053 "recommended that you use this option to indicate that you need write access, "
17054 "and prepare your scripts for the day when this option will be required for "
17059 #: ../fish/guestfish.pod:498
17061 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
17062 "other libguestfs program apart from guestfish and guestmount."
17066 #: ../fish/guestfish.pod:501
17071 #: ../fish/guestfish.pod:503
17073 "You can quote ordinary parameters using either single or double quotes. For "
17078 #: ../fish/guestfish.pod:506
17081 " add \"file with a space.img\"\n"
17086 #: ../fish/guestfish.pod:508
17089 " rm '/file name'\n"
17094 #: ../fish/guestfish.pod:510
17102 #: ../fish/guestfish.pod:512
17104 "A few commands require a list of strings to be passed. For these, use a "
17105 "whitespace-separated list, enclosed in quotes. Strings containing "
17106 "whitespace to be passed through must be enclosed in single quotes. A "
17107 "literal single quote must be escaped with a backslash."
17111 #: ../fish/guestfish.pod:517
17114 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
17115 " command \"/bin/echo 'foo bar'\"\n"
17116 " command \"/bin/echo \\'foo\\'\"\n"
17121 #: ../fish/guestfish.pod:521
17122 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
17126 #: ../fish/guestfish.pod:523
17128 "In double-quoted arguments (only) use backslash to insert special "
17133 #: ../fish/guestfish.pod:528
17138 #: ../fish/guestfish.pod:530
17139 msgid "Alert (bell) character."
17143 #: ../fish/guestfish.pod:532
17148 #: ../fish/guestfish.pod:534
17149 msgid "Backspace character."
17153 #: ../fish/guestfish.pod:536
17158 #: ../fish/guestfish.pod:538
17159 msgid "Form feed character."
17163 #: ../fish/guestfish.pod:540
17168 #: ../fish/guestfish.pod:542
17169 msgid "Newline character."
17173 #: ../fish/guestfish.pod:544
17178 #: ../fish/guestfish.pod:546
17179 msgid "Carriage return character."
17183 #: ../fish/guestfish.pod:548
17188 #: ../fish/guestfish.pod:550
17189 msgid "Horizontal tab character."
17193 #: ../fish/guestfish.pod:552
17198 #: ../fish/guestfish.pod:554
17199 msgid "Vertical tab character."
17203 #: ../fish/guestfish.pod:556
17208 #: ../fish/guestfish.pod:558
17209 msgid "A literal double quote character."
17213 #: ../fish/guestfish.pod:560
17218 #: ../fish/guestfish.pod:562
17220 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
17225 #: ../fish/guestfish.pod:565
17230 #: ../fish/guestfish.pod:567
17231 msgid "A character with hex value I<hh>. There must be precisely 2 hex digits."
17235 #: ../fish/guestfish.pod:570
17237 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
17242 #: ../fish/guestfish.pod:573
17247 #: ../fish/guestfish.pod:575
17248 msgid "A literal backslash character."
17252 #: ../fish/guestfish.pod:579
17253 msgid "OPTIONAL ARGUMENTS"
17257 #: ../fish/guestfish.pod:581
17259 "Some commands take optional arguments. These arguments appear in this "
17260 "documentation as C<[argname:..]>. You can use them as in these examples:"
17264 #: ../fish/guestfish.pod:585
17267 " add-drive-opts filename\n"
17272 #: ../fish/guestfish.pod:587
17275 " add-drive-opts filename readonly:true\n"
17280 #: ../fish/guestfish.pod:589
17283 " add-drive-opts filename format:qcow2 readonly:false\n"
17288 #: ../fish/guestfish.pod:591
17290 "Each optional argument can appear at most once. All optional arguments must "
17291 "appear after the required ones."
17295 #: ../fish/guestfish.pod:594
17300 #: ../fish/guestfish.pod:596
17301 msgid "This section applies to all commands which can take integers as parameters."
17305 #: ../fish/guestfish.pod:599
17306 msgid "SIZE SUFFIX"
17310 #: ../fish/guestfish.pod:601
17312 "When the command takes a parameter measured in bytes, you can use one of the "
17313 "following suffixes to specify kilobytes, megabytes and larger sizes:"
17317 #: ../fish/guestfish.pod:607
17318 msgid "B<k> or B<K> or B<KiB>"
17322 #: ../fish/guestfish.pod:609
17323 msgid "The size in kilobytes (multiplied by 1024)."
17327 #: ../fish/guestfish.pod:611
17332 #: ../fish/guestfish.pod:613
17333 msgid "The size in SI 1000 byte units."
17337 #: ../fish/guestfish.pod:615
17338 msgid "B<M> or B<MiB>"
17342 #: ../fish/guestfish.pod:617
17343 msgid "The size in megabytes (multiplied by 1048576)."
17347 #: ../fish/guestfish.pod:619
17352 #: ../fish/guestfish.pod:621
17353 msgid "The size in SI 1000000 byte units."
17357 #: ../fish/guestfish.pod:623
17358 msgid "B<G> or B<GiB>"
17362 #: ../fish/guestfish.pod:625
17363 msgid "The size in gigabytes (multiplied by 2**30)."
17367 #: ../fish/guestfish.pod:627
17372 #: ../fish/guestfish.pod:629
17373 msgid "The size in SI 10**9 byte units."
17377 #: ../fish/guestfish.pod:631
17378 msgid "B<T> or B<TiB>"
17382 #: ../fish/guestfish.pod:633
17383 msgid "The size in terabytes (multiplied by 2**40)."
17387 #: ../fish/guestfish.pod:635
17392 #: ../fish/guestfish.pod:637
17393 msgid "The size in SI 10**12 byte units."
17397 #: ../fish/guestfish.pod:639
17398 msgid "B<P> or B<PiB>"
17402 #: ../fish/guestfish.pod:641
17403 msgid "The size in petabytes (multiplied by 2**50)."
17407 #: ../fish/guestfish.pod:643
17412 #: ../fish/guestfish.pod:645
17413 msgid "The size in SI 10**15 byte units."
17417 #: ../fish/guestfish.pod:647
17418 msgid "B<E> or B<EiB>"
17422 #: ../fish/guestfish.pod:649
17423 msgid "The size in exabytes (multiplied by 2**60)."
17427 #: ../fish/guestfish.pod:651
17432 #: ../fish/guestfish.pod:653
17433 msgid "The size in SI 10**18 byte units."
17437 #: ../fish/guestfish.pod:655
17438 msgid "B<Z> or B<ZiB>"
17442 #: ../fish/guestfish.pod:657
17443 msgid "The size in zettabytes (multiplied by 2**70)."
17447 #: ../fish/guestfish.pod:659
17452 #: ../fish/guestfish.pod:661
17453 msgid "The size in SI 10**21 byte units."
17457 #: ../fish/guestfish.pod:663
17458 msgid "B<Y> or B<YiB>"
17462 #: ../fish/guestfish.pod:665
17463 msgid "The size in yottabytes (multiplied by 2**80)."
17467 #: ../fish/guestfish.pod:667
17472 #: ../fish/guestfish.pod:669
17473 msgid "The size in SI 10**24 byte units."
17477 #: ../fish/guestfish.pod:675
17480 " truncate-size /file 1G\n"
17485 #: ../fish/guestfish.pod:677
17486 msgid "would truncate the file to 1 gigabyte."
17490 #: ../fish/guestfish.pod:679
17492 "Be careful because a few commands take sizes in kilobytes or megabytes "
17493 "(eg. the parameter to L</memsize> is specified in megabytes already). "
17494 "Adding a suffix will probably not do what you expect."
17498 #: ../fish/guestfish.pod:683
17499 msgid "OCTAL AND HEXADECIMAL NUMBERS"
17503 #: ../fish/guestfish.pod:685
17505 "For specifying the radix (base) use the C convention: C<0> to prefix an "
17506 "octal number or C<0x> to prefix a hexadecimal number. For example:"
17510 #: ../fish/guestfish.pod:688
17513 " 1234 decimal number 1234\n"
17514 " 02322 octal number, equivalent to decimal 1234\n"
17515 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
17520 #: ../fish/guestfish.pod:692
17522 "When using the C<chmod> command, you almost always want to specify an octal "
17523 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
17524 "L<chmod(1)> program):"
17528 #: ../fish/guestfish.pod:696
17531 " chmod 0777 /public # OK\n"
17532 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
17537 #: ../fish/guestfish.pod:699
17539 "Commands that return numbers usually print them in decimal, but some "
17540 "commands print numbers in other radices (eg. C<umask> prints the mode in "
17541 "octal, preceeded by C<0>)."
17545 #: ../fish/guestfish.pod:703
17546 msgid "WILDCARDS AND GLOBBING"
17550 #: ../fish/guestfish.pod:705
17552 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
17553 "(globbing) by default. So for example the following will not do what you "
17558 #: ../fish/guestfish.pod:709
17566 #: ../fish/guestfish.pod:711
17568 "Assuming you don't have a directory called literally C</home/*> then the "
17569 "above command will return an error."
17573 #: ../fish/guestfish.pod:714
17574 msgid "To perform wildcard expansion, use the C<glob> command."
17578 #: ../fish/guestfish.pod:716
17581 " glob rm-rf /home/*\n"
17586 #: ../fish/guestfish.pod:718
17588 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
17589 "many times), equivalent to:"
17593 #: ../fish/guestfish.pod:721
17596 " rm-rf /home/jim\n"
17597 " rm-rf /home/joe\n"
17598 " rm-rf /home/mary\n"
17603 #: ../fish/guestfish.pod:725
17604 msgid "C<glob> only works on simple guest paths and not on device names."
17608 #: ../fish/guestfish.pod:727
17610 "If you have several parameters, each containing a wildcard, then glob will "
17611 "perform a Cartesian product."
17615 #: ../fish/guestfish.pod:730
17620 #: ../fish/guestfish.pod:732
17622 "Any line which starts with a I<#> character is treated as a comment and "
17623 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
17624 "a command. For example:"
17628 #: ../fish/guestfish.pod:736
17631 " # this is a comment\n"
17632 " # this is a comment\n"
17633 " foo # NOT a comment\n"
17638 #: ../fish/guestfish.pod:740
17639 msgid "Blank lines are also ignored."
17643 #: ../fish/guestfish.pod:742
17644 msgid "RUNNING COMMANDS LOCALLY"
17648 #: ../fish/guestfish.pod:744
17650 "Any line which starts with a I<!> character is treated as a command sent to "
17651 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
17655 #: ../fish/guestfish.pod:748
17659 " tgz-out /remote local/remote-data.tar.gz\n"
17664 #: ../fish/guestfish.pod:751
17666 "will create a directory C<local> on the host, and then export the contents "
17667 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
17668 "(See C<tgz-out>)."
17672 #: ../fish/guestfish.pod:755
17674 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
17675 "effect, due to the way that subprocesses work in Unix."
17679 #: ../fish/guestfish.pod:758
17680 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
17684 #: ../fish/guestfish.pod:760
17686 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
17687 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
17688 "and executed as guestfish commands."
17692 #: ../fish/guestfish.pod:764
17694 "Thus you can use shell script to construct arbitrary guestfish commands "
17695 "which are then parsed by guestfish."
17699 #: ../fish/guestfish.pod:767
17701 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
17702 "through C</foo.100>) using guestfish commands alone. However this is simple "
17703 "if we use a shell script to create the guestfish commands for us:"
17707 #: ../fish/guestfish.pod:772
17710 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
17715 #: ../fish/guestfish.pod:774
17716 msgid "or with names like C</foo.001>:"
17720 #: ../fish/guestfish.pod:776
17723 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
17728 #: ../fish/guestfish.pod:778
17730 "When using guestfish interactively it can be helpful to just run the shell "
17731 "script first (ie. remove the initial C<E<lt>> character so it is just an "
17732 "ordinary I<!> local command), see what guestfish commands it would run, and "
17733 "when you are happy with those prepend the C<E<lt>> character to run the "
17734 "guestfish commands for real."
17738 #: ../fish/guestfish.pod:784
17743 #: ../fish/guestfish.pod:786
17745 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
17746 "command (a guestfish command) to the second command (any host command). For "
17751 #: ../fish/guestfish.pod:790
17754 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
17759 #: ../fish/guestfish.pod:792
17761 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
17762 "program). The above command would list all accounts in the guest filesystem "
17763 "which have UID 0, ie. root accounts including backdoors. Other examples:"
17767 #: ../fish/guestfish.pod:797
17770 " hexdump /bin/ls | head\n"
17771 " list-devices | tail -1\n"
17772 " tgz-out / - | tar ztf -\n"
17777 #: ../fish/guestfish.pod:801
17779 "The space before the pipe symbol is required, any space after the pipe "
17780 "symbol is optional. Everything after the pipe symbol is just passed "
17781 "straight to the host shell, so it can contain redirections, globs and "
17782 "anything else that makes sense on the host side."
17786 #: ../fish/guestfish.pod:806
17788 "To use a literal argument which begins with a pipe symbol, you have to quote "
17793 #: ../fish/guestfish.pod:809
17801 #: ../fish/guestfish.pod:811
17802 msgid "HOME DIRECTORIES"
17806 #: ../fish/guestfish.pod:813
17808 "If a parameter starts with the character C<~> then the tilde may be expanded "
17809 "as a home directory path (either C<~> for the current user's home directory, "
17810 "or C<~user> for another user)."
17814 #: ../fish/guestfish.pod:817
17816 "Note that home directory expansion happens for users known I<on the host>, "
17817 "not in the guest filesystem."
17821 #: ../fish/guestfish.pod:820
17823 "To use a literal argument which begins with a tilde, you have to quote it, "
17828 #: ../fish/guestfish.pod:823
17836 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:519
17837 msgid "ENCRYPTED DISKS"
17841 #: ../fish/guestfish.pod:827
17843 "Libguestfs has some support for Linux guests encrypted according to the "
17844 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
17845 "disk encryption systems used by modern Linux guests. Currently only "
17846 "LVM-on-LUKS is supported."
17850 #: ../fish/guestfish.pod:832
17851 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
17855 #: ../fish/guestfish.pod:834
17858 " ><fs> vfs-type /dev/sda2\n"
17864 #: ../fish/guestfish.pod:837
17866 "Then open those devices using L</luks-open>. This creates a device-mapper "
17867 "device called C</dev/mapper/luksdev>."
17871 #: ../fish/guestfish.pod:840
17874 " ><fs> luks-open /dev/sda2 luksdev\n"
17875 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
17880 #: ../fish/guestfish.pod:843
17882 "Finally you have to tell LVM to scan for volume groups on the newly created "
17887 #: ../fish/guestfish.pod:846
17891 " vg-activate-all true\n"
17896 #: ../fish/guestfish.pod:849
17897 msgid "The logical volume(s) can now be mounted in the usual way."
17901 #: ../fish/guestfish.pod:851
17903 "Before closing a LUKS device you must unmount any logical volumes on it and "
17904 "deactivate the volume groups by calling C<vg-activate false VG> on each "
17905 "one. Then you can close the mapper device:"
17909 #: ../fish/guestfish.pod:855
17912 " vg-activate false /dev/VG\n"
17913 " luks-close /dev/mapper/luksdev\n"
17918 #: ../fish/guestfish.pod:860
17920 "If a path is prefixed with C<win:> then you can use Windows-style drive "
17921 "letters and paths (with some limitations). The following commands are "
17926 #: ../fish/guestfish.pod:864
17929 " file /WINDOWS/system32/config/system.LOG\n"
17934 #: ../fish/guestfish.pod:866
17937 " file win:\\windows\\system32\\config\\system.log\n"
17942 #: ../fish/guestfish.pod:868
17945 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
17950 #: ../fish/guestfish.pod:870
17952 "The parameter is rewritten \"behind the scenes\" by looking up the position "
17953 "where the drive is mounted, prepending that to the path, changing all "
17954 "backslash characters to forward slash, then resolving the result using "
17955 "L</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
17956 "then the parameter might be rewritten like this:"
17960 #: ../fish/guestfish.pod:876
17963 " win:e:\\foo\\bar => /e/FOO/bar\n"
17968 #: ../fish/guestfish.pod:878
17969 msgid "This only works in argument positions that expect a path."
17973 #: ../fish/guestfish.pod:880
17974 msgid "UPLOADING AND DOWNLOADING FILES"
17978 #: ../fish/guestfish.pod:882
17980 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
17981 "others which upload from or download to a local file, you can use the "
17982 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
17986 #: ../fish/guestfish.pod:886
17994 #: ../fish/guestfish.pod:888
17995 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
17999 #: ../fish/guestfish.pod:891
18002 " tar-out /etc - | tar tf -\n"
18007 #: ../fish/guestfish.pod:893
18009 "writes the tarball to stdout and then pipes that into the external \"tar\" "
18010 "command (see L</PIPES>)."
18014 #: ../fish/guestfish.pod:896
18016 "When using C<-> to read from stdin, the input is read up to the end of "
18017 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
18018 "some arbitrary end marker:"
18022 #: ../fish/guestfish.pod:900
18025 " upload -<<END /foo\n"
18034 #: ../fish/guestfish.pod:906
18036 "Any string of characters can be used instead of C<END>. The end marker must "
18037 "appear on a line of its own, without any preceeding or following characters "
18038 "(not even spaces)."
18042 #: ../fish/guestfish.pod:910
18044 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
18045 "upload local files (so-called \"FileIn\" parameters in the generator)."
18049 #: ../fish/guestfish.pod:913
18050 msgid "EXIT ON ERROR BEHAVIOUR"
18054 #: ../fish/guestfish.pod:915
18056 "By default, guestfish will ignore any errors when in interactive mode "
18057 "(ie. taking commands from a human over a tty), and will exit on the first "
18058 "error in non-interactive mode (scripts, commands given on the command line)."
18062 #: ../fish/guestfish.pod:920
18064 "If you prefix a command with a I<-> character, then that command will not "
18065 "cause guestfish to exit, even if that (one) command returns an error."
18069 #: ../fish/guestfish.pod:924
18070 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
18074 #: ../fish/guestfish.pod:926
18076 "Guestfish can be remote-controlled over a socket. This is useful "
18077 "particularly in shell scripts where you want to make several different "
18078 "changes to a filesystem, but you don't want the overhead of starting up a "
18079 "guestfish process each time."
18083 #: ../fish/guestfish.pod:931
18084 msgid "Start a guestfish server process using:"
18088 #: ../fish/guestfish.pod:933
18091 " eval \"`guestfish --listen`\"\n"
18096 #: ../fish/guestfish.pod:935
18097 msgid "and then send it commands by doing:"
18101 #: ../fish/guestfish.pod:937
18104 " guestfish --remote cmd [...]\n"
18109 #: ../fish/guestfish.pod:939
18110 msgid "To cause the server to exit, send it the exit command:"
18114 #: ../fish/guestfish.pod:943
18116 "Note that the server will normally exit if there is an error in a command. "
18117 "You can change this in the usual way. See section L</EXIT ON ERROR "
18122 #: ../fish/guestfish.pod:947
18123 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
18127 #: ../fish/guestfish.pod:949
18129 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
18130 "is how the I<--remote> option knows where to send the commands. You can "
18131 "have several guestfish listener processes running using:"
18135 #: ../fish/guestfish.pod:953
18138 " eval \"`guestfish --listen`\"\n"
18139 " pid1=$GUESTFISH_PID\n"
18140 " eval \"`guestfish --listen`\"\n"
18141 " pid2=$GUESTFISH_PID\n"
18143 " guestfish --remote=$pid1 cmd\n"
18144 " guestfish --remote=$pid2 cmd\n"
18149 #: ../fish/guestfish.pod:961
18150 msgid "REMOTE CONTROL AND CSH"
18154 #: ../fish/guestfish.pod:963
18156 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
18161 #: ../fish/guestfish.pod:966
18164 " eval \"`guestfish --listen --csh`\"\n"
18169 #: ../fish/guestfish.pod:968
18170 msgid "REMOTE CONTROL DETAILS"
18174 #: ../fish/guestfish.pod:970
18176 "Remote control happens over a Unix domain socket called "
18177 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
18178 "of the process, and C<$PID> is the process ID of the server."
18182 #: ../fish/guestfish.pod:974
18183 msgid "Guestfish client and server versions must match exactly."
18187 #: ../fish/guestfish.pod:976
18188 msgid "REMOTE CONTROL RUN COMMAND HANGING"
18192 #: ../fish/guestfish.pod:978
18194 "Using the C<run> (or C<launch>) command remotely in a command substitution "
18195 "context hangs, ie. don't do (note the backquotes):"
18199 #: ../fish/guestfish.pod:981
18202 " a=`guestfish --remote run`\n"
18207 #: ../fish/guestfish.pod:983
18209 "Since the C<run> command produces no output on stdout, this is not useful "
18210 "anyway. For further information see "
18211 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
18215 #: ../fish/guestfish.pod:987
18216 msgid "PREPARED DISK IMAGES"
18220 #: ../fish/guestfish.pod:989
18222 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
18223 "preformatted disk images that guestfish can make for you to save typing. "
18224 "This is particularly useful for testing purposes. This option is used "
18225 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
18226 "can be mixed with I<-a>)."
18230 #: ../fish/guestfish.pod:995
18232 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
18233 "the second and so on. Existing files in the current directory are "
18238 #: ../fish/guestfish.pod:999
18240 "The type briefly describes how the disk should be sized, partitioned, how "
18241 "filesystem(s) should be created, and how content should be added. "
18242 "Optionally the type can be followed by extra parameters, separated by C<:> "
18243 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
18244 "sparsely-allocated disk, containing a single partition, with the partition "
18245 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
18246 "on a 1GB disk instead."
18250 #: ../fish/guestfish.pod:1007
18251 msgid "To list the available types and any extra parameters they take, run:"
18255 #: ../fish/guestfish.pod:1011
18257 "Note that the prepared filesystem is not mounted. You would usually have to "
18258 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
18262 #: ../fish/guestfish.pod:1015
18264 "If any I<-N> or I<--new> options are given, the guest is automatically "
18269 #: ../fish/guestfish.pod:1020
18270 msgid "Create a 100MB disk with an ext4-formatted partition:"
18274 #: ../fish/guestfish.pod:1022
18277 " guestfish -N fs:ext4\n"
18282 #: ../fish/guestfish.pod:1024
18283 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
18287 #: ../fish/guestfish.pod:1026
18290 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
18295 #: ../fish/guestfish.pod:1028
18296 msgid "Create a blank 200MB disk:"
18300 #: ../fish/guestfish.pod:1030
18303 " guestfish -N disk:200M\n"
18308 #: ../fish/guestfish.pod:1032
18309 msgid "PROGRESS BARS"
18313 #: ../fish/guestfish.pod:1034
18315 "Some (not all) long-running commands send progress notification messages as "
18316 "they are running. Guestfish turns these messages into progress bars."
18320 #: ../fish/guestfish.pod:1038
18322 "When a command that supports progress bars takes longer than two seconds to "
18323 "run, and if progress bars are enabled, then you will see one appearing below "
18328 #: ../fish/guestfish.pod:1042
18331 " ><fs> copy-size /large-file /another-file 2048M\n"
18332 " / 10% [#####-----------------------------------------] 00:30\n"
18337 #: ../fish/guestfish.pod:1045
18339 "The spinner on the left hand side moves round once for every progress "
18340 "notification received from the backend. This is a (reasonably) golden "
18341 "assurance that the command is \"doing something\" even if the progress bar "
18342 "is not moving, because the command is able to send the progress "
18343 "notifications. When the bar reaches 100% and the command finishes, the "
18344 "spinner disappears."
18348 #: ../fish/guestfish.pod:1052
18350 "Progress bars are enabled by default when guestfish is used interactively. "
18351 "You can enable them even for non-interactive modes using I<--progress-bars>, "
18352 "and you can disable them completely using I<--no-progress-bars>."
18356 #: ../fish/guestfish.pod:1057
18357 msgid "GUESTFISH COMMANDS"
18361 #: ../fish/guestfish.pod:1059
18363 "The commands in this section are guestfish convenience commands, in other "
18364 "words, they are not part of the L<guestfs(3)> API."
18368 #: ../fish/guestfish.pod:1062
18373 #: ../fish/guestfish.pod:1064
18382 #: ../fish/guestfish.pod:1067
18383 msgid "Without any parameter, this provides general help."
18387 #: ../fish/guestfish.pod:1069
18388 msgid "With a C<cmd> parameter, this displays detailed help for that command."
18392 #: ../fish/guestfish.pod:1071
18393 msgid "quit | exit"
18397 #: ../fish/guestfish.pod:1073
18398 msgid "This exits guestfish. You can also use C<^D> key."
18402 #: ../fish/guestfish.pod:1075
18403 msgid "@FISH_COMMANDS@"
18407 #: ../fish/guestfish.pod:1077
18412 #: ../fish/guestfish.pod:1079 ../src/guestfs.pod:1505
18417 #: ../fish/guestfish.pod:1083
18419 "guestfish returns 0 if the commands completed without error, or 1 if there "
18424 #: ../fish/guestfish.pod:1090
18429 #: ../fish/guestfish.pod:1092
18431 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
18436 #: ../fish/guestfish.pod:1095 ../src/guestfs.pod:3122
18437 msgid "FEBOOTSTRAP_KERNEL"
18441 #: ../fish/guestfish.pod:1097 ../src/guestfs.pod:3124
18442 msgid "FEBOOTSTRAP_MODULES"
18446 #: ../fish/guestfish.pod:1099 ../src/guestfs.pod:3126
18448 "These two environment variables allow the kernel that libguestfs uses in the "
18449 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
18450 "most recent host kernel is chosen. For more information about kernel "
18451 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
18452 "available in febootstrap E<ge> 3.8."
18456 #: ../fish/guestfish.pod:1105
18457 msgid "GUESTFISH_DISPLAY_IMAGE"
18461 #: ../fish/guestfish.pod:1107
18463 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
18464 "If not set, it uses L<display(1)>."
18468 #: ../fish/guestfish.pod:1110
18469 msgid "GUESTFISH_PID"
18473 #: ../fish/guestfish.pod:1112
18475 "Used with the I<--remote> option to specify the remote guestfish process to "
18476 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
18480 #: ../fish/guestfish.pod:1116
18485 #: ../fish/guestfish.pod:1118
18487 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
18488 "not specified, the external L<hexedit(1)> program is used."
18492 #: ../fish/guestfish.pod:1122
18497 #: ../fish/guestfish.pod:1124
18499 "If compiled with GNU readline support, various files in the home directory "
18500 "can be used. See L</FILES>."
18504 #: ../fish/guestfish.pod:1127 ../src/guestfs.pod:3132
18505 msgid "LIBGUESTFS_APPEND"
18509 #: ../fish/guestfish.pod:1129 ../src/guestfs.pod:3134
18510 msgid "Pass additional options to the guest kernel."
18514 #: ../fish/guestfish.pod:1131 ../src/guestfs.pod:3136
18515 msgid "LIBGUESTFS_DEBUG"
18519 #: ../fish/guestfish.pod:1133
18521 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
18522 "effect as using the B<-v> option."
18526 #: ../fish/guestfish.pod:1136 ../src/guestfs.pod:3141
18527 msgid "LIBGUESTFS_MEMSIZE"
18531 #: ../fish/guestfish.pod:1138 ../src/guestfs.pod:3143
18532 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
18536 #: ../fish/guestfish.pod:1141 ../src/guestfs.pod:3146
18539 " LIBGUESTFS_MEMSIZE=700\n"
18544 #: ../fish/guestfish.pod:1143 ../src/guestfs.pod:3148
18545 msgid "LIBGUESTFS_PATH"
18549 #: ../fish/guestfish.pod:1145
18551 "Set the path that guestfish uses to search for kernel and initrd.img. See "
18552 "the discussion of paths in L<guestfs(3)>."
18556 #: ../fish/guestfish.pod:1148 ../src/guestfs.pod:3153
18557 msgid "LIBGUESTFS_QEMU"
18561 #: ../fish/guestfish.pod:1150 ../src/guestfs.pod:3155
18563 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
18564 "which was found at compile time by the configure script is used."
18568 #: ../fish/guestfish.pod:1154 ../src/guestfs.pod:3161
18569 msgid "LIBGUESTFS_TRACE"
18573 #: ../fish/guestfish.pod:1156
18574 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
18578 #: ../fish/guestfish.pod:1158
18583 #: ../fish/guestfish.pod:1160
18585 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
18590 #: ../fish/guestfish.pod:1163 ../sparsify/virt-sparsify.pod:236 ../src/guestfs.pod:3166
18595 #: ../fish/guestfish.pod:1165 ../src/guestfs.pod:3168
18597 "Location of temporary directory, defaults to C</tmp> except for the cached "
18598 "supermin appliance which defaults to C</var/tmp>."
18602 #: ../fish/guestfish.pod:1168 ../src/guestfs.pod:3171
18604 "If libguestfs was compiled to use the supermin appliance then the real "
18605 "appliance is cached in this directory, shared between all handles belonging "
18606 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
18607 "use in case C</var/tmp> is not large enough."
18611 #: ../fish/guestfish.pod:1176 ../fuse/guestmount.pod:288 ../rescue/virt-rescue.pod:273
18616 #: ../fish/guestfish.pod:1180 ../fuse/guestmount.pod:292 ../rescue/virt-rescue.pod:277
18617 msgid "$HOME/.libguestfs-tools.rc"
18621 #: ../fish/guestfish.pod:1182 ../fuse/guestmount.pod:294 ../rescue/virt-rescue.pod:279
18622 msgid "/etc/libguestfs-tools.conf"
18626 #: ../fish/guestfish.pod:1184 ../fuse/guestmount.pod:296 ../rescue/virt-rescue.pod:281
18628 "This configuration file controls the default read-only or read-write mode "
18629 "(I<--ro> or I<--rw>)."
18633 #: ../fish/guestfish.pod:1187
18634 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
18638 #: ../fish/guestfish.pod:1189
18639 msgid "$HOME/.guestfish"
18643 #: ../fish/guestfish.pod:1191
18645 "If compiled with GNU readline support, then the command history is saved in "
18650 #: ../fish/guestfish.pod:1194
18651 msgid "$HOME/.inputrc"
18655 #: ../fish/guestfish.pod:1196
18656 msgid "/etc/inputrc"
18660 #: ../fish/guestfish.pod:1198
18662 "If compiled with GNU readline support, then these files can be used to "
18663 "configure readline. For further information, please see "
18664 "L<readline(3)/INITIALIZATION FILE>."
18668 #: ../fish/guestfish.pod:1202
18669 msgid "To write rules which only apply to guestfish, use:"
18673 #: ../fish/guestfish.pod:1204
18683 #: ../fish/guestfish.pod:1208
18685 "Variables that you can set in inputrc that change the behaviour of guestfish "
18686 "in useful ways include:"
18690 #: ../fish/guestfish.pod:1213
18691 msgid "completion-ignore-case (default: on)"
18695 #: ../fish/guestfish.pod:1215
18697 "By default, guestfish will ignore case when tab-completing paths on the "
18702 #: ../fish/guestfish.pod:1218
18705 " set completion-ignore-case off\n"
18710 #: ../fish/guestfish.pod:1220
18711 msgid "to make guestfish case sensitive."
18715 #: ../fish/guestfish.pod:1224
18720 #: ../fish/guestfish.pod:1226
18721 msgid "test2.img (etc)"
18725 #: ../fish/guestfish.pod:1228
18727 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
18728 "will be created in the file C<test1.img> in the current directory. The "
18729 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
18730 "the same name will be overwritten."
18734 #: ../fish/guestfish.pod:1237
18736 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, "
18737 "L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, "
18738 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
18739 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
18740 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
18741 "L<virt-sparsify(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
18742 "L<virt-win-reg(1)>, L<display(1)>, L<hexedit(1)>, "
18743 "L<febootstrap-supermin-helper(8)>."
18747 #: ../fish/guestfish.pod:1268 ../src/guestfs.pod:3261 ../test-tool/libguestfs-test-tool.pod:112
18748 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
18752 #: ../fish/virt-copy-in.pod:5
18753 msgid "virt-copy-in - Copy files and directories into a virtual machine disk image."
18757 #: ../fish/virt-copy-in.pod:9
18760 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
18765 #: ../fish/virt-copy-in.pod:11
18768 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
18773 #: ../fish/virt-copy-in.pod:15
18775 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
18776 "causing disk corruption. The virtual machine must be shut down before you "
18777 "use this command."
18781 #: ../fish/virt-copy-in.pod:21
18783 "C<virt-copy-in> copies files and directories from the local disk into a "
18784 "virtual machine disk image or named libvirt domain."
18788 #: ../fish/virt-copy-in.pod:24
18790 "You can give one of more filenames and directories on the command line. "
18791 "Directories are copied in recursively. The final parameter must be the "
18792 "destination directory in the disk image which must be an absolute path "
18793 "starting with a C</> character."
18797 #: ../fish/virt-copy-in.pod:33
18800 " virt-copy-in -d MyGuest resolv.conf /etc\n"
18805 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
18806 msgid "Upload a home directory to a guest:"
18810 #: ../fish/virt-copy-in.pod:37
18813 " virt-copy-in -d MyGuest skel /home\n"
18818 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28 ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
18819 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
18823 #: ../fish/virt-copy-in.pod:41
18825 "This command is just a simple shell script wrapper around the "
18826 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
18827 "trivial copy, you are probably better off using guestfish directly."
18831 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36 ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
18833 "Since the shell script just passes options straight to guestfish, read "
18834 "L<guestfish(1)> to see the full list of options."
18838 #: ../fish/virt-copy-in.pod:52
18840 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
18841 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
18845 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55 ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
18846 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
18850 #: ../fish/virt-copy-out.pod:5
18852 "virt-copy-out - Copy files and directories out of a virtual machine disk "
18857 #: ../fish/virt-copy-out.pod:9
18860 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
18865 #: ../fish/virt-copy-out.pod:11
18868 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
18873 #: ../fish/virt-copy-out.pod:15
18875 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
18876 "image or named libvirt domain."
18880 #: ../fish/virt-copy-out.pod:18
18882 "You can give one of more filenames and directories on the command line. "
18883 "Directories are copied out recursively."
18887 #: ../fish/virt-copy-out.pod:23
18888 msgid "Download the home directories from a virtual machine:"
18892 #: ../fish/virt-copy-out.pod:25
18896 " virt-copy-out -d MyGuest /home homes\n"
18901 #: ../fish/virt-copy-out.pod:30
18903 "This command is just a simple shell script wrapper around the "
18904 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
18905 "trivial copy, you are probably better off using guestfish directly."
18909 #: ../fish/virt-copy-out.pod:41
18911 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, "
18912 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
18916 #: ../fish/virt-tar-in.pod:5
18917 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
18921 #: ../fish/virt-tar-in.pod:9
18924 " virt-tar-in -a disk.img data.tar /destination\n"
18929 #: ../fish/virt-tar-in.pod:11
18932 " virt-tar-in -d domain data.tar /destination\n"
18937 #: ../fish/virt-tar-in.pod:13
18940 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
18945 #: ../fish/virt-tar-in.pod:17
18947 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
18948 "causing disk corruption. The virtual machine must be shut down before you "
18949 "use this command."
18953 #: ../fish/virt-tar-in.pod:23
18955 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
18956 "image or named libvirt domain."
18960 #: ../fish/virt-tar-in.pod:26
18962 "The first parameter is the tar file. Use C<-> to read the tar file from "
18963 "standard input. The second parameter is the absolute target directory to "
18968 #: ../fish/virt-tar-in.pod:34
18971 " virt-tar-in -d MyGuest homes.tar /home\n"
18976 #: ../fish/virt-tar-in.pod:38
18978 "This command is just a simple shell script wrapper around the "
18979 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial "
18980 "copy, you are probably better off using guestfish directly."
18984 #: ../fish/virt-tar-in.pod:49
18986 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
18987 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
18988 "L<http://libguestfs.org/>."
18992 #: ../fish/virt-tar-out.pod:5
18993 msgid "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
18997 #: ../fish/virt-tar-out.pod:9
19000 " virt-tar-out -a disk.img /dir files.tar\n"
19005 #: ../fish/virt-tar-out.pod:11
19008 " virt-tar-out -d domain /dir files.tar\n"
19013 #: ../fish/virt-tar-out.pod:13
19016 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
19021 #: ../fish/virt-tar-out.pod:17
19022 msgid "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
19026 #: ../fish/virt-tar-out.pod:20
19028 "The first parameter is the absolute path of the virtual machine directory. "
19029 "The second parameter is the tar file to write. Use C<-> to write to "
19034 #: ../fish/virt-tar-out.pod:26
19035 msgid "Download the home directories from a guest:"
19039 #: ../fish/virt-tar-out.pod:28
19042 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
19047 #: ../fish/virt-tar-out.pod:32
19049 "This command is just a simple shell script wrapper around the "
19050 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
19051 "trivial copy, you are probably better off using guestfish directly."
19055 #: ../fish/virt-tar-out.pod:43
19057 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
19058 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
19062 #: ../fuse/guestmount.pod:5
19063 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
19067 #: ../fuse/guestmount.pod:9
19070 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
19075 #: ../fuse/guestmount.pod:11
19078 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
19083 #: ../fuse/guestmount.pod:13
19086 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
19091 #: ../fuse/guestmount.pod:17
19093 "You must I<not> use C<guestmount> in read-write mode on live virtual "
19094 "machines. If you do this, you risk disk corruption in the VM."
19098 #: ../fuse/guestmount.pod:22
19100 "The guestmount program can be used to mount virtual machine filesystems and "
19101 "other disk images on the host. It uses libguestfs for access to the guest "
19102 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
19103 "a mountable device."
19107 #: ../fuse/guestmount.pod:27
19109 "Along with other options, you have to give at least one device (I<-a> "
19110 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
19111 "option) or use the I<-i> inspection option. How this works is better "
19112 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
19117 #: ../fuse/guestmount.pod:33
19119 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
19120 "by you, and the filesystem will not be visible to any other users unless you "
19121 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
19122 "the filesystem, use the C<fusermount -u> command."
19126 #: ../fuse/guestmount.pod:41
19128 "For a typical Windows guest which has its main filesystem on the first "
19133 #: ../fuse/guestmount.pod:44
19136 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
19141 #: ../fuse/guestmount.pod:46
19143 "For a typical Linux guest which has a /boot filesystem on the first "
19144 "partition, and the root filesystem on a logical volume:"
19148 #: ../fuse/guestmount.pod:49
19151 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
19156 #: ../fuse/guestmount.pod:51
19157 msgid "To get libguestfs to detect guest mountpoints for you:"
19161 #: ../fuse/guestmount.pod:53
19164 " guestmount -a guest.img -i --ro /mnt\n"
19169 #: ../fuse/guestmount.pod:55
19170 msgid "For a libvirt guest called \"Guest\" you could do:"
19174 #: ../fuse/guestmount.pod:57
19177 " guestmount -d Guest -i --ro /mnt\n"
19182 #: ../fuse/guestmount.pod:59
19184 "If you don't know what filesystems are contained in a guest or disk image, "
19185 "use L<virt-filesystems(1)> first:"
19189 #: ../fuse/guestmount.pod:62
19192 " virt-filesystems MyGuest\n"
19197 #: ../fuse/guestmount.pod:64
19199 "If you want to trace the libguestfs calls but without excessive debugging "
19200 "information, we recommend:"
19204 #: ../fuse/guestmount.pod:67
19207 " guestmount [...] --trace /mnt\n"
19212 #: ../fuse/guestmount.pod:69
19213 msgid "If you want to debug the program, we recommend:"
19217 #: ../fuse/guestmount.pod:71
19220 " guestmount [...] --trace --verbose /mnt\n"
19225 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68 ../resize/virt-resize.pod:544
19230 #: ../fuse/guestmount.pod:75
19231 msgid "Other users cannot see the filesystem by default"
19235 #: ../fuse/guestmount.pod:77
19237 "If you mount a filesystem as one user (eg. root), then other users will not "
19238 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
19239 "option when mounting:"
19243 #: ../fuse/guestmount.pod:81
19246 " sudo guestmount [...] -o allow_other /mnt\n"
19251 #: ../fuse/guestmount.pod:91
19252 msgid "Add a block device or virtual machine image."
19256 #: ../fuse/guestmount.pod:114
19257 msgid "B<--dir-cache-timeout N>"
19261 #: ../fuse/guestmount.pod:116
19263 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
19264 "seconds. The readdir cache [actually, there are several semi-independent "
19265 "caches] is populated after a readdir(2) call with the stat and extended "
19266 "attributes of the files in the directory, in anticipation that they will be "
19267 "requested soon after."
19271 #: ../fuse/guestmount.pod:122
19273 "There is also a different attribute cache implemented by FUSE (see the FUSE "
19274 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
19275 "requests, only cache existing ones."
19279 #: ../fuse/guestmount.pod:142
19281 "If you have untrusted raw-format guest disk images, you should use this "
19282 "option to specify the disk format. This avoids a possible security problem "
19283 "with malicious guests (CVE-2010-3851). See also "
19284 "L<guestfs(3)/guestfs_add_drive_opts>."
19288 #: ../fuse/guestmount.pod:147
19289 msgid "B<--fuse-help>"
19293 #: ../fuse/guestmount.pod:149
19294 msgid "Display help on special FUSE options (see I<-o> below)."
19298 #: ../fuse/guestmount.pod:153
19299 msgid "Display brief help and exit."
19303 #: ../fuse/guestmount.pod:177
19305 "Mount the named partition or logical volume on the given mountpoint B<in the "
19306 "guest> (this has nothing to do with mountpoints in the host)."
19310 #: ../fuse/guestmount.pod:180
19312 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
19313 "something on C</>."
19317 #: ../fuse/guestmount.pod:197
19319 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
19320 "unmounted. If you specify this option, then we don't attempt to sync the "
19321 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
19325 #: ../fuse/guestmount.pod:202
19326 msgid "B<-o option>"
19330 #: ../fuse/guestmount.pod:204
19331 msgid "B<--option option>"
19335 #: ../fuse/guestmount.pod:206
19336 msgid "Pass extra options to FUSE."
19340 #: ../fuse/guestmount.pod:208
19342 "To get a list of all the extra options supported by FUSE, use the command "
19343 "below. Note that only the FUSE I<-o> options can be passed, and only some "
19344 "of them are a good idea."
19348 #: ../fuse/guestmount.pod:212
19351 " guestmount --fuse-help\n"
19356 #: ../fuse/guestmount.pod:214
19357 msgid "Some potentially useful FUSE options:"
19361 #: ../fuse/guestmount.pod:218
19362 msgid "B<-o allow_other>"
19366 #: ../fuse/guestmount.pod:220
19367 msgid "Allow other users to see the filesystem."
19371 #: ../fuse/guestmount.pod:222
19372 msgid "B<-o attr_timeout=N>"
19376 #: ../fuse/guestmount.pod:224
19377 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
19381 #: ../fuse/guestmount.pod:226
19382 msgid "B<-o kernel_cache>"
19386 #: ../fuse/guestmount.pod:228
19388 "Allow the kernel to cache files (reduces the number of reads that have to go "
19389 "through the L<guestfs(3)> API). This is generally a good idea if you can "
19390 "afford the extra memory usage."
19394 #: ../fuse/guestmount.pod:232
19395 msgid "B<-o uid=N> B<-o gid=N>"
19399 #: ../fuse/guestmount.pod:234
19401 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
19402 "the chosen values."
19406 #: ../fuse/guestmount.pod:243
19408 "Add devices and mount everything read-only. Also disallow writes and make "
19409 "the disk appear read-only to FUSE."
19413 #: ../fuse/guestmount.pod:246
19415 "This is highly recommended if you are not going to edit the guest disk. If "
19416 "the guest is running and this option is I<not> supplied, then there is a "
19417 "strong risk of disk corruption in the guest. We try to prevent this from "
19418 "happening, but it is not always possible."
19422 #: ../fuse/guestmount.pod:251 ../rescue/virt-rescue.pod:171
19423 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
19427 #: ../fuse/guestmount.pod:255
19428 msgid "Enable SELinux support for the guest."
19432 #: ../fuse/guestmount.pod:261
19433 msgid "Enable verbose messages from underlying libguestfs."
19437 #: ../fuse/guestmount.pod:267
19438 msgid "Display the program version and exit."
19442 #: ../fuse/guestmount.pod:276 ../fuse/guestmount.pod:299 ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
19443 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
19447 #: ../fuse/guestmount.pod:280
19452 #: ../fuse/guestmount.pod:282
19453 msgid "Trace libguestfs calls and entry into each FUSE function."
19457 #: ../fuse/guestmount.pod:284
19458 msgid "This also stops the daemon from forking into the background."
19462 #: ../fuse/guestmount.pod:310
19464 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
19465 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
19466 "L<http://fuse.sf.net/>."
19470 #: ../fuse/guestmount.pod:325
19471 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
19475 #: ../inspector/virt-inspector.pod:5
19477 "virt-inspector - Display operating system version and other information "
19478 "about a virtual machine"
19482 #: ../inspector/virt-inspector.pod:9
19485 " virt-inspector [--options] -d domname\n"
19490 #: ../inspector/virt-inspector.pod:11
19493 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
19498 #: ../inspector/virt-inspector.pod:15
19501 " virt-inspector domname\n"
19506 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
19509 " virt-inspector disk.img [disk.img ...]\n"
19514 #: ../inspector/virt-inspector.pod:21
19516 "B<virt-inspector> examines a virtual machine or disk image and tries to "
19517 "determine the version of the operating system and other information about "
19518 "the virtual machine."
19522 #: ../inspector/virt-inspector.pod:25
19523 msgid "Virt-inspector produces XML output for feeding into other programs."
19527 #: ../inspector/virt-inspector.pod:27
19529 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
19530 "the libvirt domain (see: C<virsh list --all>)."
19534 #: ../inspector/virt-inspector.pod:30
19536 "You can also run virt-inspector directly on disk images from a single "
19537 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
19538 "has several block devices, in which case you should list several I<-a> "
19539 "options one after another, with the first corresponding to the guest's "
19540 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
19544 #: ../inspector/virt-inspector.pod:37
19546 "You can also run virt-inspector on install disks, live CDs, bootable USB "
19547 "keys and similar."
19551 #: ../inspector/virt-inspector.pod:40
19553 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
19554 "inspect several virtual machines, you have to run virt-inspector several "
19555 "times (for example, from a shell script for-loop)."
19559 #: ../inspector/virt-inspector.pod:45
19561 "Because virt-inspector needs direct access to guest images, it won't "
19562 "normally work over remote libvirt connections."
19566 #: ../inspector/virt-inspector.pod:48
19568 "All of the information available from virt-inspector is also available "
19569 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
19570 "The same information can also be fetched using guestfish or via libguestfs "
19571 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
19572 "WITH OTHER PROGRAMMING LANGUAGES>)."
19576 #: ../inspector/virt-inspector.pod:81
19578 "Libvirt is only used if you specify a C<domname> on the command line. If "
19579 "you specify guest block devices directly (I<-a>), then libvirt is not used "
19584 #: ../inspector/virt-inspector.pod:94
19586 "When prompting for keys and passphrases, virt-inspector normally turns "
19587 "echoing off so you cannot see what you are typing. If you are not worried "
19588 "about Tempest attacks and there is no one else in the room you can specify "
19589 "this flag to see what you are typing."
19593 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93 ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143 ../tools/virt-win-reg.pl:144
19595 "Specify the format of disk images given on the command line. If this is "
19596 "omitted then the format is autodetected from the content of the disk image."
19600 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97 ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147 ../tools/virt-win-reg.pl:148
19602 "If disk images are requested from libvirt, then this program asks libvirt "
19603 "for this information. In this case, the value of the format parameter is "
19608 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:314 ../resize/virt-resize.pod:406 ../sparsify/virt-sparsify.pod:132 ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
19610 "If working with untrusted raw-format guest disk images, you should ensure "
19611 "the format is always specified."
19615 #: ../inspector/virt-inspector.pod:139
19616 msgid "Previous versions of virt-inspector allowed you to write either:"
19620 #: ../inspector/virt-inspector.pod:145
19623 " virt-inspector guestname\n"
19628 #: ../inspector/virt-inspector.pod:153
19633 #: ../inspector/virt-inspector.pod:155
19635 "The virt-inspector XML is described precisely in a RELAX NG schema file "
19636 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
19637 "just an overview."
19641 #: ../inspector/virt-inspector.pod:159
19643 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
19644 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
19645 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
19646 "which is vanishingly rare in real world VMs."
19650 #: ../inspector/virt-inspector.pod:164
19651 msgid "E<lt>operatingsystemE<gt>"
19655 #: ../inspector/virt-inspector.pod:166
19657 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
19658 "describe the operating system, its architecture, the descriptive \"product "
19659 "name\" string, the type of OS and so on, as in this example:"
19663 #: ../inspector/virt-inspector.pod:170
19666 " <operatingsystems>\n"
19667 " <operatingsystem>\n"
19668 " <root>/dev/sda2</root>\n"
19669 " <name>windows</name>\n"
19670 " <arch>i386</arch>\n"
19671 " <distro>windows</distro>\n"
19672 " <product_name>Windows 7 Enterprise</product_name>\n"
19673 " <product_variant>Client</product_variant>\n"
19674 " <major_version>6</major_version>\n"
19675 " <minor_version>1</minor_version>\n"
19676 " <windows_systemroot>/Windows</windows_systemroot>\n"
19677 " <format>installed</format>\n"
19682 #: ../inspector/virt-inspector.pod:183
19684 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
19685 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
19686 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
19687 "architecture. The other fields are fairly self-explanatory, but because "
19688 "these fields are taken directly from the libguestfs inspection API you can "
19689 "find precise information from L<guestfs(3)/INSPECTION>."
19693 #: ../inspector/virt-inspector.pod:191
19695 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
19696 "of view of libguestfs (block devices may have completely different names "
19697 "inside the VM itself)."
19701 #: ../inspector/virt-inspector.pod:195
19702 msgid "E<lt>mountpointsE<gt>"
19706 #: ../inspector/virt-inspector.pod:197
19708 "Un*x-like guests typically have multiple filesystems which are mounted at "
19709 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
19710 "element which looks like this:"
19714 #: ../inspector/virt-inspector.pod:201
19717 " <operatingsystems>\n"
19718 " <operatingsystem>\n"
19721 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
19722 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
19723 " </mountpoints>\n"
19728 #: ../inspector/virt-inspector.pod:209
19730 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
19731 "and may have completely different names inside the guest. Only mountable "
19732 "filesystems appear in this list, not things like swap devices."
19736 #: ../inspector/virt-inspector.pod:214
19737 msgid "E<lt>filesystemsE<gt>"
19741 #: ../inspector/virt-inspector.pod:216
19743 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
19744 "filesystems belonging to the guest, including swap and empty partitions. "
19745 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
19746 "this OS or shared with this OS and other OSes)."
19750 #: ../inspector/virt-inspector.pod:222
19751 msgid "You might see something like this:"
19755 #: ../inspector/virt-inspector.pod:224
19758 " <operatingsystems>\n"
19759 " <operatingsystem>\n"
19762 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
19763 " <type>ext4</type>\n"
19764 " <label>Fedora-13-x86_64</label>\n"
19765 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
19771 #: ../inspector/virt-inspector.pod:234
19773 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
19774 "the label, and the UUID."
19778 #: ../inspector/virt-inspector.pod:237
19779 msgid "E<lt>applicationsE<gt>"
19783 #: ../inspector/virt-inspector.pod:239
19785 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
19786 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
19791 #: ../inspector/virt-inspector.pod:243
19793 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
19794 "Typical values would be C<rpm> and C<deb>."
19798 #: ../inspector/virt-inspector.pod:246
19800 "E<lt>package_managementE<gt>, if present, describes the package manager. "
19801 "Typical values include C<yum>, C<up2date> and C<apt>"
19805 #: ../inspector/virt-inspector.pod:249
19806 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
19810 #: ../inspector/virt-inspector.pod:252
19813 " <operatingsystems>\n"
19814 " <operatingsystem>\n"
19816 " <applications>\n"
19818 " <name>coreutils</name>\n"
19819 " <version>8.5</version>\n"
19820 " <release>1</release>\n"
19821 " </application>\n"
19826 #: ../inspector/virt-inspector.pod:262
19828 "The version and release fields may not be available for some types guests. "
19829 "Other fields are possible, see "
19830 "L<guestfs(3)/guestfs_inspect_list_applications>."
19834 #: ../inspector/virt-inspector.pod:266
19835 msgid "E<lt>drive_mappingsE<gt>"
19839 #: ../inspector/virt-inspector.pod:268
19841 "For operating systems like Windows which use drive letters, virt-inspector "
19842 "is able to find out how drive letters map to filesystems."
19846 #: ../inspector/virt-inspector.pod:272
19849 " <operatingsystems>\n"
19850 " <operatingsystem>\n"
19852 " <drive_mappings>\n"
19853 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
19854 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
19855 " </drive_mappings>\n"
19860 #: ../inspector/virt-inspector.pod:280
19862 "In the example above, drive C maps to the filesystem on the second partition "
19863 "on the first disk, and drive E maps to the filesystem on the first partition "
19864 "on the second disk."
19868 #: ../inspector/virt-inspector.pod:284
19870 "Note that this only covers permanent local filesystem mappings, not things "
19871 "like network shares. Furthermore NTFS volume mount points may not be listed "
19876 #: ../inspector/virt-inspector.pod:288
19877 msgid "E<lt>iconE<gt>"
19881 #: ../inspector/virt-inspector.pod:290
19883 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
19884 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
19885 "very large and high quality."
19889 #: ../inspector/virt-inspector.pod:294
19892 " <operatingsystems>\n"
19893 " <operatingsystem>\n"
19896 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
19897 " [... many lines of base64 data ...]\n"
19903 #: ../inspector/virt-inspector.pod:302
19905 "To display the icon, you have to extract it and convert the base64 data back "
19906 "to a binary file. Use an XPath query or simply an editor to extract the "
19907 "data, then use the coreutils L<base64(1)> program to do the conversion back "
19912 #: ../inspector/virt-inspector.pod:307
19915 " base64 -i -d < icon.data > icon.png\n"
19920 #: ../inspector/virt-inspector.pod:309
19921 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
19925 #: ../inspector/virt-inspector.pod:311
19927 "Virt-inspector can detect some operating system installers on install disks, "
19928 "live CDs, bootable USB keys and more."
19932 #: ../inspector/virt-inspector.pod:314
19934 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
19935 "fields may be present to indicate a live CD, network installer, or one part "
19936 "of a multipart CD. For example:"
19940 #: ../inspector/virt-inspector.pod:318
19943 " <operatingsystems>\n"
19944 " <operatingsystem>\n"
19945 " <root>/dev/sda</root>\n"
19946 " <name>linux</name>\n"
19947 " <arch>i386</arch>\n"
19948 " <distro>ubuntu</distro>\n"
19949 " <product_name>Ubuntu 10.10 "Maverick "
19950 "Meerkat"</product_name>\n"
19951 " <major_version>10</major_version>\n"
19952 " <minor_version>10</minor_version>\n"
19953 " <format>installer</format>\n"
19959 #: ../inspector/virt-inspector.pod:330
19960 msgid "USING XPATH"
19964 #: ../inspector/virt-inspector.pod:332
19966 "You can use the XPath query language to select parts of the XML. We "
19967 "recommend using C<xmlstarlet> to perform XPath queries from the command "
19972 #: ../inspector/virt-inspector.pod:338
19975 " $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
19977 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
19978 " <type>ext4</type>\n"
19984 #: ../inspector/virt-inspector.pod:344
19987 " $ virt-inspector -d Guest | \\\n"
19988 " xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
19994 #: ../inspector/virt-inspector.pod:348
19997 " $ virt-inspector -d Guest | \\\n"
19998 " xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
19999 " [displays the guest icon, if there is one]\n"
20004 #: ../inspector/virt-inspector.pod:359
20005 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
20009 #: ../inspector/virt-inspector.pod:361
20011 "Early versions of libguestfs shipped with a different virt-inspector program "
20012 "written in Perl (the current version is written in C). The XML output of "
20013 "the Perl virt-inspector was different and it could also output in other "
20014 "formats like text."
20018 #: ../inspector/virt-inspector.pod:366
20019 msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
20023 #: ../inspector/virt-inspector.pod:369
20025 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
20026 "versions of virt-inspector with different names:"
20030 #: ../inspector/virt-inspector.pod:372
20033 " virt-inspector Old Perl version.\n"
20034 " virt-inspector2 New C version.\n"
20039 #: ../inspector/virt-inspector.pod:382
20041 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
20042 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
20046 #: ../inspector/virt-inspector.pod:399
20047 msgid "Matthew Booth L<mbooth@redhat.com>"
20051 #: ../java/examples/guestfs-java.pod:5
20052 msgid "guestfs-java - How to use libguestfs from Java"
20056 #: ../java/examples/guestfs-java.pod:9
20059 " import com.redhat.et.libguestfs.*;\n"
20064 #: ../java/examples/guestfs-java.pod:11
20067 " GuestFS g = new GuestFS ();\n"
20068 " g.add_drive_opts (\"disk.img\", null);\n"
20074 #: ../java/examples/guestfs-java.pod:17
20076 "This manual page documents how to call libguestfs from the Java programming "
20077 "language. This page just documents the differences from the C API and gives "
20078 "some examples. If you are not familiar with using libguestfs, you also need "
20079 "to read L<guestfs(3)>."
20083 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
20084 msgid "CLOSING THE HANDLE"
20088 #: ../java/examples/guestfs-java.pod:24
20090 "The handle is closed when it is reaped by the garbage collector. Because "
20091 "libguestfs handles include a lot of state, it is also possible to close (and "
20092 "hence free) them explicitly by calling the C<close> method."
20096 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60 ../python/examples/guestfs-python.pod:21 ../ruby/examples/guestfs-ruby.pod:22
20101 #: ../java/examples/guestfs-java.pod:31
20103 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
20104 "exception. This has a single parameter which is the error message (a "
20109 #: ../java/examples/guestfs-java.pod:35
20110 msgid "Calling any method on a closed handle raises the same exception."
20114 #: ../java/examples/guestfs-java.pod:47
20116 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
20117 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
20118 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
20119 "L<http://caml.inria.fr/>."
20123 #: ../ocaml/examples/guestfs-ocaml.pod:5
20124 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
20128 #: ../ocaml/examples/guestfs-ocaml.pod:9
20129 msgid "Module style:"
20133 #: ../ocaml/examples/guestfs-ocaml.pod:11
20136 " let g = Guestfs.create () in\n"
20137 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
20138 " Guestfs.launch g;\n"
20143 #: ../ocaml/examples/guestfs-ocaml.pod:15
20144 msgid "Object-oriented style:"
20148 #: ../ocaml/examples/guestfs-ocaml.pod:17
20151 " let g = new Guestfs.guestfs () in\n"
20152 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
20158 #: ../ocaml/examples/guestfs-ocaml.pod:21
20161 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
20163 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
20168 #: ../ocaml/examples/guestfs-ocaml.pod:27
20170 "This manual page documents how to call libguestfs from the OCaml programming "
20171 "language. This page just documents the differences from the C API and gives "
20172 "some examples. If you are not familiar with using libguestfs, you also need "
20173 "to read L<guestfs(3)>."
20177 #: ../ocaml/examples/guestfs-ocaml.pod:32
20178 msgid "PROGRAMMING STYLES"
20182 #: ../ocaml/examples/guestfs-ocaml.pod:34
20184 "There are two different programming styles supported by the OCaml bindings. "
20185 "You can use a module style, with each C function mapped to an OCaml "
20190 #: ../ocaml/examples/guestfs-ocaml.pod:38
20193 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
20198 #: ../ocaml/examples/guestfs-ocaml.pod:40
20203 #: ../ocaml/examples/guestfs-ocaml.pod:42
20206 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
20211 #: ../ocaml/examples/guestfs-ocaml.pod:44
20213 "Alternately you can use an object-oriented style, calling methods on the "
20214 "class C<Guestfs.guestfs>:"
20218 #: ../ocaml/examples/guestfs-ocaml.pod:47
20221 " method set_verbose : bool -> unit\n"
20226 #: ../ocaml/examples/guestfs-ocaml.pod:49
20228 "The object-oriented style is usually briefer, and the minor performance "
20229 "penalty isn't noticable in the general overhead of performing libguestfs "
20234 #: ../ocaml/examples/guestfs-ocaml.pod:55
20236 "The handle is closed when it is reaped by the garbage collector. Because "
20237 "libguestfs handles include a lot of state, it is also possible to close (and "
20238 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
20243 #: ../ocaml/examples/guestfs-ocaml.pod:62
20245 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
20246 "exception. This has a single parameter which is the error message (a "
20251 #: ../ocaml/examples/guestfs-ocaml.pod:66
20253 "Calling any function/method on a closed handle raises "
20254 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
20259 #: ../ocaml/examples/guestfs-ocaml.pod:80
20261 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
20262 "L<guestfs-java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
20263 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
20264 "L<http://caml.inria.fr/>."
20268 #: ../perl/examples/guestfs-perl.pod:5
20269 msgid "guestfs-perl - How to use libguestfs from Perl"
20273 #: ../perl/examples/guestfs-perl.pod:9
20276 " use Sys::Guestfs;\n"
20281 #: ../perl/examples/guestfs-perl.pod:11
20284 " my $h = Sys::Guestfs->new ();\n"
20285 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
20286 " $h->launch ();\n"
20287 " $h->mount_options ('', '/dev/sda1', '/');\n"
20288 " $h->touch ('/hello');\n"
20294 #: ../perl/examples/guestfs-perl.pod:20
20296 "This manual page documents how to call libguestfs from the Perl programming "
20297 "language. This page just documents the differences from the C API and gives "
20298 "some examples. If you are not familiar with using libguestfs, you also need "
20299 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
20303 #: ../perl/examples/guestfs-perl.pod:26
20308 #: ../perl/examples/guestfs-perl.pod:28
20310 "Errors from libguestfs functions turn into calls to C<croak> (see "
20315 #: ../perl/examples/guestfs-perl.pod:41
20317 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, "
20318 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
20319 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
20320 "L<http://libguestfs.org/>."
20324 #: ../python/examples/guestfs-python.pod:5
20325 msgid "guestfs-python - How to use libguestfs from Python"
20329 #: ../python/examples/guestfs-python.pod:9
20332 " import guestfs\n"
20333 " g = guestfs.GuestFS ()\n"
20334 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
20340 #: ../python/examples/guestfs-python.pod:16
20342 "This manual page documents how to call libguestfs from the Python "
20343 "programming language. This page just documents the differences from the C "
20344 "API and gives some examples. If you are not familiar with using libguestfs, "
20345 "you also need to read L<guestfs(3)>."
20349 #: ../python/examples/guestfs-python.pod:23
20351 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
20352 "single string argument which is the error message."
20356 #: ../python/examples/guestfs-python.pod:26
20357 msgid "MORE DOCUMENTATION"
20361 #: ../python/examples/guestfs-python.pod:28
20366 #: ../python/examples/guestfs-python.pod:30
20370 " >>> import guestfs\n"
20371 " >>> help (guestfs)\n"
20376 #: ../python/examples/guestfs-python.pod:44
20378 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
20379 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
20380 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
20384 #: ../rescue/virt-rescue.pod:5
20385 msgid "virt-rescue - Run a rescue shell on a virtual machine"
20389 #: ../rescue/virt-rescue.pod:9
20392 " virt-rescue [--options] -d domname\n"
20397 #: ../rescue/virt-rescue.pod:11
20400 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
20405 #: ../rescue/virt-rescue.pod:15
20408 " virt-rescue [--options] domname\n"
20413 #: ../rescue/virt-rescue.pod:17
20416 " virt-rescue [--options] disk.img [disk.img ...]\n"
20421 #: ../rescue/virt-rescue.pod:21
20423 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
20424 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
20425 "you from doing this, but doesn't catch all cases."
20429 #: ../rescue/virt-rescue.pod:25
20431 "However if you use the I<--ro> (read only) option, then you can attach a "
20432 "shell to a live virtual machine. The results might be strange or "
20433 "inconsistent at times but you won't get disk corruption."
20437 #: ../rescue/virt-rescue.pod:31
20439 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
20440 "need for a CD. virt-rescue gives you a rescue shell and some simple "
20441 "recovery tools which you can use to examine or rescue a virtual machine or "
20446 #: ../rescue/virt-rescue.pod:36
20448 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
20449 "on disk image(s):"
20453 #: ../rescue/virt-rescue.pod:39
20456 " virt-rescue -d GuestName\n"
20461 #: ../rescue/virt-rescue.pod:41
20464 " virt-rescue --ro -a /path/to/disk.img\n"
20469 #: ../rescue/virt-rescue.pod:43
20472 " virt-rescue -a /dev/sdc\n"
20477 #: ../rescue/virt-rescue.pod:45
20478 msgid "For live VMs you I<must> use the --ro option."
20482 #: ../rescue/virt-rescue.pod:47
20484 "When you run virt-rescue on a virtual machine or disk image, you are placed "
20485 "in an interactive bash shell where you can use many ordinary Linux "
20486 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
20487 "appliance. You must mount the virtual machine's filesystems by hand. There "
20488 "is an empty directory called C</sysroot> where you can mount filesystems."
20492 #: ../rescue/virt-rescue.pod:54
20494 "In the example below, we list logical volumes, then choose one to mount "
20495 "under C</sysroot>:"
20499 #: ../rescue/virt-rescue.pod:57
20503 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
20504 " lv_root vg_f11x64 -wi-a- 8.83G\n"
20505 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
20506 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
20507 " ><rescue> ls /sysroot\n"
20512 #: ../rescue/virt-rescue.pod:64
20514 "If you don't know what filesystems are available on the virtual machine then "
20515 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
20519 #: ../rescue/virt-rescue.pod:70
20521 "Virt-rescue can be used on I<any> disk image file or device, not just a "
20522 "virtual machine. For example you can use it on a blank file if you want to "
20523 "partition that file (although we would recommend using L<guestfish(1)> "
20524 "instead as it is more suitable for this purpose). You can even use "
20525 "virt-rescue on things like SD cards."
20529 #: ../rescue/virt-rescue.pod:76
20531 "Virt-rescue does not require root. You only need to run it as root if you "
20532 "need root to open the disk image."
20536 #: ../rescue/virt-rescue.pod:79
20538 "This tool is just designed for quick interactive hacking on a virtual "
20539 "machine. For more structured access to a virtual machine disk image, you "
20540 "should use L<guestfs(3)>. To get a structured shell that you can use to "
20541 "make scripted changes to guests, use L<guestfish(1)>."
20545 #: ../rescue/virt-rescue.pod:103
20546 msgid "B<--append kernelopts>"
20550 #: ../rescue/virt-rescue.pod:105
20551 msgid "Pass additional options to the rescue kernel."
20555 #: ../rescue/virt-rescue.pod:135
20558 " virt-rescue --format=raw -a disk.img\n"
20563 #: ../rescue/virt-rescue.pod:139
20566 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
20571 #: ../rescue/virt-rescue.pod:148
20576 #: ../rescue/virt-rescue.pod:150
20577 msgid "B<--memsize MB>"
20581 #: ../rescue/virt-rescue.pod:152
20583 "Change the amount of memory allocated to the rescue system. The default is "
20584 "set by libguestfs and is small but adequate for running system tools. The "
20585 "occasional program might need more memory. The parameter is specified in "
20590 #: ../rescue/virt-rescue.pod:157
20591 msgid "B<--network>"
20595 #: ../rescue/virt-rescue.pod:159
20596 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
20600 #: ../rescue/virt-rescue.pod:165
20601 msgid "Open the image read-only."
20605 #: ../rescue/virt-rescue.pod:175
20607 "Enable SELinux in the rescue appliance. You should read "
20608 "L<guestfs(3)/SELINUX> before using this option."
20612 #: ../rescue/virt-rescue.pod:178
20617 #: ../rescue/virt-rescue.pod:180
20618 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
20622 #: ../rescue/virt-rescue.pod:198
20624 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
20625 "are done read-write."
20629 #: ../rescue/virt-rescue.pod:211
20630 msgid "Previous versions of virt-rescue allowed you to write either:"
20634 #: ../rescue/virt-rescue.pod:213
20637 " virt-rescue disk.img [disk.img ...]\n"
20642 #: ../rescue/virt-rescue.pod:217
20645 " virt-rescue guestname\n"
20650 #: ../rescue/virt-rescue.pod:225
20655 #: ../rescue/virt-rescue.pod:227
20657 "Adding the I<--network> option enables QEMU user networking in the rescue "
20658 "appliance. There are some differences between user networking and ordinary "
20663 #: ../rescue/virt-rescue.pod:233
20664 msgid "ping does not work"
20668 #: ../rescue/virt-rescue.pod:235
20670 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
20671 "send the ping packets, and because virt-rescue must be able to run as "
20672 "non-root, QEMU user networking is not able to emulate the L<ping(8)> "
20673 "command. The ping command will appear to resolve addresses but will not be "
20674 "able to send or receive any packets. This does not mean that the network is "
20679 #: ../rescue/virt-rescue.pod:242
20680 msgid "cannot receive connections"
20684 #: ../rescue/virt-rescue.pod:244
20685 msgid "QEMU user networking cannot receive incoming connections."
20689 #: ../rescue/virt-rescue.pod:246
20690 msgid "making TCP connections"
20694 #: ../rescue/virt-rescue.pod:248
20696 "The virt-rescue appliance needs to be small and so does not include many "
20697 "network tools. In particular there is no L<telnet(1)> command. You can "
20698 "make TCP connections from the shell using the magical "
20699 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
20703 #: ../rescue/virt-rescue.pod:253
20706 " exec 3<>/dev/tcp/redhat.com/80\n"
20707 " echo \"GET /\" >&3\n"
20713 #: ../rescue/virt-rescue.pod:257
20714 msgid "See L<bash(1)> for more details."
20718 #: ../rescue/virt-rescue.pod:263
20720 "Several environment variables affect virt-rescue. See "
20721 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
20725 #: ../rescue/virt-rescue.pod:290
20727 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
20728 "L<http://libguestfs.org/>."
20732 #: ../resize/virt-resize.pod:5
20733 msgid "virt-resize - Resize a virtual machine disk"
20737 #: ../resize/virt-resize.pod:9
20740 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
20741 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
20742 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
20747 #: ../resize/virt-resize.pod:15
20749 "Virt-resize is a tool which can resize a virtual machine disk, making it "
20750 "larger or smaller overall, and resizing or deleting any partitions contained "
20755 #: ../resize/virt-resize.pod:19
20757 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
20758 "not> be used on live virtual machines - for consistent results, shut the "
20759 "virtual machine down before resizing it."
20763 #: ../resize/virt-resize.pod:23
20765 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
20766 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
20770 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:520 ../sparsify/virt-sparsify.pod:203 ../src/guestfs.pod:469 ../src/guestfs.pod:1287 ../src/guestfs.pod:1426 ../src/guestfs.pod:2604
20775 #: ../resize/virt-resize.pod:33
20777 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
20778 "fill the extra 5GB of space."
20782 #: ../resize/virt-resize.pod:36
20785 " virt-filesystems --long -h --all -a olddisk\n"
20790 #: ../resize/virt-resize.pod:38
20793 " truncate -r olddisk newdisk\n"
20794 " truncate -s +5G newdisk\n"
20799 #: ../resize/virt-resize.pod:41
20802 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
20803 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
20808 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:527 ../sparsify/virt-sparsify.pod:210 ../src/guestfs.pod:475 ../src/guestfs.pod:1291 ../src/guestfs.pod:1430 ../src/guestfs.pod:2629
20813 #: ../resize/virt-resize.pod:46
20815 "As above, but make the /boot partition 200MB bigger, while giving the "
20816 "remaining space to /dev/sda2:"
20820 #: ../resize/virt-resize.pod:49
20823 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
20824 " olddisk newdisk\n"
20829 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:533 ../sparsify/virt-sparsify.pod:216 ../src/guestfs.pod:486 ../src/guestfs.pod:1436
20834 #: ../resize/virt-resize.pod:54
20836 "As in the first example, but expand a logical volume as the final step. "
20837 "This is what you would typically use for Linux guests that use LVM:"
20841 #: ../resize/virt-resize.pod:58
20844 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
20845 " olddisk newdisk\n"
20850 #: ../resize/virt-resize.pod:61
20855 #: ../resize/virt-resize.pod:63
20857 "As in the first example, but the output format will be qcow2 instead of a "
20862 #: ../resize/virt-resize.pod:66
20865 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
20866 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
20871 #: ../resize/virt-resize.pod:71
20872 msgid "DETAILED USAGE"
20876 #: ../resize/virt-resize.pod:73
20877 msgid "EXPANDING A VIRTUAL MACHINE DISK"
20881 #: ../resize/virt-resize.pod:77
20882 msgid "1. Shut down the virtual machine"
20886 #: ../resize/virt-resize.pod:79
20887 msgid "2. Locate input disk image"
20891 #: ../resize/virt-resize.pod:81
20893 "Locate the input disk image (ie. the file or device on the host containing "
20894 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
20895 "dumpxml> like this to find the disk image name:"
20899 #: ../resize/virt-resize.pod:85
20902 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
20903 " Found 1 nodes:\n"
20905 " <source dev=\"/dev/vg/lv_guest\" />\n"
20910 #: ../resize/virt-resize.pod:90
20911 msgid "3. Look at current sizing"
20915 #: ../resize/virt-resize.pod:92
20916 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
20920 #: ../resize/virt-resize.pod:95
20923 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
20924 " Name Type Size Parent\n"
20925 " /dev/sda1 partition 101M /dev/sda\n"
20926 " /dev/sda2 partition 7.9G /dev/sda\n"
20927 " /dev/sda device 8.0G -\n"
20932 #: ../resize/virt-resize.pod:101
20934 "(This example is a virtual machine with an 8 GB disk which we would like to "
20935 "expand up to 10 GB)."
20939 #: ../resize/virt-resize.pod:104
20940 msgid "4. Create output disk"
20944 #: ../resize/virt-resize.pod:106
20946 "Virt-resize cannot do in-place disk modifications. You have to have space "
20947 "to store the resized output disk."
20951 #: ../resize/virt-resize.pod:109
20952 msgid "To store the resized disk image in a file, create a file of a suitable size:"
20956 #: ../resize/virt-resize.pod:112
20959 " # rm -f outdisk\n"
20960 " # truncate -s 10G outdisk\n"
20965 #: ../resize/virt-resize.pod:115
20966 msgid "Or use L<lvcreate(1)> to create a logical volume:"
20970 #: ../resize/virt-resize.pod:117
20973 " # lvcreate -L 10G -n lv_name vg_name\n"
20978 #: ../resize/virt-resize.pod:119
20979 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
20983 #: ../resize/virt-resize.pod:121
20986 " # virsh pool-list\n"
20987 " # virsh vol-create-as poolname newvol 10G\n"
20992 #: ../resize/virt-resize.pod:124
20997 #: ../resize/virt-resize.pod:126
20999 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
21000 "file) and the output disk. The output disk is the one created in the "
21005 #: ../resize/virt-resize.pod:130
21008 " # virt-resize indisk outdisk\n"
21013 #: ../resize/virt-resize.pod:132
21015 "This command just copies disk image C<indisk> to disk image C<outdisk> "
21016 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
21017 "larger, then an extra, empty partition is created at the end of the disk "
21018 "covering the extra space. If C<outdisk> is smaller, then it will give an "
21023 #: ../resize/virt-resize.pod:138
21025 "More realistically you'd want to expand existing partitions in the disk "
21026 "image by passing extra options (for the full list see the L</OPTIONS> "
21031 #: ../resize/virt-resize.pod:142
21033 "L</--expand> is the most useful option. It expands the named partition "
21034 "within the disk to fill any extra space:"
21038 #: ../resize/virt-resize.pod:145
21041 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
21046 #: ../resize/virt-resize.pod:147
21048 "(In this case, an extra partition is I<not> created at the end of the disk, "
21049 "because there will be no unused space)."
21053 #: ../resize/virt-resize.pod:150
21055 "L</--resize> is the other commonly used option. The following would "
21056 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
21057 "rest of the available space:"
21061 #: ../resize/virt-resize.pod:154
21064 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
21065 " indisk outdisk\n"
21070 #: ../resize/virt-resize.pod:157
21072 "If the expanded partition in the image contains a filesystem or LVM PV, then "
21073 "if virt-resize knows how, it will resize the contents, the equivalent of "
21074 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
21075 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
21076 "filesystems, so you would have to online resize them after booting the "
21081 #: ../resize/virt-resize.pod:164
21082 msgid "Other options are covered below."
21086 #: ../resize/virt-resize.pod:166
21091 #: ../resize/virt-resize.pod:168
21092 msgid "Thoroughly test the new disk image I<before> discarding the old one."
21096 #: ../resize/virt-resize.pod:170
21097 msgid "If you are using libvirt, edit the XML to point at the new disk:"
21101 #: ../resize/virt-resize.pod:172
21104 " # virsh edit guestname\n"
21109 #: ../resize/virt-resize.pod:174
21111 "Change E<lt>source ...E<gt>, see "
21112 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
21116 #: ../resize/virt-resize.pod:177
21117 msgid "Then start up the domain with the new, resized disk:"
21121 #: ../resize/virt-resize.pod:179
21124 " # virsh start guestname\n"
21129 #: ../resize/virt-resize.pod:181
21131 "and check that it still works. See also the L</NOTES> section below for "
21132 "additional information."
21136 #: ../resize/virt-resize.pod:184
21137 msgid "7. Resize LVs etc inside the guest"
21141 #: ../resize/virt-resize.pod:186
21142 msgid "(This can also be done offline using L<guestfish(1)>)"
21146 #: ../resize/virt-resize.pod:188
21148 "Once the guest has booted you should see the new space available, at least "
21149 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
21150 "may need to resize LVs inside PVs, and also resize filesystem types that "
21151 "virt-resize does not know how to expand."
21155 #: ../resize/virt-resize.pod:195
21156 msgid "SHRINKING A VIRTUAL MACHINE DISK"
21160 #: ../resize/virt-resize.pod:197
21162 "Shrinking is somewhat more complex than expanding, and only an overview is "
21167 #: ../resize/virt-resize.pod:200
21169 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
21170 "filesystems). The user has to shrink content before passing the disk image "
21171 "to virt-resize, and virt-resize will check that the content has been shrunk "
21176 #: ../resize/virt-resize.pod:205
21177 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
21181 #: ../resize/virt-resize.pod:207
21183 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
21184 "steps 3 and 4 above to allocate a new disk image."
21188 #: ../resize/virt-resize.pod:210
21189 msgid "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
21193 #: ../resize/virt-resize.pod:213
21194 msgid "IGNORING OR DELETING PARTITIONS"
21198 #: ../resize/virt-resize.pod:215
21200 "virt-resize also gives a convenient way to ignore or delete partitions when "
21201 "copying from the input disk to the output disk. Ignoring a partition speeds "
21202 "up the copy where you don't care about the existing contents of a "
21203 "partition. Deleting a partition removes it completely, but note that it "
21204 "also renumbers any partitions after the one which is deleted, which can "
21205 "leave some guests unbootable."
21209 #: ../resize/virt-resize.pod:222
21210 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
21214 #: ../resize/virt-resize.pod:224
21216 "If the input disk is in qcow2 format, then you may prefer that the output is "
21217 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
21218 "the fly. The output format is simply determined by the format of the empty "
21219 "output container that you provide. Thus to create qcow2 output, use:"
21223 #: ../resize/virt-resize.pod:230
21226 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
21231 #: ../resize/virt-resize.pod:232
21232 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
21236 #: ../resize/virt-resize.pod:234
21237 msgid "Similarly, to get non-sparse raw output use:"
21241 #: ../resize/virt-resize.pod:236
21244 " fallocate -l size outdisk\n"
21249 #: ../resize/virt-resize.pod:238
21251 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
21252 "if=/dev/zero of=outdisk bs=1M count=..>)"
21256 #: ../resize/virt-resize.pod:247 ../sparsify/virt-sparsify.pod:105
21257 msgid "Display help."
21261 #: ../resize/virt-resize.pod:249
21266 #: ../resize/virt-resize.pod:251 ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:120
21271 #: ../resize/virt-resize.pod:253 ../tools/virt-win-reg.pl:122
21272 msgid "Enable debugging messages."
21276 #: ../resize/virt-resize.pod:255
21277 msgid "B<--delete part>"
21281 #: ../resize/virt-resize.pod:257
21283 "Delete the named partition. It would be more accurate to describe this as "
21284 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
21285 "the original disk image is left intact."
21289 #: ../resize/virt-resize.pod:261
21291 "Note that when you delete a partition, then anything contained in the "
21292 "partition is also deleted. Furthermore, this causes any partitions that "
21293 "come after to be I<renumbered>, which can easily make your guest unbootable."
21297 #: ../resize/virt-resize.pod:266 ../resize/virt-resize.pod:327 ../resize/virt-resize.pod:454 ../sparsify/virt-sparsify.pod:145
21298 msgid "You can give this option multiple times."
21302 #: ../resize/virt-resize.pod:268
21303 msgid "B<--expand part>"
21307 #: ../resize/virt-resize.pod:270
21309 "Expand the named partition so it uses up all extra space (space left over "
21310 "after any other resize changes that you request have been done)."
21314 #: ../resize/virt-resize.pod:273
21316 "If virt-resize knows how, it will expand the direct content of the "
21317 "partition. For example, if the partition is an LVM PV, it will expand the "
21318 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
21319 "content it doesn't know about alone."
21323 #: ../resize/virt-resize.pod:278
21324 msgid "Currently virt-resize can resize:"
21328 #: ../resize/virt-resize.pod:284
21329 msgid "ext2, ext3 and ext4 filesystems."
21333 #: ../resize/virt-resize.pod:288
21334 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
21338 #: ../resize/virt-resize.pod:290
21340 "The filesystem must have been shut down consistently last time it was used. "
21341 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
21342 "consistency check, so at the first boot after resizing Windows will check "
21347 #: ../resize/virt-resize.pod:297
21349 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
21350 "inside the PV, but see the I<--LV-expand> option. The user could also "
21351 "resize LVs as desired after boot."
21355 #: ../resize/virt-resize.pod:303
21356 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
21360 #: ../resize/virt-resize.pod:307 ../resize/virt-resize.pod:482
21361 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
21365 #: ../resize/virt-resize.pod:309 ../sparsify/virt-sparsify.pod:125 ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
21366 msgid "B<--format> raw"
21370 #: ../resize/virt-resize.pod:311 ../sparsify/virt-sparsify.pod:129
21372 "Specify the format of the input disk image. If this flag is not given then "
21373 "it is auto-detected from the image itself."
21377 #: ../resize/virt-resize.pod:317
21379 "Note that this option I<does not> affect the output format. See L</QCOW2 "
21380 "AND NON-SPARSE RAW FORMATS>."
21384 #: ../resize/virt-resize.pod:320
21385 msgid "B<--ignore part>"
21389 #: ../resize/virt-resize.pod:322
21391 "Ignore the named partition. Effectively this means the partition is "
21392 "allocated on the destination disk, but the content is not copied across from "
21393 "the source disk. The content of the partition will be blank (all zero "
21398 #: ../resize/virt-resize.pod:329
21399 msgid "B<--LV-expand logvol>"
21403 #: ../resize/virt-resize.pod:331
21405 "This takes the logical volume and, as a final step, expands it to fill all "
21406 "the space available in its volume group. A typical usage, assuming a Linux "
21407 "guest with a single PV C</dev/sda2> and a root device called "
21408 "C</dev/vg_guest/lv_root> would be:"
21412 #: ../resize/virt-resize.pod:336
21415 " virt-resize indisk outdisk \\\n"
21416 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
21421 #: ../resize/virt-resize.pod:339
21423 "This would first expand the partition (and PV), and then expand the root "
21424 "device to fill the extra space in the PV."
21428 #: ../resize/virt-resize.pod:342
21430 "The contents of the LV are also resized if virt-resize knows how to do "
21431 "that. You can stop virt-resize from trying to expand the content by using "
21432 "the option I<--no-expand-content>."
21436 #: ../resize/virt-resize.pod:346
21437 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
21441 #: ../resize/virt-resize.pod:348
21443 "You can give this option multiple times, I<but> it doesn't make sense to do "
21444 "this unless the logical volumes you specify are all in different volume "
21449 #: ../resize/virt-resize.pod:352 ../sparsify/virt-sparsify.pod:147
21450 msgid "B<--machine-readable>"
21454 #: ../resize/virt-resize.pod:354 ../sparsify/virt-sparsify.pod:149
21456 "This option is used to make the output more machine friendly when being "
21457 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
21461 #: ../resize/virt-resize.pod:360
21462 msgid "B<--dryrun>"
21466 #: ../resize/virt-resize.pod:362
21467 msgid "Print a summary of what would be done, but don't do anything."
21471 #: ../resize/virt-resize.pod:364
21472 msgid "B<--no-copy-boot-loader>"
21476 #: ../resize/virt-resize.pod:366
21478 "By default, virt-resize copies over some sectors at the start of the disk "
21479 "(up to the beginning of the first partition). Commonly these sectors "
21480 "contain the Master Boot Record (MBR) and the boot loader, and are required "
21481 "in order for the guest to boot correctly."
21485 #: ../resize/virt-resize.pod:371
21487 "If you specify this flag, then this initial copy is not done. You may need "
21488 "to reinstall the boot loader in this case."
21492 #: ../resize/virt-resize.pod:374
21493 msgid "B<--no-extra-partition>"
21497 #: ../resize/virt-resize.pod:376
21499 "By default, virt-resize creates an extra partition if there is any extra, "
21500 "unused space after all resizing has happened. Use this option to prevent "
21501 "the extra partition from being created. If you do this then the extra space "
21502 "will be inaccessible until you run fdisk, parted, or some other partitioning "
21503 "tool in the guest."
21507 #: ../resize/virt-resize.pod:382
21509 "Note that if the surplus space is smaller than 10 MB, no extra partition "
21514 #: ../resize/virt-resize.pod:385
21515 msgid "B<--no-expand-content>"
21519 #: ../resize/virt-resize.pod:387
21521 "By default, virt-resize will try to expand the direct contents of "
21522 "partitions, if it knows how (see I<--expand> option above)."
21526 #: ../resize/virt-resize.pod:390
21528 "If you give the I<--no-expand-content> option then virt-resize will not "
21533 #: ../resize/virt-resize.pod:393
21534 msgid "B<--ntfsresize-force>"
21538 #: ../resize/virt-resize.pod:395
21540 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
21541 "the NTFS disk is marked as needing a consistency check. You have to use "
21542 "this option if you want to resize a Windows guest multiple times without "
21543 "booting into Windows between each resize."
21547 #: ../resize/virt-resize.pod:401
21548 msgid "B<--output-format> raw"
21552 #: ../resize/virt-resize.pod:403
21554 "Specify the format of the output disk image. If this flag is not given then "
21555 "it is auto-detected from the image itself."
21559 #: ../resize/virt-resize.pod:409
21561 "Note that this option I<does not create> the output format. This option "
21562 "just tells libguestfs what it is so it doesn't try to guess it. You still "
21563 "need to create the output disk with the right format. See L</QCOW2 AND "
21564 "NON-SPARSE RAW FORMATS>."
21568 #: ../resize/virt-resize.pod:418
21569 msgid "Don't print the summary."
21573 #: ../resize/virt-resize.pod:420
21574 msgid "B<--resize part=size>"
21578 #: ../resize/virt-resize.pod:422
21580 "Resize the named partition (expanding or shrinking it) so that it has the "
21585 #: ../resize/virt-resize.pod:425
21587 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
21588 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
21589 "size; or as a relative number or percentage. For example:"
21593 #: ../resize/virt-resize.pod:431
21596 " --resize /dev/sda2=10G\n"
21601 #: ../resize/virt-resize.pod:433
21604 " --resize /dev/sda4=90%\n"
21609 #: ../resize/virt-resize.pod:435
21612 " --resize /dev/sda2=+1G\n"
21617 #: ../resize/virt-resize.pod:437
21620 " --resize /dev/sda2=-200M\n"
21625 #: ../resize/virt-resize.pod:439
21628 " --resize /dev/sda1=+128K\n"
21633 #: ../resize/virt-resize.pod:441
21636 " --resize /dev/sda1=+10%\n"
21641 #: ../resize/virt-resize.pod:443
21644 " --resize /dev/sda1=-10%\n"
21649 #: ../resize/virt-resize.pod:445
21651 "You can increase the size of any partition. Virt-resize will expand the "
21652 "direct content of the partition if it knows how (see I<--expand> below)."
21656 #: ../resize/virt-resize.pod:449
21658 "You can only I<decrease> the size of partitions that contain filesystems or "
21659 "PVs which have already been shrunk. Virt-resize will check this has been "
21660 "done before proceeding, or else will print an error (see also "
21661 "I<--resize-force>)."
21665 #: ../resize/virt-resize.pod:456
21666 msgid "B<--resize-force part=size>"
21670 #: ../resize/virt-resize.pod:458
21672 "This is the same as I<--resize> except that it will let you decrease the "
21673 "size of any partition. Generally this means you will lose any data which "
21674 "was at the end of the partition you shrink, but you may not care about that "
21675 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
21676 "as a swap partition)."
21680 #: ../resize/virt-resize.pod:464
21681 msgid "See also the I<--ignore> option."
21685 #: ../resize/virt-resize.pod:466
21686 msgid "B<--shrink part>"
21690 #: ../resize/virt-resize.pod:468
21692 "Shrink the named partition until the overall disk image fits in the "
21693 "destination. The named partition B<must> contain a filesystem or PV which "
21694 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
21695 "online tools). Virt-resize will check this and give an error if it has not "
21700 #: ../resize/virt-resize.pod:474
21702 "The amount by which the overall disk must be shrunk (after carrying out all "
21703 "other operations requested by the user) is called the \"deficit\". For "
21704 "example, a straight copy (assume no other operations) from a 5GB disk image "
21705 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
21706 "would give an error unless the user specified a partition to shrink and that "
21707 "partition had more than a gigabyte of free space."
21711 #: ../resize/virt-resize.pod:492 ../sparsify/virt-sparsify.pod:177
21712 msgid "MACHINE READABLE OUTPUT"
21716 #: ../resize/virt-resize.pod:494
21718 "The I<--machine-readable> option can be used to make the output more machine "
21719 "friendly, which is useful when calling virt-resize from other programs, GUIs "
21724 #: ../resize/virt-resize.pod:498 ../sparsify/virt-sparsify.pod:183
21725 msgid "There are two ways to use this option."
21729 #: ../resize/virt-resize.pod:500
21731 "Firstly use the option on its own to query the capabilities of the "
21732 "virt-resize binary. Typical output looks like this:"
21736 #: ../resize/virt-resize.pod:503
21739 " $ virt-resize --machine-readable\n"
21741 " ntfsresize-force\n"
21749 #: ../resize/virt-resize.pod:510 ../sparsify/virt-sparsify.pod:193
21751 "A list of features is printed, one per line, and the program exits with "
21756 #: ../resize/virt-resize.pod:513 ../sparsify/virt-sparsify.pod:196
21758 "Secondly use the option in conjunction with other options to make the "
21759 "regular program output more machine friendly."
21763 #: ../resize/virt-resize.pod:516 ../sparsify/virt-sparsify.pod:199
21764 msgid "At the moment this means:"
21768 #: ../resize/virt-resize.pod:522 ../sparsify/virt-sparsify.pod:205
21770 "Progress bar messages can be parsed from stdout by looking for this regular "
21775 #: ../resize/virt-resize.pod:525 ../sparsify/virt-sparsify.pod:208
21778 " ^[0-9]+/[0-9]+$\n"
21783 #: ../resize/virt-resize.pod:529 ../sparsify/virt-sparsify.pod:212
21785 "The calling program should treat messages sent to stdout (except for "
21786 "progress bar messages) as status messages. They can be logged and/or "
21787 "displayed to the user."
21791 #: ../resize/virt-resize.pod:535
21793 "The calling program should treat messages sent to stderr as error messages. "
21794 "In addition, virt-resize exits with a non-zero status code if there was a "
21799 #: ../resize/virt-resize.pod:541
21801 "Versions of the program prior to 1.13.9 did not support the "
21802 "I<--machine-readable> option and will return an error."
21806 #: ../resize/virt-resize.pod:546
21807 msgid "\"Partition 1 does not end on cylinder boundary.\""
21811 #: ../resize/virt-resize.pod:548
21813 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
21814 "means the partitions will not be aligned to the ancient CHS geometry. "
21815 "However CHS geometry is meaningless for disks manufactured since the early "
21816 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
21817 "cylinders is not required by any modern operating system."
21821 #: ../resize/virt-resize.pod:555
21822 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
21826 #: ../resize/virt-resize.pod:557
21828 "In Windows Vista and later versions, Microsoft switched to using a separate "
21829 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
21830 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
21831 "the boot partition. Doing so seems to break the guest completely. However "
21832 "expanding the second partition (ie. C: drive) should work."
21836 #: ../resize/virt-resize.pod:564
21838 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
21839 "NTFS partitions have been expanded. This is just a safety check and (unless "
21840 "it find errors) is nothing to worry about."
21844 #: ../resize/virt-resize.pod:568
21845 msgid "GUEST BOOT STUCK AT \"GRUB\""
21849 #: ../resize/virt-resize.pod:570
21851 "If a Linux guest does not boot after resizing, and the boot is stuck after "
21852 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
21853 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
21854 "although we think is to do with partition alignment."
21858 #: ../resize/virt-resize.pod:575
21861 " guestfish -i -a newdisk\n"
21862 " ><fs> cat /boot/grub/device.map\n"
21863 " # check the contents of this file are sensible or\n"
21864 " # edit the file if necessary\n"
21865 " ><fs> grub-install / /dev/vda\n"
21871 #: ../resize/virt-resize.pod:582
21873 "For more flexible guest reconfiguration, including if you need to specify "
21874 "other parameters to grub-install, use L<virt-rescue(1)>."
21878 #: ../resize/virt-resize.pod:585
21879 msgid "ALTERNATIVE TOOLS"
21883 #: ../resize/virt-resize.pod:587
21885 "There are several proprietary tools for resizing partitions. We won't "
21886 "mention any here."
21890 #: ../resize/virt-resize.pod:590
21892 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
21893 "operations on disk images. They can resize and move partitions, but I don't "
21894 "think they can do anything with the contents, and they certainly don't "
21899 #: ../resize/virt-resize.pod:595
21901 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
21902 "but at a much lower level. You will probably end up hand-calculating sector "
21903 "offsets, which is something that virt-resize was designed to avoid. If you "
21904 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
21909 #: ../resize/virt-resize.pod:615
21911 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
21912 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
21913 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
21914 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
21915 "L<virt-sparsify(1)>, L<http://libguestfs.org/>."
21919 #: ../ruby/examples/guestfs-ruby.pod:5
21920 msgid "guestfs-ruby - How to use libguestfs from Ruby"
21924 #: ../ruby/examples/guestfs-ruby.pod:9
21927 " require 'guestfs'\n"
21928 " g = Guestfs::Guestfs.new()\n"
21929 " g.add_drive_opts(\"disk.img\",\n"
21930 " :readonly => 1, :format => \"raw\")\n"
21936 #: ../ruby/examples/guestfs-ruby.pod:17
21938 "This manual page documents how to call libguestfs from the Ruby programming "
21939 "language. This page just documents the differences from the C API and gives "
21940 "some examples. If you are not familiar with using libguestfs, you also need "
21941 "to read L<guestfs(3)>."
21945 #: ../ruby/examples/guestfs-ruby.pod:24
21947 "Errors from libguestfs functions are mapped into the C<Error> exception. "
21948 "This has a single parameter which is the error message (a string)."
21952 #: ../ruby/examples/guestfs-ruby.pod:38
21954 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
21955 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
21956 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
21960 #: ../sparsify/virt-sparsify.pod:5
21961 msgid "virt-sparsify - Make a virtual machine disk sparse"
21965 #: ../sparsify/virt-sparsify.pod:9
21968 " virt-sparsify [--options] indisk outdisk\n"
21973 #: ../sparsify/virt-sparsify.pod:13
21975 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
21976 "image) sparse a.k.a. thin-provisioned. This means that free space within "
21977 "the disk image can be converted back to free space on the host."
21981 #: ../sparsify/virt-sparsify.pod:18
21983 "Virt-sparsify can locate and sparsify free space in most filesystems "
21984 "(eg. ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
21988 #: ../sparsify/virt-sparsify.pod:21
21990 "Virt-sparsify can also convert between some disk formats, for example "
21991 "converting a raw disk image to a thin-provisioned qcow2 image."
21995 #: ../sparsify/virt-sparsify.pod:24
21997 "Virt-sparsify can operate on any disk image, not just ones from virtual "
21998 "machines. If a virtual machine has more than one attached disk, you must "
21999 "sparsify each one separately."
22003 #: ../sparsify/virt-sparsify.pod:28
22004 msgid "IMPORTANT LIMITATIONS"
22008 #: ../sparsify/virt-sparsify.pod:34
22010 "Virt-sparsify does not do in-place modifications. It copies from a source "
22011 "image to a destination image, leaving the source unchanged. I<Check that "
22012 "the sparsification was successful before deleting the source image>."
22016 #: ../sparsify/virt-sparsify.pod:41
22017 msgid "The virtual machine I<must be shut down> before using this tool."
22021 #: ../sparsify/virt-sparsify.pod:45
22023 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
22024 "(1 temporary copy + 1 destination image). This is in the worst case and "
22025 "usually much less space is required."
22029 #: ../sparsify/virt-sparsify.pod:51
22030 msgid "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
22034 #: ../sparsify/virt-sparsify.pod:56
22035 msgid "Virt-sparsify cannot handle encrypted disks."
22039 #: ../sparsify/virt-sparsify.pod:60
22041 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
22042 "this space is often used for critical items like bootloaders so it's not "
22047 #: ../sparsify/virt-sparsify.pod:66
22049 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
22050 "to do this unless we can be sure there is no hibernation data, so at the "
22051 "moment swap partitions are ignored."
22055 #: ../sparsify/virt-sparsify.pod:72
22057 "You may also want to read the manual pages for the associated tools "
22058 "L<virt-filesystems(1)> and L<virt-df(1)> before starting."
22062 #: ../sparsify/virt-sparsify.pod:77
22063 msgid "Typical usage is:"
22067 #: ../sparsify/virt-sparsify.pod:79
22070 " virt-sparsify indisk outdisk\n"
22075 #: ../sparsify/virt-sparsify.pod:81
22077 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
22078 "is created, or overwritten if it already exists. The format of the input "
22079 "disk is detected (eg. qcow2) and the same format is used for the output "
22084 #: ../sparsify/virt-sparsify.pod:86
22085 msgid "To convert between formats, use the I<--convert> option:"
22089 #: ../sparsify/virt-sparsify.pod:88
22092 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
22097 #: ../sparsify/virt-sparsify.pod:90
22099 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
22100 "can find within the source disk image. You can get it to ignore (don't zero "
22101 "free space on) certain filesystems by doing:"
22105 #: ../sparsify/virt-sparsify.pod:94
22108 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
22113 #: ../sparsify/virt-sparsify.pod:96
22114 msgid "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
22118 #: ../sparsify/virt-sparsify.pod:107
22119 msgid "B<--convert> raw"
22123 #: ../sparsify/virt-sparsify.pod:109
22124 msgid "B<--convert> qcow2"
22128 #: ../sparsify/virt-sparsify.pod:111
22129 msgid "B<--convert> [other formats]"
22133 #: ../sparsify/virt-sparsify.pod:113
22135 "Use C<output-format> as the format for the destination image. If this is "
22136 "not specified, then the input format is used."
22140 #: ../sparsify/virt-sparsify.pod:116
22141 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>."
22145 #: ../sparsify/virt-sparsify.pod:118
22147 "You can also use any format supported by the L<qemu-img(1)> program, "
22148 "eg. C<vdi> or C<vmdk>, but support for other formats is reliant on qemu."
22152 #: ../sparsify/virt-sparsify.pod:122
22154 "Specifying the I<--convert> option is usually a good idea, because then "
22155 "virt-sparsify doesn't need to try to guess the input format."
22159 #: ../sparsify/virt-sparsify.pod:127
22160 msgid "B<--format> qcow2"
22164 #: ../sparsify/virt-sparsify.pod:135
22165 msgid "B<--ignore> filesystem"
22169 #: ../sparsify/virt-sparsify.pod:137
22170 msgid "B<--ignore> volgroup"
22174 #: ../sparsify/virt-sparsify.pod:139
22176 "Ignore the named filesystem. Free space on the filesystem will not be "
22177 "zeroed, but existing blocks of zeroes will still be sparsified."
22181 #: ../sparsify/virt-sparsify.pod:142
22183 "In the second form, this ignores the named volume group. Use the volume "
22184 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
22188 #: ../sparsify/virt-sparsify.pod:157
22189 msgid "This disables progress bars and other unnecessary output."
22193 #: ../sparsify/virt-sparsify.pod:179
22195 "The I<--machine-readable> option can be used to make the output more machine "
22196 "friendly, which is useful when calling virt-sparsify from other programs, "
22201 #: ../sparsify/virt-sparsify.pod:185
22203 "Firstly use the option on its own to query the capabilities of the "
22204 "virt-sparsify binary. Typical output looks like this:"
22208 #: ../sparsify/virt-sparsify.pod:188
22211 " $ virt-sparsify --machine-readable\n"
22219 #: ../sparsify/virt-sparsify.pod:218
22221 "The calling program should treat messages sent to stderr as error messages. "
22222 "In addition, virt-sparsify exits with a non-zero status code if there was a "
22227 #: ../sparsify/virt-sparsify.pod:224
22229 "All versions of virt-sparsify have supported the I<--machine-readable> "
22234 #: ../sparsify/virt-sparsify.pod:238
22236 "Location of the temporary directory used for the potentially large temporary "
22241 #: ../sparsify/virt-sparsify.pod:241
22243 "You should ensure there is enough free space in the worst case for a full "
22244 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
22245 "to another directory that has enough space."
22249 #: ../sparsify/virt-sparsify.pod:245
22250 msgid "This defaults to C</tmp>."
22254 #: ../sparsify/virt-sparsify.pod:249
22255 msgid "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
22259 #: ../sparsify/virt-sparsify.pod:253
22261 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
22262 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, "
22263 "L<qemu-img(1)>, L<http://libguestfs.org/>."
22267 #: ../src/guestfs-actions.pod:1
22268 msgid "guestfs_add_cdrom"
22272 #: ../src/guestfs-actions.pod:3
22276 " guestfs_add_cdrom (guestfs_h *g,\n"
22277 " const char *filename);\n"
22282 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:249 ../src/guestfs-actions.pod:270
22284 "I<This function is deprecated.> In new code, use the "
22285 "L</guestfs_add_drive_opts> call instead."
22289 #: ../src/guestfs-actions.pod:24
22291 "This call checks for the existence of C<filename>. This stops you from "
22292 "specifying other types of drive which are supported by qemu such as C<nbd:> "
22293 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
22298 #: ../src/guestfs-actions.pod:31
22300 "If you just want to add an ISO file (often you use this as an efficient way "
22301 "to transfer large files into the guest), then you should probably use "
22302 "C<guestfs_add_drive_ro> instead."
22306 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:140 ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:259 ../src/guestfs-actions.pod:280 ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307 ../src/guestfs-actions.pod:427 ../src/guestfs-actions.pod:447 ../src/guestfs-actions.pod:461 ../src/guestfs-actions.pod:506 ../src/guestfs-actions.pod:534 ../src/guestfs-actions.pod:552 ../src/guestfs-actions.pod:619 ../src/guestfs-actions.pod:652 ../src/guestfs-actions.pod:666 ../src/guestfs-actions.pod:681 ../src/guestfs-actions.pod:780 ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:812 ../src/guestfs-actions.pod:826 ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:1046 ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1084 ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1279 ../src/guestfs-actions.pod:1297 ../src/guestfs-actions.pod:1316 ../src/guestfs-actions.pod:1330 ../src/guestfs-actions.pod:1350 ../src/guestfs-actions.pod:1420 ../src/guestfs-actions.pod:1451 ../src/guestfs-actions.pod:1476 ../src/guestfs-actions.pod:1518 ../src/guestfs-actions.pod:1631 ../src/guestfs-actions.pod:1658 ../src/guestfs-actions.pod:1873 ../src/guestfs-actions.pod:1895 ../src/guestfs-actions.pod:1982 ../src/guestfs-actions.pod:2490 ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2695 ../src/guestfs-actions.pod:2730 ../src/guestfs-actions.pod:3774 ../src/guestfs-actions.pod:3789 ../src/guestfs-actions.pod:3814 ../src/guestfs-actions.pod:4003 ../src/guestfs-actions.pod:4017 ../src/guestfs-actions.pod:4030 ../src/guestfs-actions.pod:4044 ../src/guestfs-actions.pod:4059 ../src/guestfs-actions.pod:4095 ../src/guestfs-actions.pod:4167 ../src/guestfs-actions.pod:4187 ../src/guestfs-actions.pod:4204 ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:4250 ../src/guestfs-actions.pod:4285 ../src/guestfs-actions.pod:4304 ../src/guestfs-actions.pod:4323 ../src/guestfs-actions.pod:4358 ../src/guestfs-actions.pod:4370 ../src/guestfs-actions.pod:4406 ../src/guestfs-actions.pod:4422 ../src/guestfs-actions.pod:4435 ../src/guestfs-actions.pod:4450 ../src/guestfs-actions.pod:4467 ../src/guestfs-actions.pod:4560 ../src/guestfs-actions.pod:4580 ../src/guestfs-actions.pod:4593 ../src/guestfs-actions.pod:4644 ../src/guestfs-actions.pod:4662 ../src/guestfs-actions.pod:4680 ../src/guestfs-actions.pod:4696 ../src/guestfs-actions.pod:4710 ../src/guestfs-actions.pod:4724 ../src/guestfs-actions.pod:4741 ../src/guestfs-actions.pod:4756 ../src/guestfs-actions.pod:4783 ../src/guestfs-actions.pod:4846 ../src/guestfs-actions.pod:4919 ../src/guestfs-actions.pod:4950 ../src/guestfs-actions.pod:4969 ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5000 ../src/guestfs-actions.pod:5017 ../src/guestfs-actions.pod:5030 ../src/guestfs-actions.pod:5045 ../src/guestfs-actions.pod:5060 ../src/guestfs-actions.pod:5092 ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5157 ../src/guestfs-actions.pod:5177 ../src/guestfs-actions.pod:5191 ../src/guestfs-actions.pod:5208 ../src/guestfs-actions.pod:5257 ../src/guestfs-actions.pod:5310 ../src/guestfs-actions.pod:5357 ../src/guestfs-actions.pod:5400 ../src/guestfs-actions.pod:5428 ../src/guestfs-actions.pod:5445 ../src/guestfs-actions.pod:5463 ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:5660 ../src/guestfs-actions.pod:5682 ../src/guestfs-actions.pod:5700 ../src/guestfs-actions.pod:5732 ../src/guestfs-actions.pod:5798 ../src/guestfs-actions.pod:5815 ../src/guestfs-actions.pod:5828 ../src/guestfs-actions.pod:5842 ../src/guestfs-actions.pod:6131 ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6169 ../src/guestfs-actions.pod:6183 ../src/guestfs-actions.pod:6195 ../src/guestfs-actions.pod:6209 ../src/guestfs-actions.pod:6221 ../src/guestfs-actions.pod:6235 ../src/guestfs-actions.pod:6251 ../src/guestfs-actions.pod:6272 ../src/guestfs-actions.pod:6291 ../src/guestfs-actions.pod:6310 ../src/guestfs-actions.pod:6340 ../src/guestfs-actions.pod:6358 ../src/guestfs-actions.pod:6381 ../src/guestfs-actions.pod:6399 ../src/guestfs-actions.pod:6418 ../src/guestfs-actions.pod:6439 ../src/guestfs-actions.pod:6458 ../src/guestfs-actions.pod:6475 ../src/guestfs-actions.pod:6494 ../src/guestfs-actions.pod:6522 ../src/guestfs-actions.pod:6546 ../src/guestfs-actions.pod:6565 ../src/guestfs-actions.pod:6581 ../src/guestfs-actions.pod:6605 ../src/guestfs-actions.pod:6624 ../src/guestfs-actions.pod:6639 ../src/guestfs-actions.pod:6658 ../src/guestfs-actions.pod:6702 ../src/guestfs-actions.pod:6732 ../src/guestfs-actions.pod:6765 ../src/guestfs-actions.pod:6880 ../src/guestfs-actions.pod:7001 ../src/guestfs-actions.pod:7013 ../src/guestfs-actions.pod:7026 ../src/guestfs-actions.pod:7039 ../src/guestfs-actions.pod:7061 ../src/guestfs-actions.pod:7074 ../src/guestfs-actions.pod:7087 ../src/guestfs-actions.pod:7100 ../src/guestfs-actions.pod:7115 ../src/guestfs-actions.pod:7174 ../src/guestfs-actions.pod:7191 ../src/guestfs-actions.pod:7207 ../src/guestfs-actions.pod:7223 ../src/guestfs-actions.pod:7240 ../src/guestfs-actions.pod:7253 ../src/guestfs-actions.pod:7273 ../src/guestfs-actions.pod:7309 ../src/guestfs-actions.pod:7323 ../src/guestfs-actions.pod:7364 ../src/guestfs-actions.pod:7377 ../src/guestfs-actions.pod:7395 ../src/guestfs-actions.pod:7429 ../src/guestfs-actions.pod:7465 ../src/guestfs-actions.pod:7581 ../src/guestfs-actions.pod:7596 ../src/guestfs-actions.pod:7610 ../src/guestfs-actions.pod:7665 ../src/guestfs-actions.pod:7678 ../src/guestfs-actions.pod:7723 ../src/guestfs-actions.pod:7763 ../src/guestfs-actions.pod:7819 ../src/guestfs-actions.pod:7839 ../src/guestfs-actions.pod:7872 ../src/guestfs-actions.pod:7936 ../src/guestfs-actions.pod:7959 ../src/guestfs-actions.pod:7988
22307 msgid "This function returns 0 on success or -1 on error."
22311 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142 ../src/guestfs-actions.pod:1281 ../src/guestfs-actions.pod:2096 ../src/guestfs-actions.pod:2194 ../src/guestfs-actions.pod:2319 ../src/guestfs-actions.pod:3776 ../src/guestfs-actions.pod:3796 ../src/guestfs-actions.pod:5094 ../src/guestfs-actions.pod:6360 ../src/guestfs-actions.pod:6477 ../src/guestfs-actions.pod:6626 ../src/guestfs-actions.pod:7117 ../src/guestfs-actions.pod:7242 ../src/guestfs-actions.pod:7765
22312 msgid "(Added in 0.3)"
22316 #: ../src/guestfs-actions.pod:41
22317 msgid "guestfs_add_domain"
22321 #: ../src/guestfs-actions.pod:43
22325 " guestfs_add_domain (guestfs_h *g,\n"
22326 " const char *dom,\n"
22332 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151 ../src/guestfs-actions.pod:837 ../src/guestfs-actions.pod:1161 ../src/guestfs-actions.pod:1213 ../src/guestfs-actions.pod:2979 ../src/guestfs-actions.pod:4795 ../src/guestfs-actions.pod:5104 ../src/guestfs-actions.pod:5321
22334 "You may supply a list of optional arguments to this call. Use zero or more "
22335 "of the following pairs of parameters, and terminate the list with C<-1> on "
22336 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
22340 #: ../src/guestfs-actions.pod:53
22343 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
22344 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
22345 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
22346 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
22347 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
22352 #: ../src/guestfs-actions.pod:59
22354 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
22355 "It works by connecting to libvirt, requesting the domain and domain XML from "
22356 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
22361 #: ../src/guestfs-actions.pod:94
22363 "The other optional parameters are passed directly through to "
22364 "C<guestfs_add_drive_opts>."
22368 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350 ../src/guestfs-actions.pod:520 ../src/guestfs-actions.pod:698 ../src/guestfs-actions.pod:729 ../src/guestfs-actions.pod:747 ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1496 ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:2055 ../src/guestfs-actions.pod:2166 ../src/guestfs-actions.pod:2217 ../src/guestfs-actions.pod:2269 ../src/guestfs-actions.pod:2283 ../src/guestfs-actions.pod:2306 ../src/guestfs-actions.pod:2621 ../src/guestfs-actions.pod:3097 ../src/guestfs-actions.pod:3115 ../src/guestfs-actions.pod:5280 ../src/guestfs-actions.pod:5500 ../src/guestfs-actions.pod:5912 ../src/guestfs-actions.pod:5938 ../src/guestfs-actions.pod:7350 ../src/guestfs-actions.pod:7776 ../src/guestfs-actions.pod:7789 ../src/guestfs-actions.pod:7802
22369 msgid "On error this function returns -1."
22373 #: ../src/guestfs-actions.pod:99
22374 msgid "(Added in 1.7.4)"
22378 #: ../src/guestfs-actions.pod:101
22379 msgid "guestfs_add_domain_va"
22383 #: ../src/guestfs-actions.pod:103
22387 " guestfs_add_domain_va (guestfs_h *g,\n"
22388 " const char *dom,\n"
22389 " va_list args);\n"
22394 #: ../src/guestfs-actions.pod:108
22395 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
22399 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121 ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225 ../src/guestfs-actions.pod:876 ../src/guestfs-actions.pod:887 ../src/guestfs-actions.pod:1189 ../src/guestfs-actions.pod:1202 ../src/guestfs-actions.pod:1248 ../src/guestfs-actions.pod:1261 ../src/guestfs-actions.pod:3063 ../src/guestfs-actions.pod:3075 ../src/guestfs-actions.pod:4860 ../src/guestfs-actions.pod:4872 ../src/guestfs-actions.pod:5132 ../src/guestfs-actions.pod:5144 ../src/guestfs-actions.pod:5370 ../src/guestfs-actions.pod:5381
22400 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
22404 #: ../src/guestfs-actions.pod:112
22405 msgid "guestfs_add_domain_argv"
22409 #: ../src/guestfs-actions.pod:114
22413 " guestfs_add_domain_argv (guestfs_h *g,\n"
22414 " const char *dom,\n"
22415 " const struct guestfs_add_domain_argv *optargs);\n"
22420 #: ../src/guestfs-actions.pod:119
22421 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
22425 #: ../src/guestfs-actions.pod:123
22426 msgid "guestfs_add_drive"
22430 #: ../src/guestfs-actions.pod:125
22434 " guestfs_add_drive (guestfs_h *g,\n"
22435 " const char *filename);\n"
22440 #: ../src/guestfs-actions.pod:129
22442 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
22443 "optional parameters, so the disk is added writable, with the format being "
22444 "detected automatically."
22448 #: ../src/guestfs-actions.pod:133
22450 "Automatic detection of the format opens you up to a potential security hole "
22451 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
22452 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
22453 "you should think about replacing calls to this function with calls to "
22454 "C<guestfs_add_drive_opts>, and specifying the format."
22458 #: ../src/guestfs-actions.pod:144
22459 msgid "guestfs_add_drive_opts"
22463 #: ../src/guestfs-actions.pod:146
22467 " guestfs_add_drive_opts (guestfs_h *g,\n"
22468 " const char *filename,\n"
22474 #: ../src/guestfs-actions.pod:156
22477 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
22478 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
22479 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
22484 #: ../src/guestfs-actions.pod:185
22486 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
22487 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
22488 "Possible formats include C<raw> and C<qcow2>."
22492 #: ../src/guestfs-actions.pod:196
22494 "This rarely-used option lets you emulate the behaviour of the deprecated "
22495 "C<guestfs_add_drive_with_if> call (q.v.)"
22499 #: ../src/guestfs-actions.pod:203
22500 msgid "(Added in 1.5.23)"
22504 #: ../src/guestfs-actions.pod:205
22505 msgid "guestfs_add_drive_opts_va"
22509 #: ../src/guestfs-actions.pod:207
22513 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
22514 " const char *filename,\n"
22515 " va_list args);\n"
22520 #: ../src/guestfs-actions.pod:212
22521 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
22525 #: ../src/guestfs-actions.pod:216
22526 msgid "guestfs_add_drive_opts_argv"
22530 #: ../src/guestfs-actions.pod:218
22534 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
22535 " const char *filename,\n"
22536 " const struct guestfs_add_drive_opts_argv "
22542 #: ../src/guestfs-actions.pod:223
22543 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
22547 #: ../src/guestfs-actions.pod:227
22548 msgid "guestfs_add_drive_ro"
22552 #: ../src/guestfs-actions.pod:229
22556 " guestfs_add_drive_ro (guestfs_h *g,\n"
22557 " const char *filename);\n"
22562 #: ../src/guestfs-actions.pod:233
22564 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
22565 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
22566 "disk is added read-only, with the format being detected automatically."
22570 #: ../src/guestfs-actions.pod:240
22571 msgid "(Added in 1.0.38)"
22575 #: ../src/guestfs-actions.pod:242
22576 msgid "guestfs_add_drive_ro_with_if"
22580 #: ../src/guestfs-actions.pod:244
22584 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
22585 " const char *filename,\n"
22586 " const char *iface);\n"
22591 #: ../src/guestfs-actions.pod:256
22593 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
22594 "QEMU interface emulation to use at run time."
22598 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282 ../src/guestfs-actions.pod:2580
22599 msgid "(Added in 1.0.84)"
22603 #: ../src/guestfs-actions.pod:263
22604 msgid "guestfs_add_drive_with_if"
22608 #: ../src/guestfs-actions.pod:265
22612 " guestfs_add_drive_with_if (guestfs_h *g,\n"
22613 " const char *filename,\n"
22614 " const char *iface);\n"
22619 #: ../src/guestfs-actions.pod:277
22621 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
22622 "QEMU interface emulation to use at run time."
22626 #: ../src/guestfs-actions.pod:284
22627 msgid "guestfs_aug_clear"
22631 #: ../src/guestfs-actions.pod:286
22635 " guestfs_aug_clear (guestfs_h *g,\n"
22636 " const char *augpath);\n"
22641 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2308
22642 msgid "(Added in 1.3.4)"
22646 #: ../src/guestfs-actions.pod:297
22647 msgid "guestfs_aug_close"
22651 #: ../src/guestfs-actions.pod:299
22655 " guestfs_aug_close (guestfs_h *g);\n"
22660 #: ../src/guestfs-actions.pod:302
22662 "Close the current Augeas handle and free up any resources used by it. After "
22663 "calling this, you have to call C<guestfs_aug_init> again before you can use "
22664 "any other Augeas functions."
22668 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334 ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366 ../src/guestfs-actions.pod:429 ../src/guestfs-actions.pod:449 ../src/guestfs-actions.pod:463 ../src/guestfs-actions.pod:494 ../src/guestfs-actions.pod:508 ../src/guestfs-actions.pod:522 ../src/guestfs-actions.pod:536 ../src/guestfs-actions.pod:554 ../src/guestfs-actions.pod:5989
22669 msgid "(Added in 0.7)"
22673 #: ../src/guestfs-actions.pod:311
22674 msgid "guestfs_aug_defnode"
22678 #: ../src/guestfs-actions.pod:313
22681 " struct guestfs_int_bool *\n"
22682 " guestfs_aug_defnode (guestfs_h *g,\n"
22683 " const char *name,\n"
22684 " const char *expr,\n"
22685 " const char *val);\n"
22690 #: ../src/guestfs-actions.pod:322
22692 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
22693 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
22694 "containing that single node."
22698 #: ../src/guestfs-actions.pod:330
22700 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
22701 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
22705 #: ../src/guestfs-actions.pod:336
22706 msgid "guestfs_aug_defvar"
22710 #: ../src/guestfs-actions.pod:338
22714 " guestfs_aug_defvar (guestfs_h *g,\n"
22715 " const char *name,\n"
22716 " const char *expr);\n"
22721 #: ../src/guestfs-actions.pod:354
22722 msgid "guestfs_aug_get"
22726 #: ../src/guestfs-actions.pod:356
22730 " guestfs_aug_get (guestfs_h *g,\n"
22731 " const char *augpath);\n"
22736 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:927 ../src/guestfs-actions.pod:945 ../src/guestfs-actions.pod:1005 ../src/guestfs-actions.pod:1021 ../src/guestfs-actions.pod:1124 ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1401 ../src/guestfs-actions.pod:1535 ../src/guestfs-actions.pod:1723 ../src/guestfs-actions.pod:1835 ../src/guestfs-actions.pod:1998 ../src/guestfs-actions.pod:2015 ../src/guestfs-actions.pod:2082 ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:2146 ../src/guestfs-actions.pod:2331 ../src/guestfs-actions.pod:2545 ../src/guestfs-actions.pod:2749 ../src/guestfs-actions.pod:2843 ../src/guestfs-actions.pod:2947 ../src/guestfs-actions.pod:2966 ../src/guestfs-actions.pod:3180 ../src/guestfs-actions.pod:3208 ../src/guestfs-actions.pod:3229 ../src/guestfs-actions.pod:3263 ../src/guestfs-actions.pod:3322 ../src/guestfs-actions.pod:3342 ../src/guestfs-actions.pod:3362 ../src/guestfs-actions.pod:3989 ../src/guestfs-actions.pod:4342 ../src/guestfs-actions.pod:4512 ../src/guestfs-actions.pod:4622 ../src/guestfs-actions.pod:5518 ../src/guestfs-actions.pod:5717 ../src/guestfs-actions.pod:5887 ../src/guestfs-actions.pod:6065 ../src/guestfs-actions.pod:6114 ../src/guestfs-actions.pod:6786 ../src/guestfs-actions.pod:6802 ../src/guestfs-actions.pod:6826 ../src/guestfs-actions.pod:6850 ../src/guestfs-actions.pod:7524 ../src/guestfs-actions.pod:7543 ../src/guestfs-actions.pod:7561 ../src/guestfs-actions.pod:7735 ../src/guestfs-actions.pod:8052
22738 "This function returns a string, or NULL on error. I<The caller must free "
22739 "the returned string after use>."
22743 #: ../src/guestfs-actions.pod:368
22744 msgid "guestfs_aug_init"
22748 #: ../src/guestfs-actions.pod:370
22752 " guestfs_aug_init (guestfs_h *g,\n"
22753 " const char *root,\n"
22759 #: ../src/guestfs-actions.pod:379
22760 msgid "You must call this before using any other C<guestfs_aug_*> commands."
22764 #: ../src/guestfs-actions.pod:404
22766 "This option is only useful when debugging Augeas lenses. Use of this option "
22767 "may require additional memory for the libguestfs appliance. You may need to "
22768 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
22769 "C<guestfs_set_memsize>."
22773 #: ../src/guestfs-actions.pod:419
22774 msgid "Do not load the tree in C<guestfs_aug_init>."
22778 #: ../src/guestfs-actions.pod:423
22779 msgid "To close the handle, you can call C<guestfs_aug_close>."
22783 #: ../src/guestfs-actions.pod:431
22784 msgid "guestfs_aug_insert"
22788 #: ../src/guestfs-actions.pod:433
22792 " guestfs_aug_insert (guestfs_h *g,\n"
22793 " const char *augpath,\n"
22794 " const char *label,\n"
22800 #: ../src/guestfs-actions.pod:451
22801 msgid "guestfs_aug_load"
22805 #: ../src/guestfs-actions.pod:453
22809 " guestfs_aug_load (guestfs_h *g);\n"
22814 #: ../src/guestfs-actions.pod:465
22815 msgid "guestfs_aug_ls"
22819 #: ../src/guestfs-actions.pod:467
22823 " guestfs_aug_ls (guestfs_h *g,\n"
22824 " const char *augpath);\n"
22829 #: ../src/guestfs-actions.pod:471
22831 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
22832 "sorting the resulting nodes into alphabetical order."
22836 #: ../src/guestfs-actions.pod:474 ../src/guestfs-actions.pod:490 ../src/guestfs-actions.pod:636 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1550 ../src/guestfs-actions.pod:1569 ../src/guestfs-actions.pod:1672 ../src/guestfs-actions.pod:1691 ../src/guestfs-actions.pod:1937 ../src/guestfs-actions.pod:2403 ../src/guestfs-actions.pod:2419 ../src/guestfs-actions.pod:2438 ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2527 ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2647 ../src/guestfs-actions.pod:2908 ../src/guestfs-actions.pod:3282 ../src/guestfs-actions.pod:3558 ../src/guestfs-actions.pod:3872 ../src/guestfs-actions.pod:3889 ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3971 ../src/guestfs-actions.pod:4076 ../src/guestfs-actions.pod:4484 ../src/guestfs-actions.pod:5241 ../src/guestfs-actions.pod:5859 ../src/guestfs-actions.pod:5985 ../src/guestfs-actions.pod:6099 ../src/guestfs-actions.pod:6866 ../src/guestfs-actions.pod:6927 ../src/guestfs-actions.pod:6982 ../src/guestfs-actions.pod:7128 ../src/guestfs-actions.pod:7152 ../src/guestfs-actions.pod:7628 ../src/guestfs-actions.pod:7648 ../src/guestfs-actions.pod:7695 ../src/guestfs-actions.pod:7889 ../src/guestfs-actions.pod:7908 ../src/guestfs-actions.pod:8002 ../src/guestfs-actions.pod:8021 ../src/guestfs-actions.pod:8067 ../src/guestfs-actions.pod:8086
22838 "This function returns a NULL-terminated array of strings (like "
22839 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
22840 "strings and the array after use>."
22844 #: ../src/guestfs-actions.pod:478 ../src/guestfs-actions.pod:1068 ../src/guestfs-actions.pod:1086 ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:3636 ../src/guestfs-actions.pod:3667 ../src/guestfs-actions.pod:4325 ../src/guestfs-actions.pod:4375 ../src/guestfs-actions.pod:4562 ../src/guestfs-actions.pod:4595 ../src/guestfs-actions.pod:4758 ../src/guestfs-actions.pod:5245 ../src/guestfs-actions.pod:5800 ../src/guestfs-actions.pod:6197 ../src/guestfs-actions.pod:6211 ../src/guestfs-actions.pod:6223 ../src/guestfs-actions.pod:6707 ../src/guestfs-actions.pod:7366 ../src/guestfs-actions.pod:7379 ../src/guestfs-actions.pod:7612 ../src/guestfs-actions.pod:7877
22845 msgid "(Added in 0.8)"
22849 #: ../src/guestfs-actions.pod:480
22850 msgid "guestfs_aug_match"
22854 #: ../src/guestfs-actions.pod:482
22858 " guestfs_aug_match (guestfs_h *g,\n"
22859 " const char *augpath);\n"
22864 #: ../src/guestfs-actions.pod:496
22865 msgid "guestfs_aug_mv"
22869 #: ../src/guestfs-actions.pod:498
22873 " guestfs_aug_mv (guestfs_h *g,\n"
22874 " const char *src,\n"
22875 " const char *dest);\n"
22880 #: ../src/guestfs-actions.pod:510
22881 msgid "guestfs_aug_rm"
22885 #: ../src/guestfs-actions.pod:512
22889 " guestfs_aug_rm (guestfs_h *g,\n"
22890 " const char *augpath);\n"
22895 #: ../src/guestfs-actions.pod:524
22896 msgid "guestfs_aug_save"
22900 #: ../src/guestfs-actions.pod:526
22904 " guestfs_aug_save (guestfs_h *g);\n"
22909 #: ../src/guestfs-actions.pod:531
22911 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
22916 #: ../src/guestfs-actions.pod:538
22917 msgid "guestfs_aug_set"
22921 #: ../src/guestfs-actions.pod:540
22925 " guestfs_aug_set (guestfs_h *g,\n"
22926 " const char *augpath,\n"
22927 " const char *val);\n"
22932 #: ../src/guestfs-actions.pod:547
22934 "In the Augeas API, it is possible to clear a node by setting the value to "
22935 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
22936 "this call. Instead you must use the C<guestfs_aug_clear> call."
22940 #: ../src/guestfs-actions.pod:556
22941 msgid "guestfs_available"
22945 #: ../src/guestfs-actions.pod:558
22949 " guestfs_available (guestfs_h *g,\n"
22950 " char *const *groups);\n"
22955 #: ../src/guestfs-actions.pod:566
22957 "The libguestfs groups, and the functions that those groups correspond to, "
22958 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
22959 "runtime by calling C<guestfs_available_all_groups>."
22963 #: ../src/guestfs-actions.pod:590
22964 msgid "You must call C<guestfs_launch> before calling this function."
22968 #: ../src/guestfs-actions.pod:612
22970 "This call was added in version C<1.0.80>. In previous versions of "
22971 "libguestfs all you could do would be to speculatively execute a command to "
22972 "find out if the daemon implemented it. See also C<guestfs_version>."
22976 #: ../src/guestfs-actions.pod:621 ../src/guestfs-actions.pod:1352
22977 msgid "(Added in 1.0.80)"
22981 #: ../src/guestfs-actions.pod:623
22982 msgid "guestfs_available_all_groups"
22986 #: ../src/guestfs-actions.pod:625
22990 " guestfs_available_all_groups (guestfs_h *g);\n"
22995 #: ../src/guestfs-actions.pod:628
22997 "This command returns a list of all optional groups that this daemon knows "
22998 "about. Note this returns both supported and unsupported groups. To find "
22999 "out which ones the daemon can actually support you have to call "
23000 "C<guestfs_available> on each member of the returned list."
23004 #: ../src/guestfs-actions.pod:634
23005 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
23009 #: ../src/guestfs-actions.pod:640
23010 msgid "(Added in 1.3.15)"
23014 #: ../src/guestfs-actions.pod:642
23015 msgid "guestfs_base64_in"
23019 #: ../src/guestfs-actions.pod:644
23023 " guestfs_base64_in (guestfs_h *g,\n"
23024 " const char *base64file,\n"
23025 " const char *filename);\n"
23030 #: ../src/guestfs-actions.pod:654 ../src/guestfs-actions.pod:668
23031 msgid "(Added in 1.3.5)"
23035 #: ../src/guestfs-actions.pod:656
23036 msgid "guestfs_base64_out"
23040 #: ../src/guestfs-actions.pod:658
23044 " guestfs_base64_out (guestfs_h *g,\n"
23045 " const char *filename,\n"
23046 " const char *base64file);\n"
23051 #: ../src/guestfs-actions.pod:670
23052 msgid "guestfs_blockdev_flushbufs"
23056 #: ../src/guestfs-actions.pod:672
23060 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
23061 " const char *device);\n"
23066 #: ../src/guestfs-actions.pod:683 ../src/guestfs-actions.pod:700 ../src/guestfs-actions.pod:715 ../src/guestfs-actions.pod:731 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:768 ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800 ../src/guestfs-actions.pod:814 ../src/guestfs-actions.pod:828
23067 msgid "(Added in 0.9.3)"
23071 #: ../src/guestfs-actions.pod:685
23072 msgid "guestfs_blockdev_getbsz"
23076 #: ../src/guestfs-actions.pod:687
23080 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
23081 " const char *device);\n"
23086 #: ../src/guestfs-actions.pod:702
23087 msgid "guestfs_blockdev_getro"
23091 #: ../src/guestfs-actions.pod:704
23095 " guestfs_blockdev_getro (guestfs_h *g,\n"
23096 " const char *device);\n"
23101 #: ../src/guestfs-actions.pod:713 ../src/guestfs-actions.pod:1590 ../src/guestfs-actions.pod:1605 ../src/guestfs-actions.pod:2094 ../src/guestfs-actions.pod:2105 ../src/guestfs-actions.pod:2177 ../src/guestfs-actions.pod:2203 ../src/guestfs-actions.pod:2243 ../src/guestfs-actions.pod:2258 ../src/guestfs-actions.pod:2294 ../src/guestfs-actions.pod:2317 ../src/guestfs-actions.pod:3379 ../src/guestfs-actions.pod:3395 ../src/guestfs-actions.pod:3413 ../src/guestfs-actions.pod:3575 ../src/guestfs-actions.pod:3589 ../src/guestfs-actions.pod:3604 ../src/guestfs-actions.pod:3618 ../src/guestfs-actions.pod:3634 ../src/guestfs-actions.pod:3649 ../src/guestfs-actions.pod:3665 ../src/guestfs-actions.pod:3679 ../src/guestfs-actions.pod:3692 ../src/guestfs-actions.pod:3706 ../src/guestfs-actions.pod:3721 ../src/guestfs-actions.pod:3736 ../src/guestfs-actions.pod:3749 ../src/guestfs-actions.pod:3763 ../src/guestfs-actions.pod:5482
23102 msgid "This function returns a C truth value on success or -1 on error."
23106 #: ../src/guestfs-actions.pod:717
23107 msgid "guestfs_blockdev_getsize64"
23111 #: ../src/guestfs-actions.pod:719
23115 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
23116 " const char *device);\n"
23121 #: ../src/guestfs-actions.pod:725
23122 msgid "See also C<guestfs_blockdev_getsz>."
23126 #: ../src/guestfs-actions.pod:733
23127 msgid "guestfs_blockdev_getss"
23131 #: ../src/guestfs-actions.pod:735
23135 " guestfs_blockdev_getss (guestfs_h *g,\n"
23136 " const char *device);\n"
23141 #: ../src/guestfs-actions.pod:742
23143 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
23148 #: ../src/guestfs-actions.pod:751
23149 msgid "guestfs_blockdev_getsz"
23153 #: ../src/guestfs-actions.pod:753
23157 " guestfs_blockdev_getsz (guestfs_h *g,\n"
23158 " const char *device);\n"
23163 #: ../src/guestfs-actions.pod:760
23165 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
23166 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
23170 #: ../src/guestfs-actions.pod:770
23171 msgid "guestfs_blockdev_rereadpt"
23175 #: ../src/guestfs-actions.pod:772
23179 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
23180 " const char *device);\n"
23185 #: ../src/guestfs-actions.pod:784
23186 msgid "guestfs_blockdev_setbsz"
23190 #: ../src/guestfs-actions.pod:786
23194 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
23195 " const char *device,\n"
23196 " int blocksize);\n"
23201 #: ../src/guestfs-actions.pod:802
23202 msgid "guestfs_blockdev_setro"
23206 #: ../src/guestfs-actions.pod:804
23210 " guestfs_blockdev_setro (guestfs_h *g,\n"
23211 " const char *device);\n"
23216 #: ../src/guestfs-actions.pod:816
23217 msgid "guestfs_blockdev_setrw"
23221 #: ../src/guestfs-actions.pod:818
23225 " guestfs_blockdev_setrw (guestfs_h *g,\n"
23226 " const char *device);\n"
23231 #: ../src/guestfs-actions.pod:830
23232 msgid "guestfs_btrfs_filesystem_resize"
23236 #: ../src/guestfs-actions.pod:832
23240 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
23241 " const char *mountpoint,\n"
23247 #: ../src/guestfs-actions.pod:842
23250 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
23255 #: ../src/guestfs-actions.pod:865
23256 msgid "(Added in 1.11.17)"
23260 #: ../src/guestfs-actions.pod:867
23261 msgid "guestfs_btrfs_filesystem_resize_va"
23265 #: ../src/guestfs-actions.pod:869
23269 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
23270 " const char *mountpoint,\n"
23271 " va_list args);\n"
23276 #: ../src/guestfs-actions.pod:874
23277 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
23281 #: ../src/guestfs-actions.pod:878
23282 msgid "guestfs_btrfs_filesystem_resize_argv"
23286 #: ../src/guestfs-actions.pod:880
23290 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
23291 " const char *mountpoint,\n"
23293 "guestfs_btrfs_filesystem_resize_argv *optargs);\n"
23298 #: ../src/guestfs-actions.pod:885
23299 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
23303 #: ../src/guestfs-actions.pod:889
23304 msgid "guestfs_case_sensitive_path"
23308 #: ../src/guestfs-actions.pod:891
23312 " guestfs_case_sensitive_path (guestfs_h *g,\n"
23313 " const char *path);\n"
23318 #: ../src/guestfs-actions.pod:917
23320 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
23321 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
23322 "how the directories were originally created under Windows)."
23326 #: ../src/guestfs-actions.pod:925
23327 msgid "See also C<guestfs_realpath>."
23331 #: ../src/guestfs-actions.pod:930 ../src/guestfs-actions.pod:7546
23332 msgid "(Added in 1.0.75)"
23336 #: ../src/guestfs-actions.pod:932
23337 msgid "guestfs_cat"
23341 #: ../src/guestfs-actions.pod:934
23345 " guestfs_cat (guestfs_h *g,\n"
23346 " const char *path);\n"
23351 #: ../src/guestfs-actions.pod:940
23353 "Note that this function cannot correctly handle binary files (specifically, "
23354 "files containing C<\\0> character which is treated as end of string). For "
23355 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
23356 "functions which have a more complex interface."
23360 #: ../src/guestfs-actions.pod:951 ../src/guestfs-actions.pod:3893 ../src/guestfs-actions.pod:3975 ../src/guestfs-actions.pod:3992 ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4488 ../src/guestfs-actions.pod:4502 ../src/guestfs-actions.pod:5863 ../src/guestfs-actions.pod:5877 ../src/guestfs-actions.pod:7699 ../src/guestfs-actions.pod:7713
23361 msgid "(Added in 0.4)"
23365 #: ../src/guestfs-actions.pod:953
23366 msgid "guestfs_checksum"
23370 #: ../src/guestfs-actions.pod:955
23374 " guestfs_checksum (guestfs_h *g,\n"
23375 " const char *csumtype,\n"
23376 " const char *path);\n"
23381 #: ../src/guestfs-actions.pod:1001
23382 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
23386 #: ../src/guestfs-actions.pod:1003
23387 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
23391 #: ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1427 ../src/guestfs-actions.pod:2285 ../src/guestfs-actions.pod:3591 ../src/guestfs-actions.pod:3620 ../src/guestfs-actions.pod:3681 ../src/guestfs-actions.pod:3708 ../src/guestfs-actions.pod:7402
23392 msgid "(Added in 1.0.2)"
23396 #: ../src/guestfs-actions.pod:1010
23397 msgid "guestfs_checksum_device"
23401 #: ../src/guestfs-actions.pod:1012
23405 " guestfs_checksum_device (guestfs_h *g,\n"
23406 " const char *csumtype,\n"
23407 " const char *device);\n"
23412 #: ../src/guestfs-actions.pod:1017
23414 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
23415 "device named C<device>. For the types of checksums supported see the "
23416 "C<guestfs_checksum> command."
23420 #: ../src/guestfs-actions.pod:1024 ../src/guestfs-actions.pod:5312 ../src/guestfs-actions.pod:5447 ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:5502 ../src/guestfs-actions.pod:5684 ../src/guestfs-actions.pod:7311 ../src/guestfs-actions.pod:7325 ../src/guestfs-actions.pod:7725
23421 msgid "(Added in 1.3.2)"
23425 #: ../src/guestfs-actions.pod:1026
23426 msgid "guestfs_checksums_out"
23430 #: ../src/guestfs-actions.pod:1028
23434 " guestfs_checksums_out (guestfs_h *g,\n"
23435 " const char *csumtype,\n"
23436 " const char *directory,\n"
23437 " const char *sumsfile);\n"
23442 #: ../src/guestfs-actions.pod:1048
23443 msgid "(Added in 1.3.7)"
23447 #: ../src/guestfs-actions.pod:1050
23448 msgid "guestfs_chmod"
23452 #: ../src/guestfs-actions.pod:1052
23456 " guestfs_chmod (guestfs_h *g,\n"
23458 " const char *path);\n"
23463 #: ../src/guestfs-actions.pod:1070
23464 msgid "guestfs_chown"
23468 #: ../src/guestfs-actions.pod:1072
23472 " guestfs_chown (guestfs_h *g,\n"
23475 " const char *path);\n"
23480 #: ../src/guestfs-actions.pod:1088
23481 msgid "guestfs_command"
23485 #: ../src/guestfs-actions.pod:1090
23489 " guestfs_command (guestfs_h *g,\n"
23490 " char *const *arguments);\n"
23495 #: ../src/guestfs-actions.pod:1099
23497 "The single parameter is an argv-style list of arguments. The first element "
23498 "is the name of the program to run. Subsequent elements are parameters. The "
23499 "list must be non-empty (ie. must contain a program name). Note that the "
23500 "command runs directly, and is I<not> invoked via the shell (see "
23505 #: ../src/guestfs-actions.pod:1130 ../src/guestfs-actions.pod:1150 ../src/guestfs-actions.pod:1726
23506 msgid "(Added in 0.9.1)"
23510 #: ../src/guestfs-actions.pod:1132
23511 msgid "guestfs_command_lines"
23515 #: ../src/guestfs-actions.pod:1134
23519 " guestfs_command_lines (guestfs_h *g,\n"
23520 " char *const *arguments);\n"
23525 #: ../src/guestfs-actions.pod:1138
23527 "This is the same as C<guestfs_command>, but splits the result into a list of "
23532 #: ../src/guestfs-actions.pod:1141
23533 msgid "See also: C<guestfs_sh_lines>"
23537 #: ../src/guestfs-actions.pod:1152
23538 msgid "guestfs_compress_device_out"
23542 #: ../src/guestfs-actions.pod:1154
23546 " guestfs_compress_device_out (guestfs_h *g,\n"
23547 " const char *ctype,\n"
23548 " const char *device,\n"
23549 " const char *zdevice,\n"
23555 #: ../src/guestfs-actions.pod:1166
23558 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
23563 #: ../src/guestfs-actions.pod:1171
23565 "The C<ctype> and optional C<level> parameters have the same meaning as in "
23566 "C<guestfs_compress_out>."
23570 #: ../src/guestfs-actions.pod:1176 ../src/guestfs-actions.pod:1235 ../src/guestfs-actions.pod:2271 ../src/guestfs-actions.pod:6583
23571 msgid "(Added in 1.13.15)"
23575 #: ../src/guestfs-actions.pod:1178
23576 msgid "guestfs_compress_device_out_va"
23580 #: ../src/guestfs-actions.pod:1180
23584 " guestfs_compress_device_out_va (guestfs_h *g,\n"
23585 " const char *ctype,\n"
23586 " const char *device,\n"
23587 " const char *zdevice,\n"
23588 " va_list args);\n"
23593 #: ../src/guestfs-actions.pod:1187
23594 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
23598 #: ../src/guestfs-actions.pod:1191
23599 msgid "guestfs_compress_device_out_argv"
23603 #: ../src/guestfs-actions.pod:1193
23607 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
23608 " const char *ctype,\n"
23609 " const char *device,\n"
23610 " const char *zdevice,\n"
23612 "guestfs_compress_device_out_argv *optargs);\n"
23617 #: ../src/guestfs-actions.pod:1200
23618 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
23622 #: ../src/guestfs-actions.pod:1204
23623 msgid "guestfs_compress_out"
23627 #: ../src/guestfs-actions.pod:1206
23631 " guestfs_compress_out (guestfs_h *g,\n"
23632 " const char *ctype,\n"
23633 " const char *file,\n"
23634 " const char *zfile,\n"
23640 #: ../src/guestfs-actions.pod:1218
23643 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
23648 #: ../src/guestfs-actions.pod:1237
23649 msgid "guestfs_compress_out_va"
23653 #: ../src/guestfs-actions.pod:1239
23657 " guestfs_compress_out_va (guestfs_h *g,\n"
23658 " const char *ctype,\n"
23659 " const char *file,\n"
23660 " const char *zfile,\n"
23661 " va_list args);\n"
23666 #: ../src/guestfs-actions.pod:1246
23667 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
23671 #: ../src/guestfs-actions.pod:1250
23672 msgid "guestfs_compress_out_argv"
23676 #: ../src/guestfs-actions.pod:1252
23680 " guestfs_compress_out_argv (guestfs_h *g,\n"
23681 " const char *ctype,\n"
23682 " const char *file,\n"
23683 " const char *zfile,\n"
23684 " const struct guestfs_compress_out_argv "
23690 #: ../src/guestfs-actions.pod:1259
23691 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
23695 #: ../src/guestfs-actions.pod:1263
23696 msgid "guestfs_config"
23700 #: ../src/guestfs-actions.pod:1265
23704 " guestfs_config (guestfs_h *g,\n"
23705 " const char *qemuparam,\n"
23706 " const char *qemuvalue);\n"
23711 #: ../src/guestfs-actions.pod:1283
23712 msgid "guestfs_copy_size"
23716 #: ../src/guestfs-actions.pod:1285
23720 " guestfs_copy_size (guestfs_h *g,\n"
23721 " const char *src,\n"
23722 " const char *dest,\n"
23723 " int64_t size);\n"
23728 #: ../src/guestfs-actions.pod:1299 ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1453 ../src/guestfs-actions.pod:1498 ../src/guestfs-actions.pod:1875 ../src/guestfs-actions.pod:1897 ../src/guestfs-actions.pod:3791 ../src/guestfs-actions.pod:7397 ../src/guestfs-actions.pod:7431 ../src/guestfs-actions.pod:7938 ../src/guestfs-actions.pod:7961
23730 "This long-running command can generate progress notification messages so "
23731 "that the caller can display a progress bar or indicator. To receive these "
23732 "messages, the caller must register a progress event callback. See "
23733 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
23737 #: ../src/guestfs-actions.pod:1304 ../src/guestfs-actions.pod:4515 ../src/guestfs-actions.pod:5890 ../src/guestfs-actions.pod:7632 ../src/guestfs-actions.pod:7652 ../src/guestfs-actions.pod:7738
23738 msgid "(Added in 1.0.87)"
23742 #: ../src/guestfs-actions.pod:1306
23747 #: ../src/guestfs-actions.pod:1308
23751 " guestfs_cp (guestfs_h *g,\n"
23752 " const char *src,\n"
23753 " const char *dest);\n"
23758 #: ../src/guestfs-actions.pod:1318 ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:1404 ../src/guestfs-actions.pod:1478 ../src/guestfs-actions.pod:1592 ../src/guestfs-actions.pod:5259 ../src/guestfs-actions.pod:5734
23759 msgid "(Added in 1.0.18)"
23763 #: ../src/guestfs-actions.pod:1320
23764 msgid "guestfs_cp_a"
23768 #: ../src/guestfs-actions.pod:1322
23772 " guestfs_cp_a (guestfs_h *g,\n"
23773 " const char *src,\n"
23774 " const char *dest);\n"
23779 #: ../src/guestfs-actions.pod:1334
23784 #: ../src/guestfs-actions.pod:1336
23788 " guestfs_dd (guestfs_h *g,\n"
23789 " const char *src,\n"
23790 " const char *dest);\n"
23795 #: ../src/guestfs-actions.pod:1346
23797 "If the destination is a device, it must be as large or larger than the "
23798 "source file or device, otherwise the copy will fail. This command cannot do "
23799 "partial copies (see C<guestfs_copy_size>)."
23803 #: ../src/guestfs-actions.pod:1354
23808 #: ../src/guestfs-actions.pod:1356
23812 " guestfs_df (guestfs_h *g);\n"
23817 #: ../src/guestfs-actions.pod:1361 ../src/guestfs-actions.pod:1378
23819 "This command is mostly useful for interactive sessions. It is I<not> "
23820 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
23825 #: ../src/guestfs-actions.pod:1368 ../src/guestfs-actions.pod:1385 ../src/guestfs-actions.pod:1503 ../src/guestfs-actions.pod:2510 ../src/guestfs-actions.pod:2534 ../src/guestfs-actions.pod:2602 ../src/guestfs-actions.pod:4625 ../src/guestfs-actions.pod:5159 ../src/guestfs-actions.pod:7135 ../src/guestfs-actions.pod:7159 ../src/guestfs-actions.pod:7778 ../src/guestfs-actions.pod:7791 ../src/guestfs-actions.pod:7804
23826 msgid "(Added in 1.0.54)"
23830 #: ../src/guestfs-actions.pod:1370
23831 msgid "guestfs_df_h"
23835 #: ../src/guestfs-actions.pod:1372
23839 " guestfs_df_h (guestfs_h *g);\n"
23844 #: ../src/guestfs-actions.pod:1387
23845 msgid "guestfs_dmesg"
23849 #: ../src/guestfs-actions.pod:1389
23853 " guestfs_dmesg (guestfs_h *g);\n"
23858 #: ../src/guestfs-actions.pod:1396
23860 "Another way to get the same information is to enable verbose messages with "
23861 "C<guestfs_set_verbose> or by setting the environment variable "
23862 "C<LIBGUESTFS_DEBUG=1> before running the program."
23866 #: ../src/guestfs-actions.pod:1406
23867 msgid "guestfs_download"
23871 #: ../src/guestfs-actions.pod:1408
23875 " guestfs_download (guestfs_h *g,\n"
23876 " const char *remotefilename,\n"
23877 " const char *filename);\n"
23882 #: ../src/guestfs-actions.pod:1418
23883 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
23887 #: ../src/guestfs-actions.pod:1429
23888 msgid "guestfs_download_offset"
23892 #: ../src/guestfs-actions.pod:1431
23896 " guestfs_download_offset (guestfs_h *g,\n"
23897 " const char *remotefilename,\n"
23898 " const char *filename,\n"
23899 " int64_t offset,\n"
23900 " int64_t size);\n"
23905 #: ../src/guestfs-actions.pod:1444
23907 "Note that there is no limit on the amount of data that can be downloaded "
23908 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
23909 "full amount unless an error occurs."
23913 #: ../src/guestfs-actions.pod:1449
23914 msgid "See also C<guestfs_download>, C<guestfs_pread>."
23918 #: ../src/guestfs-actions.pod:1458 ../src/guestfs-actions.pod:7436
23919 msgid "(Added in 1.5.17)"
23923 #: ../src/guestfs-actions.pod:1460
23924 msgid "guestfs_drop_caches"
23928 #: ../src/guestfs-actions.pod:1462
23932 " guestfs_drop_caches (guestfs_h *g,\n"
23933 " int whattodrop);\n"
23938 #: ../src/guestfs-actions.pod:1480
23943 #: ../src/guestfs-actions.pod:1482
23947 " guestfs_du (guestfs_h *g,\n"
23948 " const char *path);\n"
23953 #: ../src/guestfs-actions.pod:1505
23954 msgid "guestfs_e2fsck_f"
23958 #: ../src/guestfs-actions.pod:1507
23962 " guestfs_e2fsck_f (guestfs_h *g,\n"
23963 " const char *device);\n"
23968 #: ../src/guestfs-actions.pod:1515
23970 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
23971 "Normally you should use C<guestfs_fsck>."
23975 #: ../src/guestfs-actions.pod:1520
23976 msgid "(Added in 1.0.29)"
23980 #: ../src/guestfs-actions.pod:1522
23981 msgid "guestfs_echo_daemon"
23985 #: ../src/guestfs-actions.pod:1524
23989 " guestfs_echo_daemon (guestfs_h *g,\n"
23990 " char *const *words);\n"
23995 #: ../src/guestfs-actions.pod:1533
23996 msgid "See also C<guestfs_ping_daemon>."
24000 #: ../src/guestfs-actions.pod:1538 ../src/guestfs-actions.pod:2296 ../src/guestfs-actions.pod:6607
24001 msgid "(Added in 1.0.69)"
24005 #: ../src/guestfs-actions.pod:1540
24006 msgid "guestfs_egrep"
24010 #: ../src/guestfs-actions.pod:1542
24014 " guestfs_egrep (guestfs_h *g,\n"
24015 " const char *regex,\n"
24016 " const char *path);\n"
24021 #: ../src/guestfs-actions.pod:1557 ../src/guestfs-actions.pod:1576 ../src/guestfs-actions.pod:1633 ../src/guestfs-actions.pod:1679 ../src/guestfs-actions.pod:1698 ../src/guestfs-actions.pod:2426 ../src/guestfs-actions.pod:2445 ../src/guestfs-actions.pod:2623 ../src/guestfs-actions.pod:2636 ../src/guestfs-actions.pod:2651 ../src/guestfs-actions.pod:2697 ../src/guestfs-actions.pod:2719 ../src/guestfs-actions.pod:2732 ../src/guestfs-actions.pod:4005 ../src/guestfs-actions.pod:4019 ../src/guestfs-actions.pod:4032 ../src/guestfs-actions.pod:4046 ../src/guestfs-actions.pod:5047 ../src/guestfs-actions.pod:6068 ../src/guestfs-actions.pod:6117 ../src/guestfs-actions.pod:7003 ../src/guestfs-actions.pod:7015 ../src/guestfs-actions.pod:7028 ../src/guestfs-actions.pod:7041 ../src/guestfs-actions.pod:7063 ../src/guestfs-actions.pod:7076 ../src/guestfs-actions.pod:7089 ../src/guestfs-actions.pod:7102 ../src/guestfs-actions.pod:7896 ../src/guestfs-actions.pod:7915 ../src/guestfs-actions.pod:8009 ../src/guestfs-actions.pod:8028 ../src/guestfs-actions.pod:8074 ../src/guestfs-actions.pod:8093
24022 msgid "(Added in 1.0.66)"
24026 #: ../src/guestfs-actions.pod:1559
24027 msgid "guestfs_egrepi"
24031 #: ../src/guestfs-actions.pod:1561
24035 " guestfs_egrepi (guestfs_h *g,\n"
24036 " const char *regex,\n"
24037 " const char *path);\n"
24042 #: ../src/guestfs-actions.pod:1578
24043 msgid "guestfs_equal"
24047 #: ../src/guestfs-actions.pod:1580
24051 " guestfs_equal (guestfs_h *g,\n"
24052 " const char *file1,\n"
24053 " const char *file2);\n"
24058 #: ../src/guestfs-actions.pod:1594
24059 msgid "guestfs_exists"
24063 #: ../src/guestfs-actions.pod:1596
24067 " guestfs_exists (guestfs_h *g,\n"
24068 " const char *path);\n"
24073 #: ../src/guestfs-actions.pod:1603
24074 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
24078 #: ../src/guestfs-actions.pod:1609
24079 msgid "guestfs_fallocate"
24083 #: ../src/guestfs-actions.pod:1611
24087 " guestfs_fallocate (guestfs_h *g,\n"
24088 " const char *path,\n"
24094 #: ../src/guestfs-actions.pod:1616
24096 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
24101 #: ../src/guestfs-actions.pod:1635
24102 msgid "guestfs_fallocate64"
24106 #: ../src/guestfs-actions.pod:1637
24110 " guestfs_fallocate64 (guestfs_h *g,\n"
24111 " const char *path,\n"
24117 #: ../src/guestfs-actions.pod:1646
24119 "Note that this call allocates disk blocks for the file. To create a sparse "
24120 "file use C<guestfs_truncate_size> instead."
24124 #: ../src/guestfs-actions.pod:1649
24126 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
24127 "oversight it only allowed 30 bit lengths to be specified, effectively "
24128 "limiting the maximum size of files created through that call to 1GB."
24132 #: ../src/guestfs-actions.pod:1660
24133 msgid "(Added in 1.3.17)"
24137 #: ../src/guestfs-actions.pod:1662
24138 msgid "guestfs_fgrep"
24142 #: ../src/guestfs-actions.pod:1664
24146 " guestfs_fgrep (guestfs_h *g,\n"
24147 " const char *pattern,\n"
24148 " const char *path);\n"
24153 #: ../src/guestfs-actions.pod:1681
24154 msgid "guestfs_fgrepi"
24158 #: ../src/guestfs-actions.pod:1683
24162 " guestfs_fgrepi (guestfs_h *g,\n"
24163 " const char *pattern,\n"
24164 " const char *path);\n"
24169 #: ../src/guestfs-actions.pod:1700
24170 msgid "guestfs_file"
24174 #: ../src/guestfs-actions.pod:1702
24178 " guestfs_file (guestfs_h *g,\n"
24179 " const char *path);\n"
24184 #: ../src/guestfs-actions.pod:1720
24186 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
24187 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
24191 #: ../src/guestfs-actions.pod:1728
24192 msgid "guestfs_file_architecture"
24196 #: ../src/guestfs-actions.pod:1730
24200 " guestfs_file_architecture (guestfs_h *g,\n"
24201 " const char *filename);\n"
24206 #: ../src/guestfs-actions.pod:1838 ../src/guestfs-actions.pod:2001 ../src/guestfs-actions.pod:2018 ../src/guestfs-actions.pod:2752 ../src/guestfs-actions.pod:2846 ../src/guestfs-actions.pod:2912 ../src/guestfs-actions.pod:3099 ../src/guestfs-actions.pod:3117 ../src/guestfs-actions.pod:3157 ../src/guestfs-actions.pod:3232 ../src/guestfs-actions.pod:3325 ../src/guestfs-actions.pod:3562 ../src/guestfs-actions.pod:3694
24207 msgid "(Added in 1.5.3)"
24211 #: ../src/guestfs-actions.pod:1840
24212 msgid "guestfs_filesize"
24216 #: ../src/guestfs-actions.pod:1842
24220 " guestfs_filesize (guestfs_h *g,\n"
24221 " const char *file);\n"
24226 #: ../src/guestfs-actions.pod:1848
24228 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
24229 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
24230 "devices, use C<guestfs_blockdev_getsize64>."
24234 #: ../src/guestfs-actions.pod:1854
24235 msgid "(Added in 1.0.82)"
24239 #: ../src/guestfs-actions.pod:1856
24240 msgid "guestfs_fill"
24244 #: ../src/guestfs-actions.pod:1858
24248 " guestfs_fill (guestfs_h *g,\n"
24251 " const char *path);\n"
24256 #: ../src/guestfs-actions.pod:1868
24258 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
24259 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
24260 "bytes use C<guestfs_fill_pattern>."
24264 #: ../src/guestfs-actions.pod:1880
24265 msgid "(Added in 1.0.79)"
24269 #: ../src/guestfs-actions.pod:1882
24270 msgid "guestfs_fill_pattern"
24274 #: ../src/guestfs-actions.pod:1884
24278 " guestfs_fill_pattern (guestfs_h *g,\n"
24279 " const char *pattern,\n"
24281 " const char *path);\n"
24286 #: ../src/guestfs-actions.pod:1890
24288 "This function is like C<guestfs_fill> except that it creates a new file of "
24289 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
24290 "pattern is truncated if necessary to ensure the length of the file is "
24291 "exactly C<len> bytes."
24295 #: ../src/guestfs-actions.pod:1902
24296 msgid "(Added in 1.3.12)"
24300 #: ../src/guestfs-actions.pod:1904
24301 msgid "guestfs_find"
24305 #: ../src/guestfs-actions.pod:1906
24309 " guestfs_find (guestfs_h *g,\n"
24310 " const char *directory);\n"
24315 #: ../src/guestfs-actions.pod:1922
24316 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
24320 #: ../src/guestfs-actions.pod:1935
24321 msgid "See also C<guestfs_find0>."
24325 #: ../src/guestfs-actions.pod:1944 ../src/guestfs-actions.pod:4452 ../src/guestfs-actions.pod:6152
24326 msgid "(Added in 1.0.27)"
24330 #: ../src/guestfs-actions.pod:1946
24331 msgid "guestfs_find0"
24335 #: ../src/guestfs-actions.pod:1948
24339 " guestfs_find0 (guestfs_h *g,\n"
24340 " const char *directory,\n"
24341 " const char *files);\n"
24346 #: ../src/guestfs-actions.pod:1957
24348 "This command works the same way as C<guestfs_find> with the following "
24353 #: ../src/guestfs-actions.pod:1984
24354 msgid "(Added in 1.0.74)"
24358 #: ../src/guestfs-actions.pod:1986
24359 msgid "guestfs_findfs_label"
24363 #: ../src/guestfs-actions.pod:1988
24367 " guestfs_findfs_label (guestfs_h *g,\n"
24368 " const char *label);\n"
24373 #: ../src/guestfs-actions.pod:1996
24374 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
24378 #: ../src/guestfs-actions.pod:2003
24379 msgid "guestfs_findfs_uuid"
24383 #: ../src/guestfs-actions.pod:2005
24387 " guestfs_findfs_uuid (guestfs_h *g,\n"
24388 " const char *uuid);\n"
24393 #: ../src/guestfs-actions.pod:2013
24394 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
24398 #: ../src/guestfs-actions.pod:2020
24399 msgid "guestfs_fsck"
24403 #: ../src/guestfs-actions.pod:2022
24407 " guestfs_fsck (guestfs_h *g,\n"
24408 " const char *fstype,\n"
24409 " const char *device);\n"
24414 #: ../src/guestfs-actions.pod:2057 ../src/guestfs-actions.pod:7943
24415 msgid "(Added in 1.0.16)"
24419 #: ../src/guestfs-actions.pod:2059
24420 msgid "guestfs_get_append"
24424 #: ../src/guestfs-actions.pod:2061
24428 " guestfs_get_append (guestfs_h *g);\n"
24433 #: ../src/guestfs-actions.pod:2069
24435 "This function returns a string which may be NULL. There is no way to return "
24436 "an error from this function. The string is owned by the guest handle and "
24437 "must I<not> be freed."
24441 #: ../src/guestfs-actions.pod:2073 ../src/guestfs-actions.pod:5830 ../src/guestfs-actions.pod:6312 ../src/guestfs-actions.pod:6770 ../src/guestfs-actions.pod:6789 ../src/guestfs-actions.pod:6805 ../src/guestfs-actions.pod:6829 ../src/guestfs-actions.pod:7583 ../src/guestfs-actions.pod:7598 ../src/guestfs-actions.pod:7990
24442 msgid "(Added in 1.0.26)"
24446 #: ../src/guestfs-actions.pod:2075
24447 msgid "guestfs_get_attach_method"
24451 #: ../src/guestfs-actions.pod:2077
24455 " guestfs_get_attach_method (guestfs_h *g);\n"
24460 #: ../src/guestfs-actions.pod:2080
24461 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
24465 #: ../src/guestfs-actions.pod:2085 ../src/guestfs-actions.pod:6342
24466 msgid "(Added in 1.9.8)"
24470 #: ../src/guestfs-actions.pod:2087
24471 msgid "guestfs_get_autosync"
24475 #: ../src/guestfs-actions.pod:2089
24479 " guestfs_get_autosync (guestfs_h *g);\n"
24484 #: ../src/guestfs-actions.pod:2098
24485 msgid "guestfs_get_direct"
24489 #: ../src/guestfs-actions.pod:2100
24493 " guestfs_get_direct (guestfs_h *g);\n"
24498 #: ../src/guestfs-actions.pod:2107 ../src/guestfs-actions.pod:6383
24499 msgid "(Added in 1.0.72)"
24503 #: ../src/guestfs-actions.pod:2109
24504 msgid "guestfs_get_e2label"
24508 #: ../src/guestfs-actions.pod:2111
24512 " guestfs_get_e2label (guestfs_h *g,\n"
24513 " const char *device);\n"
24518 #: ../src/guestfs-actions.pod:2115
24520 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
24525 #: ../src/guestfs-actions.pod:2128 ../src/guestfs-actions.pod:2149 ../src/guestfs-actions.pod:6401 ../src/guestfs-actions.pod:6420
24526 msgid "(Added in 1.0.15)"
24530 #: ../src/guestfs-actions.pod:2130
24531 msgid "guestfs_get_e2uuid"
24535 #: ../src/guestfs-actions.pod:2132
24539 " guestfs_get_e2uuid (guestfs_h *g,\n"
24540 " const char *device);\n"
24545 #: ../src/guestfs-actions.pod:2136
24547 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
24552 #: ../src/guestfs-actions.pod:2151
24553 msgid "guestfs_get_memsize"
24557 #: ../src/guestfs-actions.pod:2153
24561 " guestfs_get_memsize (guestfs_h *g);\n"
24566 #: ../src/guestfs-actions.pod:2159
24568 "If C<guestfs_set_memsize> was not called on this handle, and if "
24569 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
24570 "value for memsize."
24574 #: ../src/guestfs-actions.pod:2168 ../src/guestfs-actions.pod:4743 ../src/guestfs-actions.pod:4952 ../src/guestfs-actions.pod:4971 ../src/guestfs-actions.pod:4990 ../src/guestfs-actions.pod:5002 ../src/guestfs-actions.pod:5019 ../src/guestfs-actions.pod:5032 ../src/guestfs-actions.pod:6055 ../src/guestfs-actions.pod:6441 ../src/guestfs-actions.pod:6737 ../src/guestfs-actions.pod:7352
24575 msgid "(Added in 1.0.55)"
24579 #: ../src/guestfs-actions.pod:2170
24580 msgid "guestfs_get_network"
24584 #: ../src/guestfs-actions.pod:2172
24588 " guestfs_get_network (guestfs_h *g);\n"
24593 #: ../src/guestfs-actions.pod:2179 ../src/guestfs-actions.pod:6460
24594 msgid "(Added in 1.5.4)"
24598 #: ../src/guestfs-actions.pod:2181
24599 msgid "guestfs_get_path"
24603 #: ../src/guestfs-actions.pod:2183
24607 " guestfs_get_path (guestfs_h *g);\n"
24612 #: ../src/guestfs-actions.pod:2191 ../src/guestfs-actions.pod:2231
24614 "This function returns a string, or NULL on error. The string is owned by "
24615 "the guest handle and must I<not> be freed."
24619 #: ../src/guestfs-actions.pod:2196
24620 msgid "guestfs_get_pgroup"
24624 #: ../src/guestfs-actions.pod:2198
24628 " guestfs_get_pgroup (guestfs_h *g);\n"
24633 #: ../src/guestfs-actions.pod:2205 ../src/guestfs-actions.pod:6496 ../src/guestfs-actions.pod:7844
24634 msgid "(Added in 1.11.18)"
24638 #: ../src/guestfs-actions.pod:2207
24639 msgid "guestfs_get_pid"
24643 #: ../src/guestfs-actions.pod:2209
24647 " guestfs_get_pid (guestfs_h *g);\n"
24652 #: ../src/guestfs-actions.pod:2219
24653 msgid "(Added in 1.0.56)"
24657 #: ../src/guestfs-actions.pod:2221
24658 msgid "guestfs_get_qemu"
24662 #: ../src/guestfs-actions.pod:2223
24666 " guestfs_get_qemu (guestfs_h *g);\n"
24671 #: ../src/guestfs-actions.pod:2234 ../src/guestfs-actions.pod:6524
24672 msgid "(Added in 1.0.6)"
24676 #: ../src/guestfs-actions.pod:2236
24677 msgid "guestfs_get_recovery_proc"
24681 #: ../src/guestfs-actions.pod:2238
24685 " guestfs_get_recovery_proc (guestfs_h *g);\n"
24690 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:3816 ../src/guestfs-actions.pod:4147 ../src/guestfs-actions.pod:4550 ../src/guestfs-actions.pod:4582 ../src/guestfs-actions.pod:5760 ../src/guestfs-actions.pod:6103 ../src/guestfs-actions.pod:6548 ../src/guestfs-actions.pod:7255 ../src/guestfs-actions.pod:7275 ../src/guestfs-actions.pod:7467
24691 msgid "(Added in 1.0.77)"
24695 #: ../src/guestfs-actions.pod:2247
24696 msgid "guestfs_get_selinux"
24700 #: ../src/guestfs-actions.pod:2249
24704 " guestfs_get_selinux (guestfs_h *g);\n"
24709 #: ../src/guestfs-actions.pod:2252
24711 "This returns the current setting of the selinux flag which is passed to the "
24712 "appliance at boot time. See C<guestfs_set_selinux>."
24716 #: ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2334 ../src/guestfs-actions.pod:6567 ../src/guestfs-actions.pod:6641
24717 msgid "(Added in 1.0.67)"
24721 #: ../src/guestfs-actions.pod:2262
24722 msgid "guestfs_get_smp"
24726 #: ../src/guestfs-actions.pod:2264
24730 " guestfs_get_smp (guestfs_h *g);\n"
24735 #: ../src/guestfs-actions.pod:2273
24736 msgid "guestfs_get_state"
24740 #: ../src/guestfs-actions.pod:2275
24744 " guestfs_get_state (guestfs_h *g);\n"
24749 #: ../src/guestfs-actions.pod:2287
24750 msgid "guestfs_get_trace"
24754 #: ../src/guestfs-actions.pod:2289
24758 " guestfs_get_trace (guestfs_h *g);\n"
24763 #: ../src/guestfs-actions.pod:2298
24764 msgid "guestfs_get_umask"
24768 #: ../src/guestfs-actions.pod:2300
24772 " guestfs_get_umask (guestfs_h *g);\n"
24777 #: ../src/guestfs-actions.pod:2303
24779 "Return the current umask. By default the umask is C<022> unless it has been "
24780 "set by calling C<guestfs_umask>."
24784 #: ../src/guestfs-actions.pod:2310
24785 msgid "guestfs_get_verbose"
24789 #: ../src/guestfs-actions.pod:2312
24793 " guestfs_get_verbose (guestfs_h *g);\n"
24798 #: ../src/guestfs-actions.pod:2321
24799 msgid "guestfs_getcon"
24803 #: ../src/guestfs-actions.pod:2323
24807 " guestfs_getcon (guestfs_h *g);\n"
24812 #: ../src/guestfs-actions.pod:2328
24813 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
24817 #: ../src/guestfs-actions.pod:2336
24818 msgid "guestfs_getxattr"
24822 #: ../src/guestfs-actions.pod:2338
24826 " guestfs_getxattr (guestfs_h *g,\n"
24827 " const char *path,\n"
24828 " const char *name,\n"
24829 " size_t *size_r);\n"
24834 #: ../src/guestfs-actions.pod:2344
24836 "Get a single extended attribute from file C<path> named C<name>. This call "
24837 "follows symlinks. If you want to lookup an extended attribute for the "
24838 "symlink itself, use C<guestfs_lgetxattr>."
24842 #: ../src/guestfs-actions.pod:2348 ../src/guestfs-actions.pod:3830
24844 "Normally it is better to get all extended attributes from a file in one go "
24845 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
24846 "implementations are buggy and do not provide a way to list out attributes. "
24847 "For these filesystems (notably ntfs-3g) you have to know the names of the "
24848 "extended attributes you want in advance and call this function."
24852 #: ../src/guestfs-actions.pod:2358
24853 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
24857 #: ../src/guestfs-actions.pod:2360 ../src/guestfs-actions.pod:2573 ../src/guestfs-actions.pod:3047 ../src/guestfs-actions.pod:3842 ../src/guestfs-actions.pod:5753 ../src/guestfs-actions.pod:5779 ../src/guestfs-actions.pod:5960
24859 "This function returns a buffer, or NULL on error. The size of the returned "
24860 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
24865 #: ../src/guestfs-actions.pod:2364 ../src/guestfs-actions.pod:3846
24866 msgid "(Added in 1.7.24)"
24870 #: ../src/guestfs-actions.pod:2366
24871 msgid "guestfs_getxattrs"
24875 #: ../src/guestfs-actions.pod:2368
24878 " struct guestfs_xattr_list *\n"
24879 " guestfs_getxattrs (guestfs_h *g,\n"
24880 " const char *path);\n"
24885 #: ../src/guestfs-actions.pod:2378
24886 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
24890 #: ../src/guestfs-actions.pod:2380 ../src/guestfs-actions.pod:3858 ../src/guestfs-actions.pod:4546
24892 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
24893 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
24897 #: ../src/guestfs-actions.pod:2384 ../src/guestfs-actions.pod:3862 ../src/guestfs-actions.pod:4061 ../src/guestfs-actions.pod:4097 ../src/guestfs-actions.pod:6133 ../src/guestfs-actions.pod:6660 ../src/guestfs-actions.pod:8055
24898 msgid "(Added in 1.0.59)"
24902 #: ../src/guestfs-actions.pod:2386
24903 msgid "guestfs_glob_expand"
24907 #: ../src/guestfs-actions.pod:2388
24911 " guestfs_glob_expand (guestfs_h *g,\n"
24912 " const char *pattern);\n"
24917 #: ../src/guestfs-actions.pod:2407 ../src/guestfs-actions.pod:6853 ../src/guestfs-actions.pod:6870
24918 msgid "(Added in 1.0.50)"
24922 #: ../src/guestfs-actions.pod:2409
24923 msgid "guestfs_grep"
24927 #: ../src/guestfs-actions.pod:2411
24931 " guestfs_grep (guestfs_h *g,\n"
24932 " const char *regex,\n"
24933 " const char *path);\n"
24938 #: ../src/guestfs-actions.pod:2428
24939 msgid "guestfs_grepi"
24943 #: ../src/guestfs-actions.pod:2430
24947 " guestfs_grepi (guestfs_h *g,\n"
24948 " const char *regex,\n"
24949 " const char *path);\n"
24954 #: ../src/guestfs-actions.pod:2447
24955 msgid "guestfs_grub_install"
24959 #: ../src/guestfs-actions.pod:2449
24963 " guestfs_grub_install (guestfs_h *g,\n"
24964 " const char *root,\n"
24965 " const char *device);\n"
24970 #: ../src/guestfs-actions.pod:2492
24971 msgid "(Added in 1.0.17)"
24975 #: ../src/guestfs-actions.pod:2494
24976 msgid "guestfs_head"
24980 #: ../src/guestfs-actions.pod:2496
24984 " guestfs_head (guestfs_h *g,\n"
24985 " const char *path);\n"
24990 #: ../src/guestfs-actions.pod:2512
24991 msgid "guestfs_head_n"
24995 #: ../src/guestfs-actions.pod:2514
24999 " guestfs_head_n (guestfs_h *g,\n"
25001 " const char *path);\n"
25006 #: ../src/guestfs-actions.pod:2536
25007 msgid "guestfs_hexdump"
25011 #: ../src/guestfs-actions.pod:2538
25015 " guestfs_hexdump (guestfs_h *g,\n"
25016 " const char *path);\n"
25021 #: ../src/guestfs-actions.pod:2551 ../src/guestfs-actions.pod:6934 ../src/guestfs-actions.pod:6989
25022 msgid "(Added in 1.0.22)"
25026 #: ../src/guestfs-actions.pod:2553
25027 msgid "guestfs_initrd_cat"
25031 #: ../src/guestfs-actions.pod:2555
25035 " guestfs_initrd_cat (guestfs_h *g,\n"
25036 " const char *initrdpath,\n"
25037 " const char *filename,\n"
25038 " size_t *size_r);\n"
25043 #: ../src/guestfs-actions.pod:2571
25044 msgid "See also C<guestfs_initrd_list>."
25048 #: ../src/guestfs-actions.pod:2582
25049 msgid "guestfs_initrd_list"
25053 #: ../src/guestfs-actions.pod:2584
25057 " guestfs_initrd_list (guestfs_h *g,\n"
25058 " const char *path);\n"
25063 #: ../src/guestfs-actions.pod:2604
25064 msgid "guestfs_inotify_add_watch"
25068 #: ../src/guestfs-actions.pod:2606
25072 " guestfs_inotify_add_watch (guestfs_h *g,\n"
25073 " const char *path,\n"
25079 #: ../src/guestfs-actions.pod:2625
25080 msgid "guestfs_inotify_close"
25084 #: ../src/guestfs-actions.pod:2627
25088 " guestfs_inotify_close (guestfs_h *g);\n"
25093 #: ../src/guestfs-actions.pod:2638
25094 msgid "guestfs_inotify_files"
25098 #: ../src/guestfs-actions.pod:2640
25102 " guestfs_inotify_files (guestfs_h *g);\n"
25107 #: ../src/guestfs-actions.pod:2643
25109 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
25110 "returns a list of pathnames of objects that were touched. The returned "
25111 "pathnames are sorted and deduplicated."
25115 #: ../src/guestfs-actions.pod:2653
25116 msgid "guestfs_inotify_init"
25120 #: ../src/guestfs-actions.pod:2655
25124 " guestfs_inotify_init (guestfs_h *g,\n"
25125 " int maxevents);\n"
25130 #: ../src/guestfs-actions.pod:2663
25132 "C<maxevents> is the maximum number of events which will be queued up between "
25133 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
25134 "passed as C<0>, then the kernel (or previously set) default is used. For "
25135 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
25136 "throws away events, but records the fact that it threw them away by setting "
25137 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
25138 "C<guestfs_inotify_read>)."
25142 #: ../src/guestfs-actions.pod:2673
25144 "Before any events are generated, you have to add some watches to the "
25145 "internal watch list. See: C<guestfs_inotify_add_watch>, "
25146 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
25150 #: ../src/guestfs-actions.pod:2679
25152 "Queued up events should be read periodically by calling "
25153 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
25154 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
25155 "often enough then you risk the internal queue overflowing."
25159 #: ../src/guestfs-actions.pod:2686
25161 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
25162 "This also removes any watches automatically."
25166 #: ../src/guestfs-actions.pod:2699
25167 msgid "guestfs_inotify_read"
25171 #: ../src/guestfs-actions.pod:2701
25174 " struct guestfs_inotify_event_list *\n"
25175 " guestfs_inotify_read (guestfs_h *g);\n"
25180 #: ../src/guestfs-actions.pod:2715
25182 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
25183 "there was an error. I<The caller must call "
25184 "C<guestfs_free_inotify_event_list> after use>."
25188 #: ../src/guestfs-actions.pod:2721
25189 msgid "guestfs_inotify_rm_watch"
25193 #: ../src/guestfs-actions.pod:2723
25197 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
25203 #: ../src/guestfs-actions.pod:2727
25205 "Remove a previously defined inotify watch. See "
25206 "C<guestfs_inotify_add_watch>."
25210 #: ../src/guestfs-actions.pod:2734
25211 msgid "guestfs_inspect_get_arch"
25215 #: ../src/guestfs-actions.pod:2736
25219 " guestfs_inspect_get_arch (guestfs_h *g,\n"
25220 " const char *root);\n"
25225 #: ../src/guestfs-actions.pod:2740
25227 "This returns the architecture of the inspected operating system. The "
25228 "possible return values are listed under C<guestfs_file_architecture>."
25232 #: ../src/guestfs-actions.pod:2754
25233 msgid "guestfs_inspect_get_distro"
25237 #: ../src/guestfs-actions.pod:2756
25241 " guestfs_inspect_get_distro (guestfs_h *g,\n"
25242 " const char *root);\n"
25247 #: ../src/guestfs-actions.pod:2848
25248 msgid "guestfs_inspect_get_drive_mappings"
25252 #: ../src/guestfs-actions.pod:2850
25256 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
25257 " const char *root);\n"
25262 #: ../src/guestfs-actions.pod:2879
25264 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25265 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
25269 #: ../src/guestfs-actions.pod:2883 ../src/guestfs-actions.pod:3151 ../src/guestfs-actions.pod:3949 ../src/guestfs-actions.pod:5221 ../src/guestfs-actions.pod:7291
25271 "This function returns a NULL-terminated array of strings, or NULL if there "
25272 "was an error. The array of strings will always have length C<2n+1>, where "
25273 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
25274 "caller must free the strings and the array after use>."
25278 #: ../src/guestfs-actions.pod:2889 ../src/guestfs-actions.pod:3345
25279 msgid "(Added in 1.9.17)"
25283 #: ../src/guestfs-actions.pod:2891
25284 msgid "guestfs_inspect_get_filesystems"
25288 #: ../src/guestfs-actions.pod:2893
25292 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
25293 " const char *root);\n"
25298 #: ../src/guestfs-actions.pod:2905
25300 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25301 "C<guestfs_inspect_get_mountpoints>."
25305 #: ../src/guestfs-actions.pod:2914
25306 msgid "guestfs_inspect_get_format"
25310 #: ../src/guestfs-actions.pod:2916
25314 " guestfs_inspect_get_format (guestfs_h *g,\n"
25315 " const char *root);\n"
25320 #: ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:3381 ../src/guestfs-actions.pod:3397 ../src/guestfs-actions.pod:3415 ../src/guestfs-actions.pod:6171
25321 msgid "(Added in 1.9.4)"
25325 #: ../src/guestfs-actions.pod:2952
25326 msgid "guestfs_inspect_get_hostname"
25330 #: ../src/guestfs-actions.pod:2954
25334 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
25335 " const char *root);\n"
25340 #: ../src/guestfs-actions.pod:2969
25341 msgid "(Added in 1.7.9)"
25345 #: ../src/guestfs-actions.pod:2971
25346 msgid "guestfs_inspect_get_icon"
25350 #: ../src/guestfs-actions.pod:2973
25354 " guestfs_inspect_get_icon (guestfs_h *g,\n"
25355 " const char *root,\n"
25356 " size_t *size_r,\n"
25362 #: ../src/guestfs-actions.pod:2984
25365 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
25366 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
25371 #: ../src/guestfs-actions.pod:3051 ../src/guestfs-actions.pod:3876 ../src/guestfs-actions.pod:5120
25372 msgid "(Added in 1.11.12)"
25376 #: ../src/guestfs-actions.pod:3053
25377 msgid "guestfs_inspect_get_icon_va"
25381 #: ../src/guestfs-actions.pod:3055
25385 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
25386 " const char *root,\n"
25387 " size_t *size_r,\n"
25388 " va_list args);\n"
25393 #: ../src/guestfs-actions.pod:3061
25394 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
25398 #: ../src/guestfs-actions.pod:3065
25399 msgid "guestfs_inspect_get_icon_argv"
25403 #: ../src/guestfs-actions.pod:3067
25407 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
25408 " const char *root,\n"
25409 " size_t *size_r,\n"
25410 " const struct guestfs_inspect_get_icon_argv "
25416 #: ../src/guestfs-actions.pod:3073
25417 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
25421 #: ../src/guestfs-actions.pod:3077
25422 msgid "guestfs_inspect_get_major_version"
25426 #: ../src/guestfs-actions.pod:3079
25430 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
25431 " const char *root);\n"
25436 #: ../src/guestfs-actions.pod:3101
25437 msgid "guestfs_inspect_get_minor_version"
25441 #: ../src/guestfs-actions.pod:3103
25445 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
25446 " const char *root);\n"
25451 #: ../src/guestfs-actions.pod:3112
25453 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25454 "C<guestfs_inspect_get_major_version>."
25458 #: ../src/guestfs-actions.pod:3119
25459 msgid "guestfs_inspect_get_mountpoints"
25463 #: ../src/guestfs-actions.pod:3121
25467 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
25468 " const char *root);\n"
25473 #: ../src/guestfs-actions.pod:3142
25475 "For operating systems like Windows which still use drive letters, this call "
25476 "will only return an entry for the first drive \"mounted on\" C</>. For "
25477 "information about the mapping of drive letters to partitions, see "
25478 "C<guestfs_inspect_get_drive_mappings>."
25482 #: ../src/guestfs-actions.pod:3148
25484 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25485 "C<guestfs_inspect_get_filesystems>."
25489 #: ../src/guestfs-actions.pod:3159
25490 msgid "guestfs_inspect_get_package_format"
25494 #: ../src/guestfs-actions.pod:3161
25498 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
25499 " const char *root);\n"
25504 #: ../src/guestfs-actions.pod:3165
25506 "This function and C<guestfs_inspect_get_package_management> return the "
25507 "package format and package management tool used by the inspected operating "
25508 "system. For example for Fedora these functions would return C<rpm> (package "
25509 "format) and C<yum> (package management)."
25513 #: ../src/guestfs-actions.pod:3183 ../src/guestfs-actions.pod:3211
25514 msgid "(Added in 1.7.5)"
25518 #: ../src/guestfs-actions.pod:3185
25519 msgid "guestfs_inspect_get_package_management"
25523 #: ../src/guestfs-actions.pod:3187
25527 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
25528 " const char *root);\n"
25533 #: ../src/guestfs-actions.pod:3191
25535 "C<guestfs_inspect_get_package_format> and this function return the package "
25536 "format and package management tool used by the inspected operating system. "
25537 "For example for Fedora these functions would return C<rpm> (package format) "
25538 "and C<yum> (package management)."
25542 #: ../src/guestfs-actions.pod:3213
25543 msgid "guestfs_inspect_get_product_name"
25547 #: ../src/guestfs-actions.pod:3215
25551 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
25552 " const char *root);\n"
25557 #: ../src/guestfs-actions.pod:3234
25558 msgid "guestfs_inspect_get_product_variant"
25562 #: ../src/guestfs-actions.pod:3236
25566 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
25567 " const char *root);\n"
25572 #: ../src/guestfs-actions.pod:3259
25574 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25575 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
25579 #: ../src/guestfs-actions.pod:3266
25580 msgid "(Added in 1.9.13)"
25584 #: ../src/guestfs-actions.pod:3268
25585 msgid "guestfs_inspect_get_roots"
25589 #: ../src/guestfs-actions.pod:3270
25593 " guestfs_inspect_get_roots (guestfs_h *g);\n"
25598 #: ../src/guestfs-actions.pod:3273
25600 "This function is a convenient way to get the list of root devices, as "
25601 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
25602 "the whole inspection process."
25606 #: ../src/guestfs-actions.pod:3277
25608 "This returns an empty list if either no root devices were found or the "
25609 "caller has not called C<guestfs_inspect_os>."
25613 #: ../src/guestfs-actions.pod:3286
25614 msgid "(Added in 1.7.3)"
25618 #: ../src/guestfs-actions.pod:3288
25619 msgid "guestfs_inspect_get_type"
25623 #: ../src/guestfs-actions.pod:3290
25627 " guestfs_inspect_get_type (guestfs_h *g,\n"
25628 " const char *root);\n"
25633 #: ../src/guestfs-actions.pod:3327
25634 msgid "guestfs_inspect_get_windows_current_control_set"
25638 #: ../src/guestfs-actions.pod:3329
25642 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
25643 " const char *root);\n"
25648 #: ../src/guestfs-actions.pod:3347
25649 msgid "guestfs_inspect_get_windows_systemroot"
25653 #: ../src/guestfs-actions.pod:3349
25657 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
25658 " const char *root);\n"
25663 #: ../src/guestfs-actions.pod:3365
25664 msgid "(Added in 1.5.25)"
25668 #: ../src/guestfs-actions.pod:3367
25669 msgid "guestfs_inspect_is_live"
25673 #: ../src/guestfs-actions.pod:3369
25677 " guestfs_inspect_is_live (guestfs_h *g,\n"
25678 " const char *root);\n"
25683 #: ../src/guestfs-actions.pod:3373
25685 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
25686 "disk), then this returns true if a live image was detected on the disk."
25690 #: ../src/guestfs-actions.pod:3383
25691 msgid "guestfs_inspect_is_multipart"
25695 #: ../src/guestfs-actions.pod:3385
25699 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
25700 " const char *root);\n"
25705 #: ../src/guestfs-actions.pod:3389
25707 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
25708 "disk), then this returns true if the disk is part of a set."
25712 #: ../src/guestfs-actions.pod:3399
25713 msgid "guestfs_inspect_is_netinst"
25717 #: ../src/guestfs-actions.pod:3401
25721 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
25722 " const char *root);\n"
25727 #: ../src/guestfs-actions.pod:3405
25729 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
25730 "disk), then this returns true if the disk is a network installer, ie. not a "
25731 "self-contained install CD but one which is likely to require network access "
25732 "to complete the install."
25736 #: ../src/guestfs-actions.pod:3417
25737 msgid "guestfs_inspect_list_applications"
25741 #: ../src/guestfs-actions.pod:3419
25744 " struct guestfs_application_list *\n"
25745 " guestfs_inspect_list_applications (guestfs_h *g,\n"
25746 " const char *root);\n"
25751 #: ../src/guestfs-actions.pod:3425
25753 "I<Note:> This call works differently from other parts of the inspection "
25754 "API. You have to call C<guestfs_inspect_os>, then "
25755 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
25756 "this. Listing applications is a significantly more difficult operation "
25757 "which requires access to the full filesystem. Also note that unlike the "
25758 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
25759 "the libguestfs handle, this call actually reads parts of the mounted "
25760 "filesystems during the call."
25764 #: ../src/guestfs-actions.pod:3515
25766 "This function returns a C<struct guestfs_application_list *>, or NULL if "
25767 "there was an error. I<The caller must call C<guestfs_free_application_list> "
25772 #: ../src/guestfs-actions.pod:3519
25773 msgid "(Added in 1.7.8)"
25777 #: ../src/guestfs-actions.pod:3521
25778 msgid "guestfs_inspect_os"
25782 #: ../src/guestfs-actions.pod:3523
25786 " guestfs_inspect_os (guestfs_h *g);\n"
25791 #: ../src/guestfs-actions.pod:3539
25793 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
25794 "functions in order to query further information about each operating system, "
25795 "such as the name and version."
25799 #: ../src/guestfs-actions.pod:3544
25801 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
25802 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
25803 "the contents. This should be called with no disks currently mounted. The "
25804 "function may also use Augeas, so any existing Augeas handle will be closed."
25808 #: ../src/guestfs-actions.pod:3556 ../src/guestfs-actions.pod:3887 ../src/guestfs-actions.pod:3969
25809 msgid "See also C<guestfs_list_filesystems>."
25813 #: ../src/guestfs-actions.pod:3564
25814 msgid "guestfs_is_blockdev"
25818 #: ../src/guestfs-actions.pod:3566
25822 " guestfs_is_blockdev (guestfs_h *g,\n"
25823 " const char *path);\n"
25828 #: ../src/guestfs-actions.pod:3573 ../src/guestfs-actions.pod:3602 ../src/guestfs-actions.pod:3632 ../src/guestfs-actions.pod:3647 ../src/guestfs-actions.pod:3663 ../src/guestfs-actions.pod:3719 ../src/guestfs-actions.pod:3734
25829 msgid "See also C<guestfs_stat>."
25833 #: ../src/guestfs-actions.pod:3577 ../src/guestfs-actions.pod:3606 ../src/guestfs-actions.pod:3651 ../src/guestfs-actions.pod:3723 ../src/guestfs-actions.pod:3738
25834 msgid "(Added in 1.5.10)"
25838 #: ../src/guestfs-actions.pod:3579
25839 msgid "guestfs_is_busy"
25843 #: ../src/guestfs-actions.pod:3581
25847 " guestfs_is_busy (guestfs_h *g);\n"
25852 #: ../src/guestfs-actions.pod:3593
25853 msgid "guestfs_is_chardev"
25857 #: ../src/guestfs-actions.pod:3595
25861 " guestfs_is_chardev (guestfs_h *g,\n"
25862 " const char *path);\n"
25867 #: ../src/guestfs-actions.pod:3608
25868 msgid "guestfs_is_config"
25872 #: ../src/guestfs-actions.pod:3610
25876 " guestfs_is_config (guestfs_h *g);\n"
25881 #: ../src/guestfs-actions.pod:3622
25882 msgid "guestfs_is_dir"
25886 #: ../src/guestfs-actions.pod:3624
25890 " guestfs_is_dir (guestfs_h *g,\n"
25891 " const char *path);\n"
25896 #: ../src/guestfs-actions.pod:3638
25897 msgid "guestfs_is_fifo"
25901 #: ../src/guestfs-actions.pod:3640
25905 " guestfs_is_fifo (guestfs_h *g,\n"
25906 " const char *path);\n"
25911 #: ../src/guestfs-actions.pod:3653
25912 msgid "guestfs_is_file"
25916 #: ../src/guestfs-actions.pod:3655
25920 " guestfs_is_file (guestfs_h *g,\n"
25921 " const char *path);\n"
25926 #: ../src/guestfs-actions.pod:3669
25927 msgid "guestfs_is_launching"
25931 #: ../src/guestfs-actions.pod:3671
25935 " guestfs_is_launching (guestfs_h *g);\n"
25940 #: ../src/guestfs-actions.pod:3683
25941 msgid "guestfs_is_lv"
25945 #: ../src/guestfs-actions.pod:3685
25949 " guestfs_is_lv (guestfs_h *g,\n"
25950 " const char *device);\n"
25955 #: ../src/guestfs-actions.pod:3696
25956 msgid "guestfs_is_ready"
25960 #: ../src/guestfs-actions.pod:3698
25964 " guestfs_is_ready (guestfs_h *g);\n"
25969 #: ../src/guestfs-actions.pod:3710
25970 msgid "guestfs_is_socket"
25974 #: ../src/guestfs-actions.pod:3712
25978 " guestfs_is_socket (guestfs_h *g,\n"
25979 " const char *path);\n"
25984 #: ../src/guestfs-actions.pod:3725
25985 msgid "guestfs_is_symlink"
25989 #: ../src/guestfs-actions.pod:3727
25993 " guestfs_is_symlink (guestfs_h *g,\n"
25994 " const char *path);\n"
25999 #: ../src/guestfs-actions.pod:3740
26000 msgid "guestfs_is_zero"
26004 #: ../src/guestfs-actions.pod:3742
26008 " guestfs_is_zero (guestfs_h *g,\n"
26009 " const char *path);\n"
26014 #: ../src/guestfs-actions.pod:3751 ../src/guestfs-actions.pod:3765
26015 msgid "(Added in 1.11.8)"
26019 #: ../src/guestfs-actions.pod:3753
26020 msgid "guestfs_is_zero_device"
26024 #: ../src/guestfs-actions.pod:3755
26028 " guestfs_is_zero_device (guestfs_h *g,\n"
26029 " const char *device);\n"
26034 #: ../src/guestfs-actions.pod:3767
26035 msgid "guestfs_kill_subprocess"
26039 #: ../src/guestfs-actions.pod:3769
26043 " guestfs_kill_subprocess (guestfs_h *g);\n"
26048 #: ../src/guestfs-actions.pod:3778
26049 msgid "guestfs_launch"
26053 #: ../src/guestfs-actions.pod:3780
26057 " guestfs_launch (guestfs_h *g);\n"
26062 #: ../src/guestfs-actions.pod:3798
26063 msgid "guestfs_lchown"
26067 #: ../src/guestfs-actions.pod:3800
26071 " guestfs_lchown (guestfs_h *g,\n"
26074 " const char *path);\n"
26079 #: ../src/guestfs-actions.pod:3806
26081 "Change the file owner to C<owner> and group to C<group>. This is like "
26082 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
26083 "changed, not the target."
26087 #: ../src/guestfs-actions.pod:3818
26088 msgid "guestfs_lgetxattr"
26092 #: ../src/guestfs-actions.pod:3820
26096 " guestfs_lgetxattr (guestfs_h *g,\n"
26097 " const char *path,\n"
26098 " const char *name,\n"
26099 " size_t *size_r);\n"
26104 #: ../src/guestfs-actions.pod:3840
26105 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
26109 #: ../src/guestfs-actions.pod:3848
26110 msgid "guestfs_lgetxattrs"
26114 #: ../src/guestfs-actions.pod:3850
26117 " struct guestfs_xattr_list *\n"
26118 " guestfs_lgetxattrs (guestfs_h *g,\n"
26119 " const char *path);\n"
26124 #: ../src/guestfs-actions.pod:3854
26126 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
26127 "then it returns the extended attributes of the link itself."
26131 #: ../src/guestfs-actions.pod:3864
26132 msgid "guestfs_list_9p"
26136 #: ../src/guestfs-actions.pod:3866
26140 " guestfs_list_9p (guestfs_h *g);\n"
26145 #: ../src/guestfs-actions.pod:3878
26146 msgid "guestfs_list_devices"
26150 #: ../src/guestfs-actions.pod:3880
26154 " guestfs_list_devices (guestfs_h *g);\n"
26159 #: ../src/guestfs-actions.pod:3895
26160 msgid "guestfs_list_dm_devices"
26164 #: ../src/guestfs-actions.pod:3897
26168 " guestfs_list_dm_devices (guestfs_h *g);\n"
26173 #: ../src/guestfs-actions.pod:3902
26175 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
26176 "previous call to C<guestfs_luks_open>."
26180 #: ../src/guestfs-actions.pod:3905
26182 "Device mapper devices which correspond to logical volumes are I<not> "
26183 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
26188 #: ../src/guestfs-actions.pod:3913 ../src/guestfs-actions.pod:5359
26189 msgid "(Added in 1.11.15)"
26193 #: ../src/guestfs-actions.pod:3915
26194 msgid "guestfs_list_filesystems"
26198 #: ../src/guestfs-actions.pod:3917
26202 " guestfs_list_filesystems (guestfs_h *g);\n"
26207 #: ../src/guestfs-actions.pod:3937
26209 "This command runs other libguestfs commands, which might include "
26210 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
26211 "soon after launch and only when nothing is mounted."
26215 #: ../src/guestfs-actions.pod:3941
26217 "Not all of the filesystems returned will be mountable. In particular, swap "
26218 "partitions are returned in the list. Also this command does not check that "
26219 "each filesystem found is valid and mountable, and some filesystems might be "
26220 "mountable but require special options. Filesystems may not all belong to a "
26221 "single logical operating system (use C<guestfs_inspect_os> to look for "
26226 #: ../src/guestfs-actions.pod:3955 ../src/guestfs-actions.pod:5720
26227 msgid "(Added in 1.5.15)"
26231 #: ../src/guestfs-actions.pod:3957
26232 msgid "guestfs_list_partitions"
26236 #: ../src/guestfs-actions.pod:3959
26240 " guestfs_list_partitions (guestfs_h *g);\n"
26245 #: ../src/guestfs-actions.pod:3966
26247 "This does not return logical volumes. For that you will need to call "
26252 #: ../src/guestfs-actions.pod:3977
26257 #: ../src/guestfs-actions.pod:3979
26261 " guestfs_ll (guestfs_h *g,\n"
26262 " const char *directory);\n"
26267 #: ../src/guestfs-actions.pod:3994
26272 #: ../src/guestfs-actions.pod:3996
26276 " guestfs_ln (guestfs_h *g,\n"
26277 " const char *target,\n"
26278 " const char *linkname);\n"
26283 #: ../src/guestfs-actions.pod:4007
26284 msgid "guestfs_ln_f"
26288 #: ../src/guestfs-actions.pod:4009
26292 " guestfs_ln_f (guestfs_h *g,\n"
26293 " const char *target,\n"
26294 " const char *linkname);\n"
26299 #: ../src/guestfs-actions.pod:4021
26300 msgid "guestfs_ln_s"
26304 #: ../src/guestfs-actions.pod:4023
26308 " guestfs_ln_s (guestfs_h *g,\n"
26309 " const char *target,\n"
26310 " const char *linkname);\n"
26315 #: ../src/guestfs-actions.pod:4034
26316 msgid "guestfs_ln_sf"
26320 #: ../src/guestfs-actions.pod:4036
26324 " guestfs_ln_sf (guestfs_h *g,\n"
26325 " const char *target,\n"
26326 " const char *linkname);\n"
26331 #: ../src/guestfs-actions.pod:4048
26332 msgid "guestfs_lremovexattr"
26336 #: ../src/guestfs-actions.pod:4050
26340 " guestfs_lremovexattr (guestfs_h *g,\n"
26341 " const char *xattr,\n"
26342 " const char *path);\n"
26347 #: ../src/guestfs-actions.pod:4055
26349 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
26350 "link, then it removes an extended attribute of the link itself."
26354 #: ../src/guestfs-actions.pod:4063
26359 #: ../src/guestfs-actions.pod:4065
26363 " guestfs_ls (guestfs_h *g,\n"
26364 " const char *directory);\n"
26369 #: ../src/guestfs-actions.pod:4073
26371 "This command is mostly useful for interactive sessions. Programs should "
26372 "probably use C<guestfs_readdir> instead."
26376 #: ../src/guestfs-actions.pod:4082
26377 msgid "guestfs_lsetxattr"
26381 #: ../src/guestfs-actions.pod:4084
26385 " guestfs_lsetxattr (guestfs_h *g,\n"
26386 " const char *xattr,\n"
26387 " const char *val,\n"
26389 " const char *path);\n"
26394 #: ../src/guestfs-actions.pod:4091
26396 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
26397 "then it sets an extended attribute of the link itself."
26401 #: ../src/guestfs-actions.pod:4099
26402 msgid "guestfs_lstat"
26406 #: ../src/guestfs-actions.pod:4101
26409 " struct guestfs_stat *\n"
26410 " guestfs_lstat (guestfs_h *g,\n"
26411 " const char *path);\n"
26416 #: ../src/guestfs-actions.pod:4107
26418 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
26419 "link, then the link is stat-ed, not the file it refers to."
26423 #: ../src/guestfs-actions.pod:4113 ../src/guestfs-actions.pod:6894
26425 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
26426 "error. I<The caller must call C<guestfs_free_stat> after use>."
26430 #: ../src/guestfs-actions.pod:4117 ../src/guestfs-actions.pod:6898 ../src/guestfs-actions.pod:6916 ../src/guestfs-actions.pod:7297
26431 msgid "(Added in 0.9.2)"
26435 #: ../src/guestfs-actions.pod:4119
26436 msgid "guestfs_lstatlist"
26440 #: ../src/guestfs-actions.pod:4121
26443 " struct guestfs_stat_list *\n"
26444 " guestfs_lstatlist (guestfs_h *g,\n"
26445 " const char *path,\n"
26446 " char *const *names);\n"
26451 #: ../src/guestfs-actions.pod:4126
26453 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
26454 "files, where all files are in the directory C<path>. C<names> is the list "
26455 "of files from this directory."
26459 #: ../src/guestfs-actions.pod:4135
26461 "This call is intended for programs that want to efficiently list a directory "
26462 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
26463 "for a similarly efficient call for getting extended attributes. Very long "
26464 "directory listings might cause the protocol message size to be exceeded, "
26465 "causing this call to fail. The caller must split up such requests into "
26466 "smaller groups of names."
26470 #: ../src/guestfs-actions.pod:4143
26472 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
26473 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
26477 #: ../src/guestfs-actions.pod:4149
26478 msgid "guestfs_luks_add_key"
26482 #: ../src/guestfs-actions.pod:4151
26486 " guestfs_luks_add_key (guestfs_h *g,\n"
26487 " const char *device,\n"
26488 " const char *key,\n"
26489 " const char *newkey,\n"
26495 #: ../src/guestfs-actions.pod:4163
26497 "Note that if C<keyslot> already contains a key, then this command will "
26498 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
26502 #: ../src/guestfs-actions.pod:4169 ../src/guestfs-actions.pod:4209 ../src/guestfs-actions.pod:4232 ../src/guestfs-actions.pod:4252 ../src/guestfs-actions.pod:4287 ../src/guestfs-actions.pod:4306
26504 "This function takes a key or passphrase parameter which could contain "
26505 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
26510 #: ../src/guestfs-actions.pod:4173 ../src/guestfs-actions.pod:4213 ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:4256
26511 msgid "(Added in 1.5.2)"
26515 #: ../src/guestfs-actions.pod:4175
26516 msgid "guestfs_luks_close"
26520 #: ../src/guestfs-actions.pod:4177
26524 " guestfs_luks_close (guestfs_h *g,\n"
26525 " const char *device);\n"
26530 #: ../src/guestfs-actions.pod:4181
26532 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
26533 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
26534 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
26535 "underlying block device."
26539 #: ../src/guestfs-actions.pod:4189 ../src/guestfs-actions.pod:4291 ../src/guestfs-actions.pod:4310 ../src/guestfs-actions.pod:4360 ../src/guestfs-actions.pod:4408
26540 msgid "(Added in 1.5.1)"
26544 #: ../src/guestfs-actions.pod:4191
26545 msgid "guestfs_luks_format"
26549 #: ../src/guestfs-actions.pod:4193
26553 " guestfs_luks_format (guestfs_h *g,\n"
26554 " const char *device,\n"
26555 " const char *key,\n"
26561 #: ../src/guestfs-actions.pod:4215
26562 msgid "guestfs_luks_format_cipher"
26566 #: ../src/guestfs-actions.pod:4217
26570 " guestfs_luks_format_cipher (guestfs_h *g,\n"
26571 " const char *device,\n"
26572 " const char *key,\n"
26574 " const char *cipher);\n"
26579 #: ../src/guestfs-actions.pod:4224
26581 "This command is the same as C<guestfs_luks_format> but it also allows you to "
26582 "set the C<cipher> used."
26586 #: ../src/guestfs-actions.pod:4238
26587 msgid "guestfs_luks_kill_slot"
26591 #: ../src/guestfs-actions.pod:4240
26595 " guestfs_luks_kill_slot (guestfs_h *g,\n"
26596 " const char *device,\n"
26597 " const char *key,\n"
26603 #: ../src/guestfs-actions.pod:4258
26604 msgid "guestfs_luks_open"
26608 #: ../src/guestfs-actions.pod:4260
26612 " guestfs_luks_open (guestfs_h *g,\n"
26613 " const char *device,\n"
26614 " const char *key,\n"
26615 " const char *mapname);\n"
26620 #: ../src/guestfs-actions.pod:4278
26622 "If this block device contains LVM volume groups, then calling "
26623 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
26628 #: ../src/guestfs-actions.pod:4282
26629 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
26633 #: ../src/guestfs-actions.pod:4293
26634 msgid "guestfs_luks_open_ro"
26638 #: ../src/guestfs-actions.pod:4295
26642 " guestfs_luks_open_ro (guestfs_h *g,\n"
26643 " const char *device,\n"
26644 " const char *key,\n"
26645 " const char *mapname);\n"
26650 #: ../src/guestfs-actions.pod:4301
26652 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
26657 #: ../src/guestfs-actions.pod:4312
26658 msgid "guestfs_lvcreate"
26662 #: ../src/guestfs-actions.pod:4314
26666 " guestfs_lvcreate (guestfs_h *g,\n"
26667 " const char *logvol,\n"
26668 " const char *volgroup,\n"
26674 #: ../src/guestfs-actions.pod:4327
26675 msgid "guestfs_lvm_canonical_lv_name"
26679 #: ../src/guestfs-actions.pod:4329
26683 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
26684 " const char *lvname);\n"
26689 #: ../src/guestfs-actions.pod:4340
26690 msgid "See also C<guestfs_is_lv>."
26694 #: ../src/guestfs-actions.pod:4345
26695 msgid "(Added in 1.5.24)"
26699 #: ../src/guestfs-actions.pod:4347
26700 msgid "guestfs_lvm_clear_filter"
26704 #: ../src/guestfs-actions.pod:4349
26708 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
26713 #: ../src/guestfs-actions.pod:4352
26715 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
26716 "see every block device."
26720 #: ../src/guestfs-actions.pod:4362
26721 msgid "guestfs_lvm_remove_all"
26725 #: ../src/guestfs-actions.pod:4364
26729 " guestfs_lvm_remove_all (guestfs_h *g);\n"
26734 #: ../src/guestfs-actions.pod:4377
26735 msgid "guestfs_lvm_set_filter"
26739 #: ../src/guestfs-actions.pod:4379
26743 " guestfs_lvm_set_filter (guestfs_h *g,\n"
26744 " char *const *devices);\n"
26749 #: ../src/guestfs-actions.pod:4410
26750 msgid "guestfs_lvremove"
26754 #: ../src/guestfs-actions.pod:4412
26758 " guestfs_lvremove (guestfs_h *g,\n"
26759 " const char *device);\n"
26764 #: ../src/guestfs-actions.pod:4424 ../src/guestfs-actions.pod:5817 ../src/guestfs-actions.pod:7667
26765 msgid "(Added in 1.0.13)"
26769 #: ../src/guestfs-actions.pod:4426
26770 msgid "guestfs_lvrename"
26774 #: ../src/guestfs-actions.pod:4428
26778 " guestfs_lvrename (guestfs_h *g,\n"
26779 " const char *logvol,\n"
26780 " const char *newlogvol);\n"
26785 #: ../src/guestfs-actions.pod:4437 ../src/guestfs-actions.pod:7680
26786 msgid "(Added in 1.0.83)"
26790 #: ../src/guestfs-actions.pod:4439
26791 msgid "guestfs_lvresize"
26795 #: ../src/guestfs-actions.pod:4441
26799 " guestfs_lvresize (guestfs_h *g,\n"
26800 " const char *device,\n"
26806 #: ../src/guestfs-actions.pod:4454
26807 msgid "guestfs_lvresize_free"
26811 #: ../src/guestfs-actions.pod:4456
26815 " guestfs_lvresize_free (guestfs_h *g,\n"
26816 " const char *lv,\n"
26822 #: ../src/guestfs-actions.pod:4469
26823 msgid "(Added in 1.3.3)"
26827 #: ../src/guestfs-actions.pod:4471
26828 msgid "guestfs_lvs"
26832 #: ../src/guestfs-actions.pod:4473
26836 " guestfs_lvs (guestfs_h *g);\n"
26841 #: ../src/guestfs-actions.pod:4482
26842 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
26846 #: ../src/guestfs-actions.pod:4490
26847 msgid "guestfs_lvs_full"
26851 #: ../src/guestfs-actions.pod:4492
26854 " struct guestfs_lvm_lv_list *\n"
26855 " guestfs_lvs_full (guestfs_h *g);\n"
26860 #: ../src/guestfs-actions.pod:4498
26862 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
26863 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
26868 #: ../src/guestfs-actions.pod:4504
26869 msgid "guestfs_lvuuid"
26873 #: ../src/guestfs-actions.pod:4506
26877 " guestfs_lvuuid (guestfs_h *g,\n"
26878 " const char *device);\n"
26883 #: ../src/guestfs-actions.pod:4517
26884 msgid "guestfs_lxattrlist"
26888 #: ../src/guestfs-actions.pod:4519
26891 " struct guestfs_xattr_list *\n"
26892 " guestfs_lxattrlist (guestfs_h *g,\n"
26893 " const char *path,\n"
26894 " char *const *names);\n"
26899 #: ../src/guestfs-actions.pod:4538
26901 "This call is intended for programs that want to efficiently list a directory "
26902 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
26903 "a similarly efficient call for getting standard stats. Very long directory "
26904 "listings might cause the protocol message size to be exceeded, causing this "
26905 "call to fail. The caller must split up such requests into smaller groups of "
26910 #: ../src/guestfs-actions.pod:4552
26911 msgid "guestfs_mkdir"
26915 #: ../src/guestfs-actions.pod:4554
26919 " guestfs_mkdir (guestfs_h *g,\n"
26920 " const char *path);\n"
26925 #: ../src/guestfs-actions.pod:4564
26926 msgid "guestfs_mkdir_mode"
26930 #: ../src/guestfs-actions.pod:4566
26934 " guestfs_mkdir_mode (guestfs_h *g,\n"
26935 " const char *path,\n"
26941 #: ../src/guestfs-actions.pod:4578
26942 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
26946 #: ../src/guestfs-actions.pod:4584
26947 msgid "guestfs_mkdir_p"
26951 #: ../src/guestfs-actions.pod:4586
26955 " guestfs_mkdir_p (guestfs_h *g,\n"
26956 " const char *path);\n"
26961 #: ../src/guestfs-actions.pod:4597
26962 msgid "guestfs_mkdtemp"
26966 #: ../src/guestfs-actions.pod:4599
26970 " guestfs_mkdtemp (guestfs_h *g,\n"
26971 " const char *template);\n"
26976 #: ../src/guestfs-actions.pod:4627
26977 msgid "guestfs_mke2fs_J"
26981 #: ../src/guestfs-actions.pod:4629
26985 " guestfs_mke2fs_J (guestfs_h *g,\n"
26986 " const char *fstype,\n"
26987 " int blocksize,\n"
26988 " const char *device,\n"
26989 " const char *journal);\n"
26994 #: ../src/guestfs-actions.pod:4642
26995 msgid "See also C<guestfs_mke2journal>."
26999 #: ../src/guestfs-actions.pod:4646 ../src/guestfs-actions.pod:4664 ../src/guestfs-actions.pod:4682 ../src/guestfs-actions.pod:4698 ../src/guestfs-actions.pod:4712 ../src/guestfs-actions.pod:4726 ../src/guestfs-actions.pod:4785 ../src/guestfs-actions.pod:5062
27000 msgid "(Added in 1.0.68)"
27004 #: ../src/guestfs-actions.pod:4648
27005 msgid "guestfs_mke2fs_JL"
27009 #: ../src/guestfs-actions.pod:4650
27013 " guestfs_mke2fs_JL (guestfs_h *g,\n"
27014 " const char *fstype,\n"
27015 " int blocksize,\n"
27016 " const char *device,\n"
27017 " const char *label);\n"
27022 #: ../src/guestfs-actions.pod:4660
27023 msgid "See also C<guestfs_mke2journal_L>."
27027 #: ../src/guestfs-actions.pod:4666
27028 msgid "guestfs_mke2fs_JU"
27032 #: ../src/guestfs-actions.pod:4668
27036 " guestfs_mke2fs_JU (guestfs_h *g,\n"
27037 " const char *fstype,\n"
27038 " int blocksize,\n"
27039 " const char *device,\n"
27040 " const char *uuid);\n"
27045 #: ../src/guestfs-actions.pod:4678
27046 msgid "See also C<guestfs_mke2journal_U>."
27050 #: ../src/guestfs-actions.pod:4684
27051 msgid "guestfs_mke2journal"
27055 #: ../src/guestfs-actions.pod:4686
27059 " guestfs_mke2journal (guestfs_h *g,\n"
27060 " int blocksize,\n"
27061 " const char *device);\n"
27066 #: ../src/guestfs-actions.pod:4700
27067 msgid "guestfs_mke2journal_L"
27071 #: ../src/guestfs-actions.pod:4702
27075 " guestfs_mke2journal_L (guestfs_h *g,\n"
27076 " int blocksize,\n"
27077 " const char *label,\n"
27078 " const char *device);\n"
27083 #: ../src/guestfs-actions.pod:4714
27084 msgid "guestfs_mke2journal_U"
27088 #: ../src/guestfs-actions.pod:4716
27092 " guestfs_mke2journal_U (guestfs_h *g,\n"
27093 " int blocksize,\n"
27094 " const char *uuid,\n"
27095 " const char *device);\n"
27100 #: ../src/guestfs-actions.pod:4728
27101 msgid "guestfs_mkfifo"
27105 #: ../src/guestfs-actions.pod:4730
27109 " guestfs_mkfifo (guestfs_h *g,\n"
27111 " const char *path);\n"
27116 #: ../src/guestfs-actions.pod:4735
27118 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
27119 "is just a convenient wrapper around C<guestfs_mknod>."
27123 #: ../src/guestfs-actions.pod:4745
27124 msgid "guestfs_mkfs"
27128 #: ../src/guestfs-actions.pod:4747
27132 " guestfs_mkfs (guestfs_h *g,\n"
27133 " const char *fstype,\n"
27134 " const char *device);\n"
27139 #: ../src/guestfs-actions.pod:4760
27140 msgid "guestfs_mkfs_b"
27144 #: ../src/guestfs-actions.pod:4762
27148 " guestfs_mkfs_b (guestfs_h *g,\n"
27149 " const char *fstype,\n"
27150 " int blocksize,\n"
27151 " const char *device);\n"
27156 #: ../src/guestfs-actions.pod:4768
27158 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
27163 #: ../src/guestfs-actions.pod:4775
27165 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
27166 "block size of the resulting filesystem. Supported block sizes depend on the "
27167 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
27171 #: ../src/guestfs-actions.pod:4787
27172 msgid "guestfs_mkfs_opts"
27176 #: ../src/guestfs-actions.pod:4789
27180 " guestfs_mkfs_opts (guestfs_h *g,\n"
27181 " const char *fstype,\n"
27182 " const char *device,\n"
27188 #: ../src/guestfs-actions.pod:4800
27191 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
27192 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
27193 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
27194 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
27199 #: ../src/guestfs-actions.pod:4848
27200 msgid "(Added in 1.7.19)"
27204 #: ../src/guestfs-actions.pod:4850
27205 msgid "guestfs_mkfs_opts_va"
27209 #: ../src/guestfs-actions.pod:4852
27213 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
27214 " const char *fstype,\n"
27215 " const char *device,\n"
27216 " va_list args);\n"
27221 #: ../src/guestfs-actions.pod:4858
27222 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
27226 #: ../src/guestfs-actions.pod:4862
27227 msgid "guestfs_mkfs_opts_argv"
27231 #: ../src/guestfs-actions.pod:4864
27235 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
27236 " const char *fstype,\n"
27237 " const char *device,\n"
27238 " const struct guestfs_mkfs_opts_argv *optargs);\n"
27243 #: ../src/guestfs-actions.pod:4870
27244 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
27248 #: ../src/guestfs-actions.pod:4874
27249 msgid "guestfs_mkmountpoint"
27253 #: ../src/guestfs-actions.pod:4876
27257 " guestfs_mkmountpoint (guestfs_h *g,\n"
27258 " const char *exemptpath);\n"
27263 #: ../src/guestfs-actions.pod:4880
27265 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
27266 "that can be used to create extra mountpoints before mounting the first "
27271 #: ../src/guestfs-actions.pod:4904
27273 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
27274 "may get unexpected errors if you try to mix these calls. It is safest to "
27275 "manually unmount filesystems and remove mountpoints after use."
27279 #: ../src/guestfs-actions.pod:4908
27281 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
27282 "first, so for this to work for manual mountpoints, you must ensure that the "
27283 "innermost mountpoints have the longest pathnames, as in the example code "
27288 #: ../src/guestfs-actions.pod:4915
27290 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
27291 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
27292 "can also trigger these issues."
27296 #: ../src/guestfs-actions.pod:4921 ../src/guestfs-actions.pod:5227 ../src/guestfs-actions.pod:6237
27297 msgid "(Added in 1.0.62)"
27301 #: ../src/guestfs-actions.pod:4923
27302 msgid "guestfs_mknod"
27306 #: ../src/guestfs-actions.pod:4925
27310 " guestfs_mknod (guestfs_h *g,\n"
27314 " const char *path);\n"
27319 #: ../src/guestfs-actions.pod:4940
27321 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
27322 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
27323 "regular file). These constants are available in the standard Linux header "
27324 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
27325 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
27326 "the appropriate constant for you."
27330 #: ../src/guestfs-actions.pod:4954
27331 msgid "guestfs_mknod_b"
27335 #: ../src/guestfs-actions.pod:4956
27339 " guestfs_mknod_b (guestfs_h *g,\n"
27343 " const char *path);\n"
27348 #: ../src/guestfs-actions.pod:4963
27350 "This call creates a block device node called C<path> with mode C<mode> and "
27351 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27352 "wrapper around C<guestfs_mknod>."
27356 #: ../src/guestfs-actions.pod:4973
27357 msgid "guestfs_mknod_c"
27361 #: ../src/guestfs-actions.pod:4975
27365 " guestfs_mknod_c (guestfs_h *g,\n"
27369 " const char *path);\n"
27374 #: ../src/guestfs-actions.pod:4982
27376 "This call creates a char device node called C<path> with mode C<mode> and "
27377 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27378 "wrapper around C<guestfs_mknod>."
27382 #: ../src/guestfs-actions.pod:4992
27383 msgid "guestfs_mkswap"
27387 #: ../src/guestfs-actions.pod:4994
27391 " guestfs_mkswap (guestfs_h *g,\n"
27392 " const char *device);\n"
27397 #: ../src/guestfs-actions.pod:5004
27398 msgid "guestfs_mkswap_L"
27402 #: ../src/guestfs-actions.pod:5006
27406 " guestfs_mkswap_L (guestfs_h *g,\n"
27407 " const char *label,\n"
27408 " const char *device);\n"
27413 #: ../src/guestfs-actions.pod:5021
27414 msgid "guestfs_mkswap_U"
27418 #: ../src/guestfs-actions.pod:5023
27422 " guestfs_mkswap_U (guestfs_h *g,\n"
27423 " const char *uuid,\n"
27424 " const char *device);\n"
27429 #: ../src/guestfs-actions.pod:5034
27430 msgid "guestfs_mkswap_file"
27434 #: ../src/guestfs-actions.pod:5036
27438 " guestfs_mkswap_file (guestfs_h *g,\n"
27439 " const char *path);\n"
27444 #: ../src/guestfs-actions.pod:5042
27446 "This command just writes a swap file signature to an existing file. To "
27447 "create the file itself, use something like C<guestfs_fallocate>."
27451 #: ../src/guestfs-actions.pod:5049
27452 msgid "guestfs_modprobe"
27456 #: ../src/guestfs-actions.pod:5051
27460 " guestfs_modprobe (guestfs_h *g,\n"
27461 " const char *modulename);\n"
27466 #: ../src/guestfs-actions.pod:5064
27467 msgid "guestfs_mount"
27471 #: ../src/guestfs-actions.pod:5066
27475 " guestfs_mount (guestfs_h *g,\n"
27476 " const char *device,\n"
27477 " const char *mountpoint);\n"
27482 #: ../src/guestfs-actions.pod:5085
27484 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
27485 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
27486 "problems for users. If your program might need to work with older versions "
27487 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
27488 "for the first parameter if you don't want any options)."
27492 #: ../src/guestfs-actions.pod:5096
27493 msgid "guestfs_mount_9p"
27497 #: ../src/guestfs-actions.pod:5098
27501 " guestfs_mount_9p (guestfs_h *g,\n"
27502 " const char *mounttag,\n"
27503 " const char *mountpoint,\n"
27509 #: ../src/guestfs-actions.pod:5109
27512 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
27517 #: ../src/guestfs-actions.pod:5122
27518 msgid "guestfs_mount_9p_va"
27522 #: ../src/guestfs-actions.pod:5124
27526 " guestfs_mount_9p_va (guestfs_h *g,\n"
27527 " const char *mounttag,\n"
27528 " const char *mountpoint,\n"
27529 " va_list args);\n"
27534 #: ../src/guestfs-actions.pod:5130
27535 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
27539 #: ../src/guestfs-actions.pod:5134
27540 msgid "guestfs_mount_9p_argv"
27544 #: ../src/guestfs-actions.pod:5136
27548 " guestfs_mount_9p_argv (guestfs_h *g,\n"
27549 " const char *mounttag,\n"
27550 " const char *mountpoint,\n"
27551 " const struct guestfs_mount_9p_argv *optargs);\n"
27556 #: ../src/guestfs-actions.pod:5142
27557 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
27561 #: ../src/guestfs-actions.pod:5146
27562 msgid "guestfs_mount_loop"
27566 #: ../src/guestfs-actions.pod:5148
27570 " guestfs_mount_loop (guestfs_h *g,\n"
27571 " const char *file,\n"
27572 " const char *mountpoint);\n"
27577 #: ../src/guestfs-actions.pod:5161
27578 msgid "guestfs_mount_options"
27582 #: ../src/guestfs-actions.pod:5163
27586 " guestfs_mount_options (guestfs_h *g,\n"
27587 " const char *options,\n"
27588 " const char *device,\n"
27589 " const char *mountpoint);\n"
27594 #: ../src/guestfs-actions.pod:5169
27596 "This is the same as the C<guestfs_mount> command, but it allows you to set "
27597 "the mount options as for the L<mount(8)> I<-o> flag."
27601 #: ../src/guestfs-actions.pod:5179 ../src/guestfs-actions.pod:5193 ../src/guestfs-actions.pod:5210
27602 msgid "(Added in 1.0.10)"
27606 #: ../src/guestfs-actions.pod:5181
27607 msgid "guestfs_mount_ro"
27611 #: ../src/guestfs-actions.pod:5183
27615 " guestfs_mount_ro (guestfs_h *g,\n"
27616 " const char *device,\n"
27617 " const char *mountpoint);\n"
27622 #: ../src/guestfs-actions.pod:5188
27624 "This is the same as the C<guestfs_mount> command, but it mounts the "
27625 "filesystem with the read-only (I<-o ro>) flag."
27629 #: ../src/guestfs-actions.pod:5195
27630 msgid "guestfs_mount_vfs"
27634 #: ../src/guestfs-actions.pod:5197
27638 " guestfs_mount_vfs (guestfs_h *g,\n"
27639 " const char *options,\n"
27640 " const char *vfstype,\n"
27641 " const char *device,\n"
27642 " const char *mountpoint);\n"
27647 #: ../src/guestfs-actions.pod:5204
27649 "This is the same as the C<guestfs_mount> command, but it allows you to set "
27650 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
27655 #: ../src/guestfs-actions.pod:5212
27656 msgid "guestfs_mountpoints"
27660 #: ../src/guestfs-actions.pod:5214
27664 " guestfs_mountpoints (guestfs_h *g);\n"
27669 #: ../src/guestfs-actions.pod:5217
27671 "This call is similar to C<guestfs_mounts>. That call returns a list of "
27672 "devices. This one returns a hash table (map) of device name to directory "
27673 "where the device is mounted."
27677 #: ../src/guestfs-actions.pod:5229
27678 msgid "guestfs_mounts"
27682 #: ../src/guestfs-actions.pod:5231
27686 " guestfs_mounts (guestfs_h *g);\n"
27691 #: ../src/guestfs-actions.pod:5239
27692 msgid "See also: C<guestfs_mountpoints>"
27696 #: ../src/guestfs-actions.pod:5247
27701 #: ../src/guestfs-actions.pod:5249
27705 " guestfs_mv (guestfs_h *g,\n"
27706 " const char *src,\n"
27707 " const char *dest);\n"
27712 #: ../src/guestfs-actions.pod:5261
27713 msgid "guestfs_ntfs_3g_probe"
27717 #: ../src/guestfs-actions.pod:5263
27721 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
27723 " const char *device);\n"
27728 #: ../src/guestfs-actions.pod:5282
27729 msgid "(Added in 1.0.43)"
27733 #: ../src/guestfs-actions.pod:5284
27734 msgid "guestfs_ntfsresize"
27738 #: ../src/guestfs-actions.pod:5286
27742 " guestfs_ntfsresize (guestfs_h *g,\n"
27743 " const char *device);\n"
27748 #: ../src/guestfs-actions.pod:5290 ../src/guestfs-actions.pod:5390
27750 "I<This function is deprecated.> In new code, use the "
27751 "L</guestfs_ntfsresize_opts> call instead."
27755 #: ../src/guestfs-actions.pod:5314
27756 msgid "guestfs_ntfsresize_opts"
27760 #: ../src/guestfs-actions.pod:5316
27764 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
27765 " const char *device,\n"
27771 #: ../src/guestfs-actions.pod:5326
27774 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
27775 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
27780 #: ../src/guestfs-actions.pod:5346
27782 "After the resize operation, the filesystem is always marked as requiring a "
27783 "consistency check (for safety). You have to boot into Windows to perform "
27784 "this check and clear this condition. If you I<don't> set the C<force> "
27785 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
27786 "times on a single filesystem without booting into Windows between each "
27791 #: ../src/guestfs-actions.pod:5361
27792 msgid "guestfs_ntfsresize_opts_va"
27796 #: ../src/guestfs-actions.pod:5363
27800 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
27801 " const char *device,\n"
27802 " va_list args);\n"
27807 #: ../src/guestfs-actions.pod:5368
27808 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
27812 #: ../src/guestfs-actions.pod:5372
27813 msgid "guestfs_ntfsresize_opts_argv"
27817 #: ../src/guestfs-actions.pod:5374
27821 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
27822 " const char *device,\n"
27823 " const struct guestfs_ntfsresize_opts_argv "
27829 #: ../src/guestfs-actions.pod:5379
27830 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
27834 #: ../src/guestfs-actions.pod:5383
27835 msgid "guestfs_ntfsresize_size"
27839 #: ../src/guestfs-actions.pod:5385
27843 " guestfs_ntfsresize_size (guestfs_h *g,\n"
27844 " const char *device,\n"
27845 " int64_t size);\n"
27850 #: ../src/guestfs-actions.pod:5397
27852 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
27853 "to specify the new size (in bytes) explicitly."
27857 #: ../src/guestfs-actions.pod:5402 ../src/guestfs-actions.pod:5844 ../src/guestfs-actions.pod:5917 ../src/guestfs-actions.pod:6185 ../src/guestfs-actions.pod:7824
27858 msgid "(Added in 1.3.14)"
27862 #: ../src/guestfs-actions.pod:5404
27863 msgid "guestfs_part_add"
27867 #: ../src/guestfs-actions.pod:5406
27871 " guestfs_part_add (guestfs_h *g,\n"
27872 " const char *device,\n"
27873 " const char *prlogex,\n"
27874 " int64_t startsect,\n"
27875 " int64_t endsect);\n"
27880 #: ../src/guestfs-actions.pod:5413
27882 "This command adds a partition to C<device>. If there is no partition table "
27883 "on the device, call C<guestfs_part_init> first."
27887 #: ../src/guestfs-actions.pod:5425
27889 "Creating a partition which covers the whole disk is not so easy. Use "
27890 "C<guestfs_part_disk> to do that."
27894 #: ../src/guestfs-actions.pod:5430 ../src/guestfs-actions.pod:5468 ../src/guestfs-actions.pod:5521 ../src/guestfs-actions.pod:5605 ../src/guestfs-actions.pod:5643 ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5702
27895 msgid "(Added in 1.0.78)"
27899 #: ../src/guestfs-actions.pod:5432
27900 msgid "guestfs_part_del"
27904 #: ../src/guestfs-actions.pod:5434
27908 " guestfs_part_del (guestfs_h *g,\n"
27909 " const char *device,\n"
27915 #: ../src/guestfs-actions.pod:5449
27916 msgid "guestfs_part_disk"
27920 #: ../src/guestfs-actions.pod:5451
27924 " guestfs_part_disk (guestfs_h *g,\n"
27925 " const char *device,\n"
27926 " const char *parttype);\n"
27931 #: ../src/guestfs-actions.pod:5456
27933 "This command is simply a combination of C<guestfs_part_init> followed by "
27934 "C<guestfs_part_add> to create a single primary partition covering the whole "
27939 #: ../src/guestfs-actions.pod:5460
27941 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
27942 "possible values are described in C<guestfs_part_init>."
27946 #: ../src/guestfs-actions.pod:5470
27947 msgid "guestfs_part_get_bootable"
27951 #: ../src/guestfs-actions.pod:5472
27955 " guestfs_part_get_bootable (guestfs_h *g,\n"
27956 " const char *device,\n"
27962 #: ../src/guestfs-actions.pod:5480
27963 msgid "See also C<guestfs_part_set_bootable>."
27967 #: ../src/guestfs-actions.pod:5486
27968 msgid "guestfs_part_get_mbr_id"
27972 #: ../src/guestfs-actions.pod:5488
27976 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
27977 " const char *device,\n"
27983 #: ../src/guestfs-actions.pod:5496 ../src/guestfs-actions.pod:5678
27985 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
27986 "undefined results for other partition table types (see "
27987 "C<guestfs_part_get_parttype>)."
27991 #: ../src/guestfs-actions.pod:5504
27992 msgid "guestfs_part_get_parttype"
27996 #: ../src/guestfs-actions.pod:5506
28000 " guestfs_part_get_parttype (guestfs_h *g,\n"
28001 " const char *device);\n"
28006 #: ../src/guestfs-actions.pod:5513
28008 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
28009 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
28010 "possible, although unusual. See C<guestfs_part_init> for a full list."
28014 #: ../src/guestfs-actions.pod:5523
28015 msgid "guestfs_part_init"
28019 #: ../src/guestfs-actions.pod:5525
28023 " guestfs_part_init (guestfs_h *g,\n"
28024 " const char *device,\n"
28025 " const char *parttype);\n"
28030 #: ../src/guestfs-actions.pod:5534
28032 "Initially there are no partitions. Following this, you should call "
28033 "C<guestfs_part_add> for each partition required."
28037 #: ../src/guestfs-actions.pod:5607
28038 msgid "guestfs_part_list"
28042 #: ../src/guestfs-actions.pod:5609
28045 " struct guestfs_partition_list *\n"
28046 " guestfs_part_list (guestfs_h *g,\n"
28047 " const char *device);\n"
28052 #: ../src/guestfs-actions.pod:5626
28054 "Start of the partition I<in bytes>. To get sectors you have to divide by "
28055 "the device's sector size, see C<guestfs_blockdev_getss>."
28059 #: ../src/guestfs-actions.pod:5639
28061 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
28062 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
28067 #: ../src/guestfs-actions.pod:5645
28068 msgid "guestfs_part_set_bootable"
28072 #: ../src/guestfs-actions.pod:5647
28076 " guestfs_part_set_bootable (guestfs_h *g,\n"
28077 " const char *device,\n"
28079 " int bootable);\n"
28084 #: ../src/guestfs-actions.pod:5664
28085 msgid "guestfs_part_set_mbr_id"
28089 #: ../src/guestfs-actions.pod:5666
28093 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
28094 " const char *device,\n"
28101 #: ../src/guestfs-actions.pod:5686
28102 msgid "guestfs_part_set_name"
28106 #: ../src/guestfs-actions.pod:5688
28110 " guestfs_part_set_name (guestfs_h *g,\n"
28111 " const char *device,\n"
28113 " const char *name);\n"
28118 #: ../src/guestfs-actions.pod:5704
28119 msgid "guestfs_part_to_dev"
28123 #: ../src/guestfs-actions.pod:5706
28127 " guestfs_part_to_dev (guestfs_h *g,\n"
28128 " const char *partition);\n"
28133 #: ../src/guestfs-actions.pod:5714
28135 "The named partition must exist, for example as a string returned from "
28136 "C<guestfs_list_partitions>."
28140 #: ../src/guestfs-actions.pod:5722
28141 msgid "guestfs_ping_daemon"
28145 #: ../src/guestfs-actions.pod:5724
28149 " guestfs_ping_daemon (guestfs_h *g);\n"
28154 #: ../src/guestfs-actions.pod:5736
28155 msgid "guestfs_pread"
28159 #: ../src/guestfs-actions.pod:5738
28163 " guestfs_pread (guestfs_h *g,\n"
28164 " const char *path,\n"
28166 " int64_t offset,\n"
28167 " size_t *size_r);\n"
28172 #: ../src/guestfs-actions.pod:5751
28173 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
28177 #: ../src/guestfs-actions.pod:5762
28178 msgid "guestfs_pread_device"
28182 #: ../src/guestfs-actions.pod:5764
28186 " guestfs_pread_device (guestfs_h *g,\n"
28187 " const char *device,\n"
28189 " int64_t offset,\n"
28190 " size_t *size_r);\n"
28195 #: ../src/guestfs-actions.pod:5777
28196 msgid "See also C<guestfs_pread>."
28200 #: ../src/guestfs-actions.pod:5786
28201 msgid "(Added in 1.5.21)"
28205 #: ../src/guestfs-actions.pod:5788
28206 msgid "guestfs_pvcreate"
28210 #: ../src/guestfs-actions.pod:5790
28214 " guestfs_pvcreate (guestfs_h *g,\n"
28215 " const char *device);\n"
28220 #: ../src/guestfs-actions.pod:5802
28221 msgid "guestfs_pvremove"
28225 #: ../src/guestfs-actions.pod:5804
28229 " guestfs_pvremove (guestfs_h *g,\n"
28230 " const char *device);\n"
28235 #: ../src/guestfs-actions.pod:5819
28236 msgid "guestfs_pvresize"
28240 #: ../src/guestfs-actions.pod:5821
28244 " guestfs_pvresize (guestfs_h *g,\n"
28245 " const char *device);\n"
28250 #: ../src/guestfs-actions.pod:5832
28251 msgid "guestfs_pvresize_size"
28255 #: ../src/guestfs-actions.pod:5834
28259 " guestfs_pvresize_size (guestfs_h *g,\n"
28260 " const char *device,\n"
28261 " int64_t size);\n"
28266 #: ../src/guestfs-actions.pod:5839
28268 "This command is the same as C<guestfs_pvresize> except that it allows you to "
28269 "specify the new size (in bytes) explicitly."
28273 #: ../src/guestfs-actions.pod:5846
28274 msgid "guestfs_pvs"
28278 #: ../src/guestfs-actions.pod:5848
28282 " guestfs_pvs (guestfs_h *g);\n"
28287 #: ../src/guestfs-actions.pod:5857
28288 msgid "See also C<guestfs_pvs_full>."
28292 #: ../src/guestfs-actions.pod:5865
28293 msgid "guestfs_pvs_full"
28297 #: ../src/guestfs-actions.pod:5867
28300 " struct guestfs_lvm_pv_list *\n"
28301 " guestfs_pvs_full (guestfs_h *g);\n"
28306 #: ../src/guestfs-actions.pod:5873
28308 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
28309 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
28314 #: ../src/guestfs-actions.pod:5879
28315 msgid "guestfs_pvuuid"
28319 #: ../src/guestfs-actions.pod:5881
28323 " guestfs_pvuuid (guestfs_h *g,\n"
28324 " const char *device);\n"
28329 #: ../src/guestfs-actions.pod:5892
28330 msgid "guestfs_pwrite"
28334 #: ../src/guestfs-actions.pod:5894
28338 " guestfs_pwrite (guestfs_h *g,\n"
28339 " const char *path,\n"
28340 " const char *content,\n"
28341 " size_t content_size,\n"
28342 " int64_t offset);\n"
28347 #: ../src/guestfs-actions.pod:5910
28348 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
28352 #: ../src/guestfs-actions.pod:5919
28353 msgid "guestfs_pwrite_device"
28357 #: ../src/guestfs-actions.pod:5921
28361 " guestfs_pwrite_device (guestfs_h *g,\n"
28362 " const char *device,\n"
28363 " const char *content,\n"
28364 " size_t content_size,\n"
28365 " int64_t offset);\n"
28370 #: ../src/guestfs-actions.pod:5936
28371 msgid "See also C<guestfs_pwrite>."
28375 #: ../src/guestfs-actions.pod:5943
28376 msgid "(Added in 1.5.20)"
28380 #: ../src/guestfs-actions.pod:5945
28381 msgid "guestfs_read_file"
28385 #: ../src/guestfs-actions.pod:5947
28389 " guestfs_read_file (guestfs_h *g,\n"
28390 " const char *path,\n"
28391 " size_t *size_r);\n"
28396 #: ../src/guestfs-actions.pod:5955
28398 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
28399 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
28400 "function is limited in the total size of file that can be handled."
28404 #: ../src/guestfs-actions.pod:5967
28405 msgid "(Added in 1.0.63)"
28409 #: ../src/guestfs-actions.pod:5969
28410 msgid "guestfs_read_lines"
28414 #: ../src/guestfs-actions.pod:5971
28418 " guestfs_read_lines (guestfs_h *g,\n"
28419 " const char *path);\n"
28424 #: ../src/guestfs-actions.pod:5980
28426 "Note that this function cannot correctly handle binary files (specifically, "
28427 "files containing C<\\0> character which is treated as end of line). For "
28428 "those you need to use the C<guestfs_read_file> function which has a more "
28429 "complex interface."
28433 #: ../src/guestfs-actions.pod:5991
28434 msgid "guestfs_readdir"
28438 #: ../src/guestfs-actions.pod:5993
28441 " struct guestfs_dirent_list *\n"
28442 " guestfs_readdir (guestfs_h *g,\n"
28443 " const char *dir);\n"
28448 #: ../src/guestfs-actions.pod:6047
28450 "This function is primarily intended for use by programs. To get a simple "
28451 "list of names, use C<guestfs_ls>. To get a printable directory for human "
28452 "consumption, use C<guestfs_ll>."
28456 #: ../src/guestfs-actions.pod:6051
28458 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
28459 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
28464 #: ../src/guestfs-actions.pod:6057
28465 msgid "guestfs_readlink"
28469 #: ../src/guestfs-actions.pod:6059
28473 " guestfs_readlink (guestfs_h *g,\n"
28474 " const char *path);\n"
28479 #: ../src/guestfs-actions.pod:6070
28480 msgid "guestfs_readlinklist"
28484 #: ../src/guestfs-actions.pod:6072
28488 " guestfs_readlinklist (guestfs_h *g,\n"
28489 " const char *path,\n"
28490 " char *const *names);\n"
28495 #: ../src/guestfs-actions.pod:6105
28496 msgid "guestfs_realpath"
28500 #: ../src/guestfs-actions.pod:6107
28504 " guestfs_realpath (guestfs_h *g,\n"
28505 " const char *path);\n"
28510 #: ../src/guestfs-actions.pod:6119
28511 msgid "guestfs_removexattr"
28515 #: ../src/guestfs-actions.pod:6121
28519 " guestfs_removexattr (guestfs_h *g,\n"
28520 " const char *xattr,\n"
28521 " const char *path);\n"
28526 #: ../src/guestfs-actions.pod:6129
28527 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
28531 #: ../src/guestfs-actions.pod:6135
28532 msgid "guestfs_resize2fs"
28536 #: ../src/guestfs-actions.pod:6137
28540 " guestfs_resize2fs (guestfs_h *g,\n"
28541 " const char *device);\n"
28546 #: ../src/guestfs-actions.pod:6144
28548 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
28549 "C<device> before calling this command. For unknown reasons C<resize2fs> "
28550 "sometimes gives an error about this and sometimes not. In any case, it is "
28551 "always safe to call C<guestfs_e2fsck_f> before calling this function."
28555 #: ../src/guestfs-actions.pod:6154
28556 msgid "guestfs_resize2fs_M"
28560 #: ../src/guestfs-actions.pod:6156
28564 " guestfs_resize2fs_M (guestfs_h *g,\n"
28565 " const char *device);\n"
28570 #: ../src/guestfs-actions.pod:6160
28572 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
28573 "resized to its minimum size. This works like the I<-M> option to the "
28574 "C<resize2fs> command."
28578 #: ../src/guestfs-actions.pod:6164
28580 "To get the resulting size of the filesystem you should call "
28581 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
28582 "These two numbers, multiplied together, give the resulting size of the "
28583 "minimal filesystem in bytes."
28587 #: ../src/guestfs-actions.pod:6173
28588 msgid "guestfs_resize2fs_size"
28592 #: ../src/guestfs-actions.pod:6175
28596 " guestfs_resize2fs_size (guestfs_h *g,\n"
28597 " const char *device,\n"
28598 " int64_t size);\n"
28603 #: ../src/guestfs-actions.pod:6180
28605 "This command is the same as C<guestfs_resize2fs> except that it allows you "
28606 "to specify the new size (in bytes) explicitly."
28610 #: ../src/guestfs-actions.pod:6187
28615 #: ../src/guestfs-actions.pod:6189
28619 " guestfs_rm (guestfs_h *g,\n"
28620 " const char *path);\n"
28625 #: ../src/guestfs-actions.pod:6199
28626 msgid "guestfs_rm_rf"
28630 #: ../src/guestfs-actions.pod:6201
28634 " guestfs_rm_rf (guestfs_h *g,\n"
28635 " const char *path);\n"
28640 #: ../src/guestfs-actions.pod:6213
28641 msgid "guestfs_rmdir"
28645 #: ../src/guestfs-actions.pod:6215
28649 " guestfs_rmdir (guestfs_h *g,\n"
28650 " const char *path);\n"
28655 #: ../src/guestfs-actions.pod:6225
28656 msgid "guestfs_rmmountpoint"
28660 #: ../src/guestfs-actions.pod:6227
28664 " guestfs_rmmountpoint (guestfs_h *g,\n"
28665 " const char *exemptpath);\n"
28670 #: ../src/guestfs-actions.pod:6231
28672 "This calls removes a mountpoint that was previously created with "
28673 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
28677 #: ../src/guestfs-actions.pod:6239
28678 msgid "guestfs_scrub_device"
28682 #: ../src/guestfs-actions.pod:6241
28686 " guestfs_scrub_device (guestfs_h *g,\n"
28687 " const char *device);\n"
28692 #: ../src/guestfs-actions.pod:6256 ../src/guestfs-actions.pod:6274 ../src/guestfs-actions.pod:6293
28693 msgid "(Added in 1.0.52)"
28697 #: ../src/guestfs-actions.pod:6258
28698 msgid "guestfs_scrub_file"
28702 #: ../src/guestfs-actions.pod:6260
28706 " guestfs_scrub_file (guestfs_h *g,\n"
28707 " const char *file);\n"
28712 #: ../src/guestfs-actions.pod:6276
28713 msgid "guestfs_scrub_freespace"
28717 #: ../src/guestfs-actions.pod:6278
28721 " guestfs_scrub_freespace (guestfs_h *g,\n"
28722 " const char *dir);\n"
28727 #: ../src/guestfs-actions.pod:6282
28729 "This command creates the directory C<dir> and then fills it with files until "
28730 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
28731 "and deletes them. The intention is to scrub any free space on the partition "
28732 "containing C<dir>."
28736 #: ../src/guestfs-actions.pod:6295
28737 msgid "guestfs_set_append"
28741 #: ../src/guestfs-actions.pod:6297
28745 " guestfs_set_append (guestfs_h *g,\n"
28746 " const char *append);\n"
28751 #: ../src/guestfs-actions.pod:6314
28752 msgid "guestfs_set_attach_method"
28756 #: ../src/guestfs-actions.pod:6316
28760 " guestfs_set_attach_method (guestfs_h *g,\n"
28761 " const char *attachmethod);\n"
28766 #: ../src/guestfs-actions.pod:6344
28767 msgid "guestfs_set_autosync"
28771 #: ../src/guestfs-actions.pod:6346
28775 " guestfs_set_autosync (guestfs_h *g,\n"
28776 " int autosync);\n"
28781 #: ../src/guestfs-actions.pod:6362
28782 msgid "guestfs_set_direct"
28786 #: ../src/guestfs-actions.pod:6364
28790 " guestfs_set_direct (guestfs_h *g,\n"
28796 #: ../src/guestfs-actions.pod:6372
28798 "One consequence of this is that log messages aren't caught by the library "
28799 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
28804 #: ../src/guestfs-actions.pod:6385
28805 msgid "guestfs_set_e2label"
28809 #: ../src/guestfs-actions.pod:6387
28813 " guestfs_set_e2label (guestfs_h *g,\n"
28814 " const char *device,\n"
28815 " const char *label);\n"
28820 #: ../src/guestfs-actions.pod:6396
28822 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
28823 "the existing label on a filesystem."
28827 #: ../src/guestfs-actions.pod:6403
28828 msgid "guestfs_set_e2uuid"
28832 #: ../src/guestfs-actions.pod:6405
28836 " guestfs_set_e2uuid (guestfs_h *g,\n"
28837 " const char *device,\n"
28838 " const char *uuid);\n"
28843 #: ../src/guestfs-actions.pod:6415
28845 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
28846 "the existing UUID of a filesystem."
28850 #: ../src/guestfs-actions.pod:6422
28851 msgid "guestfs_set_memsize"
28855 #: ../src/guestfs-actions.pod:6424
28859 " guestfs_set_memsize (guestfs_h *g,\n"
28865 #: ../src/guestfs-actions.pod:6428
28867 "This sets the memory size in megabytes allocated to the qemu subprocess. "
28868 "This only has any effect if called before C<guestfs_launch>."
28872 #: ../src/guestfs-actions.pod:6443
28873 msgid "guestfs_set_network"
28877 #: ../src/guestfs-actions.pod:6445
28881 " guestfs_set_network (guestfs_h *g,\n"
28887 #: ../src/guestfs-actions.pod:6455
28889 "You must call this before calling C<guestfs_launch>, otherwise it has no "
28894 #: ../src/guestfs-actions.pod:6462
28895 msgid "guestfs_set_path"
28899 #: ../src/guestfs-actions.pod:6464
28903 " guestfs_set_path (guestfs_h *g,\n"
28904 " const char *searchpath);\n"
28909 #: ../src/guestfs-actions.pod:6479
28910 msgid "guestfs_set_pgroup"
28914 #: ../src/guestfs-actions.pod:6481
28918 " guestfs_set_pgroup (guestfs_h *g,\n"
28924 #: ../src/guestfs-actions.pod:6498
28925 msgid "guestfs_set_qemu"
28929 #: ../src/guestfs-actions.pod:6500
28933 " guestfs_set_qemu (guestfs_h *g,\n"
28934 " const char *qemu);\n"
28939 #: ../src/guestfs-actions.pod:6526
28940 msgid "guestfs_set_recovery_proc"
28944 #: ../src/guestfs-actions.pod:6528
28948 " guestfs_set_recovery_proc (guestfs_h *g,\n"
28949 " int recoveryproc);\n"
28954 #: ../src/guestfs-actions.pod:6532
28956 "If this is called with the parameter C<false> then C<guestfs_launch> does "
28957 "not create a recovery process. The purpose of the recovery process is to "
28958 "stop runaway qemu processes in the case where the main program aborts "
28963 #: ../src/guestfs-actions.pod:6537
28965 "This only has any effect if called before C<guestfs_launch>, and the default "
28970 #: ../src/guestfs-actions.pod:6550
28971 msgid "guestfs_set_selinux"
28975 #: ../src/guestfs-actions.pod:6552
28979 " guestfs_set_selinux (guestfs_h *g,\n"
28985 #: ../src/guestfs-actions.pod:6569
28986 msgid "guestfs_set_smp"
28990 #: ../src/guestfs-actions.pod:6571
28994 " guestfs_set_smp (guestfs_h *g,\n"
29000 #: ../src/guestfs-actions.pod:6579
29001 msgid "This function must be called before C<guestfs_launch>."
29005 #: ../src/guestfs-actions.pod:6585
29006 msgid "guestfs_set_trace"
29010 #: ../src/guestfs-actions.pod:6587
29014 " guestfs_set_trace (guestfs_h *g,\n"
29020 #: ../src/guestfs-actions.pod:6601
29022 "Trace messages are normally sent to C<stderr>, unless you register a "
29023 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
29027 #: ../src/guestfs-actions.pod:6609
29028 msgid "guestfs_set_verbose"
29032 #: ../src/guestfs-actions.pod:6611
29036 " guestfs_set_verbose (guestfs_h *g,\n"
29042 #: ../src/guestfs-actions.pod:6620
29044 "Verbose messages are normally sent to C<stderr>, unless you register a "
29045 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
29049 #: ../src/guestfs-actions.pod:6628
29050 msgid "guestfs_setcon"
29054 #: ../src/guestfs-actions.pod:6630
29058 " guestfs_setcon (guestfs_h *g,\n"
29059 " const char *context);\n"
29064 #: ../src/guestfs-actions.pod:6643
29065 msgid "guestfs_setxattr"
29069 #: ../src/guestfs-actions.pod:6645
29073 " guestfs_setxattr (guestfs_h *g,\n"
29074 " const char *xattr,\n"
29075 " const char *val,\n"
29077 " const char *path);\n"
29082 #: ../src/guestfs-actions.pod:6656
29083 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
29087 #: ../src/guestfs-actions.pod:6662
29088 msgid "guestfs_sfdisk"
29092 #: ../src/guestfs-actions.pod:6664
29096 " guestfs_sfdisk (guestfs_h *g,\n"
29097 " const char *device,\n"
29101 " char *const *lines);\n"
29106 #: ../src/guestfs-actions.pod:6672 ../src/guestfs-actions.pod:6716 ../src/guestfs-actions.pod:6750
29108 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
29113 #: ../src/guestfs-actions.pod:6699
29114 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
29118 #: ../src/guestfs-actions.pod:6709
29119 msgid "guestfs_sfdiskM"
29123 #: ../src/guestfs-actions.pod:6711
29127 " guestfs_sfdiskM (guestfs_h *g,\n"
29128 " const char *device,\n"
29129 " char *const *lines);\n"
29134 #: ../src/guestfs-actions.pod:6723
29136 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
29137 "partition sizes are specified in megabytes only (rounded to the nearest "
29138 "cylinder) and you don't need to specify the cyls, heads and sectors "
29139 "parameters which were rarely if ever used anyway."
29143 #: ../src/guestfs-actions.pod:6729
29145 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
29146 "C<guestfs_part_disk>"
29150 #: ../src/guestfs-actions.pod:6739
29151 msgid "guestfs_sfdisk_N"
29155 #: ../src/guestfs-actions.pod:6741
29159 " guestfs_sfdisk_N (guestfs_h *g,\n"
29160 " const char *device,\n"
29165 " const char *line);\n"
29170 #: ../src/guestfs-actions.pod:6760
29172 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
29173 "for the cyls/heads/sectors parameters."
29177 #: ../src/guestfs-actions.pod:6763
29178 msgid "See also: C<guestfs_part_add>"
29182 #: ../src/guestfs-actions.pod:6772
29183 msgid "guestfs_sfdisk_disk_geometry"
29187 #: ../src/guestfs-actions.pod:6774
29191 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
29192 " const char *device);\n"
29197 #: ../src/guestfs-actions.pod:6778
29199 "This displays the disk geometry of C<device> read from the partition table. "
29200 "Especially in the case where the underlying block device has been resized, "
29201 "this can be different from the kernel's idea of the geometry (see "
29202 "C<guestfs_sfdisk_kernel_geometry>)."
29206 #: ../src/guestfs-actions.pod:6791
29207 msgid "guestfs_sfdisk_kernel_geometry"
29211 #: ../src/guestfs-actions.pod:6793
29215 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
29216 " const char *device);\n"
29221 #: ../src/guestfs-actions.pod:6807
29222 msgid "guestfs_sfdisk_l"
29226 #: ../src/guestfs-actions.pod:6809
29230 " guestfs_sfdisk_l (guestfs_h *g,\n"
29231 " const char *device);\n"
29236 #: ../src/guestfs-actions.pod:6813
29238 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
29243 #: ../src/guestfs-actions.pod:6824
29244 msgid "See also: C<guestfs_part_list>"
29248 #: ../src/guestfs-actions.pod:6831
29253 #: ../src/guestfs-actions.pod:6833
29257 " guestfs_sh (guestfs_h *g,\n"
29258 " const char *command);\n"
29263 #: ../src/guestfs-actions.pod:6840
29264 msgid "This is like C<guestfs_command>, but passes the command to:"
29268 #: ../src/guestfs-actions.pod:6848
29269 msgid "All the provisos about C<guestfs_command> apply to this call."
29273 #: ../src/guestfs-actions.pod:6855
29274 msgid "guestfs_sh_lines"
29278 #: ../src/guestfs-actions.pod:6857
29282 " guestfs_sh_lines (guestfs_h *g,\n"
29283 " const char *command);\n"
29288 #: ../src/guestfs-actions.pod:6861
29290 "This is the same as C<guestfs_sh>, but splits the result into a list of "
29295 #: ../src/guestfs-actions.pod:6864
29296 msgid "See also: C<guestfs_command_lines>"
29300 #: ../src/guestfs-actions.pod:6872
29301 msgid "guestfs_sleep"
29305 #: ../src/guestfs-actions.pod:6874
29309 " guestfs_sleep (guestfs_h *g,\n"
29315 #: ../src/guestfs-actions.pod:6882
29316 msgid "(Added in 1.0.41)"
29320 #: ../src/guestfs-actions.pod:6884 ../src/guestfs-structs.pod:109
29321 msgid "guestfs_stat"
29325 #: ../src/guestfs-actions.pod:6886
29328 " struct guestfs_stat *\n"
29329 " guestfs_stat (guestfs_h *g,\n"
29330 " const char *path);\n"
29335 #: ../src/guestfs-actions.pod:6900 ../src/guestfs-structs.pod:135
29336 msgid "guestfs_statvfs"
29340 #: ../src/guestfs-actions.pod:6902
29343 " struct guestfs_statvfs *\n"
29344 " guestfs_statvfs (guestfs_h *g,\n"
29345 " const char *path);\n"
29350 #: ../src/guestfs-actions.pod:6912
29352 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
29353 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
29357 #: ../src/guestfs-actions.pod:6918
29358 msgid "guestfs_strings"
29362 #: ../src/guestfs-actions.pod:6920
29366 " guestfs_strings (guestfs_h *g,\n"
29367 " const char *path);\n"
29372 #: ../src/guestfs-actions.pod:6936
29373 msgid "guestfs_strings_e"
29377 #: ../src/guestfs-actions.pod:6938
29381 " guestfs_strings_e (guestfs_h *g,\n"
29382 " const char *encoding,\n"
29383 " const char *path);\n"
29388 #: ../src/guestfs-actions.pod:6943
29390 "This is like the C<guestfs_strings> command, but allows you to specify the "
29391 "encoding of strings that are looked for in the source file C<path>."
29395 #: ../src/guestfs-actions.pod:6953
29397 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
29398 "ISO-8859-X (this is what C<guestfs_strings> uses)."
29402 #: ../src/guestfs-actions.pod:6991
29403 msgid "guestfs_swapoff_device"
29407 #: ../src/guestfs-actions.pod:6993
29411 " guestfs_swapoff_device (guestfs_h *g,\n"
29412 " const char *device);\n"
29417 #: ../src/guestfs-actions.pod:6997
29419 "This command disables the libguestfs appliance swap device or partition "
29420 "named C<device>. See C<guestfs_swapon_device>."
29424 #: ../src/guestfs-actions.pod:7005
29425 msgid "guestfs_swapoff_file"
29429 #: ../src/guestfs-actions.pod:7007
29433 " guestfs_swapoff_file (guestfs_h *g,\n"
29434 " const char *file);\n"
29439 #: ../src/guestfs-actions.pod:7017
29440 msgid "guestfs_swapoff_label"
29444 #: ../src/guestfs-actions.pod:7019
29448 " guestfs_swapoff_label (guestfs_h *g,\n"
29449 " const char *label);\n"
29454 #: ../src/guestfs-actions.pod:7030
29455 msgid "guestfs_swapoff_uuid"
29459 #: ../src/guestfs-actions.pod:7032
29463 " guestfs_swapoff_uuid (guestfs_h *g,\n"
29464 " const char *uuid);\n"
29469 #: ../src/guestfs-actions.pod:7043
29470 msgid "guestfs_swapon_device"
29474 #: ../src/guestfs-actions.pod:7045
29478 " guestfs_swapon_device (guestfs_h *g,\n"
29479 " const char *device);\n"
29484 #: ../src/guestfs-actions.pod:7049
29486 "This command enables the libguestfs appliance to use the swap device or "
29487 "partition named C<device>. The increased memory is made available for all "
29488 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
29492 #: ../src/guestfs-actions.pod:7065
29493 msgid "guestfs_swapon_file"
29497 #: ../src/guestfs-actions.pod:7067
29501 " guestfs_swapon_file (guestfs_h *g,\n"
29502 " const char *file);\n"
29507 #: ../src/guestfs-actions.pod:7071
29509 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
29514 #: ../src/guestfs-actions.pod:7078
29515 msgid "guestfs_swapon_label"
29519 #: ../src/guestfs-actions.pod:7080
29523 " guestfs_swapon_label (guestfs_h *g,\n"
29524 " const char *label);\n"
29529 #: ../src/guestfs-actions.pod:7084
29531 "This command enables swap to a labeled swap partition. See "
29532 "C<guestfs_swapon_device> for other notes."
29536 #: ../src/guestfs-actions.pod:7091
29537 msgid "guestfs_swapon_uuid"
29541 #: ../src/guestfs-actions.pod:7093
29545 " guestfs_swapon_uuid (guestfs_h *g,\n"
29546 " const char *uuid);\n"
29551 #: ../src/guestfs-actions.pod:7097
29553 "This command enables swap to a swap partition with the given UUID. See "
29554 "C<guestfs_swapon_device> for other notes."
29558 #: ../src/guestfs-actions.pod:7104
29559 msgid "guestfs_sync"
29563 #: ../src/guestfs-actions.pod:7106
29567 " guestfs_sync (guestfs_h *g);\n"
29572 #: ../src/guestfs-actions.pod:7119
29573 msgid "guestfs_tail"
29577 #: ../src/guestfs-actions.pod:7121
29581 " guestfs_tail (guestfs_h *g,\n"
29582 " const char *path);\n"
29587 #: ../src/guestfs-actions.pod:7137
29588 msgid "guestfs_tail_n"
29592 #: ../src/guestfs-actions.pod:7139
29596 " guestfs_tail_n (guestfs_h *g,\n"
29598 " const char *path);\n"
29603 #: ../src/guestfs-actions.pod:7161
29604 msgid "guestfs_tar_in"
29608 #: ../src/guestfs-actions.pod:7163
29612 " guestfs_tar_in (guestfs_h *g,\n"
29613 " const char *tarfile,\n"
29614 " const char *directory);\n"
29619 #: ../src/guestfs-actions.pod:7171
29620 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
29624 #: ../src/guestfs-actions.pod:7176 ../src/guestfs-actions.pod:7193 ../src/guestfs-actions.pod:7209 ../src/guestfs-actions.pod:7225
29625 msgid "(Added in 1.0.3)"
29629 #: ../src/guestfs-actions.pod:7178
29630 msgid "guestfs_tar_out"
29634 #: ../src/guestfs-actions.pod:7180
29638 " guestfs_tar_out (guestfs_h *g,\n"
29639 " const char *directory,\n"
29640 " const char *tarfile);\n"
29645 #: ../src/guestfs-actions.pod:7188
29647 "To download a compressed tarball, use C<guestfs_tgz_out> or "
29648 "C<guestfs_txz_out>."
29652 #: ../src/guestfs-actions.pod:7195
29653 msgid "guestfs_tgz_in"
29657 #: ../src/guestfs-actions.pod:7197
29661 " guestfs_tgz_in (guestfs_h *g,\n"
29662 " const char *tarball,\n"
29663 " const char *directory);\n"
29668 #: ../src/guestfs-actions.pod:7205
29669 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
29673 #: ../src/guestfs-actions.pod:7211
29674 msgid "guestfs_tgz_out"
29678 #: ../src/guestfs-actions.pod:7213
29682 " guestfs_tgz_out (guestfs_h *g,\n"
29683 " const char *directory,\n"
29684 " const char *tarball);\n"
29689 #: ../src/guestfs-actions.pod:7221
29690 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
29694 #: ../src/guestfs-actions.pod:7227
29695 msgid "guestfs_touch"
29699 #: ../src/guestfs-actions.pod:7229
29703 " guestfs_touch (guestfs_h *g,\n"
29704 " const char *path);\n"
29709 #: ../src/guestfs-actions.pod:7244
29710 msgid "guestfs_truncate"
29714 #: ../src/guestfs-actions.pod:7246
29718 " guestfs_truncate (guestfs_h *g,\n"
29719 " const char *path);\n"
29724 #: ../src/guestfs-actions.pod:7257
29725 msgid "guestfs_truncate_size"
29729 #: ../src/guestfs-actions.pod:7259
29733 " guestfs_truncate_size (guestfs_h *g,\n"
29734 " const char *path,\n"
29735 " int64_t size);\n"
29740 #: ../src/guestfs-actions.pod:7267
29742 "If the current file size is less than C<size> then the file is extended to "
29743 "the required size with zero bytes. This creates a sparse file (ie. disk "
29744 "blocks are not allocated for the file until you write to it). To create a "
29745 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
29749 #: ../src/guestfs-actions.pod:7277
29750 msgid "guestfs_tune2fs_l"
29754 #: ../src/guestfs-actions.pod:7279
29758 " guestfs_tune2fs_l (guestfs_h *g,\n"
29759 " const char *device);\n"
29764 #: ../src/guestfs-actions.pod:7299
29765 msgid "guestfs_txz_in"
29769 #: ../src/guestfs-actions.pod:7301
29773 " guestfs_txz_in (guestfs_h *g,\n"
29774 " const char *tarball,\n"
29775 " const char *directory);\n"
29780 #: ../src/guestfs-actions.pod:7313
29781 msgid "guestfs_txz_out"
29785 #: ../src/guestfs-actions.pod:7315
29789 " guestfs_txz_out (guestfs_h *g,\n"
29790 " const char *directory,\n"
29791 " const char *tarball);\n"
29796 #: ../src/guestfs-actions.pod:7327
29797 msgid "guestfs_umask"
29801 #: ../src/guestfs-actions.pod:7329
29805 " guestfs_umask (guestfs_h *g,\n"
29811 #: ../src/guestfs-actions.pod:7345
29813 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
29814 "C<guestfs_mkdir>."
29818 #: ../src/guestfs-actions.pod:7354
29819 msgid "guestfs_umount"
29823 #: ../src/guestfs-actions.pod:7356
29827 " guestfs_umount (guestfs_h *g,\n"
29828 " const char *pathordevice);\n"
29833 #: ../src/guestfs-actions.pod:7368
29834 msgid "guestfs_umount_all"
29838 #: ../src/guestfs-actions.pod:7370
29842 " guestfs_umount_all (guestfs_h *g);\n"
29847 #: ../src/guestfs-actions.pod:7381
29848 msgid "guestfs_upload"
29852 #: ../src/guestfs-actions.pod:7383
29856 " guestfs_upload (guestfs_h *g,\n"
29857 " const char *filename,\n"
29858 " const char *remotefilename);\n"
29863 #: ../src/guestfs-actions.pod:7393
29864 msgid "See also C<guestfs_download>."
29868 #: ../src/guestfs-actions.pod:7404
29869 msgid "guestfs_upload_offset"
29873 #: ../src/guestfs-actions.pod:7406
29877 " guestfs_upload_offset (guestfs_h *g,\n"
29878 " const char *filename,\n"
29879 " const char *remotefilename,\n"
29880 " int64_t offset);\n"
29885 #: ../src/guestfs-actions.pod:7422
29887 "Note that there is no limit on the amount of data that can be uploaded with "
29888 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
29889 "full amount unless an error occurs."
29893 #: ../src/guestfs-actions.pod:7427
29894 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
29898 #: ../src/guestfs-actions.pod:7438
29899 msgid "guestfs_utimens"
29903 #: ../src/guestfs-actions.pod:7440
29907 " guestfs_utimens (guestfs_h *g,\n"
29908 " const char *path,\n"
29909 " int64_t atsecs,\n"
29910 " int64_t atnsecs,\n"
29911 " int64_t mtsecs,\n"
29912 " int64_t mtnsecs);\n"
29917 #: ../src/guestfs-actions.pod:7469 ../src/guestfs-structs.pod:175
29918 msgid "guestfs_version"
29922 #: ../src/guestfs-actions.pod:7471
29925 " struct guestfs_version *\n"
29926 " guestfs_version (guestfs_h *g);\n"
29931 #: ../src/guestfs-actions.pod:7499
29933 "I<Note:> Don't use this call to test for availability of features. In "
29934 "enterprise distributions we backport features from later versions into "
29935 "earlier versions, making this an unreliable way to test for features. Use "
29936 "C<guestfs_available> instead."
29940 #: ../src/guestfs-actions.pod:7505
29942 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
29943 "error. I<The caller must call C<guestfs_free_version> after use>."
29947 #: ../src/guestfs-actions.pod:7509
29948 msgid "(Added in 1.0.58)"
29952 #: ../src/guestfs-actions.pod:7511
29953 msgid "guestfs_vfs_label"
29957 #: ../src/guestfs-actions.pod:7513
29961 " guestfs_vfs_label (guestfs_h *g,\n"
29962 " const char *device);\n"
29967 #: ../src/guestfs-actions.pod:7522
29968 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
29972 #: ../src/guestfs-actions.pod:7527 ../src/guestfs-actions.pod:7564
29973 msgid "(Added in 1.3.18)"
29977 #: ../src/guestfs-actions.pod:7529
29978 msgid "guestfs_vfs_type"
29982 #: ../src/guestfs-actions.pod:7531
29986 " guestfs_vfs_type (guestfs_h *g,\n"
29987 " const char *device);\n"
29992 #: ../src/guestfs-actions.pod:7548
29993 msgid "guestfs_vfs_uuid"
29997 #: ../src/guestfs-actions.pod:7550
30001 " guestfs_vfs_uuid (guestfs_h *g,\n"
30002 " const char *device);\n"
30007 #: ../src/guestfs-actions.pod:7559
30008 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
30012 #: ../src/guestfs-actions.pod:7566
30013 msgid "guestfs_vg_activate"
30017 #: ../src/guestfs-actions.pod:7568
30021 " guestfs_vg_activate (guestfs_h *g,\n"
30023 " char *const *volgroups);\n"
30028 #: ../src/guestfs-actions.pod:7585
30029 msgid "guestfs_vg_activate_all"
30033 #: ../src/guestfs-actions.pod:7587
30037 " guestfs_vg_activate_all (guestfs_h *g,\n"
30038 " int activate);\n"
30043 #: ../src/guestfs-actions.pod:7600
30044 msgid "guestfs_vgcreate"
30048 #: ../src/guestfs-actions.pod:7602
30052 " guestfs_vgcreate (guestfs_h *g,\n"
30053 " const char *volgroup,\n"
30054 " char *const *physvols);\n"
30059 #: ../src/guestfs-actions.pod:7614
30060 msgid "guestfs_vglvuuids"
30064 #: ../src/guestfs-actions.pod:7616
30068 " guestfs_vglvuuids (guestfs_h *g,\n"
30069 " const char *vgname);\n"
30074 #: ../src/guestfs-actions.pod:7623
30076 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
30077 "associate logical volumes and volume groups."
30081 #: ../src/guestfs-actions.pod:7626
30082 msgid "See also C<guestfs_vgpvuuids>."
30086 #: ../src/guestfs-actions.pod:7634
30087 msgid "guestfs_vgpvuuids"
30091 #: ../src/guestfs-actions.pod:7636
30095 " guestfs_vgpvuuids (guestfs_h *g,\n"
30096 " const char *vgname);\n"
30101 #: ../src/guestfs-actions.pod:7643
30103 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
30104 "associate physical volumes and volume groups."
30108 #: ../src/guestfs-actions.pod:7646
30109 msgid "See also C<guestfs_vglvuuids>."
30113 #: ../src/guestfs-actions.pod:7654
30114 msgid "guestfs_vgremove"
30118 #: ../src/guestfs-actions.pod:7656
30122 " guestfs_vgremove (guestfs_h *g,\n"
30123 " const char *vgname);\n"
30128 #: ../src/guestfs-actions.pod:7669
30129 msgid "guestfs_vgrename"
30133 #: ../src/guestfs-actions.pod:7671
30137 " guestfs_vgrename (guestfs_h *g,\n"
30138 " const char *volgroup,\n"
30139 " const char *newvolgroup);\n"
30144 #: ../src/guestfs-actions.pod:7682
30145 msgid "guestfs_vgs"
30149 #: ../src/guestfs-actions.pod:7684
30153 " guestfs_vgs (guestfs_h *g);\n"
30158 #: ../src/guestfs-actions.pod:7693
30159 msgid "See also C<guestfs_vgs_full>."
30163 #: ../src/guestfs-actions.pod:7701
30164 msgid "guestfs_vgs_full"
30168 #: ../src/guestfs-actions.pod:7703
30171 " struct guestfs_lvm_vg_list *\n"
30172 " guestfs_vgs_full (guestfs_h *g);\n"
30177 #: ../src/guestfs-actions.pod:7709
30179 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
30180 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
30185 #: ../src/guestfs-actions.pod:7715
30186 msgid "guestfs_vgscan"
30190 #: ../src/guestfs-actions.pod:7717
30194 " guestfs_vgscan (guestfs_h *g);\n"
30199 #: ../src/guestfs-actions.pod:7727
30200 msgid "guestfs_vguuid"
30204 #: ../src/guestfs-actions.pod:7729
30208 " guestfs_vguuid (guestfs_h *g,\n"
30209 " const char *vgname);\n"
30214 #: ../src/guestfs-actions.pod:7740
30215 msgid "guestfs_wait_ready"
30219 #: ../src/guestfs-actions.pod:7742
30223 " guestfs_wait_ready (guestfs_h *g);\n"
30228 #: ../src/guestfs-actions.pod:7745
30230 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
30235 #: ../src/guestfs-actions.pod:7752
30236 msgid "This function is a no op."
30240 #: ../src/guestfs-actions.pod:7754
30242 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
30243 "calling C<guestfs_launch> to wait for the launch to complete. However this "
30244 "is no longer necessary because C<guestfs_launch> now does the waiting."
30248 #: ../src/guestfs-actions.pod:7759
30250 "If you see any calls to this function in code then you can just remove them, "
30251 "unless you want to retain compatibility with older versions of the API."
30255 #: ../src/guestfs-actions.pod:7767
30256 msgid "guestfs_wc_c"
30260 #: ../src/guestfs-actions.pod:7769
30264 " guestfs_wc_c (guestfs_h *g,\n"
30265 " const char *path);\n"
30270 #: ../src/guestfs-actions.pod:7780
30271 msgid "guestfs_wc_l"
30275 #: ../src/guestfs-actions.pod:7782
30279 " guestfs_wc_l (guestfs_h *g,\n"
30280 " const char *path);\n"
30285 #: ../src/guestfs-actions.pod:7793
30286 msgid "guestfs_wc_w"
30290 #: ../src/guestfs-actions.pod:7795
30294 " guestfs_wc_w (guestfs_h *g,\n"
30295 " const char *path);\n"
30300 #: ../src/guestfs-actions.pod:7806
30301 msgid "guestfs_write"
30305 #: ../src/guestfs-actions.pod:7808
30309 " guestfs_write (guestfs_h *g,\n"
30310 " const char *path,\n"
30311 " const char *content,\n"
30312 " size_t content_size);\n"
30317 #: ../src/guestfs-actions.pod:7817
30318 msgid "See also C<guestfs_write_append>."
30322 #: ../src/guestfs-actions.pod:7826
30323 msgid "guestfs_write_append"
30327 #: ../src/guestfs-actions.pod:7828
30331 " guestfs_write_append (guestfs_h *g,\n"
30332 " const char *path,\n"
30333 " const char *content,\n"
30334 " size_t content_size);\n"
30339 #: ../src/guestfs-actions.pod:7837
30340 msgid "See also C<guestfs_write>."
30344 #: ../src/guestfs-actions.pod:7846
30345 msgid "guestfs_write_file"
30349 #: ../src/guestfs-actions.pod:7848
30353 " guestfs_write_file (guestfs_h *g,\n"
30354 " const char *path,\n"
30355 " const char *content,\n"
30361 #: ../src/guestfs-actions.pod:7854
30363 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
30368 #: ../src/guestfs-actions.pod:7879
30369 msgid "guestfs_zegrep"
30373 #: ../src/guestfs-actions.pod:7881
30377 " guestfs_zegrep (guestfs_h *g,\n"
30378 " const char *regex,\n"
30379 " const char *path);\n"
30384 #: ../src/guestfs-actions.pod:7898
30385 msgid "guestfs_zegrepi"
30389 #: ../src/guestfs-actions.pod:7900
30393 " guestfs_zegrepi (guestfs_h *g,\n"
30394 " const char *regex,\n"
30395 " const char *path);\n"
30400 #: ../src/guestfs-actions.pod:7917
30401 msgid "guestfs_zero"
30405 #: ../src/guestfs-actions.pod:7919
30409 " guestfs_zero (guestfs_h *g,\n"
30410 " const char *device);\n"
30415 #: ../src/guestfs-actions.pod:7933
30417 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
30418 "C<guestfs_is_zero_device>"
30422 #: ../src/guestfs-actions.pod:7945
30423 msgid "guestfs_zero_device"
30427 #: ../src/guestfs-actions.pod:7947
30431 " guestfs_zero_device (guestfs_h *g,\n"
30432 " const char *device);\n"
30437 #: ../src/guestfs-actions.pod:7951
30439 "This command writes zeroes over the entire C<device>. Compare with "
30440 "C<guestfs_zero> which just zeroes the first few blocks of a device."
30444 #: ../src/guestfs-actions.pod:7969
30445 msgid "(Added in 1.3.1)"
30449 #: ../src/guestfs-actions.pod:7971
30450 msgid "guestfs_zerofree"
30454 #: ../src/guestfs-actions.pod:7973
30458 " guestfs_zerofree (guestfs_h *g,\n"
30459 " const char *device);\n"
30464 #: ../src/guestfs-actions.pod:7992
30465 msgid "guestfs_zfgrep"
30469 #: ../src/guestfs-actions.pod:7994
30473 " guestfs_zfgrep (guestfs_h *g,\n"
30474 " const char *pattern,\n"
30475 " const char *path);\n"
30480 #: ../src/guestfs-actions.pod:8011
30481 msgid "guestfs_zfgrepi"
30485 #: ../src/guestfs-actions.pod:8013
30489 " guestfs_zfgrepi (guestfs_h *g,\n"
30490 " const char *pattern,\n"
30491 " const char *path);\n"
30496 #: ../src/guestfs-actions.pod:8030
30497 msgid "guestfs_zfile"
30501 #: ../src/guestfs-actions.pod:8032
30505 " guestfs_zfile (guestfs_h *g,\n"
30506 " const char *meth,\n"
30507 " const char *path);\n"
30512 #: ../src/guestfs-actions.pod:8037
30514 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
30519 #: ../src/guestfs-actions.pod:8049
30521 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
30526 #: ../src/guestfs-actions.pod:8057
30527 msgid "guestfs_zgrep"
30531 #: ../src/guestfs-actions.pod:8059
30535 " guestfs_zgrep (guestfs_h *g,\n"
30536 " const char *regex,\n"
30537 " const char *path);\n"
30542 #: ../src/guestfs-actions.pod:8076
30543 msgid "guestfs_zgrepi"
30547 #: ../src/guestfs-actions.pod:8078
30551 " guestfs_zgrepi (guestfs_h *g,\n"
30552 " const char *regex,\n"
30553 " const char *path);\n"
30558 #: ../src/guestfs-availability.pod:3
30563 #: ../src/guestfs-availability.pod:5
30565 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
30566 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
30567 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
30568 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
30569 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
30573 #: ../src/guestfs-availability.pod:21
30578 #: ../src/guestfs-availability.pod:23
30579 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
30583 #: ../src/guestfs-availability.pod:26
30588 #: ../src/guestfs-availability.pod:28
30589 msgid "The following functions: L</guestfs_grub_install>"
30593 #: ../src/guestfs-availability.pod:31
30598 #: ../src/guestfs-availability.pod:33
30600 "The following functions: L</guestfs_inotify_add_watch> "
30601 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
30602 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
30606 #: ../src/guestfs-availability.pod:41
30607 msgid "B<linuxfsuuid>"
30611 #: ../src/guestfs-availability.pod:43
30613 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
30614 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
30618 #: ../src/guestfs-availability.pod:50
30619 msgid "B<linuxmodules>"
30623 #: ../src/guestfs-availability.pod:52
30624 msgid "The following functions: L</guestfs_modprobe>"
30628 #: ../src/guestfs-availability.pod:55
30629 msgid "B<linuxxattrs>"
30633 #: ../src/guestfs-availability.pod:57
30635 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
30636 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
30637 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
30638 "L</guestfs_setxattr>"
30642 #: ../src/guestfs-availability.pod:68
30647 #: ../src/guestfs-availability.pod:70
30649 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
30650 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
30651 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
30655 #: ../src/guestfs-availability.pod:79
30660 #: ../src/guestfs-availability.pod:81
30662 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
30663 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
30664 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
30665 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
30666 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
30667 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
30668 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
30669 "L</guestfs_vgs_full>"
30673 #: ../src/guestfs-availability.pod:104
30678 #: ../src/guestfs-availability.pod:106
30680 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
30681 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
30685 #: ../src/guestfs-availability.pod:112
30690 #: ../src/guestfs-availability.pod:114
30691 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
30695 #: ../src/guestfs-availability.pod:117
30696 msgid "B<ntfsprogs>"
30700 #: ../src/guestfs-availability.pod:119
30702 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
30703 "L</guestfs_ntfsresize_size>"
30707 #: ../src/guestfs-availability.pod:124
30708 msgid "B<realpath>"
30712 #: ../src/guestfs-availability.pod:126
30713 msgid "The following functions: L</guestfs_realpath>"
30717 #: ../src/guestfs-availability.pod:129
30722 #: ../src/guestfs-availability.pod:131
30724 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
30725 "L</guestfs_scrub_freespace>"
30729 #: ../src/guestfs-availability.pod:136
30734 #: ../src/guestfs-availability.pod:138
30735 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
30739 #: ../src/guestfs-availability.pod:142
30744 #: ../src/guestfs-availability.pod:144
30745 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
30749 #: ../src/guestfs-availability.pod:148
30750 msgid "B<zerofree>"
30754 #: ../src/guestfs-availability.pod:150
30755 msgid "The following functions: L</guestfs_zerofree>"
30759 #: ../src/guestfs-structs.pod:1
30760 msgid "guestfs_int_bool"
30764 #: ../src/guestfs-structs.pod:3
30767 " struct guestfs_int_bool {\n"
30775 #: ../src/guestfs-structs.pod:8
30778 " struct guestfs_int_bool_list {\n"
30779 " uint32_t len; /* Number of elements in list. */\n"
30780 " struct guestfs_int_bool *val; /* Elements. */\n"
30786 #: ../src/guestfs-structs.pod:13
30789 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
30790 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
30795 #: ../src/guestfs-structs.pod:16
30796 msgid "guestfs_lvm_pv"
30800 #: ../src/guestfs-structs.pod:18
30803 " struct guestfs_lvm_pv {\n"
30804 " char *pv_name;\n"
30805 " /* The next field is NOT nul-terminated, be careful when printing it: "
30807 " char pv_uuid[32];\n"
30809 " uint64_t pv_size;\n"
30810 " uint64_t dev_size;\n"
30811 " uint64_t pv_free;\n"
30812 " uint64_t pv_used;\n"
30813 " char *pv_attr;\n"
30814 " int64_t pv_pe_count;\n"
30815 " int64_t pv_pe_alloc_count;\n"
30816 " char *pv_tags;\n"
30817 " uint64_t pe_start;\n"
30818 " int64_t pv_mda_count;\n"
30819 " uint64_t pv_mda_free;\n"
30825 #: ../src/guestfs-structs.pod:36
30828 " struct guestfs_lvm_pv_list {\n"
30829 " uint32_t len; /* Number of elements in list. */\n"
30830 " struct guestfs_lvm_pv *val; /* Elements. */\n"
30836 #: ../src/guestfs-structs.pod:41
30839 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
30840 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
30845 #: ../src/guestfs-structs.pod:44
30846 msgid "guestfs_lvm_vg"
30850 #: ../src/guestfs-structs.pod:46
30853 " struct guestfs_lvm_vg {\n"
30854 " char *vg_name;\n"
30855 " /* The next field is NOT nul-terminated, be careful when printing it: "
30857 " char vg_uuid[32];\n"
30859 " char *vg_attr;\n"
30860 " uint64_t vg_size;\n"
30861 " uint64_t vg_free;\n"
30862 " char *vg_sysid;\n"
30863 " uint64_t vg_extent_size;\n"
30864 " int64_t vg_extent_count;\n"
30865 " int64_t vg_free_count;\n"
30866 " int64_t max_lv;\n"
30867 " int64_t max_pv;\n"
30868 " int64_t pv_count;\n"
30869 " int64_t lv_count;\n"
30870 " int64_t snap_count;\n"
30871 " int64_t vg_seqno;\n"
30872 " char *vg_tags;\n"
30873 " int64_t vg_mda_count;\n"
30874 " uint64_t vg_mda_free;\n"
30880 #: ../src/guestfs-structs.pod:69
30883 " struct guestfs_lvm_vg_list {\n"
30884 " uint32_t len; /* Number of elements in list. */\n"
30885 " struct guestfs_lvm_vg *val; /* Elements. */\n"
30891 #: ../src/guestfs-structs.pod:74
30894 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
30895 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
30900 #: ../src/guestfs-structs.pod:77
30901 msgid "guestfs_lvm_lv"
30905 #: ../src/guestfs-structs.pod:79
30908 " struct guestfs_lvm_lv {\n"
30909 " char *lv_name;\n"
30910 " /* The next field is NOT nul-terminated, be careful when printing it: "
30912 " char lv_uuid[32];\n"
30913 " char *lv_attr;\n"
30914 " int64_t lv_major;\n"
30915 " int64_t lv_minor;\n"
30916 " int64_t lv_kernel_major;\n"
30917 " int64_t lv_kernel_minor;\n"
30918 " uint64_t lv_size;\n"
30919 " int64_t seg_count;\n"
30921 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
30922 " float snap_percent;\n"
30923 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
30924 " float copy_percent;\n"
30925 " char *move_pv;\n"
30926 " char *lv_tags;\n"
30927 " char *mirror_log;\n"
30928 " char *modules;\n"
30934 #: ../src/guestfs-structs.pod:101
30937 " struct guestfs_lvm_lv_list {\n"
30938 " uint32_t len; /* Number of elements in list. */\n"
30939 " struct guestfs_lvm_lv *val; /* Elements. */\n"
30945 #: ../src/guestfs-structs.pod:106
30948 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
30949 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
30954 #: ../src/guestfs-structs.pod:111
30957 " struct guestfs_stat {\n"
30961 " int64_t nlink;\n"
30966 " int64_t blksize;\n"
30967 " int64_t blocks;\n"
30968 " int64_t atime;\n"
30969 " int64_t mtime;\n"
30970 " int64_t ctime;\n"
30976 #: ../src/guestfs-structs.pod:127
30979 " struct guestfs_stat_list {\n"
30980 " uint32_t len; /* Number of elements in list. */\n"
30981 " struct guestfs_stat *val; /* Elements. */\n"
30987 #: ../src/guestfs-structs.pod:132
30990 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
30991 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
30996 #: ../src/guestfs-structs.pod:137
30999 " struct guestfs_statvfs {\n"
31000 " int64_t bsize;\n"
31001 " int64_t frsize;\n"
31002 " int64_t blocks;\n"
31003 " int64_t bfree;\n"
31004 " int64_t bavail;\n"
31005 " int64_t files;\n"
31006 " int64_t ffree;\n"
31007 " int64_t favail;\n"
31010 " int64_t namemax;\n"
31016 #: ../src/guestfs-structs.pod:151
31019 " struct guestfs_statvfs_list {\n"
31020 " uint32_t len; /* Number of elements in list. */\n"
31021 " struct guestfs_statvfs *val; /* Elements. */\n"
31027 #: ../src/guestfs-structs.pod:156
31030 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
31031 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
31036 #: ../src/guestfs-structs.pod:159
31037 msgid "guestfs_dirent"
31041 #: ../src/guestfs-structs.pod:161
31044 " struct guestfs_dirent {\n"
31053 #: ../src/guestfs-structs.pod:167
31056 " struct guestfs_dirent_list {\n"
31057 " uint32_t len; /* Number of elements in list. */\n"
31058 " struct guestfs_dirent *val; /* Elements. */\n"
31064 #: ../src/guestfs-structs.pod:172
31067 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
31068 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
31073 #: ../src/guestfs-structs.pod:177
31076 " struct guestfs_version {\n"
31077 " int64_t major;\n"
31078 " int64_t minor;\n"
31079 " int64_t release;\n"
31086 #: ../src/guestfs-structs.pod:184
31089 " struct guestfs_version_list {\n"
31090 " uint32_t len; /* Number of elements in list. */\n"
31091 " struct guestfs_version *val; /* Elements. */\n"
31097 #: ../src/guestfs-structs.pod:189
31100 " void guestfs_free_version (struct guestfs_free_version *);\n"
31101 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
31106 #: ../src/guestfs-structs.pod:192
31107 msgid "guestfs_xattr"
31111 #: ../src/guestfs-structs.pod:194
31114 " struct guestfs_xattr {\n"
31115 " char *attrname;\n"
31116 " /* The next two fields describe a byte array. */\n"
31117 " uint32_t attrval_len;\n"
31118 " char *attrval;\n"
31124 #: ../src/guestfs-structs.pod:201
31127 " struct guestfs_xattr_list {\n"
31128 " uint32_t len; /* Number of elements in list. */\n"
31129 " struct guestfs_xattr *val; /* Elements. */\n"
31135 #: ../src/guestfs-structs.pod:206
31138 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
31139 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
31144 #: ../src/guestfs-structs.pod:209
31145 msgid "guestfs_inotify_event"
31149 #: ../src/guestfs-structs.pod:211
31152 " struct guestfs_inotify_event {\n"
31153 " int64_t in_wd;\n"
31154 " uint32_t in_mask;\n"
31155 " uint32_t in_cookie;\n"
31156 " char *in_name;\n"
31162 #: ../src/guestfs-structs.pod:218
31165 " struct guestfs_inotify_event_list {\n"
31166 " uint32_t len; /* Number of elements in list. */\n"
31167 " struct guestfs_inotify_event *val; /* Elements. */\n"
31173 #: ../src/guestfs-structs.pod:223
31176 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
31177 " void guestfs_free_inotify_event_list (struct "
31178 "guestfs_free_inotify_event_list *);\n"
31183 #: ../src/guestfs-structs.pod:226
31184 msgid "guestfs_partition"
31188 #: ../src/guestfs-structs.pod:228
31191 " struct guestfs_partition {\n"
31192 " int32_t part_num;\n"
31193 " uint64_t part_start;\n"
31194 " uint64_t part_end;\n"
31195 " uint64_t part_size;\n"
31201 #: ../src/guestfs-structs.pod:235
31204 " struct guestfs_partition_list {\n"
31205 " uint32_t len; /* Number of elements in list. */\n"
31206 " struct guestfs_partition *val; /* Elements. */\n"
31212 #: ../src/guestfs-structs.pod:240
31215 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
31216 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
31221 #: ../src/guestfs-structs.pod:243
31222 msgid "guestfs_application"
31226 #: ../src/guestfs-structs.pod:245
31229 " struct guestfs_application {\n"
31230 " char *app_name;\n"
31231 " char *app_display_name;\n"
31232 " int32_t app_epoch;\n"
31233 " char *app_version;\n"
31234 " char *app_release;\n"
31235 " char *app_install_path;\n"
31236 " char *app_trans_path;\n"
31237 " char *app_publisher;\n"
31238 " char *app_url;\n"
31239 " char *app_source_package;\n"
31240 " char *app_summary;\n"
31241 " char *app_description;\n"
31247 #: ../src/guestfs-structs.pod:260
31250 " struct guestfs_application_list {\n"
31251 " uint32_t len; /* Number of elements in list. */\n"
31252 " struct guestfs_application *val; /* Elements. */\n"
31258 #: ../src/guestfs-structs.pod:265
31261 " void guestfs_free_application (struct guestfs_free_application *);\n"
31262 " void guestfs_free_application_list (struct guestfs_free_application_list "
31268 #: ../src/guestfs.pod:5
31269 msgid "guestfs - Library for accessing and modifying virtual machine images"
31273 #: ../src/guestfs.pod:11
31276 " guestfs_h *g = guestfs_create ();\n"
31277 " guestfs_add_drive (g, \"guest.img\");\n"
31278 " guestfs_launch (g);\n"
31279 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
31280 " guestfs_touch (g, \"/hello\");\n"
31281 " guestfs_umount (g, \"/\");\n"
31282 " guestfs_close (g);\n"
31287 #: ../src/guestfs.pod:25
31289 "Libguestfs is a library for accessing and modifying guest disk images. "
31290 "Amongst the things this is good for: making batch configuration changes to "
31291 "guests, getting disk used/free statistics (see also: virt-df), migrating "
31292 "between virtualization systems (see also: virt-p2v), performing partial "
31293 "backups, performing partial guest clones, cloning guests and changing "
31294 "registry/UUID/hostname info, and much else besides."
31298 #: ../src/guestfs.pod:33
31300 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
31301 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
31302 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
31307 #: ../src/guestfs.pod:38
31309 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
31310 "what filesystem is in each LV, etc.). It can also run commands in the "
31311 "context of the guest. Also you can access filesystems over FUSE."
31315 #: ../src/guestfs.pod:43
31317 "Libguestfs is a library that can be linked with C and C++ management "
31318 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
31319 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
31324 #: ../src/guestfs.pod:48
31326 "You don't need to be root to use libguestfs, although obviously you do need "
31327 "enough permissions to access the disk images."
31331 #: ../src/guestfs.pod:51
31333 "Libguestfs is a large API because it can do many things. For a gentle "
31334 "introduction, please read the L</API OVERVIEW> section next."
31338 #: ../src/guestfs.pod:54
31340 "There are also some example programs in the L<guestfs-examples(3)> manual "
31345 #: ../src/guestfs.pod:57
31346 msgid "API OVERVIEW"
31350 #: ../src/guestfs.pod:59
31352 "This section provides a gentler overview of the libguestfs API. We also try "
31353 "to group API calls together, where that may not be obvious from reading "
31354 "about the individual calls in the main section of this manual."
31358 #: ../src/guestfs.pod:64
31363 #: ../src/guestfs.pod:66
31365 "Before you can use libguestfs calls, you have to create a handle. Then you "
31366 "must add at least one disk image to the handle, followed by launching the "
31367 "handle, then performing whatever operations you want, and finally closing "
31368 "the handle. By convention we use the single letter C<g> for the name of the "
31369 "handle variable, although of course you can use any name you want."
31373 #: ../src/guestfs.pod:73
31374 msgid "The general structure of all libguestfs-using programs looks like this:"
31378 #: ../src/guestfs.pod:76
31381 " guestfs_h *g = guestfs_create ();\n"
31386 #: ../src/guestfs.pod:78
31389 " /* Call guestfs_add_drive additional times if there are\n"
31390 " * multiple disk images.\n"
31392 " guestfs_add_drive (g, \"guest.img\");\n"
31397 #: ../src/guestfs.pod:83
31400 " /* Most manipulation calls won't work until you've launched\n"
31401 " * the handle 'g'. You have to do this _after_ adding drives\n"
31402 " * and _before_ other commands.\n"
31404 " guestfs_launch (g);\n"
31409 #: ../src/guestfs.pod:89
31412 " /* Now you can examine what partitions, LVs etc are available.\n"
31414 " char **partitions = guestfs_list_partitions (g);\n"
31415 " char **logvols = guestfs_lvs (g);\n"
31420 #: ../src/guestfs.pod:94
31423 " /* To access a filesystem in the image, you must mount it.\n"
31425 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
31430 #: ../src/guestfs.pod:98
31433 " /* Now you can perform filesystem actions on the guest\n"
31436 " guestfs_touch (g, \"/hello\");\n"
31441 #: ../src/guestfs.pod:103
31444 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
31445 " * it is done automatically when you close the handle. See\n"
31446 " * discussion of autosync in this page.\n"
31448 " guestfs_sync (g);\n"
31453 #: ../src/guestfs.pod:109
31456 " /* Close the handle 'g'. */\n"
31457 " guestfs_close (g);\n"
31462 #: ../src/guestfs.pod:112
31464 "The code above doesn't include any error checking. In real code you should "
31465 "check return values carefully for errors. In general all functions that "
31466 "return integers return C<-1> on error, and all functions that return "
31467 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
31468 "how to handle errors, and consult the documentation for each function call "
31469 "below to see precisely how they return error indications. See "
31470 "L<guestfs-examples(3)> for fully worked examples."
31474 #: ../src/guestfs.pod:121
31475 msgid "DISK IMAGES"
31479 #: ../src/guestfs.pod:123
31481 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
31482 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
31483 "actual block device, or simply an empty file of zeroes that you have created "
31484 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
31489 #: ../src/guestfs.pod:129
31491 "The call you should use in modern code for adding drives is "
31492 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
31493 "specifying that the format is raw, do:"
31497 #: ../src/guestfs.pod:133
31500 " guestfs_add_drive_opts (g, filename,\n"
31501 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
31507 #: ../src/guestfs.pod:137
31508 msgid "You can add a disk read-only using:"
31512 #: ../src/guestfs.pod:139
31515 " guestfs_add_drive_opts (g, filename,\n"
31516 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
31517 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
31523 #: ../src/guestfs.pod:144
31525 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
31526 "libguestfs won't modify the file."
31530 #: ../src/guestfs.pod:147
31532 "Be extremely cautious if the disk image is in use, eg. if it is being used "
31533 "by a virtual machine. Adding it read-write will almost certainly cause disk "
31534 "corruption, but adding it read-only is safe."
31538 #: ../src/guestfs.pod:151
31540 "You must add at least one disk image, and you may add multiple disk images. "
31541 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
31542 "first one you added), C</dev/sdb> (for the second one you added), etc."
31546 #: ../src/guestfs.pod:156
31548 "Once L</guestfs_launch> has been called you cannot add any more images. You "
31549 "can call L</guestfs_list_devices> to get a list of the device names, in the "
31550 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
31554 #: ../src/guestfs.pod:161
31559 #: ../src/guestfs.pod:163
31561 "Before you can read or write files, create directories and so on in a disk "
31562 "image that contains filesystems, you have to mount those filesystems using "
31563 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
31564 "a disk image contains (for example) one partition with a filesystem on that "
31565 "partition, then you can mount it directly:"
31569 #: ../src/guestfs.pod:170
31572 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
31577 #: ../src/guestfs.pod:172
31579 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
31580 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
31581 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
31582 "that these are libguestfs virtual devices, and are nothing to do with host "
31587 #: ../src/guestfs.pod:178
31589 "If you are given a disk image and you don't know what it contains then you "
31590 "have to find out. Libguestfs can do that too: use "
31591 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
31592 "and LVs, and either try mounting each to see what is mountable, or else "
31593 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
31594 "filesystems, use L</guestfs_list_filesystems>."
31598 #: ../src/guestfs.pod:186
31600 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
31601 "L</INSPECTION> below). But you might find it easier to look at higher level "
31602 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
31606 #: ../src/guestfs.pod:191
31608 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
31609 "several other variations of the C<guestfs_mount_*> call."
31613 #: ../src/guestfs.pod:194
31614 msgid "FILESYSTEM ACCESS AND MODIFICATION"
31618 #: ../src/guestfs.pod:196
31620 "The majority of the libguestfs API consists of fairly low-level calls for "
31621 "accessing and modifying the files, directories, symlinks etc on mounted "
31622 "filesystems. There are over a hundred such calls which you can find listed "
31623 "in detail below in this man page, and we don't even pretend to cover them "
31624 "all in this overview."
31628 #: ../src/guestfs.pod:202
31630 "Specify filenames as full paths, starting with C<\"/\"> and including the "
31635 #: ../src/guestfs.pod:205
31637 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
31638 "the file called C<\"etc/passwd\"> then you could do:"
31642 #: ../src/guestfs.pod:208
31645 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
31650 #: ../src/guestfs.pod:210
31652 "This would return C<data> as a newly allocated buffer containing the full "
31653 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
31654 "or C<NULL> if there was an error."
31658 #: ../src/guestfs.pod:214
31660 "As another example, to create a top-level directory on that filesystem "
31661 "called C<\"var\"> you would do:"
31665 #: ../src/guestfs.pod:217
31668 " guestfs_mkdir (g, \"/var\");\n"
31673 #: ../src/guestfs.pod:219
31674 msgid "To create a symlink you could do:"
31678 #: ../src/guestfs.pod:221
31681 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
31682 " \"/etc/rc3.d/S30portmap\");\n"
31687 #: ../src/guestfs.pod:224
31689 "Libguestfs will reject attempts to use relative paths and there is no "
31690 "concept of a current working directory."
31694 #: ../src/guestfs.pod:227
31696 "Libguestfs can return errors in many situations: for example if the "
31697 "filesystem isn't writable, or if a file or directory that you requested "
31698 "doesn't exist. If you are using the C API (documented here) you have to "
31699 "check for those error conditions after each call. (Other language bindings "
31700 "turn these errors into exceptions)."
31704 #: ../src/guestfs.pod:233
31706 "File writes are affected by the per-handle umask, set by calling "
31707 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
31711 #: ../src/guestfs.pod:236
31712 msgid "PARTITIONING"
31716 #: ../src/guestfs.pod:238
31718 "Libguestfs contains API calls to read, create and modify partition tables on "
31723 #: ../src/guestfs.pod:241
31725 "In the common case where you want to create a single partition covering the "
31726 "whole disk, you should use the L</guestfs_part_disk> call:"
31730 #: ../src/guestfs.pod:245
31733 " const char *parttype = \"mbr\";\n"
31734 " if (disk_is_larger_than_2TB)\n"
31735 " parttype = \"gpt\";\n"
31736 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
31741 #: ../src/guestfs.pod:250
31743 "Obviously this effectively wipes anything that was on that disk image "
31748 #: ../src/guestfs.pod:253
31753 #: ../src/guestfs.pod:255
31755 "Libguestfs provides access to a large part of the LVM2 API, such as "
31756 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
31757 "unless you familiarize yourself with the concepts of physical volumes, "
31758 "volume groups and logical volumes."
31762 #: ../src/guestfs.pod:260
31764 "This author strongly recommends reading the LVM HOWTO, online at "
31765 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
31769 #: ../src/guestfs.pod:263
31770 msgid "DOWNLOADING"
31774 #: ../src/guestfs.pod:265
31776 "Use L</guestfs_cat> to download small, text only files. This call is "
31777 "limited to files which are less than 2 MB and which cannot contain any ASCII "
31778 "NUL (C<\\0>) characters. However the API is very simple to use."
31782 #: ../src/guestfs.pod:269
31784 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
31785 "bit data, since it returns a (pointer, size) pair. However it is still "
31786 "limited to \"small\" files, less than 2 MB."
31790 #: ../src/guestfs.pod:273
31792 "L</guestfs_download> can be used to download any file, with no limits on "
31793 "content or size (even files larger than 4 GB)."
31797 #: ../src/guestfs.pod:276
31798 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
31802 #: ../src/guestfs.pod:279
31807 #: ../src/guestfs.pod:281
31809 "It's often the case that you want to write a file or files to the disk "
31814 #: ../src/guestfs.pod:284
31816 "To write a small file with fixed content, use L</guestfs_write>. To create "
31817 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
31818 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
31819 "variety of other functions for creating test files, for example "
31820 "L</guestfs_fill> and L</guestfs_fill_pattern>."
31824 #: ../src/guestfs.pod:290
31826 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
31827 "file content or size (even files larger than 4 GB)."
31831 #: ../src/guestfs.pod:293
31832 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
31836 #: ../src/guestfs.pod:295
31838 "However the fastest way to upload I<large numbers of arbitrary files> is to "
31839 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
31840 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
31841 "the drive in a predictable way (eg. adding it last after all other drives) "
31842 "then you can get the device name from L</guestfs_list_devices> and mount it "
31843 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
31844 "sometimes non-portable between kernel versions, and they don't support "
31845 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
31846 "using a label or UUID, use an ISO image instead."
31850 #: ../src/guestfs.pod:306
31855 #: ../src/guestfs.pod:308
31857 "There are various different commands for copying between files and devices "
31858 "and in and out of the guest filesystem. These are summarised in the table "
31863 #: ../src/guestfs.pod:314
31864 msgid "B<file> to B<file>"
31868 #: ../src/guestfs.pod:316
31870 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
31871 "directories recursively."
31875 #: ../src/guestfs.pod:319
31876 msgid "B<file or device> to B<file or device>"
31880 #: ../src/guestfs.pod:321
31882 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
31883 "devices in the guest."
31887 #: ../src/guestfs.pod:324
31888 msgid "Example: duplicate the contents of an LV:"
31892 #: ../src/guestfs.pod:326
31895 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
31900 #: ../src/guestfs.pod:328
31902 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
31903 "(C</dev/VG/Original>). To copy less than the whole source device, use "
31904 "L</guestfs_copy_size>."
31908 #: ../src/guestfs.pod:332
31909 msgid "B<file on the host> to B<file or device>"
31913 #: ../src/guestfs.pod:334
31914 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
31918 #: ../src/guestfs.pod:336
31919 msgid "B<file or device> to B<file on the host>"
31923 #: ../src/guestfs.pod:338
31924 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
31928 #: ../src/guestfs.pod:342
31929 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
31933 #: ../src/guestfs.pod:344
31935 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
31936 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
31937 "appears you can only upload and download to files. However many Un*x-like "
31938 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
31939 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
31940 "stderr, and arbitrary file descriptor N."
31944 #: ../src/guestfs.pod:352
31945 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
31949 #: ../src/guestfs.pod:355
31952 " guestfs_download (g, filename, \"/dev/stdout\");\n"
31957 #: ../src/guestfs.pod:357
31958 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
31962 #: ../src/guestfs.pod:359
31965 " char devfd[64];\n"
31966 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
31967 " guestfs_tar_out (g, \"/\", devfd);\n"
31972 #: ../src/guestfs.pod:363
31973 msgid "LISTING FILES"
31977 #: ../src/guestfs.pod:365
31979 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
31980 "L<guestfish(1)>-equivalent command C<ll>)."
31984 #: ../src/guestfs.pod:368
31986 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
31987 "programs, as a flat list of strings."
31991 #: ../src/guestfs.pod:371
31993 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
31994 "directory, plus additional information about each one. It is more "
31995 "equivalent to using the L<readdir(3)> call on a local filesystem."
31999 #: ../src/guestfs.pod:375
32001 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
32006 #: ../src/guestfs.pod:378
32007 msgid "RUNNING COMMANDS"
32011 #: ../src/guestfs.pod:380
32013 "Although libguestfs is primarily an API for manipulating files inside guest "
32014 "images, we also provide some limited facilities for running commands inside "
32019 #: ../src/guestfs.pod:384
32020 msgid "There are many limitations to this:"
32024 #: ../src/guestfs.pod:390
32026 "The kernel version that the command runs under will be different from what "
32031 #: ../src/guestfs.pod:395
32033 "If the command needs to communicate with daemons, then most likely they "
32034 "won't be running."
32038 #: ../src/guestfs.pod:400
32039 msgid "The command will be running in limited memory."
32043 #: ../src/guestfs.pod:404
32045 "The network may not be available unless you enable it (see "
32046 "L</guestfs_set_network>)."
32050 #: ../src/guestfs.pod:409
32051 msgid "Only supports Linux guests (not Windows, BSD, etc)."
32055 #: ../src/guestfs.pod:413
32056 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
32060 #: ../src/guestfs.pod:418
32062 "For SELinux guests, you may need to enable SELinux and load policy first. "
32063 "See L</SELINUX> in this manpage."
32067 #: ../src/guestfs.pod:423
32069 "I<Security:> It is not safe to run commands from untrusted, possibly "
32070 "malicious guests. These commands may attempt to exploit your program by "
32071 "sending unexpected output. They could also try to exploit the Linux kernel "
32072 "or qemu provided by the libguestfs appliance. They could use the network "
32073 "provided by the libguestfs appliance to bypass ordinary network partitions "
32074 "and firewalls. They could use the elevated privileges or different SELinux "
32075 "context of your program to their advantage."
32079 #: ../src/guestfs.pod:432
32081 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
32082 "(a script which runs when the guest next boots normally), and to have this "
32083 "script run the commands you want in the normal context of the running guest, "
32084 "network security and so on. For information about other security issues, "
32085 "see L</SECURITY>."
32089 #: ../src/guestfs.pod:440
32091 "The two main API calls to run commands are L</guestfs_command> and "
32092 "L</guestfs_sh> (there are also variations)."
32096 #: ../src/guestfs.pod:443
32098 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
32099 "shell globs, redirections, etc will work."
32103 #: ../src/guestfs.pod:446
32104 msgid "CONFIGURATION FILES"
32108 #: ../src/guestfs.pod:448
32110 "To read and write configuration files in Linux guest filesystems, we "
32111 "strongly recommend using Augeas. For example, Augeas understands how to "
32112 "read and write, say, a Linux shadow password file or X.org configuration "
32113 "file, and so avoids you having to write that code."
32117 #: ../src/guestfs.pod:453
32119 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
32120 "document Augeas itself here because there is excellent documentation on the "
32121 "L<http://augeas.net/> website."
32125 #: ../src/guestfs.pod:457
32127 "If you don't want to use Augeas (you fool!) then try calling "
32128 "L</guestfs_read_lines> to get the file as a list of lines which you can "
32133 #: ../src/guestfs.pod:461
32138 #: ../src/guestfs.pod:463
32140 "We support SELinux guests. To ensure that labeling happens correctly in "
32141 "SELinux guests, you need to enable SELinux and load the guest's policy:"
32145 #: ../src/guestfs.pod:471
32146 msgid "Before launching, do:"
32150 #: ../src/guestfs.pod:473
32153 " guestfs_set_selinux (g, 1);\n"
32158 #: ../src/guestfs.pod:477
32160 "After mounting the guest's filesystem(s), load the policy. This is best "
32161 "done by running the L<load_policy(8)> command in the guest itself:"
32165 #: ../src/guestfs.pod:481
32168 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
32173 #: ../src/guestfs.pod:483
32175 "(Older versions of C<load_policy> require you to specify the name of the "
32180 #: ../src/guestfs.pod:488
32182 "Optionally, set the security context for the API. The correct security "
32183 "context to use can only be known by inspecting the guest. As an example:"
32187 #: ../src/guestfs.pod:492
32190 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
32195 #: ../src/guestfs.pod:496
32196 msgid "This will work for running commands and editing existing files."
32200 #: ../src/guestfs.pod:498
32202 "When new files are created, you may need to label them explicitly, for "
32203 "example by running the external command C<restorecon pathname>."
32207 #: ../src/guestfs.pod:502
32212 #: ../src/guestfs.pod:504
32214 "Certain calls are affected by the current file mode creation mask (the "
32215 "\"umask\"). In particular ones which create files or directories, such as "
32216 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
32217 "either the default mode that the file is created with or modifies the mode "
32222 #: ../src/guestfs.pod:510
32224 "The default umask is C<022>, so files are created with modes such as C<0644> "
32225 "and directories with C<0755>."
32229 #: ../src/guestfs.pod:513
32231 "There are two ways to avoid being affected by umask. Either set umask to 0 "
32232 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
32233 "L</guestfs_chmod> after creating each file or directory."
32237 #: ../src/guestfs.pod:517
32238 msgid "For more information about umask, see L<umask(2)>."
32242 #: ../src/guestfs.pod:521
32244 "Libguestfs allows you to access Linux guests which have been encrypted using "
32245 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
32246 "standard. This includes nearly all whole disk encryption systems used by "
32247 "modern Linux guests."
32251 #: ../src/guestfs.pod:527
32253 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
32254 "returns the string C<crypto_LUKS>)."
32258 #: ../src/guestfs.pod:530
32260 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
32261 "will require the passphrase!"
32265 #: ../src/guestfs.pod:533
32267 "Opening a LUKS device creates a new device mapper device called "
32268 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
32269 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
32270 "decrypted from and encrypted to the underlying block device respectively."
32274 #: ../src/guestfs.pod:539
32276 "LVM volume groups on the device can be made visible by calling "
32277 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
32278 "volume(s) can now be mounted in the usual way."
32282 #: ../src/guestfs.pod:543
32284 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
32285 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
32286 "[\"/dev/VG\"])>. Then close the mapper device by calling "
32287 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
32288 "underlying encrypted block device)."
32292 #: ../src/guestfs.pod:550
32297 #: ../src/guestfs.pod:552
32299 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
32300 "contains operating systems, an install CD or a live CD. (These APIs used to "
32301 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
32302 "version 1.5.3 the most frequently used part of this library has been "
32303 "rewritten in C and moved into the core code)."
32307 #: ../src/guestfs.pod:559
32309 "Add all disks belonging to the unknown virtual machine and call "
32310 "L</guestfs_launch> in the usual way."
32314 #: ../src/guestfs.pod:562
32316 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
32317 "and certain heuristics, and returns a list of operating systems that were "
32318 "found. An empty list means none were found. A single element is the root "
32319 "filesystem of the operating system. For dual- or multi-boot guests, "
32320 "multiple roots can be returned, each one corresponding to a separate "
32321 "operating system. (Multi-boot virtual machines are extremely rare in the "
32322 "world of virtualization, but since this scenario can happen, we have built "
32323 "libguestfs to deal with it.)"
32327 #: ../src/guestfs.pod:571
32329 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
32330 "to get additional details about that operating system. For example, call "
32331 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
32332 "Windows and Linux-based operating systems respectively."
32336 #: ../src/guestfs.pod:577
32338 "Un*x-like and Linux-based operating systems usually consist of several "
32339 "filesystems which are mounted at boot time (for example, a separate boot "
32340 "partition mounted on C</boot>). The inspection rules are able to detect how "
32341 "filesystems correspond to mount points. Call "
32342 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
32343 "hash table like this example:"
32347 #: ../src/guestfs.pod:584
32350 " /boot => /dev/sda1\n"
32351 " / => /dev/vg_guest/lv_root\n"
32352 " /usr => /dev/vg_guest/lv_usr\n"
32357 #: ../src/guestfs.pod:588
32359 "The caller can then make calls to L</guestfs_mount_options> to mount the "
32360 "filesystems as suggested."
32364 #: ../src/guestfs.pod:591
32366 "Be careful to mount filesystems in the right order (eg. C</> before "
32367 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
32372 #: ../src/guestfs.pod:595
32374 "Inspection currently only works for some common operating systems. "
32375 "Contributors are welcome to send patches for other operating systems that we "
32376 "currently cannot detect."
32380 #: ../src/guestfs.pod:599
32382 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
32383 "for more details. The L</guestfs_inspect_os> function just ignores any "
32384 "encrypted devices."
32388 #: ../src/guestfs.pod:603
32390 "A note on the implementation: The call L</guestfs_inspect_os> performs "
32391 "inspection and caches the results in the guest handle. Subsequent calls to "
32392 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
32393 "re-read the disks. If you change the content of the guest disks, you can "
32394 "redo inspection by calling L</guestfs_inspect_os> again. "
32395 "(L</guestfs_inspect_list_applications> works a little differently from the "
32396 "other calls and does read the disks. See documentation for that function "
32401 #: ../src/guestfs.pod:612
32402 msgid "INSPECTING INSTALL DISKS"
32406 #: ../src/guestfs.pod:614
32408 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
32413 #: ../src/guestfs.pod:617
32415 "Call L</guestfs_inspect_get_format> to return the format of the operating "
32416 "system, which currently can be C<installed> (a regular operating system) or "
32417 "C<installer> (some sort of install disk)."
32421 #: ../src/guestfs.pod:621
32423 "Further information is available about the operating system that can be "
32424 "installed using the regular inspection APIs like "
32425 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
32430 #: ../src/guestfs.pod:626
32432 "Some additional information specific to installer disks is also available "
32433 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
32434 "L</guestfs_inspect_is_multipart> calls."
32438 #: ../src/guestfs.pod:631
32439 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
32443 #: ../src/guestfs.pod:633
32445 "Libguestfs can mount NTFS partitions. It does this using the "
32446 "L<http://www.ntfs-3g.org/> driver."
32450 #: ../src/guestfs.pod:636
32451 msgid "DRIVE LETTERS AND PATHS"
32455 #: ../src/guestfs.pod:638
32457 "DOS and Windows still use drive letters, and the filesystems are always "
32458 "treated as case insensitive by Windows itself, and therefore you might find "
32459 "a Windows configuration file referring to a path like "
32460 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
32461 "that directory might be referred to as C</WINDOWS/System32>."
32465 #: ../src/guestfs.pod:644
32467 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
32468 "L</guestfs_inspect_get_drive_mappings>)"
32472 #: ../src/guestfs.pod:647
32474 "Dealing with separator characters (backslash vs forward slash) is outside "
32475 "the scope of libguestfs, but usually a simple character replacement will "
32480 #: ../src/guestfs.pod:651
32482 "To resolve the case insensitivity of paths, call "
32483 "L</guestfs_case_sensitive_path>."
32487 #: ../src/guestfs.pod:654
32488 msgid "ACCESSING THE WINDOWS REGISTRY"
32492 #: ../src/guestfs.pod:656
32494 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
32495 "files, through the library C<hivex> which is part of the libguestfs project "
32496 "although ships as a separate tarball. You have to locate and download the "
32497 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
32498 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
32499 "L<virt-win-reg(1)> for more help on this issue."
32503 #: ../src/guestfs.pod:664
32504 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
32508 #: ../src/guestfs.pod:666
32510 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
32511 "provide something which looks like a Linux symlink. The way it tries to do "
32512 "the rewriting is described here:"
32516 #: ../src/guestfs.pod:670
32517 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
32521 #: ../src/guestfs.pod:672
32523 "The essential problem is that ntfs-3g simply does not have enough "
32524 "information to do a correct job. NTFS links can contain drive letters and "
32525 "references to external device GUIDs that ntfs-3g has no way of resolving. "
32526 "It is almost certainly the case that libguestfs callers should ignore what "
32527 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
32531 #: ../src/guestfs.pod:679
32533 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
32534 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
32535 "attribute, and read the raw reparse data from that (you can find the format "
32536 "documented in various places around the web)."
32540 #: ../src/guestfs.pod:684
32541 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
32545 #: ../src/guestfs.pod:686
32547 "There are other useful extended attributes that can be read from ntfs-3g "
32548 "filesystems (using L</guestfs_getxattr>). See:"
32552 #: ../src/guestfs.pod:689
32553 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
32557 #: ../src/guestfs.pod:691
32558 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
32562 #: ../src/guestfs.pod:693
32564 "Although we don't want to discourage you from using the C API, we will "
32565 "mention here that the same API is also available in other languages."
32569 #: ../src/guestfs.pod:696
32571 "The API is broadly identical in all supported languages. This means that "
32572 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
32573 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
32574 "OCaml. In other words, a straightforward, predictable isomorphism between "
32579 #: ../src/guestfs.pod:702
32581 "Error messages are automatically transformed into exceptions if the language "
32586 #: ../src/guestfs.pod:705
32588 "We don't try to \"object orientify\" parts of the API in OO languages, "
32589 "although contributors are welcome to write higher level APIs above what we "
32590 "provide in their favourite languages if they wish."
32594 #: ../src/guestfs.pod:711
32599 #: ../src/guestfs.pod:713
32601 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
32602 "identical to the C API. C++ classes and exceptions are not used."
32606 #: ../src/guestfs.pod:717
32611 #: ../src/guestfs.pod:719
32613 "The C# bindings are highly experimental. Please read the warnings at the "
32614 "top of C<csharp/Libguestfs.cs>."
32618 #: ../src/guestfs.pod:722
32623 #: ../src/guestfs.pod:724
32624 msgid "See L<guestfs-erlang(3)>."
32628 #: ../src/guestfs.pod:726
32633 #: ../src/guestfs.pod:728
32635 "This is the only language binding that is working but incomplete. Only "
32636 "calls which return simple integers have been bound in Haskell, and we are "
32637 "looking for help to complete this binding."
32641 #: ../src/guestfs.pod:732
32646 #: ../src/guestfs.pod:734
32648 "Full documentation is contained in the Javadoc which is distributed with "
32649 "libguestfs. For examples, see L<guestfs-java(3)>."
32653 #: ../src/guestfs.pod:737
32658 #: ../src/guestfs.pod:739
32659 msgid "See L<guestfs-ocaml(3)>."
32663 #: ../src/guestfs.pod:741
32668 #: ../src/guestfs.pod:743
32669 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
32673 #: ../src/guestfs.pod:745
32678 #: ../src/guestfs.pod:747
32680 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
32681 "the php-libguestfs package for your distribution."
32685 #: ../src/guestfs.pod:750
32686 msgid "The PHP binding only works correctly on 64 bit machines."
32690 #: ../src/guestfs.pod:752
32695 #: ../src/guestfs.pod:754
32696 msgid "See L<guestfs-python(3)>."
32700 #: ../src/guestfs.pod:756
32705 #: ../src/guestfs.pod:758
32706 msgid "See L<guestfs-ruby(3)>."
32710 #: ../src/guestfs.pod:760
32711 msgid "B<shell scripts>"
32715 #: ../src/guestfs.pod:762
32716 msgid "See L<guestfish(1)>."
32720 #: ../src/guestfs.pod:766
32721 msgid "LIBGUESTFS GOTCHAS"
32725 #: ../src/guestfs.pod:768
32727 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
32728 "system [...] that works in the way it is documented but is counterintuitive "
32729 "and almost invites mistakes.\""
32733 #: ../src/guestfs.pod:772
32735 "Since we developed libguestfs and the associated tools, there are several "
32736 "things we would have designed differently, but are now stuck with for "
32737 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
32738 "release, you can expect these to change. Beware of them."
32742 #: ../src/guestfs.pod:780
32743 msgid "Autosync / forgetting to sync."
32747 #: ../src/guestfs.pod:782
32749 "I<Update:> Autosync is enabled by default for all API users starting from "
32750 "libguestfs 1.5.24. This section only applies to older versions."
32754 #: ../src/guestfs.pod:785
32756 "When modifying a filesystem from C or another language, you B<must> unmount "
32757 "all filesystems and call L</guestfs_sync> explicitly before you close the "
32758 "libguestfs handle. You can also call:"
32762 #: ../src/guestfs.pod:789
32765 " guestfs_set_autosync (g, 1);\n"
32770 #: ../src/guestfs.pod:791
32772 "to have the unmount/sync done automatically for you when the handle 'g' is "
32773 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
32778 #: ../src/guestfs.pod:795
32780 "If you forget to do this, then it is entirely possible that your changes "
32781 "won't be written out, or will be partially written, or (very rarely) that "
32782 "you'll get disk corruption."
32786 #: ../src/guestfs.pod:799
32788 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
32789 "guestfish scripts that forget to sync will work just fine, which can make "
32790 "this very puzzling if you are trying to debug a problem."
32794 #: ../src/guestfs.pod:803
32795 msgid "Mount option C<-o sync> should not be the default."
32799 #: ../src/guestfs.pod:805
32801 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
32802 "libguestfs 1.13.16. This section only applies to older versions."
32806 #: ../src/guestfs.pod:808
32808 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
32809 "However C<-o sync> does not add any reliability benefit, but does have a "
32810 "very large performance impact."
32814 #: ../src/guestfs.pod:812
32816 "The work around is to use L</guestfs_mount_options> and set the mount "
32817 "options that you actually want to use."
32821 #: ../src/guestfs.pod:815
32822 msgid "Read-only should be the default."
32826 #: ../src/guestfs.pod:817
32828 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
32829 "specify I<--rw> if you want to make changes to the image."
32833 #: ../src/guestfs.pod:820
32834 msgid "This would reduce the potential to corrupt live VM images."
32838 #: ../src/guestfs.pod:822
32840 "Note that many filesystems change the disk when you just mount and unmount, "
32841 "even if you didn't perform any writes. You need to use "
32842 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
32846 #: ../src/guestfs.pod:826
32847 msgid "guestfish command line is hard to use."
32851 #: ../src/guestfs.pod:828
32853 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
32854 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
32855 "exist, so it fails. In earlier versions of guestfish the error message was "
32856 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
32857 "we should have used C<guestfish -c command> to run commands."
32861 #: ../src/guestfs.pod:835
32862 msgid "guestfish megabyte modifiers don't work right on all commands"
32866 #: ../src/guestfs.pod:837
32868 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
32869 "other modifiers). What guestfish actually does is to multiply the number "
32870 "part by the modifier part and pass the result to the C API. However this "
32871 "doesn't work for a few APIs which aren't expecting bytes, but are already "
32872 "expecting some other unit (eg. megabytes)."
32876 #: ../src/guestfs.pod:844
32877 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
32881 #: ../src/guestfs.pod:846
32884 " lvcreate LV VG 100M\n"
32889 #: ../src/guestfs.pod:848
32891 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
32892 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
32893 "megabytes * megabytes) logical volume. The error message you get from this "
32894 "is also a little obscure."
32898 #: ../src/guestfs.pod:853
32900 "This could be fixed in the generator by specially marking parameters and "
32901 "return values which take bytes or other units."
32905 #: ../src/guestfs.pod:856
32906 msgid "Ambiguity between devices and paths"
32910 #: ../src/guestfs.pod:858
32912 "There is a subtle ambiguity in the API between a device name "
32913 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
32914 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
32918 #: ../src/guestfs.pod:863
32920 "In the current API we usually resolve this ambiguity by having two separate "
32921 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
32922 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
32923 "detecting if the path supplied begins with C</dev/>."
32927 #: ../src/guestfs.pod:869
32929 "To avoid both the ambiguity and the need to duplicate some calls, we could "
32930 "make paths/devices into structured names. One way to do this would be to "
32931 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
32932 "aspect of grub. Another way would be to use a structured type, equivalent "
32933 "to this OCaml type:"
32937 #: ../src/guestfs.pod:875
32940 " type path = Path of string | Device of int | Partition of int * int\n"
32945 #: ../src/guestfs.pod:877
32946 msgid "which would allow you to pass arguments like:"
32950 #: ../src/guestfs.pod:879
32953 " Path \"/foo/bar\"\n"
32954 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
32955 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
32956 " Path \"/dev/sdb2\" (* not a device *)\n"
32961 #: ../src/guestfs.pod:884
32963 "As you can see there are still problems to resolve even with this "
32964 "representation. Also consider how it might work in guestfish."
32968 #: ../src/guestfs.pod:889
32969 msgid "KEYS AND PASSPHRASES"
32973 #: ../src/guestfs.pod:891
32975 "Certain libguestfs calls take a parameter that contains sensitive key "
32976 "material, passed in as a C string."
32980 #: ../src/guestfs.pod:894
32982 "In the future we would hope to change the libguestfs implementation so that "
32983 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
32984 "swap. However this is I<not> done at the moment, because of the complexity "
32985 "of such an implementation."
32989 #: ../src/guestfs.pod:899
32991 "Therefore you should be aware that any key parameter you pass to libguestfs "
32992 "might end up being written out to the swap partition. If this is a concern, "
32993 "scrub the swap partition or don't use libguestfs on encrypted devices."
32997 #: ../src/guestfs.pod:904
32998 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
33002 #: ../src/guestfs.pod:906
33004 "All high-level libguestfs actions are synchronous. If you want to use "
33005 "libguestfs asynchronously then you must create a thread."
33009 #: ../src/guestfs.pod:909
33011 "Only use the handle from a single thread. Either use the handle exclusively "
33012 "from one thread, or provide your own mutex so that two threads cannot issue "
33013 "calls on the same handle at the same time."
33017 #: ../src/guestfs.pod:913
33019 "See the graphical program guestfs-browser for one possible architecture for "
33020 "multithreaded programs using libvirt and libguestfs."
33024 #: ../src/guestfs.pod:916
33029 #: ../src/guestfs.pod:918
33031 "Libguestfs needs a supermin appliance, which it finds by looking along an "
33036 #: ../src/guestfs.pod:921
33038 "By default it looks for these in the directory C<$libdir/guestfs> "
33039 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
33043 #: ../src/guestfs.pod:924
33045 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
33046 "to change the directories that libguestfs will search in. The value is a "
33047 "colon-separated list of paths. The current directory is I<not> searched "
33048 "unless the path contains an empty element or C<.>. For example "
33049 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
33050 "then C</usr/lib/guestfs>."
33054 #: ../src/guestfs.pod:931
33055 msgid "QEMU WRAPPERS"
33059 #: ../src/guestfs.pod:933
33061 "If you want to compile your own qemu, run qemu from a non-standard location, "
33062 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
33067 #: ../src/guestfs.pod:937
33069 "There is one important rule to remember: you I<must C<exec qemu>> as the "
33070 "last command in the shell script (so that qemu replaces the shell and "
33071 "becomes the direct child of the libguestfs-using program). If you don't do "
33072 "this, then the qemu process won't be cleaned up correctly."
33076 #: ../src/guestfs.pod:942
33078 "Here is an example of a wrapper, where I have built my own copy of qemu from "
33083 #: ../src/guestfs.pod:945
33087 " qemudir=/home/rjones/d/qemu\n"
33088 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
33094 #: ../src/guestfs.pod:949
33096 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
33097 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
33102 #: ../src/guestfs.pod:953
33105 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
33110 #: ../src/guestfs.pod:955
33112 "Note that libguestfs also calls qemu with the -help and -version options in "
33113 "order to determine features."
33117 #: ../src/guestfs.pod:958
33119 "Wrappers can also be used to edit the options passed to qemu. In the "
33120 "following example, the C<-machine ...> option (C<-machine> and the following "
33121 "argument) are removed from the command line and replaced with C<-machine "
33122 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
33123 "right one to remove, putting the remaining options into the C<args> array."
33127 #: ../src/guestfs.pod:965
33135 #: ../src/guestfs.pod:967
33139 " while [ $# -gt 0 ]; do\n"
33140 " case \"$1\" in\n"
33144 " args[i]=\"$1\"\n"
33153 #: ../src/guestfs.pod:979
33156 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
33161 #: ../src/guestfs.pod:981
33162 msgid "ATTACHING TO RUNNING DAEMONS"
33166 #: ../src/guestfs.pod:983
33168 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
33169 "babies. Use with caution."
33173 #: ../src/guestfs.pod:986
33175 "I<Note (2):> This section explains how to attach to a running daemon from a "
33176 "low level perspective. For most users, simply using virt tools such as "
33177 "L<guestfish(1)> with the I<--live> option will \"just work\"."
33181 #: ../src/guestfs.pod:990
33182 msgid "Using guestfs_set_attach_method"
33186 #: ../src/guestfs.pod:992
33188 "By calling L</guestfs_set_attach_method> you can change how the library "
33189 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
33190 "L</ARCHITECTURE> for some background)."
33194 #: ../src/guestfs.pod:996
33196 "The normal attach method is C<appliance>, where a small appliance is created "
33197 "containing the daemon, and then the library connects to this."
33201 #: ../src/guestfs.pod:999
33203 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
33204 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
33205 "daemon over the Unix domain socket."
33209 #: ../src/guestfs.pod:1003
33211 "The normal use for this is to connect to a running virtual machine that "
33212 "contains a C<guestfsd> daemon, and send commands so you can read and write "
33213 "files inside the live virtual machine."
33217 #: ../src/guestfs.pod:1007
33218 msgid "Using guestfs_add_domain with live flag"
33222 #: ../src/guestfs.pod:1009
33224 "L</guestfs_add_domain> provides some help for getting the correct attach "
33225 "method. If you pass the C<live> option to this function, then (if the "
33226 "virtual machine is running) it will examine the libvirt XML looking for a "
33227 "virtio-serial channel to connect to:"
33231 #: ../src/guestfs.pod:1015
33238 " <channel type='unix'>\n"
33239 " <source mode='bind' path='/path/to/socket'/>\n"
33240 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
33249 #: ../src/guestfs.pod:1027
33251 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
33252 "method to C<unix:/path/to/socket>."
33256 #: ../src/guestfs.pod:1030
33258 "Some of the libguestfs tools (including guestfish) support a I<--live> "
33259 "option which is passed through to L</guestfs_add_domain> thus allowing you "
33260 "to attach to and modify live virtual machines."
33264 #: ../src/guestfs.pod:1034
33266 "The virtual machine needs to have been set up beforehand so that it has the "
33267 "virtio-serial channel and so that guestfsd is running inside it."
33271 #: ../src/guestfs.pod:1038
33272 msgid "ABI GUARANTEE"
33276 #: ../src/guestfs.pod:1040
33278 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
33279 "actions as outlined in this section. Although we will deprecate some "
33280 "actions, for example if they get replaced by newer calls, we will keep the "
33281 "old actions forever. This allows you the developer to program in confidence "
33282 "against the libguestfs API."
33286 #: ../src/guestfs.pod:1046
33287 msgid "BLOCK DEVICE NAMING"
33291 #: ../src/guestfs.pod:1048
33293 "In the kernel there is now quite a profusion of schemata for naming block "
33294 "devices (in this context, by I<block device> I mean a physical or virtual "
33295 "hard drive). The original Linux IDE driver used names starting with "
33296 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
33297 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
33298 "replacement for the old IDE driver (particularly for SATA devices) those "
33299 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
33300 "machines with paravirtualized drivers. This has created several different "
33301 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
33306 #: ../src/guestfs.pod:1060
33308 "As discussed above, libguestfs uses a qemu appliance running an embedded "
33309 "Linux kernel to access block devices. We can run a variety of appliances "
33310 "based on a variety of Linux kernels."
33314 #: ../src/guestfs.pod:1064
33316 "This causes a problem for libguestfs because many API calls use device or "
33317 "partition names. Working scripts and the recipe (example) scripts that we "
33318 "make available over the internet could fail if the naming scheme changes."
33322 #: ../src/guestfs.pod:1069
33324 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
33325 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
33326 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
33327 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
33331 #: ../src/guestfs.pod:1075
33333 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
33334 "L</guestfs_list_partitions> and similar calls return the true names of the "
33335 "devices and partitions as known to the appliance."
33339 #: ../src/guestfs.pod:1080
33340 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
33344 #: ../src/guestfs.pod:1082
33346 "Usually this translation is transparent. However in some (very rare) cases "
33347 "you may need to know the exact algorithm. Such cases include where you use "
33348 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
33349 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
33354 #: ../src/guestfs.pod:1088
33356 "The algorithm is applied only to I<parameters> which are known to be either "
33357 "device or partition names. Return values from functions such as "
33358 "L</guestfs_list_devices> are never changed."
33362 #: ../src/guestfs.pod:1096
33363 msgid "Is the string a parameter which is a device or partition name?"
33367 #: ../src/guestfs.pod:1100
33368 msgid "Does the string begin with C</dev/sd>?"
33372 #: ../src/guestfs.pod:1104
33374 "Does the named device exist? If so, we use that device. However if I<not> "
33375 "then we continue with this algorithm."
33379 #: ../src/guestfs.pod:1109
33380 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
33384 #: ../src/guestfs.pod:1111
33385 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
33389 #: ../src/guestfs.pod:1113
33390 msgid "If that named device exists, use it. If not, continue."
33394 #: ../src/guestfs.pod:1117
33395 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
33399 #: ../src/guestfs.pod:1119
33400 msgid "If that named device exists, use it. If not, return an error."
33404 #: ../src/guestfs.pod:1123
33405 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
33409 #: ../src/guestfs.pod:1125
33411 "Although the standard naming scheme and automatic translation is useful for "
33412 "simple programs and guestfish scripts, for larger programs it is best not to "
33413 "rely on this mechanism."
33417 #: ../src/guestfs.pod:1129
33419 "Where possible for maximum future portability programs using libguestfs "
33420 "should use these future-proof techniques:"
33424 #: ../src/guestfs.pod:1136
33426 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
33427 "device names, and then use those names directly."
33431 #: ../src/guestfs.pod:1139
33432 msgid "Since those device names exist by definition, they will never be translated."
33436 #: ../src/guestfs.pod:1144
33438 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
33439 "filesystem labels."
33443 #: ../src/guestfs.pod:1149
33448 #: ../src/guestfs.pod:1151
33450 "This section discusses security implications of using libguestfs, "
33451 "particularly with untrusted or malicious guests or disk images."
33455 #: ../src/guestfs.pod:1154
33456 msgid "GENERAL SECURITY CONSIDERATIONS"
33460 #: ../src/guestfs.pod:1156
33462 "Be careful with any files or data that you download from a guest (by "
33463 "\"download\" we mean not just the L</guestfs_download> command but any "
33464 "command that reads files, filenames, directories or anything else from a "
33465 "disk image). An attacker could manipulate the data to fool your program "
33466 "into doing the wrong thing. Consider cases such as:"
33470 #: ../src/guestfs.pod:1166
33471 msgid "the data (file etc) not being present"
33475 #: ../src/guestfs.pod:1170
33476 msgid "being present but empty"
33480 #: ../src/guestfs.pod:1174
33481 msgid "being much larger than normal"
33485 #: ../src/guestfs.pod:1178
33486 msgid "containing arbitrary 8 bit data"
33490 #: ../src/guestfs.pod:1182
33491 msgid "being in an unexpected character encoding"
33495 #: ../src/guestfs.pod:1186
33496 msgid "containing homoglyphs."
33500 #: ../src/guestfs.pod:1190
33501 msgid "SECURITY OF MOUNTING FILESYSTEMS"
33505 #: ../src/guestfs.pod:1192
33507 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
33508 "(VFS) module can sometimes be escalated into exploits by deliberately "
33509 "creating a malicious, malformed filesystem. These exploits are very severe "
33510 "for two reasons. Firstly there are very many filesystem drivers in the "
33511 "kernel, and many of them are infrequently used and not much developer "
33512 "attention has been paid to the code. Linux userspace helps potential "
33513 "crackers by detecting the filesystem type and automatically choosing the "
33514 "right VFS driver, even if that filesystem type is obscure or unexpected for "
33515 "the administrator. Secondly, a kernel-level exploit is like a local root "
33516 "exploit (worse in some ways), giving immediate and total access to the "
33517 "system right down to the hardware level."
33521 #: ../src/guestfs.pod:1205
33523 "That explains why you should never mount a filesystem from an untrusted "
33524 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
33525 "inside a qemu virtual machine, usually running as a non-root user. The "
33526 "attacker would need to write a filesystem which first exploited the kernel, "
33527 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
33528 "the libguestfs protocol, and finally to be as serious as the host kernel "
33529 "exploit it would need to escalate its privileges to root. This multi-step "
33530 "escalation, performed by a static piece of data, is thought to be extremely "
33531 "hard to do, although we never say 'never' about security issues."
33535 #: ../src/guestfs.pod:1216
33537 "In any case callers can reduce the attack surface by forcing the filesystem "
33538 "type when mounting (use L</guestfs_mount_vfs>)."
33542 #: ../src/guestfs.pod:1219
33543 msgid "PROTOCOL SECURITY"
33547 #: ../src/guestfs.pod:1221
33549 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
33550 "defined upper message size. However a program that uses libguestfs must "
33551 "also take care - for example you can write a program that downloads a binary "
33552 "from a disk image and executes it locally, and no amount of protocol "
33553 "security will save you from the consequences."
33557 #: ../src/guestfs.pod:1227
33558 msgid "INSPECTION SECURITY"
33562 #: ../src/guestfs.pod:1229
33564 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
33565 "directly from the guest, and these could contain any 8 bit data. Callers "
33566 "should be careful to escape these before printing them to a structured file "
33567 "(for example, use HTML escaping if creating a web page)."
33571 #: ../src/guestfs.pod:1235
33573 "Guest configuration may be altered in unusual ways by the administrator of "
33574 "the virtual machine, and may not reflect reality (particularly for untrusted "
33575 "or actively malicious guests). For example we parse the hostname from "
33576 "configuration files like C</etc/sysconfig/network> that we find in the "
33577 "guest, but the guest administrator can easily manipulate these files to "
33578 "provide the wrong hostname."
33582 #: ../src/guestfs.pod:1243
33584 "The inspection API parses guest configuration using two external libraries: "
33585 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
33586 "designed to be robust in the face of malicious data, although denial of "
33587 "service attacks are still possible, for example with oversized configuration "
33592 #: ../src/guestfs.pod:1249
33593 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
33597 #: ../src/guestfs.pod:1251
33599 "Be very cautious about running commands from the guest. By running a "
33600 "command in the guest, you are giving CPU time to a binary that you do not "
33601 "control, under the same user account as the library, albeit wrapped in qemu "
33602 "virtualization. More information and alternatives can be found in the "
33603 "section L</RUNNING COMMANDS>."
33607 #: ../src/guestfs.pod:1257
33608 msgid "CVE-2010-3851"
33612 #: ../src/guestfs.pod:1259
33613 msgid "https://bugzilla.redhat.com/642934"
33617 #: ../src/guestfs.pod:1261
33619 "This security bug concerns the automatic disk format detection that qemu "
33620 "does on disk images."
33624 #: ../src/guestfs.pod:1264
33626 "A raw disk image is just the raw bytes, there is no header. Other disk "
33627 "images like qcow2 contain a special header. Qemu deals with this by looking "
33628 "for one of the known headers, and if none is found then assuming the disk "
33629 "image must be raw."
33633 #: ../src/guestfs.pod:1269
33635 "This allows a guest which has been given a raw disk image to write some "
33636 "other header. At next boot (or when the disk image is accessed by "
33637 "libguestfs) qemu would do autodetection and think the disk image format was, "
33638 "say, qcow2 based on the header written by the guest."
33642 #: ../src/guestfs.pod:1274
33644 "This in itself would not be a problem, but qcow2 offers many features, one "
33645 "of which is to allow a disk image to refer to another image (called the "
33646 "\"backing disk\"). It does this by placing the path to the backing disk "
33647 "into the qcow2 header. This path is not validated and could point to any "
33648 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
33649 "\"holes\" in the qcow2 disk image, which of course is completely under the "
33650 "control of the attacker."
33654 #: ../src/guestfs.pod:1282
33655 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
33659 #: ../src/guestfs.pod:1289
33660 msgid "You have enabled the network or have opened the disk in write mode."
33664 #: ../src/guestfs.pod:1293
33666 "You are also running untrusted code from the guest (see L</RUNNING "
33671 #: ../src/guestfs.pod:1298
33673 "The way to avoid this is to specify the expected disk format when adding "
33674 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
33675 "should always do this if the disk is raw format, and it's a good idea for "
33680 #: ../src/guestfs.pod:1303
33682 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
33683 "format is fetched from libvirt and passed through."
33687 #: ../src/guestfs.pod:1306
33689 "For libguestfs tools, use the I<--format> command line parameter as "
33694 #: ../src/guestfs.pod:1309
33695 msgid "CONNECTION MANAGEMENT"
33699 #: ../src/guestfs.pod:1311
33700 msgid "guestfs_h *"
33704 #: ../src/guestfs.pod:1313
33706 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
33707 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
33708 "handle and release all resources used."
33712 #: ../src/guestfs.pod:1317
33714 "For information on using multiple handles and threads, see the section "
33715 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
33719 #: ../src/guestfs.pod:1320
33720 msgid "guestfs_create"
33724 #: ../src/guestfs.pod:1322
33727 " guestfs_h *guestfs_create (void);\n"
33732 #: ../src/guestfs.pod:1324
33733 msgid "Create a connection handle."
33737 #: ../src/guestfs.pod:1326
33739 "On success this returns a non-NULL pointer to a handle. On error it returns "
33744 #: ../src/guestfs.pod:1329
33746 "You have to \"configure\" the handle after creating it. This includes "
33747 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
33748 "handle at least once."
33752 #: ../src/guestfs.pod:1333
33753 msgid "After configuring the handle, you have to call L</guestfs_launch>."
33757 #: ../src/guestfs.pod:1335
33759 "You may also want to configure error handling for the handle. See the "
33760 "L</ERROR HANDLING> section below."
33764 #: ../src/guestfs.pod:1338
33765 msgid "guestfs_close"
33769 #: ../src/guestfs.pod:1340
33772 " void guestfs_close (guestfs_h *g);\n"
33777 #: ../src/guestfs.pod:1342
33778 msgid "This closes the connection handle and frees up all resources used."
33782 #: ../src/guestfs.pod:1344
33784 "If autosync was set on the handle and the handle was launched, then this "
33785 "implicitly calls various functions to unmount filesystems and sync the "
33786 "disk. See L</guestfs_set_autosync> for more details."
33790 #: ../src/guestfs.pod:1348
33791 msgid "If a close callback was set on the handle, then it is called."
33795 #: ../src/guestfs.pod:1350
33796 msgid "ERROR HANDLING"
33800 #: ../src/guestfs.pod:1352
33802 "API functions can return errors. For example, almost all functions that "
33803 "return C<int> will return C<-1> to indicate an error."
33807 #: ../src/guestfs.pod:1355
33809 "Additional information is available for errors: an error message string and "
33810 "optionally an error number (errno) if the thing that failed was a system "
33815 #: ../src/guestfs.pod:1359
33817 "You can get at the additional information about the last error on the handle "
33818 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
33819 "up an error handler with L</guestfs_set_error_handler>."
33823 #: ../src/guestfs.pod:1364
33825 "When the handle is created, a default error handler is installed which "
33826 "prints the error message string to C<stderr>. For small short-running "
33827 "command line programs it is sufficient to do:"
33831 #: ../src/guestfs.pod:1368
33834 " if (guestfs_launch (g) == -1)\n"
33835 " exit (EXIT_FAILURE);\n"
33840 #: ../src/guestfs.pod:1371
33842 "since the default error handler will ensure that an error message has been "
33843 "printed to C<stderr> before the program exits."
33847 #: ../src/guestfs.pod:1374
33849 "For other programs the caller will almost certainly want to install an "
33850 "alternate error handler or do error handling in-line like this:"
33854 #: ../src/guestfs.pod:1377
33857 " /* This disables the default behaviour of printing errors\n"
33859 " guestfs_set_error_handler (g, NULL, NULL);\n"
33864 #: ../src/guestfs.pod:1381
33867 " if (guestfs_launch (g) == -1) {\n"
33868 " /* Examine the error message and print it etc. */\n"
33869 " char *msg = guestfs_last_error (g);\n"
33870 " int errnum = guestfs_last_errno (g);\n"
33871 " fprintf (stderr, \"%s\", msg);\n"
33872 " if (errnum != 0)\n"
33873 " fprintf (stderr, \": %s\", strerror (errnum));\n"
33874 " fprintf (stderr, \"\\n\");\n"
33881 #: ../src/guestfs.pod:1392
33883 "Out of memory errors are handled differently. The default action is to call "
33884 "L<abort(3)>. If this is undesirable, then you can set a handler using "
33885 "L</guestfs_set_out_of_memory_handler>."
33889 #: ../src/guestfs.pod:1396
33891 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
33892 "because there is no handle if this happens there is no way to get additional "
33893 "error information. However L</guestfs_create> is supposed to be a "
33894 "lightweight operation which can only fail because of insufficient memory (it "
33895 "returns NULL in this case)."
33899 #: ../src/guestfs.pod:1402
33900 msgid "guestfs_last_error"
33904 #: ../src/guestfs.pod:1404
33907 " const char *guestfs_last_error (guestfs_h *g);\n"
33912 #: ../src/guestfs.pod:1406
33914 "This returns the last error message that happened on C<g>. If there has not "
33915 "been an error since the handle was created, then this returns C<NULL>."
33919 #: ../src/guestfs.pod:1410
33921 "The lifetime of the returned string is until the next error occurs, or "
33922 "L</guestfs_close> is called."
33926 #: ../src/guestfs.pod:1413
33927 msgid "guestfs_last_errno"
33931 #: ../src/guestfs.pod:1415
33934 " int guestfs_last_errno (guestfs_h *g);\n"
33939 #: ../src/guestfs.pod:1417
33940 msgid "This returns the last error number (errno) that happened on C<g>."
33944 #: ../src/guestfs.pod:1419
33945 msgid "If successful, an errno integer not equal to zero is returned."
33949 #: ../src/guestfs.pod:1421
33950 msgid "If no error, this returns 0. This call can return 0 in three situations:"
33954 #: ../src/guestfs.pod:1428
33955 msgid "There has not been any error on the handle."
33959 #: ../src/guestfs.pod:1432
33961 "There has been an error but the errno was meaningless. This corresponds to "
33962 "the case where the error did not come from a failed system call, but for "
33963 "some other reason."
33967 #: ../src/guestfs.pod:1438
33969 "There was an error from a failed system call, but for some reason the errno "
33970 "was not captured and returned. This usually indicates a bug in libguestfs."
33974 #: ../src/guestfs.pod:1444
33976 "Libguestfs tries to convert the errno from inside the applicance into a "
33977 "corresponding errno for the caller (not entirely trivial: the appliance "
33978 "might be running a completely different operating system from the library "
33979 "and error numbers are not standardized across Un*xen). If this could not be "
33980 "done, then the error is translated to C<EINVAL>. In practice this should "
33981 "only happen in very rare circumstances."
33985 #: ../src/guestfs.pod:1452
33986 msgid "guestfs_set_error_handler"
33990 #: ../src/guestfs.pod:1454
33993 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
33995 " const char *msg);\n"
33996 " void guestfs_set_error_handler (guestfs_h *g,\n"
33997 " guestfs_error_handler_cb cb,\n"
33998 " void *opaque);\n"
34003 #: ../src/guestfs.pod:1461
34005 "The callback C<cb> will be called if there is an error. The parameters "
34006 "passed to the callback are an opaque data pointer and the error message "
34011 #: ../src/guestfs.pod:1465
34013 "C<errno> is not passed to the callback. To get that the callback must call "
34014 "L</guestfs_last_errno>."
34018 #: ../src/guestfs.pod:1468
34020 "Note that the message string C<msg> is freed as soon as the callback "
34021 "function returns, so if you want to stash it somewhere you must make your "
34026 #: ../src/guestfs.pod:1472
34027 msgid "The default handler prints messages on C<stderr>."
34031 #: ../src/guestfs.pod:1474
34032 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
34036 #: ../src/guestfs.pod:1476
34037 msgid "guestfs_get_error_handler"
34041 #: ../src/guestfs.pod:1478
34044 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
34045 " void **opaque_rtn);\n"
34050 #: ../src/guestfs.pod:1481
34051 msgid "Returns the current error handler callback."
34055 #: ../src/guestfs.pod:1483
34056 msgid "guestfs_set_out_of_memory_handler"
34060 #: ../src/guestfs.pod:1485
34063 " typedef void (*guestfs_abort_cb) (void);\n"
34064 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
34065 " guestfs_abort_cb);\n"
34070 #: ../src/guestfs.pod:1489
34072 "The callback C<cb> will be called if there is an out of memory situation. "
34073 "I<Note this callback must not return>."
34077 #: ../src/guestfs.pod:1492
34078 msgid "The default is to call L<abort(3)>."
34082 #: ../src/guestfs.pod:1494
34083 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
34087 #: ../src/guestfs.pod:1497
34088 msgid "guestfs_get_out_of_memory_handler"
34092 #: ../src/guestfs.pod:1499
34095 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
34100 #: ../src/guestfs.pod:1501
34101 msgid "This returns the current out of memory handler."
34105 #: ../src/guestfs.pod:1503
34110 #: ../src/guestfs.pod:1507
34115 #: ../src/guestfs.pod:1509
34120 #: ../src/guestfs.pod:1511
34121 msgid "AVAILABILITY"
34125 #: ../src/guestfs.pod:1513
34126 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
34130 #: ../src/guestfs.pod:1515
34132 "Using L</guestfs_available> you can test availability of the following "
34133 "groups of functions. This test queries the appliance to see if the "
34134 "appliance you are currently using supports the functionality."
34138 #: ../src/guestfs.pod:1520
34139 msgid "@AVAILABILITY@"
34143 #: ../src/guestfs.pod:1522
34144 msgid "GUESTFISH supported COMMAND"
34148 #: ../src/guestfs.pod:1524
34150 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
34151 "prints out the available groups and whether they are supported by this build "
34152 "of libguestfs. Note however that you have to do C<run> first."
34156 #: ../src/guestfs.pod:1529
34157 msgid "SINGLE CALLS AT COMPILE TIME"
34161 #: ../src/guestfs.pod:1531
34163 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
34164 "function, such as:"
34168 #: ../src/guestfs.pod:1534
34171 " #define LIBGUESTFS_HAVE_DD 1\n"
34176 #: ../src/guestfs.pod:1536
34177 msgid "if L</guestfs_dd> is available."
34181 #: ../src/guestfs.pod:1538
34183 "Before version 1.5.8, if you needed to test whether a single libguestfs "
34184 "function is available at compile time, we recommended using build tools such "
34185 "as autoconf or cmake. For example in autotools you could use:"
34189 #: ../src/guestfs.pod:1543
34192 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
34193 " AC_CHECK_FUNCS([guestfs_dd])\n"
34198 #: ../src/guestfs.pod:1546
34200 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
34205 #: ../src/guestfs.pod:1549
34206 msgid "SINGLE CALLS AT RUN TIME"
34210 #: ../src/guestfs.pod:1551
34212 "Testing at compile time doesn't guarantee that a function really exists in "
34213 "the library. The reason is that you might be dynamically linked against a "
34214 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
34215 "This situation unfortunately results in a segmentation fault, which is a "
34216 "shortcoming of the C dynamic linking system itself."
34220 #: ../src/guestfs.pod:1558
34222 "You can use L<dlopen(3)> to test if a function is available at run time, as "
34223 "in this example program (note that you still need the compile time check as "
34228 #: ../src/guestfs.pod:1562
34231 " #include <stdio.h>\n"
34232 " #include <stdlib.h>\n"
34233 " #include <unistd.h>\n"
34234 " #include <dlfcn.h>\n"
34235 " #include <guestfs.h>\n"
34240 #: ../src/guestfs.pod:1568
34245 " #ifdef LIBGUESTFS_HAVE_DD\n"
34247 " int has_function;\n"
34252 #: ../src/guestfs.pod:1574
34255 " /* Test if the function guestfs_dd is really available. */\n"
34256 " dl = dlopen (NULL, RTLD_LAZY);\n"
34258 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
34259 " exit (EXIT_FAILURE);\n"
34261 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
34267 #: ../src/guestfs.pod:1583
34270 " if (!has_function)\n"
34271 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
34273 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
34274 " /* Now it's safe to call\n"
34275 " guestfs_dd (g, \"foo\", \"bar\");\n"
34279 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
34286 #: ../src/guestfs.pod:1596
34288 "You may think the above is an awful lot of hassle, and it is. There are "
34289 "other ways outside of the C linking system to ensure that this kind of "
34290 "incompatibility never arises, such as using package versioning:"
34294 #: ../src/guestfs.pod:1601
34297 " Requires: libguestfs >= 1.0.80\n"
34302 #: ../src/guestfs.pod:1603
34303 msgid "CALLS WITH OPTIONAL ARGUMENTS"
34307 #: ../src/guestfs.pod:1605
34309 "A recent feature of the API is the introduction of calls which take optional "
34310 "arguments. In C these are declared 3 ways. The main way is as a call which "
34311 "takes variable arguments (ie. C<...>), as in this example:"
34315 #: ../src/guestfs.pod:1610
34318 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
34323 #: ../src/guestfs.pod:1612
34325 "Call this with a list of optional arguments, terminated by C<-1>. So to "
34326 "call with no optional arguments specified:"
34330 #: ../src/guestfs.pod:1615
34333 " guestfs_add_drive_opts (g, filename, -1);\n"
34338 #: ../src/guestfs.pod:1617
34339 msgid "With a single optional argument:"
34343 #: ../src/guestfs.pod:1619
34346 " guestfs_add_drive_opts (g, filename,\n"
34347 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
34353 #: ../src/guestfs.pod:1623
34358 #: ../src/guestfs.pod:1625
34361 " guestfs_add_drive_opts (g, filename,\n"
34362 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
34363 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34369 #: ../src/guestfs.pod:1630
34371 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
34376 #: ../src/guestfs.pod:1633
34377 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
34381 #: ../src/guestfs.pod:1635
34383 "The second variant has the same name with the suffix C<_va>, which works the "
34384 "same way but takes a C<va_list>. See the C manual for details. For the "
34385 "example function, this is declared:"
34389 #: ../src/guestfs.pod:1639
34392 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
34393 " va_list args);\n"
34398 #: ../src/guestfs.pod:1642
34399 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
34403 #: ../src/guestfs.pod:1644
34405 "The third variant is useful where you need to construct these calls. You "
34406 "pass in a structure where you fill in the optional fields. The structure "
34407 "has a bitmask as the first element which you must set to indicate which "
34408 "fields you have filled in. For our example function the structure and call "
34413 #: ../src/guestfs.pod:1650
34416 " struct guestfs_add_drive_opts_argv {\n"
34417 " uint64_t bitmask;\n"
34419 " const char *format;\n"
34422 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
34423 " const struct guestfs_add_drive_opts_argv *optargs);\n"
34428 #: ../src/guestfs.pod:1659
34429 msgid "You could call it like this:"
34433 #: ../src/guestfs.pod:1661
34436 " struct guestfs_add_drive_opts_argv optargs = {\n"
34437 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
34438 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
34439 " .readonly = 1,\n"
34440 " .format = \"qcow2\"\n"
34446 #: ../src/guestfs.pod:1668
34449 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
34454 #: ../src/guestfs.pod:1676
34455 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
34459 #: ../src/guestfs.pod:1681
34460 msgid "You do not need to fill in all fields of the structure."
34464 #: ../src/guestfs.pod:1685
34466 "There must be a one-to-one correspondence between fields of the structure "
34467 "that are filled in, and bits set in the bitmask."
34471 #: ../src/guestfs.pod:1690
34472 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
34476 #: ../src/guestfs.pod:1692
34478 "In other languages, optional arguments are expressed in the way that is "
34479 "natural for that language. We refer you to the language-specific "
34480 "documentation for more details on that."
34484 #: ../src/guestfs.pod:1696
34485 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
34489 #: ../src/guestfs.pod:1698
34490 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
34494 #: ../src/guestfs.pod:1700
34496 "B<Note:> This section documents the generic event mechanism introduced in "
34497 "libguestfs 1.10, which you should use in new code if possible. The old "
34498 "functions C<guestfs_set_log_message_callback>, "
34499 "C<guestfs_set_subprocess_quit_callback>, "
34500 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
34501 "C<guestfs_set_progress_callback> are no longer documented in this manual "
34502 "page. Because of the ABI guarantee, the old functions continue to work."
34506 #: ../src/guestfs.pod:1709
34508 "Handles generate events when certain things happen, such as log messages "
34509 "being generated, progress messages during long-running operations, or the "
34510 "handle being closed. The API calls described below let you register a "
34511 "callback to be called when events happen. You can register multiple "
34512 "callbacks (for the same, different or overlapping sets of events), and "
34513 "individually remove callbacks. If callbacks are not removed, then they "
34514 "remain in force until the handle is closed."
34518 #: ../src/guestfs.pod:1717
34520 "In the current implementation, events are only generated synchronously: that "
34521 "means that events (and hence callbacks) can only happen while you are in the "
34522 "middle of making another libguestfs call. The callback is called in the "
34527 #: ../src/guestfs.pod:1722
34529 "Events may contain a payload, usually nothing (void), an array of 64 bit "
34530 "unsigned integers, or a message buffer. Payloads are discussed later on."
34534 #: ../src/guestfs.pod:1726
34535 msgid "CLASSES OF EVENTS"
34539 #: ../src/guestfs.pod:1730
34540 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
34544 #: ../src/guestfs.pod:1733
34546 "The callback function will be called while the handle is being closed "
34547 "(synchronously from L</guestfs_close>)."
34551 #: ../src/guestfs.pod:1736
34553 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
34554 "handles that are open when the program exits. This means that this callback "
34555 "might be called indirectly from L<exit(3)>, which can cause unexpected "
34556 "problems in higher-level languages (eg. if your HLL interpreter has already "
34557 "been cleaned up by the time this is called, and if your callback then jumps "
34558 "into some HLL function)."
34562 #: ../src/guestfs.pod:1743
34564 "If no callback is registered: the handle is closed without any callback "
34569 #: ../src/guestfs.pod:1746
34570 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
34574 #: ../src/guestfs.pod:1749
34576 "The callback function will be called when the child process quits, either "
34577 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
34578 "corresponds to a transition from any state to the CONFIG state)."
34582 #: ../src/guestfs.pod:1753 ../src/guestfs.pod:1762 ../src/guestfs.pod:1879
34583 msgid "If no callback is registered: the event is ignored."
34587 #: ../src/guestfs.pod:1755
34588 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
34592 #: ../src/guestfs.pod:1758
34594 "The callback function will be called when the child process becomes ready "
34595 "first time after it has been launched. (This corresponds to a transition "
34596 "from LAUNCHING to the READY state)."
34600 #: ../src/guestfs.pod:1764
34601 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
34605 #: ../src/guestfs.pod:1767
34607 "Some long-running operations can generate progress messages. If this "
34608 "callback is registered, then it will be called each time a progress message "
34609 "is generated (usually two seconds after the operation started, and three "
34610 "times per second thereafter until it completes, although the frequency may "
34611 "change in future versions)."
34615 #: ../src/guestfs.pod:1773
34617 "The callback receives in the payload four unsigned 64 bit numbers which are "
34618 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
34622 #: ../src/guestfs.pod:1776
34624 "The units of C<total> are not defined, although for some operations C<total> "
34625 "may relate in some way to the amount of data to be transferred (eg. in bytes "
34626 "or megabytes), and C<position> may be the portion which has been "
34631 #: ../src/guestfs.pod:1781
34632 msgid "The only defined and stable parts of the API are:"
34636 #: ../src/guestfs.pod:1787
34638 "The callback can display to the user some type of progress bar or indicator "
34639 "which shows the ratio of C<position>:C<total>."
34643 #: ../src/guestfs.pod:1792
34644 msgid "0 E<lt>= C<position> E<lt>= C<total>"
34648 #: ../src/guestfs.pod:1796
34650 "If any progress notification is sent during a call, then a final progress "
34651 "notification is always sent when C<position> = C<total> (I<unless> the call "
34652 "fails with an error)."
34656 #: ../src/guestfs.pod:1800
34658 "This is to simplify caller code, so callers can easily set the progress "
34659 "indicator to \"100%\" at the end of the operation, without requiring special "
34660 "code to detect this case."
34664 #: ../src/guestfs.pod:1806
34666 "For some calls we are unable to estimate the progress of the call, but we "
34667 "can still generate progress messages to indicate activity. This is known as "
34668 "\"pulse mode\", and is directly supported by certain progress bar "
34669 "implementations (eg. GtkProgressBar)."
34673 #: ../src/guestfs.pod:1811
34675 "For these calls, zero or more progress messages are generated with "
34676 "C<position = 0> and C<total = 1>, followed by a final message with "
34677 "C<position = total = 1>."
34681 #: ../src/guestfs.pod:1815
34683 "As noted above, if the call fails with an error then the final message may "
34684 "not be generated."
34688 #: ../src/guestfs.pod:1820
34690 "The callback also receives the procedure number (C<proc_nr>) and serial "
34691 "number (C<serial>) of the call. These are only useful for debugging "
34692 "protocol issues, and the callback can normally ignore them. The callback "
34693 "may want to print these numbers in error messages or debugging messages."
34697 #: ../src/guestfs.pod:1826
34698 msgid "If no callback is registered: progress messages are discarded."
34702 #: ../src/guestfs.pod:1828
34703 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
34707 #: ../src/guestfs.pod:1831
34709 "The callback function is called whenever a log message is generated by qemu, "
34710 "the appliance kernel, guestfsd (daemon), or utility programs."
34714 #: ../src/guestfs.pod:1834
34716 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
34717 "(L</guestfs_launch>) then additional debug messages are generated."
34721 #: ../src/guestfs.pod:1837 ../src/guestfs.pod:1851
34723 "If no callback is registered: the messages are discarded unless the verbose "
34724 "flag is set in which case they are sent to stderr. You can override the "
34725 "printing of verbose messages to stderr by setting up a callback."
34729 #: ../src/guestfs.pod:1842
34730 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
34734 #: ../src/guestfs.pod:1845
34736 "The callback function is called whenever a log message is generated by the "
34737 "library part of libguestfs."
34741 #: ../src/guestfs.pod:1848
34743 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
34744 "messages are generated."
34748 #: ../src/guestfs.pod:1856
34749 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
34753 #: ../src/guestfs.pod:1859
34755 "The callback function is called whenever a trace message is generated. This "
34756 "only applies if the trace flag (L</guestfs_set_trace>) is set."
34760 #: ../src/guestfs.pod:1862
34762 "If no callback is registered: the messages are sent to stderr. You can "
34763 "override the printing of trace messages to stderr by setting up a callback."
34767 #: ../src/guestfs.pod:1866
34768 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
34772 #: ../src/guestfs.pod:1869
34773 msgid "The callback function is called whenever a libguestfs function is entered."
34777 #: ../src/guestfs.pod:1872
34779 "The payload is a string which contains the name of the function that we are "
34780 "entering (not including C<guestfs_> prefix)."
34784 #: ../src/guestfs.pod:1875
34786 "Note that libguestfs functions can call themselves, so you may see many "
34787 "events from a single call. A few libguestfs functions do not generate this "
34792 #: ../src/guestfs.pod:1883
34793 msgid "guestfs_set_event_callback"
34797 #: ../src/guestfs.pod:1885
34800 " int guestfs_set_event_callback (guestfs_h *g,\n"
34801 " guestfs_event_callback cb,\n"
34802 " uint64_t event_bitmask,\n"
34804 " void *opaque);\n"
34809 #: ../src/guestfs.pod:1891
34811 "This function registers a callback (C<cb>) for all event classes in the "
34812 "C<event_bitmask>."
34816 #: ../src/guestfs.pod:1894
34818 "For example, to register for all log message events, you could call this "
34819 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
34820 "To register a single callback for all possible classes of events, use "
34821 "C<GUESTFS_EVENT_ALL>."
34825 #: ../src/guestfs.pod:1900
34826 msgid "C<flags> should always be passed as 0."
34830 #: ../src/guestfs.pod:1902
34832 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
34833 "it for any purpose."
34837 #: ../src/guestfs.pod:1905
34839 "The return value is the event handle (an integer) which you can use to "
34840 "delete the callback (see below)."
34844 #: ../src/guestfs.pod:1908
34846 "If there is an error, this function returns C<-1>, and sets the error in the "
34847 "handle in the usual way (see L</guestfs_last_error> etc.)"
34851 #: ../src/guestfs.pod:1911
34853 "Callbacks remain in effect until they are deleted, or until the handle is "
34858 #: ../src/guestfs.pod:1914
34860 "In the case where multiple callbacks are registered for a particular event "
34861 "class, all of the callbacks are called. The order in which multiple "
34862 "callbacks are called is not defined."
34866 #: ../src/guestfs.pod:1918
34867 msgid "guestfs_delete_event_callback"
34871 #: ../src/guestfs.pod:1920
34874 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
34879 #: ../src/guestfs.pod:1922
34881 "Delete a callback that was previously registered. C<event_handle> should be "
34882 "the integer that was returned by a previous call to "
34883 "C<guestfs_set_event_callback> on the same handle."
34887 #: ../src/guestfs.pod:1926
34888 msgid "guestfs_event_callback"
34892 #: ../src/guestfs.pod:1928
34895 " typedef void (*guestfs_event_callback) (\n"
34898 " uint64_t event,\n"
34899 " int event_handle,\n"
34901 " const char *buf, size_t buf_len,\n"
34902 " const uint64_t *array, size_t array_len);\n"
34907 #: ../src/guestfs.pod:1937
34908 msgid "This is the type of the event callback function that you have to provide."
34912 #: ../src/guestfs.pod:1940
34914 "The basic parameters are: the handle (C<g>), the opaque user pointer "
34915 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
34916 "handle, and C<flags> which in the current API you should ignore."
34920 #: ../src/guestfs.pod:1944
34922 "The remaining parameters contain the event payload (if any). Each event may "
34923 "contain a payload, which usually relates to the event class, but for future "
34924 "proofing your code should be written to handle any payload for any event "
34929 #: ../src/guestfs.pod:1949
34931 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
34932 "there is no message buffer). Note that this message buffer can contain "
34933 "arbitrary 8 bit data, including NUL bytes."
34937 #: ../src/guestfs.pod:1953
34939 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
34940 "moment this is only used for progress messages."
34944 #: ../src/guestfs.pod:1956
34945 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
34949 #: ../src/guestfs.pod:1958
34951 "One motivation for the generic event API was to allow GUI programs to "
34952 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
34953 "unconditionally to C<stderr>."
34957 #: ../src/guestfs.pod:1962
34959 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
34960 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
34961 "messages are not events; you must capture error messages separately)."
34965 #: ../src/guestfs.pod:1967
34967 "Programs have to set up a callback to capture the classes of events of "
34972 #: ../src/guestfs.pod:1970
34976 " guestfs_set_event_callback\n"
34977 " (g, message_callback,\n"
34978 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
34979 " GUESTFS_EVENT_TRACE,\n"
34980 " 0, NULL) == -1)\n"
34981 " if (eh == -1) {\n"
34982 " // handle error in the usual way\n"
34988 #: ../src/guestfs.pod:1980
34990 "The callback can then direct messages to the appropriate place. In this "
34991 "example, messages are directed to syslog:"
34995 #: ../src/guestfs.pod:1983
34999 " message_callback (\n"
35002 " uint64_t event,\n"
35003 " int event_handle,\n"
35005 " const char *buf, size_t buf_len,\n"
35006 " const uint64_t *array, size_t array_len)\n"
35008 " const int priority = LOG_USER|LOG_INFO;\n"
35009 " if (buf_len > 0)\n"
35010 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
35016 #: ../src/guestfs.pod:1998
35017 msgid "CANCELLING LONG TRANSFERS"
35021 #: ../src/guestfs.pod:2000
35023 "Some operations can be cancelled by the caller while they are in progress. "
35024 "Currently only operations that involve uploading or downloading data can be "
35025 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
35026 "parameters in the generator)."
35030 #: ../src/guestfs.pod:2005
35031 msgid "guestfs_user_cancel"
35035 #: ../src/guestfs.pod:2007
35038 " void guestfs_user_cancel (guestfs_h *g);\n"
35043 #: ../src/guestfs.pod:2009
35044 msgid "C<guestfs_user_cancel> cancels the current upload or download operation."
35048 #: ../src/guestfs.pod:2012
35050 "Unlike most other libguestfs calls, this function is signal safe and thread "
35051 "safe. You can call it from a signal handler or from another thread, without "
35052 "needing to do any locking."
35056 #: ../src/guestfs.pod:2016
35058 "The transfer that was in progress (if there is one) will stop shortly "
35059 "afterwards, and will return an error. The errno (see "
35060 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
35061 "out if the operation was cancelled or failed because of another error."
35065 #: ../src/guestfs.pod:2022
35067 "No cleanup is performed: for example, if a file was being uploaded then "
35068 "after cancellation there may be a partially uploaded file. It is the "
35069 "caller's responsibility to clean up if necessary."
35073 #: ../src/guestfs.pod:2026
35074 msgid "There are two common places that you might call C<guestfs_user_cancel>."
35078 #: ../src/guestfs.pod:2028
35080 "In an interactive text-based program, you might call it from a C<SIGINT> "
35081 "signal handler so that pressing C<^C> cancels the current operation. (You "
35082 "also need to call L</guestfs_set_pgroup> so that child processes don't "
35083 "receive the C<^C> signal)."
35087 #: ../src/guestfs.pod:2033
35089 "In a graphical program, when the main thread is displaying a progress bar "
35090 "with a cancel button, wire up the cancel button to call this function."
35094 #: ../src/guestfs.pod:2037
35095 msgid "PRIVATE DATA AREA"
35099 #: ../src/guestfs.pod:2039
35101 "You can attach named pieces of private data to the libguestfs handle, fetch "
35102 "them by name, and walk over them, for the lifetime of the handle. This is "
35103 "called the private data area and is only available from the C API."
35107 #: ../src/guestfs.pod:2044
35108 msgid "To attach a named piece of data, use the following call:"
35112 #: ../src/guestfs.pod:2046
35115 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
35120 #: ../src/guestfs.pod:2048
35122 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
35123 "pointer (which can be C<NULL>). Any previous item with the same key is "
35128 #: ../src/guestfs.pod:2052
35130 "You can use any C<key> you want, but your key should I<not> start with an "
35131 "underscore character. Keys beginning with an underscore character are "
35132 "reserved for internal libguestfs purposes (eg. for implementing language "
35133 "bindings). It is recommended that you prefix the key with some unique "
35134 "string to avoid collisions with other users."
35138 #: ../src/guestfs.pod:2058
35139 msgid "To retrieve the pointer, use:"
35143 #: ../src/guestfs.pod:2060
35146 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
35151 #: ../src/guestfs.pod:2062
35153 "This function returns C<NULL> if either no data is found associated with "
35154 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
35159 #: ../src/guestfs.pod:2066
35161 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
35162 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
35163 "all. In particular, libguestfs does I<not> try to free the data when the "
35164 "handle is closed. If the data must be freed, then the caller must either "
35165 "free it before calling L</guestfs_close> or must set up a close callback to "
35166 "do it (see L</GUESTFS_EVENT_CLOSE>)."
35170 #: ../src/guestfs.pod:2073
35171 msgid "To walk over all entries, use these two functions:"
35175 #: ../src/guestfs.pod:2075
35178 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
35183 #: ../src/guestfs.pod:2077
35186 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
35191 #: ../src/guestfs.pod:2079
35193 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
35194 "not have any particular meaning -- keys are not returned in any defined "
35195 "order). A pointer to the key is returned in C<*key_rtn> and the "
35196 "corresponding data pointer is returned from the function. C<NULL> is "
35197 "returned if there are no keys stored in the handle."
35201 #: ../src/guestfs.pod:2085
35203 "C<guestfs_next_private> returns the next key, pointer pair. The return "
35204 "value of this function is also C<NULL> is there are no further entries to "
35209 #: ../src/guestfs.pod:2089
35210 msgid "Notes about walking over entries:"
35214 #: ../src/guestfs.pod:2095
35215 msgid "You must not call C<guestfs_set_private> while walking over the entries."
35219 #: ../src/guestfs.pod:2100
35221 "The handle maintains an internal iterator which is reset when you call "
35222 "C<guestfs_first_private>. This internal iterator is invalidated when you "
35223 "call C<guestfs_set_private>."
35227 #: ../src/guestfs.pod:2106
35228 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
35232 #: ../src/guestfs.pod:2108
35235 " guestfs_set_private (g, key, NULL);\n"
35240 #: ../src/guestfs.pod:2110
35241 msgid "then that C<key> is not returned when walking."
35245 #: ../src/guestfs.pod:2114
35247 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
35248 "C<guestfs_next_private> or C<guestfs_set_private>."
35252 #: ../src/guestfs.pod:2120
35254 "The following example code shows how to print all keys and data pointers "
35255 "that are associated with the handle C<g>:"
35259 #: ../src/guestfs.pod:2123
35262 " const char *key;\n"
35263 " void *data = guestfs_first_private (g, &key);\n"
35264 " while (data != NULL)\n"
35266 " printf (\"key = %s, data = %p\\n\", key, data);\n"
35267 " data = guestfs_next_private (g, &key);\n"
35273 #: ../src/guestfs.pod:2131
35275 "More commonly you are only interested in keys that begin with an "
35276 "application-specific prefix C<foo_>. Modify the loop like so:"
35280 #: ../src/guestfs.pod:2134
35283 " const char *key;\n"
35284 " void *data = guestfs_first_private (g, &key);\n"
35285 " while (data != NULL)\n"
35287 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
35288 " printf (\"key = %s, data = %p\\n\", key, data);\n"
35289 " data = guestfs_next_private (g, &key);\n"
35295 #: ../src/guestfs.pod:2143
35297 "If you need to modify keys while walking, then you have to jump back to the "
35298 "beginning of the loop. For example, to delete all keys prefixed with "
35303 #: ../src/guestfs.pod:2147
35306 " const char *key;\n"
35309 " data = guestfs_first_private (g, &key);\n"
35310 " while (data != NULL)\n"
35312 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
35314 " guestfs_set_private (g, key, NULL);\n"
35315 " /* note that 'key' pointer is now invalid, and so is\n"
35316 " the internal iterator */\n"
35319 " data = guestfs_next_private (g, &key);\n"
35325 #: ../src/guestfs.pod:2163
35327 "Note that the above loop is guaranteed to terminate because the keys are "
35328 "being deleted, but other manipulations of keys within the loop might not "
35329 "terminate unless you also maintain an indication of which keys have been "
35334 #: ../src/guestfs.pod:2168 ../src/guestfs.pod:2173
35339 #: ../src/guestfs.pod:2170
35341 "<!-- old anchor for the next section --> <a "
35342 "name=\"state_machine_and_low_level_event_api\"/>"
35346 #: ../src/guestfs.pod:2175
35347 msgid "ARCHITECTURE"
35351 #: ../src/guestfs.pod:2177
35353 "Internally, libguestfs is implemented by running an appliance (a special "
35354 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
35355 "process of the main program."
35359 #: ../src/guestfs.pod:2181
35362 " ___________________\n"
35364 " | main program |\n"
35366 " | | child process / appliance\n"
35367 " | | __________________________\n"
35369 " +-------------------+ RPC | +-----------------+ |\n"
35370 " | libguestfs <--------------------> guestfsd | |\n"
35371 " | | | +-----------------+ |\n"
35372 " \\___________________/ | | Linux kernel | |\n"
35373 " | +--^--------------+ |\n"
35374 " \\_________|________________/\n"
35376 " _______v______\n"
35379 " | disk image |\n"
35380 " \\______________/\n"
35385 #: ../src/guestfs.pod:2201
35387 "The library, linked to the main program, creates the child process and hence "
35388 "the appliance in the L</guestfs_launch> function."
35392 #: ../src/guestfs.pod:2204
35394 "Inside the appliance is a Linux kernel and a complete stack of userspace "
35395 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
35396 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
35397 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
35398 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
35399 "attached to the qemu process which translates device access by the "
35400 "appliance's Linux kernel into accesses to the image."
35404 #: ../src/guestfs.pod:2213
35406 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
35407 "Although the disk image you are attached to might also be used by some "
35408 "virtual machine, libguestfs doesn't know or care about this. (But you will "
35409 "care if both libguestfs's qemu process and your virtual machine are trying "
35410 "to update the disk image at the same time, since these usually results in "
35411 "massive disk corruption)."
35415 #: ../src/guestfs.pod:2220
35416 msgid "STATE MACHINE"
35420 #: ../src/guestfs.pod:2222
35421 msgid "libguestfs uses a state machine to model the child process:"
35425 #: ../src/guestfs.pod:2224
35429 " guestfs_create\n"
35437 " / | \\ \\ guestfs_launch\n"
35438 " / | _\\__V______\n"
35440 " / | | LAUNCHING |\n"
35441 " / | \\___________/\n"
35443 " / | guestfs_launch\n"
35445 " ______ / __|____V\n"
35446 " / \\ ------> / \\\n"
35447 " | BUSY | | READY |\n"
35448 " \\______/ <------ \\________/\n"
35453 #: ../src/guestfs.pod:2246
35455 "The normal transitions are (1) CONFIG (when the handle is created, but there "
35456 "is no child process), (2) LAUNCHING (when the child process is booting up), "
35457 "(3) alternating between READY and BUSY as commands are issued to, and "
35458 "carried out by, the child process."
35462 #: ../src/guestfs.pod:2251
35464 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
35465 "asynchronously at any time (eg. due to some internal error), and that causes "
35466 "the state to transition back to CONFIG."
35470 #: ../src/guestfs.pod:2255
35472 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
35473 "issued when in the CONFIG state."
35477 #: ../src/guestfs.pod:2258
35479 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
35480 "L</guestfs_launch> blocks until the child process is READY to accept "
35481 "commands (or until some failure or timeout). L</guestfs_launch> internally "
35482 "moves the state from CONFIG to LAUNCHING while it is running."
35486 #: ../src/guestfs.pod:2264
35488 "API actions such as L</guestfs_mount> can only be issued when in the READY "
35489 "state. These API calls block waiting for the command to be carried out "
35490 "(ie. the state to transition to BUSY and then back to READY). There are no "
35491 "non-blocking versions, and no way to issue more than one command per handle "
35492 "at the same time."
35496 #: ../src/guestfs.pod:2270
35498 "Finally, the child process sends asynchronous messages back to the main "
35499 "program, such as kernel log messages. You can register a callback to "
35500 "receive these messages."
35504 #: ../src/guestfs.pod:2274
35509 #: ../src/guestfs.pod:2276
35510 msgid "APPLIANCE BOOT PROCESS"
35514 #: ../src/guestfs.pod:2278
35516 "This process has evolved and continues to evolve. The description here "
35517 "corresponds only to the current version of libguestfs and is provided for "
35518 "information only."
35522 #: ../src/guestfs.pod:2282
35524 "In order to follow the stages involved below, enable libguestfs debugging "
35525 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
35529 #: ../src/guestfs.pod:2287
35530 msgid "Create the appliance"
35534 #: ../src/guestfs.pod:2289
35536 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
35537 "initrd and the appliance."
35541 #: ../src/guestfs.pod:2292
35543 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
35544 "directory if C<TMPDIR> is set)."
35548 #: ../src/guestfs.pod:2295
35550 "For a complete description of how the appliance is created and cached, read "
35551 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
35555 #: ../src/guestfs.pod:2299
35556 msgid "Start qemu and boot the kernel"
35560 #: ../src/guestfs.pod:2301
35561 msgid "qemu is invoked to boot the kernel."
35565 #: ../src/guestfs.pod:2303
35566 msgid "Run the initrd"
35570 #: ../src/guestfs.pod:2305
35572 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
35573 "appliance. The purpose of the initrd is to load enough kernel modules in "
35574 "order that the appliance itself can be mounted and started."
35578 #: ../src/guestfs.pod:2309
35580 "The initrd is a cpio archive called "
35581 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
35585 #: ../src/guestfs.pod:2312
35587 "When the initrd has started you will see messages showing that kernel "
35588 "modules are being loaded, similar to this:"
35592 #: ../src/guestfs.pod:2315
35595 " febootstrap: ext2 mini initrd starting up\n"
35596 " febootstrap: mounting /sys\n"
35597 " febootstrap: internal insmod libcrc32c.ko\n"
35598 " febootstrap: internal insmod crc32c-intel.ko\n"
35603 #: ../src/guestfs.pod:2320
35604 msgid "Find and mount the appliance device"
35608 #: ../src/guestfs.pod:2322
35610 "The appliance is a sparse file containing an ext2 filesystem which contains "
35611 "a familiar (although reduced in size) Linux operating system. It would "
35612 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
35616 #: ../src/guestfs.pod:2326
35618 "The regular disks being inspected by libguestfs are the first devices "
35619 "exposed by qemu (eg. as C</dev/vda>)."
35623 #: ../src/guestfs.pod:2329
35625 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
35626 "there was only one regular disk)."
35630 #: ../src/guestfs.pod:2332
35632 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
35633 "and switch root into the appliance, and run C</init> from the appliance."
35637 #: ../src/guestfs.pod:2336
35638 msgid "If this works successfully you will see messages such as:"
35642 #: ../src/guestfs.pod:2338
35645 " febootstrap: picked /sys/block/vdb/dev as root device\n"
35646 " febootstrap: creating /dev/root as block special 252:16\n"
35647 " febootstrap: mounting new root on /root\n"
35648 " febootstrap: chroot\n"
35649 " Starting /init script ...\n"
35654 #: ../src/guestfs.pod:2344
35656 "Note that C<Starting /init script ...> indicates that the appliance's init "
35657 "script is now running."
35661 #: ../src/guestfs.pod:2347
35662 msgid "Initialize the appliance"
35666 #: ../src/guestfs.pod:2349
35668 "The appliance itself now initializes itself. This involves starting certain "
35669 "processes like C<udev>, possibly printing some debug information, and "
35670 "finally running the daemon (C<guestfsd>)."
35674 #: ../src/guestfs.pod:2353
35679 #: ../src/guestfs.pod:2355
35681 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
35686 #: ../src/guestfs.pod:2358
35689 " verbose daemon enabled\n"
35694 #: ../src/guestfs.pod:2360
35696 "The daemon expects to see a named virtio-serial port exposed by qemu and "
35697 "connected on the other end to the library."
35701 #: ../src/guestfs.pod:2363
35703 "The daemon connects to this port (and hence to the library) and sends a four "
35704 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
35705 "protocol (see below)."
35709 #: ../src/guestfs.pod:2369
35710 msgid "COMMUNICATION PROTOCOL"
35714 #: ../src/guestfs.pod:2371
35716 "Don't rely on using this protocol directly. This section documents how it "
35717 "currently works, but it may change at any time."
35721 #: ../src/guestfs.pod:2374
35723 "The protocol used to talk between the library and the daemon running inside "
35724 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
35725 "1014, RFC 1832, RFC 4506)."
35729 #: ../src/guestfs.pod:2378
35731 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
35732 "this file is automatically generated)."
35736 #: ../src/guestfs.pod:2381
35738 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
35739 "and C<FileOut> parameters, which are handled with very simple request/reply "
35740 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
35741 "parameters, which use the same request and reply messages, but they may also "
35742 "be followed by files sent using a chunked encoding."
35746 #: ../src/guestfs.pod:2388
35747 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
35751 #: ../src/guestfs.pod:2390
35752 msgid "For ordinary functions, the request message is:"
35756 #: ../src/guestfs.pod:2392
35759 " total length (header + arguments,\n"
35760 " but not including the length word itself)\n"
35761 " struct guestfs_message_header (encoded as XDR)\n"
35762 " struct guestfs_<foo>_args (encoded as XDR)\n"
35767 #: ../src/guestfs.pod:2397
35769 "The total length field allows the daemon to allocate a fixed size buffer "
35770 "into which it slurps the rest of the message. As a result, the total length "
35771 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
35772 "effective size of any request is limited to somewhere under this size."
35776 #: ../src/guestfs.pod:2403
35778 "Note also that many functions don't take any arguments, in which case the "
35779 "C<guestfs_I<foo>_args> is completely omitted."
35783 #: ../src/guestfs.pod:2406
35785 "The header contains the procedure number (C<guestfs_proc>) which is how the "
35786 "receiver knows what type of args structure to expect, or none at all."
35790 #: ../src/guestfs.pod:2410
35792 "For functions that take optional arguments, the optional arguments are "
35793 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
35794 "arguments. A bitmask in the header indicates which optional arguments are "
35795 "meaningful. The bitmask is also checked to see if it contains bits set "
35796 "which the daemon does not know about (eg. if more optional arguments were "
35797 "added in a later version of the library), and this causes the call to be "
35802 #: ../src/guestfs.pod:2418
35803 msgid "The reply message for ordinary functions is:"
35807 #: ../src/guestfs.pod:2420
35810 " total length (header + ret,\n"
35811 " but not including the length word itself)\n"
35812 " struct guestfs_message_header (encoded as XDR)\n"
35813 " struct guestfs_<foo>_ret (encoded as XDR)\n"
35818 #: ../src/guestfs.pod:2425
35820 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
35821 "functions that return no formal return values."
35825 #: ../src/guestfs.pod:2428
35826 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
35830 #: ../src/guestfs.pod:2431
35832 "In the case of an error, a flag is set in the header, and the reply message "
35833 "is slightly changed:"
35837 #: ../src/guestfs.pod:2434
35840 " total length (header + error,\n"
35841 " but not including the length word itself)\n"
35842 " struct guestfs_message_header (encoded as XDR)\n"
35843 " struct guestfs_message_error (encoded as XDR)\n"
35848 #: ../src/guestfs.pod:2439
35850 "The C<guestfs_message_error> structure contains the error message as a "
35855 #: ../src/guestfs.pod:2442
35856 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
35860 #: ../src/guestfs.pod:2444
35862 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
35863 "The normal request message is sent (see above). However this is followed by "
35864 "a sequence of file chunks."
35868 #: ../src/guestfs.pod:2448
35871 " total length (header + arguments,\n"
35872 " but not including the length word itself,\n"
35873 " and not including the chunks)\n"
35874 " struct guestfs_message_header (encoded as XDR)\n"
35875 " struct guestfs_<foo>_args (encoded as XDR)\n"
35876 " sequence of chunks for FileIn param #0\n"
35877 " sequence of chunks for FileIn param #1 etc.\n"
35882 #: ../src/guestfs.pod:2456
35883 msgid "The \"sequence of chunks\" is:"
35887 #: ../src/guestfs.pod:2458
35890 " length of chunk (not including length word itself)\n"
35891 " struct guestfs_chunk (encoded as XDR)\n"
35892 " length of chunk\n"
35893 " struct guestfs_chunk (encoded as XDR)\n"
35895 " length of chunk\n"
35896 " struct guestfs_chunk (with data.data_len == 0)\n"
35901 #: ../src/guestfs.pod:2466
35903 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
35904 "is set in the final chunk to indicate either successful completion or early "
35909 #: ../src/guestfs.pod:2470
35911 "At time of writing there are no functions that have more than one FileIn "
35912 "parameter. However this is (theoretically) supported, by sending the "
35913 "sequence of chunks for each FileIn parameter one after another (from left to "
35918 #: ../src/guestfs.pod:2475
35920 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
35921 "transfer. The library does this by sending a chunk with a special flag set "
35922 "to indicate cancellation. When the daemon sees this, it cancels the whole "
35923 "RPC, does I<not> send any reply, and goes back to reading the next request."
35927 #: ../src/guestfs.pod:2481
35929 "The daemon may also cancel. It does this by writing a special word "
35930 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
35931 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
35932 "cancel chunk). The special word is chosen so that even if cancellation "
35933 "happens right at the end of the transfer (after the library has finished "
35934 "writing and has started listening for the reply), the \"spurious\" cancel "
35935 "flag will not be confused with the reply message."
35939 #: ../src/guestfs.pod:2490
35941 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
35942 "limit), and also files where the size is not known in advance (eg. from "
35943 "pipes or sockets). However the chunks are rather small "
35944 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
35945 "to keep much in memory."
35949 #: ../src/guestfs.pod:2496
35950 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
35954 #: ../src/guestfs.pod:2498
35956 "The protocol for FileOut parameters is exactly the same as for FileIn "
35957 "parameters, but with the roles of daemon and library reversed."
35961 #: ../src/guestfs.pod:2501
35964 " total length (header + ret,\n"
35965 " but not including the length word itself,\n"
35966 " and not including the chunks)\n"
35967 " struct guestfs_message_header (encoded as XDR)\n"
35968 " struct guestfs_<foo>_ret (encoded as XDR)\n"
35969 " sequence of chunks for FileOut param #0\n"
35970 " sequence of chunks for FileOut param #1 etc.\n"
35975 #: ../src/guestfs.pod:2509
35976 msgid "INITIAL MESSAGE"
35980 #: ../src/guestfs.pod:2511
35982 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
35983 "which indicates that the guest and daemon is alive. This is what "
35984 "L</guestfs_launch> waits for."
35988 #: ../src/guestfs.pod:2515
35989 msgid "PROGRESS NOTIFICATION MESSAGES"
35993 #: ../src/guestfs.pod:2517
35995 "The daemon may send progress notification messages at any time. These are "
35996 "distinguished by the normal length word being replaced by "
35997 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
36001 #: ../src/guestfs.pod:2521
36003 "The library turns them into progress callbacks (see "
36004 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
36009 #: ../src/guestfs.pod:2525
36011 "The daemon self-limits the frequency of progress messages it sends (see "
36012 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
36017 #: ../src/guestfs.pod:2529
36018 msgid "LIBGUESTFS VERSION NUMBERS"
36022 #: ../src/guestfs.pod:2531
36024 "Since April 2010, libguestfs has started to make separate development and "
36025 "stable releases, along with corresponding branches in our git repository. "
36026 "These separate releases can be identified by version number:"
36030 #: ../src/guestfs.pod:2536
36033 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
36034 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
36040 " | `-------- sub-version\n"
36042 " `------ always '1' because we don't change the ABI\n"
36047 #: ../src/guestfs.pod:2547
36048 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
36052 #: ../src/guestfs.pod:2549
36054 "As time passes we cherry pick fixes from the development branch and backport "
36055 "those into the stable branch, the effect being that the stable branch should "
36056 "get more stable and less buggy over time. So the stable releases are ideal "
36057 "for people who don't need new features but would just like the software to "
36062 #: ../src/guestfs.pod:2555
36063 msgid "Our criteria for backporting changes are:"
36067 #: ../src/guestfs.pod:2561
36069 "Documentation changes which don't affect any code are backported unless the "
36070 "documentation refers to a future feature which is not in stable."
36074 #: ../src/guestfs.pod:2567
36076 "Bug fixes which are not controversial, fix obvious problems, and have been "
36077 "well tested are backported."
36081 #: ../src/guestfs.pod:2572
36083 "Simple rearrangements of code which shouldn't affect how it works get "
36084 "backported. This is so that the code in the two branches doesn't get too "
36085 "far out of step, allowing us to backport future fixes more easily."
36089 #: ../src/guestfs.pod:2578
36091 "We I<don't> backport new features, new APIs, new tools etc, except in one "
36092 "exceptional case: the new feature is required in order to implement an "
36093 "important bug fix."
36097 #: ../src/guestfs.pod:2584
36099 "A new stable branch starts when we think the new features in development are "
36100 "substantial and compelling enough over the current stable branch to warrant "
36101 "it. When that happens we create new stable and development versions 1.N.0 "
36102 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
36103 "stable at this point, but by backporting fixes from development, that branch "
36104 "will stabilize over time."
36108 #: ../src/guestfs.pod:2592
36109 msgid "EXTENDING LIBGUESTFS"
36113 #: ../src/guestfs.pod:2594
36114 msgid "ADDING A NEW API ACTION"
36118 #: ../src/guestfs.pod:2596
36120 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
36121 "documentation) are generated, and this makes it easy to extend the "
36126 #: ../src/guestfs.pod:2600
36127 msgid "To add a new API action there are two changes:"
36131 #: ../src/guestfs.pod:2606
36133 "You need to add a description of the call (name, parameters, return type, "
36134 "tests, documentation) to C<generator/generator_actions.ml>."
36138 #: ../src/guestfs.pod:2609
36140 "There are two sorts of API action, depending on whether the call goes "
36141 "through to the daemon in the appliance, or is serviced entirely by the "
36142 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
36143 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
36144 "an example of the latter, since a trace flag is maintained in the handle and "
36145 "all tracing is done on the library side."
36149 #: ../src/guestfs.pod:2617
36151 "Most new actions are of the first type, and get added to the "
36152 "C<daemon_functions> list. Each function has a unique procedure number used "
36153 "in the RPC protocol which is assigned to that action when we publish "
36154 "libguestfs and cannot be reused. Take the latest procedure number and "
36159 #: ../src/guestfs.pod:2623
36161 "For library-only actions of the second type, add to the "
36162 "C<non_daemon_functions> list. Since these functions are serviced by the "
36163 "library and do not travel over the RPC mechanism to the daemon, these "
36164 "functions do not need a procedure number, and so the procedure number is set "
36169 #: ../src/guestfs.pod:2631
36170 msgid "Implement the action (in C):"
36174 #: ../src/guestfs.pod:2633
36176 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
36177 "C<daemon/> directory."
36181 #: ../src/guestfs.pod:2636
36183 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
36184 "(note: double underscore) in the C<src/> directory."
36188 #: ../src/guestfs.pod:2639
36189 msgid "In either case, use another function as an example of what to do."
36193 #: ../src/guestfs.pod:2643
36194 msgid "After making these changes, use C<make> to compile."
36198 #: ../src/guestfs.pod:2645
36200 "Note that you don't need to implement the RPC, language bindings, manual "
36201 "pages or anything else. It's all automatically generated from the OCaml "
36206 #: ../src/guestfs.pod:2649
36207 msgid "ADDING TESTS FOR AN API ACTION"
36211 #: ../src/guestfs.pod:2651
36213 "You can supply zero or as many tests as you want per API call. The tests "
36214 "can either be added as part of the API description "
36215 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
36216 "drop a script into C<regressions/>. Note that adding a script to "
36217 "C<regressions/> is slower, so if possible use the first method."
36221 #: ../src/guestfs.pod:2657
36223 "The following describes the test environment used when you add an API test "
36224 "in C<generator_actions.ml>."
36228 #: ../src/guestfs.pod:2660
36229 msgid "The test environment has 4 block devices:"
36233 #: ../src/guestfs.pod:2664
36234 msgid "C</dev/sda> 500MB"
36238 #: ../src/guestfs.pod:2666
36239 msgid "General block device for testing."
36243 #: ../src/guestfs.pod:2668
36244 msgid "C</dev/sdb> 50MB"
36248 #: ../src/guestfs.pod:2670
36250 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
36255 #: ../src/guestfs.pod:2673
36256 msgid "C</dev/sdc> 10MB"
36260 #: ../src/guestfs.pod:2675
36261 msgid "Used in a few tests where two block devices are needed."
36265 #: ../src/guestfs.pod:2677
36266 msgid "C</dev/sdd>"
36270 #: ../src/guestfs.pod:2679
36271 msgid "ISO with fixed content (see C<images/test.iso>)."
36275 #: ../src/guestfs.pod:2683
36277 "To be able to run the tests in a reasonable amount of time, the libguestfs "
36278 "appliance and block devices are reused between tests. So don't try testing "
36279 "L</guestfs_kill_subprocess> :-x"
36283 #: ../src/guestfs.pod:2687
36285 "Each test starts with an initial scenario, selected using one of the "
36286 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
36287 "initialize the disks mentioned above in a particular way as documented in "
36288 "C<generator_types.ml>. You should not assume anything about the previous "
36289 "contents of other disks that are not initialized."
36293 #: ../src/guestfs.pod:2693
36295 "You can add a prerequisite clause to any individual test. This is a "
36296 "run-time check, which, if it fails, causes the test to be skipped. Useful "
36297 "if testing a command which might not work on all variations of libguestfs "
36298 "builds. A test that has prerequisite of C<Always> means to run "
36303 #: ../src/guestfs.pod:2699
36305 "In addition, packagers can skip individual tests by setting environment "
36306 "variables before running C<make check>."
36310 #: ../src/guestfs.pod:2702
36313 " SKIP_TEST_<CMD>_<NUM>=1\n"
36318 #: ../src/guestfs.pod:2704
36319 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
36323 #: ../src/guestfs.pod:2706
36328 #: ../src/guestfs.pod:2708
36331 " SKIP_TEST_<CMD>=1\n"
36336 #: ../src/guestfs.pod:2710
36337 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
36341 #: ../src/guestfs.pod:2712
36342 msgid "Packagers can run only certain tests by setting for example:"
36346 #: ../src/guestfs.pod:2714
36349 " TEST_ONLY=\"vfs_type zerofree\"\n"
36354 #: ../src/guestfs.pod:2716
36356 "See C<capitests/tests.c> for more details of how these environment variables "
36361 #: ../src/guestfs.pod:2719
36362 msgid "DEBUGGING NEW API ACTIONS"
36366 #: ../src/guestfs.pod:2721
36367 msgid "Test new actions work before submitting them."
36371 #: ../src/guestfs.pod:2723
36372 msgid "You can use guestfish to try out new commands."
36376 #: ../src/guestfs.pod:2725
36378 "Debugging the daemon is a problem because it runs inside a minimal "
36379 "environment. However you can fprintf messages in the daemon to stderr, and "
36380 "they will show up if you use C<guestfish -v>."
36384 #: ../src/guestfs.pod:2729
36385 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
36389 #: ../src/guestfs.pod:2731
36391 "Our C source code generally adheres to some basic code-formatting "
36392 "conventions. The existing code base is not totally consistent on this "
36393 "front, but we do prefer that contributed code be formatted similarly. In "
36394 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
36395 "indentation level, and other than that, follow the K&R style."
36399 #: ../src/guestfs.pod:2737
36401 "If you use Emacs, add the following to one of one of your start-up files "
36402 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
36406 #: ../src/guestfs.pod:2740
36409 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
36410 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
36411 " (add-hook 'find-file-hook\n"
36412 " '(lambda () (if (and buffer-file-name\n"
36413 " (string-match \"/libguestfs\\\\>\"\n"
36414 " (buffer-file-name))\n"
36415 " (not (string-equal mode-name \"Change Log\"))\n"
36416 " (not (string-equal mode-name \"Makefile\")))\n"
36417 " (setq indent-tabs-mode nil))))\n"
36422 #: ../src/guestfs.pod:2750
36425 " ;;; When editing C sources in libguestfs, use this style.\n"
36426 " (defun libguestfs-c-mode ()\n"
36427 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
36429 " (c-set-style \"K&R\")\n"
36430 " (setq c-indent-level 2)\n"
36431 " (setq c-basic-offset 2))\n"
36432 " (add-hook 'c-mode-hook\n"
36433 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
36434 " (buffer-file-name))\n"
36435 " (libguestfs-c-mode))))\n"
36440 #: ../src/guestfs.pod:2762
36441 msgid "Enable warnings when compiling (and fix any problems this finds):"
36445 #: ../src/guestfs.pod:2765
36448 " ./configure --enable-gcc-warnings\n"
36453 #: ../src/guestfs.pod:2767
36454 msgid "Useful targets are:"
36458 #: ../src/guestfs.pod:2769
36461 " make syntax-check # checks the syntax of the C code\n"
36462 " make check # runs the test suite\n"
36467 #: ../src/guestfs.pod:2772
36468 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
36472 #: ../src/guestfs.pod:2774
36474 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
36475 "which are used to do shell quoting."
36479 #: ../src/guestfs.pod:2779
36484 #: ../src/guestfs.pod:2781
36486 "Simple shell quoted string. Any spaces or other shell characters are "
36491 #: ../src/guestfs.pod:2784
36496 #: ../src/guestfs.pod:2786
36498 "Same as C<%Q> except the string is treated as a path which is prefixed by "
36503 #: ../src/guestfs.pod:2793
36506 " asprintf (&cmd, \"cat %R\", path);\n"
36511 #: ../src/guestfs.pod:2795
36512 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
36516 #: ../src/guestfs.pod:2797
36518 "I<Note:> Do I<not> use these when you are passing parameters to the "
36519 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
36520 "because they are not passed via the shell (instead, straight to exec). You "
36521 "probably want to use the C<sysroot_path()> function however."
36525 #: ../src/guestfs.pod:2803
36526 msgid "SUBMITTING YOUR NEW API ACTIONS"
36530 #: ../src/guestfs.pod:2805
36532 "Submit patches to the mailing list: "
36533 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
36534 "L<rjones@redhat.com>."
36538 #: ../src/guestfs.pod:2809
36539 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
36543 #: ../src/guestfs.pod:2811
36544 msgid "We support i18n (gettext anyhow) in the library."
36548 #: ../src/guestfs.pod:2813
36550 "However many messages come from the daemon, and we don't translate those at "
36551 "the moment. One reason is that the appliance generally has all locale files "
36552 "removed from it, because they take up a lot of space. So we'd have to readd "
36553 "some of those, as well as copying our PO files into the appliance."
36557 #: ../src/guestfs.pod:2819
36559 "Debugging messages are never translated, since they are intended for the "
36564 #: ../src/guestfs.pod:2822
36565 msgid "SOURCE CODE SUBDIRECTORIES"
36569 #: ../src/guestfs.pod:2826
36574 #: ../src/guestfs.pod:2828
36575 msgid "L<virt-alignment-scan(1)> command and documentation."
36579 #: ../src/guestfs.pod:2832
36580 msgid "The libguestfs appliance, build scripts and so on."
36584 #: ../src/guestfs.pod:2834
36585 msgid "C<capitests>"
36589 #: ../src/guestfs.pod:2836
36590 msgid "Automated tests of the C API."
36594 #: ../src/guestfs.pod:2838
36599 #: ../src/guestfs.pod:2840
36601 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
36606 #: ../src/guestfs.pod:2843
36611 #: ../src/guestfs.pod:2845
36613 "Safety and liveness tests of components that libguestfs depends upon (not of "
36614 "libguestfs itself). Mainly this is for qemu and the kernel."
36618 #: ../src/guestfs.pod:2848
36623 #: ../src/guestfs.pod:2850
36624 msgid "Outside contributions, experimental parts."
36628 #: ../src/guestfs.pod:2852
36633 #: ../src/guestfs.pod:2854
36635 "The daemon that runs inside the libguestfs appliance and carries out "
36640 #: ../src/guestfs.pod:2857
36645 #: ../src/guestfs.pod:2859
36646 msgid "L<virt-df(1)> command and documentation."
36650 #: ../src/guestfs.pod:2861
36655 #: ../src/guestfs.pod:2863
36656 msgid "L<virt-edit(1)> command and documentation."
36660 #: ../src/guestfs.pod:2865
36661 msgid "C<examples>"
36665 #: ../src/guestfs.pod:2867
36666 msgid "C API example code."
36670 #: ../src/guestfs.pod:2869
36675 #: ../src/guestfs.pod:2871
36677 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
36678 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
36679 "L<virt-tar-out(1)>."
36683 #: ../src/guestfs.pod:2875
36688 #: ../src/guestfs.pod:2877
36689 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
36693 #: ../src/guestfs.pod:2879
36694 msgid "C<generator>"
36698 #: ../src/guestfs.pod:2881
36700 "The crucially important generator, used to automatically generate large "
36701 "amounts of boilerplate C code for things like RPC and bindings."
36705 #: ../src/guestfs.pod:2884
36710 #: ../src/guestfs.pod:2886
36711 msgid "Files used by the test suite."
36715 #: ../src/guestfs.pod:2888
36716 msgid "Some \"phony\" guest images which we test against."
36720 #: ../src/guestfs.pod:2890
36721 msgid "C<inspector>"
36725 #: ../src/guestfs.pod:2892
36726 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
36730 #: ../src/guestfs.pod:2894
36735 #: ../src/guestfs.pod:2896
36736 msgid "Logo used on the website. The fish is called Arthur by the way."
36740 #: ../src/guestfs.pod:2898
36745 #: ../src/guestfs.pod:2900
36746 msgid "M4 macros used by autoconf."
36750 #: ../src/guestfs.pod:2902
36755 #: ../src/guestfs.pod:2904
36756 msgid "Translations of simple gettext strings."
36760 #: ../src/guestfs.pod:2906
36765 #: ../src/guestfs.pod:2908
36767 "The build infrastructure and PO files for translations of manpages and POD "
36768 "files. Eventually this will be combined with the C<po> directory, but that "
36769 "is rather complicated."
36773 #: ../src/guestfs.pod:2912
36774 msgid "C<regressions>"
36778 #: ../src/guestfs.pod:2914
36779 msgid "Regression tests."
36783 #: ../src/guestfs.pod:2916
36788 #: ../src/guestfs.pod:2918
36789 msgid "L<virt-rescue(1)> command and documentation."
36793 #: ../src/guestfs.pod:2920
36798 #: ../src/guestfs.pod:2922
36799 msgid "L<virt-resize(1)> command and documentation."
36803 #: ../src/guestfs.pod:2924
36804 msgid "C<sparsify>"
36808 #: ../src/guestfs.pod:2926
36809 msgid "L<virt-sparsify(1)> command and documentation."
36813 #: ../src/guestfs.pod:2928
36818 #: ../src/guestfs.pod:2930
36819 msgid "Source code to the C library."
36823 #: ../src/guestfs.pod:2932
36828 #: ../src/guestfs.pod:2934
36829 msgid "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
36833 #: ../src/guestfs.pod:2936
36834 msgid "C<test-tool>"
36838 #: ../src/guestfs.pod:2938
36840 "Test tool for end users to test if their qemu/kernel combination will work "
36845 #: ../src/guestfs.pod:2941
36850 #: ../src/guestfs.pod:2943
36855 #: ../src/guestfs.pod:2945
36860 #: ../src/guestfs.pod:2947
36865 #: ../src/guestfs.pod:2949
36870 #: ../src/guestfs.pod:2951
36875 #: ../src/guestfs.pod:2953
36880 #: ../src/guestfs.pod:2955
36885 #: ../src/guestfs.pod:2957
36890 #: ../src/guestfs.pod:2959
36891 msgid "Language bindings."
36895 #: ../src/guestfs.pod:2963
36896 msgid "MAKING A STABLE RELEASE"
36900 #: ../src/guestfs.pod:2965
36902 "When we make a stable release, there are several steps documented here. See "
36903 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
36908 #: ../src/guestfs.pod:2973
36909 msgid "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
36913 #: ../src/guestfs.pod:2978
36914 msgid "Finalize RELEASE-NOTES."
36918 #: ../src/guestfs.pod:2982
36919 msgid "Update ROADMAP."
36923 #: ../src/guestfs.pod:2986
36924 msgid "Run C<src/api-support/update-from-tarballs.sh>."
36928 #: ../src/guestfs.pod:2990
36929 msgid "Push and pull from Transifex."
36933 #: ../src/guestfs.pod:2992
36938 #: ../src/guestfs.pod:2994
36946 #: ../src/guestfs.pod:2996
36947 msgid "to push the latest POT files to Transifex. Then run:"
36951 #: ../src/guestfs.pod:2998
36959 #: ../src/guestfs.pod:3000
36960 msgid "which is a wrapper to pull the latest translated C<*.po> files."
36964 #: ../src/guestfs.pod:3004
36966 "Create new stable and development directories under "
36967 "L<http://libguestfs.org/download>."
36971 #: ../src/guestfs.pod:3009
36972 msgid "Create the branch in git:"
36976 #: ../src/guestfs.pod:3011
36979 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
36980 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
36981 " git branch stable-1.XX\n"
36982 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
36987 #: ../src/guestfs.pod:3018
36992 #: ../src/guestfs.pod:3020
36993 msgid "PROTOCOL LIMITS"
36997 #: ../src/guestfs.pod:3022
36999 "Internally libguestfs uses a message-based protocol to pass API calls and "
37000 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
37001 "plenty more detail about this). The maximum message size used by the "
37002 "protocol is slightly less than 4 MB. For some API calls you may need to be "
37003 "aware of this limit. The API calls which may be affected are individually "
37004 "documented, with a link back to this section of the documentation."
37008 #: ../src/guestfs.pod:3030
37010 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
37011 "a simple string. Because this string is at some point internally encoded as "
37012 "a message, the maximum size that it can return is slightly under 4 MB. If "
37013 "the requested file is larger than this then you will get an error."
37017 #: ../src/guestfs.pod:3036
37019 "In order to transfer large files into and out of the guest filesystem, you "
37020 "need to use particular calls that support this. The sections L</UPLOADING> "
37021 "and L</DOWNLOADING> document how to do this."
37025 #: ../src/guestfs.pod:3040
37027 "You might also consider mounting the disk image using our FUSE filesystem "
37028 "support (L<guestmount(1)>)."
37032 #: ../src/guestfs.pod:3043
37033 msgid "MAXIMUM NUMBER OF DISKS"
37037 #: ../src/guestfs.pod:3045
37038 msgid "When using virtio disks (the default) the current limit is B<25> disks."
37042 #: ../src/guestfs.pod:3048
37044 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
37045 "slots. However febootstrap only understands disks with names C</dev/vda> "
37046 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
37051 #: ../src/guestfs.pod:3053
37053 "We are working to substantially raise this limit in future versions but it "
37054 "requires complex changes to qemu."
37058 #: ../src/guestfs.pod:3056
37060 "In future versions of libguestfs it should also be possible to \"hot plug\" "
37061 "disks (add and remove disks after calling L</guestfs_launch>). This also "
37062 "requires changes to qemu."
37066 #: ../src/guestfs.pod:3060
37067 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
37071 #: ../src/guestfs.pod:3062
37072 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
37076 #: ../src/guestfs.pod:3064
37078 "This is because it reserves 4 bits for the minor device number (thus "
37079 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
37083 #: ../src/guestfs.pod:3067
37085 "If you attach a disk with more than 15 partitions, the extra partitions are "
37086 "ignored by libguestfs."
37090 #: ../src/guestfs.pod:3070
37091 msgid "MAXIMUM SIZE OF A DISK"
37095 #: ../src/guestfs.pod:3072
37096 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
37100 #: ../src/guestfs.pod:3074
37102 "We have tested block devices up to 1 exabyte (2**60 or "
37103 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
37108 #: ../src/guestfs.pod:3078
37110 "Although libguestfs probably does not impose any limit, the underlying host "
37111 "storage will. If you store disk images on a host ext4 filesystem, then the "
37112 "maximum size will be limited by the maximum ext4 file size (currently 16 "
37113 "TB). If you store disk images as host logical volumes then you are limited "
37114 "by the maximum size of an LV."
37118 #: ../src/guestfs.pod:3084
37120 "For the hugest disk image files, we recommend using XFS on the host for "
37125 #: ../src/guestfs.pod:3087
37126 msgid "MAXIMUM SIZE OF A PARTITION"
37130 #: ../src/guestfs.pod:3089
37132 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
37133 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
37134 "address a partition located beyond 2 TB on the disk."
37138 #: ../src/guestfs.pod:3093
37140 "It is recommended that you use GPT partitions on disks which are larger than "
37141 "this size. GPT uses 64 bit sector numbers and so can address partitions "
37142 "which are theoretically larger than the largest disk we could support."
37146 #: ../src/guestfs.pod:3098
37147 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
37151 #: ../src/guestfs.pod:3100
37153 "This depends on the filesystem type. libguestfs itself does not impose any "
37154 "known limit. Consult Wikipedia or the filesystem documentation to find out "
37155 "what these limits are."
37159 #: ../src/guestfs.pod:3104
37160 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
37164 #: ../src/guestfs.pod:3106
37166 "The API functions L</guestfs_upload>, L</guestfs_download>, "
37167 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
37168 "uploads and downloads."
37172 #: ../src/guestfs.pod:3110
37173 msgid "INSPECTION LIMITS"
37177 #: ../src/guestfs.pod:3112
37179 "The inspection code has several arbitrary limits on things like the size of "
37180 "Windows Registry hive it will read, and the length of product name. These "
37181 "are intended to stop a malicious guest from consuming arbitrary amounts of "
37182 "memory and disk space on the host, and should not be reached in practice. "
37183 "See the source code for more information."
37187 #: ../src/guestfs.pod:3138
37189 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
37190 "effect as calling C<guestfs_set_verbose (g, 1)>."
37194 #: ../src/guestfs.pod:3150
37196 "Set the path that libguestfs uses to search for a supermin appliance. See "
37197 "the discussion of paths in section L</PATH> above."
37201 #: ../src/guestfs.pod:3159
37202 msgid "See also L</QEMU WRAPPERS> above."
37206 #: ../src/guestfs.pod:3163
37208 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
37209 "effect as calling C<guestfs_set_trace (g, 1)>."
37213 #: ../src/guestfs.pod:3181
37215 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
37216 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
37217 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, "
37218 "L<virt-alignment-scan(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
37219 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
37220 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
37221 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
37222 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-tar(1)>, "
37223 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
37224 "L<febootstrap(1)>, L<febootstrap-supermin-helper(8)>, L<hivex(3)>, "
37225 "L<http://libguestfs.org/>."
37229 #: ../src/guestfs.pod:3215
37231 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
37232 "L<lvm(8)>, L<disktype(1)>."
37236 #: ../src/guestfs.pod:3222 ../tools/virt-make-fs.pl:553 ../tools/virt-win-reg.pl:761
37241 #: ../src/guestfs.pod:3224
37242 msgid "To get a list of bugs against libguestfs use this link:"
37246 #: ../src/guestfs.pod:3226
37247 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
37251 #: ../src/guestfs.pod:3228
37252 msgid "To report a new bug against libguestfs use this link:"
37256 #: ../src/guestfs.pod:3230
37257 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
37261 #: ../src/guestfs.pod:3232
37262 msgid "When reporting a bug, please check:"
37266 #: ../src/guestfs.pod:3238
37267 msgid "That the bug hasn't been reported already."
37271 #: ../src/guestfs.pod:3242
37272 msgid "That you are testing a recent version."
37276 #: ../src/guestfs.pod:3246
37277 msgid "Describe the bug accurately, and give a way to reproduce it."
37281 #: ../src/guestfs.pod:3250
37283 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
37288 #: ../test-tool/libguestfs-test-tool.pod:5
37289 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
37293 #: ../test-tool/libguestfs-test-tool.pod:9
37296 " libguestfs-test-tool [--options]\n"
37301 #: ../test-tool/libguestfs-test-tool.pod:13
37303 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
37304 "to check basic libguestfs functionality is working. This is needed because "
37305 "libguestfs occasionally breaks for reasons beyond our control: usually "
37306 "because of changes in the underlying qemu or kernel packages, or the host "
37311 #: ../test-tool/libguestfs-test-tool.pod:19
37312 msgid "If you suspect a problem in libguestfs, then just run:"
37316 #: ../test-tool/libguestfs-test-tool.pod:21
37319 " libguestfs-test-tool\n"
37324 #: ../test-tool/libguestfs-test-tool.pod:23
37325 msgid "It will print lots of diagnostic messages."
37329 #: ../test-tool/libguestfs-test-tool.pod:25
37330 msgid "If it runs to completion successfully, you will see this near the end:"
37334 #: ../test-tool/libguestfs-test-tool.pod:27
37337 " ===== TEST FINISHED OK =====\n"
37342 #: ../test-tool/libguestfs-test-tool.pod:29
37343 msgid "and the test tool will exit with code 0."
37347 #: ../test-tool/libguestfs-test-tool.pod:31
37349 "If it fails (and/or exits with non-zero error code), please paste the "
37350 "I<complete, unedited> output of the test tool into a bug report. More "
37351 "information about reporting bugs can be found on the "
37352 "L<http://libguestfs.org/> website."
37356 #: ../test-tool/libguestfs-test-tool.pod:42
37357 msgid "Display short usage information and exit."
37361 #: ../test-tool/libguestfs-test-tool.pod:44
37362 msgid "B<--qemu qemu_binary>"
37366 #: ../test-tool/libguestfs-test-tool.pod:46
37368 "If you have downloaded another qemu binary, point this option at the full "
37369 "path of the binary to try it."
37373 #: ../test-tool/libguestfs-test-tool.pod:49
37374 msgid "B<--qemudir qemu_source_dir>"
37378 #: ../test-tool/libguestfs-test-tool.pod:51
37380 "If you have compiled qemu from source, point this option at the source "
37381 "directory to try it."
37385 #: ../test-tool/libguestfs-test-tool.pod:54
37390 #: ../test-tool/libguestfs-test-tool.pod:56
37391 msgid "B<--timeout N>"
37395 #: ../test-tool/libguestfs-test-tool.pod:58
37397 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
37398 "minutes) which does not usually need to be adjusted."
37402 #: ../test-tool/libguestfs-test-tool.pod:63
37403 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
37407 #: ../test-tool/libguestfs-test-tool.pod:65
37409 "If you have compiled another version of qemu from source and would like to "
37410 "try that, then you can use the I<--qemudir> option to point to the qemu "
37411 "source directory."
37415 #: ../test-tool/libguestfs-test-tool.pod:69
37417 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
37418 "option to point to the binary."
37422 #: ../test-tool/libguestfs-test-tool.pod:72
37424 "Note when using these options, you can ignore the business of qemu wrapper "
37425 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
37426 "wrapper script for you if one is needed."
37430 #: ../test-tool/libguestfs-test-tool.pod:76
37431 msgid "TRYING OUT A DIFFERENT KERNEL"
37435 #: ../test-tool/libguestfs-test-tool.pod:78
37437 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
37438 "libguestfs tries. You do this by setting the environment variables "
37439 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
37443 #: ../test-tool/libguestfs-test-tool.pod:82
37445 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
37450 #: ../test-tool/libguestfs-test-tool.pod:85
37451 msgid "SELF-DIAGNOSIS"
37455 #: ../test-tool/libguestfs-test-tool.pod:87
37457 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
37458 "produced by libguestfs-test-tool and/or possible errors."
37462 #: ../test-tool/libguestfs-test-tool.pod:92
37464 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
37465 "I<1> if there was an error."
37469 #: ../test-tool/libguestfs-test-tool.pod:97
37471 "For the full list of environment variables which may affect libguestfs, "
37472 "please see the L<guestfs(3)> manual page."
37476 #: ../test-tool/libguestfs-test-tool.pod:102
37477 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
37481 #: ../tools/virt-list-filesystems.pl:32
37482 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
37486 #: ../tools/virt-list-filesystems.pl:36
37489 " virt-list-filesystems [--options] domname\n"
37494 #: ../tools/virt-list-filesystems.pl:38
37497 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
37502 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
37504 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
37509 #: ../tools/virt-list-filesystems.pl:45
37511 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
37512 "are contained in a virtual machine or disk image."
37516 #: ../tools/virt-list-filesystems.pl:49
37518 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
37519 "functionality. For more complex cases you should look at the "
37520 "L<guestfish(1)> tool."
37524 #: ../tools/virt-list-filesystems.pl:112
37526 "With this option, C<virt-list-filesystems> displays the type of each "
37527 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
37531 #: ../tools/virt-list-filesystems.pl:119
37536 #: ../tools/virt-list-filesystems.pl:123
37538 "Normally we only show mountable filesystems. If this option is given then "
37539 "swap devices are shown too."
37543 #: ../tools/virt-list-filesystems.pl:197
37545 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
37546 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
37547 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
37551 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
37552 msgid "Copyright (C) 2009 Red Hat Inc."
37556 #: ../tools/virt-list-partitions.pl:32
37557 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
37561 #: ../tools/virt-list-partitions.pl:36
37564 " virt-list-partitions [--options] domname\n"
37569 #: ../tools/virt-list-partitions.pl:38
37572 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
37577 #: ../tools/virt-list-partitions.pl:45
37579 "C<virt-list-partitions> is a command line tool to list the partitions that "
37580 "are contained in a virtual machine or disk image. It is mainly useful as a "
37581 "first step to using L<virt-resize(1)>."
37585 #: ../tools/virt-list-partitions.pl:50
37587 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
37588 "functionality. For more complex cases you should look at the "
37589 "L<guestfish(1)> tool."
37593 #: ../tools/virt-list-partitions.pl:113
37594 msgid "Show sizes in human-readable form (eg. \"1G\")."
37598 #: ../tools/virt-list-partitions.pl:123
37600 "With this option, C<virt-list-partitions> displays the type and size of each "
37601 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
37605 #: ../tools/virt-list-partitions.pl:130
37610 #: ../tools/virt-list-partitions.pl:132
37615 #: ../tools/virt-list-partitions.pl:134
37616 msgid "Display the total size of each block device (as a separate row or rows)."
37620 #: ../tools/virt-list-partitions.pl:267
37622 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
37623 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
37624 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
37628 #: ../tools/virt-list-partitions.pl:283
37629 msgid "Copyright (C) 2009-2010 Red Hat Inc."
37633 #: ../tools/virt-make-fs.pl:37
37634 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
37638 #: ../tools/virt-make-fs.pl:41
37641 " virt-make-fs [--options] input.tar output.img\n"
37646 #: ../tools/virt-make-fs.pl:43
37649 " virt-make-fs [--options] input.tar.gz output.img\n"
37654 #: ../tools/virt-make-fs.pl:45
37657 " virt-make-fs [--options] directory output.img\n"
37662 #: ../tools/virt-make-fs.pl:49
37664 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
37665 "archive or some files in a directory. It is similar to tools like "
37666 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
37667 "it can create common filesystem types like ext2/3 or NTFS, which can be "
37668 "useful if you want to attach these filesystems to existing virtual machines "
37669 "(eg. to import large amounts of read-only data to a VM)."
37673 #: ../tools/virt-make-fs.pl:57
37674 msgid "Basic usage is:"
37678 #: ../tools/virt-make-fs.pl:59
37681 " virt-make-fs input output\n"
37686 #: ../tools/virt-make-fs.pl:61
37688 "where C<input> is either a directory containing files that you want to add, "
37689 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
37690 "C<output> is a disk image. The input type is detected automatically. The "
37691 "output disk image defaults to a raw ext2 image unless you specify extra "
37692 "flags (see L</OPTIONS> below)."
37696 #: ../tools/virt-make-fs.pl:67
37697 msgid "EXTRA SPACE"
37701 #: ../tools/virt-make-fs.pl:69
37703 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
37704 "the files that it contains, but might have extra space. Depending on how "
37705 "you are going to use the output, you might think this extra space is wasted "
37706 "and want to minimize it, or you might want to leave space so that more files "
37707 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
37708 "but you can use the I<--size> flag to leave space in the filesystem if you "
37713 #: ../tools/virt-make-fs.pl:77
37715 "An alternative way to leave extra space but not make the output image any "
37716 "bigger is to use an alternative disk image format (instead of the default "
37717 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
37718 "image format (check your hypervisor supports this before using it). This "
37719 "allows you to choose a large I<--size> but the extra space won't actually be "
37720 "allocated in the image until you try to store something in it."
37724 #: ../tools/virt-make-fs.pl:85
37726 "Don't forget that you can also use local commands including L<resize2fs(8)> "
37727 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
37728 "to build another image from scratch."
37732 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
37737 #: ../tools/virt-make-fs.pl:91
37740 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
37745 #: ../tools/virt-make-fs.pl:93
37746 msgid "FILESYSTEM TYPE"
37750 #: ../tools/virt-make-fs.pl:95
37752 "The default filesystem type is C<ext2>. Just about any filesystem type that "
37753 "libguestfs supports can be used (but I<not> read-only formats like "
37754 "ISO9660). Here are some of the more common choices:"
37758 #: ../tools/virt-make-fs.pl:101
37763 #: ../tools/virt-make-fs.pl:103
37765 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
37766 "you are not going to use the filesystem in a way that requires the journal, "
37767 "then this is just wasted overhead."
37771 #: ../tools/virt-make-fs.pl:107
37772 msgid "I<ntfs> or I<vfat>"
37776 #: ../tools/virt-make-fs.pl:109
37777 msgid "Useful if exporting data to a Windows guest."
37781 #: ../tools/virt-make-fs.pl:111
37783 "I<Note for vfat>: The tar archive or local directory must only contain files "
37784 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
37785 "program running within libguestfs is unable to change the ownership of "
37786 "non-root files, since vfat itself does not support this."
37790 #: ../tools/virt-make-fs.pl:116
37795 #: ../tools/virt-make-fs.pl:118
37797 "Lower overhead than C<ext2>, but certain limitations on filename length and "
37798 "total filesystem size."
37802 #: ../tools/virt-make-fs.pl:125
37805 " virt-make-fs --type=minix input minixfs.img\n"
37810 #: ../tools/virt-make-fs.pl:127
37811 msgid "TO PARTITION OR NOT TO PARTITION"
37815 #: ../tools/virt-make-fs.pl:129
37816 msgid "Optionally virt-make-fs can add a partition table to the output disk."
37820 #: ../tools/virt-make-fs.pl:131
37822 "Adding a partition can make the disk image more compatible with certain "
37823 "virtualized operating systems which don't expect to see a filesystem "
37824 "directly located on a block device (Linux doesn't care and will happily "
37825 "handle both types)."
37829 #: ../tools/virt-make-fs.pl:136
37831 "On the other hand, if you have a partition table then the output image is no "
37832 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
37833 "directly on a partitioned disk image. (However libguestfs tools such as "
37834 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
37838 #: ../tools/virt-make-fs.pl:144
37839 msgid "Add an MBR partition:"
37843 #: ../tools/virt-make-fs.pl:146
37846 " virt-make-fs --partition -- input disk.img\n"
37851 #: ../tools/virt-make-fs.pl:148
37853 "If the output disk image could be terabyte-sized or larger, it's better to "
37854 "use an EFI/GPT-compatible partition table:"
37858 #: ../tools/virt-make-fs.pl:151
37861 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
37866 #: ../tools/virt-make-fs.pl:179
37867 msgid "Enable debugging information."
37871 #: ../tools/virt-make-fs.pl:185
37872 msgid "B<--size=E<lt>NE<gt>>"
37876 #: ../tools/virt-make-fs.pl:187
37877 msgid "B<--size=+E<lt>NE<gt>>"
37881 #: ../tools/virt-make-fs.pl:189
37882 msgid "B<-s E<lt>NE<gt>>"
37886 #: ../tools/virt-make-fs.pl:191
37887 msgid "B<-s +E<lt>NE<gt>>"
37891 #: ../tools/virt-make-fs.pl:193
37892 msgid "Use the I<--size> (or I<-s>) option to choose the size of the output image."
37896 #: ../tools/virt-make-fs.pl:196
37898 "If this option is I<not> given, then the output image will be just large "
37899 "enough to contain all the files, with not much wasted space."
37903 #: ../tools/virt-make-fs.pl:199
37905 "To choose a fixed size output disk, specify an absolute number followed by "
37906 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
37907 "Petabytes or Exabytes. This must be large enough to contain all the input "
37908 "files, else you will get an error."
37912 #: ../tools/virt-make-fs.pl:204
37914 "To leave extra space, specify C<+> (plus sign) and a number followed by "
37915 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
37916 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
37917 "the input files, and (approximately) an extra 200 MB free space."
37921 #: ../tools/virt-make-fs.pl:210
37923 "Note that virt-make-fs estimates free space, and therefore will not produce "
37924 "filesystems containing precisely the free space requested. (It is much more "
37925 "expensive and time-consuming to produce a filesystem which has precisely the "
37926 "desired free space)."
37930 #: ../tools/virt-make-fs.pl:219
37931 msgid "B<--format=E<lt>fmtE<gt>>"
37935 #: ../tools/virt-make-fs.pl:221
37936 msgid "B<-F E<lt>fmtE<gt>>"
37940 #: ../tools/virt-make-fs.pl:223
37941 msgid "Choose the output disk image format."
37945 #: ../tools/virt-make-fs.pl:225
37946 msgid "The default is C<raw> (raw disk image)."
37950 #: ../tools/virt-make-fs.pl:227
37952 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
37953 "that would really make sense here is C<qcow2>."
37957 #: ../tools/virt-make-fs.pl:234
37958 msgid "B<--type=E<lt>fsE<gt>>"
37962 #: ../tools/virt-make-fs.pl:236
37963 msgid "B<-t E<lt>fsE<gt>>"
37967 #: ../tools/virt-make-fs.pl:238
37968 msgid "Choose the output filesystem type."
37972 #: ../tools/virt-make-fs.pl:240
37973 msgid "The default is C<ext2>."
37977 #: ../tools/virt-make-fs.pl:242
37978 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
37982 #: ../tools/virt-make-fs.pl:249
37983 msgid "B<--partition>"
37987 #: ../tools/virt-make-fs.pl:251
37988 msgid "B<--partition=E<lt>parttypeE<gt>>"
37992 #: ../tools/virt-make-fs.pl:253
37994 "If specified, this flag adds an MBR partition table to the output disk "
37999 #: ../tools/virt-make-fs.pl:256
38001 "You can change the partition table type, eg. I<--partition=gpt> for large "
38006 #: ../tools/virt-make-fs.pl:259
38008 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
38009 "might consider the next parameter to be the partition type. For example:"
38013 #: ../tools/virt-make-fs.pl:263
38016 " virt-make-fs --partition input.tar ...\n"
38021 #: ../tools/virt-make-fs.pl:265
38023 "would cause virt-make-fs to think you wanted to use a partition type of "
38024 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
38025 "dash) between options and the input file argument:"
38029 #: ../tools/virt-make-fs.pl:269
38032 " virt-make-fs --partition -- input.tar ...\n"
38037 #: ../tools/virt-make-fs.pl:541
38039 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
38040 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
38041 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
38045 #: ../tools/virt-make-fs.pl:555 ../tools/virt-win-reg.pl:763
38047 "When reporting bugs, please enable debugging and capture the I<complete> "
38052 #: ../tools/virt-make-fs.pl:558
38055 " export LIBGUESTFS_DEBUG=1\n"
38056 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
38061 #: ../tools/virt-make-fs.pl:561
38063 "Attach /tmp/virt-make-fs.log to a new bug report at "
38064 "L<https://bugzilla.redhat.com/>"
38068 #: ../tools/virt-tar.pl:33
38069 msgid "virt-tar - Extract or upload files to a virtual machine"
38073 #: ../tools/virt-tar.pl:37
38076 " virt-tar [--options] -x domname directory tarball\n"
38081 #: ../tools/virt-tar.pl:39
38084 " virt-tar [--options] -u domname tarball directory\n"
38089 #: ../tools/virt-tar.pl:41
38092 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
38097 #: ../tools/virt-tar.pl:43
38100 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
38105 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
38110 #: ../tools/virt-tar.pl:47
38112 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
38113 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
38117 #: ../tools/virt-tar.pl:52
38118 msgid "Download C</home> from the VM into a local tarball:"
38122 #: ../tools/virt-tar.pl:54
38125 " virt-tar -x domname /home home.tar\n"
38130 #: ../tools/virt-tar.pl:56
38133 " virt-tar -zx domname /home home.tar.gz\n"
38138 #: ../tools/virt-tar.pl:58
38139 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
38143 #: ../tools/virt-tar.pl:60
38146 " virt-tar -u domname uploadstuff.tar /tmp\n"
38151 #: ../tools/virt-tar.pl:62
38154 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
38159 #: ../tools/virt-tar.pl:66
38161 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
38162 "virtual machines. If you do this, you risk disk corruption in the VM. "
38163 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
38167 #: ../tools/virt-tar.pl:71
38169 "You can use I<-x> (extract) on live virtual machines, but you might get "
38170 "inconsistent results or errors if there is filesystem activity inside the "
38171 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
38172 "work, but the only way to guarantee consistent results is if the virtual "
38173 "machine is shut down."
38177 #: ../tools/virt-tar.pl:79
38179 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
38180 "parts of a guest filesystem. There are many possibilities: making backups, "
38181 "uploading data files, snooping on guest activity, fixing or customizing "
38186 #: ../tools/virt-tar.pl:84
38188 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
38189 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
38190 "should look at the L<guestfish(1)> tool."
38194 #: ../tools/virt-tar.pl:88
38196 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
38197 "its contents (recursively) from the virtual machine into a local tarball. "
38198 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
38199 "virtual machine. You cannot use these two options together."
38203 #: ../tools/virt-tar.pl:94
38205 "In addition, you may need to use the I<-z> (gZip) option to enable "
38206 "compression. When uploading, you have to specify I<-z> if the upload file "
38207 "is compressed because virt-tar won't detect this on its own."
38211 #: ../tools/virt-tar.pl:98
38213 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
38214 "example it cannot do PKZip files or bzip2 compression. If you want that "
38215 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
38216 "the L<libguestfs(3)> API)."
38220 #: ../tools/virt-tar.pl:160
38221 msgid "B<--extract>"
38225 #: ../tools/virt-tar.pl:162
38226 msgid "B<--download>"
38230 #: ../tools/virt-tar.pl:164
38235 #: ../tools/virt-tar.pl:166
38236 msgid "B<--upload>"
38240 #: ../tools/virt-tar.pl:168
38242 "Use I<-x> to extract (download) a directory from a virtual machine to a "
38247 #: ../tools/virt-tar.pl:171
38249 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
38250 "Please read the L</WARNING> section above before using this option."
38254 #: ../tools/virt-tar.pl:175
38255 msgid "You must specify exactly one of these options."
38259 #: ../tools/virt-tar.pl:181
38264 #: ../tools/virt-tar.pl:183
38269 #: ../tools/virt-tar.pl:185
38270 msgid "Specify that the input or output tarball is gzip-compressed."
38274 #: ../tools/virt-tar.pl:298
38276 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
38277 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
38278 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
38279 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
38283 #: ../tools/virt-win-reg.pl:37
38285 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
38290 #: ../tools/virt-win-reg.pl:41
38293 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
38298 #: ../tools/virt-win-reg.pl:43
38301 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
38306 #: ../tools/virt-win-reg.pl:45
38309 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
38314 #: ../tools/virt-win-reg.pl:47
38317 " virt-win-reg --merge domname [input.reg ...]\n"
38322 #: ../tools/virt-win-reg.pl:49
38325 " virt-win-reg [--options] disk.img ... # instead of domname\n"
38330 #: ../tools/virt-win-reg.pl:53
38332 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
38333 "virtual machines. If you do this, you I<will> get irreversible disk "
38334 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
38335 "but doesn't catch all cases."
38339 #: ../tools/virt-win-reg.pl:58
38341 "Modifying the Windows Registry is an inherently risky operation. The format "
38342 "is deliberately obscure and undocumented, and Registry changes can leave the "
38343 "system unbootable. Therefore when using the I<--merge> option, make sure "
38344 "you have a reliable backup first."
38348 #: ../tools/virt-win-reg.pl:65
38350 "This program can export and merge Windows Registry entries from a Windows "
38355 #: ../tools/virt-win-reg.pl:68
38357 "The first parameter is the libvirt guest name or the raw disk image of a "
38362 #: ../tools/virt-win-reg.pl:71
38364 "If I<--merge> is I<not> specified, then the chosen registry key is "
38365 "displayed/exported (recursively). For example:"
38369 #: ../tools/virt-win-reg.pl:74
38372 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
38377 #: ../tools/virt-win-reg.pl:76
38378 msgid "You can also display single values from within registry keys, for example:"
38382 #: ../tools/virt-win-reg.pl:79
38385 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
38386 " $ virt-win-reg Windows7 $cvkey ProductName\n"
38387 " Windows 7 Enterprise\n"
38392 #: ../tools/virt-win-reg.pl:83
38394 "With I<--merge>, you can merge a textual regedit file into the Windows "
38399 #: ../tools/virt-win-reg.pl:86
38402 " $ virt-win-reg --merge Windows7 changes.reg\n"
38407 #: ../tools/virt-win-reg.pl:90
38409 "This program is only meant for simple access to the registry. If you want "
38410 "to do complicated things with the registry, we suggest you download the "
38411 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
38412 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
38413 "L<hivexregedit(1)>."
38417 #: ../tools/virt-win-reg.pl:159
38422 #: ../tools/virt-win-reg.pl:161
38424 "In merge mode, this merges a textual regedit file into the Windows Registry "
38425 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
38426 "displays or exports Registry entries instead."
38430 #: ../tools/virt-win-reg.pl:165
38432 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
38433 "result in disk corruption. However exporting (without this flag) is always "
38438 #: ../tools/virt-win-reg.pl:173
38439 msgid "B<--encoding> UTF-16LE|ASCII"
38443 #: ../tools/virt-win-reg.pl:175
38445 "When merging (only), you may need to specify the encoding for strings to be "
38446 "used in the hive file. This is explained in detail in "
38447 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
38451 #: ../tools/virt-win-reg.pl:179
38453 "The default is to use UTF-16LE, which should work with recent versions of "
38458 #: ../tools/virt-win-reg.pl:186
38459 msgid "B<--unsafe-printable-strings>"
38463 #: ../tools/virt-win-reg.pl:188
38465 "When exporting (only), assume strings are UTF-16LE and print them as strings "
38466 "instead of hex sequences. Remove the final zero codepoint from strings if "
38471 #: ../tools/virt-win-reg.pl:192
38473 "This is unsafe and does not preserve the fidelity of strings in the original "
38474 "Registry for various reasons:"
38478 #: ../tools/virt-win-reg.pl:199
38480 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
38481 "other encodings will be corrupted by this transformation."
38485 #: ../tools/virt-win-reg.pl:204
38487 "Assumes that everything which has type 1 or 2 is really a string and that "
38488 "everything else is not a string, but the type field in real Registries is "
38493 #: ../tools/virt-win-reg.pl:210
38495 "Loses information about whether a zero codepoint followed the string in the "
38500 #: ../tools/virt-win-reg.pl:215
38502 "This all happens because the Registry itself contains no information about "
38503 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
38507 #: ../tools/virt-win-reg.pl:219
38509 "You should only use this option for quick hacking and debugging of the "
38510 "Registry contents, and I<never> use it if the output is going to be passed "
38511 "into another program or stored in another Registry."
38515 #: ../tools/virt-win-reg.pl:556
38516 msgid "SUPPORTED SYSTEMS"
38520 #: ../tools/virt-win-reg.pl:558
38522 "The program currently supports Windows NT-derived guests starting with "
38523 "Windows XP through to at least Windows 7."
38527 #: ../tools/virt-win-reg.pl:561
38528 msgid "The following Registry keys are supported:"
38532 #: ../tools/virt-win-reg.pl:565
38533 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
38537 #: ../tools/virt-win-reg.pl:567
38538 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
38542 #: ../tools/virt-win-reg.pl:569
38543 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
38547 #: ../tools/virt-win-reg.pl:571
38548 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
38552 #: ../tools/virt-win-reg.pl:573
38553 msgid "C<HKEY_USERS\\.DEFAULT>"
38557 #: ../tools/virt-win-reg.pl:575
38558 msgid "C<HKEY_USERS\\I<SID>>"
38562 #: ../tools/virt-win-reg.pl:577
38563 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
38567 #: ../tools/virt-win-reg.pl:579
38568 msgid "C<HKEY_USERS\\I<username>>"
38572 #: ../tools/virt-win-reg.pl:581
38573 msgid "where I<username> is a local user name (this is a libguestfs extension)."
38577 #: ../tools/virt-win-reg.pl:585
38579 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
38584 #: ../tools/virt-win-reg.pl:588
38586 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
38587 "supported (there is no \"current user\")."
38591 #: ../tools/virt-win-reg.pl:591
38596 #: ../tools/virt-win-reg.pl:593
38598 "C<virt-win-reg> expects that regedit files have already been reencoded in "
38599 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
38600 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
38601 "with Windows-style line endings, you may need to reencode the whole file "
38602 "before or after processing."
38606 #: ../tools/virt-win-reg.pl:599
38608 "To reencode a file from Windows format to Linux (before processing it with "
38609 "the I<--merge> option), you would do something like this:"
38613 #: ../tools/virt-win-reg.pl:602
38616 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
38621 #: ../tools/virt-win-reg.pl:604
38623 "To go in the opposite direction, after exporting and before sending the file "
38624 "to a Windows user, do something like this:"
38628 #: ../tools/virt-win-reg.pl:607
38631 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
38636 #: ../tools/virt-win-reg.pl:609
38637 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
38641 #: ../tools/virt-win-reg.pl:611
38643 "If you are unsure about the current encoding, use the L<file(1)> command. "
38644 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
38645 "Windows-style (CRLF) line endings, like this:"
38649 #: ../tools/virt-win-reg.pl:615
38652 " $ file software.reg\n"
38653 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
38654 " with CRLF line terminators\n"
38659 #: ../tools/virt-win-reg.pl:619
38660 msgid "This file would need conversion before you could I<--merge> it."
38664 #: ../tools/virt-win-reg.pl:621
38665 msgid "CurrentControlSet etc."
38669 #: ../tools/virt-win-reg.pl:623
38671 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
38672 "Registry at the level of the hive file, and therefore you cannot modify "
38677 #: ../tools/virt-win-reg.pl:627
38679 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
38680 "circumstances it might refer to another control set. The way to find out is "
38681 "to look at the C<HKLM\\SYSTEM\\Select> key:"
38685 #: ../tools/virt-win-reg.pl:631
38688 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
38689 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
38690 " \"Current\"=dword:00000001\n"
38691 " \"Default\"=dword:00000001\n"
38692 " \"Failed\"=dword:00000000\n"
38693 " \"LastKnownGood\"=dword:00000002\n"
38698 #: ../tools/virt-win-reg.pl:638
38699 msgid "\"Current\" is the one which Windows will choose when it boots."
38703 #: ../tools/virt-win-reg.pl:640
38704 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
38708 #: ../tools/virt-win-reg.pl:643
38709 msgid "WINDOWS TIPS"
38713 #: ../tools/virt-win-reg.pl:645
38715 "Note that some of these tips modify the guest disk image. The guest I<must> "
38716 "be shut off, else you will get disk corruption."
38720 #: ../tools/virt-win-reg.pl:648
38721 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
38725 #: ../tools/virt-win-reg.pl:650
38727 "Prepare a DOS batch script, VBScript or executable. Upload this using "
38728 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
38729 "is uploaded into C<C:\\>:"
38733 #: ../tools/virt-win-reg.pl:654
38736 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
38741 #: ../tools/virt-win-reg.pl:656
38742 msgid "Prepare a regedit file containing the registry change:"
38746 #: ../tools/virt-win-reg.pl:658
38749 " cat > test.reg <<'EOF'\n"
38750 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
38751 " \"Test\"=\"c:\\\\test.bat\"\n"
38757 #: ../tools/virt-win-reg.pl:663
38759 "In this example we use the key C<RunOnce> which means that the script will "
38760 "run precisely once when the first user logs in. If you want it to run every "
38761 "time a user logs in, replace C<RunOnce> with C<Run>."
38765 #: ../tools/virt-win-reg.pl:667
38766 msgid "Now update the registry:"
38770 #: ../tools/virt-win-reg.pl:669
38773 " virt-win-reg --merge WindowsGuest test.reg\n"
38778 #: ../tools/virt-win-reg.pl:671
38779 msgid "INSTALLING A SERVICE"
38783 #: ../tools/virt-win-reg.pl:673
38785 "This section assumes you are familiar with Windows services, and you either "
38786 "have a program which handles the Windows Service Control Protocol directly "
38787 "or you want to run any program using a service wrapper like SrvAny or the "
38792 #: ../tools/virt-win-reg.pl:678
38794 "First upload the program and optionally the service wrapper. In this case "
38795 "the test program is called C<test.exe> and we are using the RHSrvAny "
38800 #: ../tools/virt-win-reg.pl:682
38803 " guestfish -i -d WindowsGuest <<EOF\n"
38804 " upload rhsrvany.exe /rhsrvany.exe\n"
38805 " upload test.exe /test.exe\n"
38811 #: ../tools/virt-win-reg.pl:687
38813 "Prepare a regedit file containing the registry changes. In this example, "
38814 "the first registry change is needed for the service itself or the service "
38815 "wrapper (if used). The second registry change is only needed because I am "
38816 "using the RHSrvAny service wrapper."
38820 #: ../tools/virt-win-reg.pl:692
38823 " cat > service.reg <<'EOF'\n"
38824 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
38825 " \"Type\"=dword:00000010\n"
38826 " \"Start\"=dword:00000002\n"
38827 " \"ErrorControl\"=dword:00000001\n"
38828 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
38829 " \"DisplayName\"=\"RHSrvAny\"\n"
38830 " \"ObjectName\"=\"NetworkService\"\n"
38835 #: ../tools/virt-win-reg.pl:701
38838 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
38839 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
38840 " \"PWD\"=\"c:\\\\Temp\"\n"
38846 #: ../tools/virt-win-reg.pl:712
38848 "For use of C<ControlSet001> see the section above in this manual page. You "
38849 "may need to adjust this according to the control set that is in use by the "
38854 #: ../tools/virt-win-reg.pl:718
38856 "C<\"ObjectName\"> controls the privileges that the service will have. An "
38857 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
38858 "privileged account."
38862 #: ../tools/virt-win-reg.pl:724
38864 "For the meaning of the magic numbers, see this Microsoft KB article: "
38865 "L<http://support.microsoft.com/kb/103000>."
38869 #: ../tools/virt-win-reg.pl:729
38870 msgid "Update the registry:"
38874 #: ../tools/virt-win-reg.pl:731
38877 " virt-win-reg --merge WindowsGuest service.reg\n"
38882 #: ../tools/virt-win-reg.pl:735
38884 "Be careful when passing parameters containing C<\\> (backslash) in the "
38885 "shell. Usually you will have to use 'single quotes' or double backslashes "
38886 "(but not both) to protect them from the shell."
38890 #: ../tools/virt-win-reg.pl:739
38891 msgid "Paths and value names are case-insensitive."
38895 #: ../tools/virt-win-reg.pl:748
38897 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
38898 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
38899 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
38900 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
38904 #: ../tools/virt-win-reg.pl:766
38907 " export LIBGUESTFS_DEBUG=1\n"
38908 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
38913 #: ../tools/virt-win-reg.pl:769
38915 "Attach /tmp/virt-win-reg.log to a new bug report at "
38916 "L<https://bugzilla.redhat.com/>"