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.15.8\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-11-29 21:47+0000\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 ../clone/virt-sysprep.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 ../examples/guestfs-testing.pod:3 ../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 ../clone/virt-sysprep.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] -d domname\n"
44 #: ../align/virt-alignment-scan.pod:11
47 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
52 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19 ../clone/virt-sysprep.pod:13 ../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 ../examples/guestfs-testing.pod:7 ../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:31 ../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
57 #: ../align/virt-alignment-scan.pod:15
59 "When older operating systems install themselves, the partitioning tools "
60 "place partitions at a sector misaligned with the underlying storage "
61 "(commonly the first partition starts on sector C<63>). Misaligned "
62 "partitions can result in an operating system issuing more I/O than should be "
67 #: ../align/virt-alignment-scan.pod:21
69 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
70 "machines and disk images and warns you if there are alignment problems."
74 #: ../align/virt-alignment-scan.pod:25
76 "Currently there is no virt tool for fixing alignment problems. You can only "
77 "reinstall the guest operating system. The following NetApp document "
78 "summarises the problem and possible solutions: "
79 "L<http://media.netapp.com/documents/tr-3747.pdf>"
83 #: ../align/virt-alignment-scan.pod:30
88 #: ../align/virt-alignment-scan.pod:32
89 msgid "To run this tool on a disk image directly, use the I<-a> option:"
93 #: ../align/virt-alignment-scan.pod:34
96 " $ virt-alignment-scan -a winxp.img\n"
97 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
102 #: ../align/virt-alignment-scan.pod:37
105 " $ virt-alignment-scan -a fedora16.img\n"
106 " /dev/sda1 1048576 1024K ok\n"
107 " /dev/sda2 2097152 2048K ok\n"
108 " /dev/sda3 526385152 2048K ok\n"
113 #: ../align/virt-alignment-scan.pod:42
115 "To run the tool on a guest known to libvirt, use the I<-d> option and "
116 "possibly the I<-c> option:"
120 #: ../align/virt-alignment-scan.pod:45
123 " # virt-alignment-scan -d RHEL5\n"
124 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
125 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
130 #: ../align/virt-alignment-scan.pod:49
133 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
134 " /dev/sda1 1048576 1024K ok\n"
135 " /dev/sda2 105906176 1024K ok\n"
136 " /dev/sdb1 65536 64K ok\n"
141 #: ../align/virt-alignment-scan.pod:54
143 "The output consists of 4 or more whitespace-separated columns. Only the "
144 "first 4 columns are signficant if you want to parse this from a program. "
149 #: ../align/virt-alignment-scan.pod:60
154 #: ../align/virt-alignment-scan.pod:62
156 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
157 "on the first block device)"
161 #: ../align/virt-alignment-scan.pod:65
166 #: ../align/virt-alignment-scan.pod:67
167 msgid "the start of the partition in bytes"
171 #: ../align/virt-alignment-scan.pod:69
176 #: ../align/virt-alignment-scan.pod:71
177 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
181 #: ../align/virt-alignment-scan.pod:73
186 #: ../align/virt-alignment-scan.pod:75
188 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
189 "can cause performance problems"
193 #: ../align/virt-alignment-scan.pod:78
198 #: ../align/virt-alignment-scan.pod:80
199 msgid "optional free-text explanation."
203 #: ../align/virt-alignment-scan.pod:84
205 "The exit code from the program changes depending on whether poorly aligned "
206 "partitions were found. See L</EXIT STATUS> below."
210 #: ../align/virt-alignment-scan.pod:87
211 msgid "If you just want the exit code with no output, use the I<-q> option."
215 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../clone/virt-sysprep.pod:42 ../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:92 ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:112 ../resize/virt-resize.pod:262 ../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
220 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160 ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:116 ../resize/virt-resize.pod:266 ../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
225 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:118 ../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
226 msgid "Display brief help."
230 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:120
235 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:122
236 msgid "B<--add> file"
240 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
241 msgid "Add I<file> which should be a disk image from a virtual machine."
245 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102 ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:128
247 "The format of the disk image is auto-detected. To override this and force a "
248 "particular format use the I<--format=..> option."
252 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:135
257 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:137
258 msgid "B<--connect> URI"
262 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:139 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
264 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
265 "to the default libvirt hypervisor."
269 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:142
271 "If you specify guest block devices directly (I<-a>), then libvirt is not "
276 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:145
281 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:147
282 msgid "B<--domain> guest"
286 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:149
288 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
293 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:152
294 msgid "B<--format=raw|qcow2|..>"
298 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:154
303 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:156
305 "The default for the I<-a> option is to auto-detect the format of the disk "
306 "image. Using this forces the disk format for I<-a> options which follow on "
307 "the command line. Using I<--format> with no argument switches back to "
308 "auto-detection for subsequent I<-a> options."
312 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351 ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2877
317 #: ../align/virt-alignment-scan.pod:134
320 " virt-alignment-scan --format=raw -a disk.img\n"
325 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:165
326 msgid "forces raw format (no auto-detection) for C<disk.img>."
330 #: ../align/virt-alignment-scan.pod:138
333 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
338 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:169
340 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
341 "auto-detection for C<another.img>."
345 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:172
347 "If you have untrusted raw-format guest disk images, you should use this "
348 "option to specify the disk format. This avoids a possible security problem "
349 "with malicious guests (CVE-2010-3851)."
353 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:497 ../sparsify/virt-sparsify.pod:177
358 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:499 ../sparsify/virt-sparsify.pod:179
363 #: ../align/virt-alignment-scan.pod:151
365 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
370 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173 ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:219 ../sparsify/virt-sparsify.pod:183
375 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175 ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:221 ../sparsify/virt-sparsify.pod:185
380 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177 ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:223 ../sparsify/virt-sparsify.pod:187
381 msgid "Enable verbose messages for debugging."
385 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179 ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:225 ../resize/virt-resize.pod:567 ../sparsify/virt-sparsify.pod:189
390 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181 ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:227 ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:191 ../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
395 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183 ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:229 ../resize/virt-resize.pod:571 ../sparsify/virt-sparsify.pod:193 ../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
396 msgid "Display version number and exit."
400 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185 ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:240 ../sparsify/virt-sparsify.pod:195 ../tools/virt-tar.pl:158
405 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187 ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:242 ../sparsify/virt-sparsify.pod:197
406 msgid "Enable tracing of libguestfs API calls."
410 #: ../align/virt-alignment-scan.pod:172
411 msgid "RECOMMENDED ALIGNMENT"
415 #: ../align/virt-alignment-scan.pod:174
417 "Operating systems older than Windows 2008 and Linux before ca.2010 place the "
418 "first sector of the first partition at sector 63, with a 512 byte sector "
419 "size. This happens because of a historical accident. Drives have to report "
420 "a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
421 "completely meaningless on modern drives, but it happens that the geometry "
422 "reported always has 63 sectors per track. The operating system therefore "
423 "places the first partition at the start of the second \"track\", at sector "
428 #: ../align/virt-alignment-scan.pod:183
430 "When the guest OS is virtualized, the host operating system and hypervisor "
431 "may prefer accesses aligned to one of:"
435 #: ../align/virt-alignment-scan.pod:188
440 #: ../align/virt-alignment-scan.pod:190
442 "if the host OS uses local storage directly on hard drive partitions, and the "
443 "hard drive has 512 byte physical sectors."
447 #: ../align/virt-alignment-scan.pod:193
452 #: ../align/virt-alignment-scan.pod:195
454 "for local storage on new hard drives with 4Kbyte physical sectors; for "
455 "file-backed storage on filesystems with 4Kbyte block size; or for some types "
456 "of network-attached storage."
460 #: ../align/virt-alignment-scan.pod:199
465 #: ../align/virt-alignment-scan.pod:201
467 "for high-end network-attached storage. This is the optimal block size for "
468 "some NetApp hardware."
472 #: ../align/virt-alignment-scan.pod:204
477 #: ../align/virt-alignment-scan.pod:206
478 msgid "see L</1 MB PARTITION ALIGNMENT> below."
482 #: ../align/virt-alignment-scan.pod:210
484 "Partitions which are not aligned correctly to the underlying storage cause "
485 "extra I/O. For example:"
489 #: ../align/virt-alignment-scan.pod:213
493 " +--------------------------+------\n"
495 " | filesystem block |\n"
496 " ---+------------------+------+-------------------+-----+---\n"
497 " | host block | host block |\n"
499 " ---+-------------------------+-------------------------+---\n"
504 #: ../align/virt-alignment-scan.pod:222
506 "In this example, each time a 4K guest block is read, two blocks on the host "
507 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
508 "written, two host blocks must first be read, the old and new data combined, "
509 "and the two blocks written back (4x I/O)."
513 #: ../align/virt-alignment-scan.pod:227
514 msgid "LINUX HOST BLOCK AND I/O SIZE"
518 #: ../align/virt-alignment-scan.pod:229
520 "New versions of the Linux kernel expose the physical and logical block size, "
521 "and minimum and recommended I/O size."
525 #: ../align/virt-alignment-scan.pod:232
526 msgid "For a typical consumer hard drive with 512 byte sectors:"
530 #: ../align/virt-alignment-scan.pod:234
533 " $ cat /sys/block/sda/queue/hw_sector_size\n"
535 " $ cat /sys/block/sda/queue/physical_block_size\n"
537 " $ cat /sys/block/sda/queue/logical_block_size\n"
539 " $ cat /sys/block/sda/queue/minimum_io_size\n"
541 " $ cat /sys/block/sda/queue/optimal_io_size\n"
547 #: ../align/virt-alignment-scan.pod:245
548 msgid "For a new consumer hard drive with 4Kbyte sectors:"
552 #: ../align/virt-alignment-scan.pod:247
555 " $ cat /sys/block/sda/queue/hw_sector_size\n"
557 " $ cat /sys/block/sda/queue/physical_block_size\n"
559 " $ cat /sys/block/sda/queue/logical_block_size\n"
561 " $ cat /sys/block/sda/queue/minimum_io_size\n"
563 " $ cat /sys/block/sda/queue/optimal_io_size\n"
569 #: ../align/virt-alignment-scan.pod:258
570 msgid "For a NetApp LUN:"
574 #: ../align/virt-alignment-scan.pod:260
577 " $ cat /sys/block/sdc/queue/logical_block_size\n"
579 " $ cat /sys/block/sdc/queue/physical_block_size\n"
581 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
583 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
589 #: ../align/virt-alignment-scan.pod:269
591 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
592 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
596 #: ../align/virt-alignment-scan.pod:273
598 "For detailed information about what these numbers mean, see "
599 "L<http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newstorage-iolimits.html>"
603 #: ../align/virt-alignment-scan.pod:276
605 "[Thanks to Matt Booth for providing 4K drive data. Thanks to Mike Snitzer "
606 "for providing NetApp data and additional information.]"
610 #: ../align/virt-alignment-scan.pod:279
611 msgid "1 MB PARTITION ALIGNMENT"
615 #: ../align/virt-alignment-scan.pod:281
617 "Microsoft picked 1 MB as the default alignment for all partitions starting "
618 "with Windows 2008 Server, and Linux has followed this."
622 #: ../align/virt-alignment-scan.pod:284
624 "Assuming 512 byte sectors in the guest, you will now see the first partition "
625 "starting at sector 2048, and subsequent partitions (if any) will start at a "
626 "multiple of 2048 sectors."
630 #: ../align/virt-alignment-scan.pod:288
632 "1 MB alignment is compatible with all current alignment requirements (4K, "
633 "64K) and provides room for future growth in physical block sizes."
637 #: ../align/virt-alignment-scan.pod:291
638 msgid "SETTING ALIGNMENT"
642 #: ../align/virt-alignment-scan.pod:293
644 "L<virt-resize(1)> can change the alignment of the partitions of some "
645 "guests. Currently it can fully align all the partitions of all Windows "
646 "guests, and it will fix the bootloader where necessary. For Linux guests, "
647 "it can align the second and subsequent partitions, so the majority of OS "
648 "accesses except at boot will be aligned."
652 #: ../align/virt-alignment-scan.pod:299
654 "Another way to correct partition alignment problems is to reinstall your "
655 "guest operating systems. If you install operating systems from templates, "
656 "ensure these have correct partition alignment too."
660 #: ../align/virt-alignment-scan.pod:303
662 "For older versions of Windows, the following NetApp document contains useful "
663 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
667 #: ../align/virt-alignment-scan.pod:306
669 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
670 "an explicit C<%pre> section that creates aligned partitions using "
671 "L<parted(8)>. Do not use the Kickstart C<part> command. The NetApp "
672 "document above contains an example."
676 #: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231 ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483 ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:241 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367 ../rescue/virt-rescue.pod:303 ../resize/virt-resize.pod:682 ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:744
677 msgid "SHELL QUOTING"
681 #: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233 ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485 ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:243 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:369 ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:684 ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:752
683 "Libvirt guest names can contain arbitrary characters, some of which have "
684 "meaning to the shell such as C<#> and space. You may need to quote or "
685 "escape these characters on the command line. See the shell manual page "
686 "L<sh(1)> for details."
690 #: ../align/virt-alignment-scan.pod:318 ../cat/virt-cat.pod:238 ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490 ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:248 ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114 ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:390 ../resize/virt-resize.pod:689 ../sparsify/virt-sparsify.pod:251 ../test-tool/libguestfs-test-tool.pod:90
695 #: ../align/virt-alignment-scan.pod:320
696 msgid "This program returns:"
700 #: ../align/virt-alignment-scan.pod:324 ../align/virt-alignment-scan.pod:330 ../align/virt-alignment-scan.pod:336 ../align/virt-alignment-scan.pod:343 ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187 ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202 ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287 ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295 ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314 ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322 ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362 ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388 ../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 ../examples/guestfs-testing.pod:110 ../examples/guestfs-testing.pod:114 ../examples/guestfs-testing.pod:118 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:441 ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:456 ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:1262 ../fish/guestfish-actions.pod:1266 ../fish/guestfish-actions.pod:1270 ../fish/guestfish-actions.pod:1274 ../fish/guestfish-actions.pod:1282 ../fish/guestfish-actions.pod:1286 ../fish/guestfish-actions.pod:1290 ../fish/guestfish-actions.pod:1300 ../fish/guestfish-actions.pod:1304 ../fish/guestfish-actions.pod:1308 ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:1402 ../fish/guestfish-actions.pod:1407 ../fish/guestfish-actions.pod:1412 ../fish/guestfish-actions.pod:1454 ../fish/guestfish-actions.pod:1458 ../fish/guestfish-actions.pod:1463 ../fish/guestfish-actions.pod:1719 ../fish/guestfish-actions.pod:1726 ../fish/guestfish-actions.pod:1733 ../fish/guestfish-actions.pod:2136 ../fish/guestfish-actions.pod:2142 ../fish/guestfish-actions.pod:2150 ../fish/guestfish-actions.pod:2157 ../fish/guestfish-actions.pod:2164 ../fish/guestfish.pod:445 ../fish/guestfish.pod:449 ../fish/guestfish.pod:453 ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:408 ../inspector/virt-inspector.pod:412 ../resize/virt-resize.pod:365 ../resize/virt-resize.pod:369 ../resize/virt-resize.pod:378 ../resize/virt-resize.pod:384 ../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:641 ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:656 ../src/guestfs-actions.pod:663 ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2083 ../src/guestfs-actions.pod:2087 ../src/guestfs-actions.pod:2091 ../src/guestfs-actions.pod:2099 ../src/guestfs-actions.pod:2103 ../src/guestfs-actions.pod:2107 ../src/guestfs-actions.pod:2117 ../src/guestfs-actions.pod:2121 ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:2263 ../src/guestfs-actions.pod:2267 ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:2277 ../src/guestfs-actions.pod:2338 ../src/guestfs-actions.pod:2342 ../src/guestfs-actions.pod:2347 ../src/guestfs-actions.pod:2762 ../src/guestfs-actions.pod:2769 ../src/guestfs-actions.pod:2776 ../src/guestfs-actions.pod:3321 ../src/guestfs-actions.pod:3327 ../src/guestfs-actions.pod:3335 ../src/guestfs-actions.pod:3342 ../src/guestfs-actions.pod:3349 ../src/guestfs.pod:403 ../src/guestfs.pod:408 ../src/guestfs.pod:413 ../src/guestfs.pod:417 ../src/guestfs.pod:422 ../src/guestfs.pod:426 ../src/guestfs.pod:431 ../src/guestfs.pod:436 ../src/guestfs.pod:1109 ../src/guestfs.pod:1113 ../src/guestfs.pod:1117 ../src/guestfs.pod:1122 ../src/guestfs.pod:1130 ../src/guestfs.pod:1149 ../src/guestfs.pod:1157 ../src/guestfs.pod:1179 ../src/guestfs.pod:1183 ../src/guestfs.pod:1187 ../src/guestfs.pod:1191 ../src/guestfs.pod:1195 ../src/guestfs.pod:1199 ../src/guestfs.pod:1689 ../src/guestfs.pod:1694 ../src/guestfs.pod:1698 ../src/guestfs.pod:1800 ../src/guestfs.pod:1805 ../src/guestfs.pod:1809 ../src/guestfs.pod:1819 ../src/guestfs.pod:2108 ../src/guestfs.pod:2113 ../src/guestfs.pod:2119 ../src/guestfs.pod:2127 ../src/guestfs.pod:2645 ../src/guestfs.pod:2651 ../src/guestfs.pod:2656 ../src/guestfs.pod:2662 ../src/guestfs.pod:3067 ../src/guestfs.pod:3072 ../src/guestfs.pod:3076 ../src/guestfs.pod:3080 ../src/guestfs.pod:3084 ../src/guestfs.pod:3098 ../src/guestfs.pod:3103 ../src/guestfs.pod:3335 ../src/guestfs.pod:3339 ../src/guestfs.pod:3343 ../src/guestfs.pod:3347 ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:721 ../tools/virt-win-reg.pl:727 ../tools/virt-win-reg.pl:733
705 #: ../align/virt-alignment-scan.pod:326
710 #: ../align/virt-alignment-scan.pod:328
711 msgid "successful exit, all partitions are aligned E<ge> 64K for best performance"
715 #: ../align/virt-alignment-scan.pod:332
720 #: ../align/virt-alignment-scan.pod:334
721 msgid "an error scanning the disk image or guest"
725 #: ../align/virt-alignment-scan.pod:338
730 #: ../align/virt-alignment-scan.pod:340
732 "successful exit, some partitions have alignment E<lt> 64K which can result "
733 "in poor performance on high end network storage"
737 #: ../align/virt-alignment-scan.pod:345
742 #: ../align/virt-alignment-scan.pod:347
744 "successful exit, some partitions have alignment E<lt> 4K which can result in "
745 "poor performance on most hypervisors"
749 #: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243 ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495 ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:253 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../examples/guestfs-testing.pod:291 ../fish/guestfish.pod:1268 ../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:317 ../inspector/virt-inspector.pod:395 ../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:325 ../resize/virt-resize.pod:694 ../ruby/examples/guestfs-ruby.pod:36 ../sparsify/virt-sparsify.pod:275 ../src/guestfs.pod:3275 ../test-tool/libguestfs-test-tool.pod:100 ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265 ../tools/virt-make-fs.pl:557 ../tools/virt-tar.pl:296 ../tools/virt-win-reg.pl:757
754 #: ../align/virt-alignment-scan.pod:354
756 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
757 "L<virt-resize(1)>, L<http://libguestfs.org/>."
761 #: ../align/virt-alignment-scan.pod:361 ../cat/virt-cat.pod:252 ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:507 ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:261 ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:334 ../resize/virt-resize.pod:717 ../sparsify/virt-sparsify.pod:288 ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277 ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:311 ../tools/virt-win-reg.pl:783
766 #: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254 ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509 ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:263 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410 ../rescue/virt-rescue.pod:336 ../resize/virt-resize.pod:719 ../sparsify/virt-sparsify.pod:290 ../tools/virt-list-filesystems.pl:210 ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584 ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
767 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
771 #: ../align/virt-alignment-scan.pod:365 ../cat/virt-cat.pod:256 ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511 ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:265 ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 ../examples/guestfs-testing.pod:302 ../fish/guestfish.pod:1300 ../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:332 ../inspector/virt-inspector.pod:418 ../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:338 ../resize/virt-resize.pod:721 ../ruby/examples/guestfs-ruby.pod:52 ../sparsify/virt-sparsify.pod:292 ../src/guestfs.pod:3358 ../test-tool/libguestfs-test-tool.pod:110 ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281 ../tools/virt-make-fs.pl:586 ../tools/virt-tar.pl:315 ../tools/virt-win-reg.pl:787
776 #: ../align/virt-alignment-scan.pod:367 ../clone/virt-sysprep.pod:507 ../sparsify/virt-sparsify.pod:294
777 msgid "Copyright (C) 2011 Red Hat Inc."
781 #: ../align/virt-alignment-scan.pod:369 ../cat/virt-cat.pod:260 ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515 ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:269 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305 ../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:337 ../inspector/virt-inspector.pod:422 ../rescue/virt-rescue.pod:342 ../resize/virt-resize.pod:725 ../sparsify/virt-sparsify.pod:296 ../test-tool/libguestfs-test-tool.pod:115 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285 ../tools/virt-make-fs.pl:590 ../tools/virt-tar.pl:319 ../tools/virt-win-reg.pl:791
783 "This program is free software; you can redistribute it and/or modify it "
784 "under the terms of the GNU General Public License as published by the Free "
785 "Software Foundation; either version 2 of the License, or (at your option) "
790 #: ../align/virt-alignment-scan.pod:374 ../cat/virt-cat.pod:265 ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520 ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:274 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310 ../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:342 ../inspector/virt-inspector.pod:427 ../rescue/virt-rescue.pod:347 ../resize/virt-resize.pod:730 ../sparsify/virt-sparsify.pod:301 ../test-tool/libguestfs-test-tool.pod:120 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290 ../tools/virt-make-fs.pl:595 ../tools/virt-tar.pl:324 ../tools/virt-win-reg.pl:796
792 "This program is distributed in the hope that it will be useful, but WITHOUT "
793 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
794 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
799 #: ../align/virt-alignment-scan.pod:379 ../cat/virt-cat.pod:270 ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525 ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:279 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315 ../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:347 ../inspector/virt-inspector.pod:432 ../rescue/virt-rescue.pod:352 ../resize/virt-resize.pod:735 ../sparsify/virt-sparsify.pod:306 ../test-tool/libguestfs-test-tool.pod:125 ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295 ../tools/virt-make-fs.pl:600 ../tools/virt-tar.pl:329 ../tools/virt-win-reg.pl:801
801 "You should have received a copy of the GNU General Public License along with "
802 "this program; if not, write to the Free Software Foundation, Inc., 51 "
803 "Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
807 #: ../cat/virt-cat.pod:5
808 msgid "virt-cat - Display files in a virtual machine"
812 #: ../cat/virt-cat.pod:9
815 " virt-cat [--options] -d domname file [file ...]\n"
820 #: ../cat/virt-cat.pod:11
823 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
828 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 ../inspector/virt-inspector.pod:13
833 #: ../cat/virt-cat.pod:15
836 " virt-cat domname file\n"
841 #: ../cat/virt-cat.pod:17
844 " virt-cat disk.img file\n"
849 #: ../cat/virt-cat.pod:21
851 "C<virt-cat> is a command line tool to display the contents of C<file> where "
852 "C<file> exists in the named virtual machine (or disk image)."
856 #: ../cat/virt-cat.pod:24
858 "Multiple filenames can be given, in which case they are concatenated "
859 "together. Each filename must be a full path, starting at the root directory "
860 "(starting with '/')."
864 #: ../cat/virt-cat.pod:28
866 "C<virt-cat> can be used to quickly view a file. To edit a file, use "
867 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
868 "tool (see L</USING GUESTFISH> below)."
872 #: ../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:1051 ../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
877 #: ../cat/virt-cat.pod:34
878 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
882 #: ../cat/virt-cat.pod:37
885 " virt-cat -d mydomain /etc/fstab\n"
890 #: ../cat/virt-cat.pod:39
891 msgid "List syslog messages from a VM disk image file:"
895 #: ../cat/virt-cat.pod:41
898 " virt-cat -a disk.img /var/log/messages | tail\n"
903 #: ../cat/virt-cat.pod:43
904 msgid "Find out what DHCP IP address a VM acquired:"
908 #: ../cat/virt-cat.pod:45
911 " virt-cat -d mydomain /var/log/messages | \\\n"
912 " grep 'dhclient: bound to' | tail\n"
917 #: ../cat/virt-cat.pod:48
918 msgid "Find out what packages were recently installed:"
922 #: ../cat/virt-cat.pod:50
925 " virt-cat -d mydomain /var/log/yum.log | tail\n"
930 #: ../cat/virt-cat.pod:52
931 msgid "Find out who is logged on inside a virtual machine:"
935 #: ../cat/virt-cat.pod:54
938 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
944 #: ../cat/virt-cat.pod:57
945 msgid "or who was logged on:"
949 #: ../cat/virt-cat.pod:59
952 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
953 " last -f /tmp/wtmp\n"
958 #: ../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:124
960 "Add I<file> which should be a disk image from a virtual machine. If the "
961 "virtual machine has multiple block devices, you must supply all of them with "
962 "separate I<-a> options."
966 #: ../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:135 ../inspector/virt-inspector.pod:92
967 msgid "B<--echo-keys>"
971 #: ../cat/virt-cat.pod:100
973 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
974 "so you cannot see what you are typing. If you are not worried about Tempest "
975 "attacks and there is no one else in the room you can specify this flag to "
976 "see what you are typing."
980 #: ../cat/virt-cat.pod:116
983 " virt-cat --format=raw -a disk.img file\n"
988 #: ../cat/virt-cat.pod:120
991 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
996 #: ../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:172 ../inspector/virt-inspector.pod:114
997 msgid "B<--keys-from-stdin>"
1001 #: ../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:174 ../inspector/virt-inspector.pod:116
1003 "Read key or passphrase parameters from stdin. The default is to try to read "
1004 "passphrases from the user by opening C</dev/tty>."
1008 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:246
1009 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1013 #: ../cat/virt-cat.pod:154
1014 msgid "Previous versions of virt-cat allowed you to write either:"
1018 #: ../cat/virt-cat.pod:156
1021 " virt-cat disk.img [disk.img ...] file\n"
1026 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:252
1031 #: ../cat/virt-cat.pod:160
1034 " virt-cat guestname file\n"
1039 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:256
1041 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1042 "the confusing case where a disk image might have the same name as a guest."
1046 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:260
1047 msgid "For compatibility the old style is still supported."
1051 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
1052 msgid "WINDOWS PATHS"
1056 #: ../cat/virt-cat.pod:170
1058 "C<virt-cat> has a limited ability to understand Windows drive letters and "
1059 "paths (eg. C<E:\\foo\\bar.txt>)."
1063 #: ../cat/virt-cat.pod:173 ../edit/virt-edit.pod:262
1064 msgid "If and only if the guest is running Windows then:"
1068 #: ../cat/virt-cat.pod:179 ../edit/virt-edit.pod:268
1070 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
1071 "to the correct filesystem."
1075 #: ../cat/virt-cat.pod:184 ../edit/virt-edit.pod:273
1077 "Any backslash (C<\\>) characters in the path are replaced with forward "
1078 "slashes so that libguestfs can process it."
1082 #: ../cat/virt-cat.pod:189
1084 "The path is resolved case insensitively to locate the file that should be "
1089 #: ../cat/virt-cat.pod:194 ../edit/virt-edit.pod:283
1090 msgid "There are some known shortcomings:"
1094 #: ../cat/virt-cat.pod:200 ../edit/virt-edit.pod:289
1095 msgid "Some NTFS symbolic links may not be followed correctly."
1099 #: ../cat/virt-cat.pod:204 ../edit/virt-edit.pod:293
1100 msgid "NTFS junction points that cross filesystems are not followed."
1104 #: ../cat/virt-cat.pod:208 ../edit/virt-edit.pod:297
1105 msgid "USING GUESTFISH"
1109 #: ../cat/virt-cat.pod:210
1111 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1112 "C<virt-cat> doesn't work."
1116 #: ../cat/virt-cat.pod:213
1117 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1121 #: ../cat/virt-cat.pod:215
1124 " guestfish --ro -i -d domname download file -\n"
1129 #: ../cat/virt-cat.pod:217
1131 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1132 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1136 #: ../cat/virt-cat.pod:221
1138 "The command above uses libguestfs's guest inspection feature and so does not "
1139 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1140 "disk images that don't contain guests. To display a file from a disk image "
1145 #: ../cat/virt-cat.pod:226
1148 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1153 #: ../cat/virt-cat.pod:228
1155 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1156 "the disk image, and C<file> is the full path to the file."
1160 #: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382 ../cat/virt-ls.pod:492 ../df/virt-df.pod:250 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392 ../resize/virt-resize.pod:691 ../sparsify/virt-sparsify.pod:253
1161 msgid "This program returns 0 if successful, or non-zero if there was an error."
1165 #: ../cat/virt-cat.pod:245
1167 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
1168 "L<virt-tar-out(1)>, L<http://libguestfs.org/>."
1172 #: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:420 ../resize/virt-resize.pod:723 ../tools/virt-make-fs.pl:588
1173 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1177 #: ../cat/virt-filesystems.pod:5
1179 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1180 "virtual machine or disk image"
1184 #: ../cat/virt-filesystems.pod:9
1187 " virt-filesystems [--options] -d domname\n"
1192 #: ../cat/virt-filesystems.pod:11
1195 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1200 #: ../cat/virt-filesystems.pod:15
1202 "This tool allows you to discover filesystems, partitions, logical volumes, "
1203 "and their sizes in a disk image or virtual machine. It is a replacement for "
1204 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1208 #: ../cat/virt-filesystems.pod:20
1210 "One use for this tool is from shell scripts to iterate over all filesystems "
1211 "from a disk image:"
1215 #: ../cat/virt-filesystems.pod:23
1218 " for fs in $(virt-filesystems -a disk.img); do\n"
1225 #: ../cat/virt-filesystems.pod:27
1227 "Another use is to list partitions before using another tool to modify those "
1228 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1229 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1233 #: ../cat/virt-filesystems.pod:32
1235 "Various command line options control what this program displays. You need "
1236 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1237 "guest respectively. If you just specify that then the program shows "
1238 "filesystems found, one per line, like this:"
1242 #: ../cat/virt-filesystems.pod:37
1245 " $ virt-filesystems -a disk.img\n"
1247 " /dev/vg_guest/lv_root\n"
1252 #: ../cat/virt-filesystems.pod:41
1253 msgid "If you add I<-l> or I<--long> then the output includes extra information:"
1257 #: ../cat/virt-filesystems.pod:44
1260 " $ virt-filesystems -a disk.img -l\n"
1261 " Name Type VFS Label Size\n"
1262 " /dev/sda1 filesystem ext4 boot 524288000\n"
1263 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1268 #: ../cat/virt-filesystems.pod:49
1270 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1275 #: ../cat/virt-filesystems.pod:52
1278 " $ virt-filesystems -a disk.img --extra\n"
1280 " /dev/vg_guest/lv_root\n"
1281 " /dev/vg_guest/lv_swap\n"
1282 " /dev/vg_guest/lv_data\n"
1287 #: ../cat/virt-filesystems.pod:58
1288 msgid "If you add I<--partitions> then partitions are shown instead of filesystems:"
1292 #: ../cat/virt-filesystems.pod:60
1295 " $ virt-filesystems -a disk.img --partitions\n"
1302 #: ../cat/virt-filesystems.pod:64
1304 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, "
1305 "I<--physical-volumes>, I<--block-devices> to list those items."
1309 #: ../cat/virt-filesystems.pod:67
1311 "You can use these options in combination as well (if you want a combination "
1312 "including filesystems, you have to add I<--filesystems>). Notice that some "
1313 "items fall into several categories (eg. C</dev/sda1> might be both a "
1314 "partition and a filesystem). These items are listed several times. To get "
1315 "a list which includes absolutely everything that virt-filesystems knows "
1316 "about, use the I<--all> option."
1320 #: ../cat/virt-filesystems.pod:74
1322 "UUIDs (because they are quite long) are not shown by default. Add the "
1323 "I<--uuid> option to display device and filesystem UUIDs in the long output."
1327 #: ../cat/virt-filesystems.pod:78
1329 "I<--all --long --uuid> is a useful combination to display all possible "
1330 "information about everything."
1334 #: ../cat/virt-filesystems.pod:81
1337 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1338 " Name Type VFS Label Size Parent UUID\n"
1339 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1340 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1341 " /dev/sda1 partition - - 100M /dev/sda -\n"
1342 " /dev/sda2 partition - - 20G /dev/sda -\n"
1343 " /dev/sda device - - 20G - -\n"
1348 #: ../cat/virt-filesystems.pod:89
1349 msgid "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1353 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1358 #: ../cat/virt-filesystems.pod:112
1360 "Display everything. This is currently the same as specifying these options: "
1361 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, "
1362 "I<--logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may "
1363 "be added to this list in future)."
1367 #: ../cat/virt-filesystems.pod:117
1368 msgid "See also I<--long>."
1372 #: ../cat/virt-filesystems.pod:119
1373 msgid "B<--blkdevs>"
1377 #: ../cat/virt-filesystems.pod:121
1378 msgid "B<--block-devices>"
1382 #: ../cat/virt-filesystems.pod:123
1383 msgid "Display block devices."
1387 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1392 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1394 "Write out the results in CSV format (comma-separated values). This format "
1395 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1396 "ABOUT CSV FORMAT> below."
1400 #: ../cat/virt-filesystems.pod:150
1402 "When prompting for keys and passphrases, virt-filesystems normally turns "
1403 "echoing off so you cannot see what you are typing. If you are not worried "
1404 "about Tempest attacks and there is no one else in the room you can specify "
1405 "this flag to see what you are typing."
1409 #: ../cat/virt-filesystems.pod:155
1414 #: ../cat/virt-filesystems.pod:157
1416 "This causes filesystems that are not ordinary, mountable filesystems to be "
1417 "displayed. This category includes swapspace, and filesystems that are empty "
1418 "or contain unknown data."
1422 #: ../cat/virt-filesystems.pod:161
1423 msgid "This option implies I<--filesystems>."
1427 #: ../cat/virt-filesystems.pod:163
1428 msgid "B<--filesystems>"
1432 #: ../cat/virt-filesystems.pod:165
1434 "Display mountable filesystems. If no display option was selected then this "
1435 "option is implied."
1439 #: ../cat/virt-filesystems.pod:168
1440 msgid "With I<--extra>, non-mountable filesystems are shown too."
1444 #: ../cat/virt-filesystems.pod:181
1447 " virt-filesystems --format=raw -a disk.img\n"
1452 #: ../cat/virt-filesystems.pod:185
1455 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1460 #: ../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
1465 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354 ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1466 msgid "B<--human-readable>"
1470 #: ../cat/virt-filesystems.pod:198
1471 msgid "In I<--long> mode, display sizes in human-readable format."
1475 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366 ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1480 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368 ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1485 #: ../cat/virt-filesystems.pod:209
1486 msgid "Display extra columns of data (\"long format\")."
1490 #: ../cat/virt-filesystems.pod:211
1491 msgid "A title row is added unless you also specify I<--no-title>."
1495 #: ../cat/virt-filesystems.pod:213
1497 "The extra columns displayed depend on what output you select, and the "
1498 "ordering of columns may change in future versions. Use the title row, "
1499 "I<--csv> output and/or L<csvtool(1)> to match columns to data in external "
1504 #: ../cat/virt-filesystems.pod:218
1506 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1507 "default is to show raw numbers of I<bytes>."
1511 #: ../cat/virt-filesystems.pod:221
1512 msgid "Use I<--uuid> to display UUIDs too."
1516 #: ../cat/virt-filesystems.pod:223
1521 #: ../cat/virt-filesystems.pod:225
1522 msgid "B<--logvols>"
1526 #: ../cat/virt-filesystems.pod:227
1527 msgid "B<--logical-volumes>"
1531 #: ../cat/virt-filesystems.pod:229
1533 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1534 "of whether the LVs contain filesystems."
1538 #: ../cat/virt-filesystems.pod:232
1539 msgid "B<--no-title>"
1543 #: ../cat/virt-filesystems.pod:234
1544 msgid "In I<--long> mode, don't add a title row."
1548 #: ../cat/virt-filesystems.pod:236
1550 "Note that the order of the columns is not fixed, and may change in future "
1551 "versions of virt-filesystems, so using this option may give you unexpected "
1556 #: ../cat/virt-filesystems.pod:240
1561 #: ../cat/virt-filesystems.pod:242
1562 msgid "B<--partitions>"
1566 #: ../cat/virt-filesystems.pod:244
1568 "Display partitions. In this mode, these are displayed irrespective of "
1569 "whether the partitions contain filesystems."
1573 #: ../cat/virt-filesystems.pod:247
1578 #: ../cat/virt-filesystems.pod:249
1579 msgid "B<--physvols>"
1583 #: ../cat/virt-filesystems.pod:251
1584 msgid "B<--physical-volumes>"
1588 #: ../cat/virt-filesystems.pod:253
1589 msgid "Display LVM physical volumes."
1593 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1598 #: ../cat/virt-filesystems.pod:257
1603 #: ../cat/virt-filesystems.pod:259
1604 msgid "In I<--long> mode, display UUIDs as well."
1608 #: ../cat/virt-filesystems.pod:273
1613 #: ../cat/virt-filesystems.pod:275
1614 msgid "B<--volgroups>"
1618 #: ../cat/virt-filesystems.pod:277
1619 msgid "B<--volume-groups>"
1623 #: ../cat/virt-filesystems.pod:279
1624 msgid "Display LVM volume groups."
1628 #: ../cat/virt-filesystems.pod:287
1633 #: ../cat/virt-filesystems.pod:289
1635 "Note that columns in the output are subject to reordering and change in "
1636 "future versions of this tool."
1640 #: ../cat/virt-filesystems.pod:294
1645 #: ../cat/virt-filesystems.pod:296
1646 msgid "The filesystem, partition, block device or LVM name."
1650 #: ../cat/virt-filesystems.pod:298
1652 "For device and partition names these are displayed as canonical libguestfs "
1653 "names, so that for example C</dev/sda2> is the second partition on the first "
1658 #: ../cat/virt-filesystems.pod:302
1660 "If the I<--long> option is B<not> specified, then only the name column is "
1661 "shown in the output."
1665 #: ../cat/virt-filesystems.pod:305
1670 #: ../cat/virt-filesystems.pod:307
1671 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1675 #: ../cat/virt-filesystems.pod:309
1680 #: ../cat/virt-filesystems.pod:311
1682 "If there is a filesystem, then this column displays the filesystem type if "
1683 "one could be detected, eg. C<ext4>."
1687 #: ../cat/virt-filesystems.pod:314
1692 #: ../cat/virt-filesystems.pod:316
1694 "If the object has a label (used for identifying and mounting filesystems) "
1695 "then this column contains the label."
1699 #: ../cat/virt-filesystems.pod:319
1704 #: ../cat/virt-filesystems.pod:321
1706 "The partition type byte, displayed as a two digit hexadecimal number. A "
1707 "comprehensive list of partition types can be found here: "
1708 "L<http://www.win.tue.nl/~aeb/partitions/partition_types-1.html>"
1712 #: ../cat/virt-filesystems.pod:325
1713 msgid "This is only applicable for DOS (MBR) partitions."
1717 #: ../cat/virt-filesystems.pod:327
1722 #: ../cat/virt-filesystems.pod:329
1724 "The size of the object in bytes. If the I<--human> option is used then the "
1725 "size is displayed in a human-readable form."
1729 #: ../cat/virt-filesystems.pod:332
1734 #: ../cat/virt-filesystems.pod:334
1736 "The parent column records the parent relationship between objects. For "
1737 "example, if the object is a partition, then this column contains the name of "
1738 "the containing device. If the object is a logical volume, then this column "
1739 "is the name of the volume group."
1743 #: ../cat/virt-filesystems.pod:339
1748 #: ../cat/virt-filesystems.pod:341
1750 "If the object has a UUID (used for identifying and mounting filesystems and "
1751 "block devices) then this column contains the UUID as a string."
1755 #: ../cat/virt-filesystems.pod:345
1756 msgid "The UUID is only displayed if the I<--uuid> option is given."
1760 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:459 ../df/virt-df.pod:217
1761 msgid "NOTE ABOUT CSV FORMAT"
1765 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:461 ../df/virt-df.pod:219
1767 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
1768 "should be easy to parse, but it is definitely not easy to parse."
1772 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:464 ../df/virt-df.pod:222
1774 "Myth: Just split fields at commas. Reality: This does I<not> work "
1775 "reliably. This example has two columns:"
1779 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:467 ../df/virt-df.pod:225
1782 " \"foo,bar\",baz\n"
1787 #: ../cat/virt-filesystems.pod:359 ../cat/virt-ls.pod:469 ../df/virt-df.pod:227
1789 "Myth: Read the file one line at a time. Reality: This does I<not> work "
1790 "reliably. This example has one row:"
1794 #: ../cat/virt-filesystems.pod:362 ../cat/virt-ls.pod:472 ../df/virt-df.pod:230
1803 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:475 ../df/virt-df.pod:233
1805 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
1806 "packaged in major Linux distributions)."
1810 #: ../cat/virt-filesystems.pod:368 ../cat/virt-ls.pod:478 ../df/virt-df.pod:236
1812 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
1813 "or Python's built-in csv library)."
1817 #: ../cat/virt-filesystems.pod:371 ../cat/virt-ls.pod:481 ../df/virt-df.pod:239
1818 msgid "Most spreadsheets and databases can import CSV directly."
1822 #: ../cat/virt-filesystems.pod:387
1824 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
1825 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, "
1826 "L<http://libguestfs.org/>."
1830 #: ../cat/virt-filesystems.pod:402 ../tools/virt-win-reg.pl:789
1831 msgid "Copyright (C) 2010 Red Hat Inc."
1835 #: ../cat/virt-ls.pod:5
1836 msgid "virt-ls - List files in a virtual machine"
1840 #: ../cat/virt-ls.pod:9
1843 " virt-ls [--options] -d domname directory [directory ...]\n"
1848 #: ../cat/virt-ls.pod:11
1851 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory "
1857 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:15
1862 #: ../cat/virt-ls.pod:15
1865 " virt-ls [--options] domname directory\n"
1870 #: ../cat/virt-ls.pod:17
1873 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1878 #: ../cat/virt-ls.pod:21
1880 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1881 "more from a virtual machine or disk image."
1885 #: ../cat/virt-ls.pod:24
1887 "Multiple directory names can be given, in which case the output from each is "
1892 #: ../cat/virt-ls.pod:27
1894 "To list directories from a libvirt guest use the I<-d> option to specify the "
1895 "name of the guest. For a disk image, use the I<-a> option."
1899 #: ../cat/virt-ls.pod:31
1901 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1902 "may need to use L<guestfish(1)>, or write a program directly to the "
1903 "L<guestfs(3)> API."
1907 #: ../cat/virt-ls.pod:37
1908 msgid "Get a list of all files and directories in a virtual machine:"
1912 #: ../cat/virt-ls.pod:39
1915 " virt-ls -R -d guest /\n"
1920 #: ../cat/virt-ls.pod:41 ../examples/guestfs-testing.pod:182
1921 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1925 #: ../cat/virt-ls.pod:43
1928 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1933 #: ../cat/virt-ls.pod:45 ../examples/guestfs-testing.pod:186
1934 msgid "List all public-writable directories in a Linux virtual machine:"
1938 #: ../cat/virt-ls.pod:47
1941 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1946 #: ../cat/virt-ls.pod:49 ../examples/guestfs-testing.pod:190
1947 msgid "List all Unix domain sockets in a Linux virtual machine:"
1951 #: ../cat/virt-ls.pod:51
1954 " virt-ls -lR -d guest / | grep '^s'\n"
1959 #: ../cat/virt-ls.pod:53 ../examples/guestfs-testing.pod:194
1960 msgid "List all regular files with filenames ending in '.png':"
1964 #: ../cat/virt-ls.pod:55
1967 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1972 #: ../cat/virt-ls.pod:57
1973 msgid "To display files larger than 10MB in home directories:"
1977 #: ../cat/virt-ls.pod:59
1980 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1985 #: ../cat/virt-ls.pod:61 ../examples/guestfs-testing.pod:202
1986 msgid "Find everything modified in the last 7 days:"
1990 #: ../cat/virt-ls.pod:63
1993 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1998 #: ../cat/virt-ls.pod:65 ../examples/guestfs-testing.pod:206
1999 msgid "Find regular files modified in the last 24 hours:"
2003 #: ../cat/virt-ls.pod:67
2006 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2011 #: ../cat/virt-ls.pod:69
2012 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2016 #: ../cat/virt-ls.pod:71
2018 "Find the differences between files in a guest and an earlier snapshot of the "
2023 #: ../cat/virt-ls.pod:74
2026 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2027 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2028 " diff -u old new | less\n"
2033 #: ../cat/virt-ls.pod:78
2035 "The commands above won't find files where the content has changed but the "
2036 "metadata (eg. file size and modification date) is the same. To do that, you "
2037 "need to add the I<--checksum> parameter to both C<virt-ls> commands. "
2038 "I<--checksum> can be quite slow since it has to read and compute a checksum "
2039 "of every regular file in the virtual machine."
2043 #: ../cat/virt-ls.pod:84
2044 msgid "OUTPUT MODES"
2048 #: ../cat/virt-ls.pod:86
2050 "C<virt-ls> has four output modes, controlled by different combinations of "
2051 "the I<-l> and I<-R> options."
2055 #: ../cat/virt-ls.pod:89
2056 msgid "SIMPLE LISTING"
2060 #: ../cat/virt-ls.pod:91
2061 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2065 #: ../cat/virt-ls.pod:93
2068 " $ virt-ls -d guest /\n"
2076 #: ../cat/virt-ls.pod:98
2077 msgid "LONG LISTING"
2081 #: ../cat/virt-ls.pod:100
2083 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2084 "(more specifically, like the C<guestfs_ll> function)."
2088 #: ../cat/virt-ls.pod:103
2091 " $ virt-ls -l -d guest /\n"
2093 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2094 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2100 #: ../cat/virt-ls.pod:109
2102 "Note that while this is useful for displaying a directory, do not try "
2103 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2108 #: ../cat/virt-ls.pod:113
2109 msgid "RECURSIVE LISTING"
2113 #: ../cat/virt-ls.pod:115
2115 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2116 "and directories recursively:"
2120 #: ../cat/virt-ls.pod:118
2123 " $ virt-ls -R -d guest /tmp\n"
2131 #: ../cat/virt-ls.pod:123
2133 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2134 "converts C<\\0> characters to C<\\n>."
2138 #: ../cat/virt-ls.pod:126
2139 msgid "RECURSIVE LONG LISTING"
2143 #: ../cat/virt-ls.pod:128
2145 "Using I<-lR> options together changes the output to display directories "
2146 "recursively, with file stats, and optionally other features such as "
2147 "checksums and extended attributes."
2151 #: ../cat/virt-ls.pod:132
2153 "Most of the interesting features of C<virt-ls> are only available when using "
2158 #: ../cat/virt-ls.pod:135
2160 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2161 "you cannot use the output in another program (because filenames can contain "
2162 "spaces and other unsafe characters). If the guest was untrusted and someone "
2163 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2164 "on you by creating filenames with embedded newline characters. To B<safely> "
2165 "parse the output in another program, use the I<--csv> (Comma-Separated "
2170 #: ../cat/virt-ls.pod:143
2172 "Note that this output format is completely unrelated to the C<ls -lR> "
2177 #: ../cat/virt-ls.pod:146
2180 " $ virt-ls -lR -d guest /bin\n"
2181 " d 0555 4096 /bin\n"
2182 " - 0755 123 /bin/alsaunmute\n"
2183 " - 0755 28328 /bin/arch\n"
2184 " l 0777 4 /bin/awk -> gawk\n"
2185 " - 0755 27216 /bin/basename\n"
2186 " - 0755 943360 /bin/bash\n"
2192 #: ../cat/virt-ls.pod:155
2193 msgid "These basic fields are always shown:"
2197 #: ../cat/virt-ls.pod:159
2202 #: ../cat/virt-ls.pod:161
2204 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2205 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2206 "link), C<s> (socket) or C<u> (unknown)."
2210 #: ../cat/virt-ls.pod:171
2215 #: ../cat/virt-ls.pod:173
2216 msgid "The Unix permissions, displayed as a 4 digit octal number."
2220 #: ../cat/virt-ls.pod:175
2225 #: ../cat/virt-ls.pod:177
2227 "The size of the file. This is shown in bytes unless I<-h> or "
2228 "I<--human-readable> option is given, in which case this is shown as a "
2229 "human-readable number."
2233 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4488
2238 #: ../cat/virt-ls.pod:183
2239 msgid "The full path of the file or directory."
2243 #: ../cat/virt-ls.pod:185
2248 #: ../cat/virt-ls.pod:187
2249 msgid "For symbolic links only, the link target."
2253 #: ../cat/virt-ls.pod:191
2255 "In I<-lR> mode, additional command line options enable the display of more "
2260 #: ../cat/virt-ls.pod:194
2262 "With the I<--uids> flag, these additional fields are displayed before the "
2267 #: ../cat/virt-ls.pod:199
2272 #: ../cat/virt-ls.pod:201
2277 #: ../cat/virt-ls.pod:203
2279 "The UID and GID of the owner of the file (displayed numerically). Note "
2280 "these only make sense in the context of a Unix-like guest."
2284 #: ../cat/virt-ls.pod:208
2285 msgid "With the I<--times> flag, these additional fields are displayed:"
2289 #: ../cat/virt-ls.pod:212
2294 #: ../cat/virt-ls.pod:214
2295 msgid "The time of last access."
2299 #: ../cat/virt-ls.pod:216
2304 #: ../cat/virt-ls.pod:218
2305 msgid "The time of last modification."
2309 #: ../cat/virt-ls.pod:220
2314 #: ../cat/virt-ls.pod:222
2315 msgid "The time of last status change."
2319 #: ../cat/virt-ls.pod:226
2321 "The time fields are displayed as string dates and times, unless one of the "
2322 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2326 #: ../cat/virt-ls.pod:229
2327 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2331 #: ../cat/virt-ls.pod:233
2336 #: ../cat/virt-ls.pod:235
2338 "The device containing the file (displayed as major:minor). This may not "
2339 "match devices as known to the guest."
2343 #: ../cat/virt-ls.pod:238
2348 #: ../cat/virt-ls.pod:240
2349 msgid "The inode number."
2353 #: ../cat/virt-ls.pod:242
2358 #: ../cat/virt-ls.pod:244
2359 msgid "The number of hard links."
2363 #: ../cat/virt-ls.pod:246
2368 #: ../cat/virt-ls.pod:248
2369 msgid "For block and char special files, the device (displayed as major:minor)."
2373 #: ../cat/virt-ls.pod:251
2378 #: ../cat/virt-ls.pod:253
2379 msgid "The number of 512 byte blocks allocated to the file."
2383 #: ../cat/virt-ls.pod:257
2385 "With the I<--checksum> flag, the checksum of the file contents is shown "
2386 "(only for regular files). Computing file checksums can take a considerable "
2391 #: ../cat/virt-ls.pod:280
2392 msgid "B<--checksum>"
2396 #: ../cat/virt-ls.pod:282
2397 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2401 #: ../cat/virt-ls.pod:284
2403 "Display checksum over file contents for regular files. With no argument, "
2404 "this defaults to using I<md5>. Using an argument, you can select the "
2405 "checksum type to use."
2409 #: ../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
2411 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2416 #: ../cat/virt-ls.pod:316
2418 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2419 "so you cannot see what you are typing. If you are not worried about Tempest "
2420 "attacks and there is no one else in the room you can specify this flag to "
2421 "see what you are typing."
2425 #: ../cat/virt-ls.pod:321
2426 msgid "B<--extra-stats>"
2430 #: ../cat/virt-ls.pod:323
2431 msgid "Display extra stats."
2435 #: ../cat/virt-ls.pod:339
2438 " virt-ls --format=raw -a disk.img /dir\n"
2443 #: ../cat/virt-ls.pod:343
2446 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2451 #: ../cat/virt-ls.pod:356
2452 msgid "Display file sizes in human-readable format."
2456 #: ../cat/virt-ls.pod:370
2461 #: ../cat/virt-ls.pod:372
2462 msgid "B<--recursive>"
2466 #: ../cat/virt-ls.pod:374
2468 "Select the mode. With neither of these options, C<virt-ls> produces a "
2469 "simple, flat list of the files in the named directory. See L</SIMPLE "
2474 #: ../cat/virt-ls.pod:378
2476 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See "
2481 #: ../cat/virt-ls.pod:381
2483 "C<virt-ls -R> produces a recursive list of files starting at the named "
2484 "directory. See L</RECURSIVE LISTING>."
2488 #: ../cat/virt-ls.pod:384
2490 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2491 "parsed. See L</RECURSIVE LONG LISTING>."
2495 #: ../cat/virt-ls.pod:387
2500 #: ../cat/virt-ls.pod:389
2501 msgid "Display time fields."
2505 #: ../cat/virt-ls.pod:394
2506 msgid "B<--time-days>"
2510 #: ../cat/virt-ls.pod:396
2511 msgid "Display time fields as days before now (negative if in the future)."
2515 #: ../cat/virt-ls.pod:398
2517 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2518 "of the file is between 0 and 86399 seconds."
2522 #: ../cat/virt-ls.pod:404
2523 msgid "B<--time-relative>"
2527 #: ../cat/virt-ls.pod:406
2528 msgid "Display time fields as seconds before now (negative if in the future)."
2532 #: ../cat/virt-ls.pod:411
2537 #: ../cat/virt-ls.pod:413
2538 msgid "Display time fields as seconds since the Unix epoch."
2542 #: ../cat/virt-ls.pod:418
2547 #: ../cat/virt-ls.pod:420
2548 msgid "Display UID and GID fields."
2552 #: ../cat/virt-ls.pod:445
2553 msgid "Previous versions of virt-ls allowed you to write either:"
2557 #: ../cat/virt-ls.pod:447
2560 " virt-ls disk.img [disk.img ...] /dir\n"
2565 #: ../cat/virt-ls.pod:451
2568 " virt-ls guestname /dir\n"
2573 #: ../cat/virt-ls.pod:497
2575 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, "
2576 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
2577 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
2581 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:267 ../edit/virt-edit.pod:374 ../rescue/virt-rescue.pod:340
2582 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2586 #: ../clone/virt-sysprep.pod:5
2587 msgid "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2591 #: ../clone/virt-sysprep.pod:9
2594 " virt-sysprep [--options] -d domname\n"
2599 #: ../clone/virt-sysprep.pod:11
2602 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2607 #: ../clone/virt-sysprep.pod:15
2609 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2610 "can be made from it. Steps in this process include removing SSH host keys, "
2611 "removing persistent network MAC configuration, and removing user accounts. "
2612 "Each step can be enabled or disabled as required."
2616 #: ../clone/virt-sysprep.pod:21
2618 "Virt-sysprep is a simple shell script, allowing easy inspection or "
2619 "customization by the system administrator."
2623 #: ../clone/virt-sysprep.pod:24
2625 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
2626 "be shut down. If you want to preserve the existing contents of the guest, "
2627 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> "
2632 #: ../clone/virt-sysprep.pod:29
2634 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
2635 "recommend that you don't. The time you might want to run it as root is when "
2636 "you need root in order to access the disk image, but even in this case it "
2637 "would be better to change the permissions on the disk image to be writable "
2638 "as the non-root user running virt-sysprep."
2642 #: ../clone/virt-sysprep.pod:35
2644 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
2645 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
2646 "machines in preparation for cloning them. Having said that, virt-sysprep "
2647 "does I<not> currently work on Microsoft Windows guests. We plan to support "
2648 "Windows sysprepping in a future version, and we already have code to do it."
2652 #: ../clone/virt-sysprep.pod:76
2653 msgid "B<--enable=...>"
2657 #: ../clone/virt-sysprep.pod:78
2659 "Choose which sysprep operations to perform. Give a comma-separated list of "
2660 "operations, for example:"
2664 #: ../clone/virt-sysprep.pod:81
2667 " --enable=ssh-hostkeys,udev-persistent-net\n"
2672 #: ../clone/virt-sysprep.pod:83
2673 msgid "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
2677 #: ../clone/virt-sysprep.pod:85
2679 "If the I<--enable> option is not given, then we default to trying all "
2680 "possible sysprep operations. But some sysprep operations are skipped for "
2685 #: ../clone/virt-sysprep.pod:89
2687 "Use I<--list-operations> to list operations supported by a particular "
2688 "version of virt-sysprep."
2692 #: ../clone/virt-sysprep.pod:92
2693 msgid "See L</OPERATIONS> below for a list and an explanation of each operation."
2697 #: ../clone/virt-sysprep.pod:106
2700 " virt-sysprep --format=raw -a disk.img\n"
2705 #: ../clone/virt-sysprep.pod:110
2708 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
2713 #: ../clone/virt-sysprep.pod:119
2714 msgid "B<--hostname> newhostname"
2718 #: ../clone/virt-sysprep.pod:121
2720 "Change the hostname. See the L</hostname> operation below. If not given, "
2721 "defaults to C<localhost.localdomain>."
2725 #: ../clone/virt-sysprep.pod:124
2726 msgid "B<--list-operations>"
2730 #: ../clone/virt-sysprep.pod:126
2731 msgid "List the operations supported by the virt-sysprep program."
2735 #: ../clone/virt-sysprep.pod:128
2736 msgid "B<--selinux-relabel>"
2740 #: ../clone/virt-sysprep.pod:130
2741 msgid "B<--no-selinux-relabel>"
2745 #: ../clone/virt-sysprep.pod:132
2747 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
2748 "I<--no-selinux-relabel> disables relabelling."
2752 #: ../clone/virt-sysprep.pod:135
2754 "The default is to try to detect if SELinux relabelling is required. See "
2755 "L</SELINUX RELABELLING> below for more details."
2759 #: ../clone/virt-sysprep.pod:156
2764 #: ../clone/virt-sysprep.pod:158
2766 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
2767 "enabled>, although some are skipped depending on the type of guest."
2771 #: ../clone/virt-sysprep.pod:162
2773 "Operations can be individually enabled using the I<--enable> option. Use a "
2774 "comma-separated list, for example:"
2778 #: ../clone/virt-sysprep.pod:165
2781 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
2786 #: ../clone/virt-sysprep.pod:167
2788 "To list the operations supported by the current version of virt-sysprep, use "
2789 "I<--list-operations>."
2793 #: ../clone/virt-sysprep.pod:170
2795 "Future versions of virt-sysprep may add more operations. If you are using "
2796 "virt-sysprep and want predictable behaviour, specify only the operations "
2797 "that you want to have enabled."
2801 #: ../clone/virt-sysprep.pod:174
2806 #: ../clone/virt-sysprep.pod:176
2807 msgid "Remove user at-jobs and cron-jobs."
2811 #: ../clone/virt-sysprep.pod:178
2812 msgid "dhcp-client-state"
2816 #: ../clone/virt-sysprep.pod:180
2817 msgid "Remove DHCP client leases."
2821 #: ../clone/virt-sysprep.pod:182
2822 msgid "dhcp-server-state"
2826 #: ../clone/virt-sysprep.pod:184
2827 msgid "Remove DHCP server leases."
2831 #: ../clone/virt-sysprep.pod:186
2836 #: ../clone/virt-sysprep.pod:188
2838 "Changes the hostname of the guest to the value given in the I<--hostname> "
2843 #: ../clone/virt-sysprep.pod:191
2845 "If the I<--hostname> parameter is not given, then the hostname is changed to "
2846 "C<localhost.localdomain>."
2850 #: ../clone/virt-sysprep.pod:194
2855 #: ../clone/virt-sysprep.pod:196
2856 msgid "Remove many log files."
2860 #: ../clone/virt-sysprep.pod:198
2865 #: ../clone/virt-sysprep.pod:200
2866 msgid "Remove email from the local mail spool directory."
2870 #: ../clone/virt-sysprep.pod:202
2875 #: ../clone/virt-sysprep.pod:204
2877 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
2878 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
2882 #: ../clone/virt-sysprep.pod:207
2887 #: ../clone/virt-sysprep.pod:209
2889 "Write some random bytes from the host into the random seed file of the "
2894 #: ../clone/virt-sysprep.pod:212
2895 msgid "See L</RANDOM SEED> below."
2899 #: ../clone/virt-sysprep.pod:214
2900 msgid "rhn-systemid"
2904 #: ../clone/virt-sysprep.pod:216
2905 msgid "Remove the RHN system ID."
2909 #: ../clone/virt-sysprep.pod:218
2914 #: ../clone/virt-sysprep.pod:220
2915 msgid "Remove the Smolt hardware UUID."
2919 #: ../clone/virt-sysprep.pod:222
2920 msgid "ssh-hostkeys"
2924 #: ../clone/virt-sysprep.pod:224
2925 msgid "Remove the SSH host keys in the guest."
2929 #: ../clone/virt-sysprep.pod:226
2931 "The SSH host keys are regenerated (differently) next time the guest is "
2936 #: ../clone/virt-sysprep.pod:229
2938 "If, after cloning, the guest gets the same IP address, ssh will give you a "
2939 "stark warning about the host key changing:"
2943 #: ../clone/virt-sysprep.pod:232
2946 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2947 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
2948 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2949 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
2954 #: ../clone/virt-sysprep.pod:237
2955 msgid "udev-persistent-net"
2959 #: ../clone/virt-sysprep.pod:239
2961 "Remove udev persistent net rules which map the guest's existing MAC address "
2962 "to a fixed ethernet device (eg. eth0)."
2966 #: ../clone/virt-sysprep.pod:242
2968 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
2969 "address occupies the old name (eg. eth0), this means the fresh MAC address "
2970 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
2971 "Erasing the udev persistent net rules avoids this."
2975 #: ../clone/virt-sysprep.pod:247
2980 #: ../clone/virt-sysprep.pod:249
2981 msgid "Remove the utmp file."
2985 #: ../clone/virt-sysprep.pod:251
2987 "This records who is currently logged in on a machine. In modern Linux "
2988 "distros it is stored in a ramdisk and hence not part of the virtual "
2989 "machine's disk, but it was stored on disk in older distros."
2993 #: ../clone/virt-sysprep.pod:255
2998 #: ../clone/virt-sysprep.pod:257
2999 msgid "Remove the yum UUID."
3003 #: ../clone/virt-sysprep.pod:259
3005 "Yum creates a fresh UUID the next time it runs when it notices that the "
3006 "original UUID has been erased."
3010 #: ../clone/virt-sysprep.pod:262
3011 msgid "COPYING AND CLONING"
3015 #: ../clone/virt-sysprep.pod:264
3017 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3018 "prepare a template from which guests can be cloned. There are many "
3019 "different ways to achieve this using the virt tools, and this section is "
3020 "just an introduction."
3024 #: ../clone/virt-sysprep.pod:269
3025 msgid "A virtual machine (when switched off) consists of two parts:"
3029 #: ../clone/virt-sysprep.pod:273
3030 msgid "I<configuration>"
3034 #: ../clone/virt-sysprep.pod:275
3036 "The configuration or description of the guest. eg. The libvirt XML (see "
3037 "C<virsh dumpxml>), the running configuration of the guest, or another "
3038 "external format like OVF."
3042 #: ../clone/virt-sysprep.pod:279
3043 msgid "Some configuration items that might need to be changed:"
3047 #: ../clone/virt-sysprep.pod:285
3052 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3057 #: ../clone/virt-sysprep.pod:293
3058 msgid "path to block device(s)"
3062 #: ../clone/virt-sysprep.pod:297
3063 msgid "network card MAC address"
3067 #: ../clone/virt-sysprep.pod:301
3068 msgid "I<block device(s)>"
3072 #: ../clone/virt-sysprep.pod:303
3074 "One or more hard disk images, themselves containing files, directories, "
3075 "applications, kernels, configuration, etc."
3079 #: ../clone/virt-sysprep.pod:306
3080 msgid "Some things inside the block devices that might need to be changed:"
3084 #: ../clone/virt-sysprep.pod:312
3085 msgid "hostname and other net configuration"
3089 #: ../clone/virt-sysprep.pod:320
3090 msgid "SSH host keys"
3094 #: ../clone/virt-sysprep.pod:324
3095 msgid "Windows unique security ID (SID)"
3099 #: ../clone/virt-sysprep.pod:328
3100 msgid "Puppet registration"
3104 #: ../clone/virt-sysprep.pod:334
3105 msgid "COPYING THE BLOCK DEVICE"
3109 #: ../clone/virt-sysprep.pod:336
3111 "Starting with an original guest, you probably wish to copy the guest block "
3112 "device and its configuration to make a template. Then once you are happy "
3113 "with the template, you will want to make many clones from it."
3117 #: ../clone/virt-sysprep.pod:341
3123 " original guest --------> template ---------->\n"
3124 " \\------> cloned\n"
3125 " \\-----> guests\n"
3131 #: ../clone/virt-sysprep.pod:349
3133 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3138 #: ../clone/virt-sysprep.pod:352
3142 " original guest --------> template ---------->\n"
3143 " \\------> cloned\n"
3144 " \\-----> guests\n"
3150 #: ../clone/virt-sysprep.pod:358
3151 msgid "There are some smarter (and faster) ways too:"
3155 #: ../clone/virt-sysprep.pod:364
3159 " template ---------->\n"
3160 " \\------> cloned\n"
3161 " \\-----> guests\n"
3167 #: ../clone/virt-sysprep.pod:370
3169 "Use the block device as a backing file and create a snapshot on top for each "
3170 "guest. The advantage is that you don't need to copy the block device (very "
3171 "fast) and only changes are stored (less storage required)."
3175 #: ../clone/virt-sysprep.pod:375
3177 "Note that writing to the backing file once you have created guests on top of "
3178 "it is not possible: you will corrupt the guests."
3182 #: ../clone/virt-sysprep.pod:378
3184 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 "
3185 "-o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3186 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3187 "also create cheap snapshots from files or LUNs."
3191 #: ../clone/virt-sysprep.pod:386
3192 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3196 #: ../clone/virt-sysprep.pod:390
3197 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3201 #: ../clone/virt-sysprep.pod:394
3206 #: ../clone/virt-sysprep.pod:396
3208 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3209 "and/or modify the external libvirt configuration of a guest. It will reset "
3210 "the name, UUID and MAC address of the guest in the libvirt XML."
3214 #: ../clone/virt-sysprep.pod:401
3216 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3217 "image. This was the original motivation to write virt-sysprep."
3221 #: ../clone/virt-sysprep.pod:404
3226 #: ../clone/virt-sysprep.pod:406
3230 " original guest --------> template\n"
3235 #: ../clone/virt-sysprep.pod:409
3237 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3238 "it easier to compress and/or faster to copy."
3242 #: ../clone/virt-sysprep.pod:412
3244 "Notice that since virt-sparsify also copies the image, you can use it to "
3245 "make the initial copy (instead of C<dd>)."
3249 #: ../clone/virt-sysprep.pod:415
3254 #: ../clone/virt-sysprep.pod:417
3258 " template ---------->\n"
3259 " \\------> cloned\n"
3260 " \\-----> guests\n"
3266 #: ../clone/virt-sysprep.pod:423
3268 "If you want to give people cloned guests, but let them pick the size of the "
3269 "guest themselves (eg. depending on how much they are prepared to pay for "
3270 "disk space), then instead of copying the template, you can run "
3271 "L<virt-resize(1)>. Virt-resize performs a copy and resize, and thus is "
3272 "ideal for cloning guests from a template."
3276 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3281 #: ../clone/virt-sysprep.pod:431
3283 "Although virt-sysprep removes some sensitive information from the guest, it "
3284 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3285 "above, and the implementation of the operations in the shell script. You "
3286 "should also examine the guest afterwards."
3290 #: ../clone/virt-sysprep.pod:436
3292 "Sensitive files are simply removed. The data they contained may still exist "
3293 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3294 "L<virt-sparsify(1)> as one way to remove this content. See also the "
3295 "L<scrub(1)> command to get rid of deleted content in directory entries and "
3300 #: ../clone/virt-sysprep.pod:442
3305 #: ../clone/virt-sysprep.pod:444
3306 msgid "I<(This section applies to Linux guests only)>"
3310 #: ../clone/virt-sysprep.pod:446
3312 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3313 "from the host into the guest's random seed file."
3317 #: ../clone/virt-sysprep.pod:449
3319 "If this is just done once and the guest is cloned from the same template, "
3320 "then each guest will start with the same entropy, and things like SSH host "
3321 "keys and TCP sequence numbers may be predictable."
3325 #: ../clone/virt-sysprep.pod:453
3327 "Therefore you should arrange to add more randomness I<after> cloning from a "
3328 "template too, which can be done by just enabling the C<random-seed> "
3333 #: ../clone/virt-sysprep.pod:457
3336 " cp template.img newguest.img\n"
3337 " virt-sysprep --enable=random-seed -a newguest.img\n"
3342 #: ../clone/virt-sysprep.pod:460
3343 msgid "SELINUX RELABELLING"
3347 #: ../clone/virt-sysprep.pod:462
3348 msgid "I<(This section applies to Linux guests using SELinux only)>"
3352 #: ../clone/virt-sysprep.pod:464
3354 "If any new files are created by virt-sysprep, then virt-sysprep touches "
3355 "C</.autorelabel> so that these will be correctly labelled by SELinux the "
3356 "next time the guest is booted. This process interrupts boot and can take "
3361 #: ../clone/virt-sysprep.pod:469
3363 "You can force relabelling for all guests by supplying the "
3364 "I<--selinux-relabel> option."
3368 #: ../clone/virt-sysprep.pod:472
3370 "You can disable relabelling entirely by supplying the "
3371 "I<--no-selinux-relabel> option."
3375 #: ../clone/virt-sysprep.pod:484
3376 msgid "This program returns 0 on success, or 1 if there was an error."
3380 #: ../clone/virt-sysprep.pod:488
3382 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, "
3383 "L<virt-resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, "
3384 "L<qemu-img(1)>, L<scrub(1)>, L<http://libguestfs.org/>, "
3385 "L<http://libvirt.org/>."
3389 #: ../df/virt-df.pod:5
3390 msgid "virt-df - Display free space on virtual filesystems"
3394 #: ../df/virt-df.pod:9
3397 " virt-df [--options]\n"
3402 #: ../df/virt-df.pod:11
3405 " virt-df [--options] -d domname\n"
3410 #: ../df/virt-df.pod:13
3413 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3418 #: ../df/virt-df.pod:17
3421 " virt-df [--options] domname\n"
3426 #: ../df/virt-df.pod:19
3429 " virt-df [--options] disk.img [disk.img ...]\n"
3434 #: ../df/virt-df.pod:23
3436 "C<virt-df> is a command line tool to display free space on virtual machine "
3437 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3438 "allocated to a virtual machine, but can look inside disk images to see how "
3439 "much space is really being used."
3443 #: ../df/virt-df.pod:28
3445 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3446 "to get a list of all active and inactive guests, and performs a C<df>-type "
3447 "operation on each one in turn, printing out the results."
3451 #: ../df/virt-df.pod:32
3453 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
3454 "C<df>-type operation on either the single named libvirt domain, or on the "
3455 "disk image(s) listed on the command line (which must all belong to a single "
3456 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
3457 "single guest>. If you want to run on multiple guests, then you have to "
3458 "invoke C<virt-df> multiple times."
3462 #: ../df/virt-df.pod:39
3464 "Use the I<--csv> option to get a format which can be easily parsed by other "
3465 "programs. Other options are similar to the standard L<df(1)> command."
3469 #: ../df/virt-df.pod:45
3471 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3472 "output human-readable:"
3476 #: ../df/virt-df.pod:48
3479 " # virt-df -d F14x64 -h\n"
3480 " Filesystem Size Used Available Use%\n"
3481 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3482 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3487 #: ../df/virt-df.pod:53
3488 msgid "Show disk usage for a disk image file called C<test.img>:"
3492 #: ../df/virt-df.pod:55
3495 " $ virt-df -a test1.img\n"
3496 " Filesystem 1K-blocks Used Available Use%\n"
3497 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3502 #: ../df/virt-df.pod:112
3505 " virt-df --format=raw -a disk.img\n"
3510 #: ../df/virt-df.pod:116
3513 " virt-df --format=raw -a disk.img --format -a another.img\n"
3518 #: ../df/virt-df.pod:129
3519 msgid "Print sizes in human-readable format."
3523 #: ../df/virt-df.pod:131
3524 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3528 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3533 #: ../df/virt-df.pod:135
3538 #: ../df/virt-df.pod:137
3539 msgid "Print inodes instead of blocks."
3543 #: ../df/virt-df.pod:139
3544 msgid "B<--one-per-guest>"
3548 #: ../df/virt-df.pod:141
3550 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3551 "disks from several guests to a single libguestfs appliance."
3555 #: ../df/virt-df.pod:144
3556 msgid "You might use this option in the following circumstances:"
3560 #: ../df/virt-df.pod:150
3562 "If you think an untrusted guest might actively try to exploit the libguestfs "
3563 "appliance kernel, then this prevents one guest from interfering with the "
3564 "stats printed for another guest."
3568 #: ../df/virt-df.pod:156
3570 "If the kernel has a bug which stops it from accessing a filesystem in one "
3571 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3572 "and report stats for further guests."
3576 #: ../df/virt-df.pod:165
3578 "Print UUIDs instead of names. This is useful for following a guest even "
3579 "when the guest is migrated or renamed, or when two guests happen to have the "
3584 #: ../df/virt-df.pod:169
3586 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3587 "images, we still print the disk image name even when this option is "
3592 #: ../df/virt-df.pod:191
3593 msgid "STATVFS NUMBERS"
3597 #: ../df/virt-df.pod:193
3599 "C<virt-df> (and L<df(1)>) get information by issuing a L<statvfs(3)> system "
3600 "call. You can get the same information directly, either from the host "
3601 "(using libguestfs) or inside the guest:"
3605 #: ../df/virt-df.pod:199
3606 msgid "From the host"
3610 #: ../df/virt-df.pod:201 ../df/virt-df.pod:209
3611 msgid "Run this command:"
3615 #: ../df/virt-df.pod:203
3618 " guestfish --ro -d GuestName -i statvfs /\n"
3623 #: ../df/virt-df.pod:205 ../df/virt-df.pod:213
3624 msgid "(change C</> to see stats for other filesystems)."
3628 #: ../df/virt-df.pod:207
3629 msgid "From inside the guest"
3633 #: ../df/virt-df.pod:211
3636 " python -c 'import os; s = os.statvfs (\"/\"); print s'\n"
3641 #: ../df/virt-df.pod:255
3643 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
3644 "L<http://libguestfs.org/>."
3648 #: ../edit/virt-edit.pod:5
3649 msgid "virt-edit - Edit a file in a virtual machine"
3653 #: ../edit/virt-edit.pod:9
3656 " virt-edit [--options] -d domname file [file ...]\n"
3661 #: ../edit/virt-edit.pod:11
3664 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
3669 #: ../edit/virt-edit.pod:13
3672 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
3677 #: ../edit/virt-edit.pod:17
3680 " virt-edit domname file\n"
3685 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
3688 " virt-edit disk.img [disk.img ...] file\n"
3693 #: ../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:21 ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
3698 #: ../edit/virt-edit.pod:23
3700 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
3701 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
3702 "doing this, but doesn't catch all cases."
3706 #: ../edit/virt-edit.pod:29
3708 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
3709 "exists in the named virtual machine (or disk image)."
3713 #: ../edit/virt-edit.pod:32
3715 "Multiple filenames can be given, in which case they are each edited in "
3716 "turn. Each filename must be a full path, starting at the root directory "
3717 "(starting with '/')."
3721 #: ../edit/virt-edit.pod:36
3722 msgid "If you want to just view a file, use L<virt-cat(1)>."
3726 #: ../edit/virt-edit.pod:38
3728 "For more complex cases you should look at the L<guestfish(1)> tool (see "
3729 "L</USING GUESTFISH> below)."
3733 #: ../edit/virt-edit.pod:41
3735 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
3736 "that and much more."
3740 #: ../edit/virt-edit.pod:46
3741 msgid "Edit the named files interactively:"
3745 #: ../edit/virt-edit.pod:48
3748 " virt-edit -d mydomain /boot/grub/grub.conf\n"
3753 #: ../edit/virt-edit.pod:50
3756 " virt-edit -d mydomain /etc/passwd\n"
3761 #: ../edit/virt-edit.pod:52
3762 msgid "For Windows guests, some Windows paths are understood:"
3766 #: ../edit/virt-edit.pod:54
3769 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
3774 #: ../edit/virt-edit.pod:56
3776 "If Perl is installed, you can also edit files non-interactively (see "
3777 "L</NON-INTERACTIVE EDITING> below). To change the init default level to 5:"
3781 #: ../edit/virt-edit.pod:60
3784 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
3789 #: ../edit/virt-edit.pod:81
3790 msgid "B<-b> extension"
3794 #: ../edit/virt-edit.pod:83
3795 msgid "B<--backup> extension"
3799 #: ../edit/virt-edit.pod:85
3801 "Create a backup of the original file I<in the guest disk image>. The backup "
3802 "has the original filename with C<extension> added."
3806 #: ../edit/virt-edit.pod:88
3808 "Usually the first character of C<extension> would be a dot C<.> so you would "
3813 #: ../edit/virt-edit.pod:91
3816 " virt-edit -b .orig [etc]\n"
3821 #: ../edit/virt-edit.pod:93
3822 msgid "By default, no backup file is made."
3826 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181 ../fuse/guestmount.pod:105 ../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
3831 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183 ../fuse/guestmount.pod:107 ../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
3832 msgid "B<--connect URI>"
3836 #: ../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
3838 "If you specify guest block devices directly, then libvirt is not used at "
3843 #: ../edit/virt-edit.pod:114
3845 "When prompting for keys and passphrases, virt-edit normally turns echoing "
3846 "off so you cannot see what you are typing. If you are not worried about "
3847 "Tempest attacks and there is no one else in the room you can specify this "
3848 "flag to see what you are typing."
3852 #: ../edit/virt-edit.pod:119
3857 #: ../edit/virt-edit.pod:121
3858 msgid "B<--expr> EXPR"
3862 #: ../edit/virt-edit.pod:123
3864 "Instead of launching the external editor, non-interactively apply the Perl "
3865 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
3870 #: ../edit/virt-edit.pod:127
3872 "Be careful to properly quote the expression to prevent it from being altered "
3877 #: ../edit/virt-edit.pod:130
3878 msgid "Note that this option is only available when Perl 5 is installed."
3882 #: ../edit/virt-edit.pod:132
3883 msgid "B<--format> raw|qcow2|..."
3887 #: ../edit/virt-edit.pod:143
3890 " virt-edit --format=raw -a disk.img file\n"
3895 #: ../edit/virt-edit.pod:147
3898 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
3903 #: ../edit/virt-edit.pod:181
3904 msgid "Previous versions of virt-edit allowed you to write either:"
3908 #: ../edit/virt-edit.pod:187
3911 " virt-edit guestname file\n"
3916 #: ../edit/virt-edit.pod:195
3917 msgid "NON-INTERACTIVE EDITING"
3921 #: ../edit/virt-edit.pod:197
3923 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
3924 "administrator can interactively edit the file."
3928 #: ../edit/virt-edit.pod:200
3930 "There are two ways also to use C<virt-edit> from scripts in order to make "
3931 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
3932 "like this, it's less error-prone to write scripts directly using the "
3933 "libguestfs API and Augeas for configuration file editing.)"
3937 #: ../edit/virt-edit.pod:206
3939 "The first method is to temporarily set C<$EDITOR> to any script or program "
3940 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
3941 "update C<tmpfile> in place however it likes."
3945 #: ../edit/virt-edit.pod:210
3947 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
3948 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
3949 "instances of C<foo> with C<bar> in a file:"
3953 #: ../edit/virt-edit.pod:214
3956 " virt-edit -d domname filename -e 's/foo/bar/'\n"
3961 #: ../edit/virt-edit.pod:216
3963 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
3964 "For example to delete root's password you could do:"
3968 #: ../edit/virt-edit.pod:219
3971 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
3976 #: ../edit/virt-edit.pod:221
3978 "What really happens is that the snippet is evaluated as a Perl expression "
3979 "for each line of the file. The line, including the final C<\\n>, is passed "
3980 "in C<$_> and the expression should update C<$_> or leave it unchanged."
3984 #: ../edit/virt-edit.pod:226
3986 "To delete a line, set C<$_> to the empty string. For example, to delete the "
3987 "C<apache> user account from the password file you can do:"
3991 #: ../edit/virt-edit.pod:229
3994 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
3999 #: ../edit/virt-edit.pod:231
4001 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4002 "the end of the file is rather difficult this way since there is no concept "
4003 "of \"last line of the file\" - your expression just doesn't get called "
4004 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4009 #: ../edit/virt-edit.pod:237
4011 "The variable C<$lineno> contains the current line number. As is "
4012 "traditional, the first line in the file is number C<1>."
4016 #: ../edit/virt-edit.pod:240
4018 "The return value from the expression is ignored, but the expression may call "
4019 "C<die> in order to abort the whole program, leaving the original file "
4024 #: ../edit/virt-edit.pod:244
4026 "Remember when matching the end of a line that C<$_> may contain the final "
4027 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4028 "newline then neither of these. Thus to match or substitute some text at the "
4029 "end of a line, use this regular expression:"
4033 #: ../edit/virt-edit.pod:249
4036 " /some text(\\r?\\n)?$/\n"
4041 #: ../edit/virt-edit.pod:251
4043 "Alternately, use the perl C<chomp> function, being careful not to chomp "
4044 "C<$_> itself (since that would remove all newlines from the file):"
4048 #: ../edit/virt-edit.pod:255
4051 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4056 #: ../edit/virt-edit.pod:259
4058 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4059 "paths (eg. C<E:\\foo\\bar.txt>)."
4063 #: ../edit/virt-edit.pod:278
4065 "The path is resolved case insensitively to locate the file that should be "
4070 #: ../edit/virt-edit.pod:299
4072 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4073 "C<virt-edit> doesn't work."
4077 #: ../edit/virt-edit.pod:302
4078 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4082 #: ../edit/virt-edit.pod:304
4085 " guestfish --rw -i -d domname edit /file\n"
4090 #: ../edit/virt-edit.pod:306
4092 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4097 #: ../edit/virt-edit.pod:309
4099 "The command above uses libguestfs's guest inspection feature and so does not "
4100 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4101 "disk images that don't contain guests. To edit a file on a disk image "
4106 #: ../edit/virt-edit.pod:314
4109 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4114 #: ../edit/virt-edit.pod:316
4116 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4117 "the disk image to edit, and C</file> is the full path to the file."
4121 #: ../edit/virt-edit.pod:320
4123 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4124 "C<write> or C<upload> instead:"
4128 #: ../edit/virt-edit.pod:323
4131 " guestfish --rw -i -d domname touch /newfile\n"
4136 #: ../edit/virt-edit.pod:325
4139 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4144 #: ../edit/virt-edit.pod:327
4147 " guestfish --rw -i -d domname upload localfile /newfile\n"
4152 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119 ../rescue/virt-rescue.pod:298 ../sparsify/virt-sparsify.pod:256 ../src/guestfs.pod:3214 ../test-tool/libguestfs-test-tool.pod:95
4153 msgid "ENVIRONMENT VARIABLES"
4157 #: ../edit/virt-edit.pod:333
4162 #: ../edit/virt-edit.pod:335
4164 "If set, this string is used as the editor. It may contain arguments, "
4165 "eg. C<\"emacs -nw\">"
4169 #: ../edit/virt-edit.pod:338
4170 msgid "If not set, C<vi> is used."
4174 #: ../edit/virt-edit.pod:356
4176 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
4177 "L<virt-tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
4178 "L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4182 #: ../erlang/examples/guestfs-erlang.pod:5
4183 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4187 #: ../erlang/examples/guestfs-erlang.pod:9
4190 " {ok, G} = guestfs:create(),\n"
4191 " ok = guestfs:add_drive_opts(G, Disk,\n"
4192 " [{format, \"raw\"}, {readonly, true}]),\n"
4193 " ok = guestfs:launch(G),\n"
4194 " [Device] = guestfs:list_devices(G),\n"
4195 " ok = guestfs:close(G).\n"
4200 #: ../erlang/examples/guestfs-erlang.pod:18
4202 "This manual page documents how to call libguestfs from the Erlang "
4203 "programming language. This page just documents the differences from the C "
4204 "API and gives some examples. If you are not familiar with using libguestfs, "
4205 "you also need to read L<guestfs(3)>."
4209 #: ../erlang/examples/guestfs-erlang.pod:23
4210 msgid "OPENING AND CLOSING THE HANDLE"
4214 #: ../erlang/examples/guestfs-erlang.pod:25
4216 "The Erlang bindings are implemented using an external program called "
4217 "C<erl-guestfs>. This program must be on the current PATH, or else you "
4218 "should specify the full path to the program:"
4222 #: ../erlang/examples/guestfs-erlang.pod:29
4225 " {ok, G} = guestfs:create().\n"
4230 #: ../erlang/examples/guestfs-erlang.pod:31
4233 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4238 #: ../erlang/examples/guestfs-erlang.pod:33
4239 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4243 #: ../erlang/examples/guestfs-erlang.pod:36
4244 msgid "To close the handle:"
4248 #: ../erlang/examples/guestfs-erlang.pod:38
4251 " ok = guestfs:close(G).\n"
4256 #: ../erlang/examples/guestfs-erlang.pod:40
4257 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4261 #: ../erlang/examples/guestfs-erlang.pod:42
4263 "For functions that take optional arguments, the first arguments are the "
4264 "non-optional ones. The last argument is a list of tuples supplying the "
4265 "remaining optional arguments."
4269 #: ../erlang/examples/guestfs-erlang.pod:46
4272 " ok = guestfs:add_drive_opts(G, Disk,\n"
4273 " [{format, \"raw\"}, {readonly, true}]).\n"
4278 #: ../erlang/examples/guestfs-erlang.pod:49
4279 msgid "If the last argument would be an empty list, you can also omit it:"
4283 #: ../erlang/examples/guestfs-erlang.pod:51
4286 " ok = guestfs:add_drive_opts(G, Disk).\n"
4291 #: ../erlang/examples/guestfs-erlang.pod:53
4292 msgid "RETURN VALUES AND ERRORS"
4296 #: ../erlang/examples/guestfs-erlang.pod:55
4298 "On success, most functions return a C<Result> term (which could be a list, "
4299 "string, tuple etc.). If there is nothing for the function to return, then "
4300 "the atom C<ok> is returned."
4304 #: ../erlang/examples/guestfs-erlang.pod:59
4305 msgid "On error, you would see one of the following tuples:"
4309 #: ../erlang/examples/guestfs-erlang.pod:63
4310 msgid "C<{error, Msg, Errno}>"
4314 #: ../erlang/examples/guestfs-erlang.pod:65
4315 msgid "This indicates an ordinary error from the function."
4319 #: ../erlang/examples/guestfs-erlang.pod:67
4321 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4326 #: ../erlang/examples/guestfs-erlang.pod:70
4327 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4331 #: ../erlang/examples/guestfs-erlang.pod:72
4332 msgid "C<{unknown, Function}>"
4336 #: ../erlang/examples/guestfs-erlang.pod:74
4338 "This indicates that the function you called is not known. Generally this "
4339 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4340 "which you should not do."
4344 #: ../erlang/examples/guestfs-erlang.pod:78
4345 msgid "C<Function> is the name of the unknown function."
4349 #: ../erlang/examples/guestfs-erlang.pod:80
4350 msgid "C<{unknownarg, Arg}>"
4354 #: ../erlang/examples/guestfs-erlang.pod:82
4356 "This indicates that you called a function with optional arguments, with an "
4357 "unknown argument name."
4361 #: ../erlang/examples/guestfs-erlang.pod:85
4362 msgid "C<Arg> is the name of the unknown argument."
4366 #: ../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
4367 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4371 #: ../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
4376 #: ../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
4377 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4381 #: ../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
4386 #: ../erlang/examples/guestfs-erlang.pod:99
4388 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, "
4389 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
4390 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://www.erlang.org/>. "
4391 "L<http://libguestfs.org/>."
4395 #: ../erlang/examples/guestfs-erlang.pod:110 ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397 ../examples/guestfs-testing.pod:298 ../fish/guestfish.pod:1296 ../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:328 ../inspector/virt-inspector.pod:404 ../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:3354 ../test-tool/libguestfs-test-tool.pod:106
4400 #: ../erlang/examples/guestfs-erlang.pod:112 ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399 ../examples/guestfs-testing.pod:300 ../fish/guestfish.pod:1298 ../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:330 ../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:3356 ../test-tool/libguestfs-test-tool.pod:108
4401 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4405 #: ../erlang/examples/guestfs-erlang.pod:116 ../examples/guestfs-testing.pod:304 ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4406 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4410 #: ../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
4412 "The examples in this manual page may be freely copied, modified and "
4413 "distributed without any restrictions."
4417 #: ../erlang/examples/guestfs-erlang.pod:121 ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408 ../examples/guestfs-testing.pod:306 ../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:3363
4419 "This library is free software; you can redistribute it and/or modify it "
4420 "under the terms of the GNU Lesser General Public License as published by the "
4421 "Free Software Foundation; either version 2 of the License, or (at your "
4422 "option) any later version."
4426 #: ../erlang/examples/guestfs-erlang.pod:126 ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413 ../examples/guestfs-testing.pod:311 ../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:3368
4428 "This library is distributed in the hope that it will be useful, but WITHOUT "
4429 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4430 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4435 #: ../erlang/examples/guestfs-erlang.pod:131 ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418 ../examples/guestfs-testing.pod:316 ../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:3373
4437 "You should have received a copy of the GNU Lesser General Public License "
4438 "along with this library; if not, write to the Free Software Foundation, "
4439 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4443 #: ../examples/guestfs-examples.pod:5
4444 msgid "guestfs-examples - Examples of using libguestfs from C"
4448 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4451 " #include <guestfs.h>\n"
4456 #: ../examples/guestfs-examples.pod:11
4459 " guestfs_h *g = guestfs_create ();\n"
4460 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4461 " guestfs_launch (g);\n"
4466 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4469 " cc prog.c -o prog -lguestfs\n"
4471 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4476 #: ../examples/guestfs-examples.pod:21
4478 "This manual page contains examples of calling libguestfs from the C "
4479 "programming language. If you are not familiar with using libguestfs, you "
4480 "also need to read L<guestfs(3)>."
4484 #: ../examples/guestfs-examples.pod:35
4486 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
4487 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
4488 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4492 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97 ../python/examples/guestfs-python.pod:60 ../ruby/examples/guestfs-ruby.pod:54
4493 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4497 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4502 #: ../examples/guestfs-recipes.pod:5
4504 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4505 "here. The only way which works for both sorts of output is to just write "
4506 "the URL directly. Do NOT use L<...> for URLs."
4510 #: ../examples/guestfs-recipes.pod:9
4512 "We break with tradition here and don't use ALL CAPS for the section "
4513 "headings, as this makes them much easier to read."
4517 #: ../examples/guestfs-recipes.pod:16
4518 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4522 #: ../examples/guestfs-recipes.pod:20
4524 "This page contains recipes for and links to things you can do using "
4525 "libguestfs, L<guestfish(1)> and the virt tools."
4529 #: ../examples/guestfs-recipes.pod:23
4530 msgid "Audit a virtual machine for setuid files"
4534 #: ../examples/guestfs-recipes.pod:25
4536 "The link below contains a small program which can be used to audit a Linux "
4537 "virtual machine to see what setuid and setgid files it contains."
4541 #: ../examples/guestfs-recipes.pod:28
4542 msgid "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-files/#content"
4546 #: ../examples/guestfs-recipes.pod:30
4547 msgid "Change the background image in a Windows XP VM"
4551 #: ../examples/guestfs-recipes.pod:32
4553 "The links below explain how to use L<guestfish(1)> to change the background "
4554 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
4555 "be substantially different for each version of Windows."
4559 #: ../examples/guestfs-recipes.pod:37
4561 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html "
4562 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4566 #: ../examples/guestfs-recipes.pod:40
4567 msgid "Cloning a virtual machine (Linux)"
4571 #: ../examples/guestfs-recipes.pod:42
4573 "The guestfish technique described in the link below works well for most "
4574 "Linux VMs. Depending on the Linux distro you may need to change the paths "
4579 #: ../examples/guestfs-recipes.pod:46
4580 msgid "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/#content"
4584 #: ../examples/guestfs-recipes.pod:48
4586 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
4591 #: ../examples/guestfs-recipes.pod:51
4592 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4596 #: ../examples/guestfs-recipes.pod:53
4597 msgid "Cloning a virtual machine (Windows)"
4601 #: ../examples/guestfs-recipes.pod:55
4603 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
4604 "straightforward. Currently there is code in the Aeolus Oz project which "
4605 "does this (using libguestfs). As part of our review of the virt-clone tool, "
4606 "we may add sysprepping ability."
4610 #: ../examples/guestfs-recipes.pod:60
4612 "https://github.com/clalancette/oz "
4613 "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4617 #: ../examples/guestfs-recipes.pod:63
4618 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
4622 #: ../examples/guestfs-recipes.pod:65
4623 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
4627 #: ../examples/guestfs-recipes.pod:67
4630 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
4635 #: ../examples/guestfs-recipes.pod:69
4636 msgid "To export just a subdirectory, eg. C</files>, do:"
4640 #: ../examples/guestfs-recipes.pod:71
4643 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
4648 #: ../examples/guestfs-recipes.pod:73
4649 msgid "Create empty disk images"
4653 #: ../examples/guestfs-recipes.pod:75
4655 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
4656 "The useful guide below explains the options available."
4660 #: ../examples/guestfs-recipes.pod:78
4661 msgid "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/#content"
4665 #: ../examples/guestfs-recipes.pod:80
4666 msgid "Dump raw filesystem content from inside a disk image or VM"
4670 #: ../examples/guestfs-recipes.pod:82
4672 "You can use the L<guestfish(1)> C<download> command to extract the raw "
4673 "filesystem content from any filesystem in a disk image or a VM (even one "
4674 "which is encrypted or buried inside an LV):"
4678 #: ../examples/guestfs-recipes.pod:86
4681 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
4686 #: ../examples/guestfs-recipes.pod:88
4689 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
4694 #: ../examples/guestfs-recipes.pod:90
4695 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
4699 #: ../examples/guestfs-recipes.pod:92
4700 msgid "Edit grub configuration in a VM"
4704 #: ../examples/guestfs-recipes.pod:94
4705 msgid "You can use this to:"
4709 #: ../examples/guestfs-recipes.pod:100
4710 msgid "Fix a virtual machine that does not boot."
4714 #: ../examples/guestfs-recipes.pod:104
4715 msgid "Change which kernel is used to boot the VM."
4719 #: ../examples/guestfs-recipes.pod:108
4720 msgid "Change kernel command line options."
4724 #: ../examples/guestfs-recipes.pod:112
4725 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
4729 #: ../examples/guestfs-recipes.pod:114
4732 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
4737 #: ../examples/guestfs-recipes.pod:116
4739 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
4744 #: ../examples/guestfs-recipes.pod:119
4747 " virt-rescue -d BrokenGuest\n"
4752 #: ../examples/guestfs-recipes.pod:121
4753 msgid "Export any directory from a VM"
4757 #: ../examples/guestfs-recipes.pod:123
4758 msgid "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
4762 #: ../examples/guestfs-recipes.pod:126 ../examples/guestfs-testing.pod:93
4765 " virt-copy-out -d Guest /home .\n"
4770 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1450 ../fish/guestfish-actions.pod:1715 ../fish/guestfish-actions.pod:2132 ../src/guestfs-actions.pod:18 ../src/guestfs-actions.pod:2334 ../src/guestfs-actions.pod:2758 ../src/guestfs-actions.pod:3317 ../src/guestfs.pod:1685 ../tools/virt-win-reg.pl:717
4775 #: ../examples/guestfs-recipes.pod:134
4777 "The final dot of the command is not a printing error. It means we want to "
4778 "copy out to the current directory."
4782 #: ../examples/guestfs-recipes.pod:139
4783 msgid "This creates a directory called C<home> under the current directory."
4787 #: ../examples/guestfs-recipes.pod:143
4789 "If the guest is a Windows guest then you can use drive letters and "
4790 "backslashes, but you must prefix the path with C<win:> and quote it to "
4791 "protect it from the shell, like this:"
4795 #: ../examples/guestfs-recipes.pod:147
4798 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
4803 #: ../examples/guestfs-recipes.pod:149
4804 msgid "To get the output as a compressed tarball, do:"
4808 #: ../examples/guestfs-recipes.pod:151
4811 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
4816 #: ../examples/guestfs-recipes.pod:153
4818 "Although it sounds tempting, this is usually not a reliable way to get a "
4819 "backup from a running guest. See the entry in the FAQ: "
4820 "http://libguestfs.org/FAQ.html#backup"
4824 #: ../examples/guestfs-recipes.pod:157
4825 msgid "Find out which user is using the most space"
4829 #: ../examples/guestfs-recipes.pod:159
4831 "This simple script examines a Linux guest to find out which user is using "
4832 "the most space in their home directory:"
4836 #: ../examples/guestfs-recipes.pod:162
4844 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
4852 #: ../examples/guestfs-recipes.pod:166
4861 #: ../examples/guestfs-recipes.pod:169
4864 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
4869 #: ../examples/guestfs-recipes.pod:171
4872 " for d in $(guestfish --remote ls \"$dir\"); do\n"
4873 " echo -n \"$dir/$d\"\n"
4875 " guestfish --remote du \"$dir/$d\";\n"
4876 " done | sort -nr -k 2\n"
4881 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
4884 " guestfish --remote exit\n"
4889 #: ../examples/guestfs-recipes.pod:179
4890 msgid "Get DHCP address from a VM"
4894 #: ../examples/guestfs-recipes.pod:181
4896 "The link below explains the many different possible techniques for getting "
4897 "the last assigned DHCP address of a virtual machine."
4901 #: ../examples/guestfs-recipes.pod:184
4902 msgid "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-a-virtual-machine-disk-image/#content"
4906 #: ../examples/guestfs-recipes.pod:186
4908 "In the libguestfs source examples directory you will find the latest version "
4909 "of the C<virt-dhcp-address.c> program."
4913 #: ../examples/guestfs-recipes.pod:189
4914 msgid "Get the operating system product name string"
4918 #: ../examples/guestfs-recipes.pod:191
4919 msgid "Save the following script into a file called C<product-name.sh>:"
4923 #: ../examples/guestfs-recipes.pod:193
4928 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
4929 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
4930 " guestfish --remote inspect-get-product-name \"$root\"\n"
4931 " guestfish --remote exit\n"
4936 #: ../examples/guestfs-recipes.pod:200
4937 msgid "Make the script executable and run it on a named guest:"
4941 #: ../examples/guestfs-recipes.pod:202
4944 " # product-name.sh RHEL60x64\n"
4945 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
4950 #: ../examples/guestfs-recipes.pod:205
4952 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
4953 "C<xpath> command line tool or from your favourite programming language:"
4957 #: ../examples/guestfs-recipes.pod:209
4960 " # virt-inspector RHEL60x64 > xml\n"
4961 " # xpath '//product_name' < xml\n"
4964 " <product_name>Red Hat Enterprise Linux Server release 6.0 "
4965 "(Santiago)</product_name>\n"
4970 #: ../examples/guestfs-recipes.pod:215
4971 msgid "Get the default boot kernel for a Linux VM"
4975 #: ../examples/guestfs-recipes.pod:217
4977 "The link below contains a program to print the default boot kernel for a "
4982 #: ../examples/guestfs-recipes.pod:220
4983 msgid "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-kernel-for-a-vm/#content"
4987 #: ../examples/guestfs-recipes.pod:222
4989 "It uses Augeas, and the technique is generally applicable for many different "
4994 #: ../examples/guestfs-recipes.pod:229
4995 msgid "listing the user accounts in the guest"
4999 #: ../examples/guestfs-recipes.pod:233
5000 msgid "what repositories is it configured to use"
5004 #: ../examples/guestfs-recipes.pod:237
5005 msgid "what NTP servers does it connect to"
5009 #: ../examples/guestfs-recipes.pod:241
5010 msgid "what were the boot messages last time it booted"
5014 #: ../examples/guestfs-recipes.pod:245
5015 msgid "listing who was logged in recently"
5019 #: ../examples/guestfs-recipes.pod:249
5020 msgid "http://augeas.net/"
5024 #: ../examples/guestfs-recipes.pod:251
5025 msgid "Install RPMs in a guest"
5029 #: ../examples/guestfs-recipes.pod:253
5031 "The link below contains a method to install RPMs in a guest. In fact the "
5032 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
5033 "installs them next time the guest is booted. You could use this technique "
5034 "to install vital security updates in an offline guest."
5038 #: ../examples/guestfs-recipes.pod:259
5039 msgid "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
5043 #: ../examples/guestfs-recipes.pod:261
5044 msgid "List applications installed in a VM"
5048 #: ../examples/guestfs-recipes.pod:263
5049 msgid "Save the following to a file C<list-apps.sh>:"
5053 #: ../examples/guestfs-recipes.pod:265
5058 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5059 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5060 " guestfish --remote inspect-list-applications \"$root\"\n"
5061 " guestfish --remote exit\n"
5066 #: ../examples/guestfs-recipes.pod:272
5068 "Make the file executable and then you can run it on any named virtual "
5073 #: ../examples/guestfs-recipes.pod:275
5076 " # list-apps.sh WinGuest\n"
5078 " app_name: Mozilla Firefox (3.6.12)\n"
5079 " app_display_name: Mozilla Firefox (3.6.12)\n"
5081 " app_version: 3.6.12 (en-GB)\n"
5083 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5084 " app_trans_path:\n"
5085 " app_publisher: Mozilla\n"
5086 " app_url: http://www.mozilla.com/en-GB/\n"
5087 " app_source_package:\n"
5089 " app_description: Mozilla Firefox\n"
5092 " app_name: VLC media player\n"
5093 " app_display_name: VLC media player 1.1.5\n"
5095 " app_version: 1.1.5\n"
5097 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5098 " app_trans_path:\n"
5099 " app_publisher: VideoLAN\n"
5100 " app_url: http://www.videolan.org/\n"
5101 " app_source_package:\n"
5103 " app_description:\n"
5109 #: ../examples/guestfs-recipes.pod:305
5111 "If you want to run the script on disk images (instead of libvirt virtual "
5112 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also "
5113 "L<virt-inspector(1)>."
5117 #: ../examples/guestfs-recipes.pod:309
5118 msgid "List files and directories in a VM"
5122 #: ../examples/guestfs-recipes.pod:311
5123 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5127 #: ../examples/guestfs-recipes.pod:313
5130 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5135 #: ../examples/guestfs-recipes.pod:315
5136 msgid "List services in a Windows VM"
5140 #: ../examples/guestfs-recipes.pod:317
5142 "The link below contains a script that can be used to list out the services "
5143 "from a Windows VM, and whether those services run at boot time or are loaded "
5148 #: ../examples/guestfs-recipes.pod:321
5149 msgid "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/#content"
5153 #: ../examples/guestfs-recipes.pod:323
5154 msgid "Make a disk image sparse"
5158 #: ../examples/guestfs-recipes.pod:325
5160 "The link below contains some guides for making a disk image sparse (or "
5161 "reintroducing sparseness)."
5165 #: ../examples/guestfs-recipes.pod:328
5166 msgid "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
5170 #: ../examples/guestfs-recipes.pod:330
5171 msgid "Monitor disk usage over time"
5175 #: ../examples/guestfs-recipes.pod:332
5177 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5178 "The link below contains a guide."
5182 #: ../examples/guestfs-recipes.pod:335
5183 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5187 #: ../examples/guestfs-recipes.pod:337
5188 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5192 #: ../examples/guestfs-recipes.pod:339
5194 "L<guestfish(1)> plus the tools described in the link below can be used to "
5195 "read out the Windows Event Log from any virtual machine running Windows "
5196 "Vista or a later version."
5200 #: ../examples/guestfs-recipes.pod:343
5201 msgid "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-guestfish/#content"
5205 #: ../examples/guestfs-recipes.pod:345
5206 msgid "Remove root password (Linux)"
5210 #: ../examples/guestfs-recipes.pod:347
5212 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5213 "files. One use is to remove the root password from a Linux guest:"
5217 #: ../examples/guestfs-recipes.pod:350
5220 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5225 #: ../examples/guestfs-recipes.pod:352
5226 msgid "Remove Administrator password (Windows)"
5230 #: ../examples/guestfs-recipes.pod:354
5232 "The link below contains one technique for removing the Administrator "
5233 "password from a Windows VM, or to be more precise, it gives you a command "
5234 "prompt the next time you log in which you can use to bypass any security:"
5238 #: ../examples/guestfs-recipes.pod:359
5239 msgid "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-administrator-password-with-guestfish/"
5243 #: ../examples/guestfs-recipes.pod:361
5244 msgid "Unpack a live CD"
5248 #: ../examples/guestfs-recipes.pod:363
5250 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5251 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5252 "layers, as outlined in the guide below."
5256 #: ../examples/guestfs-recipes.pod:367
5257 msgid "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-cd/#content"
5261 #: ../examples/guestfs-recipes.pod:369
5262 msgid "Uploading and downloading files"
5266 #: ../examples/guestfs-recipes.pod:371
5268 "The link below contains general tips on uploading (copying in) and "
5269 "downloading (copying out) files from VMs."
5273 #: ../examples/guestfs-recipes.pod:374
5274 msgid "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5278 #: ../examples/guestfs-recipes.pod:376
5279 msgid "Use libguestfs tools on VMware ESX guests"
5283 #: ../examples/guestfs-recipes.pod:378
5285 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5286 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5290 #: ../examples/guestfs-recipes.pod:382
5291 msgid "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-guests/#content"
5295 #: ../examples/guestfs-recipes.pod:386
5297 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, "
5298 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
5299 "L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
5300 "L<http://libguestfs.org/>."
5304 #: ../examples/guestfs-recipes.pod:403
5305 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5309 #: ../examples/guestfs-testing.pod:5
5310 msgid "guestfs-testing - manual testing of libguestfs, you can help!"
5314 #: ../examples/guestfs-testing.pod:9
5316 "This page has manual tests you can try on libguestfs. Everyone has a "
5317 "slightly different combination of platform, hardware and guests, so this "
5318 "testing is very valuable. Thanks for helping out!"
5322 #: ../examples/guestfs-testing.pod:13
5323 msgid "These tests require libguestfs E<ge> 1.14."
5327 #: ../examples/guestfs-testing.pod:15
5329 "Tests marked with a B<*> (asterisk) can B<destroy data> if you're not "
5330 "careful. The others are safe and won't modify anything."
5334 #: ../examples/guestfs-testing.pod:18
5335 msgid "You can report bugs you find through this link:"
5339 #: ../examples/guestfs-testing.pod:20
5340 msgid "https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools"
5344 #: ../examples/guestfs-testing.pod:22
5346 "or post on the mailing list (registration is B<not> required, but if you're "
5347 "not registered then you'll have to wait for a moderator to manually approve "
5352 #: ../examples/guestfs-testing.pod:26
5353 msgid "https://www.redhat.com/mailman/listinfo/libguestfs"
5357 #: ../examples/guestfs-testing.pod:28
5362 #: ../examples/guestfs-testing.pod:30
5363 msgid "Check KVM acceleration is being used."
5367 #: ../examples/guestfs-testing.pod:32
5369 "If your host has hardware virt acceleration, then with a hot cache "
5370 "libguestfs should be able to start up in a few seconds. Run the following "
5371 "command a few times:"
5375 #: ../examples/guestfs-testing.pod:36
5378 " time guestfish -a /dev/null run\n"
5383 #: ../examples/guestfs-testing.pod:38
5385 "After a few runs, the time should settle down to a few seconds (under 5 "
5386 "seconds on fast 64 bit hardware)."
5390 #: ../examples/guestfs-testing.pod:41
5391 msgid "How to check for hardware virt:"
5395 #: ../examples/guestfs-testing.pod:43
5396 msgid "http://virt-tools.org/learning/check-hardware-virt/"
5400 #: ../examples/guestfs-testing.pod:45
5401 msgid "If the command above does not work at all, use L<libguestfs-test-tool(1)>."
5405 #: ../examples/guestfs-testing.pod:48
5406 msgid "Run virt-alignment-scan on all your guests."
5410 #: ../examples/guestfs-testing.pod:50
5411 msgid "Run L<virt-alignment-scan(1)> on guests or disk images:"
5415 #: ../examples/guestfs-testing.pod:52
5418 " virt-alignment-scan -a /path/to/disk.img\n"
5423 #: ../examples/guestfs-testing.pod:54 ../examples/guestfs-testing.pod:161 ../examples/guestfs-testing.pod:174 ../examples/guestfs-testing.pod:234 ../src/guestfs.pod:2792
5428 #: ../examples/guestfs-testing.pod:56
5431 " virt-alignment-scan -d Guest\n"
5436 #: ../examples/guestfs-testing.pod:58
5437 msgid "Does the alignment report match how the guest partitions are aligned?"
5441 #: ../examples/guestfs-testing.pod:60
5442 msgid "Run virt-cat on some files in guests."
5446 #: ../examples/guestfs-testing.pod:62
5447 msgid "L<virt-cat(1)> can display files from guests. For a Linux guest, try:"
5451 #: ../examples/guestfs-testing.pod:64
5454 " virt-cat LinuxGuest /etc/passwd\n"
5459 #: ../examples/guestfs-testing.pod:66
5460 msgid "A recent feature is support for Windows paths, for example:"
5464 #: ../examples/guestfs-testing.pod:68
5467 " virt-cat WindowsGuest 'c:\\windows\\win.ini'\n"
5472 #: ../examples/guestfs-testing.pod:70
5474 "An even better test is if you have a Windows guest with multiple drives. Do "
5475 "C<D:>, C<E:> etc paths work correctly?"
5479 #: ../examples/guestfs-testing.pod:73
5480 msgid "B<*> Copy some files into a B<shut off> guest."
5484 #: ../examples/guestfs-testing.pod:75
5486 "L<virt-copy-in(1)> can recursively copy files and directories into a guest "
5491 #: ../examples/guestfs-testing.pod:78
5494 " virt-copy-in -d Guest /etc /tmp\n"
5499 #: ../examples/guestfs-testing.pod:80
5501 "This should copy local directory C</etc> to C</tmp/etc> in the guest "
5502 "(recursively). If you boot the guest, can you see all of the copied files "
5507 #: ../examples/guestfs-testing.pod:84
5508 msgid "Shut the guest down and try copying multiple files and directories:"
5512 #: ../examples/guestfs-testing.pod:86
5515 " virt-copy-in -d Guest /home /etc/issue /tmp\n"
5520 #: ../examples/guestfs-testing.pod:88
5521 msgid "Copy some files out of a guest."
5525 #: ../examples/guestfs-testing.pod:90
5527 "L<virt-copy-out(1)> can recursively copy files and directories out of a "
5528 "guest or disk image."
5532 #: ../examples/guestfs-testing.pod:95
5533 msgid "Note the final space and period in the command is not a typo."
5537 #: ../examples/guestfs-testing.pod:97
5538 msgid "This should copy C</home> from the guest into the current directory."
5542 #: ../examples/guestfs-testing.pod:99
5543 msgid "Run virt-df."
5547 #: ../examples/guestfs-testing.pod:101
5548 msgid "L<virt-df(1)> lists disk space. Run:"
5552 #: ../examples/guestfs-testing.pod:103
5560 #: ../examples/guestfs-testing.pod:105
5562 "You can try comparing this to the results from L<df(1)> inside the guest, "
5563 "but there are some provisos:"
5567 #: ../examples/guestfs-testing.pod:112
5568 msgid "The guest must be idle."
5572 #: ../examples/guestfs-testing.pod:116
5573 msgid "The guest disks must be synched using L<sync(1)>."
5577 #: ../examples/guestfs-testing.pod:120
5579 "Any action such as booting the guest will write log files causing the "
5580 "numbers to change."
5584 #: ../examples/guestfs-testing.pod:125
5586 "We don't guarantee that the numbers will be identical even under these "
5587 "circumstances. They should be similar. It would indicate a bug if you saw "
5588 "greatly differing numbers."
5592 #: ../examples/guestfs-testing.pod:129
5593 msgid "Try importing virt-df CSV output into a spreadsheet or database."
5597 #: ../examples/guestfs-testing.pod:131 ../src/guestfs.pod:3088
5602 #: ../examples/guestfs-testing.pod:133
5605 " virt-df --csv > /tmp/report.csv\n"
5610 #: ../examples/guestfs-testing.pod:135
5612 "Now try to load this into your favorite spreadsheet or database. Are the "
5613 "results reproduced faithfully in the spreadsheet/database?"
5617 #: ../examples/guestfs-testing.pod:138
5619 "http://www.postgresql.org/docs/8.1/static/sql-copy.html "
5620 "http://dev.mysql.com/doc/refman/5.1/en/load-data.html"
5624 #: ../examples/guestfs-testing.pod:141
5625 msgid "B<*> Edit a file in a B<shut off> guest."
5629 #: ../examples/guestfs-testing.pod:143
5631 "L<virt-edit(1)> can edit files in guests. Try this command on a RHEL or "
5636 #: ../examples/guestfs-testing.pod:146
5639 " virt-edit LinuxGuest /etc/sysconfig/network\n"
5644 #: ../examples/guestfs-testing.pod:148
5645 msgid "On other Linux guests try editing other files such as:"
5649 #: ../examples/guestfs-testing.pod:150
5652 " virt-edit LinuxGuest /etc/motd\n"
5657 #: ../examples/guestfs-testing.pod:152
5658 msgid "Are the changes seen inside the guest when it is booted?"
5662 #: ../examples/guestfs-testing.pod:154
5663 msgid "Display the filesystems / partitions / LVs in a guest."
5667 #: ../examples/guestfs-testing.pod:156
5669 "L<virt-filesystems(1)> can be used to display filesystems in a guest. Try "
5670 "this command on any disk image or guest:"
5674 #: ../examples/guestfs-testing.pod:159
5677 " virt-filesystems -a /path/to/disk.img --all --long -h\n"
5682 #: ../examples/guestfs-testing.pod:163
5685 " virt-filesystems -d Guest --all --long -h\n"
5690 #: ../examples/guestfs-testing.pod:165
5691 msgid "Do the results match what is seen in the guest?"
5695 #: ../examples/guestfs-testing.pod:167
5696 msgid "Run virt-inspector on all your guests."
5700 #: ../examples/guestfs-testing.pod:169
5702 "Use L<virt-inspector(1)> to get a report on all of your guests or disk "
5707 #: ../examples/guestfs-testing.pod:172
5710 " virt-inspector -a /path/to/disk.img | less\n"
5715 #: ../examples/guestfs-testing.pod:176
5718 " virt-inspector -d Guest | less\n"
5723 #: ../examples/guestfs-testing.pod:178
5724 msgid "Do the results match what is actually in the guest?"
5728 #: ../examples/guestfs-testing.pod:180
5729 msgid "Try the auditing features of virt-ls on all your guests."
5733 #: ../examples/guestfs-testing.pod:184
5736 " virt-ls -lR -d Guest / | grep '^- [42]'\n"
5741 #: ../examples/guestfs-testing.pod:188
5744 " virt-ls -lR -d Guest / | grep '^d ...7'\n"
5749 #: ../examples/guestfs-testing.pod:192
5752 " virt-ls -lR -d Guest / | grep '^s'\n"
5757 #: ../examples/guestfs-testing.pod:196
5760 " virt-ls -lR -d Guest / | grep -i '^-.*\\.png$'\n"
5765 #: ../examples/guestfs-testing.pod:198
5766 msgid "Display files larger than 10MB in home directories:"
5770 #: ../examples/guestfs-testing.pod:200
5773 " virt-ls -lR -d Guest /home | awk '$3 > 10*1024*1024'\n"
5778 #: ../examples/guestfs-testing.pod:204
5781 " virt-ls -lR -d Guest --time-days / | awk '$6 <= 7'\n"
5786 #: ../examples/guestfs-testing.pod:208
5789 " virt-ls -lR -d Guest --time-days / | grep '^-' | awk '$6 < 1'\n"
5794 #: ../examples/guestfs-testing.pod:210
5795 msgid "Do the results match what is in the guest?"
5799 #: ../examples/guestfs-testing.pod:212
5800 msgid "Create a disk image from a tarball."
5804 #: ../examples/guestfs-testing.pod:214
5806 "Use L<virt-make-fs(1)> to create a disk image from any tarball that you "
5811 #: ../examples/guestfs-testing.pod:217
5814 " virt-make-fs --partition=mbr --type=vfat /any/tarball.tar.gz output.img\n"
5819 #: ../examples/guestfs-testing.pod:219
5821 "Add 'output.img' as a raw disk to an existing guest. Check the guest can "
5822 "see the files. This test is particularly useful if you try it with a "
5827 #: ../examples/guestfs-testing.pod:223
5828 msgid "Try other partitioning schemes, eg. I<--partition=gpt>."
5832 #: ../examples/guestfs-testing.pod:225
5833 msgid "Try other filesystem formats, eg. I<--type=ntfs>, I<--type=ext2>."
5837 #: ../examples/guestfs-testing.pod:227
5838 msgid "B<*> Run virt-rescue on a B<shut off> disk image or guest."
5842 #: ../examples/guestfs-testing.pod:229
5844 "Use L<virt-rescue(1)> to examine, rescue or repair a B<shut off> guest or "
5849 #: ../examples/guestfs-testing.pod:232
5852 " virt-rescue -a /path/to/disk.img\n"
5857 #: ../examples/guestfs-testing.pod:236
5860 " virt-rescue -d Guest\n"
5865 #: ../examples/guestfs-testing.pod:238
5866 msgid "Can you use ordinary shell commands to examine the guest?"
5870 #: ../examples/guestfs-testing.pod:240
5871 msgid "B<*> Resize your guests."
5875 #: ../examples/guestfs-testing.pod:242
5877 "Use L<virt-resize(1)> to give a guest some more disk space. For example, if "
5878 "you have a disk image that is smaller than 30G, increase it to 30G by doing:"
5882 #: ../examples/guestfs-testing.pod:246
5885 " truncate -s 30G newdisk.img\n"
5886 " virt-filesystems -a /path/to/olddisk.img --all --long -h\n"
5887 " virt-resize /path/to/olddisk.img newdisk.img --expand /dev/sda1\n"
5888 " qemu-kvm -m 1024 -hda newdisk.img\n"
5893 #: ../examples/guestfs-testing.pod:251
5894 msgid "Does the guest still boot? Try expanding other partitions."
5898 #: ../examples/guestfs-testing.pod:253
5899 msgid "B<*> Sparsify a guest disk."
5903 #: ../examples/guestfs-testing.pod:255
5904 msgid "Using L<virt-sparsify(1)>, make a disk image more sparse:"
5908 #: ../examples/guestfs-testing.pod:257
5911 " virt-sparsify /path/to/olddisk.img newdisk.img\n"
5916 #: ../examples/guestfs-testing.pod:259
5918 "Is C<newdisk.img> still bootable after sparsifying? Is the resulting disk "
5919 "image smaller (use C<du> to check)?"
5923 #: ../examples/guestfs-testing.pod:262
5924 msgid "B<*> \"sysprep\" a B<shut off> Linux guest."
5928 #: ../examples/guestfs-testing.pod:264
5930 "Note that this really will mess up an existing guest, so it's better to "
5931 "clone the guest before trying this."
5935 #: ../examples/guestfs-testing.pod:267
5938 " virt-sysprep --hostname newhost.example.com -a /path/to/disk.img\n"
5943 #: ../examples/guestfs-testing.pod:269
5945 "Was the sysprep successful? After booting, what changes were made and were "
5950 #: ../examples/guestfs-testing.pod:272
5951 msgid "Dump the Windows Registry from your Windows guests."
5955 #: ../examples/guestfs-testing.pod:274
5957 "Use L<virt-win-reg(1)> to dump out the Windows Registry from any Windows "
5958 "guests that you have."
5962 #: ../examples/guestfs-testing.pod:277
5965 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\Software' |\n"
5971 #: ../examples/guestfs-testing.pod:280
5974 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\System' |\n"
5980 #: ../examples/guestfs-testing.pod:283
5981 msgid "Does the output match running C<regedit> inside the guest?"
5985 #: ../examples/guestfs-testing.pod:285
5987 "A recent feature is the ability to dump user registries, so try this, "
5988 "replacing I<username> with the name of a local user in the guest:"
5992 #: ../examples/guestfs-testing.pod:288
5995 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKEY_USERS\\username' "
6002 #: ../examples/guestfs-testing.pod:293
6004 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, "
6005 "L<http://libguestfs.org/>."
6009 #: ../fish/guestfish-actions.pod:1
6014 #: ../fish/guestfish-actions.pod:3
6017 " add-cdrom filename\n"
6022 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
6023 msgid "This function adds a virtual CD-ROM disk image to the guest."
6027 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
6028 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
6032 #: ../fish/guestfish-actions.pod:15
6034 "This call checks for the existence of C<filename>. This stops you from "
6035 "specifying other types of drive which are supported by qemu such as C<nbd:> "
6036 "and C<http:> URLs. To specify those, use the general L</config> call "
6041 #: ../fish/guestfish-actions.pod:22
6043 "If you just want to add an ISO file (often you use this as an efficient way "
6044 "to transfer large files into the guest), then you should probably use "
6045 "L</add-drive-ro> instead."
6049 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214 ../fish/guestfish-actions.pod:228
6051 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
6056 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:217 ../fish/guestfish-actions.pod:231 ../fish/guestfish-actions.pod:941 ../fish/guestfish-actions.pod:976 ../fish/guestfish-actions.pod:1149 ../fish/guestfish-actions.pod:1509 ../fish/guestfish-actions.pod:1523 ../fish/guestfish-actions.pod:3392 ../fish/guestfish-actions.pod:3703 ../fish/guestfish-actions.pod:3751 ../fish/guestfish-actions.pod:4669 ../fish/guestfish-actions.pod:4689 ../fish/guestfish-actions.pod:4708 ../fish/guestfish-actions.pod:4746 ../fish/guestfish-actions.pod:5474 ../fish/guestfish-actions.pod:5577 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326 ../src/guestfs-actions.pod:1580 ../src/guestfs-actions.pod:1637 ../src/guestfs-actions.pod:1920 ../src/guestfs-actions.pod:2419 ../src/guestfs-actions.pod:2440 ../src/guestfs-actions.pod:5242 ../src/guestfs-actions.pod:5764 ../src/guestfs-actions.pod:5864 ../src/guestfs-actions.pod:7160 ../src/guestfs-actions.pod:7201 ../src/guestfs-actions.pod:7232 ../src/guestfs-actions.pod:7292 ../src/guestfs-actions.pod:8346 ../src/guestfs-actions.pod:8455 ../src/guestfs-actions.pod:8635
6058 "Deprecated functions will not be removed from the API, but the fact that "
6059 "they are deprecated indicates that there are problems with correct use of "
6064 #: ../fish/guestfish-actions.pod:35
6069 #: ../fish/guestfish-actions.pod:37
6074 #: ../fish/guestfish-actions.pod:39
6077 " add-domain dom [libvirturi:..] [readonly:true|false] [iface:..] "
6078 "[live:true|false] [allowuuid:true|false] [readonlydisk:..]\n"
6083 #: ../fish/guestfish-actions.pod:41
6085 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6086 "It works by connecting to libvirt, requesting the domain and domain XML from "
6087 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
6091 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
6093 "The number of disks added is returned. This operation is atomic: if an "
6094 "error is returned, then no disks are added."
6098 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
6100 "This function does some minimal checks to make sure the libvirt domain is "
6101 "not running (unless C<readonly> is true). In a future version we will try "
6102 "to acquire the libvirt lock on each disk."
6106 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
6108 "Disks must be accessible locally. This often means that adding disks from a "
6109 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6110 "unless those disks are accessible via the same device path locally too."
6114 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
6116 "The optional C<libvirturi> parameter sets the libvirt URI (see "
6117 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
6118 "default libvirt URI (or one set through an environment variable, see the "
6119 "libvirt documentation for full details)."
6123 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
6125 "The optional C<live> flag controls whether this call will try to connect to "
6126 "a running virtual machine C<guestfsd> process if it sees a suitable "
6127 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6128 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6129 "DAEMONS> for more information."
6133 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
6135 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6136 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6137 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6142 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
6144 "The optional C<readonlydisk> parameter controls what we do for disks which "
6145 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
6149 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
6150 msgid "readonlydisk = \"error\""
6154 #: ../fish/guestfish-actions.pod:84 ../fish/guestfish-actions.pod:95 ../fish/guestfish-actions.pod:106 ../src/guestfs-actions.pod:103 ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:125
6155 msgid "If C<readonly> is false:"
6159 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
6161 "The whole call is aborted with an error if any disk with the "
6162 "E<lt>readonly/E<gt> flag is found."
6166 #: ../fish/guestfish-actions.pod:89 ../fish/guestfish-actions.pod:100 ../fish/guestfish-actions.pod:110 ../src/guestfs-actions.pod:108 ../src/guestfs-actions.pod:119 ../src/guestfs-actions.pod:129
6167 msgid "If C<readonly> is true:"
6171 #: ../fish/guestfish-actions.pod:91 ../fish/guestfish-actions.pod:102 ../fish/guestfish-actions.pod:112 ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121 ../src/guestfs-actions.pod:131
6172 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
6176 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
6177 msgid "readonlydisk = \"read\""
6181 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
6183 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
6184 "are added read/write."
6188 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
6189 msgid "readonlydisk = \"write\" (default)"
6193 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
6194 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
6198 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
6199 msgid "readonlydisk = \"ignore\""
6203 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
6204 msgid "If C<readonly> is true or false:"
6208 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
6209 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
6213 #: ../fish/guestfish-actions.pod:122
6215 "The other optional parameters are passed directly through to "
6216 "L</add-drive-opts>."
6220 #: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:194 ../fish/guestfish-actions.pod:624 ../fish/guestfish-actions.pod:835 ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:894 ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:912 ../fish/guestfish-actions.pod:926 ../fish/guestfish-actions.pod:2171 ../fish/guestfish-actions.pod:3219 ../fish/guestfish-actions.pod:3441 ../fish/guestfish-actions.pod:3604 ../fish/guestfish-actions.pod:3739 ../fish/guestfish-actions.pod:5110
6222 "This command has one or more optional arguments. See L</OPTIONAL "
6227 #: ../fish/guestfish-actions.pod:127
6232 #: ../fish/guestfish-actions.pod:129
6235 " add-drive filename\n"
6240 #: ../fish/guestfish-actions.pod:131
6242 "This function is the equivalent of calling L</add-drive-opts> with no "
6243 "optional parameters, so the disk is added writable, with the format being "
6244 "detected automatically."
6248 #: ../fish/guestfish-actions.pod:135
6250 "Automatic detection of the format opens you up to a potential security hole "
6251 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6252 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6253 "you should think about replacing calls to this function with calls to "
6254 "L</add-drive-opts>, and specifying the format."
6258 #: ../fish/guestfish-actions.pod:142
6259 msgid "add-drive-opts"
6263 #: ../fish/guestfish-actions.pod:144
6268 #: ../fish/guestfish-actions.pod:146
6271 " add-drive-opts filename [readonly:true|false] [format:..] [iface:..] "
6277 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
6279 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6280 "The first time you call this function, the disk appears as C</dev/sda>, the "
6281 "second time as C</dev/sdb>, and so on."
6285 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
6287 "You don't necessarily need to be root when using libguestfs. However you "
6288 "obviously do need sufficient permissions to access the filename for whatever "
6289 "operations you want to perform (ie. read access if you just want to read the "
6290 "image or write access if you want to modify the image)."
6294 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
6295 msgid "This call checks that C<filename> exists."
6299 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3403 ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5279
6300 msgid "The optional arguments are:"
6304 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6309 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6311 "If true then the image is treated as read-only. Writes are still allowed, "
6312 "but they are stored in a temporary snapshot overlay which is discarded at "
6313 "the end. The disk that you add is not modified."
6317 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6322 #: ../fish/guestfish-actions.pod:173
6324 "This forces the image format. If you omit this (or use L</add-drive> or "
6325 "L</add-drive-ro>) then the format is automatically detected. Possible "
6326 "formats include C<raw> and C<qcow2>."
6330 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6332 "Automatic detection of the format opens you up to a potential security hole "
6333 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6334 "RHBZ#642934. Specifying the format closes this security hole."
6338 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6343 #: ../fish/guestfish-actions.pod:184
6345 "This rarely-used option lets you emulate the behaviour of the deprecated "
6346 "L</add-drive-with-if> call (q.v.)"
6350 #: ../fish/guestfish-actions.pod:187 ../fish/guestfish-actions.pod:3246 ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:5000
6355 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
6357 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
6358 "a hint to the guest inspection process if it is available."
6362 #: ../fish/guestfish-actions.pod:196
6363 msgid "add-drive-ro"
6367 #: ../fish/guestfish-actions.pod:198
6372 #: ../fish/guestfish-actions.pod:200
6375 " add-drive-ro filename\n"
6380 #: ../fish/guestfish-actions.pod:202
6382 "This function is the equivalent of calling L</add-drive-opts> with the "
6383 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6384 "is added read-only, with the format being detected automatically."
6388 #: ../fish/guestfish-actions.pod:207
6389 msgid "add-drive-ro-with-if"
6393 #: ../fish/guestfish-actions.pod:209
6396 " add-drive-ro-with-if filename iface\n"
6401 #: ../fish/guestfish-actions.pod:211
6403 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6404 "interface emulation to use at run time."
6408 #: ../fish/guestfish-actions.pod:221
6409 msgid "add-drive-with-if"
6413 #: ../fish/guestfish-actions.pod:223
6416 " add-drive-with-if filename iface\n"
6421 #: ../fish/guestfish-actions.pod:225
6423 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6424 "interface emulation to use at run time."
6428 #: ../fish/guestfish-actions.pod:235
6433 #: ../fish/guestfish-actions.pod:237
6436 " aug-clear augpath\n"
6441 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
6443 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6444 "L<augtool(1)> C<clear> command."
6448 #: ../fish/guestfish-actions.pod:242
6453 #: ../fish/guestfish-actions.pod:244
6461 #: ../fish/guestfish-actions.pod:246
6463 "Close the current Augeas handle and free up any resources used by it. After "
6464 "calling this, you have to call L</aug-init> again before you can use any "
6465 "other Augeas functions."
6469 #: ../fish/guestfish-actions.pod:251
6474 #: ../fish/guestfish-actions.pod:253
6477 " aug-defnode name expr val\n"
6482 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
6483 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6487 #: ../fish/guestfish-actions.pod:258
6489 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6490 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6491 "containing that single node."
6495 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
6497 "On success this returns a pair containing the number of nodes in the "
6498 "nodeset, and a boolean flag if a node was created."
6502 #: ../fish/guestfish-actions.pod:266
6507 #: ../fish/guestfish-actions.pod:268
6510 " aug-defvar name expr\n"
6515 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
6517 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6518 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6522 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
6524 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6525 "evaluates to something which is not a nodeset."
6529 #: ../fish/guestfish-actions.pod:277
6534 #: ../fish/guestfish-actions.pod:279
6537 " aug-get augpath\n"
6542 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
6544 "Look up the value associated with C<path>. If C<path> matches exactly one "
6545 "node, the C<value> is returned."
6549 #: ../fish/guestfish-actions.pod:284
6554 #: ../fish/guestfish-actions.pod:286
6557 " aug-init root flags\n"
6562 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
6564 "Create a new Augeas handle for editing configuration files. If there was "
6565 "any previous Augeas handle associated with this guestfs session, then it is "
6570 #: ../fish/guestfish-actions.pod:292
6571 msgid "You must call this before using any other L</aug-*> commands."
6575 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
6576 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6580 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
6582 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6583 "logical I<or> of the following integers:"
6587 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
6588 msgid "C<AUG_SAVE_BACKUP> = 1"
6592 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
6593 msgid "Keep the original file with a C<.augsave> extension."
6597 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
6598 msgid "C<AUG_SAVE_NEWFILE> = 2"
6602 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
6604 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6605 "original. Overrides C<AUG_SAVE_BACKUP>."
6609 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
6610 msgid "C<AUG_TYPE_CHECK> = 4"
6614 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
6615 msgid "Typecheck lenses."
6619 #: ../fish/guestfish-actions.pod:317
6621 "This option is only useful when debugging Augeas lenses. Use of this option "
6622 "may require additional memory for the libguestfs appliance. You may need to "
6623 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
6627 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
6628 msgid "C<AUG_NO_STDINC> = 8"
6632 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
6633 msgid "Do not use standard load path for modules."
6637 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
6638 msgid "C<AUG_SAVE_NOOP> = 16"
6642 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
6643 msgid "Make save a no-op, just record what would have been changed."
6647 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
6648 msgid "C<AUG_NO_LOAD> = 32"
6652 #: ../fish/guestfish-actions.pod:332
6653 msgid "Do not load the tree in L</aug-init>."
6657 #: ../fish/guestfish-actions.pod:336
6658 msgid "To close the handle, you can call L</aug-close>."
6662 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
6663 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6667 #: ../fish/guestfish-actions.pod:340
6672 #: ../fish/guestfish-actions.pod:342
6675 " aug-insert augpath label true|false\n"
6680 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
6682 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6683 "or after C<path> (depending on the boolean flag C<before>)."
6687 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
6689 "C<path> must match exactly one existing node in the tree, and C<label> must "
6690 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6694 #: ../fish/guestfish-actions.pod:352
6699 #: ../fish/guestfish-actions.pod:354
6707 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
6708 msgid "Load files into the tree."
6712 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
6713 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6717 #: ../fish/guestfish-actions.pod:361
6722 #: ../fish/guestfish-actions.pod:363
6730 #: ../fish/guestfish-actions.pod:365
6732 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6733 "resulting nodes into alphabetical order."
6737 #: ../fish/guestfish-actions.pod:368
6742 #: ../fish/guestfish-actions.pod:370
6745 " aug-match augpath\n"
6750 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
6752 "Returns a list of paths which match the path expression C<path>. The "
6753 "returned paths are sufficiently qualified so that they match exactly one "
6754 "node in the current tree."
6758 #: ../fish/guestfish-actions.pod:376
6763 #: ../fish/guestfish-actions.pod:378
6766 " aug-mv src dest\n"
6771 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
6773 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6774 "C<dest> is overwritten if it exists."
6778 #: ../fish/guestfish-actions.pod:383
6783 #: ../fish/guestfish-actions.pod:385
6791 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
6792 msgid "Remove C<path> and all of its children."
6796 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
6797 msgid "On success this returns the number of entries which were removed."
6801 #: ../fish/guestfish-actions.pod:391
6806 #: ../fish/guestfish-actions.pod:393
6814 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
6815 msgid "This writes all pending changes to disk."
6819 #: ../fish/guestfish-actions.pod:397
6821 "The flags which were passed to L</aug-init> affect exactly how files are "
6826 #: ../fish/guestfish-actions.pod:400
6831 #: ../fish/guestfish-actions.pod:402
6834 " aug-set augpath val\n"
6839 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
6840 msgid "Set the value associated with C<path> to C<val>."
6844 #: ../fish/guestfish-actions.pod:406
6846 "In the Augeas API, it is possible to clear a node by setting the value to "
6847 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6848 "this call. Instead you must use the L</aug-clear> call."
6852 #: ../fish/guestfish-actions.pod:411
6857 #: ../fish/guestfish-actions.pod:413
6860 " available 'groups ...'\n"
6865 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
6867 "This command is used to check the availability of some groups of "
6868 "functionality in the appliance, which not all builds of the libguestfs "
6869 "appliance will be able to provide."
6873 #: ../fish/guestfish-actions.pod:419
6875 "The libguestfs groups, and the functions that those groups correspond to, "
6876 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6877 "runtime by calling L</available-all-groups>."
6881 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
6883 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
6884 "\"augeas\"]> would check for the availability of the Linux inotify functions "
6885 "and Augeas (configuration file editing) functions."
6889 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
6890 msgid "The command returns no error if I<all> requested groups are available."
6894 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
6896 "It fails with an error if one or more of the requested groups is unavailable "
6901 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
6903 "If an unknown group name is included in the list of groups then an error is "
6908 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
6913 #: ../fish/guestfish-actions.pod:443
6914 msgid "You must call L</launch> before calling this function."
6918 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
6920 "The reason is because we don't know what groups are supported by the "
6921 "appliance/daemon until it is running and can be queried."
6925 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
6927 "If a group of functions is available, this does not necessarily mean that "
6928 "they will work. You still have to check for errors when calling individual "
6929 "API functions even if they are available."
6933 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
6935 "It is usually the job of distro packagers to build complete functionality "
6936 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6937 "with all requirements satisfied, will support everything."
6941 #: ../fish/guestfish-actions.pod:465
6943 "This call was added in version C<1.0.80>. In previous versions of "
6944 "libguestfs all you could do would be to speculatively execute a command to "
6945 "find out if the daemon implemented it. See also L</version>."
6949 #: ../fish/guestfish-actions.pod:472
6950 msgid "available-all-groups"
6954 #: ../fish/guestfish-actions.pod:474
6957 " available-all-groups\n"
6962 #: ../fish/guestfish-actions.pod:476
6964 "This command returns a list of all optional groups that this daemon knows "
6965 "about. Note this returns both supported and unsupported groups. To find "
6966 "out which ones the daemon can actually support you have to call "
6967 "L</available> on each member of the returned list."
6971 #: ../fish/guestfish-actions.pod:482
6972 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6976 #: ../fish/guestfish-actions.pod:484
6981 #: ../fish/guestfish-actions.pod:486
6984 " base64-in (base64file|-) filename\n"
6989 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
6990 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
6994 #: ../fish/guestfish-actions.pod:491 ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:749 ../fish/guestfish-actions.pod:833 ../fish/guestfish-actions.pod:854 ../fish/guestfish-actions.pod:1025 ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1418 ../fish/guestfish-actions.pod:4966 ../fish/guestfish-actions.pod:4978 ../fish/guestfish-actions.pod:4989 ../fish/guestfish-actions.pod:5000 ../fish/guestfish-actions.pod:5131 ../fish/guestfish-actions.pod:5140 ../fish/guestfish-actions.pod:5194 ../fish/guestfish-actions.pod:5217
6995 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6999 #: ../fish/guestfish-actions.pod:493
7004 #: ../fish/guestfish-actions.pod:495
7007 " base64-out filename (base64file|-)\n"
7012 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
7014 "This command downloads the contents of C<filename>, writing it out to local "
7015 "file C<base64file> encoded as base64."
7019 #: ../fish/guestfish-actions.pod:502
7020 msgid "blockdev-flushbufs"
7024 #: ../fish/guestfish-actions.pod:504
7027 " blockdev-flushbufs device\n"
7032 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
7033 msgid "This tells the kernel to flush internal buffers associated with C<device>."
7037 #: ../fish/guestfish-actions.pod:509 ../fish/guestfish-actions.pod:520 ../fish/guestfish-actions.pod:529 ../fish/guestfish-actions.pod:539 ../fish/guestfish-actions.pod:551 ../fish/guestfish-actions.pod:564 ../fish/guestfish-actions.pod:572 ../fish/guestfish-actions.pod:583 ../fish/guestfish-actions.pod:591 ../fish/guestfish-actions.pod:599 ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:780 ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:817 ../src/guestfs-actions.pod:831 ../src/guestfs-actions.pod:849 ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:877
7038 msgid "This uses the L<blockdev(8)> command."
7042 #: ../fish/guestfish-actions.pod:511
7043 msgid "blockdev-getbsz"
7047 #: ../fish/guestfish-actions.pod:513
7050 " blockdev-getbsz device\n"
7055 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
7056 msgid "This returns the block size of a device."
7060 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580 ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
7062 "(Note this is different from both I<size in blocks> and I<filesystem block "
7067 #: ../fish/guestfish-actions.pod:522
7068 msgid "blockdev-getro"
7072 #: ../fish/guestfish-actions.pod:524
7075 " blockdev-getro device\n"
7080 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
7082 "Returns a boolean indicating if the block device is read-only (true if "
7083 "read-only, false if not)."
7087 #: ../fish/guestfish-actions.pod:531
7088 msgid "blockdev-getsize64"
7092 #: ../fish/guestfish-actions.pod:533
7095 " blockdev-getsize64 device\n"
7100 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
7101 msgid "This returns the size of the device in bytes."
7105 #: ../fish/guestfish-actions.pod:537
7106 msgid "See also L</blockdev-getsz>."
7110 #: ../fish/guestfish-actions.pod:541
7111 msgid "blockdev-getss"
7115 #: ../fish/guestfish-actions.pod:543
7118 " blockdev-getss device\n"
7123 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
7125 "This returns the size of sectors on a block device. Usually 512, but can be "
7126 "larger for modern devices."
7130 #: ../fish/guestfish-actions.pod:548
7131 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
7135 #: ../fish/guestfish-actions.pod:553
7136 msgid "blockdev-getsz"
7140 #: ../fish/guestfish-actions.pod:555
7143 " blockdev-getsz device\n"
7148 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
7150 "This returns the size of the device in units of 512-byte sectors (even if "
7151 "the sectorsize isn't 512 bytes ... weird)."
7155 #: ../fish/guestfish-actions.pod:560
7157 "See also L</blockdev-getss> for the real sector size of the device, and "
7158 "L</blockdev-getsize64> for the more useful I<size in bytes>."
7162 #: ../fish/guestfish-actions.pod:566
7163 msgid "blockdev-rereadpt"
7167 #: ../fish/guestfish-actions.pod:568
7170 " blockdev-rereadpt device\n"
7175 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
7176 msgid "Reread the partition table on C<device>."
7180 #: ../fish/guestfish-actions.pod:574
7181 msgid "blockdev-setbsz"
7185 #: ../fish/guestfish-actions.pod:576
7188 " blockdev-setbsz device blocksize\n"
7193 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
7194 msgid "This sets the block size of a device."
7198 #: ../fish/guestfish-actions.pod:585
7199 msgid "blockdev-setro"
7203 #: ../fish/guestfish-actions.pod:587
7206 " blockdev-setro device\n"
7211 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
7212 msgid "Sets the block device named C<device> to read-only."
7216 #: ../fish/guestfish-actions.pod:593
7217 msgid "blockdev-setrw"
7221 #: ../fish/guestfish-actions.pod:595
7224 " blockdev-setrw device\n"
7229 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
7230 msgid "Sets the block device named C<device> to read-write."
7234 #: ../fish/guestfish-actions.pod:601
7235 msgid "btrfs-filesystem-resize"
7239 #: ../fish/guestfish-actions.pod:603
7242 " btrfs-filesystem-resize mountpoint [size:N]\n"
7247 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
7248 msgid "This command resizes a btrfs filesystem."
7252 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
7254 "Note that unlike other resize calls, the filesystem has to be mounted and "
7255 "the parameter is the mountpoint not the device (this is a requirement of "
7260 #: ../fish/guestfish-actions.pod:611 ../fish/guestfish-actions.pod:3168 ../fish/guestfish-actions.pod:3714 ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:4896 ../src/guestfs-actions.pod:5803 ../src/guestfs-actions.pod:7779
7261 msgid "The optional parameters are:"
7265 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3718 ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5807
7270 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
7272 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7273 "resized to the maximum size."
7277 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
7278 msgid "See also L<btrfs(8)>."
7282 #: ../fish/guestfish-actions.pod:626
7283 msgid "case-sensitive-path"
7287 #: ../fish/guestfish-actions.pod:628
7290 " case-sensitive-path path\n"
7295 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
7297 "This can be used to resolve case insensitive paths on a filesystem which is "
7298 "case sensitive. The use case is to resolve paths which you have read from "
7299 "Windows configuration files or the Windows Registry, to the true path."
7303 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
7305 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7306 "(and probably others), which is that although the underlying filesystem is "
7307 "case-insensitive, the driver exports the filesystem to Linux as "
7312 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
7314 "One consequence of this is that special directories such as C<c:\\windows> "
7315 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7316 "precise details of how they were created. In Windows itself this would not "
7321 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
7323 "Bug or feature? You decide: "
7324 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
7328 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
7330 "This function resolves the true case of each element in the path and returns "
7331 "the case-sensitive path."
7335 #: ../fish/guestfish-actions.pod:652
7337 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
7338 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7339 "how the directories were originally created under Windows)."
7343 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
7344 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7348 #: ../fish/guestfish-actions.pod:660
7349 msgid "See also L</realpath>."
7353 #: ../fish/guestfish-actions.pod:662
7358 #: ../fish/guestfish-actions.pod:664
7366 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4145 ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6463
7367 msgid "Return the contents of the file named C<path>."
7371 #: ../fish/guestfish-actions.pod:668
7373 "Note that this function cannot correctly handle binary files (specifically, "
7374 "files containing C<\\0> character which is treated as end of string). For "
7375 "those you need to use the L</read-file> or L</download> functions which have "
7376 "a more complex interface."
7380 #: ../fish/guestfish-actions.pod:673 ../fish/guestfish-actions.pod:808 ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:1103 ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1180 ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1382 ../fish/guestfish-actions.pod:1695 ../fish/guestfish-actions.pod:1705 ../fish/guestfish-actions.pod:1755 ../fish/guestfish-actions.pod:1770 ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1799 ../fish/guestfish-actions.pod:4015 ../fish/guestfish-actions.pod:4030 ../fish/guestfish-actions.pod:4106 ../fish/guestfish-actions.pod:4123 ../fish/guestfish-actions.pod:4138 ../fish/guestfish-actions.pod:4807 ../fish/guestfish-actions.pod:4853 ../fish/guestfish-actions.pod:4938 ../fish/guestfish-actions.pod:4953 ../fish/guestfish-actions.pod:5438 ../fish/guestfish-actions.pod:5450 ../fish/guestfish-actions.pod:5468 ../fish/guestfish-actions.pod:5485 ../fish/guestfish-actions.pod:5495 ../fish/guestfish-actions.pod:5549 ../fish/guestfish-actions.pod:5559 ../fish/guestfish-actions.pod:5588 ../fish/guestfish-actions.pod:5598 ../src/guestfs-actions.pod:1001 ../src/guestfs-actions.pod:1180 ../src/guestfs-actions.pod:1200 ../src/guestfs-actions.pod:1855 ../src/guestfs-actions.pod:1874 ../src/guestfs-actions.pod:1977 ../src/guestfs-actions.pod:1996 ../src/guestfs-actions.pod:2242 ../src/guestfs-actions.pod:2724 ../src/guestfs-actions.pod:2743 ../src/guestfs-actions.pod:2808 ../src/guestfs-actions.pod:2832 ../src/guestfs-actions.pod:2849 ../src/guestfs-actions.pod:2878 ../src/guestfs-actions.pod:6245 ../src/guestfs-actions.pod:6271 ../src/guestfs-actions.pod:6402 ../src/guestfs-actions.pod:6428 ../src/guestfs-actions.pod:6452 ../src/guestfs-actions.pod:7407 ../src/guestfs-actions.pod:7462 ../src/guestfs-actions.pod:7608 ../src/guestfs-actions.pod:7632 ../src/guestfs-actions.pod:8419 ../src/guestfs-actions.pod:8439 ../src/guestfs-actions.pod:8472 ../src/guestfs-actions.pod:8491 ../src/guestfs-actions.pod:8510 ../src/guestfs-actions.pod:8601 ../src/guestfs-actions.pod:8620 ../src/guestfs-actions.pod:8666 ../src/guestfs-actions.pod:8685
7382 "Because of the message protocol, there is a transfer limit of somewhere "
7383 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7387 #: ../fish/guestfish-actions.pod:676
7392 #: ../fish/guestfish-actions.pod:678
7395 " checksum csumtype path\n"
7400 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
7401 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7405 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
7407 "The type of checksum to compute is given by the C<csumtype> parameter which "
7408 "must have one of the following values:"
7412 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
7417 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
7419 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7424 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
7429 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
7430 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7434 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
7439 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
7440 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7444 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
7449 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
7450 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7454 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
7459 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
7460 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7464 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
7469 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
7470 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7474 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
7479 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
7480 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7484 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
7485 msgid "The checksum is returned as a printable string."
7489 #: ../fish/guestfish-actions.pod:721
7490 msgid "To get the checksum for a device, use L</checksum-device>."
7494 #: ../fish/guestfish-actions.pod:723
7495 msgid "To get the checksums for many files, use L</checksums-out>."
7499 #: ../fish/guestfish-actions.pod:725
7500 msgid "checksum-device"
7504 #: ../fish/guestfish-actions.pod:727
7507 " checksum-device csumtype device\n"
7512 #: ../fish/guestfish-actions.pod:729
7514 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7515 "device named C<device>. For the types of checksums supported see the "
7516 "L</checksum> command."
7520 #: ../fish/guestfish-actions.pod:733
7521 msgid "checksums-out"
7525 #: ../fish/guestfish-actions.pod:735
7528 " checksums-out csumtype directory (sumsfile|-)\n"
7533 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
7535 "This command computes the checksums of all regular files in C<directory> and "
7536 "then emits a list of those checksums to the local output file C<sumsfile>."
7540 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
7542 "This can be used for verifying the integrity of a virtual machine. However "
7543 "to be properly secure you should pay attention to the output of the checksum "
7544 "command (it uses the ones from GNU coreutils). In particular when the "
7545 "filename is not printable, coreutils uses a special backslash syntax. For "
7546 "more information, see the GNU coreutils info file."
7550 #: ../fish/guestfish-actions.pod:751
7555 #: ../fish/guestfish-actions.pod:753
7558 " chmod mode path\n"
7563 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
7565 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7570 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
7572 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7573 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7578 #: ../fish/guestfish-actions.pod:762 ../fish/guestfish-actions.pod:3367 ../fish/guestfish-actions.pod:3506 ../fish/guestfish-actions.pod:3516 ../fish/guestfish-actions.pod:3526 ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:5210 ../src/guestfs-actions.pod:5419 ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5457
7579 msgid "The mode actually set is affected by the umask."
7583 #: ../fish/guestfish-actions.pod:764
7588 #: ../fish/guestfish-actions.pod:766
7591 " chown owner group path\n"
7596 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
7597 msgid "Change the file owner to C<owner> and group to C<group>."
7601 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2707 ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4128
7603 "Only numeric uid and gid are supported. If you want to use names, you will "
7604 "need to locate and parse the password file yourself (Augeas support makes "
7605 "this relatively easy)."
7609 #: ../fish/guestfish-actions.pod:774
7614 #: ../fish/guestfish-actions.pod:776
7617 " command 'arguments ...'\n"
7622 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
7624 "This call runs a command from the guest filesystem. The filesystem must be "
7625 "mounted, and must contain a compatible operating system (ie. something "
7626 "Linux, with the same or compatible processor architecture)."
7630 #: ../fish/guestfish-actions.pod:783
7632 "The single parameter is an argv-style list of arguments. The first element "
7633 "is the name of the program to run. Subsequent elements are parameters. The "
7634 "list must be non-empty (ie. must contain a program name). Note that the "
7635 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7639 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
7640 msgid "The return value is anything printed to I<stdout> by the command."
7644 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
7646 "If the command returns a non-zero exit status, then this function returns an "
7647 "error message. The error message string is the content of I<stderr> from "
7652 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
7654 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
7655 "C</bin>. If you require a program from another location, you should provide "
7656 "the full path in the first parameter."
7660 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
7662 "Shared libraries and data files required by the program must be available on "
7663 "filesystems which are mounted in the correct places. It is the caller's "
7664 "responsibility to ensure all filesystems that are needed are mounted at the "
7669 #: ../fish/guestfish-actions.pod:811
7670 msgid "command-lines"
7674 #: ../fish/guestfish-actions.pod:813
7677 " command-lines 'arguments ...'\n"
7682 #: ../fish/guestfish-actions.pod:815
7683 msgid "This is the same as L</command>, but splits the result into a list of lines."
7687 #: ../fish/guestfish-actions.pod:818
7688 msgid "See also: L</sh-lines>"
7692 #: ../fish/guestfish-actions.pod:823
7693 msgid "compress-device-out"
7697 #: ../fish/guestfish-actions.pod:825
7700 " compress-device-out ctype device (zdevice|-) [level:N]\n"
7705 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
7707 "This command compresses C<device> and writes it out to the local file "
7712 #: ../fish/guestfish-actions.pod:830
7714 "The C<ctype> and optional C<level> parameters have the same meaning as in "
7719 #: ../fish/guestfish-actions.pod:837
7720 msgid "compress-out"
7724 #: ../fish/guestfish-actions.pod:839
7727 " compress-out ctype file (zfile|-) [level:N]\n"
7732 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
7734 "This command compresses C<file> and writes it out to the local file "
7739 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
7741 "The compression program used is controlled by the C<ctype> parameter. "
7742 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7743 "Some compression types may not be supported by particular builds of "
7744 "libguestfs, in which case you will get an error containing the substring "
7745 "\"not supported\"."
7749 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
7751 "The optional C<level> parameter controls compression level. The meaning and "
7752 "default for this parameter depends on the compression program being used."
7756 #: ../fish/guestfish-actions.pod:858
7761 #: ../fish/guestfish-actions.pod:860
7764 " config qemuparam qemuvalue\n"
7769 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
7771 "This can be used to add arbitrary qemu command line parameters of the form "
7772 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7773 "setting some parameters which would interfere with parameters that we use."
7777 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
7778 msgid "The first character of C<param> string must be a C<-> (dash)."
7782 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
7783 msgid "C<value> can be NULL."
7787 #: ../fish/guestfish-actions.pod:871
7788 msgid "copy-device-to-device"
7792 #: ../fish/guestfish-actions.pod:873
7795 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7800 #: ../fish/guestfish-actions.pod:875
7802 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, "
7803 "L</copy-file-to-device>, and L</copy-file-to-file> let you copy from a "
7804 "source (device|file) to a destination (device|file)."
7808 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
7810 "Partial copies can be made since you can specify optionally the source "
7811 "offset, destination offset and size to copy. These values are all specified "
7812 "in bytes. If not given, the offsets both default to zero, and the size "
7813 "defaults to copying as much as possible until we hit the end of the source."
7817 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
7819 "The source and destination may be the same object. However overlapping "
7820 "regions may not be copied correctly."
7824 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
7826 "If the destination is a file, it is created if required. If the destination "
7827 "file is not large enough, it is extended."
7831 #: ../fish/guestfish-actions.pod:896
7832 msgid "copy-device-to-file"
7836 #: ../fish/guestfish-actions.pod:898
7839 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7844 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909 ../fish/guestfish-actions.pod:918
7845 msgid "See L</copy-device-to-device> for a general overview of this call."
7849 #: ../fish/guestfish-actions.pod:905
7850 msgid "copy-file-to-device"
7854 #: ../fish/guestfish-actions.pod:907
7857 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7862 #: ../fish/guestfish-actions.pod:914
7863 msgid "copy-file-to-file"
7867 #: ../fish/guestfish-actions.pod:916
7870 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7875 #: ../fish/guestfish-actions.pod:921
7877 "This is B<not> the function you want for copying files. This is for copying "
7878 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7879 "file copying and moving functions."
7883 #: ../fish/guestfish-actions.pod:928
7888 #: ../fish/guestfish-actions.pod:930
7891 " copy-size src dest size\n"
7896 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1584
7898 "This command copies exactly C<size> bytes from one source device or file "
7899 "C<src> to another destination device or file C<dest>."
7903 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1587
7905 "Note this will fail if the source is too short or if the destination is not "
7910 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
7912 "I<This function is deprecated.> In new code, use the "
7913 "L</copy_device_to_device> call instead."
7917 #: ../fish/guestfish-actions.pod:945
7922 #: ../fish/guestfish-actions.pod:947
7930 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1606
7932 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7933 "destination filename or destination directory."
7937 #: ../fish/guestfish-actions.pod:952
7942 #: ../fish/guestfish-actions.pod:954
7950 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1620
7952 "This copies a file or directory from C<src> to C<dest> recursively using the "
7957 #: ../fish/guestfish-actions.pod:959
7962 #: ../fish/guestfish-actions.pod:961
7970 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1641
7972 "This command copies from one source device or file C<src> to another "
7973 "destination device or file C<dest>. Normally you would use this to copy to "
7974 "or from a device or partition, for example to duplicate a filesystem."
7978 #: ../fish/guestfish-actions.pod:968
7980 "If the destination is a device, it must be as large or larger than the "
7981 "source file or device, otherwise the copy will fail. This command cannot do "
7982 "partial copies (see L</copy-device-to-device>)."
7986 #: ../fish/guestfish-actions.pod:980
7991 #: ../fish/guestfish-actions.pod:982
7999 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1660
8000 msgid "This command runs the C<df> command to report disk space used."
8004 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
8006 "This command is mostly useful for interactive sessions. It is I<not> "
8007 "intended that you try to parse the output string. Use L</statvfs> from "
8012 #: ../fish/guestfish-actions.pod:990
8017 #: ../fish/guestfish-actions.pod:992
8025 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1676
8027 "This command runs the C<df -h> command to report disk space used in "
8028 "human-readable format."
8032 #: ../fish/guestfish-actions.pod:1001
8037 #: ../fish/guestfish-actions.pod:1003
8045 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1693
8047 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8048 "This is sometimes useful for extended debugging of problems."
8052 #: ../fish/guestfish-actions.pod:1009
8054 "Another way to get the same information is to enable verbose messages with "
8055 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
8056 "before running the program."
8060 #: ../fish/guestfish-actions.pod:1014
8065 #: ../fish/guestfish-actions.pod:1016
8068 " download remotefilename (filename|-)\n"
8073 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031 ../src/guestfs-actions.pod:1714 ../src/guestfs-actions.pod:1739
8075 "Download file C<remotefilename> and save it as C<filename> on the local "
8080 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5190 ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:7989
8081 msgid "C<filename> can also be a named pipe."
8085 #: ../fish/guestfish-actions.pod:1023
8086 msgid "See also L</upload>, L</cat>."
8090 #: ../fish/guestfish-actions.pod:1027
8091 msgid "download-offset"
8095 #: ../fish/guestfish-actions.pod:1029
8098 " download-offset remotefilename (filename|-) offset size\n"
8103 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1742
8105 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8106 "region must be within the file or device)."
8110 #: ../fish/guestfish-actions.pod:1037
8112 "Note that there is no limit on the amount of data that can be downloaded "
8113 "with this call, unlike with L</pread>, and this call always reads the full "
8114 "amount unless an error occurs."
8118 #: ../fish/guestfish-actions.pod:1042
8119 msgid "See also L</download>, L</pread>."
8123 #: ../fish/guestfish-actions.pod:1046
8128 #: ../fish/guestfish-actions.pod:1048
8131 " drop-caches whattodrop\n"
8136 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1767
8138 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8139 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8140 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8144 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1772
8145 msgid "Setting C<whattodrop> to 3 should drop everything."
8149 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1774
8151 "This automatically calls L<sync(2)> before the operation, so that the "
8152 "maximum guest memory is freed."
8156 #: ../fish/guestfish-actions.pod:1060
8161 #: ../fish/guestfish-actions.pod:1062
8169 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1787
8171 "This command runs the C<du -s> command to estimate file space usage for "
8176 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1790
8178 "C<path> can be a file or a directory. If C<path> is a directory then the "
8179 "estimate includes the contents of the directory and all subdirectories "
8184 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1794
8185 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8189 #: ../fish/guestfish-actions.pod:1074
8194 #: ../fish/guestfish-actions.pod:1076
8197 " e2fsck-f device\n"
8202 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1812
8204 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8205 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8210 #: ../fish/guestfish-actions.pod:1082
8212 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8213 "should use L</fsck>."
8217 #: ../fish/guestfish-actions.pod:1085
8222 #: ../fish/guestfish-actions.pod:1087
8225 " echo-daemon 'words ...'\n"
8230 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1829
8232 "This command concatenates the list of C<words> passed with single spaces "
8233 "between them and returns the resulting string."
8237 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1832
8238 msgid "You can use this command to test the connection through to the daemon."
8242 #: ../fish/guestfish-actions.pod:1094
8243 msgid "See also L</ping-daemon>."
8247 #: ../fish/guestfish-actions.pod:1096
8252 #: ../fish/guestfish-actions.pod:1098
8255 " egrep regex path\n"
8260 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1848
8261 msgid "This calls the external C<egrep> program and returns the matching lines."
8265 #: ../fish/guestfish-actions.pod:1106
8270 #: ../fish/guestfish-actions.pod:1108
8273 " egrepi regex path\n"
8278 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1867
8279 msgid "This calls the external C<egrep -i> program and returns the matching lines."
8283 #: ../fish/guestfish-actions.pod:1116
8288 #: ../fish/guestfish-actions.pod:1118
8291 " equal file1 file2\n"
8296 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1886
8298 "This compares the two files C<file1> and C<file2> and returns true if their "
8299 "content is exactly equal, or false otherwise."
8303 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1889
8304 msgid "The external L<cmp(1)> program is used for the comparison."
8308 #: ../fish/guestfish-actions.pod:1125
8313 #: ../fish/guestfish-actions.pod:1127
8321 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1901
8323 "This returns C<true> if and only if there is a file, directory (or anything) "
8324 "with the given C<path> name."
8328 #: ../fish/guestfish-actions.pod:1132
8329 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8333 #: ../fish/guestfish-actions.pod:1134
8338 #: ../fish/guestfish-actions.pod:1136
8341 " fallocate path len\n"
8346 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:1943
8348 "This command preallocates a file (containing zero bytes) named C<path> of "
8349 "size C<len> bytes. If the file exists already, it is overwritten."
8353 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1928
8355 "Do not confuse this with the guestfish-specific C<alloc> command which "
8356 "allocates a file in the host and attaches it as a device."
8360 #: ../fish/guestfish-actions.pod:1146
8362 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8367 #: ../fish/guestfish-actions.pod:1153
8372 #: ../fish/guestfish-actions.pod:1155
8375 " fallocate64 path len\n"
8380 #: ../fish/guestfish-actions.pod:1161
8382 "Note that this call allocates disk blocks for the file. To create a sparse "
8383 "file use L</truncate-size> instead."
8387 #: ../fish/guestfish-actions.pod:1164
8389 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8390 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8391 "maximum size of files created through that call to 1GB."
8395 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1955
8397 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8398 "commands which create a file in the host and attach it as a device."
8402 #: ../fish/guestfish-actions.pod:1173
8407 #: ../fish/guestfish-actions.pod:1175
8410 " fgrep pattern path\n"
8415 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1970
8416 msgid "This calls the external C<fgrep> program and returns the matching lines."
8420 #: ../fish/guestfish-actions.pod:1183
8425 #: ../fish/guestfish-actions.pod:1185
8428 " fgrepi pattern path\n"
8433 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1989
8434 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
8438 #: ../fish/guestfish-actions.pod:1193
8443 #: ../fish/guestfish-actions.pod:1195
8451 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:2007
8453 "This call uses the standard L<file(1)> command to determine the type or "
8454 "contents of the file."
8458 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2010
8460 "This call will also transparently look inside various types of compressed "
8465 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2013
8467 "The exact command which runs is C<file -zb path>. Note in particular that "
8468 "the filename is not prepended to the output (the I<-b> option)."
8472 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2017
8474 "The output depends on the output of the underlying L<file(1)> command and it "
8475 "can change in future in ways beyond our control. In other words, the output "
8476 "is not guaranteed by the ABI."
8480 #: ../fish/guestfish-actions.pod:1211
8482 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8483 "(etc), L</is-zero>."
8487 #: ../fish/guestfish-actions.pod:1214
8488 msgid "file-architecture"
8492 #: ../fish/guestfish-actions.pod:1216
8495 " file-architecture filename\n"
8500 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2035
8502 "This detects the architecture of the binary C<filename>, and returns it if "
8507 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2038
8508 msgid "Currently defined architectures are:"
8512 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2042
8517 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2044
8519 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8520 "irrespective of the precise processor requirements of the binary."
8524 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2047
8529 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2049
8530 msgid "64 bit x86-64."
8534 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2051
8539 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2053
8540 msgid "32 bit SPARC."
8544 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2055
8549 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2057
8550 msgid "64 bit SPARC V9 and above."
8554 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2059
8559 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2061
8560 msgid "Intel Itanium."
8564 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2063
8569 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2065
8570 msgid "32 bit Power PC."
8574 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2067
8579 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2069
8580 msgid "64 bit Power PC."
8584 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2073
8585 msgid "Libguestfs may return other architecture strings in future."
8589 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2075
8590 msgid "The function works on at least the following types of files:"
8594 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2081
8595 msgid "many types of Un*x and Linux binary"
8599 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2085
8600 msgid "many types of Un*x and Linux shared library"
8604 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2089
8605 msgid "Windows Win32 and Win64 binaries"
8609 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2093
8610 msgid "Windows Win32 and Win64 DLLs"
8614 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2095
8615 msgid "Win32 binaries and DLLs return C<i386>."
8619 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2097
8620 msgid "Win64 binaries and DLLs return C<x86_64>."
8624 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2101
8625 msgid "Linux kernel modules"
8629 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2105
8630 msgid "Linux new-style initrd images"
8634 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2109
8635 msgid "some non-x86 Linux vmlinuz kernels"
8639 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2113
8640 msgid "What it can't do currently:"
8644 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2119
8645 msgid "static libraries (libfoo.a)"
8649 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2123
8650 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8654 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2127
8655 msgid "x86 Linux vmlinuz kernels"
8659 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2129
8661 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8662 "compressed code, and are horribly hard to unpack. If you want to find the "
8663 "architecture of a kernel, use the architecture of the associated initrd or "
8664 "kernel module(s) instead."
8668 #: ../fish/guestfish-actions.pod:1319
8673 #: ../fish/guestfish-actions.pod:1321
8681 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2147
8682 msgid "This command returns the size of C<file> in bytes."
8686 #: ../fish/guestfish-actions.pod:1325
8688 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
8689 "L</is-file> etc. To get the size of block devices, use "
8690 "L</blockdev-getsize64>."
8694 #: ../fish/guestfish-actions.pod:1329
8699 #: ../fish/guestfish-actions.pod:1331
8702 " fill c len path\n"
8707 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2165
8709 "This command creates a new file called C<path>. The initial content of the "
8710 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
8715 #: ../fish/guestfish-actions.pod:1337
8717 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8718 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8723 #: ../fish/guestfish-actions.pod:1342
8724 msgid "fill-pattern"
8728 #: ../fish/guestfish-actions.pod:1344
8731 " fill-pattern pattern len path\n"
8736 #: ../fish/guestfish-actions.pod:1346
8738 "This function is like L</fill> except that it creates a new file of length "
8739 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8740 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8745 #: ../fish/guestfish-actions.pod:1351
8750 #: ../fish/guestfish-actions.pod:1353
8758 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2211
8760 "This command lists out all files and directories, recursively, starting at "
8761 "C<directory>. It is essentially equivalent to running the shell command "
8762 "C<find directory -print> but some post-processing happens on the output, "
8767 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2216
8769 "This returns a list of strings I<without any prefix>. Thus if the directory "
8774 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2219
8784 #: ../fish/guestfish-actions.pod:1367
8785 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8789 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2226
8800 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2231
8801 msgid "If C<directory> is not a directory, then this command returns an error."
8805 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2234
8806 msgid "The returned list is sorted."
8810 #: ../fish/guestfish-actions.pod:1380
8811 msgid "See also L</find0>."
8815 #: ../fish/guestfish-actions.pod:1385
8820 #: ../fish/guestfish-actions.pod:1387
8823 " find0 directory (files|-)\n"
8828 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2254
8830 "This command lists out all files and directories, recursively, starting at "
8831 "C<directory>, placing the resulting list in the external file called "
8836 #: ../fish/guestfish-actions.pod:1393
8837 msgid "This command works the same way as L</find> with the following exceptions:"
8841 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2265
8842 msgid "The resulting list is written to an external file."
8846 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2269
8848 "Items (filenames) in the result are separated by C<\\0> characters. See "
8849 "L<find(1)> option I<-print0>."
8853 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2274
8854 msgid "This command is not limited in the number of names that it can return."
8858 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2279
8859 msgid "The result list is not sorted."
8863 #: ../fish/guestfish-actions.pod:1420
8864 msgid "findfs-label"
8868 #: ../fish/guestfish-actions.pod:1422
8871 " findfs-label label\n"
8876 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2293
8878 "This command searches the filesystems and returns the one which has the "
8879 "given label. An error is returned if no such filesystem can be found."
8883 #: ../fish/guestfish-actions.pod:1428
8884 msgid "To find the label of a filesystem, use L</vfs-label>."
8888 #: ../fish/guestfish-actions.pod:1430
8893 #: ../fish/guestfish-actions.pod:1432
8896 " findfs-uuid uuid\n"
8901 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2310
8903 "This command searches the filesystems and returns the one which has the "
8904 "given UUID. An error is returned if no such filesystem can be found."
8908 #: ../fish/guestfish-actions.pod:1438
8909 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8913 #: ../fish/guestfish-actions.pod:1440
8918 #: ../fish/guestfish-actions.pod:1442
8921 " fsck fstype device\n"
8926 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2328
8928 "This runs the filesystem checker (fsck) on C<device> which should have "
8929 "filesystem type C<fstype>."
8933 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2331
8935 "The returned integer is the status. See L<fsck(8)> for the list of status "
8936 "codes from C<fsck>."
8940 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2340
8941 msgid "Multiple status codes can be summed together."
8945 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2344
8947 "A non-zero return code can mean \"success\", for example if errors have been "
8948 "corrected on the filesystem."
8952 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
8953 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8957 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2354
8958 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8962 #: ../fish/guestfish-actions.pod:1472
8967 #: ../fish/guestfish-actions.pod:1474
8975 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2365
8977 "Return the additional kernel options which are added to the guest kernel "
8982 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2368
8983 msgid "If C<NULL> then no options are added."
8987 #: ../fish/guestfish-actions.pod:1481
8988 msgid "get-attach-method"
8992 #: ../fish/guestfish-actions.pod:1483
8995 " get-attach-method\n"
9000 #: ../fish/guestfish-actions.pod:1485
9001 msgid "Return the current attach method. See L</set-attach-method>."
9005 #: ../fish/guestfish-actions.pod:1487
9006 msgid "get-autosync"
9010 #: ../fish/guestfish-actions.pod:1489
9018 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2393
9019 msgid "Get the autosync flag."
9023 #: ../fish/guestfish-actions.pod:1493
9028 #: ../fish/guestfish-actions.pod:1495
9036 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2404
9037 msgid "Return the direct appliance mode flag."
9041 #: ../fish/guestfish-actions.pod:1499
9046 #: ../fish/guestfish-actions.pod:1501
9049 " get-e2label device\n"
9054 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2423
9055 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9059 #: ../fish/guestfish-actions.pod:1506
9061 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
9066 #: ../fish/guestfish-actions.pod:1513
9071 #: ../fish/guestfish-actions.pod:1515
9074 " get-e2uuid device\n"
9079 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2444
9080 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9084 #: ../fish/guestfish-actions.pod:1520
9086 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
9091 #: ../fish/guestfish-actions.pod:1527
9096 #: ../fish/guestfish-actions.pod:1529
9104 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2457
9105 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
9109 #: ../fish/guestfish-actions.pod:1534
9111 "If L</set-memsize> was not called on this handle, and if "
9112 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9113 "value for memsize."
9117 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:1595 ../fish/guestfish-actions.pod:4468 ../fish/guestfish-actions.pod:4570 ../src/guestfs-actions.pod:2464 ../src/guestfs-actions.pod:2556 ../src/guestfs-actions.pod:6921 ../src/guestfs-actions.pod:7047
9118 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9122 #: ../fish/guestfish-actions.pod:1541
9127 #: ../fish/guestfish-actions.pod:1543
9135 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2476
9136 msgid "This returns the enable network flag."
9140 #: ../fish/guestfish-actions.pod:1547
9145 #: ../fish/guestfish-actions.pod:1549
9153 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2487
9154 msgid "Return the current search path."
9158 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2489
9160 "This is always non-NULL. If it wasn't set already, then this will return "
9165 #: ../fish/guestfish-actions.pod:1556
9170 #: ../fish/guestfish-actions.pod:1558
9178 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2502
9179 msgid "This returns the process group flag."
9183 #: ../fish/guestfish-actions.pod:1562
9188 #: ../fish/guestfish-actions.pod:1564
9193 #: ../fish/guestfish-actions.pod:1566
9201 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2513
9203 "Return the process ID of the qemu subprocess. If there is no qemu "
9204 "subprocess, then this will return an error."
9208 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2516
9209 msgid "This is an internal call used for debugging and testing."
9213 #: ../fish/guestfish-actions.pod:1573
9218 #: ../fish/guestfish-actions.pod:1575
9226 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2527
9227 msgid "Return the current qemu binary."
9231 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2529
9233 "This is always non-NULL. If it wasn't set already, then this will return "
9234 "the default qemu binary name."
9238 #: ../fish/guestfish-actions.pod:1582
9239 msgid "get-recovery-proc"
9243 #: ../fish/guestfish-actions.pod:1584
9246 " get-recovery-proc\n"
9251 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2542
9252 msgid "Return the recovery process enabled flag."
9256 #: ../fish/guestfish-actions.pod:1588
9261 #: ../fish/guestfish-actions.pod:1590
9269 #: ../fish/guestfish-actions.pod:1592
9271 "This returns the current setting of the selinux flag which is passed to the "
9272 "appliance at boot time. See L</set-selinux>."
9276 #: ../fish/guestfish-actions.pod:1598
9281 #: ../fish/guestfish-actions.pod:1600
9289 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2568
9290 msgid "This returns the number of virtual CPUs assigned to the appliance."
9294 #: ../fish/guestfish-actions.pod:1604
9299 #: ../fish/guestfish-actions.pod:1606
9307 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2579
9309 "This returns the current state as an opaque integer. This is only useful "
9310 "for printing debug and internal error messages."
9314 #: ../fish/guestfish-actions.pod:1611 ../fish/guestfish-actions.pod:2574 ../fish/guestfish-actions.pod:2592 ../fish/guestfish-actions.pod:2630 ../fish/guestfish-actions.pod:2646 ../src/guestfs-actions.pod:2582 ../src/guestfs-actions.pod:3905 ../src/guestfs-actions.pod:3934 ../src/guestfs-actions.pod:3995 ../src/guestfs-actions.pod:4022
9315 msgid "For more information on states, see L<guestfs(3)>."
9319 #: ../fish/guestfish-actions.pod:1613
9324 #: ../fish/guestfish-actions.pod:1615
9332 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2593
9333 msgid "Return the command trace flag."
9337 #: ../fish/guestfish-actions.pod:1619
9342 #: ../fish/guestfish-actions.pod:1621
9350 #: ../fish/guestfish-actions.pod:1623
9352 "Return the current umask. By default the umask is C<022> unless it has been "
9353 "set by calling L</umask>."
9357 #: ../fish/guestfish-actions.pod:1626
9362 #: ../fish/guestfish-actions.pod:1628
9370 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2616
9371 msgid "This returns the verbose messages flag."
9375 #: ../fish/guestfish-actions.pod:1632
9380 #: ../fish/guestfish-actions.pod:1634
9388 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2627
9389 msgid "This gets the SELinux security context of the daemon."
9393 #: ../fish/guestfish-actions.pod:1638
9394 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9398 #: ../fish/guestfish-actions.pod:1641
9403 #: ../fish/guestfish-actions.pod:1643
9406 " getxattr path name\n"
9411 #: ../fish/guestfish-actions.pod:1645
9413 "Get a single extended attribute from file C<path> named C<name>. This call "
9414 "follows symlinks. If you want to lookup an extended attribute for the "
9415 "symlink itself, use L</lgetxattr>."
9419 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2719
9421 "Normally it is better to get all extended attributes from a file in one go "
9422 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9423 "buggy and do not provide a way to list out attributes. For these "
9424 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9425 "attributes you want in advance and call this function."
9429 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2726 ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:4155
9431 "Extended attribute values are blobs of binary data. If there is no extended "
9432 "attribute named C<name>, this returns an error."
9436 #: ../fish/guestfish-actions.pod:1659
9437 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9441 #: ../fish/guestfish-actions.pod:1661
9446 #: ../fish/guestfish-actions.pod:1663
9454 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2673
9455 msgid "This call lists the extended attributes of the file or directory C<path>."
9459 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2676
9461 "At the system call level, this is a combination of the L<listxattr(2)> and "
9462 "L<getxattr(2)> calls."
9466 #: ../fish/guestfish-actions.pod:1671
9467 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9471 #: ../fish/guestfish-actions.pod:1673
9476 #: ../fish/guestfish-actions.pod:1675
9479 " glob-expand pattern\n"
9484 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2693
9486 "This command searches for all the pathnames matching C<pattern> according to "
9487 "the wildcard expansion rules used by the shell."
9491 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2697
9492 msgid "If no paths match, then this returns an empty list (note: not an error)."
9496 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2700
9498 "It is just a wrapper around the C L<glob(3)> function with flags "
9499 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
9503 #: ../fish/guestfish-actions.pod:1688
9508 #: ../fish/guestfish-actions.pod:1690
9511 " grep regex path\n"
9516 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2717
9517 msgid "This calls the external C<grep> program and returns the matching lines."
9521 #: ../fish/guestfish-actions.pod:1698
9526 #: ../fish/guestfish-actions.pod:1700
9529 " grepi regex path\n"
9534 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2736
9535 msgid "This calls the external C<grep -i> program and returns the matching lines."
9539 #: ../fish/guestfish-actions.pod:1708
9540 msgid "grub-install"
9544 #: ../fish/guestfish-actions.pod:1710
9547 " grub-install root device\n"
9552 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2755
9554 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9555 "with the root directory being C<root>."
9559 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2764
9561 "There is currently no way in the API to install grub2, which is used by most "
9562 "modern Linux guests. It is possible to run the grub2 command from the "
9563 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9567 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2771
9569 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9570 "compatible with itself, so this only works in rather narrow circumstances. "
9571 "Careful testing with each guest version is advisable."
9575 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2778
9577 "If grub-install reports the error \"No suitable drive was found in the "
9578 "generated device map.\" it may be that you need to create a "
9579 "C</boot/grub/device.map> file first that contains the mapping between grub "
9580 "device names and Linux device names. It is usually sufficient to create a "
9585 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2785
9593 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2787
9594 msgid "replacing C</dev/vda> with the name of the installation device."
9598 #: ../fish/guestfish-actions.pod:1748
9603 #: ../fish/guestfish-actions.pod:1750
9611 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2801
9613 "This command returns up to the first 10 lines of a file as a list of "
9618 #: ../fish/guestfish-actions.pod:1758
9623 #: ../fish/guestfish-actions.pod:1760
9626 " head-n nrlines path\n"
9631 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2820
9633 "If the parameter C<nrlines> is a positive number, this returns the first "
9634 "C<nrlines> lines of the file C<path>."
9638 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2823
9640 "If the parameter C<nrlines> is a negative number, this returns lines from "
9641 "the file C<path>, excluding the last C<nrlines> lines."
9645 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4951 ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:7626
9646 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9650 #: ../fish/guestfish-actions.pod:1773
9655 #: ../fish/guestfish-actions.pod:1775
9663 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2843
9665 "This runs C<hexdump -C> on the given C<path>. The result is the "
9666 "human-readable, canonical hex dump of the file."
9670 #: ../fish/guestfish-actions.pod:1783
9675 #: ../fish/guestfish-actions.pod:1785
9678 " initrd-cat initrdpath filename\n"
9683 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2862
9685 "This command unpacks the file C<filename> from the initrd file called "
9686 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9691 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2866
9693 "For example, in guestfish you could use the following command to examine the "
9694 "boot script (usually called C</init>) contained in a Linux initrd or "
9699 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2870
9702 " initrd-cat /boot/initrd-<version>.img init\n"
9707 #: ../fish/guestfish-actions.pod:1797
9708 msgid "See also L</initrd-list>."
9712 #: ../fish/guestfish-actions.pod:1802
9717 #: ../fish/guestfish-actions.pod:1804
9720 " initrd-list path\n"
9725 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2889
9726 msgid "This command lists out files contained in an initrd."
9730 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2891
9732 "The files are listed without any initial C</> character. The files are "
9733 "listed in the order they appear (not necessarily alphabetical). Directory "
9734 "names are listed as separate items."
9738 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2895
9740 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9741 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9746 #: ../fish/guestfish-actions.pod:1816
9747 msgid "inotify-add-watch"
9751 #: ../fish/guestfish-actions.pod:1818
9754 " inotify-add-watch path mask\n"
9759 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2912
9760 msgid "Watch C<path> for the events listed in C<mask>."
9764 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2914
9766 "Note that if C<path> is a directory then events within that directory are "
9767 "watched, but this does I<not> happen recursively (in subdirectories)."
9771 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2918
9773 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9774 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9778 #: ../fish/guestfish-actions.pod:1830
9779 msgid "inotify-close"
9783 #: ../fish/guestfish-actions.pod:1832
9791 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2931
9793 "This closes the inotify handle which was previously opened by inotify_init. "
9794 "It removes all watches, throws away any pending events, and deallocates all "
9799 #: ../fish/guestfish-actions.pod:1838
9800 msgid "inotify-files"
9804 #: ../fish/guestfish-actions.pod:1840
9812 #: ../fish/guestfish-actions.pod:1842
9814 "This function is a helpful wrapper around L</inotify-read> which just "
9815 "returns a list of pathnames of objects that were touched. The returned "
9816 "pathnames are sorted and deduplicated."
9820 #: ../fish/guestfish-actions.pod:1846
9821 msgid "inotify-init"
9825 #: ../fish/guestfish-actions.pod:1848
9828 " inotify-init maxevents\n"
9833 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2960
9835 "This command creates a new inotify handle. The inotify subsystem can be "
9836 "used to notify events which happen to objects in the guest filesystem."
9840 #: ../fish/guestfish-actions.pod:1854
9842 "C<maxevents> is the maximum number of events which will be queued up between "
9843 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9844 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9845 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9846 "but records the fact that it threw them away by setting a flag "
9847 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9851 #: ../fish/guestfish-actions.pod:1864
9853 "Before any events are generated, you have to add some watches to the "
9854 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9855 "L</inotify-watch-all>."
9859 #: ../fish/guestfish-actions.pod:1870
9861 "Queued up events should be read periodically by calling L</inotify-read> (or "
9862 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9863 "If you don't read the events out often enough then you risk the internal "
9864 "queue overflowing."
9868 #: ../fish/guestfish-actions.pod:1877
9870 "The handle should be closed after use by calling L</inotify-close>. This "
9871 "also removes any watches automatically."
9875 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2991
9877 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9878 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9879 "that there is one global inotify handle per libguestfs instance."
9883 #: ../fish/guestfish-actions.pod:1886
9884 msgid "inotify-read"
9888 #: ../fish/guestfish-actions.pod:1888
9896 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:3005
9898 "Return the complete queue of events that have happened since the previous "
9903 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3008
9904 msgid "If no events have happened, this returns an empty list."
9908 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3010
9910 "I<Note>: In order to make sure that all events have been read, you must call "
9911 "this function repeatedly until it returns an empty list. The reason is that "
9912 "the call will read events up to the maximum appliance-to-host message size "
9913 "and leave remaining events in the queue."
9917 #: ../fish/guestfish-actions.pod:1901
9918 msgid "inotify-rm-watch"
9922 #: ../fish/guestfish-actions.pod:1903
9925 " inotify-rm-watch wd\n"
9930 #: ../fish/guestfish-actions.pod:1905
9931 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9935 #: ../fish/guestfish-actions.pod:1908
9936 msgid "inspect-get-arch"
9940 #: ../fish/guestfish-actions.pod:1910
9943 " inspect-get-arch root\n"
9948 #: ../fish/guestfish-actions.pod:1912
9950 "This returns the architecture of the inspected operating system. The "
9951 "possible return values are listed under L</file-architecture>."
9955 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3045
9957 "If the architecture could not be determined, then the string C<unknown> is "
9962 #: ../fish/guestfish-actions.pod:1919 ../fish/guestfish-actions.pod:2014 ../fish/guestfish-actions.pod:2093 ../fish/guestfish-actions.pod:2105 ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2251 ../fish/guestfish-actions.pod:2272 ../fish/guestfish-actions.pod:2286 ../fish/guestfish-actions.pod:2326 ../fish/guestfish-actions.pod:2366 ../fish/guestfish-actions.pod:2379 ../fish/guestfish-actions.pod:2392 ../fish/guestfish-actions.pod:2402 ../fish/guestfish-actions.pod:2412 ../fish/guestfish-actions.pod:2424 ../fish/guestfish-actions.pod:2520 ../fish/guestfish-actions.pod:2554 ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3150 ../src/guestfs-actions.pod:3254 ../src/guestfs-actions.pod:3273 ../src/guestfs-actions.pod:3404 ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3516 ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:3590 ../src/guestfs-actions.pod:3638 ../src/guestfs-actions.pod:3658 ../src/guestfs-actions.pod:3678 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3729 ../src/guestfs-actions.pod:3831 ../src/guestfs-actions.pod:3872
9963 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9967 #: ../fish/guestfish-actions.pod:1921
9968 msgid "inspect-get-distro"
9972 #: ../fish/guestfish-actions.pod:1923
9975 " inspect-get-distro root\n"
9980 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3061
9981 msgid "This returns the distro (distribution) of the inspected operating system."
9985 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3064
9986 msgid "Currently defined distros are:"
9990 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3068
9991 msgid "\"archlinux\""
9995 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3070
10000 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3072
10005 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3074
10010 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3076
10015 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3078
10020 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3080
10025 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3082
10030 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3084
10035 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3086
10040 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3088
10041 msgid "\"linuxmint\""
10045 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3090
10046 msgid "Linux Mint."
10050 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3092
10055 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3094
10060 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3096
10061 msgid "\"mandriva\""
10065 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3098
10070 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3100
10075 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3102
10080 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3104
10081 msgid "\"opensuse\""
10085 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3106
10090 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3108
10095 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3110
10100 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3112
10101 msgid "\"redhat-based\""
10105 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3114
10106 msgid "Some Red Hat-derived distro."
10110 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3116
10115 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3118
10116 msgid "Red Hat Enterprise Linux."
10120 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3120
10121 msgid "\"scientificlinux\""
10125 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3122
10126 msgid "Scientific Linux."
10130 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3124
10131 msgid "\"slackware\""
10135 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3126
10140 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3128
10141 msgid "\"ttylinux\""
10145 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3130
10150 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3132
10155 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3134
10160 #: ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2084 ../fish/guestfish-actions.pod:2357 ../src/guestfs-actions.pod:3136 ../src/guestfs-actions.pod:3245 ../src/guestfs-actions.pod:3629
10161 msgid "\"unknown\""
10165 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3138
10166 msgid "The distro could not be determined."
10170 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341 ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3613
10171 msgid "\"windows\""
10175 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3142
10177 "Windows does not have distributions. This string is returned if the OS type "
10182 #: ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2090 ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3147 ../src/guestfs-actions.pod:3251 ../src/guestfs-actions.pod:3635
10184 "Future versions of libguestfs may return other strings here. The caller "
10185 "should be prepared to handle any string."
10189 #: ../fish/guestfish-actions.pod:2016
10190 msgid "inspect-get-drive-mappings"
10194 #: ../fish/guestfish-actions.pod:2018
10197 " inspect-get-drive-mappings root\n"
10202 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3163
10204 "This call is useful for Windows which uses a primitive system of assigning "
10205 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10206 "Windows Registry to find out how disks/partitions are mapped to drive "
10207 "letters, and returns a hash table as in the example below:"
10211 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3169
10214 " C => /dev/vda2\n"
10215 " E => /dev/vdb1\n"
10216 " F => /dev/vdc1\n"
10221 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3173
10223 "Note that keys are drive letters. For Windows, the key is case insensitive "
10224 "and just contains the drive letter, without the customary colon separator "
10229 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3177
10231 "In future we may support other operating systems that also used drive "
10232 "letters, but the keys for those might not be case insensitive and might be "
10233 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10238 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3182
10240 "For Windows guests, currently only hard drive mappings are returned. "
10241 "Removable disks (eg. DVD-ROMs) are ignored."
10245 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3185
10247 "For guests that do not use drive mappings, or if the drive mappings could "
10248 "not be determined, this returns an empty hash table."
10252 #: ../fish/guestfish-actions.pod:2045
10254 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10255 "L</inspect-get-mountpoints>, L</inspect-get-filesystems>."
10259 #: ../fish/guestfish-actions.pod:2049
10260 msgid "inspect-get-filesystems"
10264 #: ../fish/guestfish-actions.pod:2051
10267 " inspect-get-filesystems root\n"
10272 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3206
10274 "This returns a list of all the filesystems that we think are associated with "
10275 "this operating system. This includes the root filesystem, other ordinary "
10276 "filesystems, and non-mounted devices like swap partitions."
10280 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3211
10282 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10283 "to be shared between operating systems."
10287 #: ../fish/guestfish-actions.pod:2061
10289 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10290 "L</inspect-get-mountpoints>."
10294 #: ../fish/guestfish-actions.pod:2064
10295 msgid "inspect-get-format"
10299 #: ../fish/guestfish-actions.pod:2066
10302 " inspect-get-format root\n"
10307 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3229
10309 "This returns the format of the inspected operating system. You can use it "
10310 "to detect install images, live CDs and similar."
10314 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3232
10315 msgid "Currently defined formats are:"
10319 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3236
10320 msgid "\"installed\""
10324 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3238
10325 msgid "This is an installed operating system."
10329 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3240
10330 msgid "\"installer\""
10334 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3242
10336 "The disk image being inspected is not an installed operating system, but a "
10337 "I<bootable> install disk, live CD, or similar."
10341 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3247
10342 msgid "The format of this disk image is not known."
10346 #: ../fish/guestfish-actions.pod:2095
10347 msgid "inspect-get-hostname"
10351 #: ../fish/guestfish-actions.pod:2097
10354 " inspect-get-hostname root\n"
10359 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3267
10361 "This function returns the hostname of the operating system as found by "
10362 "inspection of the guest's configuration files."
10366 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3270
10368 "If the hostname could not be determined, then the string C<unknown> is "
10373 #: ../fish/guestfish-actions.pod:2107
10374 msgid "inspect-get-icon"
10378 #: ../fish/guestfish-actions.pod:2109
10381 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
10386 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3296
10388 "This function returns an icon corresponding to the inspected operating "
10389 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10390 "to PNG if necessary)."
10394 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3300
10396 "If it was not possible to get an icon this function returns a zero-length "
10397 "(non-NULL) buffer. I<Callers must check for this case>."
10401 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3303
10403 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10404 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10405 "this file will be returned. You can disable favicons by passing the "
10406 "optional C<favicon> boolean as false (default is true)."
10410 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3309
10412 "If finding the favicon fails, then we look in other places in the guest for "
10417 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3312
10419 "If the optional C<highquality> boolean is true then only high quality icons "
10420 "are returned, which means only icons of high resolution with an alpha "
10421 "channel. The default (false) is to return any icon we can, even if it is of "
10422 "substandard quality."
10426 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3323
10428 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10429 "before you call this, since it needs to read information from the guest "
10430 "filesystem during the call."
10434 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3329
10436 "B<Security:> The icon data comes from the untrusted guest, and should be "
10437 "treated with caution. PNG files have been known to contain exploits. "
10438 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10439 "trying to process or display the icon."
10443 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3337
10445 "The PNG image returned can be any size. It might not be square. Libguestfs "
10446 "tries to return the largest, highest quality icon available. The "
10447 "application must scale the icon to the required size."
10451 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3344
10453 "Extracting icons from Windows guests requires the external C<wrestool> "
10454 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10455 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10456 "installed separately."
10460 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3351
10462 "Operating system icons are usually trademarks. Seek legal advice before "
10463 "using trademarks in applications."
10467 #: ../fish/guestfish-actions.pod:2173
10468 msgid "inspect-get-major-version"
10472 #: ../fish/guestfish-actions.pod:2175
10475 " inspect-get-major-version root\n"
10480 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3392
10481 msgid "This returns the major version number of the inspected operating system."
10485 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3395
10487 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10488 "popular public names used by the operating system. Notably the operating "
10489 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10490 "1). You can find out the real versions corresponding to releases of Windows "
10491 "by consulting Wikipedia or MSDN."
10495 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198 ../src/guestfs-actions.pod:3402 ../src/guestfs-actions.pod:3419
10496 msgid "If the version could not be determined, then C<0> is returned."
10500 #: ../fish/guestfish-actions.pod:2191
10501 msgid "inspect-get-minor-version"
10505 #: ../fish/guestfish-actions.pod:2193
10508 " inspect-get-minor-version root\n"
10513 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3416
10514 msgid "This returns the minor version number of the inspected operating system."
10518 #: ../fish/guestfish-actions.pod:2200
10520 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10521 "L</inspect-get-major-version>."
10525 #: ../fish/guestfish-actions.pod:2203
10526 msgid "inspect-get-mountpoints"
10530 #: ../fish/guestfish-actions.pod:2205
10533 " inspect-get-mountpoints root\n"
10538 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3434
10540 "This returns a hash of where we think the filesystems associated with this "
10541 "operating system should be mounted. Callers should note that this is at "
10542 "best an educated guess made by reading configuration files such as "
10543 "C</etc/fstab>. I<In particular note> that this may return filesystems which "
10544 "are non-existent or not mountable and callers should be prepared to handle "
10545 "or ignore failures if they try to mount them."
10549 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3443
10551 "Each element in the returned hashtable has a key which is the path of the "
10552 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10553 "mounted there (eg. C</dev/sda1>)."
10557 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3448
10558 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
10562 #: ../fish/guestfish-actions.pod:2224
10564 "For operating systems like Windows which still use drive letters, this call "
10565 "will only return an entry for the first drive \"mounted on\" C</>. For "
10566 "information about the mapping of drive letters to partitions, see "
10567 "L</inspect-get-drive-mappings>."
10571 #: ../fish/guestfish-actions.pod:2230
10573 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10574 "L</inspect-get-filesystems>."
10578 #: ../fish/guestfish-actions.pod:2233
10579 msgid "inspect-get-package-format"
10583 #: ../fish/guestfish-actions.pod:2235
10586 " inspect-get-package-format root\n"
10591 #: ../fish/guestfish-actions.pod:2237
10593 "This function and L</inspect-get-package-management> return the package "
10594 "format and package management tool used by the inspected operating system. "
10595 "For example for Fedora these functions would return C<rpm> (package format) "
10596 "and C<yum> (package management)."
10600 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3480
10602 "This returns the string C<unknown> if we could not determine the package "
10603 "format I<or> if the operating system does not have a real packaging system "
10608 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3484
10610 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10611 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10615 #: ../fish/guestfish-actions.pod:2253
10616 msgid "inspect-get-package-management"
10620 #: ../fish/guestfish-actions.pod:2255
10623 " inspect-get-package-management root\n"
10628 #: ../fish/guestfish-actions.pod:2257
10630 "L</inspect-get-package-format> and this function return the package format "
10631 "and package management tool used by the inspected operating system. For "
10632 "example for Fedora these functions would return C<rpm> (package format) and "
10633 "C<yum> (package management)."
10637 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3507
10639 "This returns the string C<unknown> if we could not determine the package "
10640 "management tool I<or> if the operating system does not have a real packaging "
10641 "system (eg. Windows)."
10645 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3511
10647 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10648 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10649 "versions of libguestfs may return other strings."
10653 #: ../fish/guestfish-actions.pod:2274
10654 msgid "inspect-get-product-name"
10658 #: ../fish/guestfish-actions.pod:2276
10661 " inspect-get-product-name root\n"
10666 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3529
10668 "This returns the product name of the inspected operating system. The "
10669 "product name is generally some freeform string which can be displayed to the "
10670 "user, but should not be parsed by programs."
10674 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3534
10676 "If the product name could not be determined, then the string C<unknown> is "
10681 #: ../fish/guestfish-actions.pod:2288
10682 msgid "inspect-get-product-variant"
10686 #: ../fish/guestfish-actions.pod:2290
10689 " inspect-get-product-variant root\n"
10694 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3550
10695 msgid "This returns the product variant of the inspected operating system."
10699 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3553
10701 "For Windows guests, this returns the contents of the Registry key "
10702 "C<HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> "
10703 "which is usually a string such as C<Client> or C<Server> (other values are "
10704 "possible). This can be used to distinguish consumer and enterprise versions "
10705 "of Windows that have the same version number (for example, Windows 7 and "
10706 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10707 "the latter is C<Server>)."
10711 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3562
10713 "For enterprise Linux guests, in future we intend this to return the product "
10714 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10715 "implemented at present."
10719 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3566
10721 "If the product variant could not be determined, then the string C<unknown> "
10726 #: ../fish/guestfish-actions.pod:2311
10728 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10729 "L</inspect-get-product-name>, L</inspect-get-major-version>."
10733 #: ../fish/guestfish-actions.pod:2315
10734 msgid "inspect-get-roots"
10738 #: ../fish/guestfish-actions.pod:2317
10741 " inspect-get-roots\n"
10746 #: ../fish/guestfish-actions.pod:2319
10748 "This function is a convenient way to get the list of root devices, as "
10749 "returned from a previous call to L</inspect-os>, but without redoing the "
10750 "whole inspection process."
10754 #: ../fish/guestfish-actions.pod:2323
10756 "This returns an empty list if either no root devices were found or the "
10757 "caller has not called L</inspect-os>."
10761 #: ../fish/guestfish-actions.pod:2328
10762 msgid "inspect-get-type"
10766 #: ../fish/guestfish-actions.pod:2330
10769 " inspect-get-type root\n"
10774 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3604
10776 "This returns the type of the inspected operating system. Currently defined "
10781 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3609
10786 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3611
10787 msgid "Any Linux-based operating system."
10791 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3615
10792 msgid "Any Microsoft Windows operating system."
10796 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3617
10797 msgid "\"freebsd\""
10801 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3619
10806 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3621
10811 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3623
10816 #: ../fish/guestfish-actions.pod:2353 ../src/guestfs-actions.pod:3625
10821 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3627
10826 #: ../fish/guestfish-actions.pod:2359 ../src/guestfs-actions.pod:3631
10827 msgid "The operating system type could not be determined."
10831 #: ../fish/guestfish-actions.pod:2368
10832 msgid "inspect-get-windows-current-control-set"
10836 #: ../fish/guestfish-actions.pod:2370
10839 " inspect-get-windows-current-control-set root\n"
10844 #: ../fish/guestfish-actions.pod:2372 ../src/guestfs-actions.pod:3651
10846 "This returns the Windows CurrentControlSet of the inspected guest. The "
10847 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10851 #: ../fish/guestfish-actions.pod:2375 ../src/guestfs-actions.pod:3654
10853 "This call assumes that the guest is Windows and that the Registry could be "
10854 "examined by inspection. If this is not the case then an error is returned."
10858 #: ../fish/guestfish-actions.pod:2381
10859 msgid "inspect-get-windows-systemroot"
10863 #: ../fish/guestfish-actions.pod:2383
10866 " inspect-get-windows-systemroot root\n"
10871 #: ../fish/guestfish-actions.pod:2385 ../src/guestfs-actions.pod:3671
10873 "This returns the Windows systemroot of the inspected guest. The systemroot "
10874 "is a directory path such as C</WINDOWS>."
10878 #: ../fish/guestfish-actions.pod:2388 ../src/guestfs-actions.pod:3674
10880 "This call assumes that the guest is Windows and that the systemroot could be "
10881 "determined by inspection. If this is not the case then an error is "
10886 #: ../fish/guestfish-actions.pod:2394
10887 msgid "inspect-is-live"
10891 #: ../fish/guestfish-actions.pod:2396
10894 " inspect-is-live root\n"
10899 #: ../fish/guestfish-actions.pod:2398
10901 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10902 "then this returns true if a live image was detected on the disk."
10906 #: ../fish/guestfish-actions.pod:2404
10907 msgid "inspect-is-multipart"
10911 #: ../fish/guestfish-actions.pod:2406
10914 " inspect-is-multipart root\n"
10919 #: ../fish/guestfish-actions.pod:2408
10921 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10922 "then this returns true if the disk is part of a set."
10926 #: ../fish/guestfish-actions.pod:2414
10927 msgid "inspect-is-netinst"
10931 #: ../fish/guestfish-actions.pod:2416
10934 " inspect-is-netinst root\n"
10939 #: ../fish/guestfish-actions.pod:2418
10941 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10942 "then this returns true if the disk is a network installer, ie. not a "
10943 "self-contained install CD but one which is likely to require network access "
10944 "to complete the install."
10948 #: ../fish/guestfish-actions.pod:2426
10949 msgid "inspect-list-applications"
10953 #: ../fish/guestfish-actions.pod:2428
10956 " inspect-list-applications root\n"
10961 #: ../fish/guestfish-actions.pod:2430 ../src/guestfs-actions.pod:3741
10962 msgid "Return the list of applications installed in the operating system."
10966 #: ../fish/guestfish-actions.pod:2432
10968 "I<Note:> This call works differently from other parts of the inspection "
10969 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10970 "then mount up the disks, before calling this. Listing applications is a "
10971 "significantly more difficult operation which requires access to the full "
10972 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10973 "are just returning data cached in the libguestfs handle, this call actually "
10974 "reads parts of the mounted filesystems during the call."
10978 #: ../fish/guestfish-actions.pod:2442 ../src/guestfs-actions.pod:3753
10980 "This returns an empty list if the inspection code was not able to determine "
10981 "the list of applications."
10985 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3756
10986 msgid "The application structure contains the following fields:"
10990 #: ../fish/guestfish-actions.pod:2449 ../src/guestfs-actions.pod:3760
10991 msgid "C<app_name>"
10995 #: ../fish/guestfish-actions.pod:2451 ../src/guestfs-actions.pod:3762
10997 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10998 "guests, this is the package name."
11002 #: ../fish/guestfish-actions.pod:2454 ../src/guestfs-actions.pod:3765
11003 msgid "C<app_display_name>"
11007 #: ../fish/guestfish-actions.pod:2456 ../src/guestfs-actions.pod:3767
11009 "The display name of the application, sometimes localized to the install "
11010 "language of the guest operating system."
11014 #: ../fish/guestfish-actions.pod:2459 ../src/guestfs-actions.pod:3770
11016 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11017 "to display something can use C<app_name> instead."
11021 #: ../fish/guestfish-actions.pod:2462 ../src/guestfs-actions.pod:3773
11022 msgid "C<app_epoch>"
11026 #: ../fish/guestfish-actions.pod:2464 ../src/guestfs-actions.pod:3775
11028 "For package managers which use epochs, this contains the epoch of the "
11029 "package (an integer). If unavailable, this is returned as C<0>."
11033 #: ../fish/guestfish-actions.pod:2467 ../src/guestfs-actions.pod:3778
11034 msgid "C<app_version>"
11038 #: ../fish/guestfish-actions.pod:2469 ../src/guestfs-actions.pod:3780
11040 "The version string of the application or package. If unavailable this is "
11041 "returned as an empty string C<\"\">."
11045 #: ../fish/guestfish-actions.pod:2472 ../src/guestfs-actions.pod:3783
11046 msgid "C<app_release>"
11050 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3785
11052 "The release string of the application or package, for package managers that "
11053 "use this. If unavailable this is returned as an empty string C<\"\">."
11057 #: ../fish/guestfish-actions.pod:2478 ../src/guestfs-actions.pod:3789
11058 msgid "C<app_install_path>"
11062 #: ../fish/guestfish-actions.pod:2480 ../src/guestfs-actions.pod:3791
11064 "The installation path of the application (on operating systems such as "
11065 "Windows which use installation paths). This path is in the format used by "
11066 "the guest operating system, it is not a libguestfs path."
11070 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3796
11071 msgid "If unavailable this is returned as an empty string C<\"\">."
11075 #: ../fish/guestfish-actions.pod:2487 ../src/guestfs-actions.pod:3798
11076 msgid "C<app_trans_path>"
11080 #: ../fish/guestfish-actions.pod:2489 ../src/guestfs-actions.pod:3800
11082 "The install path translated into a libguestfs path. If unavailable this is "
11083 "returned as an empty string C<\"\">."
11087 #: ../fish/guestfish-actions.pod:2492 ../src/guestfs-actions.pod:3803
11088 msgid "C<app_publisher>"
11092 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3805
11094 "The name of the publisher of the application, for package managers that use "
11095 "this. If unavailable this is returned as an empty string C<\"\">."
11099 #: ../fish/guestfish-actions.pod:2498 ../src/guestfs-actions.pod:3809
11104 #: ../fish/guestfish-actions.pod:2500 ../src/guestfs-actions.pod:3811
11106 "The URL (eg. upstream URL) of the application. If unavailable this is "
11107 "returned as an empty string C<\"\">."
11111 #: ../fish/guestfish-actions.pod:2503 ../src/guestfs-actions.pod:3814
11112 msgid "C<app_source_package>"
11116 #: ../fish/guestfish-actions.pod:2505 ../src/guestfs-actions.pod:3816
11118 "For packaging systems which support this, the name of the source package. "
11119 "If unavailable this is returned as an empty string C<\"\">."
11123 #: ../fish/guestfish-actions.pod:2508 ../src/guestfs-actions.pod:3819
11124 msgid "C<app_summary>"
11128 #: ../fish/guestfish-actions.pod:2510 ../src/guestfs-actions.pod:3821
11130 "A short (usually one line) description of the application or package. If "
11131 "unavailable this is returned as an empty string C<\"\">."
11135 #: ../fish/guestfish-actions.pod:2513 ../src/guestfs-actions.pod:3824
11136 msgid "C<app_description>"
11140 #: ../fish/guestfish-actions.pod:2515 ../src/guestfs-actions.pod:3826
11142 "A longer description of the application or package. If unavailable this is "
11143 "returned as an empty string C<\"\">."
11147 #: ../fish/guestfish-actions.pod:2522
11152 #: ../fish/guestfish-actions.pod:2524
11160 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3844
11162 "This function uses other libguestfs functions and certain heuristics to "
11163 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11164 "for operating systems."
11168 #: ../fish/guestfish-actions.pod:2530 ../src/guestfs-actions.pod:3848
11169 msgid "The list returned is empty if no operating systems were found."
11173 #: ../fish/guestfish-actions.pod:2532 ../src/guestfs-actions.pod:3850
11175 "If one operating system was found, then this returns a list with a single "
11176 "element, which is the name of the root filesystem of this operating system. "
11177 "It is also possible for this function to return a list containing more than "
11178 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11179 "element being the root filesystem of one of the operating systems."
11183 #: ../fish/guestfish-actions.pod:2539
11185 "You can pass the root string(s) returned to other L</inspect-get-*> "
11186 "functions in order to query further information about each operating system, "
11187 "such as the name and version."
11191 #: ../fish/guestfish-actions.pod:2544
11193 "This function uses other libguestfs features such as L</mount-ro> and "
11194 "L</umount-all> in order to mount and unmount filesystems and look at the "
11195 "contents. This should be called with no disks currently mounted. The "
11196 "function may also use Augeas, so any existing Augeas handle will be closed."
11200 #: ../fish/guestfish-actions.pod:2550 ../src/guestfs-actions.pod:3868
11202 "This function cannot decrypt encrypted disks. The caller must do that first "
11203 "(supplying the necessary keys) if the disk is encrypted."
11207 #: ../fish/guestfish-actions.pod:2556 ../fish/guestfish-actions.pod:2754 ../fish/guestfish-actions.pod:2819
11208 msgid "See also L</list-filesystems>."
11212 #: ../fish/guestfish-actions.pod:2558
11213 msgid "is-blockdev"
11217 #: ../fish/guestfish-actions.pod:2560
11220 " is-blockdev path\n"
11225 #: ../fish/guestfish-actions.pod:2562 ../src/guestfs-actions.pod:3888
11227 "This returns C<true> if and only if there is a block device with the given "
11232 #: ../fish/guestfish-actions.pod:2565 ../fish/guestfish-actions.pod:2583 ../fish/guestfish-actions.pod:2602 ../fish/guestfish-actions.pod:2611 ../fish/guestfish-actions.pod:2621 ../fish/guestfish-actions.pod:2655 ../fish/guestfish-actions.pod:2664
11233 msgid "See also L</stat>."
11237 #: ../fish/guestfish-actions.pod:2567
11242 #: ../fish/guestfish-actions.pod:2569
11250 #: ../fish/guestfish-actions.pod:2571 ../src/guestfs-actions.pod:3902
11252 "This returns true iff this handle is busy processing a command (in the "
11257 #: ../fish/guestfish-actions.pod:2576
11262 #: ../fish/guestfish-actions.pod:2578
11265 " is-chardev path\n"
11270 #: ../fish/guestfish-actions.pod:2580 ../src/guestfs-actions.pod:3917
11272 "This returns C<true> if and only if there is a character device with the "
11273 "given C<path> name."
11277 #: ../fish/guestfish-actions.pod:2585
11282 #: ../fish/guestfish-actions.pod:2587
11290 #: ../fish/guestfish-actions.pod:2589 ../src/guestfs-actions.pod:3931
11292 "This returns true iff this handle is being configured (in the C<CONFIG> "
11297 #: ../fish/guestfish-actions.pod:2594
11302 #: ../fish/guestfish-actions.pod:2596
11310 #: ../fish/guestfish-actions.pod:2598 ../src/guestfs-actions.pod:3946
11312 "This returns C<true> if and only if there is a directory with the given "
11313 "C<path> name. Note that it returns false for other objects like files."
11317 #: ../fish/guestfish-actions.pod:2604
11322 #: ../fish/guestfish-actions.pod:2606
11330 #: ../fish/guestfish-actions.pod:2608 ../src/guestfs-actions.pod:3962
11332 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11333 "given C<path> name."
11337 #: ../fish/guestfish-actions.pod:2613
11342 #: ../fish/guestfish-actions.pod:2615
11350 #: ../fish/guestfish-actions.pod:2617 ../src/guestfs-actions.pod:3977
11352 "This returns C<true> if and only if there is a regular file with the given "
11353 "C<path> name. Note that it returns false for other objects like "
11358 #: ../fish/guestfish-actions.pod:2623
11359 msgid "is-launching"
11363 #: ../fish/guestfish-actions.pod:2625
11371 #: ../fish/guestfish-actions.pod:2627 ../src/guestfs-actions.pod:3992
11373 "This returns true iff this handle is launching the subprocess (in the "
11374 "C<LAUNCHING> state)."
11378 #: ../fish/guestfish-actions.pod:2632
11383 #: ../fish/guestfish-actions.pod:2634
11391 #: ../fish/guestfish-actions.pod:2636 ../src/guestfs-actions.pod:4007
11393 "This command tests whether C<device> is a logical volume, and returns true "
11394 "iff this is the case."
11398 #: ../fish/guestfish-actions.pod:2639
11403 #: ../fish/guestfish-actions.pod:2641
11411 #: ../fish/guestfish-actions.pod:2643 ../src/guestfs-actions.pod:4019
11413 "This returns true iff this handle is ready to accept commands (in the "
11418 #: ../fish/guestfish-actions.pod:2648
11423 #: ../fish/guestfish-actions.pod:2650
11426 " is-socket path\n"
11431 #: ../fish/guestfish-actions.pod:2652 ../src/guestfs-actions.pod:4034
11433 "This returns C<true> if and only if there is a Unix domain socket with the "
11434 "given C<path> name."
11438 #: ../fish/guestfish-actions.pod:2657
11443 #: ../fish/guestfish-actions.pod:2659
11446 " is-symlink path\n"
11451 #: ../fish/guestfish-actions.pod:2661 ../src/guestfs-actions.pod:4049
11453 "This returns C<true> if and only if there is a symbolic link with the given "
11458 #: ../fish/guestfish-actions.pod:2666
11463 #: ../fish/guestfish-actions.pod:2668
11471 #: ../fish/guestfish-actions.pod:2670 ../src/guestfs-actions.pod:4064
11473 "This returns true iff the file exists and the file is empty or it contains "
11478 #: ../fish/guestfish-actions.pod:2673
11479 msgid "is-zero-device"
11483 #: ../fish/guestfish-actions.pod:2675
11486 " is-zero-device device\n"
11491 #: ../fish/guestfish-actions.pod:2677 ../src/guestfs-actions.pod:4077
11492 msgid "This returns true iff the device exists and contains all zero bytes."
11496 #: ../fish/guestfish-actions.pod:2679 ../src/guestfs-actions.pod:4079
11497 msgid "Note that for large devices this can take a long time to run."
11501 #: ../fish/guestfish-actions.pod:2681
11502 msgid "kill-subprocess"
11506 #: ../fish/guestfish-actions.pod:2683
11509 " kill-subprocess\n"
11514 #: ../fish/guestfish-actions.pod:2685 ../src/guestfs-actions.pod:4090
11515 msgid "This kills the qemu subprocess. You should never need to call this."
11519 #: ../fish/guestfish-actions.pod:2687
11524 #: ../fish/guestfish-actions.pod:2689
11529 #: ../fish/guestfish-actions.pod:2691
11537 #: ../fish/guestfish-actions.pod:2693 ../src/guestfs-actions.pod:4101
11539 "Internally libguestfs is implemented by running a virtual machine using "
11544 #: ../fish/guestfish-actions.pod:2696 ../src/guestfs-actions.pod:4104
11546 "You should call this after configuring the handle (eg. adding drives) but "
11547 "before performing any actions."
11551 #: ../fish/guestfish-actions.pod:2699
11556 #: ../fish/guestfish-actions.pod:2701
11559 " lchown owner group path\n"
11564 #: ../fish/guestfish-actions.pod:2703
11566 "Change the file owner to C<owner> and group to C<group>. This is like "
11567 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
11572 #: ../fish/guestfish-actions.pod:2711
11577 #: ../fish/guestfish-actions.pod:2713
11580 " lgetxattr path name\n"
11585 #: ../fish/guestfish-actions.pod:2715 ../src/guestfs-actions.pod:4144
11587 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11588 "is a symlink, then this call returns an extended attribute from the symlink."
11592 #: ../fish/guestfish-actions.pod:2729
11593 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11597 #: ../fish/guestfish-actions.pod:2731
11602 #: ../fish/guestfish-actions.pod:2733
11605 " lgetxattrs path\n"
11610 #: ../fish/guestfish-actions.pod:2735
11612 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11613 "it returns the extended attributes of the link itself."
11617 #: ../fish/guestfish-actions.pod:2739
11622 #: ../fish/guestfish-actions.pod:2741
11630 #: ../fish/guestfish-actions.pod:2743 ../src/guestfs-actions.pod:4187
11632 "List all 9p filesystems attached to the guest. A list of mount tags is "
11637 #: ../fish/guestfish-actions.pod:2746
11638 msgid "list-devices"
11642 #: ../fish/guestfish-actions.pod:2748
11650 #: ../fish/guestfish-actions.pod:2750 ../src/guestfs-actions.pod:4201
11651 msgid "List all the block devices."
11655 #: ../fish/guestfish-actions.pod:2752 ../src/guestfs-actions.pod:4203
11656 msgid "The full block device names are returned, eg. C</dev/sda>."
11660 #: ../fish/guestfish-actions.pod:2756
11661 msgid "list-dm-devices"
11665 #: ../fish/guestfish-actions.pod:2758
11668 " list-dm-devices\n"
11673 #: ../fish/guestfish-actions.pod:2760 ../src/guestfs-actions.pod:4218
11674 msgid "List all device mapper devices."
11678 #: ../fish/guestfish-actions.pod:2762
11680 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11681 "previous call to L</luks-open>."
11685 #: ../fish/guestfish-actions.pod:2765
11687 "Device mapper devices which correspond to logical volumes are I<not> "
11688 "returned in this list. Call L</lvs> if you want to list logical volumes."
11692 #: ../fish/guestfish-actions.pod:2769
11693 msgid "list-filesystems"
11697 #: ../fish/guestfish-actions.pod:2771
11700 " list-filesystems\n"
11705 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4238
11707 "This inspection command looks for filesystems on partitions, block devices "
11708 "and logical volumes, returning a list of devices containing filesystems and "
11713 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4242
11715 "The return value is a hash, where the keys are the devices containing "
11716 "filesystems, and the values are the filesystem types. For example:"
11720 #: ../fish/guestfish-actions.pod:2781 ../src/guestfs-actions.pod:4246
11723 " \"/dev/sda1\" => \"ntfs\"\n"
11724 " \"/dev/sda2\" => \"ext2\"\n"
11725 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11726 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11731 #: ../fish/guestfish-actions.pod:2786 ../src/guestfs-actions.pod:4251
11733 "The value can have the special value \"unknown\", meaning the content of the "
11734 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11738 #: ../fish/guestfish-actions.pod:2790
11740 "This command runs other libguestfs commands, which might include L</mount> "
11741 "and L</umount>, and therefore you should use this soon after launch and only "
11742 "when nothing is mounted."
11746 #: ../fish/guestfish-actions.pod:2794
11748 "Not all of the filesystems returned will be mountable. In particular, swap "
11749 "partitions are returned in the list. Also this command does not check that "
11750 "each filesystem found is valid and mountable, and some filesystems might be "
11751 "mountable but require special options. Filesystems may not all belong to a "
11752 "single logical operating system (use L</inspect-os> to look for OSes)."
11756 #: ../fish/guestfish-actions.pod:2802
11757 msgid "list-md-devices"
11761 #: ../fish/guestfish-actions.pod:2804
11764 " list-md-devices\n"
11769 #: ../fish/guestfish-actions.pod:2806 ../src/guestfs-actions.pod:4280
11770 msgid "List all Linux md devices."
11774 #: ../fish/guestfish-actions.pod:2808
11775 msgid "list-partitions"
11779 #: ../fish/guestfish-actions.pod:2810
11782 " list-partitions\n"
11787 #: ../fish/guestfish-actions.pod:2812 ../src/guestfs-actions.pod:4293
11788 msgid "List all the partitions detected on all block devices."
11792 #: ../fish/guestfish-actions.pod:2814 ../src/guestfs-actions.pod:4295
11793 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11797 #: ../fish/guestfish-actions.pod:2816
11799 "This does not return logical volumes. For that you will need to call "
11804 #: ../fish/guestfish-actions.pod:2821
11809 #: ../fish/guestfish-actions.pod:2823
11817 #: ../fish/guestfish-actions.pod:2825 ../src/guestfs-actions.pod:4314
11819 "List the files in C<directory> (relative to the root directory, there is no "
11820 "cwd) in the format of 'ls -la'."
11824 #: ../fish/guestfish-actions.pod:2828 ../src/guestfs-actions.pod:4317
11826 "This command is mostly useful for interactive sessions. It is I<not> "
11827 "intended that you try to parse the output string."
11831 #: ../fish/guestfish-actions.pod:2831
11836 #: ../fish/guestfish-actions.pod:2833
11839 " ln target linkname\n"
11844 #: ../fish/guestfish-actions.pod:2835 ../src/guestfs-actions.pod:4332
11845 msgid "This command creates a hard link using the C<ln> command."
11849 #: ../fish/guestfish-actions.pod:2837
11854 #: ../fish/guestfish-actions.pod:2839
11857 " ln-f target linkname\n"
11862 #: ../fish/guestfish-actions.pod:2841 ../src/guestfs-actions.pod:4345
11864 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11865 "option removes the link (C<linkname>) if it exists already."
11869 #: ../fish/guestfish-actions.pod:2844
11874 #: ../fish/guestfish-actions.pod:2846
11877 " ln-s target linkname\n"
11882 #: ../fish/guestfish-actions.pod:2848 ../src/guestfs-actions.pod:4359
11883 msgid "This command creates a symbolic link using the C<ln -s> command."
11887 #: ../fish/guestfish-actions.pod:2850
11892 #: ../fish/guestfish-actions.pod:2852
11895 " ln-sf target linkname\n"
11900 #: ../fish/guestfish-actions.pod:2854 ../src/guestfs-actions.pod:4372
11902 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11903 "option removes the link (C<linkname>) if it exists already."
11907 #: ../fish/guestfish-actions.pod:2857
11908 msgid "lremovexattr"
11912 #: ../fish/guestfish-actions.pod:2859
11915 " lremovexattr xattr path\n"
11920 #: ../fish/guestfish-actions.pod:2861
11922 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11923 "it removes an extended attribute of the link itself."
11927 #: ../fish/guestfish-actions.pod:2865
11932 #: ../fish/guestfish-actions.pod:2867
11940 #: ../fish/guestfish-actions.pod:2869 ../src/guestfs-actions.pod:4400
11942 "List the files in C<directory> (relative to the root directory, there is no "
11943 "cwd). The '.' and '..' entries are not returned, but hidden files are "
11948 #: ../fish/guestfish-actions.pod:2873
11950 "This command is mostly useful for interactive sessions. Programs should "
11951 "probably use L</readdir> instead."
11955 #: ../fish/guestfish-actions.pod:2876
11960 #: ../fish/guestfish-actions.pod:2878
11963 " lsetxattr xattr val vallen path\n"
11968 #: ../fish/guestfish-actions.pod:2880
11970 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11971 "sets an extended attribute of the link itself."
11975 #: ../fish/guestfish-actions.pod:2884
11980 #: ../fish/guestfish-actions.pod:2886
11988 #: ../fish/guestfish-actions.pod:2888 ../fish/guestfish-actions.pod:4786 ../src/guestfs-actions.pod:4436 ../src/guestfs-actions.pod:7366
11989 msgid "Returns file information for the given C<path>."
11993 #: ../fish/guestfish-actions.pod:2890
11995 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11996 "the link is stat-ed, not the file it refers to."
12000 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4442
12001 msgid "This is the same as the C<lstat(2)> system call."
12005 #: ../fish/guestfish-actions.pod:2896
12010 #: ../fish/guestfish-actions.pod:2898
12013 " lstatlist path 'names ...'\n"
12018 #: ../fish/guestfish-actions.pod:2900
12020 "This call allows you to perform the L</lstat> operation on multiple files, "
12021 "where all files are in the directory C<path>. C<names> is the list of files "
12022 "from this directory."
12026 #: ../fish/guestfish-actions.pod:2904 ../src/guestfs-actions.pod:4461
12028 "On return you get a list of stat structs, with a one-to-one correspondence "
12029 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12030 "then the C<ino> field of that structure is set to C<-1>."
12034 #: ../fish/guestfish-actions.pod:2909
12036 "This call is intended for programs that want to efficiently list a directory "
12037 "contents without making many round-trips. See also L</lxattrlist> for a "
12038 "similarly efficient call for getting extended attributes. Very long "
12039 "directory listings might cause the protocol message size to be exceeded, "
12040 "causing this call to fail. The caller must split up such requests into "
12041 "smaller groups of names."
12045 #: ../fish/guestfish-actions.pod:2917
12046 msgid "luks-add-key"
12050 #: ../fish/guestfish-actions.pod:2919
12053 " luks-add-key device keyslot\n"
12058 #: ../fish/guestfish-actions.pod:2921 ../src/guestfs-actions.pod:4489
12060 "This command adds a new key on LUKS device C<device>. C<key> is any "
12061 "existing key, and is used to access the device. C<newkey> is the new key to "
12062 "add. C<keyslot> is the key slot that will be replaced."
12066 #: ../fish/guestfish-actions.pod:2926
12068 "Note that if C<keyslot> already contains a key, then this command will "
12069 "fail. You have to use L</luks-kill-slot> first to remove that key."
12073 #: ../fish/guestfish-actions.pod:2930 ../fish/guestfish-actions.pod:2952 ../fish/guestfish-actions.pod:2962 ../fish/guestfish-actions.pod:2973 ../fish/guestfish-actions.pod:2999 ../fish/guestfish-actions.pod:3009
12075 "This command has one or more key or passphrase parameters. Guestfish will "
12076 "prompt for these separately."
12080 #: ../fish/guestfish-actions.pod:2933
12085 #: ../fish/guestfish-actions.pod:2935
12088 " luks-close device\n"
12093 #: ../fish/guestfish-actions.pod:2937
12095 "This closes a LUKS device that was created earlier by L</luks-open> or "
12096 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
12097 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12098 "underlying block device."
12102 #: ../fish/guestfish-actions.pod:2943
12103 msgid "luks-format"
12107 #: ../fish/guestfish-actions.pod:2945
12110 " luks-format device keyslot\n"
12115 #: ../fish/guestfish-actions.pod:2947 ../src/guestfs-actions.pod:4530
12117 "This command erases existing data on C<device> and formats the device as a "
12118 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12119 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12123 #: ../fish/guestfish-actions.pod:2955
12124 msgid "luks-format-cipher"
12128 #: ../fish/guestfish-actions.pod:2957
12131 " luks-format-cipher device keyslot cipher\n"
12136 #: ../fish/guestfish-actions.pod:2959
12138 "This command is the same as L</luks-format> but it also allows you to set "
12139 "the C<cipher> used."
12143 #: ../fish/guestfish-actions.pod:2965
12144 msgid "luks-kill-slot"
12148 #: ../fish/guestfish-actions.pod:2967
12151 " luks-kill-slot device keyslot\n"
12156 #: ../fish/guestfish-actions.pod:2969 ../src/guestfs-actions.pod:4571
12158 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12159 "device C<device>. C<key> must be one of the I<other> keys."
12163 #: ../fish/guestfish-actions.pod:2976
12168 #: ../fish/guestfish-actions.pod:2978
12171 " luks-open device mapname\n"
12176 #: ../fish/guestfish-actions.pod:2980 ../src/guestfs-actions.pod:4591
12178 "This command opens a block device which has been encrypted according to the "
12179 "Linux Unified Key Setup (LUKS) standard."
12183 #: ../fish/guestfish-actions.pod:2983 ../src/guestfs-actions.pod:4594
12184 msgid "C<device> is the encrypted block device or partition."
12188 #: ../fish/guestfish-actions.pod:2985 ../src/guestfs-actions.pod:4596
12190 "The caller must supply one of the keys associated with the LUKS block "
12191 "device, in the C<key> parameter."
12195 #: ../fish/guestfish-actions.pod:2988 ../src/guestfs-actions.pod:4599
12197 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12198 "writes to this block device are decrypted from and encrypted to the "
12199 "underlying C<device> respectively."
12203 #: ../fish/guestfish-actions.pod:2992
12205 "If this block device contains LVM volume groups, then calling L</vgscan> "
12206 "followed by L</vg-activate-all> will make them visible."
12210 #: ../fish/guestfish-actions.pod:2996
12211 msgid "Use L</list-dm-devices> to list all device mapper devices."
12215 #: ../fish/guestfish-actions.pod:3002
12216 msgid "luks-open-ro"
12220 #: ../fish/guestfish-actions.pod:3004
12223 " luks-open-ro device mapname\n"
12228 #: ../fish/guestfish-actions.pod:3006
12230 "This is the same as L</luks-open> except that a read-only mapping is "
12235 #: ../fish/guestfish-actions.pod:3012
12240 #: ../fish/guestfish-actions.pod:3014
12243 " lvcreate logvol volgroup mbytes\n"
12248 #: ../fish/guestfish-actions.pod:3016 ../src/guestfs-actions.pod:4645
12250 "This creates an LVM logical volume called C<logvol> on the volume group "
12251 "C<volgroup>, with C<size> megabytes."
12255 #: ../fish/guestfish-actions.pod:3019
12256 msgid "lvm-canonical-lv-name"
12260 #: ../fish/guestfish-actions.pod:3021
12263 " lvm-canonical-lv-name lvname\n"
12268 #: ../fish/guestfish-actions.pod:3023 ../src/guestfs-actions.pod:4658
12270 "This converts alternative naming schemes for LVs that you might find to the "
12271 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
12276 #: ../fish/guestfish-actions.pod:3027 ../src/guestfs-actions.pod:4662
12278 "This command returns an error if the C<lvname> parameter does not refer to a "
12283 #: ../fish/guestfish-actions.pod:3030
12284 msgid "See also L</is-lv>."
12288 #: ../fish/guestfish-actions.pod:3032
12289 msgid "lvm-clear-filter"
12293 #: ../fish/guestfish-actions.pod:3034
12296 " lvm-clear-filter\n"
12301 #: ../fish/guestfish-actions.pod:3036
12303 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12308 #: ../fish/guestfish-actions.pod:3039 ../fish/guestfish-actions.pod:3067 ../src/guestfs-actions.pod:4680 ../src/guestfs-actions.pod:4719
12309 msgid "This command also clears the LVM cache and performs a volume group scan."
12313 #: ../fish/guestfish-actions.pod:3042
12314 msgid "lvm-remove-all"
12318 #: ../fish/guestfish-actions.pod:3044
12321 " lvm-remove-all\n"
12326 #: ../fish/guestfish-actions.pod:3046 ../src/guestfs-actions.pod:4692
12328 "This command removes all LVM logical volumes, volume groups and physical "
12333 #: ../fish/guestfish-actions.pod:3049
12334 msgid "lvm-set-filter"
12338 #: ../fish/guestfish-actions.pod:3051
12341 " lvm-set-filter 'devices ...'\n"
12346 #: ../fish/guestfish-actions.pod:3053 ../src/guestfs-actions.pod:4705
12348 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12349 "block devices in the list C<devices>, and will ignore all other attached "
12354 #: ../fish/guestfish-actions.pod:3057 ../src/guestfs-actions.pod:4709
12356 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12357 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12358 "there are two types of duplication possible: either cloned PVs/VGs which "
12359 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12360 "same name. In normal operation you cannot create this situation, but you "
12361 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12362 "inside the LVM metadata."
12366 #: ../fish/guestfish-actions.pod:3070 ../src/guestfs-actions.pod:4722
12367 msgid "You can filter whole block devices or individual partitions."
12371 #: ../fish/guestfish-actions.pod:3072 ../src/guestfs-actions.pod:4724
12373 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12374 "filesystem), even if you are not filtering out that VG."
12378 #: ../fish/guestfish-actions.pod:3076
12383 #: ../fish/guestfish-actions.pod:3078
12386 " lvremove device\n"
12391 #: ../fish/guestfish-actions.pod:3080 ../src/guestfs-actions.pod:4738
12393 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12394 "LV, such as C</dev/VG/LV>."
12398 #: ../fish/guestfish-actions.pod:3083 ../src/guestfs-actions.pod:4741
12400 "You can also remove all LVs in a volume group by specifying the VG name, "
12405 #: ../fish/guestfish-actions.pod:3086
12410 #: ../fish/guestfish-actions.pod:3088
12413 " lvrename logvol newlogvol\n"
12418 #: ../fish/guestfish-actions.pod:3090 ../src/guestfs-actions.pod:4755
12419 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12423 #: ../fish/guestfish-actions.pod:3092
12428 #: ../fish/guestfish-actions.pod:3094
12431 " lvresize device mbytes\n"
12436 #: ../fish/guestfish-actions.pod:3096 ../src/guestfs-actions.pod:4768
12438 "This resizes (expands or shrinks) an existing LVM logical volume to "
12439 "C<mbytes>. When reducing, data in the reduced part is lost."
12443 #: ../fish/guestfish-actions.pod:3100
12444 msgid "lvresize-free"
12448 #: ../fish/guestfish-actions.pod:3102
12451 " lvresize-free lv percent\n"
12456 #: ../fish/guestfish-actions.pod:3104 ../src/guestfs-actions.pod:4783
12458 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12459 "remaining free space in the volume group. Commonly you would call this with "
12460 "pc = 100 which expands the logical volume as much as possible, using all "
12461 "remaining free space in the volume group."
12465 #: ../fish/guestfish-actions.pod:3110
12470 #: ../fish/guestfish-actions.pod:3112
12478 #: ../fish/guestfish-actions.pod:3114 ../src/guestfs-actions.pod:4798
12480 "List all the logical volumes detected. This is the equivalent of the "
12481 "L<lvs(8)> command."
12485 #: ../fish/guestfish-actions.pod:3117 ../src/guestfs-actions.pod:4801
12487 "This returns a list of the logical volume device names "
12488 "(eg. C</dev/VolGroup00/LogVol00>)."
12492 #: ../fish/guestfish-actions.pod:3120
12493 msgid "See also L</lvs-full>, L</list-filesystems>."
12497 #: ../fish/guestfish-actions.pod:3122
12502 #: ../fish/guestfish-actions.pod:3124
12510 #: ../fish/guestfish-actions.pod:3126 ../src/guestfs-actions.pod:4817
12512 "List all the logical volumes detected. This is the equivalent of the "
12513 "L<lvs(8)> command. The \"full\" version includes all fields."
12517 #: ../fish/guestfish-actions.pod:3129
12522 #: ../fish/guestfish-actions.pod:3131
12530 #: ../fish/guestfish-actions.pod:3133 ../src/guestfs-actions.pod:4832
12531 msgid "This command returns the UUID of the LVM LV C<device>."
12535 #: ../fish/guestfish-actions.pod:3135
12540 #: ../fish/guestfish-actions.pod:3137
12543 " lxattrlist path 'names ...'\n"
12548 #: ../fish/guestfish-actions.pod:3139 ../src/guestfs-actions.pod:4846
12550 "This call allows you to get the extended attributes of multiple files, where "
12551 "all files are in the directory C<path>. C<names> is the list of files from "
12556 #: ../fish/guestfish-actions.pod:3143 ../src/guestfs-actions.pod:4850
12558 "On return you get a flat list of xattr structs which must be interpreted "
12559 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12560 "C<attrval> in this struct is zero-length to indicate there was an error "
12561 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12562 "number (the number of following attributes for this file, which could be "
12563 "C<\"0\">). Then after the first xattr struct are the zero or more "
12564 "attributes for the first named file. This repeats for the second and "
12565 "subsequent files."
12569 #: ../fish/guestfish-actions.pod:3153
12571 "This call is intended for programs that want to efficiently list a directory "
12572 "contents without making many round-trips. See also L</lstatlist> for a "
12573 "similarly efficient call for getting standard stats. Very long directory "
12574 "listings might cause the protocol message size to be exceeded, causing this "
12575 "call to fail. The caller must split up such requests into smaller groups of "
12580 #: ../fish/guestfish-actions.pod:3161
12585 #: ../fish/guestfish-actions.pod:3163
12588 " md-create name 'devices ...' [missingbitmap:N] [nrdevices:N] [spare:N] "
12589 "[chunk:N] [level:..]\n"
12594 #: ../fish/guestfish-actions.pod:3165 ../src/guestfs-actions.pod:4893
12596 "Create a Linux md (RAID) device named C<name> on the devices in the list "
12601 #: ../fish/guestfish-actions.pod:3172 ../src/guestfs-actions.pod:4900
12602 msgid "C<missingbitmap>"
12606 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4902
12608 "A bitmap of missing devices. If a bit is set it means that a missing device "
12609 "is added to the array. The least significant bit corresponds to the first "
12610 "device in the array."
12614 #: ../fish/guestfish-actions.pod:3178 ../src/guestfs-actions.pod:4906
12615 msgid "As examples:"
12619 #: ../fish/guestfish-actions.pod:3180 ../src/guestfs-actions.pod:4908
12621 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x1> then the resulting "
12622 "array would be C<[E<lt>missingE<gt>, \"/dev/sda\"]>."
12626 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4911
12628 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x2> then the resulting "
12629 "array would be C<[\"/dev/sda\", E<lt>missingE<gt>]>."
12633 #: ../fish/guestfish-actions.pod:3186 ../src/guestfs-actions.pod:4914
12634 msgid "This defaults to C<0> (no missing devices)."
12638 #: ../fish/guestfish-actions.pod:3188 ../src/guestfs-actions.pod:4916
12640 "The length of C<devices> + the number of bits set in C<missingbitmap> must "
12641 "equal C<nrdevices> + C<spare>."
12645 #: ../fish/guestfish-actions.pod:3191 ../src/guestfs-actions.pod:4919
12646 msgid "C<nrdevices>"
12650 #: ../fish/guestfish-actions.pod:3193 ../src/guestfs-actions.pod:4921
12651 msgid "The number of active RAID devices."
12655 #: ../fish/guestfish-actions.pod:3195 ../src/guestfs-actions.pod:4923
12657 "If not set, this defaults to the length of C<devices> plus the number of "
12658 "bits set in C<missingbitmap>."
12662 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4926
12667 #: ../fish/guestfish-actions.pod:3200 ../src/guestfs-actions.pod:4928
12668 msgid "The number of spare devices."
12672 #: ../fish/guestfish-actions.pod:3202 ../src/guestfs-actions.pod:4930
12673 msgid "If not set, this defaults to C<0>."
12677 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4932
12682 #: ../fish/guestfish-actions.pod:3206 ../src/guestfs-actions.pod:4934
12683 msgid "The chunk size in bytes."
12687 #: ../fish/guestfish-actions.pod:3208 ../fish/guestfish-actions.pod:3230 ../src/guestfs-actions.pod:4936 ../src/guestfs-actions.pod:4984
12692 #: ../fish/guestfish-actions.pod:3210 ../src/guestfs-actions.pod:4938
12694 "The RAID level, which can be one of: I<linear>, I<raid0>, I<0>, I<stripe>, "
12695 "I<raid1>, I<1>, I<mirror>, I<raid4>, I<4>, I<raid5>, I<5>, I<raid6>, I<6>, "
12696 "I<raid10>, I<10>. Some of these are synonymous, and more levels may be "
12701 #: ../fish/guestfish-actions.pod:3215 ../src/guestfs-actions.pod:4943
12702 msgid "If not set, this defaults to C<raid1>."
12706 #: ../fish/guestfish-actions.pod:3221
12711 #: ../fish/guestfish-actions.pod:3223
12719 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4979
12721 "This command exposes the output of 'mdadm -DY <md>'. The following fields "
12722 "are usually present in the returned hash. Other fields may also be present."
12726 #: ../fish/guestfish-actions.pod:3232 ../src/guestfs-actions.pod:4986
12727 msgid "The raid level of the MD device."
12731 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4988
12736 #: ../fish/guestfish-actions.pod:3236 ../src/guestfs-actions.pod:4990
12737 msgid "The number of underlying devices in the MD device."
12741 #: ../fish/guestfish-actions.pod:3238 ../src/guestfs-actions.pod:4992
12742 msgid "C<metadata>"
12746 #: ../fish/guestfish-actions.pod:3240 ../src/guestfs-actions.pod:4994
12747 msgid "The metadata version used."
12751 #: ../fish/guestfish-actions.pod:3242 ../src/guestfs-actions.pod:4996
12756 #: ../fish/guestfish-actions.pod:3244 ../src/guestfs-actions.pod:4998
12757 msgid "The UUID of the MD device."
12761 #: ../fish/guestfish-actions.pod:3248 ../src/guestfs-actions.pod:5002
12762 msgid "The name of the MD device."
12766 #: ../fish/guestfish-actions.pod:3252
12771 #: ../fish/guestfish-actions.pod:3254
12779 #: ../fish/guestfish-actions.pod:3256 ../src/guestfs-actions.pod:5018
12781 "This command deactivates the MD array named C<md>. The device is stopped, "
12782 "but it is not destroyed or zeroed."
12786 #: ../fish/guestfish-actions.pod:3259
12791 #: ../fish/guestfish-actions.pod:3261
12799 #: ../fish/guestfish-actions.pod:3263 ../src/guestfs-actions.pod:5029
12800 msgid "Create a directory named C<path>."
12804 #: ../fish/guestfish-actions.pod:3265
12809 #: ../fish/guestfish-actions.pod:3267
12812 " mkdir-mode path mode\n"
12817 #: ../fish/guestfish-actions.pod:3269 ../src/guestfs-actions.pod:5042
12819 "This command creates a directory, setting the initial permissions of the "
12820 "directory to C<mode>."
12824 #: ../fish/guestfish-actions.pod:3272 ../src/guestfs-actions.pod:5045
12826 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12827 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12832 #: ../fish/guestfish-actions.pod:3276
12833 msgid "See also L</mkdir>, L</umask>"
12837 #: ../fish/guestfish-actions.pod:3278
12842 #: ../fish/guestfish-actions.pod:3280
12850 #: ../fish/guestfish-actions.pod:3282 ../src/guestfs-actions.pod:5061
12852 "Create a directory named C<path>, creating any parent directories as "
12853 "necessary. This is like the C<mkdir -p> shell command."
12857 #: ../fish/guestfish-actions.pod:3285
12862 #: ../fish/guestfish-actions.pod:3287
12865 " mkdtemp template\n"
12870 #: ../fish/guestfish-actions.pod:3289 ../src/guestfs-actions.pod:5074
12872 "This command creates a temporary directory. The C<template> parameter "
12873 "should be a full pathname for the temporary directory name with the final "
12874 "six characters being \"XXXXXX\"."
12878 #: ../fish/guestfish-actions.pod:3294 ../src/guestfs-actions.pod:5079
12880 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12881 "being suitable for Windows filesystems."
12885 #: ../fish/guestfish-actions.pod:3297 ../src/guestfs-actions.pod:5082
12886 msgid "The name of the temporary directory that was created is returned."
12890 #: ../fish/guestfish-actions.pod:3300 ../src/guestfs-actions.pod:5085
12891 msgid "The temporary directory is created with mode 0700 and is owned by root."
12895 #: ../fish/guestfish-actions.pod:3303 ../src/guestfs-actions.pod:5088
12897 "The caller is responsible for deleting the temporary directory and its "
12898 "contents after use."
12902 #: ../fish/guestfish-actions.pod:3306 ../src/guestfs-actions.pod:5091
12903 msgid "See also: L<mkdtemp(3)>"
12907 #: ../fish/guestfish-actions.pod:3308
12912 #: ../fish/guestfish-actions.pod:3310
12915 " mke2fs-J fstype blocksize device journal\n"
12920 #: ../fish/guestfish-actions.pod:3312 ../src/guestfs-actions.pod:5107
12922 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12923 "C<journal>. It is equivalent to the command:"
12927 #: ../fish/guestfish-actions.pod:3316 ../src/guestfs-actions.pod:5111
12930 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12935 #: ../fish/guestfish-actions.pod:3318
12936 msgid "See also L</mke2journal>."
12940 #: ../fish/guestfish-actions.pod:3320
12945 #: ../fish/guestfish-actions.pod:3322
12948 " mke2fs-JL fstype blocksize device label\n"
12953 #: ../fish/guestfish-actions.pod:3324 ../src/guestfs-actions.pod:5128
12955 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12956 "the journal labeled C<label>."
12960 #: ../fish/guestfish-actions.pod:3327
12961 msgid "See also L</mke2journal-L>."
12965 #: ../fish/guestfish-actions.pod:3329
12970 #: ../fish/guestfish-actions.pod:3331
12973 " mke2fs-JU fstype blocksize device uuid\n"
12978 #: ../fish/guestfish-actions.pod:3333 ../src/guestfs-actions.pod:5146
12980 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12981 "the journal with UUID C<uuid>."
12985 #: ../fish/guestfish-actions.pod:3336
12986 msgid "See also L</mke2journal-U>."
12990 #: ../fish/guestfish-actions.pod:3338
12991 msgid "mke2journal"
12995 #: ../fish/guestfish-actions.pod:3340
12998 " mke2journal blocksize device\n"
13003 #: ../fish/guestfish-actions.pod:3342 ../src/guestfs-actions.pod:5162
13005 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13010 #: ../fish/guestfish-actions.pod:3345 ../src/guestfs-actions.pod:5165
13013 " mke2fs -O journal_dev -b blocksize device\n"
13018 #: ../fish/guestfish-actions.pod:3347
13019 msgid "mke2journal-L"
13023 #: ../fish/guestfish-actions.pod:3349
13026 " mke2journal-L blocksize label device\n"
13031 #: ../fish/guestfish-actions.pod:3351 ../src/guestfs-actions.pod:5179
13032 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13036 #: ../fish/guestfish-actions.pod:3353
13037 msgid "mke2journal-U"
13041 #: ../fish/guestfish-actions.pod:3355
13044 " mke2journal-U blocksize uuid device\n"
13049 #: ../fish/guestfish-actions.pod:3357 ../src/guestfs-actions.pod:5193
13050 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13054 #: ../fish/guestfish-actions.pod:3359
13059 #: ../fish/guestfish-actions.pod:3361
13062 " mkfifo mode path\n"
13067 #: ../fish/guestfish-actions.pod:3363
13069 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13070 "is just a convenient wrapper around L</mknod>."
13074 #: ../fish/guestfish-actions.pod:3369
13079 #: ../fish/guestfish-actions.pod:3371
13082 " mkfs fstype device\n"
13087 #: ../fish/guestfish-actions.pod:3373 ../src/guestfs-actions.pod:5223
13089 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13090 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13094 #: ../fish/guestfish-actions.pod:3377
13099 #: ../fish/guestfish-actions.pod:3379
13102 " mkfs-b fstype blocksize device\n"
13107 #: ../fish/guestfish-actions.pod:3381
13109 "This call is similar to L</mkfs>, but it allows you to control the block "
13110 "size of the resulting filesystem. Supported block sizes depend on the "
13111 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13115 #: ../fish/guestfish-actions.pod:3386 ../fish/guestfish-actions.pod:3413 ../src/guestfs-actions.pod:5251 ../src/guestfs-actions.pod:5289
13117 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13122 #: ../fish/guestfish-actions.pod:3389
13124 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
13129 #: ../fish/guestfish-actions.pod:3396
13134 #: ../fish/guestfish-actions.pod:3398
13137 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] "
13143 #: ../fish/guestfish-actions.pod:3400 ../src/guestfs-actions.pod:5276
13145 "This function creates a filesystem on C<device>. The filesystem type is "
13146 "C<fstype>, for example C<ext3>."
13150 #: ../fish/guestfish-actions.pod:3407 ../src/guestfs-actions.pod:5283
13151 msgid "C<blocksize>"
13155 #: ../fish/guestfish-actions.pod:3409 ../src/guestfs-actions.pod:5285
13157 "The filesystem block size. Supported block sizes depend on the filesystem "
13158 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
13163 #: ../fish/guestfish-actions.pod:3416 ../src/guestfs-actions.pod:5292
13164 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
13168 #: ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:5294
13169 msgid "C<features>"
13173 #: ../fish/guestfish-actions.pod:3420 ../src/guestfs-actions.pod:5296
13174 msgid "This passes the I<-O> parameter to the external mkfs program."
13178 #: ../fish/guestfish-actions.pod:3422 ../src/guestfs-actions.pod:5298
13180 "For certain filesystem types, this allows extra filesystem features to be "
13181 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
13185 #: ../fish/guestfish-actions.pod:3426 ../src/guestfs-actions.pod:5302
13187 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
13192 #: ../fish/guestfish-actions.pod:3429 ../src/guestfs-actions.pod:5305
13197 #: ../fish/guestfish-actions.pod:3431 ../src/guestfs-actions.pod:5307
13199 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
13200 "sets the inode size (only for ext2/3/4 filesystems at present)."
13204 #: ../fish/guestfish-actions.pod:3434 ../src/guestfs-actions.pod:5310
13205 msgid "C<sectorsize>"
13209 #: ../fish/guestfish-actions.pod:3436 ../src/guestfs-actions.pod:5312
13211 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
13212 "sets sector size for ufs filesystem."
13216 #: ../fish/guestfish-actions.pod:3443
13217 msgid "mkmountpoint"
13221 #: ../fish/guestfish-actions.pod:3445
13224 " mkmountpoint exemptpath\n"
13229 #: ../fish/guestfish-actions.pod:3447
13231 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
13232 "to create extra mountpoints before mounting the first filesystem."
13236 #: ../fish/guestfish-actions.pod:3451 ../src/guestfs-actions.pod:5355
13238 "These calls are I<only> necessary in some very limited circumstances, mainly "
13239 "the case where you want to mount a mix of unrelated and/or read-only "
13240 "filesystems together."
13244 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5359
13246 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13247 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13248 "inside that. You can unpack this as follows in guestfish:"
13252 #: ../fish/guestfish-actions.pod:3460 ../src/guestfs-actions.pod:5364
13255 " add-ro Fedora-11-i686-Live.iso\n"
13257 " mkmountpoint /cd\n"
13258 " mkmountpoint /sqsh\n"
13259 " mkmountpoint /ext3fs\n"
13260 " mount /dev/sda /cd\n"
13261 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13262 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13267 #: ../fish/guestfish-actions.pod:3469 ../src/guestfs-actions.pod:5373
13268 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13272 #: ../fish/guestfish-actions.pod:3471
13274 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
13275 "unexpected errors if you try to mix these calls. It is safest to manually "
13276 "unmount filesystems and remove mountpoints after use."
13280 #: ../fish/guestfish-actions.pod:3475
13282 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
13283 "for this to work for manual mountpoints, you must ensure that the innermost "
13284 "mountpoints have the longest pathnames, as in the example code above."
13288 #: ../fish/guestfish-actions.pod:3480 ../src/guestfs-actions.pod:5384
13289 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13293 #: ../fish/guestfish-actions.pod:3482
13295 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
13296 "L</umount-all> to be called when the handle is closed which can also trigger "
13301 #: ../fish/guestfish-actions.pod:3486
13306 #: ../fish/guestfish-actions.pod:3488
13309 " mknod mode devmajor devminor path\n"
13314 #: ../fish/guestfish-actions.pod:3490 ../src/guestfs-actions.pod:5403
13316 "This call creates block or character special devices, or named pipes "
13321 #: ../fish/guestfish-actions.pod:3493 ../src/guestfs-actions.pod:5406
13323 "The C<mode> parameter should be the mode, using the standard constants. "
13324 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13325 "used when creating block and character special devices."
13329 #: ../fish/guestfish-actions.pod:3498
13331 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13332 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13333 "regular file). These constants are available in the standard Linux header "
13334 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
13335 "wrappers around this command which bitwise OR in the appropriate constant "
13340 #: ../fish/guestfish-actions.pod:3508
13345 #: ../fish/guestfish-actions.pod:3510
13348 " mknod-b mode devmajor devminor path\n"
13353 #: ../fish/guestfish-actions.pod:3512
13355 "This call creates a block device node called C<path> with mode C<mode> and "
13356 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13357 "wrapper around L</mknod>."
13361 #: ../fish/guestfish-actions.pod:3518
13366 #: ../fish/guestfish-actions.pod:3520
13369 " mknod-c mode devmajor devminor path\n"
13374 #: ../fish/guestfish-actions.pod:3522
13376 "This call creates a char device node called C<path> with mode C<mode> and "
13377 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13378 "wrapper around L</mknod>."
13382 #: ../fish/guestfish-actions.pod:3528
13387 #: ../fish/guestfish-actions.pod:3530
13395 #: ../fish/guestfish-actions.pod:3532 ../src/guestfs-actions.pod:5469
13396 msgid "Create a swap partition on C<device>."
13400 #: ../fish/guestfish-actions.pod:3534
13405 #: ../fish/guestfish-actions.pod:3536
13408 " mkswap-L label device\n"
13413 #: ../fish/guestfish-actions.pod:3538 ../src/guestfs-actions.pod:5482
13414 msgid "Create a swap partition on C<device> with label C<label>."
13418 #: ../fish/guestfish-actions.pod:3540 ../src/guestfs-actions.pod:5484
13420 "Note that you cannot attach a swap label to a block device "
13421 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
13422 "the kernel or swap tools."
13426 #: ../fish/guestfish-actions.pod:3544
13431 #: ../fish/guestfish-actions.pod:3546
13434 " mkswap-U uuid device\n"
13439 #: ../fish/guestfish-actions.pod:3548 ../src/guestfs-actions.pod:5499
13440 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13444 #: ../fish/guestfish-actions.pod:3550
13445 msgid "mkswap-file"
13449 #: ../fish/guestfish-actions.pod:3552
13452 " mkswap-file path\n"
13457 #: ../fish/guestfish-actions.pod:3554 ../src/guestfs-actions.pod:5511
13458 msgid "Create a swap file."
13462 #: ../fish/guestfish-actions.pod:3556
13464 "This command just writes a swap file signature to an existing file. To "
13465 "create the file itself, use something like L</fallocate>."
13469 #: ../fish/guestfish-actions.pod:3559
13474 #: ../fish/guestfish-actions.pod:3561
13477 " modprobe modulename\n"
13482 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5526
13483 msgid "This loads a kernel module in the appliance."
13487 #: ../fish/guestfish-actions.pod:3565 ../src/guestfs-actions.pod:5528
13489 "The kernel module must have been whitelisted when libguestfs was built (see "
13490 "C<appliance/kmod.whitelist.in> in the source)."
13494 #: ../fish/guestfish-actions.pod:3568
13499 #: ../fish/guestfish-actions.pod:3570
13502 " mount device mountpoint\n"
13507 #: ../fish/guestfish-actions.pod:3572 ../src/guestfs-actions.pod:5542
13509 "Mount a guest disk at a position in the filesystem. Block devices are named "
13510 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13511 "those block devices contain partitions, they will have the usual names "
13512 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13516 #: ../fish/guestfish-actions.pod:3578 ../src/guestfs-actions.pod:5548
13518 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13519 "mounted on C</> before others can be mounted. Other filesystems can only be "
13520 "mounted on directories which already exist."
13524 #: ../fish/guestfish-actions.pod:3583 ../src/guestfs-actions.pod:5553
13526 "The mounted filesystem is writable, if we have sufficient permissions on the "
13527 "underlying device."
13531 #: ../fish/guestfish-actions.pod:3586
13533 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13534 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13535 "problems for users. If your program might need to work with older versions "
13536 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13537 "first parameter if you don't want any options)."
13541 #: ../fish/guestfish-actions.pod:3593
13546 #: ../fish/guestfish-actions.pod:3595
13549 " mount-9p mounttag mountpoint [options:..]\n"
13554 #: ../fish/guestfish-actions.pod:3597 ../src/guestfs-actions.pod:5582
13556 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13561 #: ../fish/guestfish-actions.pod:3600 ../src/guestfs-actions.pod:5585
13563 "If required, C<trans=virtio> will be automatically added to the options. "
13564 "Any other options required can be passed in the optional C<options> "
13569 #: ../fish/guestfish-actions.pod:3606
13574 #: ../fish/guestfish-actions.pod:3608
13577 " mount-loop file mountpoint\n"
13582 #: ../fish/guestfish-actions.pod:3610 ../src/guestfs-actions.pod:5624
13584 "This command lets you mount C<file> (a filesystem image in a file) on a "
13585 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13590 #: ../fish/guestfish-actions.pod:3614
13591 msgid "mount-options"
13595 #: ../fish/guestfish-actions.pod:3616
13598 " mount-options options device mountpoint\n"
13603 #: ../fish/guestfish-actions.pod:3618
13605 "This is the same as the L</mount> command, but it allows you to set the "
13606 "mount options as for the L<mount(8)> I<-o> flag."
13610 #: ../fish/guestfish-actions.pod:3622 ../src/guestfs-actions.pod:5644
13612 "If the C<options> parameter is an empty string, then no options are passed "
13613 "(all options default to whatever the filesystem uses)."
13617 #: ../fish/guestfish-actions.pod:3626
13622 #: ../fish/guestfish-actions.pod:3628
13625 " mount-ro device mountpoint\n"
13630 #: ../fish/guestfish-actions.pod:3630
13632 "This is the same as the L</mount> command, but it mounts the filesystem with "
13633 "the read-only (I<-o ro>) flag."
13637 #: ../fish/guestfish-actions.pod:3633
13642 #: ../fish/guestfish-actions.pod:3635
13645 " mount-vfs options vfstype device mountpoint\n"
13650 #: ../fish/guestfish-actions.pod:3637
13652 "This is the same as the L</mount> command, but it allows you to set both the "
13653 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13657 #: ../fish/guestfish-actions.pod:3641
13658 msgid "mountpoints"
13662 #: ../fish/guestfish-actions.pod:3643
13670 #: ../fish/guestfish-actions.pod:3645
13672 "This call is similar to L</mounts>. That call returns a list of devices. "
13673 "This one returns a hash table (map) of device name to directory where the "
13674 "device is mounted."
13678 #: ../fish/guestfish-actions.pod:3649
13683 #: ../fish/guestfish-actions.pod:3651
13691 #: ../fish/guestfish-actions.pod:3653 ../src/guestfs-actions.pod:5705
13693 "This returns the list of currently mounted filesystems. It returns the list "
13694 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13698 #: ../fish/guestfish-actions.pod:3656 ../src/guestfs-actions.pod:5708
13699 msgid "Some internal mounts are not shown."
13703 #: ../fish/guestfish-actions.pod:3658
13704 msgid "See also: L</mountpoints>"
13708 #: ../fish/guestfish-actions.pod:3660
13713 #: ../fish/guestfish-actions.pod:3662
13721 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5725
13723 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13724 "destination filename or destination directory."
13728 #: ../fish/guestfish-actions.pod:3667
13729 msgid "ntfs-3g-probe"
13733 #: ../fish/guestfish-actions.pod:3669
13736 " ntfs-3g-probe true|false device\n"
13741 #: ../fish/guestfish-actions.pod:3671 ../src/guestfs-actions.pod:5739
13743 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13744 "C<device> for mountability. (Not all NTFS volumes can be mounted "
13745 "read-write, and some cannot be mounted at all)."
13749 #: ../fish/guestfish-actions.pod:3675 ../src/guestfs-actions.pod:5743
13751 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13752 "can be mounted read-write. Set it to false if you want to test if the "
13753 "volume can be mounted read-only."
13757 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5747
13759 "The return value is an integer which C<0> if the operation would succeed, or "
13760 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13764 #: ../fish/guestfish-actions.pod:3683
13769 #: ../fish/guestfish-actions.pod:3685
13772 " ntfsresize device\n"
13777 #: ../fish/guestfish-actions.pod:3687 ../fish/guestfish-actions.pod:3711 ../src/guestfs-actions.pod:5768 ../src/guestfs-actions.pod:5800
13779 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13780 "size of the underlying device."
13784 #: ../fish/guestfish-actions.pod:3690 ../src/guestfs-actions.pod:5771
13786 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13787 "consistency check (for safety). You have to boot into Windows to perform "
13788 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13789 "resize filesystems which have been marked in this way. So in effect it is "
13790 "not possible to call ntfsresize multiple times on a single filesystem "
13791 "without booting into Windows between each resize."
13795 #: ../fish/guestfish-actions.pod:3698 ../fish/guestfish-actions.pod:3737 ../src/guestfs-actions.pod:5779 ../src/guestfs-actions.pod:5826
13796 msgid "See also L<ntfsresize(8)>."
13800 #: ../fish/guestfish-actions.pod:3700 ../fish/guestfish-actions.pod:3748
13802 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13807 #: ../fish/guestfish-actions.pod:3707
13808 msgid "ntfsresize-opts"
13812 #: ../fish/guestfish-actions.pod:3709
13815 " ntfsresize-opts device [size:N] [force:true|false]\n"
13820 #: ../fish/guestfish-actions.pod:3720 ../src/guestfs-actions.pod:5809
13822 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13823 "resized to fit the container (eg. partition)."
13827 #: ../fish/guestfish-actions.pod:3723 ../fish/guestfish-actions.pod:5044 ../src/guestfs-actions.pod:5812 ../src/guestfs-actions.pod:7783
13832 #: ../fish/guestfish-actions.pod:3725 ../src/guestfs-actions.pod:5814
13834 "If this option is true, then force the resize of the filesystem even if the "
13835 "filesystem is marked as requiring a consistency check."
13839 #: ../fish/guestfish-actions.pod:3728
13841 "After the resize operation, the filesystem is always marked as requiring a "
13842 "consistency check (for safety). You have to boot into Windows to perform "
13843 "this check and clear this condition. If you I<don't> set the C<force> "
13844 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13845 "a single filesystem without booting into Windows between each resize."
13849 #: ../fish/guestfish-actions.pod:3741
13850 msgid "ntfsresize-size"
13854 #: ../fish/guestfish-actions.pod:3743
13857 " ntfsresize-size device size\n"
13862 #: ../fish/guestfish-actions.pod:3745
13864 "This command is the same as L</ntfsresize> except that it allows you to "
13865 "specify the new size (in bytes) explicitly."
13869 #: ../fish/guestfish-actions.pod:3755
13874 #: ../fish/guestfish-actions.pod:3757
13877 " part-add device prlogex startsect endsect\n"
13882 #: ../fish/guestfish-actions.pod:3759
13884 "This command adds a partition to C<device>. If there is no partition table "
13885 "on the device, call L</part-init> first."
13889 #: ../fish/guestfish-actions.pod:3762 ../src/guestfs-actions.pod:5887
13891 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13892 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13893 "C<logical>) and C<e> (or C<extended>) partition types."
13897 #: ../fish/guestfish-actions.pod:3767 ../src/guestfs-actions.pod:5892
13899 "C<startsect> and C<endsect> are the start and end of the partition in "
13900 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13901 "from the end of the disk (C<-1> is the last sector)."
13905 #: ../fish/guestfish-actions.pod:3771
13907 "Creating a partition which covers the whole disk is not so easy. Use "
13908 "L</part-disk> to do that."
13912 #: ../fish/guestfish-actions.pod:3774
13917 #: ../fish/guestfish-actions.pod:3776
13920 " part-del device partnum\n"
13925 #: ../fish/guestfish-actions.pod:3778 ../src/guestfs-actions.pod:5910
13926 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13930 #: ../fish/guestfish-actions.pod:3780 ../src/guestfs-actions.pod:5912
13932 "Note that in the case of MBR partitioning, deleting an extended partition "
13933 "also deletes any logical partitions it contains."
13937 #: ../fish/guestfish-actions.pod:3784
13942 #: ../fish/guestfish-actions.pod:3786
13945 " part-disk device parttype\n"
13950 #: ../fish/guestfish-actions.pod:3788
13952 "This command is simply a combination of L</part-init> followed by "
13953 "L</part-add> to create a single primary partition covering the whole disk."
13957 #: ../fish/guestfish-actions.pod:3792
13959 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13960 "possible values are described in L</part-init>."
13964 #: ../fish/guestfish-actions.pod:3795
13965 msgid "part-get-bootable"
13969 #: ../fish/guestfish-actions.pod:3797
13972 " part-get-bootable device partnum\n"
13977 #: ../fish/guestfish-actions.pod:3799 ../src/guestfs-actions.pod:5945
13979 "This command returns true if the partition C<partnum> on C<device> has the "
13980 "bootable flag set."
13984 #: ../fish/guestfish-actions.pod:3802
13985 msgid "See also L</part-set-bootable>."
13989 #: ../fish/guestfish-actions.pod:3804
13990 msgid "part-get-mbr-id"
13994 #: ../fish/guestfish-actions.pod:3806
13997 " part-get-mbr-id device partnum\n"
14002 #: ../fish/guestfish-actions.pod:3808 ../src/guestfs-actions.pod:5961
14004 "Returns the MBR type byte (also known as the ID byte) from the numbered "
14005 "partition C<partnum>."
14009 #: ../fish/guestfish-actions.pod:3811 ../fish/guestfish-actions.pod:3955
14011 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
14012 "undefined results for other partition table types (see "
14013 "L</part-get-parttype>)."
14017 #: ../fish/guestfish-actions.pod:3815
14018 msgid "part-get-parttype"
14022 #: ../fish/guestfish-actions.pod:3817
14025 " part-get-parttype device\n"
14030 #: ../fish/guestfish-actions.pod:3819 ../src/guestfs-actions.pod:5978
14032 "This command examines the partition table on C<device> and returns the "
14033 "partition table type (format) being used."
14037 #: ../fish/guestfish-actions.pod:3822
14039 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
14040 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
14041 "possible, although unusual. See L</part-init> for a full list."
14045 #: ../fish/guestfish-actions.pod:3827
14050 #: ../fish/guestfish-actions.pod:3829
14053 " part-init device parttype\n"
14058 #: ../fish/guestfish-actions.pod:3831 ../src/guestfs-actions.pod:5998
14060 "This creates an empty partition table on C<device> of one of the partition "
14061 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
14062 "(for large disks)."
14066 #: ../fish/guestfish-actions.pod:3835
14068 "Initially there are no partitions. Following this, you should call "
14069 "L</part-add> for each partition required."
14073 #: ../fish/guestfish-actions.pod:3838 ../src/guestfs-actions.pod:6005
14074 msgid "Possible values for C<parttype> are:"
14078 #: ../fish/guestfish-actions.pod:3842 ../src/guestfs-actions.pod:6009
14083 #: ../fish/guestfish-actions.pod:3844 ../src/guestfs-actions.pod:6011
14088 #: ../fish/guestfish-actions.pod:3846 ../src/guestfs-actions.pod:6013
14089 msgid "Intel EFI / GPT partition table."
14093 #: ../fish/guestfish-actions.pod:3848 ../src/guestfs-actions.pod:6015
14095 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
14096 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
14097 "the C<mbr> format."
14101 #: ../fish/guestfish-actions.pod:3852 ../src/guestfs-actions.pod:6019
14106 #: ../fish/guestfish-actions.pod:3854 ../src/guestfs-actions.pod:6021
14111 #: ../fish/guestfish-actions.pod:3856 ../src/guestfs-actions.pod:6023
14113 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
14114 "Windows. This partition type will B<only> work for device sizes up to 2 "
14115 "TB. For large disks we recommend using C<gpt>."
14119 #: ../fish/guestfish-actions.pod:3863 ../src/guestfs-actions.pod:6030
14120 msgid "Other partition table types that may work but are not supported include:"
14124 #: ../fish/guestfish-actions.pod:3868 ../src/guestfs-actions.pod:6035
14129 #: ../fish/guestfish-actions.pod:3870 ../src/guestfs-actions.pod:6037
14130 msgid "AIX disk labels."
14134 #: ../fish/guestfish-actions.pod:3872 ../src/guestfs-actions.pod:6039
14139 #: ../fish/guestfish-actions.pod:3874 ../src/guestfs-actions.pod:6041
14144 #: ../fish/guestfish-actions.pod:3876 ../src/guestfs-actions.pod:6043
14145 msgid "Amiga \"Rigid Disk Block\" format."
14149 #: ../fish/guestfish-actions.pod:3878 ../src/guestfs-actions.pod:6045
14154 #: ../fish/guestfish-actions.pod:3880 ../src/guestfs-actions.pod:6047
14155 msgid "BSD disk labels."
14159 #: ../fish/guestfish-actions.pod:3882 ../src/guestfs-actions.pod:6049
14164 #: ../fish/guestfish-actions.pod:3884 ../src/guestfs-actions.pod:6051
14165 msgid "DASD, used on IBM mainframes."
14169 #: ../fish/guestfish-actions.pod:3886 ../src/guestfs-actions.pod:6053
14174 #: ../fish/guestfish-actions.pod:3888 ../src/guestfs-actions.pod:6055
14175 msgid "MIPS/SGI volumes."
14179 #: ../fish/guestfish-actions.pod:3890 ../src/guestfs-actions.pod:6057
14184 #: ../fish/guestfish-actions.pod:3892 ../src/guestfs-actions.pod:6059
14185 msgid "Old Mac partition format. Modern Macs use C<gpt>."
14189 #: ../fish/guestfish-actions.pod:3894 ../src/guestfs-actions.pod:6061
14194 #: ../fish/guestfish-actions.pod:3896 ../src/guestfs-actions.pod:6063
14195 msgid "NEC PC-98 format, common in Japan apparently."
14199 #: ../fish/guestfish-actions.pod:3898 ../src/guestfs-actions.pod:6065
14204 #: ../fish/guestfish-actions.pod:3900 ../src/guestfs-actions.pod:6067
14205 msgid "Sun disk labels."
14209 #: ../fish/guestfish-actions.pod:3904
14214 #: ../fish/guestfish-actions.pod:3906
14217 " part-list device\n"
14222 #: ../fish/guestfish-actions.pod:3908 ../src/guestfs-actions.pod:6081
14224 "This command parses the partition table on C<device> and returns the list of "
14225 "partitions found."
14229 #: ../fish/guestfish-actions.pod:3911 ../src/guestfs-actions.pod:6084
14230 msgid "The fields in the returned structure are:"
14234 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:6088
14235 msgid "B<part_num>"
14239 #: ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6090
14240 msgid "Partition number, counting from 1."
14244 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:6092
14245 msgid "B<part_start>"
14249 #: ../fish/guestfish-actions.pod:3921
14251 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14252 "the device's sector size, see L</blockdev-getss>."
14256 #: ../fish/guestfish-actions.pod:3924 ../src/guestfs-actions.pod:6097
14257 msgid "B<part_end>"
14261 #: ../fish/guestfish-actions.pod:3926 ../src/guestfs-actions.pod:6099
14262 msgid "End of the partition in bytes."
14266 #: ../fish/guestfish-actions.pod:3928 ../src/guestfs-actions.pod:6101
14267 msgid "B<part_size>"
14271 #: ../fish/guestfish-actions.pod:3930 ../src/guestfs-actions.pod:6103
14272 msgid "Size of the partition in bytes."
14276 #: ../fish/guestfish-actions.pod:3934
14277 msgid "part-set-bootable"
14281 #: ../fish/guestfish-actions.pod:3936
14284 " part-set-bootable device partnum true|false\n"
14289 #: ../fish/guestfish-actions.pod:3938 ../src/guestfs-actions.pod:6121
14291 "This sets the bootable flag on partition numbered C<partnum> on device "
14292 "C<device>. Note that partitions are numbered from 1."
14296 #: ../fish/guestfish-actions.pod:3941 ../src/guestfs-actions.pod:6124
14298 "The bootable flag is used by some operating systems (notably Windows) to "
14299 "determine which partition to boot from. It is by no means universally "
14304 #: ../fish/guestfish-actions.pod:3945
14305 msgid "part-set-mbr-id"
14309 #: ../fish/guestfish-actions.pod:3947
14312 " part-set-mbr-id device partnum idbyte\n"
14317 #: ../fish/guestfish-actions.pod:3949 ../src/guestfs-actions.pod:6140
14319 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14320 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14321 "documentation are in fact hexadecimal numbers, but usually documented "
14322 "without any leading \"0x\" which might be confusing."
14326 #: ../fish/guestfish-actions.pod:3959
14327 msgid "part-set-name"
14331 #: ../fish/guestfish-actions.pod:3961
14334 " part-set-name device partnum name\n"
14339 #: ../fish/guestfish-actions.pod:3963 ../src/guestfs-actions.pod:6162
14341 "This sets the partition name on partition numbered C<partnum> on device "
14342 "C<device>. Note that partitions are numbered from 1."
14346 #: ../fish/guestfish-actions.pod:3966 ../src/guestfs-actions.pod:6165
14348 "The partition name can only be set on certain types of partition table. "
14349 "This works on C<gpt> but not on C<mbr> partitions."
14353 #: ../fish/guestfish-actions.pod:3969
14354 msgid "part-to-dev"
14358 #: ../fish/guestfish-actions.pod:3971
14361 " part-to-dev partition\n"
14366 #: ../fish/guestfish-actions.pod:3973 ../src/guestfs-actions.pod:6178
14368 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14369 "partition number, returning the device name (eg. \"/dev/sdb\")."
14373 #: ../fish/guestfish-actions.pod:3977 ../fish/guestfish-actions.pod:3989
14375 "The named partition must exist, for example as a string returned from "
14376 "L</list-partitions>."
14380 #: ../fish/guestfish-actions.pod:3980
14381 msgid "See also L</part-to-partnum>."
14385 #: ../fish/guestfish-actions.pod:3982
14386 msgid "part-to-partnum"
14390 #: ../fish/guestfish-actions.pod:3984
14393 " part-to-partnum partition\n"
14398 #: ../fish/guestfish-actions.pod:3986 ../src/guestfs-actions.pod:6198
14400 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14401 "partition number (eg. C<1>)."
14405 #: ../fish/guestfish-actions.pod:3992
14406 msgid "See also L</part-to-dev>."
14410 #: ../fish/guestfish-actions.pod:3994
14411 msgid "ping-daemon"
14415 #: ../fish/guestfish-actions.pod:3996
14423 #: ../fish/guestfish-actions.pod:3998 ../src/guestfs-actions.pod:6215
14425 "This is a test probe into the guestfs daemon running inside the qemu "
14426 "subprocess. Calling this function checks that the daemon responds to the "
14427 "ping message, without affecting the daemon or attached block device(s) in "
14432 #: ../fish/guestfish-actions.pod:4003
14437 #: ../fish/guestfish-actions.pod:4005
14440 " pread path count offset\n"
14445 #: ../fish/guestfish-actions.pod:4007 ../src/guestfs-actions.pod:6233
14447 "This command lets you read part of a file. It reads C<count> bytes of the "
14448 "file, starting at C<offset>, from file C<path>."
14452 #: ../fish/guestfish-actions.pod:4010 ../fish/guestfish-actions.pod:4025 ../src/guestfs-actions.pod:6236 ../src/guestfs-actions.pod:6262
14454 "This may read fewer bytes than requested. For further details see the "
14455 "L<pread(2)> system call."
14459 #: ../fish/guestfish-actions.pod:4013
14460 msgid "See also L</pwrite>, L</pread-device>."
14464 #: ../fish/guestfish-actions.pod:4018
14465 msgid "pread-device"
14469 #: ../fish/guestfish-actions.pod:4020
14472 " pread-device device count offset\n"
14477 #: ../fish/guestfish-actions.pod:4022 ../src/guestfs-actions.pod:6259
14479 "This command lets you read part of a file. It reads C<count> bytes of "
14480 "C<device>, starting at C<offset>."
14484 #: ../fish/guestfish-actions.pod:4028
14485 msgid "See also L</pread>."
14489 #: ../fish/guestfish-actions.pod:4033
14494 #: ../fish/guestfish-actions.pod:4035
14497 " pvcreate device\n"
14502 #: ../fish/guestfish-actions.pod:4037 ../src/guestfs-actions.pod:6282
14504 "This creates an LVM physical volume on the named C<device>, where C<device> "
14505 "should usually be a partition name such as C</dev/sda1>."
14509 #: ../fish/guestfish-actions.pod:4041
14514 #: ../fish/guestfish-actions.pod:4043
14517 " pvremove device\n"
14522 #: ../fish/guestfish-actions.pod:4045 ../src/guestfs-actions.pod:6296
14524 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14529 #: ../fish/guestfish-actions.pod:4048 ../src/guestfs-actions.pod:6299
14531 "The implementation uses the C<pvremove> command which refuses to wipe "
14532 "physical volumes that contain any volume groups, so you have to remove those "
14537 #: ../fish/guestfish-actions.pod:4052
14542 #: ../fish/guestfish-actions.pod:4054
14545 " pvresize device\n"
14550 #: ../fish/guestfish-actions.pod:4056 ../src/guestfs-actions.pod:6313
14552 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14553 "the new size of the underlying device."
14557 #: ../fish/guestfish-actions.pod:4059
14558 msgid "pvresize-size"
14562 #: ../fish/guestfish-actions.pod:4061
14565 " pvresize-size device size\n"
14570 #: ../fish/guestfish-actions.pod:4063
14572 "This command is the same as L</pvresize> except that it allows you to "
14573 "specify the new size (in bytes) explicitly."
14577 #: ../fish/guestfish-actions.pod:4066
14582 #: ../fish/guestfish-actions.pod:4068
14590 #: ../fish/guestfish-actions.pod:4070 ../src/guestfs-actions.pod:6339
14592 "List all the physical volumes detected. This is the equivalent of the "
14593 "L<pvs(8)> command."
14597 #: ../fish/guestfish-actions.pod:4073 ../src/guestfs-actions.pod:6342
14599 "This returns a list of just the device names that contain PVs "
14600 "(eg. C</dev/sda2>)."
14604 #: ../fish/guestfish-actions.pod:4076
14605 msgid "See also L</pvs-full>."
14609 #: ../fish/guestfish-actions.pod:4078
14614 #: ../fish/guestfish-actions.pod:4080
14622 #: ../fish/guestfish-actions.pod:4082 ../src/guestfs-actions.pod:6358
14624 "List all the physical volumes detected. This is the equivalent of the "
14625 "L<pvs(8)> command. The \"full\" version includes all fields."
14629 #: ../fish/guestfish-actions.pod:4085
14634 #: ../fish/guestfish-actions.pod:4087
14642 #: ../fish/guestfish-actions.pod:4089 ../src/guestfs-actions.pod:6373
14643 msgid "This command returns the UUID of the LVM PV C<device>."
14647 #: ../fish/guestfish-actions.pod:4091
14652 #: ../fish/guestfish-actions.pod:4093
14655 " pwrite path content offset\n"
14660 #: ../fish/guestfish-actions.pod:4095 ../src/guestfs-actions.pod:6389
14662 "This command writes to part of a file. It writes the data buffer C<content> "
14663 "to the file C<path> starting at offset C<offset>."
14667 #: ../fish/guestfish-actions.pod:4098 ../src/guestfs-actions.pod:6392
14669 "This command implements the L<pwrite(2)> system call, and like that system "
14670 "call it may not write the full data requested. The return value is the "
14671 "number of bytes that were actually written to the file. This could even be "
14672 "0, although short writes are unlikely for regular files in ordinary "
14677 #: ../fish/guestfish-actions.pod:4104
14678 msgid "See also L</pread>, L</pwrite-device>."
14682 #: ../fish/guestfish-actions.pod:4109
14683 msgid "pwrite-device"
14687 #: ../fish/guestfish-actions.pod:4111
14690 " pwrite-device device content offset\n"
14695 #: ../fish/guestfish-actions.pod:4113 ../src/guestfs-actions.pod:6416
14697 "This command writes to part of a device. It writes the data buffer "
14698 "C<content> to C<device> starting at offset C<offset>."
14702 #: ../fish/guestfish-actions.pod:4116 ../src/guestfs-actions.pod:6419
14704 "This command implements the L<pwrite(2)> system call, and like that system "
14705 "call it may not write the full data requested (although short writes to disk "
14706 "devices and partitions are probably impossible with standard Linux kernels)."
14710 #: ../fish/guestfish-actions.pod:4121
14711 msgid "See also L</pwrite>."
14715 #: ../fish/guestfish-actions.pod:4126
14720 #: ../fish/guestfish-actions.pod:4128
14723 " read-file path\n"
14728 #: ../fish/guestfish-actions.pod:4130 ../src/guestfs-actions.pod:6440
14729 msgid "This calls returns the contents of the file C<path> as a buffer."
14733 #: ../fish/guestfish-actions.pod:4133
14735 "Unlike L</cat>, this function can correctly handle files that contain "
14736 "embedded ASCII NUL characters. However unlike L</download>, this function "
14737 "is limited in the total size of file that can be handled."
14741 #: ../fish/guestfish-actions.pod:4141
14746 #: ../fish/guestfish-actions.pod:4143
14749 " read-lines path\n"
14754 #: ../fish/guestfish-actions.pod:4147 ../src/guestfs-actions.pod:6465
14756 "The file contents are returned as a list of lines. Trailing C<LF> and "
14757 "C<CRLF> character sequences are I<not> returned."
14761 #: ../fish/guestfish-actions.pod:4150
14763 "Note that this function cannot correctly handle binary files (specifically, "
14764 "files containing C<\\0> character which is treated as end of line). For "
14765 "those you need to use the L</read-file> function which has a more complex "
14770 #: ../fish/guestfish-actions.pod:4155
14775 #: ../fish/guestfish-actions.pod:4157
14783 #: ../fish/guestfish-actions.pod:4159 ../src/guestfs-actions.pod:6485
14784 msgid "This returns the list of directory entries in directory C<dir>."
14788 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6487
14790 "All entries in the directory are returned, including C<.> and C<..>. The "
14791 "entries are I<not> sorted, but returned in the same order as the underlying "
14796 #: ../fish/guestfish-actions.pod:4165 ../src/guestfs-actions.pod:6491
14798 "Also this call returns basic file type information about each file. The "
14799 "C<ftyp> field will contain one of the following characters:"
14803 #: ../fish/guestfish-actions.pod:4170 ../src/guestfs-actions.pod:6496
14808 #: ../fish/guestfish-actions.pod:4172 ../src/guestfs-actions.pod:6498
14809 msgid "Block special"
14813 #: ../fish/guestfish-actions.pod:4174 ../src/guestfs-actions.pod:6500
14818 #: ../fish/guestfish-actions.pod:4176 ../src/guestfs-actions.pod:6502
14819 msgid "Char special"
14823 #: ../fish/guestfish-actions.pod:4178 ../src/guestfs-actions.pod:6504
14828 #: ../fish/guestfish-actions.pod:4180 ../src/guestfs-actions.pod:6506
14833 #: ../fish/guestfish-actions.pod:4182 ../src/guestfs-actions.pod:6508
14838 #: ../fish/guestfish-actions.pod:4184 ../src/guestfs-actions.pod:6510
14839 msgid "FIFO (named pipe)"
14843 #: ../fish/guestfish-actions.pod:4186 ../src/guestfs-actions.pod:6512
14848 #: ../fish/guestfish-actions.pod:4188 ../src/guestfs-actions.pod:6514
14849 msgid "Symbolic link"
14853 #: ../fish/guestfish-actions.pod:4190 ../src/guestfs-actions.pod:6516
14858 #: ../fish/guestfish-actions.pod:4192 ../src/guestfs-actions.pod:6518
14859 msgid "Regular file"
14863 #: ../fish/guestfish-actions.pod:4194 ../src/guestfs-actions.pod:6520
14868 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6522
14873 #: ../fish/guestfish-actions.pod:4198 ../src/guestfs-actions.pod:6524
14878 #: ../fish/guestfish-actions.pod:4200 ../src/guestfs-actions.pod:6526
14879 msgid "Unknown file type"
14883 #: ../fish/guestfish-actions.pod:4202 ../src/guestfs-actions.pod:6528
14888 #: ../fish/guestfish-actions.pod:4204 ../src/guestfs-actions.pod:6530
14889 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14893 #: ../fish/guestfish-actions.pod:4209
14895 "This function is primarily intended for use by programs. To get a simple "
14896 "list of names, use L</ls>. To get a printable directory for human "
14897 "consumption, use L</ll>."
14901 #: ../fish/guestfish-actions.pod:4213
14906 #: ../fish/guestfish-actions.pod:4215
14914 #: ../fish/guestfish-actions.pod:4217 ../src/guestfs-actions.pod:6551
14915 msgid "This command reads the target of a symbolic link."
14919 #: ../fish/guestfish-actions.pod:4219
14920 msgid "readlinklist"
14924 #: ../fish/guestfish-actions.pod:4221
14927 " readlinklist path 'names ...'\n"
14932 #: ../fish/guestfish-actions.pod:4223 ../src/guestfs-actions.pod:6565
14934 "This call allows you to do a C<readlink> operation on multiple files, where "
14935 "all files are in the directory C<path>. C<names> is the list of files from "
14940 #: ../fish/guestfish-actions.pod:4227 ../src/guestfs-actions.pod:6569
14942 "On return you get a list of strings, with a one-to-one correspondence to the "
14943 "C<names> list. Each string is the value of the symbolic link."
14947 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6573
14949 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14950 "result string is the empty string C<\"\">. However the whole operation is "
14951 "completed even if there were C<readlink(2)> errors, and so you can call this "
14952 "function with names where you don't know if they are symbolic links already "
14953 "(albeit slightly less efficient)."
14957 #: ../fish/guestfish-actions.pod:4238 ../src/guestfs-actions.pod:6580
14959 "This call is intended for programs that want to efficiently list a directory "
14960 "contents without making many round-trips. Very long directory listings "
14961 "might cause the protocol message size to be exceeded, causing this call to "
14962 "fail. The caller must split up such requests into smaller groups of names."
14966 #: ../fish/guestfish-actions.pod:4245
14971 #: ../fish/guestfish-actions.pod:4247
14979 #: ../fish/guestfish-actions.pod:4249 ../src/guestfs-actions.pod:6599
14981 "Return the canonicalized absolute pathname of C<path>. The returned path "
14982 "has no C<.>, C<..> or symbolic link path elements."
14986 #: ../fish/guestfish-actions.pod:4252
14987 msgid "removexattr"
14991 #: ../fish/guestfish-actions.pod:4254
14994 " removexattr xattr path\n"
14999 #: ../fish/guestfish-actions.pod:4256 ../src/guestfs-actions.pod:6614
15000 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
15004 #: ../fish/guestfish-actions.pod:4259
15005 msgid "See also: L</lremovexattr>, L<attr(5)>."
15009 #: ../fish/guestfish-actions.pod:4261
15014 #: ../fish/guestfish-actions.pod:4263
15017 " resize2fs device\n"
15022 #: ../fish/guestfish-actions.pod:4265 ../src/guestfs-actions.pod:6629
15024 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
15025 "underlying device."
15029 #: ../fish/guestfish-actions.pod:4268
15031 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
15032 "before calling this command. For unknown reasons C<resize2fs> sometimes "
15033 "gives an error about this and sometimes not. In any case, it is always safe "
15034 "to call L</e2fsck-f> before calling this function."
15038 #: ../fish/guestfish-actions.pod:4274
15039 msgid "resize2fs-M"
15043 #: ../fish/guestfish-actions.pod:4276
15046 " resize2fs-M device\n"
15051 #: ../fish/guestfish-actions.pod:4278
15053 "This command is the same as L</resize2fs>, but the filesystem is resized to "
15054 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
15059 #: ../fish/guestfish-actions.pod:4282
15061 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
15062 "and read the C<Block size> and C<Block count> values. These two numbers, "
15063 "multiplied together, give the resulting size of the minimal filesystem in "
15068 #: ../fish/guestfish-actions.pod:4287
15069 msgid "resize2fs-size"
15073 #: ../fish/guestfish-actions.pod:4289
15076 " resize2fs-size device size\n"
15081 #: ../fish/guestfish-actions.pod:4291
15083 "This command is the same as L</resize2fs> except that it allows you to "
15084 "specify the new size (in bytes) explicitly."
15088 #: ../fish/guestfish-actions.pod:4294
15093 #: ../fish/guestfish-actions.pod:4296
15101 #: ../fish/guestfish-actions.pod:4298 ../src/guestfs-actions.pod:6681
15102 msgid "Remove the single file C<path>."
15106 #: ../fish/guestfish-actions.pod:4300
15111 #: ../fish/guestfish-actions.pod:4302
15119 #: ../fish/guestfish-actions.pod:4304 ../src/guestfs-actions.pod:6693
15121 "Remove the file or directory C<path>, recursively removing the contents if "
15122 "its a directory. This is like the C<rm -rf> shell command."
15126 #: ../fish/guestfish-actions.pod:4308
15131 #: ../fish/guestfish-actions.pod:4310
15139 #: ../fish/guestfish-actions.pod:4312 ../src/guestfs-actions.pod:6707
15140 msgid "Remove the single directory C<path>."
15144 #: ../fish/guestfish-actions.pod:4314
15145 msgid "rmmountpoint"
15149 #: ../fish/guestfish-actions.pod:4316
15152 " rmmountpoint exemptpath\n"
15157 #: ../fish/guestfish-actions.pod:4318
15159 "This calls removes a mountpoint that was previously created with "
15160 "L</mkmountpoint>. See L</mkmountpoint> for full details."
15164 #: ../fish/guestfish-actions.pod:4322
15165 msgid "scrub-device"
15169 #: ../fish/guestfish-actions.pod:4324
15172 " scrub-device device\n"
15177 #: ../fish/guestfish-actions.pod:4326 ../src/guestfs-actions.pod:6733
15179 "This command writes patterns over C<device> to make data retrieval more "
15184 #: ../fish/guestfish-actions.pod:4329 ../fish/guestfish-actions.pod:4341 ../fish/guestfish-actions.pod:4354 ../src/guestfs-actions.pod:6736 ../src/guestfs-actions.pod:6754 ../src/guestfs-actions.pod:6773
15186 "It is an interface to the L<scrub(1)> program. See that manual page for "
15191 #: ../fish/guestfish-actions.pod:4332
15196 #: ../fish/guestfish-actions.pod:4334
15199 " scrub-file file\n"
15204 #: ../fish/guestfish-actions.pod:4336 ../src/guestfs-actions.pod:6749
15206 "This command writes patterns over a file to make data retrieval more "
15211 #: ../fish/guestfish-actions.pod:4339 ../src/guestfs-actions.pod:6752
15212 msgid "The file is I<removed> after scrubbing."
15216 #: ../fish/guestfish-actions.pod:4344
15217 msgid "scrub-freespace"
15221 #: ../fish/guestfish-actions.pod:4346
15224 " scrub-freespace dir\n"
15229 #: ../fish/guestfish-actions.pod:4348
15231 "This command creates the directory C<dir> and then fills it with files until "
15232 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
15233 "deletes them. The intention is to scrub any free space on the partition "
15234 "containing C<dir>."
15238 #: ../fish/guestfish-actions.pod:4357
15243 #: ../fish/guestfish-actions.pod:4359
15248 #: ../fish/guestfish-actions.pod:4361
15251 " set-append append\n"
15256 #: ../fish/guestfish-actions.pod:4363 ../src/guestfs-actions.pod:6786
15258 "This function is used to add additional options to the guest kernel command "
15263 #: ../fish/guestfish-actions.pod:4366 ../src/guestfs-actions.pod:6789
15265 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15266 "environment variable."
15270 #: ../fish/guestfish-actions.pod:4369 ../src/guestfs-actions.pod:6792
15272 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15273 "(libguestfs always adds a few of its own)."
15277 #: ../fish/guestfish-actions.pod:4372
15278 msgid "set-attach-method"
15282 #: ../fish/guestfish-actions.pod:4374
15283 msgid "attach-method"
15287 #: ../fish/guestfish-actions.pod:4376
15290 " set-attach-method attachmethod\n"
15295 #: ../fish/guestfish-actions.pod:4378 ../src/guestfs-actions.pod:6805
15297 "Set the method that libguestfs uses to connect to the back end guestfsd "
15298 "daemon. Possible methods are:"
15302 #: ../fish/guestfish-actions.pod:4383 ../src/guestfs-actions.pod:6810 ../src/guestfs.pod:2916
15303 msgid "C<appliance>"
15307 #: ../fish/guestfish-actions.pod:4385 ../src/guestfs-actions.pod:6812
15309 "Launch an appliance and connect to it. This is the ordinary method and the "
15314 #: ../fish/guestfish-actions.pod:4388 ../src/guestfs-actions.pod:6815
15315 msgid "C<unix:I<path>>"
15319 #: ../fish/guestfish-actions.pod:4390 ../src/guestfs-actions.pod:6817
15320 msgid "Connect to the Unix domain socket I<path>."
15324 #: ../fish/guestfish-actions.pod:4392 ../src/guestfs-actions.pod:6819
15326 "This method lets you connect to an existing daemon or (using virtio-serial) "
15327 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15328 "RUNNING DAEMONS>."
15332 #: ../fish/guestfish-actions.pod:4398
15333 msgid "set-autosync"
15337 #: ../fish/guestfish-actions.pod:4400
15342 #: ../fish/guestfish-actions.pod:4402
15345 " set-autosync true|false\n"
15350 #: ../fish/guestfish-actions.pod:4404 ../src/guestfs-actions.pod:6835
15352 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15353 "effort attempt to make filesystems consistent and synchronized when the "
15354 "handle is closed (also if the program exits without closing handles)."
15358 #: ../fish/guestfish-actions.pod:4409 ../src/guestfs-actions.pod:6840
15360 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15361 "disabled by default)."
15365 #: ../fish/guestfish-actions.pod:4412
15370 #: ../fish/guestfish-actions.pod:4414
15375 #: ../fish/guestfish-actions.pod:4416
15378 " set-direct true|false\n"
15383 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6853
15385 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15386 "passed directly through to the appliance once it is launched."
15390 #: ../fish/guestfish-actions.pod:4422
15392 "One consequence of this is that log messages aren't caught by the library "
15393 "and handled by L</set-log-message-callback>, but go straight to stdout."
15397 #: ../fish/guestfish-actions.pod:4426 ../src/guestfs-actions.pod:6861
15398 msgid "You probably don't want to use this unless you know what you are doing."
15402 #: ../fish/guestfish-actions.pod:4429 ../src/guestfs-actions.pod:6864
15403 msgid "The default is disabled."
15407 #: ../fish/guestfish-actions.pod:4431
15408 msgid "set-e2label"
15412 #: ../fish/guestfish-actions.pod:4433
15415 " set-e2label device label\n"
15420 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6877
15422 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15423 "C<label>. Filesystem labels are limited to 16 characters."
15427 #: ../fish/guestfish-actions.pod:4439
15429 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15430 "label on a filesystem."
15434 #: ../fish/guestfish-actions.pod:4442
15439 #: ../fish/guestfish-actions.pod:4444
15442 " set-e2uuid device uuid\n"
15447 #: ../fish/guestfish-actions.pod:4446 ../src/guestfs-actions.pod:6895
15449 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15450 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15451 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15455 #: ../fish/guestfish-actions.pod:4451
15457 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15458 "UUID of a filesystem."
15462 #: ../fish/guestfish-actions.pod:4454
15463 msgid "set-memsize"
15467 #: ../fish/guestfish-actions.pod:4456
15472 #: ../fish/guestfish-actions.pod:4458
15475 " set-memsize memsize\n"
15480 #: ../fish/guestfish-actions.pod:4460
15482 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15483 "This only has any effect if called before L</launch>."
15487 #: ../fish/guestfish-actions.pod:4464 ../src/guestfs-actions.pod:6917
15489 "You can also change this by setting the environment variable "
15490 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15494 #: ../fish/guestfish-actions.pod:4471
15495 msgid "set-network"
15499 #: ../fish/guestfish-actions.pod:4473
15504 #: ../fish/guestfish-actions.pod:4475
15507 " set-network true|false\n"
15512 #: ../fish/guestfish-actions.pod:4477 ../src/guestfs-actions.pod:6934
15514 "If C<network> is true, then the network is enabled in the libguestfs "
15515 "appliance. The default is false."
15519 #: ../fish/guestfish-actions.pod:4480 ../src/guestfs-actions.pod:6937
15521 "This affects whether commands are able to access the network (see "
15522 "L<guestfs(3)/RUNNING COMMANDS>)."
15526 #: ../fish/guestfish-actions.pod:4483
15527 msgid "You must call this before calling L</launch>, otherwise it has no effect."
15531 #: ../fish/guestfish-actions.pod:4486
15536 #: ../fish/guestfish-actions.pod:4490
15539 " set-path searchpath\n"
15544 #: ../fish/guestfish-actions.pod:4492 ../src/guestfs-actions.pod:6953
15545 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15549 #: ../fish/guestfish-actions.pod:4494 ../src/guestfs-actions.pod:6955
15551 "The default is C<$libdir/guestfs> unless overridden by setting "
15552 "C<LIBGUESTFS_PATH> environment variable."
15556 #: ../fish/guestfish-actions.pod:4497 ../src/guestfs-actions.pod:6958
15557 msgid "Setting C<path> to C<NULL> restores the default path."
15561 #: ../fish/guestfish-actions.pod:4499
15566 #: ../fish/guestfish-actions.pod:4501
15571 #: ../fish/guestfish-actions.pod:4503
15574 " set-pgroup true|false\n"
15579 #: ../fish/guestfish-actions.pod:4505 ../src/guestfs-actions.pod:6970
15581 "If C<pgroup> is true, child processes are placed into their own process "
15586 #: ../fish/guestfish-actions.pod:4508 ../src/guestfs-actions.pod:6973
15588 "The practical upshot of this is that signals like C<SIGINT> (from users "
15589 "pressing C<^C>) won't be received by the child process."
15593 #: ../fish/guestfish-actions.pod:4511 ../src/guestfs-actions.pod:6976
15595 "The default for this flag is false, because usually you want C<^C> to kill "
15600 #: ../fish/guestfish-actions.pod:4514
15605 #: ../fish/guestfish-actions.pod:4516
15610 #: ../fish/guestfish-actions.pod:4518
15618 #: ../fish/guestfish-actions.pod:4520 ../src/guestfs-actions.pod:6989
15619 msgid "Set the qemu binary that we will use."
15623 #: ../fish/guestfish-actions.pod:4522 ../src/guestfs-actions.pod:6991
15624 msgid "The default is chosen when the library was compiled by the configure script."
15628 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6994
15630 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15635 #: ../fish/guestfish-actions.pod:4528 ../src/guestfs-actions.pod:6997
15636 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15640 #: ../fish/guestfish-actions.pod:4530 ../src/guestfs-actions.pod:6999
15642 "Note that you should call this function as early as possible after creating "
15643 "the handle. This is because some pre-launch operations depend on testing "
15644 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15645 "don't retest features, and so you might see inconsistent results. Using the "
15646 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15647 "the qemu binary at the same time as the handle is created."
15651 #: ../fish/guestfish-actions.pod:4538
15652 msgid "set-recovery-proc"
15656 #: ../fish/guestfish-actions.pod:4540
15657 msgid "recovery-proc"
15661 #: ../fish/guestfish-actions.pod:4542
15664 " set-recovery-proc true|false\n"
15669 #: ../fish/guestfish-actions.pod:4544
15671 "If this is called with the parameter C<false> then L</launch> does not "
15672 "create a recovery process. The purpose of the recovery process is to stop "
15673 "runaway qemu processes in the case where the main program aborts abruptly."
15677 #: ../fish/guestfish-actions.pod:4549
15679 "This only has any effect if called before L</launch>, and the default is "
15684 #: ../fish/guestfish-actions.pod:4552 ../src/guestfs-actions.pod:7025
15686 "About the only time when you would want to disable this is if the main "
15687 "process will fork itself into the background (\"daemonize\" itself). In "
15688 "this case the recovery process thinks that the main program has disappeared "
15689 "and so kills qemu, which is not very helpful."
15693 #: ../fish/guestfish-actions.pod:4558
15694 msgid "set-selinux"
15698 #: ../fish/guestfish-actions.pod:4560
15703 #: ../fish/guestfish-actions.pod:4562
15706 " set-selinux true|false\n"
15711 #: ../fish/guestfish-actions.pod:4564 ../src/guestfs-actions.pod:7041
15713 "This sets the selinux flag that is passed to the appliance at boot time. "
15714 "The default is C<selinux=0> (disabled)."
15718 #: ../fish/guestfish-actions.pod:4567 ../src/guestfs-actions.pod:7044
15720 "Note that if SELinux is enabled, it is always in Permissive mode "
15721 "(C<enforcing=0>)."
15725 #: ../fish/guestfish-actions.pod:4573
15730 #: ../fish/guestfish-actions.pod:4575
15735 #: ../fish/guestfish-actions.pod:4577
15743 #: ../fish/guestfish-actions.pod:4579 ../src/guestfs-actions.pod:7060
15745 "Change the number of virtual CPUs assigned to the appliance. The default is "
15746 "C<1>. Increasing this may improve performance, though often it has no "
15751 #: ../fish/guestfish-actions.pod:4583
15752 msgid "This function must be called before L</launch>."
15756 #: ../fish/guestfish-actions.pod:4585
15761 #: ../fish/guestfish-actions.pod:4587
15766 #: ../fish/guestfish-actions.pod:4589
15769 " set-trace true|false\n"
15774 #: ../fish/guestfish-actions.pod:4591 ../src/guestfs-actions.pod:7076
15776 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15777 "return values are traced."
15781 #: ../fish/guestfish-actions.pod:4594 ../src/guestfs-actions.pod:7079
15783 "If you want to trace C API calls into libguestfs (and other libraries) then "
15784 "possibly a better way is to use the external ltrace(1) command."
15788 #: ../fish/guestfish-actions.pod:4598 ../src/guestfs-actions.pod:7083
15790 "Command traces are disabled unless the environment variable "
15791 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15795 #: ../fish/guestfish-actions.pod:4601
15797 "Trace messages are normally sent to C<stderr>, unless you register a "
15798 "callback to send them somewhere else (see L</set-event-callback>)."
15802 #: ../fish/guestfish-actions.pod:4605
15803 msgid "set-verbose"
15807 #: ../fish/guestfish-actions.pod:4607
15812 #: ../fish/guestfish-actions.pod:4609
15815 " set-verbose true|false\n"
15820 #: ../fish/guestfish-actions.pod:4611 ../src/guestfs-actions.pod:7100
15821 msgid "If C<verbose> is true, this turns on verbose messages."
15825 #: ../fish/guestfish-actions.pod:4613 ../src/guestfs-actions.pod:7102
15827 "Verbose messages are disabled unless the environment variable "
15828 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15832 #: ../fish/guestfish-actions.pod:4616
15834 "Verbose messages are normally sent to C<stderr>, unless you register a "
15835 "callback to send them somewhere else (see L</set-event-callback>)."
15839 #: ../fish/guestfish-actions.pod:4620
15844 #: ../fish/guestfish-actions.pod:4622
15847 " setcon context\n"
15852 #: ../fish/guestfish-actions.pod:4624 ../src/guestfs-actions.pod:7119
15854 "This sets the SELinux security context of the daemon to the string "
15859 #: ../fish/guestfish-actions.pod:4627 ../src/guestfs-actions.pod:7122
15860 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15864 #: ../fish/guestfish-actions.pod:4629
15869 #: ../fish/guestfish-actions.pod:4631
15872 " setxattr xattr val vallen path\n"
15877 #: ../fish/guestfish-actions.pod:4633 ../src/guestfs-actions.pod:7137
15879 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15880 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15884 #: ../fish/guestfish-actions.pod:4637
15885 msgid "See also: L</lsetxattr>, L<attr(5)>."
15889 #: ../fish/guestfish-actions.pod:4639
15894 #: ../fish/guestfish-actions.pod:4641
15897 " sfdisk device cyls heads sectors 'lines ...'\n"
15902 #: ../fish/guestfish-actions.pod:4643 ../src/guestfs-actions.pod:7164
15904 "This is a direct interface to the L<sfdisk(8)> program for creating "
15905 "partitions on block devices."
15909 #: ../fish/guestfish-actions.pod:4646 ../src/guestfs-actions.pod:7167
15910 msgid "C<device> should be a block device, for example C</dev/sda>."
15914 #: ../fish/guestfish-actions.pod:4648 ../src/guestfs-actions.pod:7169
15916 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15917 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
15918 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15919 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15920 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15921 "the kernel) cannot work out the right geometry and you will need to tell it."
15925 #: ../fish/guestfish-actions.pod:4656 ../src/guestfs-actions.pod:7177
15927 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15928 "refer to the L<sfdisk(8)> manpage."
15932 #: ../fish/guestfish-actions.pod:4659 ../src/guestfs-actions.pod:7180
15934 "To create a single partition occupying the whole disk, you would pass "
15935 "C<lines> as a single element list, when the single element being the string "
15940 #: ../fish/guestfish-actions.pod:4663
15941 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15945 #: ../fish/guestfish-actions.pod:4666 ../fish/guestfish-actions.pod:4686 ../fish/guestfish-actions.pod:4705
15947 "I<This function is deprecated.> In new code, use the L</part_add> call "
15952 #: ../fish/guestfish-actions.pod:4673
15957 #: ../fish/guestfish-actions.pod:4675
15960 " sfdiskM device 'lines ...'\n"
15965 #: ../fish/guestfish-actions.pod:4677
15967 "This is a simplified interface to the L</sfdisk> command, where partition "
15968 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15969 "you don't need to specify the cyls, heads and sectors parameters which were "
15970 "rarely if ever used anyway."
15974 #: ../fish/guestfish-actions.pod:4683
15975 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15979 #: ../fish/guestfish-actions.pod:4693
15984 #: ../fish/guestfish-actions.pod:4695
15987 " sfdisk-N device partnum cyls heads sectors line\n"
15992 #: ../fish/guestfish-actions.pod:4697 ../src/guestfs-actions.pod:7236
15994 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15995 "(note: C<n> counts from 1)."
15999 #: ../fish/guestfish-actions.pod:4700
16001 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
16002 "cyls/heads/sectors parameters."
16006 #: ../fish/guestfish-actions.pod:4703
16007 msgid "See also: L</part-add>"
16011 #: ../fish/guestfish-actions.pod:4712
16012 msgid "sfdisk-disk-geometry"
16016 #: ../fish/guestfish-actions.pod:4714
16019 " sfdisk-disk-geometry device\n"
16024 #: ../fish/guestfish-actions.pod:4716
16026 "This displays the disk geometry of C<device> read from the partition table. "
16027 "Especially in the case where the underlying block device has been resized, "
16028 "this can be different from the kernel's idea of the geometry (see "
16029 "L</sfdisk-kernel-geometry>)."
16033 #: ../fish/guestfish-actions.pod:4721 ../fish/guestfish-actions.pod:4730 ../src/guestfs-actions.pod:7259 ../src/guestfs-actions.pod:7275
16034 msgid "The result is in human-readable format, and not designed to be parsed."
16038 #: ../fish/guestfish-actions.pod:4724
16039 msgid "sfdisk-kernel-geometry"
16043 #: ../fish/guestfish-actions.pod:4726
16046 " sfdisk-kernel-geometry device\n"
16051 #: ../fish/guestfish-actions.pod:4728 ../src/guestfs-actions.pod:7273
16052 msgid "This displays the kernel's idea of the geometry of C<device>."
16056 #: ../fish/guestfish-actions.pod:4733
16061 #: ../fish/guestfish-actions.pod:4735
16064 " sfdisk-l device\n"
16069 #: ../fish/guestfish-actions.pod:4737 ../src/guestfs-actions.pod:7296
16071 "This displays the partition table on C<device>, in the human-readable output "
16072 "of the L<sfdisk(8)> command. It is not intended to be parsed."
16076 #: ../fish/guestfish-actions.pod:4741
16077 msgid "See also: L</part-list>"
16081 #: ../fish/guestfish-actions.pod:4743
16083 "I<This function is deprecated.> In new code, use the L</part_list> call "
16088 #: ../fish/guestfish-actions.pod:4750
16093 #: ../fish/guestfish-actions.pod:4752
16101 #: ../fish/guestfish-actions.pod:4754 ../src/guestfs-actions.pod:7313
16103 "This call runs a command from the guest filesystem via the guest's "
16108 #: ../fish/guestfish-actions.pod:4757
16109 msgid "This is like L</command>, but passes the command to:"
16113 #: ../fish/guestfish-actions.pod:4759 ../src/guestfs-actions.pod:7318
16116 " /bin/sh -c \"command\"\n"
16121 #: ../fish/guestfish-actions.pod:4761 ../src/guestfs-actions.pod:7320
16123 "Depending on the guest's shell, this usually results in wildcards being "
16124 "expanded, shell expressions being interpolated and so on."
16128 #: ../fish/guestfish-actions.pod:4765
16129 msgid "All the provisos about L</command> apply to this call."
16133 #: ../fish/guestfish-actions.pod:4767
16138 #: ../fish/guestfish-actions.pod:4769
16141 " sh-lines command\n"
16146 #: ../fish/guestfish-actions.pod:4771
16147 msgid "This is the same as L</sh>, but splits the result into a list of lines."
16151 #: ../fish/guestfish-actions.pod:4774
16152 msgid "See also: L</command-lines>"
16156 #: ../fish/guestfish-actions.pod:4776
16161 #: ../fish/guestfish-actions.pod:4778
16169 #: ../fish/guestfish-actions.pod:4780 ../src/guestfs-actions.pod:7354
16170 msgid "Sleep for C<secs> seconds."
16174 #: ../fish/guestfish-actions.pod:4782
16179 #: ../fish/guestfish-actions.pod:4784
16187 #: ../fish/guestfish-actions.pod:4788 ../src/guestfs-actions.pod:7368
16188 msgid "This is the same as the C<stat(2)> system call."
16192 #: ../fish/guestfish-actions.pod:4790
16197 #: ../fish/guestfish-actions.pod:4792
16205 #: ../fish/guestfish-actions.pod:4794 ../src/guestfs-actions.pod:7382
16207 "Returns file system statistics for any mounted file system. C<path> should "
16208 "be a file or directory in the mounted file system (typically it is the mount "
16209 "point itself, but it doesn't need to be)."
16213 #: ../fish/guestfish-actions.pod:4798 ../src/guestfs-actions.pod:7386
16214 msgid "This is the same as the C<statvfs(2)> system call."
16218 #: ../fish/guestfish-actions.pod:4800
16223 #: ../fish/guestfish-actions.pod:4802
16231 #: ../fish/guestfish-actions.pod:4804 ../src/guestfs-actions.pod:7400
16233 "This runs the L<strings(1)> command on a file and returns the list of "
16234 "printable strings found."
16238 #: ../fish/guestfish-actions.pod:4810
16243 #: ../fish/guestfish-actions.pod:4812
16246 " strings-e encoding path\n"
16251 #: ../fish/guestfish-actions.pod:4814
16253 "This is like the L</strings> command, but allows you to specify the encoding "
16254 "of strings that are looked for in the source file C<path>."
16258 #: ../fish/guestfish-actions.pod:4818 ../src/guestfs-actions.pod:7423
16259 msgid "Allowed encodings are:"
16263 #: ../fish/guestfish-actions.pod:4822 ../src/guestfs-actions.pod:7427
16268 #: ../fish/guestfish-actions.pod:4824
16270 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16271 "ISO-8859-X (this is what L</strings> uses)."
16275 #: ../fish/guestfish-actions.pod:4827 ../src/guestfs-actions.pod:7432
16280 #: ../fish/guestfish-actions.pod:4829 ../src/guestfs-actions.pod:7434
16281 msgid "Single 8-bit-byte characters."
16285 #: ../fish/guestfish-actions.pod:4831 ../src/guestfs-actions.pod:7436
16290 #: ../fish/guestfish-actions.pod:4833 ../src/guestfs-actions.pod:7438
16291 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16295 #: ../fish/guestfish-actions.pod:4836 ../src/guestfs-actions.pod:7441
16296 msgid "l (lower case letter L)"
16300 #: ../fish/guestfish-actions.pod:4838 ../src/guestfs-actions.pod:7443
16302 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16303 "examining binaries in Windows guests."
16307 #: ../fish/guestfish-actions.pod:4841 ../src/guestfs-actions.pod:7446
16312 #: ../fish/guestfish-actions.pod:4843 ../src/guestfs-actions.pod:7448
16313 msgid "32-bit big endian such as UCS-4BE."
16317 #: ../fish/guestfish-actions.pod:4845 ../src/guestfs-actions.pod:7450
16322 #: ../fish/guestfish-actions.pod:4847 ../src/guestfs-actions.pod:7452
16323 msgid "32-bit little endian such as UCS-4LE."
16327 #: ../fish/guestfish-actions.pod:4851 ../src/guestfs-actions.pod:7456
16328 msgid "The returned strings are transcoded to UTF-8."
16332 #: ../fish/guestfish-actions.pod:4856
16333 msgid "swapoff-device"
16337 #: ../fish/guestfish-actions.pod:4858
16340 " swapoff-device device\n"
16345 #: ../fish/guestfish-actions.pod:4860
16347 "This command disables the libguestfs appliance swap device or partition "
16348 "named C<device>. See L</swapon-device>."
16352 #: ../fish/guestfish-actions.pod:4864
16353 msgid "swapoff-file"
16357 #: ../fish/guestfish-actions.pod:4866
16360 " swapoff-file file\n"
16365 #: ../fish/guestfish-actions.pod:4868 ../src/guestfs-actions.pod:7487
16366 msgid "This command disables the libguestfs appliance swap on file."
16370 #: ../fish/guestfish-actions.pod:4870
16371 msgid "swapoff-label"
16375 #: ../fish/guestfish-actions.pod:4872
16378 " swapoff-label label\n"
16383 #: ../fish/guestfish-actions.pod:4874 ../src/guestfs-actions.pod:7499
16385 "This command disables the libguestfs appliance swap on labeled swap "
16390 #: ../fish/guestfish-actions.pod:4877
16391 msgid "swapoff-uuid"
16395 #: ../fish/guestfish-actions.pod:4879
16398 " swapoff-uuid uuid\n"
16403 #: ../fish/guestfish-actions.pod:4881 ../src/guestfs-actions.pod:7512
16405 "This command disables the libguestfs appliance swap partition with the given "
16410 #: ../fish/guestfish-actions.pod:4884
16411 msgid "swapon-device"
16415 #: ../fish/guestfish-actions.pod:4886
16418 " swapon-device device\n"
16423 #: ../fish/guestfish-actions.pod:4888
16425 "This command enables the libguestfs appliance to use the swap device or "
16426 "partition named C<device>. The increased memory is made available for all "
16427 "commands, for example those run using L</command> or L</sh>."
16431 #: ../fish/guestfish-actions.pod:4893 ../src/guestfs-actions.pod:7530
16433 "Note that you should not swap to existing guest swap partitions unless you "
16434 "know what you are doing. They may contain hibernation information, or other "
16435 "information that the guest doesn't want you to trash. You also risk leaking "
16436 "information about the host to the guest this way. Instead, attach a new "
16437 "host device to the guest and swap on that."
16441 #: ../fish/guestfish-actions.pod:4900
16442 msgid "swapon-file"
16446 #: ../fish/guestfish-actions.pod:4902
16449 " swapon-file file\n"
16454 #: ../fish/guestfish-actions.pod:4904
16455 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
16459 #: ../fish/guestfish-actions.pod:4907
16460 msgid "swapon-label"
16464 #: ../fish/guestfish-actions.pod:4909
16467 " swapon-label label\n"
16472 #: ../fish/guestfish-actions.pod:4911
16474 "This command enables swap to a labeled swap partition. See "
16475 "L</swapon-device> for other notes."
16479 #: ../fish/guestfish-actions.pod:4914
16480 msgid "swapon-uuid"
16484 #: ../fish/guestfish-actions.pod:4916
16487 " swapon-uuid uuid\n"
16492 #: ../fish/guestfish-actions.pod:4918
16494 "This command enables swap to a swap partition with the given UUID. See "
16495 "L</swapon-device> for other notes."
16499 #: ../fish/guestfish-actions.pod:4921
16504 #: ../fish/guestfish-actions.pod:4923
16512 #: ../fish/guestfish-actions.pod:4925 ../src/guestfs-actions.pod:7585
16514 "This syncs the disk, so that any writes are flushed through to the "
16515 "underlying disk image."
16519 #: ../fish/guestfish-actions.pod:4928 ../src/guestfs-actions.pod:7588
16521 "You should always call this if you have modified a disk image, before "
16522 "closing the handle."
16526 #: ../fish/guestfish-actions.pod:4931
16531 #: ../fish/guestfish-actions.pod:4933
16539 #: ../fish/guestfish-actions.pod:4935 ../src/guestfs-actions.pod:7601
16540 msgid "This command returns up to the last 10 lines of a file as a list of strings."
16544 #: ../fish/guestfish-actions.pod:4941
16549 #: ../fish/guestfish-actions.pod:4943
16552 " tail-n nrlines path\n"
16557 #: ../fish/guestfish-actions.pod:4945 ../src/guestfs-actions.pod:7620
16559 "If the parameter C<nrlines> is a positive number, this returns the last "
16560 "C<nrlines> lines of the file C<path>."
16564 #: ../fish/guestfish-actions.pod:4948 ../src/guestfs-actions.pod:7623
16566 "If the parameter C<nrlines> is a negative number, this returns lines from "
16567 "the file C<path>, starting with the C<-nrlines>th line."
16571 #: ../fish/guestfish-actions.pod:4956
16576 #: ../fish/guestfish-actions.pod:4958
16579 " tar-in (tarfile|-) directory\n"
16584 #: ../fish/guestfish-actions.pod:4960 ../src/guestfs-actions.pod:7644
16586 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16587 "tar file) into C<directory>."
16591 #: ../fish/guestfish-actions.pod:4963
16592 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16596 #: ../fish/guestfish-actions.pod:4968
16601 #: ../fish/guestfish-actions.pod:4970
16604 " tar-out directory (tarfile|-)\n"
16609 #: ../fish/guestfish-actions.pod:4972 ../src/guestfs-actions.pod:7661
16611 "This command packs the contents of C<directory> and downloads it to local "
16616 #: ../fish/guestfish-actions.pod:4975
16617 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16621 #: ../fish/guestfish-actions.pod:4980
16626 #: ../fish/guestfish-actions.pod:4982
16629 " tgz-in (tarball|-) directory\n"
16634 #: ../fish/guestfish-actions.pod:4984 ../src/guestfs-actions.pod:7678
16636 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16637 "tar file) into C<directory>."
16641 #: ../fish/guestfish-actions.pod:4987
16642 msgid "To upload an uncompressed tarball, use L</tar-in>."
16646 #: ../fish/guestfish-actions.pod:4991
16651 #: ../fish/guestfish-actions.pod:4993
16654 " tgz-out directory (tarball|-)\n"
16659 #: ../fish/guestfish-actions.pod:4995 ../src/guestfs-actions.pod:7694
16661 "This command packs the contents of C<directory> and downloads it to local "
16666 #: ../fish/guestfish-actions.pod:4998
16667 msgid "To download an uncompressed tarball, use L</tar-out>."
16671 #: ../fish/guestfish-actions.pod:5002
16676 #: ../fish/guestfish-actions.pod:5004
16684 #: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7709
16686 "Touch acts like the L<touch(1)> command. It can be used to update the "
16687 "timestamps on a file, or, if the file does not exist, to create a new "
16688 "zero-length file."
16692 #: ../fish/guestfish-actions.pod:5010 ../src/guestfs-actions.pod:7713
16694 "This command only works on regular files, and will fail on other file types "
16695 "such as directories, symbolic links, block special etc."
16699 #: ../fish/guestfish-actions.pod:5013
16704 #: ../fish/guestfish-actions.pod:5015
16712 #: ../fish/guestfish-actions.pod:5017 ../src/guestfs-actions.pod:7726
16714 "This command truncates C<path> to a zero-length file. The file must exist "
16719 #: ../fish/guestfish-actions.pod:5020
16720 msgid "truncate-size"
16724 #: ../fish/guestfish-actions.pod:5022
16727 " truncate-size path size\n"
16732 #: ../fish/guestfish-actions.pod:5024 ../src/guestfs-actions.pod:7740
16734 "This command truncates C<path> to size C<size> bytes. The file must exist "
16739 #: ../fish/guestfish-actions.pod:5027
16741 "If the current file size is less than C<size> then the file is extended to "
16742 "the required size with zero bytes. This creates a sparse file (ie. disk "
16743 "blocks are not allocated for the file until you write to it). To create a "
16744 "non-sparse file of zeroes, use L</fallocate64> instead."
16748 #: ../fish/guestfish-actions.pod:5033
16753 #: ../fish/guestfish-actions.pod:5035
16756 " tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] "
16757 "[errorbehavior:..] [group:N] [intervalbetweenchecks:N] "
16758 "[reservedblockspercentage:N] [lastmounteddirectory:..] "
16759 "[reservedblockscount:N] [user:N]\n"
16764 #: ../fish/guestfish-actions.pod:5037 ../src/guestfs-actions.pod:7776
16766 "This call allows you to adjust various filesystem parameters of an "
16767 "ext2/ext3/ext4 filesystem called C<device>."
16771 #: ../fish/guestfish-actions.pod:5046 ../src/guestfs-actions.pod:7785
16773 "Force tune2fs to complete the operation even in the face of errors. This is "
16774 "the same as the tune2fs C<-f> option."
16778 #: ../fish/guestfish-actions.pod:5049 ../src/guestfs-actions.pod:7788
16779 msgid "C<maxmountcount>"
16783 #: ../fish/guestfish-actions.pod:5051 ../src/guestfs-actions.pod:7790
16785 "Set the number of mounts after which the filesystem is checked by "
16786 "L<e2fsck(8)>. If this is C<0> then the number of mounts is disregarded. "
16787 "This is the same as the tune2fs C<-c> option."
16791 #: ../fish/guestfish-actions.pod:5055 ../src/guestfs-actions.pod:7794
16792 msgid "C<mountcount>"
16796 #: ../fish/guestfish-actions.pod:5057 ../src/guestfs-actions.pod:7796
16798 "Set the number of times the filesystem has been mounted. This is the same "
16799 "as the tune2fs C<-C> option."
16803 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7799
16804 msgid "C<errorbehavior>"
16808 #: ../fish/guestfish-actions.pod:5062 ../src/guestfs-actions.pod:7801
16810 "Change the behavior of the kernel code when errors are detected. Possible "
16811 "values currently are: C<continue>, C<remount-ro>, C<panic>. In practice "
16812 "these options don't really make any difference, particularly for write "
16817 #: ../fish/guestfish-actions.pod:5067 ../src/guestfs-actions.pod:7806
16818 msgid "This is the same as the tune2fs C<-e> option."
16822 #: ../fish/guestfish-actions.pod:5069 ../src/guestfs-actions.pod:7808
16827 #: ../fish/guestfish-actions.pod:5071 ../src/guestfs-actions.pod:7810
16829 "Set the group which can use reserved filesystem blocks. This is the same as "
16830 "the tune2fs C<-g> option except that it can only be specified as a number."
16834 #: ../fish/guestfish-actions.pod:5075 ../src/guestfs-actions.pod:7814
16835 msgid "C<intervalbetweenchecks>"
16839 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7816
16841 "Adjust the maximal time between two filesystem checks (in seconds). If the "
16842 "option is passed as C<0> then time-dependent checking is disabled."
16846 #: ../fish/guestfish-actions.pod:5081 ../src/guestfs-actions.pod:7820
16847 msgid "This is the same as the tune2fs C<-i> option."
16851 #: ../fish/guestfish-actions.pod:5083 ../src/guestfs-actions.pod:7822
16852 msgid "C<reservedblockspercentage>"
16856 #: ../fish/guestfish-actions.pod:5085 ../src/guestfs-actions.pod:7824
16858 "Set the percentage of the filesystem which may only be allocated by "
16859 "privileged processes. This is the same as the tune2fs C<-m> option."
16863 #: ../fish/guestfish-actions.pod:5089 ../src/guestfs-actions.pod:7828
16864 msgid "C<lastmounteddirectory>"
16868 #: ../fish/guestfish-actions.pod:5091 ../src/guestfs-actions.pod:7830
16870 "Set the last mounted directory. This is the same as the tune2fs C<-M> "
16875 #: ../fish/guestfish-actions.pod:5094 ../src/guestfs-actions.pod:7833
16877 "C<reservedblockscount> Set the number of reserved filesystem blocks. This "
16878 "is the same as the tune2fs C<-r> option."
16882 #: ../fish/guestfish-actions.pod:5098 ../src/guestfs-actions.pod:7837
16887 #: ../fish/guestfish-actions.pod:5100 ../src/guestfs-actions.pod:7839
16889 "Set the user who can use the reserved filesystem blocks. This is the same "
16890 "as the tune2fs C<-u> option except that it can only be specified as a "
16895 #: ../fish/guestfish-actions.pod:5106
16897 "To get the current values of filesystem parameters, see L</tune2fs-l>. For "
16898 "precise details of how tune2fs works, see the L<tune2fs(8)> man page."
16902 #: ../fish/guestfish-actions.pod:5112
16907 #: ../fish/guestfish-actions.pod:5114
16910 " tune2fs-l device\n"
16915 #: ../fish/guestfish-actions.pod:5116 ../src/guestfs-actions.pod:7881
16917 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16922 #: ../fish/guestfish-actions.pod:5119 ../src/guestfs-actions.pod:7884
16924 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16925 "for more details. The list of fields returned isn't clearly defined, and "
16926 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16927 "and the filesystem itself."
16931 #: ../fish/guestfish-actions.pod:5124
16936 #: ../fish/guestfish-actions.pod:5126
16939 " txz-in (tarball|-) directory\n"
16944 #: ../fish/guestfish-actions.pod:5128 ../src/guestfs-actions.pod:7904
16946 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16947 "tar file) into C<directory>."
16951 #: ../fish/guestfish-actions.pod:5133
16956 #: ../fish/guestfish-actions.pod:5135
16959 " txz-out directory (tarball|-)\n"
16964 #: ../fish/guestfish-actions.pod:5137 ../src/guestfs-actions.pod:7918
16966 "This command packs the contents of C<directory> and downloads it to local "
16967 "file C<tarball> (as an xz compressed tar archive)."
16971 #: ../fish/guestfish-actions.pod:5142
16976 #: ../fish/guestfish-actions.pod:5144
16984 #: ../fish/guestfish-actions.pod:5146 ../src/guestfs-actions.pod:7931
16986 "This function sets the mask used for creating new files and device nodes to "
16991 #: ../fish/guestfish-actions.pod:5149 ../src/guestfs-actions.pod:7934
16993 "Typical umask values would be C<022> which creates new files with "
16994 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16995 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16999 #: ../fish/guestfish-actions.pod:5154 ../src/guestfs-actions.pod:7939
17001 "The default umask is C<022>. This is important because it means that "
17002 "directories and device nodes will be created with C<0644> or C<0755> mode "
17003 "even if you specify C<0777>."
17007 #: ../fish/guestfish-actions.pod:5158
17008 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
17012 #: ../fish/guestfish-actions.pod:5161 ../src/guestfs-actions.pod:7946
17013 msgid "This call returns the previous umask."
17017 #: ../fish/guestfish-actions.pod:5163
17022 #: ../fish/guestfish-actions.pod:5165
17027 #: ../fish/guestfish-actions.pod:5167
17030 " umount pathordevice\n"
17035 #: ../fish/guestfish-actions.pod:5169 ../src/guestfs-actions.pod:7958
17037 "This unmounts the given filesystem. The filesystem may be specified either "
17038 "by its mountpoint (path) or the device which contains the filesystem."
17042 #: ../fish/guestfish-actions.pod:5173
17047 #: ../fish/guestfish-actions.pod:5175
17048 msgid "unmount-all"
17052 #: ../fish/guestfish-actions.pod:5177
17060 #: ../fish/guestfish-actions.pod:5179 ../src/guestfs-actions.pod:7971
17061 msgid "This unmounts all mounted filesystems."
17065 #: ../fish/guestfish-actions.pod:5181 ../src/guestfs-actions.pod:7973
17066 msgid "Some internal mounts are not unmounted by this call."
17070 #: ../fish/guestfish-actions.pod:5183
17075 #: ../fish/guestfish-actions.pod:5185
17078 " upload (filename|-) remotefilename\n"
17083 #: ../fish/guestfish-actions.pod:5187 ../fish/guestfish-actions.pod:5200 ../src/guestfs-actions.pod:7986 ../src/guestfs-actions.pod:8010
17084 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
17088 #: ../fish/guestfish-actions.pod:5192
17089 msgid "See also L</download>."
17093 #: ../fish/guestfish-actions.pod:5196
17094 msgid "upload-offset"
17098 #: ../fish/guestfish-actions.pod:5198
17101 " upload-offset (filename|-) remotefilename offset\n"
17106 #: ../fish/guestfish-actions.pod:5203 ../src/guestfs-actions.pod:8013
17108 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
17109 "The intention is to overwrite parts of existing files or devices, although "
17110 "if a non-existant file is specified then it is created with a \"hole\" "
17111 "before C<offset>. The size of the data written is implicit in the size of "
17112 "the source C<filename>."
17116 #: ../fish/guestfish-actions.pod:5210
17118 "Note that there is no limit on the amount of data that can be uploaded with "
17119 "this call, unlike with L</pwrite>, and this call always writes the full "
17120 "amount unless an error occurs."
17124 #: ../fish/guestfish-actions.pod:5215
17125 msgid "See also L</upload>, L</pwrite>."
17129 #: ../fish/guestfish-actions.pod:5219
17134 #: ../fish/guestfish-actions.pod:5221
17137 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
17142 #: ../fish/guestfish-actions.pod:5223 ../src/guestfs-actions.pod:8046
17143 msgid "This command sets the timestamps of a file with nanosecond precision."
17147 #: ../fish/guestfish-actions.pod:5226 ../src/guestfs-actions.pod:8049
17149 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
17154 #: ../fish/guestfish-actions.pod:5229 ../src/guestfs-actions.pod:8052
17156 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
17157 "nanoseconds from the epoch."
17161 #: ../fish/guestfish-actions.pod:5232 ../src/guestfs-actions.pod:8055
17163 "If the C<*nsecs> field contains the special value C<-1> then the "
17164 "corresponding timestamp is set to the current time. (The C<*secs> field is "
17165 "ignored in this case)."
17169 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:8059
17171 "If the C<*nsecs> field contains the special value C<-2> then the "
17172 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
17177 #: ../fish/guestfish-actions.pod:5240
17182 #: ../fish/guestfish-actions.pod:5242
17190 #: ../fish/guestfish-actions.pod:5244 ../src/guestfs-actions.pod:8072
17191 msgid "Return the libguestfs version number that the program is linked against."
17195 #: ../fish/guestfish-actions.pod:5247 ../src/guestfs-actions.pod:8075
17197 "Note that because of dynamic linking this is not necessarily the version of "
17198 "libguestfs that you compiled against. You can compile the program, and then "
17199 "at runtime dynamically link against a completely different C<libguestfs.so> "
17204 #: ../fish/guestfish-actions.pod:5252 ../src/guestfs-actions.pod:8080
17206 "This call was added in version C<1.0.58>. In previous versions of "
17207 "libguestfs there was no way to get the version number. From C code you can "
17208 "use dynamic linker functions to find out if this symbol exists (if it "
17209 "doesn't, then it's an earlier version)."
17213 #: ../fish/guestfish-actions.pod:5258 ../src/guestfs-actions.pod:8086
17215 "The call returns a structure with four elements. The first three (C<major>, "
17216 "C<minor> and C<release>) are numbers and correspond to the usual version "
17217 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
17218 "but may be used for distro-specific information."
17222 #: ../fish/guestfish-actions.pod:5264 ../src/guestfs-actions.pod:8092
17223 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
17227 #: ../fish/guestfish-actions.pod:5267 ../src/guestfs-actions.pod:8095
17228 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
17232 #: ../fish/guestfish-actions.pod:5269
17234 "I<Note:> Don't use this call to test for availability of features. In "
17235 "enterprise distributions we backport features from later versions into "
17236 "earlier versions, making this an unreliable way to test for features. Use "
17237 "L</available> instead."
17241 #: ../fish/guestfish-actions.pod:5275
17246 #: ../fish/guestfish-actions.pod:5277
17249 " vfs-label device\n"
17254 #: ../fish/guestfish-actions.pod:5279 ../src/guestfs-actions.pod:8115
17255 msgid "This returns the filesystem label of the filesystem on C<device>."
17259 #: ../fish/guestfish-actions.pod:5282 ../src/guestfs-actions.pod:8118
17260 msgid "If the filesystem is unlabeled, this returns the empty string."
17264 #: ../fish/guestfish-actions.pod:5284
17265 msgid "To find a filesystem from the label, use L</findfs-label>."
17269 #: ../fish/guestfish-actions.pod:5286
17274 #: ../fish/guestfish-actions.pod:5288
17277 " vfs-type device\n"
17282 #: ../fish/guestfish-actions.pod:5290 ../src/guestfs-actions.pod:8133
17284 "This command gets the filesystem type corresponding to the filesystem on "
17289 #: ../fish/guestfish-actions.pod:5293 ../src/guestfs-actions.pod:8136
17291 "For most filesystems, the result is the name of the Linux VFS module which "
17292 "would be used to mount this filesystem if you mounted it without specifying "
17293 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
17297 #: ../fish/guestfish-actions.pod:5298
17302 #: ../fish/guestfish-actions.pod:5300
17305 " vfs-uuid device\n"
17310 #: ../fish/guestfish-actions.pod:5302 ../src/guestfs-actions.pod:8152
17311 msgid "This returns the filesystem UUID of the filesystem on C<device>."
17315 #: ../fish/guestfish-actions.pod:5305 ../src/guestfs-actions.pod:8155
17316 msgid "If the filesystem does not have a UUID, this returns the empty string."
17320 #: ../fish/guestfish-actions.pod:5307
17321 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
17325 #: ../fish/guestfish-actions.pod:5309
17326 msgid "vg-activate"
17330 #: ../fish/guestfish-actions.pod:5311
17333 " vg-activate true|false 'volgroups ...'\n"
17338 #: ../fish/guestfish-actions.pod:5313 ../src/guestfs-actions.pod:8171
17340 "This command activates or (if C<activate> is false) deactivates all logical "
17341 "volumes in the listed volume groups C<volgroups>."
17345 #: ../fish/guestfish-actions.pod:5316 ../src/guestfs-actions.pod:8174
17346 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
17350 #: ../fish/guestfish-actions.pod:5318 ../src/guestfs-actions.pod:8176
17352 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
17353 "activated or deactivated."
17357 #: ../fish/guestfish-actions.pod:5321
17358 msgid "vg-activate-all"
17362 #: ../fish/guestfish-actions.pod:5323
17365 " vg-activate-all true|false\n"
17370 #: ../fish/guestfish-actions.pod:5325 ../src/guestfs-actions.pod:8189
17372 "This command activates or (if C<activate> is false) deactivates all logical "
17373 "volumes in all volume groups."
17377 #: ../fish/guestfish-actions.pod:5328 ../src/guestfs-actions.pod:8192
17378 msgid "This command is the same as running C<vgchange -a y|n>"
17382 #: ../fish/guestfish-actions.pod:5330
17387 #: ../fish/guestfish-actions.pod:5332
17390 " vgcreate volgroup 'physvols ...'\n"
17395 #: ../fish/guestfish-actions.pod:5334 ../src/guestfs-actions.pod:8205
17397 "This creates an LVM volume group called C<volgroup> from the non-empty list "
17398 "of physical volumes C<physvols>."
17402 #: ../fish/guestfish-actions.pod:5337
17407 #: ../fish/guestfish-actions.pod:5339
17410 " vglvuuids vgname\n"
17415 #: ../fish/guestfish-actions.pod:5341 ../src/guestfs-actions.pod:8218
17417 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
17418 "volumes created in this volume group."
17422 #: ../fish/guestfish-actions.pod:5344
17424 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
17425 "logical volumes and volume groups."
17429 #: ../fish/guestfish-actions.pod:5347
17430 msgid "See also L</vgpvuuids>."
17434 #: ../fish/guestfish-actions.pod:5349
17439 #: ../fish/guestfish-actions.pod:5351
17442 " vgpvuuids vgname\n"
17447 #: ../fish/guestfish-actions.pod:5353 ../src/guestfs-actions.pod:8238
17449 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
17450 "volumes that this volume group resides on."
17454 #: ../fish/guestfish-actions.pod:5356
17456 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
17457 "physical volumes and volume groups."
17461 #: ../fish/guestfish-actions.pod:5359
17462 msgid "See also L</vglvuuids>."
17466 #: ../fish/guestfish-actions.pod:5361
17471 #: ../fish/guestfish-actions.pod:5363
17474 " vgremove vgname\n"
17479 #: ../fish/guestfish-actions.pod:5365 ../src/guestfs-actions.pod:8258
17480 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17484 #: ../fish/guestfish-actions.pod:5367 ../src/guestfs-actions.pod:8260
17485 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
17489 #: ../fish/guestfish-actions.pod:5370
17494 #: ../fish/guestfish-actions.pod:5372
17497 " vgrename volgroup newvolgroup\n"
17502 #: ../fish/guestfish-actions.pod:5374 ../src/guestfs-actions.pod:8274
17503 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17507 #: ../fish/guestfish-actions.pod:5376
17512 #: ../fish/guestfish-actions.pod:5378
17520 #: ../fish/guestfish-actions.pod:5380 ../src/guestfs-actions.pod:8285
17522 "List all the volumes groups detected. This is the equivalent of the "
17523 "L<vgs(8)> command."
17527 #: ../fish/guestfish-actions.pod:5383 ../src/guestfs-actions.pod:8288
17529 "This returns a list of just the volume group names that were detected "
17530 "(eg. C<VolGroup00>)."
17534 #: ../fish/guestfish-actions.pod:5386
17535 msgid "See also L</vgs-full>."
17539 #: ../fish/guestfish-actions.pod:5388
17544 #: ../fish/guestfish-actions.pod:5390
17552 #: ../fish/guestfish-actions.pod:5392 ../src/guestfs-actions.pod:8304
17554 "List all the volumes groups detected. This is the equivalent of the "
17555 "L<vgs(8)> command. The \"full\" version includes all fields."
17559 #: ../fish/guestfish-actions.pod:5395
17564 #: ../fish/guestfish-actions.pod:5397
17572 #: ../fish/guestfish-actions.pod:5399 ../src/guestfs-actions.pod:8318
17574 "This rescans all block devices and rebuilds the list of LVM physical "
17575 "volumes, volume groups and logical volumes."
17579 #: ../fish/guestfish-actions.pod:5402
17584 #: ../fish/guestfish-actions.pod:5404
17592 #: ../fish/guestfish-actions.pod:5406 ../src/guestfs-actions.pod:8331
17593 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17597 #: ../fish/guestfish-actions.pod:5408
17602 #: ../fish/guestfish-actions.pod:5410
17610 #: ../fish/guestfish-actions.pod:5412 ../src/guestfs-actions.pod:8371
17612 "This command counts the characters in a file, using the C<wc -c> external "
17617 #: ../fish/guestfish-actions.pod:5415
17622 #: ../fish/guestfish-actions.pod:5417
17630 #: ../fish/guestfish-actions.pod:5419 ../src/guestfs-actions.pod:8384
17632 "This command counts the lines in a file, using the C<wc -l> external "
17637 #: ../fish/guestfish-actions.pod:5422
17642 #: ../fish/guestfish-actions.pod:5424
17650 #: ../fish/guestfish-actions.pod:5426 ../src/guestfs-actions.pod:8397
17652 "This command counts the words in a file, using the C<wc -w> external "
17657 #: ../fish/guestfish-actions.pod:5429
17662 #: ../fish/guestfish-actions.pod:5431
17665 " write path content\n"
17670 #: ../fish/guestfish-actions.pod:5433 ../src/guestfs-actions.pod:8412
17672 "This call creates a file called C<path>. The content of the file is the "
17673 "string C<content> (which can contain any 8 bit data)."
17677 #: ../fish/guestfish-actions.pod:5436
17678 msgid "See also L</write-append>."
17682 #: ../fish/guestfish-actions.pod:5441
17683 msgid "write-append"
17687 #: ../fish/guestfish-actions.pod:5443
17690 " write-append path content\n"
17695 #: ../fish/guestfish-actions.pod:5445 ../src/guestfs-actions.pod:8432
17697 "This call appends C<content> to the end of file C<path>. If C<path> does "
17698 "not exist, then a new file is created."
17702 #: ../fish/guestfish-actions.pod:5448
17703 msgid "See also L</write>."
17707 #: ../fish/guestfish-actions.pod:5453
17712 #: ../fish/guestfish-actions.pod:5455
17715 " write-file path content size\n"
17720 #: ../fish/guestfish-actions.pod:5457 ../src/guestfs-actions.pod:8459
17722 "This call creates a file called C<path>. The contents of the file is the "
17723 "string C<content> (which can contain any 8 bit data), with length C<size>."
17727 #: ../fish/guestfish-actions.pod:5461 ../src/guestfs-actions.pod:8463
17729 "As a special case, if C<size> is C<0> then the length is calculated using "
17730 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17734 #: ../fish/guestfish-actions.pod:5465 ../src/guestfs-actions.pod:8467
17736 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17737 "I<not> work, even if the length is specified."
17741 #: ../fish/guestfish-actions.pod:5471
17742 msgid "I<This function is deprecated.> In new code, use the L</write> call instead."
17746 #: ../fish/guestfish-actions.pod:5478
17751 #: ../fish/guestfish-actions.pod:5480
17754 " zegrep regex path\n"
17759 #: ../fish/guestfish-actions.pod:5482 ../src/guestfs-actions.pod:8484
17760 msgid "This calls the external C<zegrep> program and returns the matching lines."
17764 #: ../fish/guestfish-actions.pod:5488
17769 #: ../fish/guestfish-actions.pod:5490
17772 " zegrepi regex path\n"
17777 #: ../fish/guestfish-actions.pod:5492 ../src/guestfs-actions.pod:8503
17778 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
17782 #: ../fish/guestfish-actions.pod:5498
17787 #: ../fish/guestfish-actions.pod:5500
17795 #: ../fish/guestfish-actions.pod:5502 ../src/guestfs-actions.pod:8521
17796 msgid "This command writes zeroes over the first few blocks of C<device>."
17800 #: ../fish/guestfish-actions.pod:5504 ../src/guestfs-actions.pod:8523
17802 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17803 "securely wipe the device). It should be sufficient to remove any partition "
17804 "tables, filesystem superblocks and so on."
17808 #: ../fish/guestfish-actions.pod:5508 ../fish/guestfish-actions.pod:5523 ../src/guestfs-actions.pod:8527 ../src/guestfs-actions.pod:8553
17810 "If blocks are already zero, then this command avoids writing zeroes. This "
17811 "prevents the underlying device from becoming non-sparse or growing "
17816 #: ../fish/guestfish-actions.pod:5512
17817 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17821 #: ../fish/guestfish-actions.pod:5515
17822 msgid "zero-device"
17826 #: ../fish/guestfish-actions.pod:5517
17829 " zero-device device\n"
17834 #: ../fish/guestfish-actions.pod:5519
17836 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17837 "which just zeroes the first few blocks of a device."
17841 #: ../fish/guestfish-actions.pod:5527
17846 #: ../fish/guestfish-actions.pod:5529
17849 " zerofree device\n"
17854 #: ../fish/guestfish-actions.pod:5531 ../src/guestfs-actions.pod:8572
17856 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17857 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17858 "possible to compress the filesystem more effectively."
17862 #: ../fish/guestfish-actions.pod:5536 ../src/guestfs-actions.pod:8577
17863 msgid "You should B<not> run this program if the filesystem is mounted."
17867 #: ../fish/guestfish-actions.pod:5539 ../src/guestfs-actions.pod:8580
17869 "It is possible that using this program can damage the filesystem or data on "
17874 #: ../fish/guestfish-actions.pod:5542
17879 #: ../fish/guestfish-actions.pod:5544
17882 " zfgrep pattern path\n"
17887 #: ../fish/guestfish-actions.pod:5546 ../src/guestfs-actions.pod:8594
17888 msgid "This calls the external C<zfgrep> program and returns the matching lines."
17892 #: ../fish/guestfish-actions.pod:5552
17897 #: ../fish/guestfish-actions.pod:5554
17900 " zfgrepi pattern path\n"
17905 #: ../fish/guestfish-actions.pod:5556 ../src/guestfs-actions.pod:8613
17906 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
17910 #: ../fish/guestfish-actions.pod:5562
17915 #: ../fish/guestfish-actions.pod:5564
17918 " zfile meth path\n"
17923 #: ../fish/guestfish-actions.pod:5566 ../src/guestfs-actions.pod:8639
17924 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
17928 #: ../fish/guestfish-actions.pod:5569 ../src/guestfs-actions.pod:8642
17929 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17933 #: ../fish/guestfish-actions.pod:5571
17934 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
17938 #: ../fish/guestfish-actions.pod:5574
17939 msgid "I<This function is deprecated.> In new code, use the L</file> call instead."
17943 #: ../fish/guestfish-actions.pod:5581
17948 #: ../fish/guestfish-actions.pod:5583
17951 " zgrep regex path\n"
17956 #: ../fish/guestfish-actions.pod:5585 ../src/guestfs-actions.pod:8659
17957 msgid "This calls the external C<zgrep> program and returns the matching lines."
17961 #: ../fish/guestfish-actions.pod:5591
17966 #: ../fish/guestfish-actions.pod:5593
17969 " zgrepi regex path\n"
17974 #: ../fish/guestfish-actions.pod:5595 ../src/guestfs-actions.pod:8678
17975 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
17979 #: ../fish/guestfish-commands.pod:1
17984 #: ../fish/guestfish-commands.pod:3
17989 #: ../fish/guestfish-commands.pod:5
17992 " alloc filename size\n"
17997 #: ../fish/guestfish-commands.pod:7
17999 "This creates an empty (zeroed) file of the given size, and then adds so it "
18000 "can be further examined."
18004 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
18005 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
18009 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
18010 msgid "Size can be specified using standard suffixes, eg. C<1M>."
18014 #: ../fish/guestfish-commands.pod:14
18016 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
18017 "image, see L</PREPARED DISK IMAGES>."
18021 #: ../fish/guestfish-commands.pod:17
18026 #: ../fish/guestfish-commands.pod:19
18029 " copy-in local [local ...] /remotedir\n"
18034 #: ../fish/guestfish-commands.pod:21
18036 "C<copy-in> copies local files or directories recursively into the disk "
18037 "image, placing them in the directory called C</remotedir> (which must "
18038 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
18039 "other commands as necessary."
18043 #: ../fish/guestfish-commands.pod:26
18045 "Multiple local files and directories can be specified, but the last "
18046 "parameter must always be a remote directory. Wildcards cannot be used."
18050 #: ../fish/guestfish-commands.pod:30
18055 #: ../fish/guestfish-commands.pod:32
18058 " copy-out remote [remote ...] localdir\n"
18063 #: ../fish/guestfish-commands.pod:34
18065 "C<copy-out> copies remote files or directories recursively out of the disk "
18066 "image, placing them on the host disk in a local directory called C<localdir> "
18067 "(which must exist). This guestfish meta-command turns into a sequence of "
18068 "L</download>, L</tar-out> and other commands as necessary."
18072 #: ../fish/guestfish-commands.pod:40
18074 "Multiple remote files and directories can be specified, but the last "
18075 "parameter must always be a local directory. To download to the current "
18076 "directory, use C<.> as in:"
18080 #: ../fish/guestfish-commands.pod:44
18083 " copy-out /home .\n"
18088 #: ../fish/guestfish-commands.pod:46
18090 "Wildcards cannot be used in the ordinary command, but you can use them with "
18091 "the help of L</glob> like this:"
18095 #: ../fish/guestfish-commands.pod:49
18098 " glob copy-out /home/* .\n"
18103 #: ../fish/guestfish-commands.pod:51
18108 #: ../fish/guestfish-commands.pod:53
18111 " display filename\n"
18116 #: ../fish/guestfish-commands.pod:55
18118 "Use C<display> (a graphical display program) to display an image file. It "
18119 "downloads the file, and runs C<display> on it."
18123 #: ../fish/guestfish-commands.pod:58
18125 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
18126 "environment variable. For example to use the GNOME display program:"
18130 #: ../fish/guestfish-commands.pod:61
18133 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
18138 #: ../fish/guestfish-commands.pod:63
18139 msgid "See also L<display(1)>."
18143 #: ../fish/guestfish-commands.pod:65
18148 #: ../fish/guestfish-commands.pod:67
18151 " echo [params ...]\n"
18156 #: ../fish/guestfish-commands.pod:69
18157 msgid "This echos the parameters to the terminal."
18161 #: ../fish/guestfish-commands.pod:71
18166 #: ../fish/guestfish-commands.pod:73
18171 #: ../fish/guestfish-commands.pod:75
18176 #: ../fish/guestfish-commands.pod:77
18184 #: ../fish/guestfish-commands.pod:79
18186 "This is used to edit a file. It downloads the file, edits it locally using "
18187 "your editor, then uploads the result."
18191 #: ../fish/guestfish-commands.pod:82
18193 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
18194 "or C<emacs> you will get those corresponding editors."
18198 #: ../fish/guestfish-commands.pod:86
18203 #: ../fish/guestfish-commands.pod:88
18206 " glob command args...\n"
18211 #: ../fish/guestfish-commands.pod:90
18213 "Expand wildcards in any paths in the args list, and run C<command> "
18214 "repeatedly on each matching path."
18218 #: ../fish/guestfish-commands.pod:93
18219 msgid "See L</WILDCARDS AND GLOBBING>."
18223 #: ../fish/guestfish-commands.pod:95
18228 #: ../fish/guestfish-commands.pod:97
18231 " hexedit <filename|device>\n"
18232 " hexedit <filename|device> <max>\n"
18233 " hexedit <filename|device> <start> <max>\n"
18238 #: ../fish/guestfish-commands.pod:101
18240 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
18245 #: ../fish/guestfish-commands.pod:104
18247 "This command works by downloading potentially the whole file or device, "
18248 "editing it locally, then uploading it. If the file or device is large, you "
18249 "have to specify which part you wish to edit by using C<max> and/or C<start> "
18250 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
18251 "usual modifiers allowed such as C<1M> (1 megabyte)."
18255 #: ../fish/guestfish-commands.pod:111
18256 msgid "For example to edit the first few sectors of a disk you might do:"
18260 #: ../fish/guestfish-commands.pod:114
18263 " hexedit /dev/sda 1M\n"
18268 #: ../fish/guestfish-commands.pod:116
18270 "which would allow you to edit anywhere within the first megabyte of the "
18275 #: ../fish/guestfish-commands.pod:119
18276 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
18280 #: ../fish/guestfish-commands.pod:121
18283 " hexedit /dev/sda1 0x400 0x400\n"
18288 #: ../fish/guestfish-commands.pod:123
18289 msgid "(assuming the superblock is in the standard location)."
18293 #: ../fish/guestfish-commands.pod:125
18295 "This command requires the external L<hexedit(1)> program. You can specify "
18296 "another program to use by setting the C<HEXEDITOR> environment variable."
18300 #: ../fish/guestfish-commands.pod:129
18301 msgid "See also L</hexdump>."
18305 #: ../fish/guestfish-commands.pod:131
18310 #: ../fish/guestfish-commands.pod:133
18318 #: ../fish/guestfish-commands.pod:135
18319 msgid "Change the local directory, ie. the current directory of guestfish itself."
18323 #: ../fish/guestfish-commands.pod:138
18324 msgid "Note that C<!cd> won't do what you might expect."
18328 #: ../fish/guestfish-commands.pod:140
18333 #: ../fish/guestfish-commands.pod:142
18338 #: ../fish/guestfish-commands.pod:144
18346 #: ../fish/guestfish-commands.pod:146
18347 msgid "Opens the manual page for guestfish."
18351 #: ../fish/guestfish-commands.pod:148
18356 #: ../fish/guestfish-commands.pod:150
18361 #: ../fish/guestfish-commands.pod:152
18369 #: ../fish/guestfish-commands.pod:154
18377 #: ../fish/guestfish-commands.pod:156
18378 msgid "This is used to view a file."
18382 #: ../fish/guestfish-commands.pod:158
18384 "The default viewer is C<$PAGER>. However if you use the alternate command "
18385 "C<less> you will get the C<less> command specifically."
18389 #: ../fish/guestfish-commands.pod:161
18394 #: ../fish/guestfish-commands.pod:163
18402 #: ../fish/guestfish-commands.pod:165
18404 "Close and reopen the libguestfs handle. It is not necessary to use this "
18405 "normally, because the handle is closed properly when guestfish exits. "
18406 "However this is occasionally useful for testing."
18410 #: ../fish/guestfish-commands.pod:169
18415 #: ../fish/guestfish-commands.pod:171
18418 " setenv VAR value\n"
18423 #: ../fish/guestfish-commands.pod:173
18424 msgid "Set the environment variable C<VAR> to the string C<value>."
18428 #: ../fish/guestfish-commands.pod:175
18429 msgid "To print the value of an environment variable use a shell command such as:"
18433 #: ../fish/guestfish-commands.pod:178
18441 #: ../fish/guestfish-commands.pod:180
18446 #: ../fish/guestfish-commands.pod:182
18449 " sparse filename size\n"
18454 #: ../fish/guestfish-commands.pod:184
18456 "This creates an empty sparse file of the given size, and then adds so it can "
18457 "be further examined."
18461 #: ../fish/guestfish-commands.pod:187
18463 "In all respects it works the same as the L</alloc> command, except that the "
18464 "image file is allocated sparsely, which means that disk blocks are not "
18465 "assigned to the file until they are needed. Sparse disk files only use "
18466 "space when written to, but they are slower and there is a danger you could "
18467 "run out of real disk space during a write operation."
18471 #: ../fish/guestfish-commands.pod:197
18476 #: ../fish/guestfish-commands.pod:199
18484 #: ../fish/guestfish-commands.pod:201
18486 "This command returns a list of the optional groups known to the daemon, and "
18487 "indicates which ones are supported by this build of the libguestfs "
18492 #: ../fish/guestfish-commands.pod:205
18493 msgid "See also L<guestfs(3)/AVAILABILITY>."
18497 #: ../fish/guestfish-commands.pod:207
18502 #: ../fish/guestfish-commands.pod:209
18505 " time command args...\n"
18510 #: ../fish/guestfish-commands.pod:211
18512 "Run the command as usual, but print the elapsed time afterwards. This can "
18513 "be useful for benchmarking operations."
18517 #: ../fish/guestfish-commands.pod:214
18522 #: ../fish/guestfish-commands.pod:216
18530 #: ../fish/guestfish-commands.pod:218
18531 msgid "Remove C<VAR> from the environment."
18535 #: ../fish/guestfish.pod:5
18536 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18540 #: ../fish/guestfish.pod:9
18543 " guestfish [--options] [commands]\n"
18548 #: ../fish/guestfish.pod:11
18556 #: ../fish/guestfish.pod:13
18559 " guestfish [--ro|--rw] -a disk.img\n"
18564 #: ../fish/guestfish.pod:15
18567 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18572 #: ../fish/guestfish.pod:17
18575 " guestfish -d libvirt-domain\n"
18580 #: ../fish/guestfish.pod:19
18583 " guestfish [--ro|--rw] -a disk.img -i\n"
18588 #: ../fish/guestfish.pod:21
18591 " guestfish -d libvirt-domain -i\n"
18596 #: ../fish/guestfish.pod:25
18598 "Using guestfish in read/write mode on live virtual machines can be "
18599 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
18600 "option to use guestfish safely if the disk image or virtual machine might be "
18605 #: ../fish/guestfish.pod:32
18607 "Guestfish is a shell and command-line tool for examining and modifying "
18608 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18609 "functionality of the guestfs API, see L<guestfs(3)>."
18613 #: ../fish/guestfish.pod:36
18615 "Guestfish gives you structured access to the libguestfs API, from shell "
18616 "scripts or the command line or interactively. If you want to rescue a "
18617 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18622 #: ../fish/guestfish.pod:43
18623 msgid "As an interactive shell"
18627 #: ../fish/guestfish.pod:45
18635 #: ../fish/guestfish.pod:47
18638 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18639 " editing virtual machine filesystems.\n"
18644 #: ../fish/guestfish.pod:50
18647 " Type: 'help' for a list of commands\n"
18648 " 'man' to read the manual\n"
18649 " 'quit' to quit the shell\n"
18654 #: ../fish/guestfish.pod:54
18657 " ><fs> add-ro disk.img\n"
18659 " ><fs> list-filesystems\n"
18660 " /dev/sda1: ext4\n"
18661 " /dev/vg_guest/lv_root: ext4\n"
18662 " /dev/vg_guest/lv_swap: swap\n"
18663 " ><fs> mount /dev/vg_guest/lv_root /\n"
18664 " ><fs> cat /etc/fstab\n"
18666 " # Created by anaconda\n"
18673 #: ../fish/guestfish.pod:67
18674 msgid "From shell scripts"
18678 #: ../fish/guestfish.pod:69
18679 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18683 #: ../fish/guestfish.pod:71
18686 " guestfish <<_EOF_\n"
18689 " mount /dev/vg_guest/lv_root /\n"
18690 " write /etc/motd \"Welcome, new users\"\n"
18696 #: ../fish/guestfish.pod:78
18697 msgid "List the LVM logical volumes in a disk image:"
18701 #: ../fish/guestfish.pod:80
18704 " guestfish -a disk.img --ro <<_EOF_\n"
18712 #: ../fish/guestfish.pod:85
18713 msgid "List all the filesystems in a disk image:"
18717 #: ../fish/guestfish.pod:87
18720 " guestfish -a disk.img --ro <<_EOF_\n"
18722 " list-filesystems\n"
18728 #: ../fish/guestfish.pod:92
18729 msgid "On one command line"
18733 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18734 msgid "Update C</etc/resolv.conf> in a guest:"
18738 #: ../fish/guestfish.pod:96
18742 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18743 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18748 #: ../fish/guestfish.pod:100
18749 msgid "Edit C</boot/grub/grub.conf> interactively:"
18753 #: ../fish/guestfish.pod:102
18756 " guestfish --rw --add disk.img \\\n"
18757 " --mount /dev/vg_guest/lv_root \\\n"
18758 " --mount /dev/sda1:/boot \\\n"
18759 " edit /boot/grub/grub.conf\n"
18764 #: ../fish/guestfish.pod:107
18765 msgid "Mount disks automatically"
18769 #: ../fish/guestfish.pod:109
18771 "Use the I<-i> option to automatically mount the disks from a virtual "
18776 #: ../fish/guestfish.pod:112
18779 " guestfish --ro -a disk.img -i cat /etc/group\n"
18784 #: ../fish/guestfish.pod:114
18787 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18792 #: ../fish/guestfish.pod:116
18793 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18797 #: ../fish/guestfish.pod:118
18800 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18805 #: ../fish/guestfish.pod:120
18806 msgid "As a script interpreter"
18810 #: ../fish/guestfish.pod:122
18811 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18815 #: ../fish/guestfish.pod:124
18818 " #!/usr/bin/guestfish -f\n"
18819 " sparse test1.img 100M\n"
18821 " part-disk /dev/sda mbr\n"
18822 " mkfs ext2 /dev/sda1\n"
18827 #: ../fish/guestfish.pod:130
18828 msgid "Start with a prepared disk"
18832 #: ../fish/guestfish.pod:132
18834 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18835 "single ext2-formatted partition:"
18839 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18842 " guestfish -N fs\n"
18847 #: ../fish/guestfish.pod:137
18848 msgid "To list what is available do:"
18852 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18855 " guestfish -N help | less\n"
18860 #: ../fish/guestfish.pod:141
18861 msgid "Remote control"
18865 #: ../fish/guestfish.pod:143
18868 " eval \"`guestfish --listen`\"\n"
18869 " guestfish --remote add-ro disk.img\n"
18870 " guestfish --remote run\n"
18871 " guestfish --remote lvs\n"
18876 #: ../fish/guestfish.pod:154
18877 msgid "Displays general help on options."
18881 #: ../fish/guestfish.pod:158
18882 msgid "B<--cmd-help>"
18886 #: ../fish/guestfish.pod:160
18887 msgid "Lists all available guestfish commands."
18891 #: ../fish/guestfish.pod:162
18896 #: ../fish/guestfish.pod:164
18897 msgid "B<--cmd-help cmd>"
18901 #: ../fish/guestfish.pod:166
18902 msgid "Displays detailed help on a single command C<cmd>."
18906 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18907 msgid "B<-a image>"
18911 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18912 msgid "B<--add image>"
18916 #: ../fish/guestfish.pod:172
18917 msgid "Add a block device or virtual machine image to the shell."
18921 #: ../fish/guestfish.pod:177
18923 "Using this flag is mostly equivalent to using the C<add> command, with "
18924 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18925 "the I<--format=...> flag was given."
18929 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18931 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18932 "URI to use. The default is to use the default libvirt connection."
18936 #: ../fish/guestfish.pod:189
18941 #: ../fish/guestfish.pod:191
18943 "If using the I<--listen> option and a csh-like shell, use this option. See "
18944 "section L</REMOTE CONTROL AND CSH> below."
18948 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18949 msgid "B<-d libvirt-domain>"
18953 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18954 msgid "B<--domain libvirt-domain>"
18958 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18960 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18961 "used, then any libvirt domain can be used. However in write mode, only "
18962 "libvirt domains which are shut down can be named here."
18966 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18967 msgid "Domain UUIDs can be used instead of names."
18971 #: ../fish/guestfish.pod:204
18973 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18974 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18975 "if the I<--format:...> flag was given."
18979 #: ../fish/guestfish.pod:208
18984 #: ../fish/guestfish.pod:210
18985 msgid "B<--no-dest-paths>"
18989 #: ../fish/guestfish.pod:212
18991 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18992 "to hit the tab key to complete paths on the guest filesystem, but this "
18993 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18994 "allow this feature to be disabled."
18998 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
19000 "When prompting for keys and passphrases, guestfish normally turns echoing "
19001 "off so you cannot see what you are typing. If you are not worried about "
19002 "Tempest attacks and there is no one else in the room you can specify this "
19003 "flag to see what you are typing."
19007 #: ../fish/guestfish.pod:224
19012 #: ../fish/guestfish.pod:226
19013 msgid "B<--file file>"
19017 #: ../fish/guestfish.pod:228
19018 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
19022 #: ../fish/guestfish.pod:231
19025 " #!/usr/bin/guestfish -f\n"
19030 #: ../fish/guestfish.pod:244
19033 " guestfish --format=raw -a disk.img\n"
19038 #: ../fish/guestfish.pod:248
19041 " guestfish --format=raw -a disk.img --format -a another.img\n"
19046 #: ../fish/guestfish.pod:253
19048 "If you have untrusted raw-format guest disk images, you should use this "
19049 "option to specify the disk format. This avoids a possible security problem "
19050 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
19054 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
19055 msgid "B<--inspector>"
19059 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
19061 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
19062 "system and mount filesystems as they would be mounted on the real virtual "
19067 #: ../fish/guestfish.pod:266
19068 msgid "Typical usage is either:"
19072 #: ../fish/guestfish.pod:268
19075 " guestfish -d myguest -i\n"
19080 #: ../fish/guestfish.pod:270
19081 msgid "(for an inactive libvirt domain called I<myguest>), or:"
19085 #: ../fish/guestfish.pod:272
19088 " guestfish --ro -d myguest -i\n"
19093 #: ../fish/guestfish.pod:274
19094 msgid "(for active domains, readonly), or specify the block device directly:"
19098 #: ../fish/guestfish.pod:276
19101 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
19106 #: ../fish/guestfish.pod:278
19108 "Note that the command line syntax changed slightly over older versions of "
19109 "guestfish. You can still use the old syntax:"
19113 #: ../fish/guestfish.pod:281
19116 " guestfish [--ro] -i disk.img\n"
19121 #: ../fish/guestfish.pod:283
19124 " guestfish [--ro] -i libvirt-domain\n"
19129 #: ../fish/guestfish.pod:285
19131 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
19132 "then using other commands to mount the filesystems that were found."
19136 #: ../fish/guestfish.pod:294
19137 msgid "B<--listen>"
19141 #: ../fish/guestfish.pod:296
19143 "Fork into the background and listen for remote commands. See section "
19144 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
19148 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
19153 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
19155 "Connect to a live virtual machine. (Experimental, see "
19156 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
19160 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
19161 msgid "B<-m dev[:mountpoint[:options]]>"
19165 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
19166 msgid "B<--mount dev[:mountpoint[:options]]>"
19170 #: ../fish/guestfish.pod:308
19171 msgid "Mount the named partition or logical volume on the given mountpoint."
19175 #: ../fish/guestfish.pod:310
19176 msgid "If the mountpoint is omitted, it defaults to C</>."
19180 #: ../fish/guestfish.pod:312
19181 msgid "You have to mount something on C</> before most commands will work."
19185 #: ../fish/guestfish.pod:314
19187 "If any I<-m> or I<--mount> options are given, the guest is automatically "
19192 #: ../fish/guestfish.pod:317
19194 "If you don't know what filesystems a disk image contains, you can either run "
19195 "guestfish without this option, then list the partitions, filesystems and LVs "
19196 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
19197 "commands), or you can use the L<virt-filesystems(1)> program."
19201 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
19203 "The third (and rarely used) part of the mount parameter is the list of mount "
19204 "options used to mount the underlying filesystem. If this is not given, then "
19205 "the mount options are either the empty string or C<ro> (the latter if the "
19206 "I<--ro> flag is used). By specifying the mount options, you override this "
19207 "default choice. Probably the only time you would use this is to enable ACLs "
19208 "and/or extended attributes if the filesystem can support them:"
19212 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
19215 " -m /dev/sda1:/:acl,user_xattr\n"
19220 #: ../fish/guestfish.pod:333
19221 msgid "Using this flag is equivalent to using the C<mount-options> command."
19225 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202 ../resize/virt-resize.pod:441
19230 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
19231 msgid "B<--no-sync>"
19235 #: ../fish/guestfish.pod:339
19237 "Disable autosync. This is enabled by default. See the discussion of "
19238 "autosync in the L<guestfs(3)> manpage."
19242 #: ../fish/guestfish.pod:342
19247 #: ../fish/guestfish.pod:344
19248 msgid "B<--new type>"
19252 #: ../fish/guestfish.pod:346
19257 #: ../fish/guestfish.pod:348
19259 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
19260 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
19261 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
19266 #: ../fish/guestfish.pod:353
19267 msgid "B<--progress-bars>"
19271 #: ../fish/guestfish.pod:355
19272 msgid "Enable progress bars, even when guestfish is used non-interactively."
19276 #: ../fish/guestfish.pod:357
19278 "Progress bars are enabled by default when guestfish is used as an "
19279 "interactive shell."
19283 #: ../fish/guestfish.pod:360
19284 msgid "B<--no-progress-bars>"
19288 #: ../fish/guestfish.pod:362
19289 msgid "Disable progress bars."
19293 #: ../fish/guestfish.pod:364
19294 msgid "B<--remote[=pid]>"
19298 #: ../fish/guestfish.pod:366
19300 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
19301 "CONTROL GUESTFISH OVER A SOCKET> below."
19305 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248 ../rescue/virt-rescue.pod:189
19310 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250 ../rescue/virt-rescue.pod:191
19315 #: ../fish/guestfish.pod:373
19317 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
19318 "mounts are done read-only."
19322 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:195
19324 "The option must always be used if the disk image or virtual machine might be "
19325 "running, and is generally recommended in cases where you don't need write "
19326 "access to the disk."
19330 #: ../fish/guestfish.pod:380
19332 "Note that prepared disk images created with I<-N> are not affected by this "
19333 "option. Also commands like C<add> are not affected - you have to specify "
19334 "the C<readonly:true> option explicitly if you need it."
19338 #: ../fish/guestfish.pod:384
19339 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
19343 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262 ../rescue/virt-rescue.pod:201
19344 msgid "B<--selinux>"
19348 #: ../fish/guestfish.pod:388
19349 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
19353 #: ../fish/guestfish.pod:394
19355 "Enable very verbose messages. This is particularly useful if you find a "
19360 #: ../fish/guestfish.pod:401
19361 msgid "Display the guestfish / libguestfs version number and exit."
19365 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278 ../rescue/virt-rescue.pod:231
19370 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280 ../rescue/virt-rescue.pod:233
19375 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
19377 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
19378 "mounts are done read-write."
19382 #: ../fish/guestfish.pod:410
19383 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
19387 #: ../fish/guestfish.pod:414
19388 msgid "Echo each command before executing it."
19392 #: ../fish/guestfish.pod:418
19393 msgid "COMMANDS ON COMMAND LINE"
19397 #: ../fish/guestfish.pod:420
19398 msgid "Any additional (non-option) arguments are treated as commands to execute."
19402 #: ../fish/guestfish.pod:423
19404 "Commands to execute should be separated by a colon (C<:>), where the colon "
19405 "is a separate parameter. Thus:"
19409 #: ../fish/guestfish.pod:426
19412 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
19417 #: ../fish/guestfish.pod:428
19419 "If there are no additional arguments, then we enter a shell, either an "
19420 "interactive shell with a prompt (if the input is a terminal) or a "
19421 "non-interactive shell."
19425 #: ../fish/guestfish.pod:432
19427 "In either command line mode or non-interactive shell, the first command that "
19428 "gives an error causes the whole shell to exit. In interactive mode (with a "
19429 "prompt) if a command fails, you can continue to enter commands."
19433 #: ../fish/guestfish.pod:437
19434 msgid "USING launch (OR run)"
19438 #: ../fish/guestfish.pod:439
19440 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
19441 "then launch it, then mount any disks you need, and finally issue "
19442 "actions/commands. So the general order of the day is:"
19446 #: ../fish/guestfish.pod:447
19447 msgid "add or -a/--add"
19451 #: ../fish/guestfish.pod:451
19452 msgid "launch (aka run)"
19456 #: ../fish/guestfish.pod:455
19457 msgid "mount or -m/--mount"
19461 #: ../fish/guestfish.pod:459
19462 msgid "any other commands"
19466 #: ../fish/guestfish.pod:463
19468 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19469 "guest before mounting or performing any other commands."
19473 #: ../fish/guestfish.pod:466
19475 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19476 "I<--new> options were given then C<run> is done automatically, simply "
19477 "because guestfish can't perform the action you asked for without doing this."
19481 #: ../fish/guestfish.pod:471
19482 msgid "OPENING DISKS FOR READ AND WRITE"
19486 #: ../fish/guestfish.pod:473
19488 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19489 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19490 "I<-i> and I<-m> open disk images read-only or for writing."
19494 #: ../fish/guestfish.pod:478
19496 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
19497 "opening disk images supplied on the command line for write. To open a disk "
19498 "image read-only you have to do I<-a image --ro>."
19502 #: ../fish/guestfish.pod:482
19504 "This matters: If you accidentally open a live VM disk image writable then "
19505 "you will cause irreversible disk corruption."
19509 #: ../fish/guestfish.pod:485
19511 "In a future libguestfs we intend to change the default the other way. Disk "
19512 "images will be opened read-only. You will have to either specify "
19513 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19514 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19515 "access for disk images specified by those other command line options."
19519 #: ../fish/guestfish.pod:492
19521 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19522 "which does nothing (it is already the default). However it is highly "
19523 "recommended that you use this option to indicate that you need write access, "
19524 "and prepare your scripts for the day when this option will be required for "
19529 #: ../fish/guestfish.pod:498
19531 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
19532 "other libguestfs program apart from guestfish and guestmount."
19536 #: ../fish/guestfish.pod:501
19541 #: ../fish/guestfish.pod:503
19543 "You can quote ordinary parameters using either single or double quotes. For "
19548 #: ../fish/guestfish.pod:506
19551 " add \"file with a space.img\"\n"
19556 #: ../fish/guestfish.pod:508
19559 " rm '/file name'\n"
19564 #: ../fish/guestfish.pod:510
19572 #: ../fish/guestfish.pod:512
19574 "A few commands require a list of strings to be passed. For these, use a "
19575 "whitespace-separated list, enclosed in quotes. Strings containing "
19576 "whitespace to be passed through must be enclosed in single quotes. A "
19577 "literal single quote must be escaped with a backslash."
19581 #: ../fish/guestfish.pod:517
19584 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19585 " command \"/bin/echo 'foo bar'\"\n"
19586 " command \"/bin/echo \\'foo\\'\"\n"
19591 #: ../fish/guestfish.pod:521
19592 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19596 #: ../fish/guestfish.pod:523
19598 "In double-quoted arguments (only) use backslash to insert special "
19603 #: ../fish/guestfish.pod:528
19608 #: ../fish/guestfish.pod:530
19609 msgid "Alert (bell) character."
19613 #: ../fish/guestfish.pod:532
19618 #: ../fish/guestfish.pod:534
19619 msgid "Backspace character."
19623 #: ../fish/guestfish.pod:536
19628 #: ../fish/guestfish.pod:538
19629 msgid "Form feed character."
19633 #: ../fish/guestfish.pod:540
19638 #: ../fish/guestfish.pod:542
19639 msgid "Newline character."
19643 #: ../fish/guestfish.pod:544
19648 #: ../fish/guestfish.pod:546
19649 msgid "Carriage return character."
19653 #: ../fish/guestfish.pod:548
19658 #: ../fish/guestfish.pod:550
19659 msgid "Horizontal tab character."
19663 #: ../fish/guestfish.pod:552
19668 #: ../fish/guestfish.pod:554
19669 msgid "Vertical tab character."
19673 #: ../fish/guestfish.pod:556
19678 #: ../fish/guestfish.pod:558
19679 msgid "A literal double quote character."
19683 #: ../fish/guestfish.pod:560
19688 #: ../fish/guestfish.pod:562
19690 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
19695 #: ../fish/guestfish.pod:565
19700 #: ../fish/guestfish.pod:567
19701 msgid "A character with hex value I<hh>. There must be precisely 2 hex digits."
19705 #: ../fish/guestfish.pod:570
19707 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19712 #: ../fish/guestfish.pod:573
19717 #: ../fish/guestfish.pod:575
19718 msgid "A literal backslash character."
19722 #: ../fish/guestfish.pod:579
19723 msgid "OPTIONAL ARGUMENTS"
19727 #: ../fish/guestfish.pod:581
19729 "Some commands take optional arguments. These arguments appear in this "
19730 "documentation as C<[argname:..]>. You can use them as in these examples:"
19734 #: ../fish/guestfish.pod:585
19737 " add-drive-opts filename\n"
19742 #: ../fish/guestfish.pod:587
19745 " add-drive-opts filename readonly:true\n"
19750 #: ../fish/guestfish.pod:589
19753 " add-drive-opts filename format:qcow2 readonly:false\n"
19758 #: ../fish/guestfish.pod:591
19760 "Each optional argument can appear at most once. All optional arguments must "
19761 "appear after the required ones."
19765 #: ../fish/guestfish.pod:594
19770 #: ../fish/guestfish.pod:596
19771 msgid "This section applies to all commands which can take integers as parameters."
19775 #: ../fish/guestfish.pod:599
19776 msgid "SIZE SUFFIX"
19780 #: ../fish/guestfish.pod:601
19782 "When the command takes a parameter measured in bytes, you can use one of the "
19783 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19787 #: ../fish/guestfish.pod:607
19788 msgid "B<k> or B<K> or B<KiB>"
19792 #: ../fish/guestfish.pod:609
19793 msgid "The size in kilobytes (multiplied by 1024)."
19797 #: ../fish/guestfish.pod:611
19802 #: ../fish/guestfish.pod:613
19803 msgid "The size in SI 1000 byte units."
19807 #: ../fish/guestfish.pod:615
19808 msgid "B<M> or B<MiB>"
19812 #: ../fish/guestfish.pod:617
19813 msgid "The size in megabytes (multiplied by 1048576)."
19817 #: ../fish/guestfish.pod:619
19822 #: ../fish/guestfish.pod:621
19823 msgid "The size in SI 1000000 byte units."
19827 #: ../fish/guestfish.pod:623
19828 msgid "B<G> or B<GiB>"
19832 #: ../fish/guestfish.pod:625
19833 msgid "The size in gigabytes (multiplied by 2**30)."
19837 #: ../fish/guestfish.pod:627
19842 #: ../fish/guestfish.pod:629
19843 msgid "The size in SI 10**9 byte units."
19847 #: ../fish/guestfish.pod:631
19848 msgid "B<T> or B<TiB>"
19852 #: ../fish/guestfish.pod:633
19853 msgid "The size in terabytes (multiplied by 2**40)."
19857 #: ../fish/guestfish.pod:635
19862 #: ../fish/guestfish.pod:637
19863 msgid "The size in SI 10**12 byte units."
19867 #: ../fish/guestfish.pod:639
19868 msgid "B<P> or B<PiB>"
19872 #: ../fish/guestfish.pod:641
19873 msgid "The size in petabytes (multiplied by 2**50)."
19877 #: ../fish/guestfish.pod:643
19882 #: ../fish/guestfish.pod:645
19883 msgid "The size in SI 10**15 byte units."
19887 #: ../fish/guestfish.pod:647
19888 msgid "B<E> or B<EiB>"
19892 #: ../fish/guestfish.pod:649
19893 msgid "The size in exabytes (multiplied by 2**60)."
19897 #: ../fish/guestfish.pod:651
19902 #: ../fish/guestfish.pod:653
19903 msgid "The size in SI 10**18 byte units."
19907 #: ../fish/guestfish.pod:655
19908 msgid "B<Z> or B<ZiB>"
19912 #: ../fish/guestfish.pod:657
19913 msgid "The size in zettabytes (multiplied by 2**70)."
19917 #: ../fish/guestfish.pod:659
19922 #: ../fish/guestfish.pod:661
19923 msgid "The size in SI 10**21 byte units."
19927 #: ../fish/guestfish.pod:663
19928 msgid "B<Y> or B<YiB>"
19932 #: ../fish/guestfish.pod:665
19933 msgid "The size in yottabytes (multiplied by 2**80)."
19937 #: ../fish/guestfish.pod:667
19942 #: ../fish/guestfish.pod:669
19943 msgid "The size in SI 10**24 byte units."
19947 #: ../fish/guestfish.pod:675
19950 " truncate-size /file 1G\n"
19955 #: ../fish/guestfish.pod:677
19956 msgid "would truncate the file to 1 gigabyte."
19960 #: ../fish/guestfish.pod:679
19962 "Be careful because a few commands take sizes in kilobytes or megabytes "
19963 "(eg. the parameter to L</memsize> is specified in megabytes already). "
19964 "Adding a suffix will probably not do what you expect."
19968 #: ../fish/guestfish.pod:683
19969 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19973 #: ../fish/guestfish.pod:685
19975 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19976 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19980 #: ../fish/guestfish.pod:688
19983 " 1234 decimal number 1234\n"
19984 " 02322 octal number, equivalent to decimal 1234\n"
19985 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19990 #: ../fish/guestfish.pod:692
19992 "When using the C<chmod> command, you almost always want to specify an octal "
19993 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19994 "L<chmod(1)> program):"
19998 #: ../fish/guestfish.pod:696
20001 " chmod 0777 /public # OK\n"
20002 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
20007 #: ../fish/guestfish.pod:699
20009 "Commands that return numbers usually print them in decimal, but some "
20010 "commands print numbers in other radices (eg. C<umask> prints the mode in "
20011 "octal, preceeded by C<0>)."
20015 #: ../fish/guestfish.pod:703
20016 msgid "WILDCARDS AND GLOBBING"
20020 #: ../fish/guestfish.pod:705
20022 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
20023 "(globbing) by default. So for example the following will not do what you "
20028 #: ../fish/guestfish.pod:709
20036 #: ../fish/guestfish.pod:711
20038 "Assuming you don't have a directory called literally C</home/*> then the "
20039 "above command will return an error."
20043 #: ../fish/guestfish.pod:714
20044 msgid "To perform wildcard expansion, use the C<glob> command."
20048 #: ../fish/guestfish.pod:716
20051 " glob rm-rf /home/*\n"
20056 #: ../fish/guestfish.pod:718
20058 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
20059 "many times), equivalent to:"
20063 #: ../fish/guestfish.pod:721
20066 " rm-rf /home/jim\n"
20067 " rm-rf /home/joe\n"
20068 " rm-rf /home/mary\n"
20073 #: ../fish/guestfish.pod:725
20074 msgid "C<glob> only works on simple guest paths and not on device names."
20078 #: ../fish/guestfish.pod:727
20080 "If you have several parameters, each containing a wildcard, then glob will "
20081 "perform a Cartesian product."
20085 #: ../fish/guestfish.pod:730
20090 #: ../fish/guestfish.pod:732
20092 "Any line which starts with a I<#> character is treated as a comment and "
20093 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
20094 "a command. For example:"
20098 #: ../fish/guestfish.pod:736
20101 " # this is a comment\n"
20102 " # this is a comment\n"
20103 " foo # NOT a comment\n"
20108 #: ../fish/guestfish.pod:740
20109 msgid "Blank lines are also ignored."
20113 #: ../fish/guestfish.pod:742
20114 msgid "RUNNING COMMANDS LOCALLY"
20118 #: ../fish/guestfish.pod:744
20120 "Any line which starts with a I<!> character is treated as a command sent to "
20121 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
20125 #: ../fish/guestfish.pod:748
20129 " tgz-out /remote local/remote-data.tar.gz\n"
20134 #: ../fish/guestfish.pod:751
20136 "will create a directory C<local> on the host, and then export the contents "
20137 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
20138 "(See C<tgz-out>)."
20142 #: ../fish/guestfish.pod:755
20144 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
20145 "effect, due to the way that subprocesses work in Unix."
20149 #: ../fish/guestfish.pod:758
20150 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
20154 #: ../fish/guestfish.pod:760
20156 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
20157 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
20158 "and executed as guestfish commands."
20162 #: ../fish/guestfish.pod:764
20164 "Thus you can use shell script to construct arbitrary guestfish commands "
20165 "which are then parsed by guestfish."
20169 #: ../fish/guestfish.pod:767
20171 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
20172 "through C</foo.100>) using guestfish commands alone. However this is simple "
20173 "if we use a shell script to create the guestfish commands for us:"
20177 #: ../fish/guestfish.pod:772
20180 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
20185 #: ../fish/guestfish.pod:774
20186 msgid "or with names like C</foo.001>:"
20190 #: ../fish/guestfish.pod:776
20193 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
20198 #: ../fish/guestfish.pod:778
20200 "When using guestfish interactively it can be helpful to just run the shell "
20201 "script first (ie. remove the initial C<E<lt>> character so it is just an "
20202 "ordinary I<!> local command), see what guestfish commands it would run, and "
20203 "when you are happy with those prepend the C<E<lt>> character to run the "
20204 "guestfish commands for real."
20208 #: ../fish/guestfish.pod:784
20213 #: ../fish/guestfish.pod:786
20215 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
20216 "command (a guestfish command) to the second command (any host command). For "
20221 #: ../fish/guestfish.pod:790
20224 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
20229 #: ../fish/guestfish.pod:792
20231 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
20232 "program). The above command would list all accounts in the guest filesystem "
20233 "which have UID 0, ie. root accounts including backdoors. Other examples:"
20237 #: ../fish/guestfish.pod:797
20240 " hexdump /bin/ls | head\n"
20241 " list-devices | tail -1\n"
20242 " tgz-out / - | tar ztf -\n"
20247 #: ../fish/guestfish.pod:801
20249 "The space before the pipe symbol is required, any space after the pipe "
20250 "symbol is optional. Everything after the pipe symbol is just passed "
20251 "straight to the host shell, so it can contain redirections, globs and "
20252 "anything else that makes sense on the host side."
20256 #: ../fish/guestfish.pod:806
20258 "To use a literal argument which begins with a pipe symbol, you have to quote "
20263 #: ../fish/guestfish.pod:809
20271 #: ../fish/guestfish.pod:811
20272 msgid "HOME DIRECTORIES"
20276 #: ../fish/guestfish.pod:813
20278 "If a parameter starts with the character C<~> then the tilde may be expanded "
20279 "as a home directory path (either C<~> for the current user's home directory, "
20280 "or C<~user> for another user)."
20284 #: ../fish/guestfish.pod:817
20286 "Note that home directory expansion happens for users known I<on the host>, "
20287 "not in the guest filesystem."
20291 #: ../fish/guestfish.pod:820
20293 "To use a literal argument which begins with a tilde, you have to quote it, "
20298 #: ../fish/guestfish.pod:823
20306 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
20307 msgid "ENCRYPTED DISKS"
20311 #: ../fish/guestfish.pod:827
20313 "Libguestfs has some support for Linux guests encrypted according to the "
20314 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
20315 "disk encryption systems used by modern Linux guests. Currently only "
20316 "LVM-on-LUKS is supported."
20320 #: ../fish/guestfish.pod:832
20321 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
20325 #: ../fish/guestfish.pod:834
20328 " ><fs> vfs-type /dev/sda2\n"
20334 #: ../fish/guestfish.pod:837
20336 "Then open those devices using L</luks-open>. This creates a device-mapper "
20337 "device called C</dev/mapper/luksdev>."
20341 #: ../fish/guestfish.pod:840
20344 " ><fs> luks-open /dev/sda2 luksdev\n"
20345 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
20350 #: ../fish/guestfish.pod:843
20352 "Finally you have to tell LVM to scan for volume groups on the newly created "
20357 #: ../fish/guestfish.pod:846
20361 " vg-activate-all true\n"
20366 #: ../fish/guestfish.pod:849
20367 msgid "The logical volume(s) can now be mounted in the usual way."
20371 #: ../fish/guestfish.pod:851
20373 "Before closing a LUKS device you must unmount any logical volumes on it and "
20374 "deactivate the volume groups by calling C<vg-activate false VG> on each "
20375 "one. Then you can close the mapper device:"
20379 #: ../fish/guestfish.pod:855
20382 " vg-activate false /dev/VG\n"
20383 " luks-close /dev/mapper/luksdev\n"
20388 #: ../fish/guestfish.pod:860
20390 "If a path is prefixed with C<win:> then you can use Windows-style drive "
20391 "letters and paths (with some limitations). The following commands are "
20396 #: ../fish/guestfish.pod:864
20399 " file /WINDOWS/system32/config/system.LOG\n"
20404 #: ../fish/guestfish.pod:866
20407 " file win:\\windows\\system32\\config\\system.log\n"
20412 #: ../fish/guestfish.pod:868
20415 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
20420 #: ../fish/guestfish.pod:870
20422 "The parameter is rewritten \"behind the scenes\" by looking up the position "
20423 "where the drive is mounted, prepending that to the path, changing all "
20424 "backslash characters to forward slash, then resolving the result using "
20425 "L</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
20426 "then the parameter might be rewritten like this:"
20430 #: ../fish/guestfish.pod:876
20433 " win:e:\\foo\\bar => /e/FOO/bar\n"
20438 #: ../fish/guestfish.pod:878
20439 msgid "This only works in argument positions that expect a path."
20443 #: ../fish/guestfish.pod:880
20444 msgid "UPLOADING AND DOWNLOADING FILES"
20448 #: ../fish/guestfish.pod:882
20450 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
20451 "others which upload from or download to a local file, you can use the "
20452 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
20456 #: ../fish/guestfish.pod:886
20464 #: ../fish/guestfish.pod:888
20465 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
20469 #: ../fish/guestfish.pod:891
20472 " tar-out /etc - | tar tf -\n"
20477 #: ../fish/guestfish.pod:893
20479 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20480 "command (see L</PIPES>)."
20484 #: ../fish/guestfish.pod:896
20486 "When using C<-> to read from stdin, the input is read up to the end of "
20487 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20488 "some arbitrary end marker:"
20492 #: ../fish/guestfish.pod:900
20495 " upload -<<END /foo\n"
20504 #: ../fish/guestfish.pod:906
20506 "Any string of characters can be used instead of C<END>. The end marker must "
20507 "appear on a line of its own, without any preceeding or following characters "
20508 "(not even spaces)."
20512 #: ../fish/guestfish.pod:910
20514 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20515 "upload local files (so-called \"FileIn\" parameters in the generator)."
20519 #: ../fish/guestfish.pod:913
20520 msgid "EXIT ON ERROR BEHAVIOUR"
20524 #: ../fish/guestfish.pod:915
20526 "By default, guestfish will ignore any errors when in interactive mode "
20527 "(ie. taking commands from a human over a tty), and will exit on the first "
20528 "error in non-interactive mode (scripts, commands given on the command line)."
20532 #: ../fish/guestfish.pod:920
20534 "If you prefix a command with a I<-> character, then that command will not "
20535 "cause guestfish to exit, even if that (one) command returns an error."
20539 #: ../fish/guestfish.pod:924
20540 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20544 #: ../fish/guestfish.pod:926
20546 "Guestfish can be remote-controlled over a socket. This is useful "
20547 "particularly in shell scripts where you want to make several different "
20548 "changes to a filesystem, but you don't want the overhead of starting up a "
20549 "guestfish process each time."
20553 #: ../fish/guestfish.pod:931
20554 msgid "Start a guestfish server process using:"
20558 #: ../fish/guestfish.pod:933
20561 " eval \"`guestfish --listen`\"\n"
20566 #: ../fish/guestfish.pod:935
20567 msgid "and then send it commands by doing:"
20571 #: ../fish/guestfish.pod:937
20574 " guestfish --remote cmd [...]\n"
20579 #: ../fish/guestfish.pod:939
20580 msgid "To cause the server to exit, send it the exit command:"
20584 #: ../fish/guestfish.pod:943
20586 "Note that the server will normally exit if there is an error in a command. "
20587 "You can change this in the usual way. See section L</EXIT ON ERROR "
20592 #: ../fish/guestfish.pod:947
20593 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20597 #: ../fish/guestfish.pod:949
20599 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
20600 "is how the I<--remote> option knows where to send the commands. You can "
20601 "have several guestfish listener processes running using:"
20605 #: ../fish/guestfish.pod:953
20608 " eval \"`guestfish --listen`\"\n"
20609 " pid1=$GUESTFISH_PID\n"
20610 " eval \"`guestfish --listen`\"\n"
20611 " pid2=$GUESTFISH_PID\n"
20613 " guestfish --remote=$pid1 cmd\n"
20614 " guestfish --remote=$pid2 cmd\n"
20619 #: ../fish/guestfish.pod:961
20620 msgid "REMOTE CONTROL AND CSH"
20624 #: ../fish/guestfish.pod:963
20626 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20631 #: ../fish/guestfish.pod:966
20634 " eval \"`guestfish --listen --csh`\"\n"
20639 #: ../fish/guestfish.pod:968
20640 msgid "REMOTE CONTROL DETAILS"
20644 #: ../fish/guestfish.pod:970
20646 "Remote control happens over a Unix domain socket called "
20647 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
20648 "of the process, and C<$PID> is the process ID of the server."
20652 #: ../fish/guestfish.pod:974
20653 msgid "Guestfish client and server versions must match exactly."
20657 #: ../fish/guestfish.pod:976
20658 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20662 #: ../fish/guestfish.pod:978
20664 "From Bash, you can use the following code which creates a guestfish "
20665 "instance, correctly quotes the command line, handles failure to start, and "
20666 "cleans up guestfish when the script exits:"
20670 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20678 #: ../fish/guestfish.pod:986
20681 " guestfish[0]=\"guestfish\"\n"
20682 " guestfish[1]=\"--listen\"\n"
20683 " guestfish[2]=\"--ro\"\n"
20684 " guestfish[3]=\"-a\"\n"
20685 " guestfish[4]=\"disk.img\"\n"
20690 #: ../fish/guestfish.pod:992
20693 " GUESTFISH_PID=\n"
20694 " eval $(\"${guestfish[@]}\")\n"
20695 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20696 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20703 #: ../fish/guestfish.pod:999
20706 " cleanup_guestfish ()\n"
20708 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20710 " trap cleanup_guestfish EXIT ERR\n"
20715 #: ../fish/guestfish.pod:1005
20718 " guestfish --remote -- run\n"
20723 #: ../fish/guestfish.pod:1007
20731 #: ../fish/guestfish.pod:1009
20732 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20736 #: ../fish/guestfish.pod:1011
20738 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20739 "context hangs, ie. don't do (note the backquotes):"
20743 #: ../fish/guestfish.pod:1014
20746 " a=`guestfish --remote run`\n"
20751 #: ../fish/guestfish.pod:1016
20753 "Since the C<run> command produces no output on stdout, this is not useful "
20754 "anyway. For further information see "
20755 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
20759 #: ../fish/guestfish.pod:1020
20760 msgid "PREPARED DISK IMAGES"
20764 #: ../fish/guestfish.pod:1022
20766 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20767 "preformatted disk images that guestfish can make for you to save typing. "
20768 "This is particularly useful for testing purposes. This option is used "
20769 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20770 "can be mixed with I<-a>)."
20774 #: ../fish/guestfish.pod:1028
20776 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20777 "the second and so on. Existing files in the current directory are "
20782 #: ../fish/guestfish.pod:1032
20784 "The type briefly describes how the disk should be sized, partitioned, how "
20785 "filesystem(s) should be created, and how content should be added. "
20786 "Optionally the type can be followed by extra parameters, separated by C<:> "
20787 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
20788 "sparsely-allocated disk, containing a single partition, with the partition "
20789 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
20790 "on a 1GB disk instead."
20794 #: ../fish/guestfish.pod:1040
20795 msgid "To list the available types and any extra parameters they take, run:"
20799 #: ../fish/guestfish.pod:1044
20801 "Note that the prepared filesystem is not mounted. You would usually have to "
20802 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20806 #: ../fish/guestfish.pod:1048
20808 "If any I<-N> or I<--new> options are given, the guest is automatically "
20813 #: ../fish/guestfish.pod:1053
20814 msgid "Create a 100MB disk with an ext4-formatted partition:"
20818 #: ../fish/guestfish.pod:1055
20821 " guestfish -N fs:ext4\n"
20826 #: ../fish/guestfish.pod:1057
20827 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20831 #: ../fish/guestfish.pod:1059
20834 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20839 #: ../fish/guestfish.pod:1061
20840 msgid "Create a blank 200MB disk:"
20844 #: ../fish/guestfish.pod:1063
20847 " guestfish -N disk:200M\n"
20852 #: ../fish/guestfish.pod:1065
20853 msgid "PROGRESS BARS"
20857 #: ../fish/guestfish.pod:1067
20859 "Some (not all) long-running commands send progress notification messages as "
20860 "they are running. Guestfish turns these messages into progress bars."
20864 #: ../fish/guestfish.pod:1071
20866 "When a command that supports progress bars takes longer than two seconds to "
20867 "run, and if progress bars are enabled, then you will see one appearing below "
20872 #: ../fish/guestfish.pod:1075
20875 " ><fs> copy-size /large-file /another-file 2048M\n"
20876 " / 10% [#####-----------------------------------------] 00:30\n"
20881 #: ../fish/guestfish.pod:1078
20883 "The spinner on the left hand side moves round once for every progress "
20884 "notification received from the backend. This is a (reasonably) golden "
20885 "assurance that the command is \"doing something\" even if the progress bar "
20886 "is not moving, because the command is able to send the progress "
20887 "notifications. When the bar reaches 100% and the command finishes, the "
20888 "spinner disappears."
20892 #: ../fish/guestfish.pod:1085
20894 "Progress bars are enabled by default when guestfish is used interactively. "
20895 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20896 "and you can disable them completely using I<--no-progress-bars>."
20900 #: ../fish/guestfish.pod:1090
20901 msgid "GUESTFISH COMMANDS"
20905 #: ../fish/guestfish.pod:1092
20907 "The commands in this section are guestfish convenience commands, in other "
20908 "words, they are not part of the L<guestfs(3)> API."
20912 #: ../fish/guestfish.pod:1095
20917 #: ../fish/guestfish.pod:1097
20926 #: ../fish/guestfish.pod:1100
20927 msgid "Without any parameter, this provides general help."
20931 #: ../fish/guestfish.pod:1102
20932 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20936 #: ../fish/guestfish.pod:1104
20937 msgid "quit | exit"
20941 #: ../fish/guestfish.pod:1106
20942 msgid "This exits guestfish. You can also use C<^D> key."
20946 #: ../fish/guestfish.pod:1108
20947 msgid "@FISH_COMMANDS@"
20951 #: ../fish/guestfish.pod:1110
20956 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20961 #: ../fish/guestfish.pod:1116
20963 "guestfish returns 0 if the commands completed without error, or 1 if there "
20968 #: ../fish/guestfish.pod:1123
20973 #: ../fish/guestfish.pod:1125
20975 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20980 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3218
20981 msgid "FEBOOTSTRAP_KERNEL"
20985 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3220
20986 msgid "FEBOOTSTRAP_MODULES"
20990 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3222
20992 "These two environment variables allow the kernel that libguestfs uses in the "
20993 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20994 "most recent host kernel is chosen. For more information about kernel "
20995 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20996 "available in febootstrap E<ge> 3.8."
21000 #: ../fish/guestfish.pod:1138
21001 msgid "GUESTFISH_DISPLAY_IMAGE"
21005 #: ../fish/guestfish.pod:1140
21007 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
21008 "If not set, it uses L<display(1)>."
21012 #: ../fish/guestfish.pod:1143
21013 msgid "GUESTFISH_PID"
21017 #: ../fish/guestfish.pod:1145
21019 "Used with the I<--remote> option to specify the remote guestfish process to "
21020 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
21024 #: ../fish/guestfish.pod:1149
21029 #: ../fish/guestfish.pod:1151
21031 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
21032 "not specified, the external L<hexedit(1)> program is used."
21036 #: ../fish/guestfish.pod:1155
21041 #: ../fish/guestfish.pod:1157
21043 "If compiled with GNU readline support, various files in the home directory "
21044 "can be used. See L</FILES>."
21048 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3228
21049 msgid "LIBGUESTFS_APPEND"
21053 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3230
21054 msgid "Pass additional options to the guest kernel."
21058 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3232
21059 msgid "LIBGUESTFS_DEBUG"
21063 #: ../fish/guestfish.pod:1166
21065 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
21066 "effect as using the B<-v> option."
21070 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3237
21071 msgid "LIBGUESTFS_MEMSIZE"
21075 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3239
21076 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
21080 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3242
21083 " LIBGUESTFS_MEMSIZE=700\n"
21088 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3244
21089 msgid "LIBGUESTFS_PATH"
21093 #: ../fish/guestfish.pod:1178
21095 "Set the path that guestfish uses to search for kernel and initrd.img. See "
21096 "the discussion of paths in L<guestfs(3)>."
21100 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3249
21101 msgid "LIBGUESTFS_QEMU"
21105 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3251
21107 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
21108 "which was found at compile time by the configure script is used."
21112 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3257
21113 msgid "LIBGUESTFS_TRACE"
21117 #: ../fish/guestfish.pod:1189
21118 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
21122 #: ../fish/guestfish.pod:1191
21127 #: ../fish/guestfish.pod:1193
21129 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
21134 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:260 ../src/guestfs.pod:3262
21139 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3264
21141 "Location of temporary directory, defaults to C</tmp> except for the cached "
21142 "supermin appliance which defaults to C</var/tmp>."
21146 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3267
21148 "If libguestfs was compiled to use the supermin appliance then the real "
21149 "appliance is cached in this directory, shared between all handles belonging "
21150 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
21151 "use in case C</var/tmp> is not large enough."
21155 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297 ../rescue/virt-rescue.pod:310
21160 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301 ../rescue/virt-rescue.pod:314
21161 msgid "$HOME/.libguestfs-tools.rc"
21165 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303 ../rescue/virt-rescue.pod:316
21166 msgid "/etc/libguestfs-tools.conf"
21170 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305 ../rescue/virt-rescue.pod:318
21172 "This configuration file controls the default read-only or read-write mode "
21173 "(I<--ro> or I<--rw>)."
21177 #: ../fish/guestfish.pod:1220
21178 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
21182 #: ../fish/guestfish.pod:1222
21183 msgid "$HOME/.guestfish"
21187 #: ../fish/guestfish.pod:1224
21189 "If compiled with GNU readline support, then the command history is saved in "
21194 #: ../fish/guestfish.pod:1227
21195 msgid "$HOME/.inputrc"
21199 #: ../fish/guestfish.pod:1229
21200 msgid "/etc/inputrc"
21204 #: ../fish/guestfish.pod:1231
21206 "If compiled with GNU readline support, then these files can be used to "
21207 "configure readline. For further information, please see "
21208 "L<readline(3)/INITIALIZATION FILE>."
21212 #: ../fish/guestfish.pod:1235
21213 msgid "To write rules which only apply to guestfish, use:"
21217 #: ../fish/guestfish.pod:1237
21227 #: ../fish/guestfish.pod:1241
21229 "Variables that you can set in inputrc that change the behaviour of guestfish "
21230 "in useful ways include:"
21234 #: ../fish/guestfish.pod:1246
21235 msgid "completion-ignore-case (default: on)"
21239 #: ../fish/guestfish.pod:1248
21241 "By default, guestfish will ignore case when tab-completing paths on the "
21246 #: ../fish/guestfish.pod:1251
21249 " set completion-ignore-case off\n"
21254 #: ../fish/guestfish.pod:1253
21255 msgid "to make guestfish case sensitive."
21259 #: ../fish/guestfish.pod:1257
21264 #: ../fish/guestfish.pod:1259
21265 msgid "test2.img (etc)"
21269 #: ../fish/guestfish.pod:1261
21271 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
21272 "will be created in the file C<test1.img> in the current directory. The "
21273 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
21274 "the same name will be overwritten."
21278 #: ../fish/guestfish.pod:1270
21280 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, "
21281 "L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, "
21282 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
21283 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
21284 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
21285 "L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, "
21286 "L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<display(1)>, L<hexedit(1)>, "
21287 "L<febootstrap-supermin-helper(8)>."
21291 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3360 ../test-tool/libguestfs-test-tool.pod:112
21292 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
21296 #: ../fish/virt-copy-in.pod:5
21297 msgid "virt-copy-in - Copy files and directories into a virtual machine disk image."
21301 #: ../fish/virt-copy-in.pod:9
21304 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
21309 #: ../fish/virt-copy-in.pod:11
21312 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
21317 #: ../fish/virt-copy-in.pod:15
21319 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
21320 "causing disk corruption. The virtual machine must be shut down before you "
21321 "use this command."
21325 #: ../fish/virt-copy-in.pod:21
21327 "C<virt-copy-in> copies files and directories from the local disk into a "
21328 "virtual machine disk image or named libvirt domain."
21332 #: ../fish/virt-copy-in.pod:24
21334 "You can give one of more filenames and directories on the command line. "
21335 "Directories are copied in recursively. The final parameter must be the "
21336 "destination directory in the disk image which must be an absolute path "
21337 "starting with a C</> character."
21341 #: ../fish/virt-copy-in.pod:33
21344 " virt-copy-in -d MyGuest resolv.conf /etc\n"
21349 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
21350 msgid "Upload a home directory to a guest:"
21354 #: ../fish/virt-copy-in.pod:37
21357 " virt-copy-in -d MyGuest skel /home\n"
21362 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28 ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
21363 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
21367 #: ../fish/virt-copy-in.pod:41
21369 "This command is just a simple shell script wrapper around the "
21370 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
21371 "trivial copy, you are probably better off using guestfish directly."
21375 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36 ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
21377 "Since the shell script just passes options straight to guestfish, read "
21378 "L<guestfish(1)> to see the full list of options."
21382 #: ../fish/virt-copy-in.pod:52
21384 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
21385 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21389 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55 ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
21390 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
21394 #: ../fish/virt-copy-out.pod:5
21396 "virt-copy-out - Copy files and directories out of a virtual machine disk "
21401 #: ../fish/virt-copy-out.pod:9
21404 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
21409 #: ../fish/virt-copy-out.pod:11
21412 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
21417 #: ../fish/virt-copy-out.pod:15
21419 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
21420 "image or named libvirt domain."
21424 #: ../fish/virt-copy-out.pod:18
21426 "You can give one of more filenames and directories on the command line. "
21427 "Directories are copied out recursively."
21431 #: ../fish/virt-copy-out.pod:23
21432 msgid "Download the home directories from a virtual machine:"
21436 #: ../fish/virt-copy-out.pod:25
21440 " virt-copy-out -d MyGuest /home homes\n"
21445 #: ../fish/virt-copy-out.pod:30
21447 "This command is just a simple shell script wrapper around the "
21448 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
21449 "trivial copy, you are probably better off using guestfish directly."
21453 #: ../fish/virt-copy-out.pod:41
21455 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, "
21456 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21460 #: ../fish/virt-tar-in.pod:5
21461 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21465 #: ../fish/virt-tar-in.pod:9
21468 " virt-tar-in -a disk.img data.tar /destination\n"
21473 #: ../fish/virt-tar-in.pod:11
21476 " virt-tar-in -d domain data.tar /destination\n"
21481 #: ../fish/virt-tar-in.pod:13
21484 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21489 #: ../fish/virt-tar-in.pod:17
21491 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21492 "causing disk corruption. The virtual machine must be shut down before you "
21493 "use this command."
21497 #: ../fish/virt-tar-in.pod:23
21499 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21500 "image or named libvirt domain."
21504 #: ../fish/virt-tar-in.pod:26
21506 "The first parameter is the tar file. Use C<-> to read the tar file from "
21507 "standard input. The second parameter is the absolute target directory to "
21512 #: ../fish/virt-tar-in.pod:34
21515 " virt-tar-in -d MyGuest homes.tar /home\n"
21520 #: ../fish/virt-tar-in.pod:38
21522 "This command is just a simple shell script wrapper around the "
21523 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial "
21524 "copy, you are probably better off using guestfish directly."
21528 #: ../fish/virt-tar-in.pod:49
21530 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21531 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
21532 "L<http://libguestfs.org/>."
21536 #: ../fish/virt-tar-out.pod:5
21537 msgid "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21541 #: ../fish/virt-tar-out.pod:9
21544 " virt-tar-out -a disk.img /dir files.tar\n"
21549 #: ../fish/virt-tar-out.pod:11
21552 " virt-tar-out -d domain /dir files.tar\n"
21557 #: ../fish/virt-tar-out.pod:13
21560 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21565 #: ../fish/virt-tar-out.pod:17
21566 msgid "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21570 #: ../fish/virt-tar-out.pod:20
21572 "The first parameter is the absolute path of the virtual machine directory. "
21573 "The second parameter is the tar file to write. Use C<-> to write to "
21578 #: ../fish/virt-tar-out.pod:26
21579 msgid "Download the home directories from a guest:"
21583 #: ../fish/virt-tar-out.pod:28
21586 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21591 #: ../fish/virt-tar-out.pod:32
21593 "This command is just a simple shell script wrapper around the "
21594 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
21595 "trivial copy, you are probably better off using guestfish directly."
21599 #: ../fish/virt-tar-out.pod:43
21601 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21602 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21606 #: ../fuse/guestmount.pod:5
21607 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21611 #: ../fuse/guestmount.pod:9
21614 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21619 #: ../fuse/guestmount.pod:11
21622 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21627 #: ../fuse/guestmount.pod:13
21630 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21635 #: ../fuse/guestmount.pod:17
21637 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21638 "machines. If you do this, you risk disk corruption in the VM."
21642 #: ../fuse/guestmount.pod:22
21644 "The guestmount program can be used to mount virtual machine filesystems and "
21645 "other disk images on the host. It uses libguestfs for access to the guest "
21646 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21647 "a mountable device."
21651 #: ../fuse/guestmount.pod:27
21653 "Along with other options, you have to give at least one device (I<-a> "
21654 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
21655 "option) or use the I<-i> inspection option or the I<--live> option. How "
21656 "this works is better explained in the L<guestfish(1)> manual page, or by "
21657 "looking at the examples below."
21661 #: ../fuse/guestmount.pod:33
21663 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21664 "by you, and the filesystem will not be visible to any other users unless you "
21665 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21666 "the filesystem, use the C<fusermount -u> command."
21670 #: ../fuse/guestmount.pod:41
21672 "For a typical Windows guest which has its main filesystem on the first "
21677 #: ../fuse/guestmount.pod:44
21680 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21685 #: ../fuse/guestmount.pod:46
21687 "For a typical Linux guest which has a /boot filesystem on the first "
21688 "partition, and the root filesystem on a logical volume:"
21692 #: ../fuse/guestmount.pod:49
21695 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21700 #: ../fuse/guestmount.pod:51
21701 msgid "To get libguestfs to detect guest mountpoints for you:"
21705 #: ../fuse/guestmount.pod:53
21708 " guestmount -a guest.img -i --ro /mnt\n"
21713 #: ../fuse/guestmount.pod:55
21714 msgid "For a libvirt guest called \"Guest\" you could do:"
21718 #: ../fuse/guestmount.pod:57
21721 " guestmount -d Guest -i --ro /mnt\n"
21726 #: ../fuse/guestmount.pod:59
21728 "If you don't know what filesystems are contained in a guest or disk image, "
21729 "use L<virt-filesystems(1)> first:"
21733 #: ../fuse/guestmount.pod:62
21736 " virt-filesystems MyGuest\n"
21741 #: ../fuse/guestmount.pod:64
21743 "If you want to trace the libguestfs calls but without excessive debugging "
21744 "information, we recommend:"
21748 #: ../fuse/guestmount.pod:67
21751 " guestmount [...] --trace /mnt\n"
21756 #: ../fuse/guestmount.pod:69
21757 msgid "If you want to debug the program, we recommend:"
21761 #: ../fuse/guestmount.pod:71
21764 " guestmount [...] --trace --verbose /mnt\n"
21769 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:96 ../resize/virt-resize.pod:627
21774 #: ../fuse/guestmount.pod:75
21775 msgid "Other users cannot see the filesystem by default"
21779 #: ../fuse/guestmount.pod:77
21781 "If you mount a filesystem as one user (eg. root), then other users will not "
21782 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21783 "option when mounting:"
21787 #: ../fuse/guestmount.pod:81
21790 " sudo guestmount [...] -o allow_other /mnt\n"
21795 #: ../fuse/guestmount.pod:83
21796 msgid "Enabling FUSE"
21800 #: ../fuse/guestmount.pod:85
21802 "On some distros, you may need to add yourself to a special group "
21803 "(eg. C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21804 "Debian and derivatives."
21808 #: ../fuse/guestmount.pod:89
21810 "On other distros, no special group is required. It is not necessary on "
21811 "Fedora or Red Hat Enterprise Linux."
21815 #: ../fuse/guestmount.pod:100
21816 msgid "Add a block device or virtual machine image."
21820 #: ../fuse/guestmount.pod:123
21821 msgid "B<--dir-cache-timeout N>"
21825 #: ../fuse/guestmount.pod:125
21827 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21828 "seconds. The readdir cache [actually, there are several semi-independent "
21829 "caches] is populated after a readdir(2) call with the stat and extended "
21830 "attributes of the files in the directory, in anticipation that they will be "
21831 "requested soon after."
21835 #: ../fuse/guestmount.pod:131
21837 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21838 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21839 "requests, only cache existing ones."
21843 #: ../fuse/guestmount.pod:151
21845 "If you have untrusted raw-format guest disk images, you should use this "
21846 "option to specify the disk format. This avoids a possible security problem "
21847 "with malicious guests (CVE-2010-3851). See also "
21848 "L<guestfs(3)/guestfs_add_drive_opts>."
21852 #: ../fuse/guestmount.pod:156
21853 msgid "B<--fuse-help>"
21857 #: ../fuse/guestmount.pod:158
21858 msgid "Display help on special FUSE options (see I<-o> below)."
21862 #: ../fuse/guestmount.pod:162
21863 msgid "Display brief help and exit."
21867 #: ../fuse/guestmount.pod:186
21869 "Mount the named partition or logical volume on the given mountpoint B<in the "
21870 "guest> (this has nothing to do with mountpoints in the host)."
21874 #: ../fuse/guestmount.pod:189
21876 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21877 "something on C</>."
21881 #: ../fuse/guestmount.pod:206
21883 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21884 "unmounted. If you specify this option, then we don't attempt to sync the "
21885 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21889 #: ../fuse/guestmount.pod:211
21890 msgid "B<-o option>"
21894 #: ../fuse/guestmount.pod:213
21895 msgid "B<--option option>"
21899 #: ../fuse/guestmount.pod:215
21900 msgid "Pass extra options to FUSE."
21904 #: ../fuse/guestmount.pod:217
21906 "To get a list of all the extra options supported by FUSE, use the command "
21907 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21908 "of them are a good idea."
21912 #: ../fuse/guestmount.pod:221
21915 " guestmount --fuse-help\n"
21920 #: ../fuse/guestmount.pod:223
21921 msgid "Some potentially useful FUSE options:"
21925 #: ../fuse/guestmount.pod:227
21926 msgid "B<-o allow_other>"
21930 #: ../fuse/guestmount.pod:229
21931 msgid "Allow other users to see the filesystem."
21935 #: ../fuse/guestmount.pod:231
21936 msgid "B<-o attr_timeout=N>"
21940 #: ../fuse/guestmount.pod:233
21941 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21945 #: ../fuse/guestmount.pod:235
21946 msgid "B<-o kernel_cache>"
21950 #: ../fuse/guestmount.pod:237
21952 "Allow the kernel to cache files (reduces the number of reads that have to go "
21953 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21954 "afford the extra memory usage."
21958 #: ../fuse/guestmount.pod:241
21959 msgid "B<-o uid=N> B<-o gid=N>"
21963 #: ../fuse/guestmount.pod:243
21965 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21966 "the chosen values."
21970 #: ../fuse/guestmount.pod:252
21972 "Add devices and mount everything read-only. Also disallow writes and make "
21973 "the disk appear read-only to FUSE."
21977 #: ../fuse/guestmount.pod:255
21979 "This is highly recommended if you are not going to edit the guest disk. If "
21980 "the guest is running and this option is I<not> supplied, then there is a "
21981 "strong risk of disk corruption in the guest. We try to prevent this from "
21982 "happening, but it is not always possible."
21986 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:199
21987 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21991 #: ../fuse/guestmount.pod:264
21992 msgid "Enable SELinux support for the guest."
21996 #: ../fuse/guestmount.pod:270
21997 msgid "Enable verbose messages from underlying libguestfs."
22001 #: ../fuse/guestmount.pod:276
22002 msgid "Display the program version and exit."
22006 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308 ../rescue/virt-rescue.pod:238 ../rescue/virt-rescue.pod:321
22007 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
22011 #: ../fuse/guestmount.pod:289
22016 #: ../fuse/guestmount.pod:291
22017 msgid "Trace libguestfs calls and entry into each FUSE function."
22021 #: ../fuse/guestmount.pod:293
22022 msgid "This also stops the daemon from forking into the background."
22026 #: ../fuse/guestmount.pod:319
22028 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22029 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
22030 "L<http://fuse.sf.net/>."
22034 #: ../fuse/guestmount.pod:334
22035 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
22039 #: ../inspector/virt-inspector.pod:5
22041 "virt-inspector - Display operating system version and other information "
22042 "about a virtual machine"
22046 #: ../inspector/virt-inspector.pod:9
22049 " virt-inspector [--options] -d domname\n"
22054 #: ../inspector/virt-inspector.pod:11
22057 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
22062 #: ../inspector/virt-inspector.pod:15
22065 " virt-inspector domname\n"
22070 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
22073 " virt-inspector disk.img [disk.img ...]\n"
22078 #: ../inspector/virt-inspector.pod:21
22080 "B<virt-inspector> examines a virtual machine or disk image and tries to "
22081 "determine the version of the operating system and other information about "
22082 "the virtual machine."
22086 #: ../inspector/virt-inspector.pod:25
22087 msgid "Virt-inspector produces XML output for feeding into other programs."
22091 #: ../inspector/virt-inspector.pod:27
22093 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
22094 "the libvirt domain (see: C<virsh list --all>)."
22098 #: ../inspector/virt-inspector.pod:30
22100 "You can also run virt-inspector directly on disk images from a single "
22101 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
22102 "has several block devices, in which case you should list several I<-a> "
22103 "options one after another, with the first corresponding to the guest's "
22104 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
22108 #: ../inspector/virt-inspector.pod:37
22110 "You can also run virt-inspector on install disks, live CDs, bootable USB "
22111 "keys and similar."
22115 #: ../inspector/virt-inspector.pod:40
22117 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22118 "inspect several virtual machines, you have to run virt-inspector several "
22119 "times (for example, from a shell script for-loop)."
22123 #: ../inspector/virt-inspector.pod:45
22125 "Because virt-inspector needs direct access to guest images, it won't "
22126 "normally work over remote libvirt connections."
22130 #: ../inspector/virt-inspector.pod:48
22132 "All of the information available from virt-inspector is also available "
22133 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
22134 "The same information can also be fetched using guestfish or via libguestfs "
22135 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
22136 "WITH OTHER PROGRAMMING LANGUAGES>)."
22140 #: ../inspector/virt-inspector.pod:81
22142 "Libvirt is only used if you specify a C<domname> on the command line. If "
22143 "you specify guest block devices directly (I<-a>), then libvirt is not used "
22148 #: ../inspector/virt-inspector.pod:94
22150 "When prompting for keys and passphrases, virt-inspector normally turns "
22151 "echoing off so you cannot see what you are typing. If you are not worried "
22152 "about Tempest attacks and there is no one else in the room you can specify "
22153 "this flag to see what you are typing."
22157 #: ../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
22159 "Specify the format of disk images given on the command line. If this is "
22160 "omitted then the format is autodetected from the content of the disk image."
22164 #: ../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
22166 "If disk images are requested from libvirt, then this program asks libvirt "
22167 "for this information. In this case, the value of the format parameter is "
22172 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:397 ../resize/virt-resize.pod:489 ../sparsify/virt-sparsify.pod:144 ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
22174 "If working with untrusted raw-format guest disk images, you should ensure "
22175 "the format is always specified."
22179 #: ../inspector/virt-inspector.pod:135
22180 msgid "B<--xpath> query"
22184 #: ../inspector/virt-inspector.pod:137
22186 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
22187 "In this mode virt-inspector simply runs an XPath query; all other inspection "
22188 "functions are disabled. See L</XPATH QUERIES> below for some examples."
22192 #: ../inspector/virt-inspector.pod:146
22193 msgid "Previous versions of virt-inspector allowed you to write either:"
22197 #: ../inspector/virt-inspector.pod:152
22200 " virt-inspector guestname\n"
22205 #: ../inspector/virt-inspector.pod:160
22210 #: ../inspector/virt-inspector.pod:162
22212 "The virt-inspector XML is described precisely in a RELAX NG schema file "
22213 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
22214 "just an overview."
22218 #: ../inspector/virt-inspector.pod:166
22220 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
22221 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
22222 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
22223 "which is vanishingly rare in real world VMs."
22227 #: ../inspector/virt-inspector.pod:171
22228 msgid "E<lt>operatingsystemE<gt>"
22232 #: ../inspector/virt-inspector.pod:173
22234 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
22235 "describe the operating system, its architecture, the descriptive \"product "
22236 "name\" string, the type of OS and so on, as in this example:"
22240 #: ../inspector/virt-inspector.pod:177
22243 " <operatingsystems>\n"
22244 " <operatingsystem>\n"
22245 " <root>/dev/sda2</root>\n"
22246 " <name>windows</name>\n"
22247 " <arch>i386</arch>\n"
22248 " <distro>windows</distro>\n"
22249 " <product_name>Windows 7 Enterprise</product_name>\n"
22250 " <product_variant>Client</product_variant>\n"
22251 " <major_version>6</major_version>\n"
22252 " <minor_version>1</minor_version>\n"
22253 " <windows_systemroot>/Windows</windows_systemroot>\n"
22254 " <format>installed</format>\n"
22259 #: ../inspector/virt-inspector.pod:190
22261 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
22262 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
22263 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
22264 "architecture. The other fields are fairly self-explanatory, but because "
22265 "these fields are taken directly from the libguestfs inspection API you can "
22266 "find precise information from L<guestfs(3)/INSPECTION>."
22270 #: ../inspector/virt-inspector.pod:198
22272 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
22273 "of view of libguestfs (block devices may have completely different names "
22274 "inside the VM itself)."
22278 #: ../inspector/virt-inspector.pod:202
22279 msgid "E<lt>mountpointsE<gt>"
22283 #: ../inspector/virt-inspector.pod:204
22285 "Un*x-like guests typically have multiple filesystems which are mounted at "
22286 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
22287 "element which looks like this:"
22291 #: ../inspector/virt-inspector.pod:208
22294 " <operatingsystems>\n"
22295 " <operatingsystem>\n"
22298 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
22299 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
22300 " </mountpoints>\n"
22305 #: ../inspector/virt-inspector.pod:216
22307 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
22308 "and may have completely different names inside the guest. Only mountable "
22309 "filesystems appear in this list, not things like swap devices."
22313 #: ../inspector/virt-inspector.pod:221
22314 msgid "E<lt>filesystemsE<gt>"
22318 #: ../inspector/virt-inspector.pod:223
22320 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
22321 "filesystems belonging to the guest, including swap and empty partitions. "
22322 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
22323 "this OS or shared with this OS and other OSes)."
22327 #: ../inspector/virt-inspector.pod:229
22328 msgid "You might see something like this:"
22332 #: ../inspector/virt-inspector.pod:231
22335 " <operatingsystems>\n"
22336 " <operatingsystem>\n"
22339 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22340 " <type>ext4</type>\n"
22341 " <label>Fedora-13-x86_64</label>\n"
22342 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
22348 #: ../inspector/virt-inspector.pod:241
22350 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
22351 "the label, and the UUID."
22355 #: ../inspector/virt-inspector.pod:244
22356 msgid "E<lt>applicationsE<gt>"
22360 #: ../inspector/virt-inspector.pod:246
22362 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
22363 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
22368 #: ../inspector/virt-inspector.pod:250
22370 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
22371 "Typical values would be C<rpm> and C<deb>."
22375 #: ../inspector/virt-inspector.pod:253
22377 "E<lt>package_managementE<gt>, if present, describes the package manager. "
22378 "Typical values include C<yum>, C<up2date> and C<apt>"
22382 #: ../inspector/virt-inspector.pod:256
22383 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
22387 #: ../inspector/virt-inspector.pod:259
22390 " <operatingsystems>\n"
22391 " <operatingsystem>\n"
22393 " <applications>\n"
22395 " <name>coreutils</name>\n"
22396 " <version>8.5</version>\n"
22397 " <release>1</release>\n"
22398 " </application>\n"
22403 #: ../inspector/virt-inspector.pod:269
22405 "The version and release fields may not be available for some types guests. "
22406 "Other fields are possible, see "
22407 "L<guestfs(3)/guestfs_inspect_list_applications>."
22411 #: ../inspector/virt-inspector.pod:273
22412 msgid "E<lt>drive_mappingsE<gt>"
22416 #: ../inspector/virt-inspector.pod:275
22418 "For operating systems like Windows which use drive letters, virt-inspector "
22419 "is able to find out how drive letters map to filesystems."
22423 #: ../inspector/virt-inspector.pod:279
22426 " <operatingsystems>\n"
22427 " <operatingsystem>\n"
22429 " <drive_mappings>\n"
22430 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
22431 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
22432 " </drive_mappings>\n"
22437 #: ../inspector/virt-inspector.pod:287
22439 "In the example above, drive C maps to the filesystem on the second partition "
22440 "on the first disk, and drive E maps to the filesystem on the first partition "
22441 "on the second disk."
22445 #: ../inspector/virt-inspector.pod:291
22447 "Note that this only covers permanent local filesystem mappings, not things "
22448 "like network shares. Furthermore NTFS volume mount points may not be listed "
22453 #: ../inspector/virt-inspector.pod:295
22454 msgid "E<lt>iconE<gt>"
22458 #: ../inspector/virt-inspector.pod:297
22460 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22461 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22462 "very large and high quality."
22466 #: ../inspector/virt-inspector.pod:301
22469 " <operatingsystems>\n"
22470 " <operatingsystem>\n"
22473 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22474 " [... many lines of base64 data ...]\n"
22480 #: ../inspector/virt-inspector.pod:309
22482 "To display the icon, you have to extract it and convert the base64 data back "
22483 "to a binary file. Use an XPath query or simply an editor to extract the "
22484 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22489 #: ../inspector/virt-inspector.pod:314
22492 " base64 -i -d < icon.data > icon.png\n"
22497 #: ../inspector/virt-inspector.pod:316
22498 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22502 #: ../inspector/virt-inspector.pod:318
22504 "Virt-inspector can detect some operating system installers on install disks, "
22505 "live CDs, bootable USB keys and more."
22509 #: ../inspector/virt-inspector.pod:321
22511 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22512 "fields may be present to indicate a live CD, network installer, or one part "
22513 "of a multipart CD. For example:"
22517 #: ../inspector/virt-inspector.pod:325
22520 " <operatingsystems>\n"
22521 " <operatingsystem>\n"
22522 " <root>/dev/sda</root>\n"
22523 " <name>linux</name>\n"
22524 " <arch>i386</arch>\n"
22525 " <distro>ubuntu</distro>\n"
22526 " <product_name>Ubuntu 10.10 "Maverick "
22527 "Meerkat"</product_name>\n"
22528 " <major_version>10</major_version>\n"
22529 " <minor_version>10</minor_version>\n"
22530 " <format>installer</format>\n"
22536 #: ../inspector/virt-inspector.pod:337
22537 msgid "XPATH QUERIES"
22541 #: ../inspector/virt-inspector.pod:339
22543 "Virt-inspector includes built in support for running XPath queries. The "
22544 "reason for including XPath support directly in virt-inspector is simply that "
22545 "there are no good and widely available command line programs that can do "
22546 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
22547 "available on Red Hat Enterprise Linux."
22551 #: ../inspector/virt-inspector.pod:346
22553 "To perform an XPath query, use the I<--xpath> option. Note that in this "
22554 "mode, virt-inspector simply reads XML from stdin and outputs the query "
22555 "result on stdout. All other inspection features are disabled in this mode."
22559 #: ../inspector/virt-inspector.pod:353
22562 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
22564 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22565 " <type>ext4</type>\n"
22571 #: ../inspector/virt-inspector.pod:359
22574 " $ virt-inspector -d Guest | \\\n"
22575 " virt-inspector --xpath "
22576 "\"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22582 #: ../inspector/virt-inspector.pod:363
22585 " $ virt-inspector -d Guest | \\\n"
22586 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
22587 " [displays the guest icon, if there is one]\n"
22592 #: ../inspector/virt-inspector.pod:374
22593 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22597 #: ../inspector/virt-inspector.pod:376
22599 "Early versions of libguestfs shipped with a different virt-inspector program "
22600 "written in Perl (the current version is written in C). The XML output of "
22601 "the Perl virt-inspector was different and it could also output in other "
22602 "formats like text."
22606 #: ../inspector/virt-inspector.pod:381
22607 msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
22611 #: ../inspector/virt-inspector.pod:384
22613 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22614 "versions of virt-inspector with different names:"
22618 #: ../inspector/virt-inspector.pod:387
22621 " virt-inspector Old Perl version.\n"
22622 " virt-inspector2 New C version.\n"
22627 #: ../inspector/virt-inspector.pod:397
22629 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
22630 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22634 #: ../inspector/virt-inspector.pod:414
22635 msgid "Matthew Booth L<mbooth@redhat.com>"
22639 #: ../java/examples/guestfs-java.pod:5
22640 msgid "guestfs-java - How to use libguestfs from Java"
22644 #: ../java/examples/guestfs-java.pod:9
22647 " import com.redhat.et.libguestfs.*;\n"
22652 #: ../java/examples/guestfs-java.pod:11
22655 " GuestFS g = new GuestFS ();\n"
22656 " g.add_drive_opts (\"disk.img\", null);\n"
22662 #: ../java/examples/guestfs-java.pod:17
22664 "This manual page documents how to call libguestfs from the Java programming "
22665 "language. This page just documents the differences from the C API and gives "
22666 "some examples. If you are not familiar with using libguestfs, you also need "
22667 "to read L<guestfs(3)>."
22671 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22672 msgid "CLOSING THE HANDLE"
22676 #: ../java/examples/guestfs-java.pod:24
22678 "The handle is closed when it is reaped by the garbage collector. Because "
22679 "libguestfs handles include a lot of state, it is also possible to close (and "
22680 "hence free) them explicitly by calling the C<close> method."
22684 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60 ../python/examples/guestfs-python.pod:21 ../ruby/examples/guestfs-ruby.pod:22
22689 #: ../java/examples/guestfs-java.pod:31
22691 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22692 "exception. This has a single parameter which is the error message (a "
22697 #: ../java/examples/guestfs-java.pod:35
22698 msgid "Calling any method on a closed handle raises the same exception."
22702 #: ../java/examples/guestfs-java.pod:47
22704 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22705 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22706 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22707 "L<http://caml.inria.fr/>."
22711 #: ../ocaml/examples/guestfs-ocaml.pod:5
22712 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22716 #: ../ocaml/examples/guestfs-ocaml.pod:9
22717 msgid "Module style:"
22721 #: ../ocaml/examples/guestfs-ocaml.pod:11
22724 " let g = Guestfs.create () in\n"
22725 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22726 " Guestfs.launch g;\n"
22731 #: ../ocaml/examples/guestfs-ocaml.pod:15
22732 msgid "Object-oriented style:"
22736 #: ../ocaml/examples/guestfs-ocaml.pod:17
22739 " let g = new Guestfs.guestfs () in\n"
22740 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22746 #: ../ocaml/examples/guestfs-ocaml.pod:21
22749 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22751 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22756 #: ../ocaml/examples/guestfs-ocaml.pod:27
22758 "This manual page documents how to call libguestfs from the OCaml programming "
22759 "language. This page just documents the differences from the C API and gives "
22760 "some examples. If you are not familiar with using libguestfs, you also need "
22761 "to read L<guestfs(3)>."
22765 #: ../ocaml/examples/guestfs-ocaml.pod:32
22766 msgid "PROGRAMMING STYLES"
22770 #: ../ocaml/examples/guestfs-ocaml.pod:34
22772 "There are two different programming styles supported by the OCaml bindings. "
22773 "You can use a module style, with each C function mapped to an OCaml "
22778 #: ../ocaml/examples/guestfs-ocaml.pod:38
22781 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22786 #: ../ocaml/examples/guestfs-ocaml.pod:40
22791 #: ../ocaml/examples/guestfs-ocaml.pod:42
22794 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22799 #: ../ocaml/examples/guestfs-ocaml.pod:44
22801 "Alternately you can use an object-oriented style, calling methods on the "
22802 "class C<Guestfs.guestfs>:"
22806 #: ../ocaml/examples/guestfs-ocaml.pod:47
22809 " method set_verbose : bool -> unit\n"
22814 #: ../ocaml/examples/guestfs-ocaml.pod:49
22816 "The object-oriented style is usually briefer, and the minor performance "
22817 "penalty isn't noticable in the general overhead of performing libguestfs "
22822 #: ../ocaml/examples/guestfs-ocaml.pod:55
22824 "The handle is closed when it is reaped by the garbage collector. Because "
22825 "libguestfs handles include a lot of state, it is also possible to close (and "
22826 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22831 #: ../ocaml/examples/guestfs-ocaml.pod:62
22833 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22834 "exception. This has a single parameter which is the error message (a "
22839 #: ../ocaml/examples/guestfs-ocaml.pod:66
22841 "Calling any function/method on a closed handle raises "
22842 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
22847 #: ../ocaml/examples/guestfs-ocaml.pod:80
22849 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22850 "L<guestfs-java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22851 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22852 "L<http://caml.inria.fr/>."
22856 #: ../perl/examples/guestfs-perl.pod:5
22857 msgid "guestfs-perl - How to use libguestfs from Perl"
22861 #: ../perl/examples/guestfs-perl.pod:9
22864 " use Sys::Guestfs;\n"
22869 #: ../perl/examples/guestfs-perl.pod:11
22872 " my $h = Sys::Guestfs->new ();\n"
22873 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22874 " $h->launch ();\n"
22875 " $h->mount_options ('', '/dev/sda1', '/');\n"
22876 " $h->touch ('/hello');\n"
22882 #: ../perl/examples/guestfs-perl.pod:20
22884 "This manual page documents how to call libguestfs from the Perl programming "
22885 "language. This page just documents the differences from the C API and gives "
22886 "some examples. If you are not familiar with using libguestfs, you also need "
22887 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22891 #: ../perl/examples/guestfs-perl.pod:26
22896 #: ../perl/examples/guestfs-perl.pod:28
22898 "Errors from libguestfs functions turn into calls to C<croak> (see "
22903 #: ../perl/examples/guestfs-perl.pod:41
22905 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, "
22906 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
22907 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
22908 "L<http://libguestfs.org/>."
22912 #: ../python/examples/guestfs-python.pod:5
22913 msgid "guestfs-python - How to use libguestfs from Python"
22917 #: ../python/examples/guestfs-python.pod:9
22920 " import guestfs\n"
22921 " g = guestfs.GuestFS ()\n"
22922 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22928 #: ../python/examples/guestfs-python.pod:16
22930 "This manual page documents how to call libguestfs from the Python "
22931 "programming language. This page just documents the differences from the C "
22932 "API and gives some examples. If you are not familiar with using libguestfs, "
22933 "you also need to read L<guestfs(3)>."
22937 #: ../python/examples/guestfs-python.pod:23
22939 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22940 "single string argument which is the error message."
22944 #: ../python/examples/guestfs-python.pod:26
22945 msgid "MORE DOCUMENTATION"
22949 #: ../python/examples/guestfs-python.pod:28
22954 #: ../python/examples/guestfs-python.pod:30
22958 " >>> import guestfs\n"
22959 " >>> help (guestfs)\n"
22964 #: ../python/examples/guestfs-python.pod:44
22966 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22967 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
22968 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22972 #: ../rescue/virt-rescue.pod:5
22973 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22977 #: ../rescue/virt-rescue.pod:9
22980 " virt-rescue [--options] -d domname\n"
22985 #: ../rescue/virt-rescue.pod:11
22988 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22993 #: ../rescue/virt-rescue.pod:13
22996 " virt-rescue --suggest (-d domname | -a disk.img ...)\n"
23001 #: ../rescue/virt-rescue.pod:17
23004 " virt-rescue [--options] domname\n"
23009 #: ../rescue/virt-rescue.pod:19
23012 " virt-rescue [--options] disk.img [disk.img ...]\n"
23017 #: ../rescue/virt-rescue.pod:23
23019 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
23020 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
23021 "you from doing this, but doesn't catch all cases."
23025 #: ../rescue/virt-rescue.pod:27
23027 "However if you use the I<--ro> (read only) option, then you can attach a "
23028 "shell to a live virtual machine. The results might be strange or "
23029 "inconsistent at times but you won't get disk corruption."
23033 #: ../rescue/virt-rescue.pod:33
23035 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
23036 "need for a CD. virt-rescue gives you a rescue shell and some simple "
23037 "recovery tools which you can use to examine or rescue a virtual machine or "
23042 #: ../rescue/virt-rescue.pod:38
23044 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
23045 "on disk image(s):"
23049 #: ../rescue/virt-rescue.pod:41
23052 " virt-rescue -d GuestName\n"
23057 #: ../rescue/virt-rescue.pod:43
23060 " virt-rescue --ro -a /path/to/disk.img\n"
23065 #: ../rescue/virt-rescue.pod:45
23068 " virt-rescue -a /dev/sdc\n"
23073 #: ../rescue/virt-rescue.pod:47
23074 msgid "For live VMs you I<must> use the --ro option."
23078 #: ../rescue/virt-rescue.pod:49
23080 "When you run virt-rescue on a virtual machine or disk image, you are placed "
23081 "in an interactive bash shell where you can use many ordinary Linux "
23082 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
23083 "appliance. You must mount the virtual machine's filesystems by hand. There "
23084 "is an empty directory called C</sysroot> where you can mount filesystems."
23088 #: ../rescue/virt-rescue.pod:56
23090 "You can get virt-rescue to suggest mount commands for you by using the "
23091 "I<--suggest> option (in another terminal):"
23095 #: ../rescue/virt-rescue.pod:59
23098 " $ virt-rescue --suggest -d Fedora15\n"
23099 " Inspecting the virtual machine or disk image ...\n"
23104 #: ../rescue/virt-rescue.pod:62
23107 " This disk contains one or more operating systems. You can use these\n"
23108 " mount commands in virt-rescue (at the ><rescue> prompt) to mount the\n"
23114 #: ../rescue/virt-rescue.pod:66
23117 " # /dev/vg_f15x32/lv_root is the root of a linux operating system\n"
23118 " # type: linux, distro: fedora, version: 15.0\n"
23119 " # Fedora release 15 (Lovelock)\n"
23124 #: ../rescue/virt-rescue.pod:70
23127 " mount /dev/vg_f15x32/lv_root /sysroot/\n"
23128 " mount /dev/vda1 /sysroot/boot\n"
23129 " mount --bind /dev /sysroot/dev\n"
23130 " mount --bind /dev/pts /sysroot/dev/pts\n"
23131 " mount --bind /proc /sysroot/proc\n"
23132 " mount --bind /sys /sysroot/sys\n"
23137 #: ../rescue/virt-rescue.pod:77
23139 "Another way is to list the logical volumes (with L<lvs(8)>) and partitions "
23140 "(with L<parted(8)>) and mount them by hand:"
23144 #: ../rescue/virt-rescue.pod:80
23148 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
23149 " lv_root vg_f15x32 -wi-a- 8.83G\n"
23150 " lv_swap vg_f15x32 -wi-a- 992.00M\n"
23151 " ><rescue> mount /dev/vg_f15x32/lv_root /sysroot\n"
23152 " ><rescue> mount /dev/vda1 /sysroot/boot\n"
23153 " ><rescue> ls /sysroot\n"
23158 #: ../rescue/virt-rescue.pod:88
23159 msgid "Another command to list available filesystems is L<virt-filesystems(1)>."
23163 #: ../rescue/virt-rescue.pod:91
23165 "To run commands in a Linux guest (for example, grub), you should chroot into "
23166 "the /sysroot directory first:"
23170 #: ../rescue/virt-rescue.pod:94
23173 " ><rescue> chroot /sysroot\n"
23178 #: ../rescue/virt-rescue.pod:98
23180 "Virt-rescue can be used on I<any> disk image file or device, not just a "
23181 "virtual machine. For example you can use it on a blank file if you want to "
23182 "partition that file (although we would recommend using L<guestfish(1)> "
23183 "instead as it is more suitable for this purpose). You can even use "
23184 "virt-rescue on things like SD cards."
23188 #: ../rescue/virt-rescue.pod:104
23190 "Virt-rescue does not require root. You only need to run it as root if you "
23191 "need root to open the disk image."
23195 #: ../rescue/virt-rescue.pod:107
23197 "This tool is just designed for quick interactive hacking on a virtual "
23198 "machine. For more structured access to a virtual machine disk image, you "
23199 "should use L<guestfs(3)>. To get a structured shell that you can use to "
23200 "make scripted changes to guests, use L<guestfish(1)>."
23204 #: ../rescue/virt-rescue.pod:131
23205 msgid "B<--append kernelopts>"
23209 #: ../rescue/virt-rescue.pod:133
23210 msgid "Pass additional options to the rescue kernel."
23214 #: ../rescue/virt-rescue.pod:163
23217 " virt-rescue --format=raw -a disk.img\n"
23222 #: ../rescue/virt-rescue.pod:167
23225 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
23230 #: ../rescue/virt-rescue.pod:176
23235 #: ../rescue/virt-rescue.pod:178
23236 msgid "B<--memsize MB>"
23240 #: ../rescue/virt-rescue.pod:180
23242 "Change the amount of memory allocated to the rescue system. The default is "
23243 "set by libguestfs and is small but adequate for running system tools. The "
23244 "occasional program might need more memory. The parameter is specified in "
23249 #: ../rescue/virt-rescue.pod:185
23250 msgid "B<--network>"
23254 #: ../rescue/virt-rescue.pod:187
23255 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
23259 #: ../rescue/virt-rescue.pod:193
23260 msgid "Open the image read-only."
23264 #: ../rescue/virt-rescue.pod:203
23266 "Enable SELinux in the rescue appliance. You should read "
23267 "L<guestfs(3)/SELINUX> before using this option."
23271 #: ../rescue/virt-rescue.pod:206
23276 #: ../rescue/virt-rescue.pod:208
23277 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
23281 #: ../rescue/virt-rescue.pod:210
23282 msgid "B<--suggest>"
23286 #: ../rescue/virt-rescue.pod:212
23288 "Inspect the disk image and suggest what mount commands should be used to "
23289 "mount the disks. You should use the I<--suggest> option in a second "
23290 "terminal, then paste the commands into another virt-rescue."
23294 #: ../rescue/virt-rescue.pod:216
23296 "This option implies I<--ro> and is safe to use even if the guest is up or if "
23297 "another virt-rescue is running."
23301 #: ../rescue/virt-rescue.pod:235
23303 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
23304 "are done read-write."
23308 #: ../rescue/virt-rescue.pod:248
23309 msgid "Previous versions of virt-rescue allowed you to write either:"
23313 #: ../rescue/virt-rescue.pod:250
23316 " virt-rescue disk.img [disk.img ...]\n"
23321 #: ../rescue/virt-rescue.pod:254
23324 " virt-rescue guestname\n"
23329 #: ../rescue/virt-rescue.pod:262
23334 #: ../rescue/virt-rescue.pod:264
23336 "Adding the I<--network> option enables QEMU user networking in the rescue "
23337 "appliance. There are some differences between user networking and ordinary "
23342 #: ../rescue/virt-rescue.pod:270
23343 msgid "ping does not work"
23347 #: ../rescue/virt-rescue.pod:272
23349 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
23350 "send the ping packets, and because virt-rescue must be able to run as "
23351 "non-root, QEMU user networking is not able to emulate the L<ping(8)> "
23352 "command. The ping command will appear to resolve addresses but will not be "
23353 "able to send or receive any packets. This does not mean that the network is "
23358 #: ../rescue/virt-rescue.pod:279
23359 msgid "cannot receive connections"
23363 #: ../rescue/virt-rescue.pod:281
23364 msgid "QEMU user networking cannot receive incoming connections."
23368 #: ../rescue/virt-rescue.pod:283
23369 msgid "making TCP connections"
23373 #: ../rescue/virt-rescue.pod:285
23375 "The virt-rescue appliance needs to be small and so does not include many "
23376 "network tools. In particular there is no L<telnet(1)> command. You can "
23377 "make TCP connections from the shell using the magical "
23378 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
23382 #: ../rescue/virt-rescue.pod:290
23385 " exec 3<>/dev/tcp/redhat.com/80\n"
23386 " echo \"GET /\" >&3\n"
23392 #: ../rescue/virt-rescue.pod:294
23393 msgid "See L<bash(1)> for more details."
23397 #: ../rescue/virt-rescue.pod:300
23399 "Several environment variables affect virt-rescue. See "
23400 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
23404 #: ../rescue/virt-rescue.pod:327
23406 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
23407 "L<virt-filesystems(1)>, L<http://libguestfs.org/>."
23411 #: ../resize/virt-resize.pod:5
23412 msgid "virt-resize - Resize a virtual machine disk"
23416 #: ../resize/virt-resize.pod:9
23419 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
23420 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
23421 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
23426 #: ../resize/virt-resize.pod:15
23428 "Virt-resize is a tool which can resize a virtual machine disk, making it "
23429 "larger or smaller overall, and resizing or deleting any partitions contained "
23434 #: ../resize/virt-resize.pod:19
23436 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
23437 "not> be used on live virtual machines - for consistent results, shut the "
23438 "virtual machine down before resizing it."
23442 #: ../resize/virt-resize.pod:23
23444 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
23445 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
23449 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:603 ../sparsify/virt-sparsify.pod:227 ../src/guestfs.pod:484 ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
23454 #: ../resize/virt-resize.pod:33
23456 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
23457 "fill the extra 5GB of space."
23461 #: ../resize/virt-resize.pod:36
23464 " virt-filesystems --long -h --all -a olddisk\n"
23469 #: ../resize/virt-resize.pod:38
23472 " truncate -r olddisk newdisk\n"
23473 " truncate -s +5G newdisk\n"
23478 #: ../resize/virt-resize.pod:41
23481 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
23482 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
23487 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:234 ../src/guestfs.pod:490 ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
23492 #: ../resize/virt-resize.pod:46
23494 "As above, but make the /boot partition 200MB bigger, while giving the "
23495 "remaining space to /dev/sda2:"
23499 #: ../resize/virt-resize.pod:49
23502 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23503 " olddisk newdisk\n"
23508 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:616 ../sparsify/virt-sparsify.pod:240 ../src/guestfs.pod:501 ../src/guestfs.pod:1451
23513 #: ../resize/virt-resize.pod:54
23515 "As in the first example, but expand a logical volume as the final step. "
23516 "This is what you would typically use for Linux guests that use LVM:"
23520 #: ../resize/virt-resize.pod:58
23523 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
23524 " olddisk newdisk\n"
23529 #: ../resize/virt-resize.pod:61
23534 #: ../resize/virt-resize.pod:63
23536 "As in the first example, but the output format will be qcow2 instead of a "
23541 #: ../resize/virt-resize.pod:66
23544 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
23545 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23550 #: ../resize/virt-resize.pod:71
23551 msgid "DETAILED USAGE"
23555 #: ../resize/virt-resize.pod:73
23556 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23560 #: ../resize/virt-resize.pod:77
23561 msgid "1. Shut down the virtual machine"
23565 #: ../resize/virt-resize.pod:79
23566 msgid "2. Locate input disk image"
23570 #: ../resize/virt-resize.pod:81
23572 "Locate the input disk image (ie. the file or device on the host containing "
23573 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23574 "dumpxml> like this to find the disk image name:"
23578 #: ../resize/virt-resize.pod:85
23581 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23582 " Found 1 nodes:\n"
23584 " <source dev=\"/dev/vg/lv_guest\" />\n"
23589 #: ../resize/virt-resize.pod:90
23590 msgid "3. Look at current sizing"
23594 #: ../resize/virt-resize.pod:92
23595 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23599 #: ../resize/virt-resize.pod:95
23602 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23603 " Name Type Size Parent\n"
23604 " /dev/sda1 partition 101M /dev/sda\n"
23605 " /dev/sda2 partition 7.9G /dev/sda\n"
23606 " /dev/sda device 8.0G -\n"
23611 #: ../resize/virt-resize.pod:101
23613 "(This example is a virtual machine with an 8 GB disk which we would like to "
23614 "expand up to 10 GB)."
23618 #: ../resize/virt-resize.pod:104
23619 msgid "4. Create output disk"
23623 #: ../resize/virt-resize.pod:106
23625 "Virt-resize cannot do in-place disk modifications. You have to have space "
23626 "to store the resized output disk."
23630 #: ../resize/virt-resize.pod:109
23631 msgid "To store the resized disk image in a file, create a file of a suitable size:"
23635 #: ../resize/virt-resize.pod:112
23638 " # rm -f outdisk\n"
23639 " # truncate -s 10G outdisk\n"
23644 #: ../resize/virt-resize.pod:115
23645 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23649 #: ../resize/virt-resize.pod:117
23652 " # lvcreate -L 10G -n lv_name vg_name\n"
23657 #: ../resize/virt-resize.pod:119
23658 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23662 #: ../resize/virt-resize.pod:121
23665 " # virsh pool-list\n"
23666 " # virsh vol-create-as poolname newvol 10G\n"
23671 #: ../resize/virt-resize.pod:124
23676 #: ../resize/virt-resize.pod:126
23678 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23679 "file) and the output disk. The output disk is the one created in the "
23684 #: ../resize/virt-resize.pod:130
23687 " # virt-resize indisk outdisk\n"
23692 #: ../resize/virt-resize.pod:132
23694 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23695 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23696 "larger, then an extra, empty partition is created at the end of the disk "
23697 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23702 #: ../resize/virt-resize.pod:138
23704 "More realistically you'd want to expand existing partitions in the disk "
23705 "image by passing extra options (for the full list see the L</OPTIONS> "
23710 #: ../resize/virt-resize.pod:142
23712 "L</--expand> is the most useful option. It expands the named partition "
23713 "within the disk to fill any extra space:"
23717 #: ../resize/virt-resize.pod:145
23720 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23725 #: ../resize/virt-resize.pod:147
23727 "(In this case, an extra partition is I<not> created at the end of the disk, "
23728 "because there will be no unused space)."
23732 #: ../resize/virt-resize.pod:150
23734 "L</--resize> is the other commonly used option. The following would "
23735 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23736 "rest of the available space:"
23740 #: ../resize/virt-resize.pod:154
23743 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23744 " indisk outdisk\n"
23749 #: ../resize/virt-resize.pod:157
23751 "If the expanded partition in the image contains a filesystem or LVM PV, then "
23752 "if virt-resize knows how, it will resize the contents, the equivalent of "
23753 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23754 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23755 "filesystems, so you would have to online resize them after booting the "
23760 #: ../resize/virt-resize.pod:164
23761 msgid "Other options are covered below."
23765 #: ../resize/virt-resize.pod:166
23770 #: ../resize/virt-resize.pod:168
23771 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23775 #: ../resize/virt-resize.pod:170
23776 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23780 #: ../resize/virt-resize.pod:172
23783 " # virsh edit guestname\n"
23788 #: ../resize/virt-resize.pod:174
23790 "Change E<lt>source ...E<gt>, see "
23791 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
23795 #: ../resize/virt-resize.pod:177
23796 msgid "Then start up the domain with the new, resized disk:"
23800 #: ../resize/virt-resize.pod:179
23803 " # virsh start guestname\n"
23808 #: ../resize/virt-resize.pod:181
23810 "and check that it still works. See also the L</NOTES> section below for "
23811 "additional information."
23815 #: ../resize/virt-resize.pod:184
23816 msgid "7. Resize LVs etc inside the guest"
23820 #: ../resize/virt-resize.pod:186
23821 msgid "(This can also be done offline using L<guestfish(1)>)"
23825 #: ../resize/virt-resize.pod:188
23827 "Once the guest has booted you should see the new space available, at least "
23828 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23829 "may need to resize LVs inside PVs, and also resize filesystem types that "
23830 "virt-resize does not know how to expand."
23834 #: ../resize/virt-resize.pod:195
23835 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23839 #: ../resize/virt-resize.pod:197
23841 "Shrinking is somewhat more complex than expanding, and only an overview is "
23846 #: ../resize/virt-resize.pod:200
23848 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23849 "filesystems). The user has to shrink content before passing the disk image "
23850 "to virt-resize, and virt-resize will check that the content has been shrunk "
23855 #: ../resize/virt-resize.pod:205
23856 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23860 #: ../resize/virt-resize.pod:207
23862 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23863 "steps 3 and 4 above to allocate a new disk image."
23867 #: ../resize/virt-resize.pod:210
23868 msgid "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23872 #: ../resize/virt-resize.pod:213
23873 msgid "IGNORING OR DELETING PARTITIONS"
23877 #: ../resize/virt-resize.pod:215
23879 "virt-resize also gives a convenient way to ignore or delete partitions when "
23880 "copying from the input disk to the output disk. Ignoring a partition speeds "
23881 "up the copy where you don't care about the existing contents of a "
23882 "partition. Deleting a partition removes it completely, but note that it "
23883 "also renumbers any partitions after the one which is deleted, which can "
23884 "leave some guests unbootable."
23888 #: ../resize/virt-resize.pod:222
23889 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23893 #: ../resize/virt-resize.pod:224
23895 "If the input disk is in qcow2 format, then you may prefer that the output is "
23896 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23897 "the fly. The output format is simply determined by the format of the empty "
23898 "output container that you provide. Thus to create qcow2 output, use:"
23902 #: ../resize/virt-resize.pod:230
23905 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23910 #: ../resize/virt-resize.pod:232
23911 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23915 #: ../resize/virt-resize.pod:234
23916 msgid "Similarly, to get non-sparse raw output use:"
23920 #: ../resize/virt-resize.pod:236
23923 " fallocate -l size outdisk\n"
23928 #: ../resize/virt-resize.pod:238
23930 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
23931 "if=/dev/zero of=outdisk bs=1M count=..>)"
23935 #: ../resize/virt-resize.pod:241
23936 msgid "LOGICAL PARTITIONS"
23940 #: ../resize/virt-resize.pod:243
23942 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23943 "tables) cannot be resized."
23947 #: ../resize/virt-resize.pod:246
23949 "To understand what is going on, firstly one of the four partitions "
23950 "C</dev/sda1-4> will have MBR partition type C<05> or C<0f>. This is called "
23951 "the B<extended partition>. Use L<virt-filesystems(1)> to see the MBR "
23956 #: ../resize/virt-resize.pod:251
23957 msgid "Logical partitions live inside the extended partition."
23961 #: ../resize/virt-resize.pod:253
23963 "The extended partition can be expanded, but not shrunk (unless you force it, "
23964 "which is not advisable). When the extended partition is copied across, all "
23965 "the logical partitions contained inside are copied over implicitly. "
23966 "Virt-resize does not look inside the extended partition, so it copies the "
23967 "logical partitions blindly."
23971 #: ../resize/virt-resize.pod:259
23973 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
23974 "line. Doing so will give an error."
23978 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23979 msgid "Display help."
23983 #: ../resize/virt-resize.pod:270
23984 msgid "B<--align-first auto>"
23988 #: ../resize/virt-resize.pod:272
23989 msgid "B<--align-first never>"
23993 #: ../resize/virt-resize.pod:274
23994 msgid "B<--align-first always>"
23998 #: ../resize/virt-resize.pod:276
24000 "Align the first partition for improved performance (see also the "
24001 "I<--alignment> option)."
24005 #: ../resize/virt-resize.pod:279
24007 "The default is I<--align-first auto> which only aligns the first partition "
24008 "if it is safe to do so. That is, only when we know how to fix the "
24009 "bootloader automatically, and at the moment that can only be done for "
24014 #: ../resize/virt-resize.pod:284
24016 "I<--align-first never> means we never move the first partition. This is the "
24017 "safest option. Try this if the guest does not boot after resizing."
24021 #: ../resize/virt-resize.pod:288
24023 "I<--align-first always> means we always align the first partition (if it "
24024 "needs to be aligned). For some guests this will break the bootloader, "
24025 "making the guest unbootable."
24029 #: ../resize/virt-resize.pod:292
24030 msgid "B<--alignment N>"
24034 #: ../resize/virt-resize.pod:294
24036 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
24037 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
24041 #: ../resize/virt-resize.pod:298
24043 "Assuming 512 byte sector size inside the guest, here are some suitable "
24048 #: ../resize/virt-resize.pod:303
24049 msgid "I<--alignment 1> (512 bytes)"
24053 #: ../resize/virt-resize.pod:305
24055 "The partitions would be packed together as closely as possible, but would be "
24056 "completely unaligned. In some cases this can cause very poor performance. "
24057 "See L<virt-alignment-scan(1)> for further details."
24061 #: ../resize/virt-resize.pod:309
24062 msgid "I<--alignment 8> (4K)"
24066 #: ../resize/virt-resize.pod:311
24068 "This would be the minimum acceptable alignment for reasonable performance on "
24073 #: ../resize/virt-resize.pod:314
24074 msgid "I<--alignment 128> (64K)"
24078 #: ../resize/virt-resize.pod:316
24080 "This alignment provides good performance when the host is using high end "
24085 #: ../resize/virt-resize.pod:319
24086 msgid "I<--alignment 2048> (1M)"
24090 #: ../resize/virt-resize.pod:321
24092 "This is the standard alignment used by all newly installed guests since "
24097 #: ../resize/virt-resize.pod:326
24102 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:120
24107 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
24108 msgid "Enable debugging messages."
24112 #: ../resize/virt-resize.pod:332 ../sparsify/virt-sparsify.pod:131
24113 msgid "B<--debug-gc>"
24117 #: ../resize/virt-resize.pod:334
24119 "Debug garbage collection and memory allocation. This is only useful when "
24120 "debugging memory problems in virt-resize or the OCaml libguestfs bindings."
24124 #: ../resize/virt-resize.pod:338
24125 msgid "B<--delete part>"
24129 #: ../resize/virt-resize.pod:340
24131 "Delete the named partition. It would be more accurate to describe this as "
24132 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
24133 "the original disk image is left intact."
24137 #: ../resize/virt-resize.pod:344
24139 "Note that when you delete a partition, then anything contained in the "
24140 "partition is also deleted. Furthermore, this causes any partitions that "
24141 "come after to be I<renumbered>, which can easily make your guest unbootable."
24145 #: ../resize/virt-resize.pod:349 ../resize/virt-resize.pod:410 ../resize/virt-resize.pod:537 ../sparsify/virt-sparsify.pod:157
24146 msgid "You can give this option multiple times."
24150 #: ../resize/virt-resize.pod:351
24151 msgid "B<--expand part>"
24155 #: ../resize/virt-resize.pod:353
24157 "Expand the named partition so it uses up all extra space (space left over "
24158 "after any other resize changes that you request have been done)."
24162 #: ../resize/virt-resize.pod:356
24164 "If virt-resize knows how, it will expand the direct content of the "
24165 "partition. For example, if the partition is an LVM PV, it will expand the "
24166 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
24167 "content it doesn't know about alone."
24171 #: ../resize/virt-resize.pod:361
24172 msgid "Currently virt-resize can resize:"
24176 #: ../resize/virt-resize.pod:367
24177 msgid "ext2, ext3 and ext4 filesystems."
24181 #: ../resize/virt-resize.pod:371
24182 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
24186 #: ../resize/virt-resize.pod:373
24188 "The filesystem must have been shut down consistently last time it was used. "
24189 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
24190 "consistency check, so at the first boot after resizing Windows will check "
24195 #: ../resize/virt-resize.pod:380
24197 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
24198 "inside the PV, but see the I<--LV-expand> option. The user could also "
24199 "resize LVs as desired after boot."
24203 #: ../resize/virt-resize.pod:386
24204 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
24208 #: ../resize/virt-resize.pod:390 ../resize/virt-resize.pod:565
24209 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
24213 #: ../resize/virt-resize.pod:392 ../sparsify/virt-sparsify.pod:137 ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
24214 msgid "B<--format> raw"
24218 #: ../resize/virt-resize.pod:394 ../sparsify/virt-sparsify.pod:141
24220 "Specify the format of the input disk image. If this flag is not given then "
24221 "it is auto-detected from the image itself."
24225 #: ../resize/virt-resize.pod:400
24227 "Note that this option I<does not> affect the output format. See L</QCOW2 "
24228 "AND NON-SPARSE RAW FORMATS>."
24232 #: ../resize/virt-resize.pod:403
24233 msgid "B<--ignore part>"
24237 #: ../resize/virt-resize.pod:405
24239 "Ignore the named partition. Effectively this means the partition is "
24240 "allocated on the destination disk, but the content is not copied across from "
24241 "the source disk. The content of the partition will be blank (all zero "
24246 #: ../resize/virt-resize.pod:412
24247 msgid "B<--LV-expand logvol>"
24251 #: ../resize/virt-resize.pod:414
24253 "This takes the logical volume and, as a final step, expands it to fill all "
24254 "the space available in its volume group. A typical usage, assuming a Linux "
24255 "guest with a single PV C</dev/sda2> and a root device called "
24256 "C</dev/vg_guest/lv_root> would be:"
24260 #: ../resize/virt-resize.pod:419
24263 " virt-resize indisk outdisk \\\n"
24264 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
24269 #: ../resize/virt-resize.pod:422
24271 "This would first expand the partition (and PV), and then expand the root "
24272 "device to fill the extra space in the PV."
24276 #: ../resize/virt-resize.pod:425
24278 "The contents of the LV are also resized if virt-resize knows how to do "
24279 "that. You can stop virt-resize from trying to expand the content by using "
24280 "the option I<--no-expand-content>."
24284 #: ../resize/virt-resize.pod:429
24285 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
24289 #: ../resize/virt-resize.pod:431
24291 "You can give this option multiple times, I<but> it doesn't make sense to do "
24292 "this unless the logical volumes you specify are all in different volume "
24297 #: ../resize/virt-resize.pod:435 ../sparsify/virt-sparsify.pod:159
24298 msgid "B<--machine-readable>"
24302 #: ../resize/virt-resize.pod:437 ../sparsify/virt-sparsify.pod:161
24304 "This option is used to make the output more machine friendly when being "
24305 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
24309 #: ../resize/virt-resize.pod:443
24310 msgid "B<--dryrun>"
24314 #: ../resize/virt-resize.pod:445
24315 msgid "Print a summary of what would be done, but don't do anything."
24319 #: ../resize/virt-resize.pod:447
24320 msgid "B<--no-copy-boot-loader>"
24324 #: ../resize/virt-resize.pod:449
24326 "By default, virt-resize copies over some sectors at the start of the disk "
24327 "(up to the beginning of the first partition). Commonly these sectors "
24328 "contain the Master Boot Record (MBR) and the boot loader, and are required "
24329 "in order for the guest to boot correctly."
24333 #: ../resize/virt-resize.pod:454
24335 "If you specify this flag, then this initial copy is not done. You may need "
24336 "to reinstall the boot loader in this case."
24340 #: ../resize/virt-resize.pod:457
24341 msgid "B<--no-extra-partition>"
24345 #: ../resize/virt-resize.pod:459
24347 "By default, virt-resize creates an extra partition if there is any extra, "
24348 "unused space after all resizing has happened. Use this option to prevent "
24349 "the extra partition from being created. If you do this then the extra space "
24350 "will be inaccessible until you run fdisk, parted, or some other partitioning "
24351 "tool in the guest."
24355 #: ../resize/virt-resize.pod:465
24357 "Note that if the surplus space is smaller than 10 MB, no extra partition "
24362 #: ../resize/virt-resize.pod:468
24363 msgid "B<--no-expand-content>"
24367 #: ../resize/virt-resize.pod:470
24369 "By default, virt-resize will try to expand the direct contents of "
24370 "partitions, if it knows how (see I<--expand> option above)."
24374 #: ../resize/virt-resize.pod:473
24376 "If you give the I<--no-expand-content> option then virt-resize will not "
24381 #: ../resize/virt-resize.pod:476
24382 msgid "B<--ntfsresize-force>"
24386 #: ../resize/virt-resize.pod:478
24388 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
24389 "the NTFS disk is marked as needing a consistency check. You have to use "
24390 "this option if you want to resize a Windows guest multiple times without "
24391 "booting into Windows between each resize."
24395 #: ../resize/virt-resize.pod:484
24396 msgid "B<--output-format> raw"
24400 #: ../resize/virt-resize.pod:486
24402 "Specify the format of the output disk image. If this flag is not given then "
24403 "it is auto-detected from the image itself."
24407 #: ../resize/virt-resize.pod:492
24409 "Note that this option I<does not create> the output format. This option "
24410 "just tells libguestfs what it is so it doesn't try to guess it. You still "
24411 "need to create the output disk with the right format. See L</QCOW2 AND "
24412 "NON-SPARSE RAW FORMATS>."
24416 #: ../resize/virt-resize.pod:501
24417 msgid "Don't print the summary."
24421 #: ../resize/virt-resize.pod:503
24422 msgid "B<--resize part=size>"
24426 #: ../resize/virt-resize.pod:505
24428 "Resize the named partition (expanding or shrinking it) so that it has the "
24433 #: ../resize/virt-resize.pod:508
24435 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
24436 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
24437 "size; or as a relative number or percentage. For example:"
24441 #: ../resize/virt-resize.pod:514
24444 " --resize /dev/sda2=10G\n"
24449 #: ../resize/virt-resize.pod:516
24452 " --resize /dev/sda4=90%\n"
24457 #: ../resize/virt-resize.pod:518
24460 " --resize /dev/sda2=+1G\n"
24465 #: ../resize/virt-resize.pod:520
24468 " --resize /dev/sda2=-200M\n"
24473 #: ../resize/virt-resize.pod:522
24476 " --resize /dev/sda1=+128K\n"
24481 #: ../resize/virt-resize.pod:524
24484 " --resize /dev/sda1=+10%\n"
24489 #: ../resize/virt-resize.pod:526
24492 " --resize /dev/sda1=-10%\n"
24497 #: ../resize/virt-resize.pod:528
24499 "You can increase the size of any partition. Virt-resize will expand the "
24500 "direct content of the partition if it knows how (see I<--expand> below)."
24504 #: ../resize/virt-resize.pod:532
24506 "You can only I<decrease> the size of partitions that contain filesystems or "
24507 "PVs which have already been shrunk. Virt-resize will check this has been "
24508 "done before proceeding, or else will print an error (see also "
24509 "I<--resize-force>)."
24513 #: ../resize/virt-resize.pod:539
24514 msgid "B<--resize-force part=size>"
24518 #: ../resize/virt-resize.pod:541
24520 "This is the same as I<--resize> except that it will let you decrease the "
24521 "size of any partition. Generally this means you will lose any data which "
24522 "was at the end of the partition you shrink, but you may not care about that "
24523 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24524 "as a swap partition)."
24528 #: ../resize/virt-resize.pod:547
24529 msgid "See also the I<--ignore> option."
24533 #: ../resize/virt-resize.pod:549
24534 msgid "B<--shrink part>"
24538 #: ../resize/virt-resize.pod:551
24540 "Shrink the named partition until the overall disk image fits in the "
24541 "destination. The named partition B<must> contain a filesystem or PV which "
24542 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24543 "online tools). Virt-resize will check this and give an error if it has not "
24548 #: ../resize/virt-resize.pod:557
24550 "The amount by which the overall disk must be shrunk (after carrying out all "
24551 "other operations requested by the user) is called the \"deficit\". For "
24552 "example, a straight copy (assume no other operations) from a 5GB disk image "
24553 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24554 "would give an error unless the user specified a partition to shrink and that "
24555 "partition had more than a gigabyte of free space."
24559 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:201
24560 msgid "MACHINE READABLE OUTPUT"
24564 #: ../resize/virt-resize.pod:577
24566 "The I<--machine-readable> option can be used to make the output more machine "
24567 "friendly, which is useful when calling virt-resize from other programs, GUIs "
24572 #: ../resize/virt-resize.pod:581 ../sparsify/virt-sparsify.pod:207
24573 msgid "There are two ways to use this option."
24577 #: ../resize/virt-resize.pod:583
24579 "Firstly use the option on its own to query the capabilities of the "
24580 "virt-resize binary. Typical output looks like this:"
24584 #: ../resize/virt-resize.pod:586
24587 " $ virt-resize --machine-readable\n"
24589 " ntfsresize-force\n"
24597 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:217
24599 "A list of features is printed, one per line, and the program exits with "
24604 #: ../resize/virt-resize.pod:596 ../sparsify/virt-sparsify.pod:220
24606 "Secondly use the option in conjunction with other options to make the "
24607 "regular program output more machine friendly."
24611 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:223
24612 msgid "At the moment this means:"
24616 #: ../resize/virt-resize.pod:605 ../sparsify/virt-sparsify.pod:229
24618 "Progress bar messages can be parsed from stdout by looking for this regular "
24623 #: ../resize/virt-resize.pod:608 ../sparsify/virt-sparsify.pod:232
24626 " ^[0-9]+/[0-9]+$\n"
24631 #: ../resize/virt-resize.pod:612 ../sparsify/virt-sparsify.pod:236
24633 "The calling program should treat messages sent to stdout (except for "
24634 "progress bar messages) as status messages. They can be logged and/or "
24635 "displayed to the user."
24639 #: ../resize/virt-resize.pod:618
24641 "The calling program should treat messages sent to stderr as error messages. "
24642 "In addition, virt-resize exits with a non-zero status code if there was a "
24647 #: ../resize/virt-resize.pod:624
24649 "Versions of the program prior to 1.13.9 did not support the "
24650 "I<--machine-readable> option and will return an error."
24654 #: ../resize/virt-resize.pod:629
24655 msgid "\"Partition 1 does not end on cylinder boundary.\""
24659 #: ../resize/virt-resize.pod:631
24661 "Virt-resize aligns partitions to multiples of 128 sectors (see the "
24662 "I<--alignment> parameter). Usually this means the partitions will not be "
24663 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24664 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
24665 "drives. Alignment of partitions to cylinders is not required by any modern "
24666 "operating system."
24670 #: ../resize/virt-resize.pod:638
24671 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24675 #: ../resize/virt-resize.pod:640
24677 "In Windows Vista and later versions, Microsoft switched to using a separate "
24678 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24679 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24680 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24681 "the second partition (ie. C: drive) should work."
24685 #: ../resize/virt-resize.pod:647
24687 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24688 "NTFS partitions have been expanded. This is just a safety check and (unless "
24689 "it find errors) is nothing to worry about."
24693 #: ../resize/virt-resize.pod:651
24694 msgid "GUEST BOOT STUCK AT \"GRUB\""
24698 #: ../resize/virt-resize.pod:653
24700 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24701 "printing C<GRUB> on the console, try reinstalling grub."
24705 #: ../resize/virt-resize.pod:656
24708 " guestfish -i -a newdisk\n"
24709 " ><fs> cat /boot/grub/device.map\n"
24710 " # check the contents of this file are sensible or\n"
24711 " # edit the file if necessary\n"
24712 " ><fs> grub-install / /dev/vda\n"
24718 #: ../resize/virt-resize.pod:663
24720 "For more flexible guest reconfiguration, including if you need to specify "
24721 "other parameters to grub-install, use L<virt-rescue(1)>."
24725 #: ../resize/virt-resize.pod:666
24726 msgid "ALTERNATIVE TOOLS"
24730 #: ../resize/virt-resize.pod:668
24732 "There are several proprietary tools for resizing partitions. We won't "
24733 "mention any here."
24737 #: ../resize/virt-resize.pod:671
24739 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24740 "operations on disk images. They can resize and move partitions, but I don't "
24741 "think they can do anything with the contents, and they certainly don't "
24746 #: ../resize/virt-resize.pod:676
24748 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24749 "but at a much lower level. You will probably end up hand-calculating sector "
24750 "offsets, which is something that virt-resize was designed to avoid. If you "
24751 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24756 #: ../resize/virt-resize.pod:696
24758 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
24759 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
24760 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
24761 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
24762 "L<virt-sparsify(1)>, L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24766 #: ../ruby/examples/guestfs-ruby.pod:5
24767 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24771 #: ../ruby/examples/guestfs-ruby.pod:9
24774 " require 'guestfs'\n"
24775 " g = Guestfs::Guestfs.new()\n"
24776 " g.add_drive_opts(\"disk.img\",\n"
24777 " :readonly => 1, :format => \"raw\")\n"
24783 #: ../ruby/examples/guestfs-ruby.pod:17
24785 "This manual page documents how to call libguestfs from the Ruby programming "
24786 "language. This page just documents the differences from the C API and gives "
24787 "some examples. If you are not familiar with using libguestfs, you also need "
24788 "to read L<guestfs(3)>."
24792 #: ../ruby/examples/guestfs-ruby.pod:24
24794 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24795 "This has a single parameter which is the error message (a string)."
24799 #: ../ruby/examples/guestfs-ruby.pod:38
24801 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
24802 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
24803 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24807 #: ../sparsify/virt-sparsify.pod:5
24808 msgid "virt-sparsify - Make a virtual machine disk sparse"
24812 #: ../sparsify/virt-sparsify.pod:9
24815 " virt-sparsify [--options] indisk outdisk\n"
24820 #: ../sparsify/virt-sparsify.pod:13
24822 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24823 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24824 "the disk image can be converted back to free space on the host."
24828 #: ../sparsify/virt-sparsify.pod:18
24830 "Virt-sparsify can locate and sparsify free space in most filesystems "
24831 "(eg. ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24835 #: ../sparsify/virt-sparsify.pod:21
24837 "Virt-sparsify can also convert between some disk formats, for example "
24838 "converting a raw disk image to a thin-provisioned qcow2 image."
24842 #: ../sparsify/virt-sparsify.pod:24
24844 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24845 "machines. If a virtual machine has more than one attached disk, you must "
24846 "sparsify each one separately."
24850 #: ../sparsify/virt-sparsify.pod:28
24851 msgid "IMPORTANT LIMITATIONS"
24855 #: ../sparsify/virt-sparsify.pod:34
24857 "Virt-sparsify does not do in-place modifications. It copies from a source "
24858 "image to a destination image, leaving the source unchanged. I<Check that "
24859 "the sparsification was successful before deleting the source image>."
24863 #: ../sparsify/virt-sparsify.pod:41
24864 msgid "The virtual machine I<must be shut down> before using this tool."
24868 #: ../sparsify/virt-sparsify.pod:45
24870 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24871 "(1 temporary copy + 1 destination image). This is in the worst case and "
24872 "usually much less space is required."
24876 #: ../sparsify/virt-sparsify.pod:51
24877 msgid "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24881 #: ../sparsify/virt-sparsify.pod:56
24882 msgid "Virt-sparsify cannot handle encrypted disks."
24886 #: ../sparsify/virt-sparsify.pod:60
24888 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24889 "this space is often used for critical items like bootloaders so it's not "
24894 #: ../sparsify/virt-sparsify.pod:66
24896 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24897 "to do this unless we can be sure there is no hibernation data, so at the "
24898 "moment swap partitions are ignored."
24902 #: ../sparsify/virt-sparsify.pod:72
24904 "You may also want to read the manual pages for the associated tools "
24905 "L<virt-filesystems(1)> and L<virt-df(1)> before starting."
24909 #: ../sparsify/virt-sparsify.pod:77
24910 msgid "Typical usage is:"
24914 #: ../sparsify/virt-sparsify.pod:79
24917 " virt-sparsify indisk outdisk\n"
24922 #: ../sparsify/virt-sparsify.pod:81
24924 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24925 "is created, or overwritten if it already exists. The format of the input "
24926 "disk is detected (eg. qcow2) and the same format is used for the output "
24931 #: ../sparsify/virt-sparsify.pod:86
24932 msgid "To convert between formats, use the I<--convert> option:"
24936 #: ../sparsify/virt-sparsify.pod:88
24939 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24944 #: ../sparsify/virt-sparsify.pod:90
24946 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24947 "can find within the source disk image. You can get it to ignore (don't zero "
24948 "free space on) certain filesystems by doing:"
24952 #: ../sparsify/virt-sparsify.pod:94
24955 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24960 #: ../sparsify/virt-sparsify.pod:96
24961 msgid "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24965 #: ../sparsify/virt-sparsify.pod:107
24966 msgid "B<--compress>"
24970 #: ../sparsify/virt-sparsify.pod:109
24972 "Compress the output file. This I<only> works if the output format is "
24977 #: ../sparsify/virt-sparsify.pod:112
24978 msgid "B<--convert> raw"
24982 #: ../sparsify/virt-sparsify.pod:114
24983 msgid "B<--convert> qcow2"
24987 #: ../sparsify/virt-sparsify.pod:116
24988 msgid "B<--convert> [other formats]"
24992 #: ../sparsify/virt-sparsify.pod:118
24994 "Use C<output-format> as the format for the destination image. If this is "
24995 "not specified, then the input format is used."
24999 #: ../sparsify/virt-sparsify.pod:121
25000 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>, C<vdi>."
25004 #: ../sparsify/virt-sparsify.pod:123
25006 "You can also use any format supported by the L<qemu-img(1)> program, "
25007 "eg. C<vmdk>, but support for other formats is reliant on qemu."
25011 #: ../sparsify/virt-sparsify.pod:126
25013 "Specifying the I<--convert> option is usually a good idea, because then "
25014 "virt-sparsify doesn't need to try to guess the input format."
25018 #: ../sparsify/virt-sparsify.pod:129
25019 msgid "For fine-tuning the output format, see: I<--compress>, I<-o>."
25023 #: ../sparsify/virt-sparsify.pod:133
25025 "Debug garbage collection and memory allocation. This is only useful when "
25026 "debugging memory problems in virt-sparsify or the OCaml libguestfs bindings."
25030 #: ../sparsify/virt-sparsify.pod:139
25031 msgid "B<--format> qcow2"
25035 #: ../sparsify/virt-sparsify.pod:147
25036 msgid "B<--ignore> filesystem"
25040 #: ../sparsify/virt-sparsify.pod:149
25041 msgid "B<--ignore> volgroup"
25045 #: ../sparsify/virt-sparsify.pod:151
25047 "Ignore the named filesystem. Free space on the filesystem will not be "
25048 "zeroed, but existing blocks of zeroes will still be sparsified."
25052 #: ../sparsify/virt-sparsify.pod:154
25054 "In the second form, this ignores the named volume group. Use the volume "
25055 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
25059 #: ../sparsify/virt-sparsify.pod:165
25060 msgid "B<-o> option[,option,...]"
25064 #: ../sparsify/virt-sparsify.pod:167
25066 "Pass I<-o> option(s) to the L<qemu-img(1)> command to fine-tune the output "
25067 "format. Options available depend on the output format (see I<--convert>) "
25068 "and the installed version of the qemu-img program."
25072 #: ../sparsify/virt-sparsify.pod:171
25074 "You should use I<-o> at most once. To pass multiple options, separate them "
25079 #: ../sparsify/virt-sparsify.pod:174
25082 " virt-sparsify --convert qcow2 \\\n"
25083 " -o cluster_size=512,preallocation=metadata ...\n"
25088 #: ../sparsify/virt-sparsify.pod:181
25089 msgid "This disables progress bars and other unnecessary output."
25093 #: ../sparsify/virt-sparsify.pod:203
25095 "The I<--machine-readable> option can be used to make the output more machine "
25096 "friendly, which is useful when calling virt-sparsify from other programs, "
25101 #: ../sparsify/virt-sparsify.pod:209
25103 "Firstly use the option on its own to query the capabilities of the "
25104 "virt-sparsify binary. Typical output looks like this:"
25108 #: ../sparsify/virt-sparsify.pod:212
25111 " $ virt-sparsify --machine-readable\n"
25119 #: ../sparsify/virt-sparsify.pod:242
25121 "The calling program should treat messages sent to stderr as error messages. "
25122 "In addition, virt-sparsify exits with a non-zero status code if there was a "
25127 #: ../sparsify/virt-sparsify.pod:248
25129 "All versions of virt-sparsify have supported the I<--machine-readable> "
25134 #: ../sparsify/virt-sparsify.pod:262
25136 "Location of the temporary directory used for the potentially large temporary "
25141 #: ../sparsify/virt-sparsify.pod:265
25143 "You should ensure there is enough free space in the worst case for a full "
25144 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
25145 "to another directory that has enough space."
25149 #: ../sparsify/virt-sparsify.pod:269
25150 msgid "This defaults to C</tmp>."
25154 #: ../sparsify/virt-sparsify.pod:273
25155 msgid "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
25159 #: ../sparsify/virt-sparsify.pod:277
25161 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
25162 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, "
25163 "L<qemu-img(1)>, L<http://libguestfs.org/>."
25167 #: ../src/guestfs-actions.pod:1
25168 msgid "guestfs_add_cdrom"
25172 #: ../src/guestfs-actions.pod:3
25176 " guestfs_add_cdrom (guestfs_h *g,\n"
25177 " const char *filename);\n"
25182 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:323
25184 "I<This function is deprecated.> In new code, use the "
25185 "L</guestfs_add_drive_opts> call instead."
25189 #: ../src/guestfs-actions.pod:24
25191 "This call checks for the existence of C<filename>. This stops you from "
25192 "specifying other types of drive which are supported by qemu such as C<nbd:> "
25193 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
25198 #: ../src/guestfs-actions.pod:31
25200 "If you just want to add an ISO file (often you use this as an efficient way "
25201 "to transfer large files into the guest), then you should probably use "
25202 "C<guestfs_add_drive_ro> instead."
25206 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:187 ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:291 ../src/guestfs-actions.pod:312 ../src/guestfs-actions.pod:333 ../src/guestfs-actions.pod:346 ../src/guestfs-actions.pod:360 ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:500 ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:559 ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:705 ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:734 ../src/guestfs-actions.pod:833 ../src/guestfs-actions.pod:851 ../src/guestfs-actions.pod:865 ../src/guestfs-actions.pod:879 ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:1099 ../src/guestfs-actions.pod:1119 ../src/guestfs-actions.pod:1137 ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:1286 ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:1372 ../src/guestfs-actions.pod:1425 ../src/guestfs-actions.pod:1478 ../src/guestfs-actions.pod:1536 ../src/guestfs-actions.pod:1590 ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1623 ../src/guestfs-actions.pod:1651 ../src/guestfs-actions.pod:1721 ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:1777 ../src/guestfs-actions.pod:1819 ../src/guestfs-actions.pod:1932 ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2174 ../src/guestfs-actions.pod:2196 ../src/guestfs-actions.pod:2283 ../src/guestfs-actions.pod:2791 ../src/guestfs-actions.pod:2935 ../src/guestfs-actions.pod:2996 ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:4092 ../src/guestfs-actions.pod:4107 ../src/guestfs-actions.pod:4132 ../src/guestfs-actions.pod:4334 ../src/guestfs-actions.pod:4348 ../src/guestfs-actions.pod:4361 ../src/guestfs-actions.pod:4375 ../src/guestfs-actions.pod:4390 ../src/guestfs-actions.pod:4426 ../src/guestfs-actions.pod:4498 ../src/guestfs-actions.pod:4518 ../src/guestfs-actions.pod:4535 ../src/guestfs-actions.pod:4555 ../src/guestfs-actions.pod:4575 ../src/guestfs-actions.pod:4610 ../src/guestfs-actions.pod:4629 ../src/guestfs-actions.pod:4648 ../src/guestfs-actions.pod:4683 ../src/guestfs-actions.pod:4695 ../src/guestfs-actions.pod:4728 ../src/guestfs-actions.pod:4744 ../src/guestfs-actions.pod:4757 ../src/guestfs-actions.pod:4772 ../src/guestfs-actions.pod:4789 ../src/guestfs-actions.pod:4947 ../src/guestfs-actions.pod:5021 ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5051 ../src/guestfs-actions.pod:5064 ../src/guestfs-actions.pod:5115 ../src/guestfs-actions.pod:5133 ../src/guestfs-actions.pod:5151 ../src/guestfs-actions.pod:5167 ../src/guestfs-actions.pod:5181 ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:5212 ../src/guestfs-actions.pod:5227 ../src/guestfs-actions.pod:5254 ../src/guestfs-actions.pod:5317 ../src/guestfs-actions.pod:5390 ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5440 ../src/guestfs-actions.pod:5459 ../src/guestfs-actions.pod:5471 ../src/guestfs-actions.pod:5488 ../src/guestfs-actions.pod:5501 ../src/guestfs-actions.pod:5516 ../src/guestfs-actions.pod:5531 ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:5589 ../src/guestfs-actions.pod:5628 ../src/guestfs-actions.pod:5648 ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5679 ../src/guestfs-actions.pod:5728 ../src/guestfs-actions.pod:5781 ../src/guestfs-actions.pod:5828 ../src/guestfs-actions.pod:5871 ../src/guestfs-actions.pod:5899 ../src/guestfs-actions.pod:5916 ../src/guestfs-actions.pod:5934 ../src/guestfs-actions.pod:6071 ../src/guestfs-actions.pod:6128 ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6168 ../src/guestfs-actions.pod:6220 ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:6303 ../src/guestfs-actions.pod:6316 ../src/guestfs-actions.pod:6330 ../src/guestfs-actions.pod:6619 ../src/guestfs-actions.pod:6638 ../src/guestfs-actions.pod:6657 ../src/guestfs-actions.pod:6671 ../src/guestfs-actions.pod:6683 ../src/guestfs-actions.pod:6697 ../src/guestfs-actions.pod:6709 ../src/guestfs-actions.pod:6723 ../src/guestfs-actions.pod:6739 ../src/guestfs-actions.pod:6757 ../src/guestfs-actions.pod:6776 ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:6825 ../src/guestfs-actions.pod:6843 ../src/guestfs-actions.pod:6866 ../src/guestfs-actions.pod:6884 ../src/guestfs-actions.pod:6903 ../src/guestfs-actions.pod:6924 ../src/guestfs-actions.pod:6943 ../src/guestfs-actions.pod:6960 ../src/guestfs-actions.pod:6979 ../src/guestfs-actions.pod:7007 ../src/guestfs-actions.pod:7031 ../src/guestfs-actions.pod:7050 ../src/guestfs-actions.pod:7066 ../src/guestfs-actions.pod:7090 ../src/guestfs-actions.pod:7109 ../src/guestfs-actions.pod:7124 ../src/guestfs-actions.pod:7143 ../src/guestfs-actions.pod:7187 ../src/guestfs-actions.pod:7214 ../src/guestfs-actions.pod:7244 ../src/guestfs-actions.pod:7356 ../src/guestfs-actions.pod:7477 ../src/guestfs-actions.pod:7489 ../src/guestfs-actions.pod:7502 ../src/guestfs-actions.pod:7515 ../src/guestfs-actions.pod:7537 ../src/guestfs-actions.pod:7550 ../src/guestfs-actions.pod:7563 ../src/guestfs-actions.pod:7576 ../src/guestfs-actions.pod:7591 ../src/guestfs-actions.pod:7650 ../src/guestfs-actions.pod:7667 ../src/guestfs-actions.pod:7683 ../src/guestfs-actions.pod:7699 ../src/guestfs-actions.pod:7716 ../src/guestfs-actions.pod:7729 ../src/guestfs-actions.pod:7749 ../src/guestfs-actions.pod:7849 ../src/guestfs-actions.pod:7907 ../src/guestfs-actions.pod:7921 ../src/guestfs-actions.pod:7962 ../src/guestfs-actions.pod:7975 ../src/guestfs-actions.pod:7993 ../src/guestfs-actions.pod:8027 ../src/guestfs-actions.pod:8063 ../src/guestfs-actions.pod:8179 ../src/guestfs-actions.pod:8194 ../src/guestfs-actions.pod:8208 ../src/guestfs-actions.pod:8263 ../src/guestfs-actions.pod:8276 ../src/guestfs-actions.pod:8321 ../src/guestfs-actions.pod:8361 ../src/guestfs-actions.pod:8417 ../src/guestfs-actions.pod:8437 ../src/guestfs-actions.pod:8470 ../src/guestfs-actions.pod:8534 ../src/guestfs-actions.pod:8557 ../src/guestfs-actions.pod:8583
25207 msgid "This function returns 0 on success or -1 on error."
25211 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189 ../src/guestfs-actions.pod:1334 ../src/guestfs-actions.pod:2397 ../src/guestfs-actions.pod:2495 ../src/guestfs-actions.pod:2620 ../src/guestfs-actions.pod:4094 ../src/guestfs-actions.pod:4114 ../src/guestfs-actions.pod:5565 ../src/guestfs-actions.pod:6845 ../src/guestfs-actions.pod:6962 ../src/guestfs-actions.pod:7111 ../src/guestfs-actions.pod:7593 ../src/guestfs-actions.pod:7718 ../src/guestfs-actions.pod:8363
25212 msgid "(Added in 0.3)"
25216 #: ../src/guestfs-actions.pod:41
25217 msgid "guestfs_add_domain"
25221 #: ../src/guestfs-actions.pod:43
25225 " guestfs_add_domain (guestfs_h *g,\n"
25226 " const char *dom,\n"
25232 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198 ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:1214 ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1344 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1466 ../src/guestfs-actions.pod:1519 ../src/guestfs-actions.pod:3288 ../src/guestfs-actions.pod:4882 ../src/guestfs-actions.pod:5266 ../src/guestfs-actions.pod:5575 ../src/guestfs-actions.pod:5792 ../src/guestfs-actions.pod:7760
25234 "You may supply a list of optional arguments to this call. Use zero or more "
25235 "of the following pairs of parameters, and terminate the list with C<-1> on "
25236 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
25240 #: ../src/guestfs-actions.pod:53
25243 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
25244 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
25245 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
25246 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
25247 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
25248 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
25253 #: ../src/guestfs-actions.pod:60
25255 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
25256 "It works by connecting to libvirt, requesting the domain and domain XML from "
25257 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
25262 #: ../src/guestfs-actions.pod:141
25264 "The other optional parameters are passed directly through to "
25265 "C<guestfs_add_drive_opts>."
25269 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403 ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:751 ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800 ../src/guestfs-actions.pod:819 ../src/guestfs-actions.pod:1797 ../src/guestfs-actions.pod:2153 ../src/guestfs-actions.pod:2356 ../src/guestfs-actions.pod:2467 ../src/guestfs-actions.pod:2518 ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2584 ../src/guestfs-actions.pod:2607 ../src/guestfs-actions.pod:2922 ../src/guestfs-actions.pod:3406 ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5968 ../src/guestfs-actions.pod:6206 ../src/guestfs-actions.pod:6400 ../src/guestfs-actions.pod:6426 ../src/guestfs-actions.pod:7948 ../src/guestfs-actions.pod:8374 ../src/guestfs-actions.pod:8387 ../src/guestfs-actions.pod:8400
25270 msgid "On error this function returns -1."
25274 #: ../src/guestfs-actions.pod:146
25275 msgid "(Added in 1.7.4)"
25279 #: ../src/guestfs-actions.pod:148
25280 msgid "guestfs_add_domain_va"
25284 #: ../src/guestfs-actions.pod:150
25288 " guestfs_add_domain_va (guestfs_h *g,\n"
25289 " const char *dom,\n"
25290 " va_list args);\n"
25295 #: ../src/guestfs-actions.pod:155
25296 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
25300 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168 ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:940 ../src/guestfs-actions.pod:1242 ../src/guestfs-actions.pod:1255 ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1391 ../src/guestfs-actions.pod:1403 ../src/guestfs-actions.pod:1444 ../src/guestfs-actions.pod:1456 ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1509 ../src/guestfs-actions.pod:1555 ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:3372 ../src/guestfs-actions.pod:3384 ../src/guestfs-actions.pod:4959 ../src/guestfs-actions.pod:4971 ../src/guestfs-actions.pod:5331 ../src/guestfs-actions.pod:5343 ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:5615 ../src/guestfs-actions.pod:5841 ../src/guestfs-actions.pod:5852 ../src/guestfs-actions.pod:7862 ../src/guestfs-actions.pod:7873
25301 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
25305 #: ../src/guestfs-actions.pod:159
25306 msgid "guestfs_add_domain_argv"
25310 #: ../src/guestfs-actions.pod:161
25314 " guestfs_add_domain_argv (guestfs_h *g,\n"
25315 " const char *dom,\n"
25316 " const struct guestfs_add_domain_argv *optargs);\n"
25321 #: ../src/guestfs-actions.pod:166
25322 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
25326 #: ../src/guestfs-actions.pod:170
25327 msgid "guestfs_add_drive"
25331 #: ../src/guestfs-actions.pod:172
25335 " guestfs_add_drive (guestfs_h *g,\n"
25336 " const char *filename);\n"
25341 #: ../src/guestfs-actions.pod:176
25343 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
25344 "optional parameters, so the disk is added writable, with the format being "
25345 "detected automatically."
25349 #: ../src/guestfs-actions.pod:180
25351 "Automatic detection of the format opens you up to a potential security hole "
25352 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
25353 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
25354 "you should think about replacing calls to this function with calls to "
25355 "C<guestfs_add_drive_opts>, and specifying the format."
25359 #: ../src/guestfs-actions.pod:191
25360 msgid "guestfs_add_drive_opts"
25364 #: ../src/guestfs-actions.pod:193
25368 " guestfs_add_drive_opts (guestfs_h *g,\n"
25369 " const char *filename,\n"
25375 #: ../src/guestfs-actions.pod:203
25378 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
25379 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
25380 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
25381 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
25386 #: ../src/guestfs-actions.pod:233
25388 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
25389 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
25390 "Possible formats include C<raw> and C<qcow2>."
25394 #: ../src/guestfs-actions.pod:244
25396 "This rarely-used option lets you emulate the behaviour of the deprecated "
25397 "C<guestfs_add_drive_with_if> call (q.v.)"
25401 #: ../src/guestfs-actions.pod:256
25402 msgid "(Added in 1.5.23)"
25406 #: ../src/guestfs-actions.pod:258
25407 msgid "guestfs_add_drive_opts_va"
25411 #: ../src/guestfs-actions.pod:260
25415 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
25416 " const char *filename,\n"
25417 " va_list args);\n"
25422 #: ../src/guestfs-actions.pod:265
25423 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
25427 #: ../src/guestfs-actions.pod:269
25428 msgid "guestfs_add_drive_opts_argv"
25432 #: ../src/guestfs-actions.pod:271
25436 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
25437 " const char *filename,\n"
25438 " const struct guestfs_add_drive_opts_argv "
25444 #: ../src/guestfs-actions.pod:276
25445 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
25449 #: ../src/guestfs-actions.pod:280
25450 msgid "guestfs_add_drive_ro"
25454 #: ../src/guestfs-actions.pod:282
25458 " guestfs_add_drive_ro (guestfs_h *g,\n"
25459 " const char *filename);\n"
25464 #: ../src/guestfs-actions.pod:286
25466 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
25467 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
25468 "disk is added read-only, with the format being detected automatically."
25472 #: ../src/guestfs-actions.pod:293
25473 msgid "(Added in 1.0.38)"
25477 #: ../src/guestfs-actions.pod:295
25478 msgid "guestfs_add_drive_ro_with_if"
25482 #: ../src/guestfs-actions.pod:297
25486 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
25487 " const char *filename,\n"
25488 " const char *iface);\n"
25493 #: ../src/guestfs-actions.pod:309
25495 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
25496 "QEMU interface emulation to use at run time."
25500 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335 ../src/guestfs-actions.pod:2881
25501 msgid "(Added in 1.0.84)"
25505 #: ../src/guestfs-actions.pod:316
25506 msgid "guestfs_add_drive_with_if"
25510 #: ../src/guestfs-actions.pod:318
25514 " guestfs_add_drive_with_if (guestfs_h *g,\n"
25515 " const char *filename,\n"
25516 " const char *iface);\n"
25521 #: ../src/guestfs-actions.pod:330
25523 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
25524 "QEMU interface emulation to use at run time."
25528 #: ../src/guestfs-actions.pod:337
25529 msgid "guestfs_aug_clear"
25533 #: ../src/guestfs-actions.pod:339
25537 " guestfs_aug_clear (guestfs_h *g,\n"
25538 " const char *augpath);\n"
25543 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2609
25544 msgid "(Added in 1.3.4)"
25548 #: ../src/guestfs-actions.pod:350
25549 msgid "guestfs_aug_close"
25553 #: ../src/guestfs-actions.pod:352
25557 " guestfs_aug_close (guestfs_h *g);\n"
25562 #: ../src/guestfs-actions.pod:355
25564 "Close the current Augeas handle and free up any resources used by it. After "
25565 "calling this, you have to call C<guestfs_aug_init> again before you can use "
25566 "any other Augeas functions."
25570 #: ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:387 ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:419 ../src/guestfs-actions.pod:482 ../src/guestfs-actions.pod:502 ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:547 ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:575 ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:607 ../src/guestfs-actions.pod:6477
25571 msgid "(Added in 0.7)"
25575 #: ../src/guestfs-actions.pod:364
25576 msgid "guestfs_aug_defnode"
25580 #: ../src/guestfs-actions.pod:366
25583 " struct guestfs_int_bool *\n"
25584 " guestfs_aug_defnode (guestfs_h *g,\n"
25585 " const char *name,\n"
25586 " const char *expr,\n"
25587 " const char *val);\n"
25592 #: ../src/guestfs-actions.pod:375
25594 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25595 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25596 "containing that single node."
25600 #: ../src/guestfs-actions.pod:383
25602 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25603 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25607 #: ../src/guestfs-actions.pod:389
25608 msgid "guestfs_aug_defvar"
25612 #: ../src/guestfs-actions.pod:391
25616 " guestfs_aug_defvar (guestfs_h *g,\n"
25617 " const char *name,\n"
25618 " const char *expr);\n"
25623 #: ../src/guestfs-actions.pod:407
25624 msgid "guestfs_aug_get"
25628 #: ../src/guestfs-actions.pod:409
25632 " guestfs_aug_get (guestfs_h *g,\n"
25633 " const char *augpath);\n"
25638 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:980 ../src/guestfs-actions.pod:998 ../src/guestfs-actions.pod:1058 ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1177 ../src/guestfs-actions.pod:1666 ../src/guestfs-actions.pod:1683 ../src/guestfs-actions.pod:1702 ../src/guestfs-actions.pod:1836 ../src/guestfs-actions.pod:2024 ../src/guestfs-actions.pod:2136 ../src/guestfs-actions.pod:2299 ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2383 ../src/guestfs-actions.pod:2426 ../src/guestfs-actions.pod:2447 ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2846 ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3256 ../src/guestfs-actions.pod:3275 ../src/guestfs-actions.pod:3490 ../src/guestfs-actions.pod:3518 ../src/guestfs-actions.pod:3539 ../src/guestfs-actions.pod:3573 ../src/guestfs-actions.pod:3640 ../src/guestfs-actions.pod:3660 ../src/guestfs-actions.pod:3680 ../src/guestfs-actions.pod:4320 ../src/guestfs-actions.pod:4667 ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:5093 ../src/guestfs-actions.pod:5986 ../src/guestfs-actions.pod:6187 ../src/guestfs-actions.pod:6375 ../src/guestfs-actions.pod:6553 ../src/guestfs-actions.pod:6602 ../src/guestfs-actions.pod:7262 ../src/guestfs-actions.pod:7278 ../src/guestfs-actions.pod:7302 ../src/guestfs-actions.pod:7326 ../src/guestfs-actions.pod:8122 ../src/guestfs-actions.pod:8141 ../src/guestfs-actions.pod:8159 ../src/guestfs-actions.pod:8333 ../src/guestfs-actions.pod:8647
25640 "This function returns a string, or NULL on error. I<The caller must free "
25641 "the returned string after use>."
25645 #: ../src/guestfs-actions.pod:421
25646 msgid "guestfs_aug_init"
25650 #: ../src/guestfs-actions.pod:423
25654 " guestfs_aug_init (guestfs_h *g,\n"
25655 " const char *root,\n"
25661 #: ../src/guestfs-actions.pod:432
25662 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25666 #: ../src/guestfs-actions.pod:457
25668 "This option is only useful when debugging Augeas lenses. Use of this option "
25669 "may require additional memory for the libguestfs appliance. You may need to "
25670 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25671 "C<guestfs_set_memsize>."
25675 #: ../src/guestfs-actions.pod:472
25676 msgid "Do not load the tree in C<guestfs_aug_init>."
25680 #: ../src/guestfs-actions.pod:476
25681 msgid "To close the handle, you can call C<guestfs_aug_close>."
25685 #: ../src/guestfs-actions.pod:484
25686 msgid "guestfs_aug_insert"
25690 #: ../src/guestfs-actions.pod:486
25694 " guestfs_aug_insert (guestfs_h *g,\n"
25695 " const char *augpath,\n"
25696 " const char *label,\n"
25702 #: ../src/guestfs-actions.pod:504
25703 msgid "guestfs_aug_load"
25707 #: ../src/guestfs-actions.pod:506
25711 " guestfs_aug_load (guestfs_h *g);\n"
25716 #: ../src/guestfs-actions.pod:518
25717 msgid "guestfs_aug_ls"
25721 #: ../src/guestfs-actions.pod:520
25725 " guestfs_aug_ls (guestfs_h *g,\n"
25726 " const char *augpath);\n"
25731 #: ../src/guestfs-actions.pod:524
25733 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25734 "sorting the resulting nodes into alphabetical order."
25738 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543 ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1196 ../src/guestfs-actions.pod:1851 ../src/guestfs-actions.pod:1870 ../src/guestfs-actions.pod:1973 ../src/guestfs-actions.pod:1992 ../src/guestfs-actions.pod:2238 ../src/guestfs-actions.pod:2704 ../src/guestfs-actions.pod:2720 ../src/guestfs-actions.pod:2739 ../src/guestfs-actions.pod:2804 ../src/guestfs-actions.pod:2828 ../src/guestfs-actions.pod:2899 ../src/guestfs-actions.pod:2948 ../src/guestfs-actions.pod:3217 ../src/guestfs-actions.pod:3592 ../src/guestfs-actions.pod:3876 ../src/guestfs-actions.pod:4190 ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:4282 ../src/guestfs-actions.pod:4302 ../src/guestfs-actions.pod:4407 ../src/guestfs-actions.pod:4806 ../src/guestfs-actions.pod:5712 ../src/guestfs-actions.pod:6347 ../src/guestfs-actions.pod:6473 ../src/guestfs-actions.pod:6587 ../src/guestfs-actions.pod:7342 ../src/guestfs-actions.pod:7403 ../src/guestfs-actions.pod:7458 ../src/guestfs-actions.pod:7604 ../src/guestfs-actions.pod:7628 ../src/guestfs-actions.pod:8226 ../src/guestfs-actions.pod:8246 ../src/guestfs-actions.pod:8293 ../src/guestfs-actions.pod:8487 ../src/guestfs-actions.pod:8506 ../src/guestfs-actions.pod:8597 ../src/guestfs-actions.pod:8616 ../src/guestfs-actions.pod:8662 ../src/guestfs-actions.pod:8681
25740 "This function returns a NULL-terminated array of strings (like "
25741 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
25742 "strings and the array after use>."
25746 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1121 ../src/guestfs-actions.pod:1139 ../src/guestfs-actions.pod:1908 ../src/guestfs-actions.pod:3954 ../src/guestfs-actions.pod:3985 ../src/guestfs-actions.pod:4650 ../src/guestfs-actions.pod:4697 ../src/guestfs-actions.pod:5033 ../src/guestfs-actions.pod:5066 ../src/guestfs-actions.pod:5229 ../src/guestfs-actions.pod:5716 ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:6685 ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:6711 ../src/guestfs-actions.pod:7189 ../src/guestfs-actions.pod:7964 ../src/guestfs-actions.pod:7977 ../src/guestfs-actions.pod:8210 ../src/guestfs-actions.pod:8475
25747 msgid "(Added in 0.8)"
25751 #: ../src/guestfs-actions.pod:533
25752 msgid "guestfs_aug_match"
25756 #: ../src/guestfs-actions.pod:535
25760 " guestfs_aug_match (guestfs_h *g,\n"
25761 " const char *augpath);\n"
25766 #: ../src/guestfs-actions.pod:549
25767 msgid "guestfs_aug_mv"
25771 #: ../src/guestfs-actions.pod:551
25775 " guestfs_aug_mv (guestfs_h *g,\n"
25776 " const char *src,\n"
25777 " const char *dest);\n"
25782 #: ../src/guestfs-actions.pod:563
25783 msgid "guestfs_aug_rm"
25787 #: ../src/guestfs-actions.pod:565
25791 " guestfs_aug_rm (guestfs_h *g,\n"
25792 " const char *augpath);\n"
25797 #: ../src/guestfs-actions.pod:577
25798 msgid "guestfs_aug_save"
25802 #: ../src/guestfs-actions.pod:579
25806 " guestfs_aug_save (guestfs_h *g);\n"
25811 #: ../src/guestfs-actions.pod:584
25813 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25818 #: ../src/guestfs-actions.pod:591
25819 msgid "guestfs_aug_set"
25823 #: ../src/guestfs-actions.pod:593
25827 " guestfs_aug_set (guestfs_h *g,\n"
25828 " const char *augpath,\n"
25829 " const char *val);\n"
25834 #: ../src/guestfs-actions.pod:600
25836 "In the Augeas API, it is possible to clear a node by setting the value to "
25837 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25838 "this call. Instead you must use the C<guestfs_aug_clear> call."
25842 #: ../src/guestfs-actions.pod:609
25843 msgid "guestfs_available"
25847 #: ../src/guestfs-actions.pod:611
25851 " guestfs_available (guestfs_h *g,\n"
25852 " char *const *groups);\n"
25857 #: ../src/guestfs-actions.pod:619
25859 "The libguestfs groups, and the functions that those groups correspond to, "
25860 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25861 "runtime by calling C<guestfs_available_all_groups>."
25865 #: ../src/guestfs-actions.pod:643
25866 msgid "You must call C<guestfs_launch> before calling this function."
25870 #: ../src/guestfs-actions.pod:665
25872 "This call was added in version C<1.0.80>. In previous versions of "
25873 "libguestfs all you could do would be to speculatively execute a command to "
25874 "find out if the daemon implemented it. See also C<guestfs_version>."
25878 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1653
25879 msgid "(Added in 1.0.80)"
25883 #: ../src/guestfs-actions.pod:676
25884 msgid "guestfs_available_all_groups"
25888 #: ../src/guestfs-actions.pod:678
25892 " guestfs_available_all_groups (guestfs_h *g);\n"
25897 #: ../src/guestfs-actions.pod:681
25899 "This command returns a list of all optional groups that this daemon knows "
25900 "about. Note this returns both supported and unsupported groups. To find "
25901 "out which ones the daemon can actually support you have to call "
25902 "C<guestfs_available> on each member of the returned list."
25906 #: ../src/guestfs-actions.pod:687
25907 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25911 #: ../src/guestfs-actions.pod:693
25912 msgid "(Added in 1.3.15)"
25916 #: ../src/guestfs-actions.pod:695
25917 msgid "guestfs_base64_in"
25921 #: ../src/guestfs-actions.pod:697
25925 " guestfs_base64_in (guestfs_h *g,\n"
25926 " const char *base64file,\n"
25927 " const char *filename);\n"
25932 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25933 msgid "(Added in 1.3.5)"
25937 #: ../src/guestfs-actions.pod:709
25938 msgid "guestfs_base64_out"
25942 #: ../src/guestfs-actions.pod:711
25946 " guestfs_base64_out (guestfs_h *g,\n"
25947 " const char *filename,\n"
25948 " const char *base64file);\n"
25953 #: ../src/guestfs-actions.pod:723
25954 msgid "guestfs_blockdev_flushbufs"
25958 #: ../src/guestfs-actions.pod:725
25962 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25963 " const char *device);\n"
25968 #: ../src/guestfs-actions.pod:736 ../src/guestfs-actions.pod:753 ../src/guestfs-actions.pod:768 ../src/guestfs-actions.pod:784 ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:821 ../src/guestfs-actions.pod:835 ../src/guestfs-actions.pod:853 ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:881
25969 msgid "(Added in 0.9.3)"
25973 #: ../src/guestfs-actions.pod:738
25974 msgid "guestfs_blockdev_getbsz"
25978 #: ../src/guestfs-actions.pod:740
25982 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25983 " const char *device);\n"
25988 #: ../src/guestfs-actions.pod:755
25989 msgid "guestfs_blockdev_getro"
25993 #: ../src/guestfs-actions.pod:757
25997 " guestfs_blockdev_getro (guestfs_h *g,\n"
25998 " const char *device);\n"
26003 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1891 ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:2395 ../src/guestfs-actions.pod:2406 ../src/guestfs-actions.pod:2478 ../src/guestfs-actions.pod:2504 ../src/guestfs-actions.pod:2544 ../src/guestfs-actions.pod:2559 ../src/guestfs-actions.pod:2595 ../src/guestfs-actions.pod:2618 ../src/guestfs-actions.pod:3697 ../src/guestfs-actions.pod:3713 ../src/guestfs-actions.pod:3731 ../src/guestfs-actions.pod:3893 ../src/guestfs-actions.pod:3907 ../src/guestfs-actions.pod:3922 ../src/guestfs-actions.pod:3936 ../src/guestfs-actions.pod:3952 ../src/guestfs-actions.pod:3967 ../src/guestfs-actions.pod:3983 ../src/guestfs-actions.pod:3997 ../src/guestfs-actions.pod:4010 ../src/guestfs-actions.pod:4024 ../src/guestfs-actions.pod:4039 ../src/guestfs-actions.pod:4054 ../src/guestfs-actions.pod:4067 ../src/guestfs-actions.pod:4081 ../src/guestfs-actions.pod:5950
26004 msgid "This function returns a C truth value on success or -1 on error."
26008 #: ../src/guestfs-actions.pod:770
26009 msgid "guestfs_blockdev_getsize64"
26013 #: ../src/guestfs-actions.pod:772
26017 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
26018 " const char *device);\n"
26023 #: ../src/guestfs-actions.pod:778
26024 msgid "See also C<guestfs_blockdev_getsz>."
26028 #: ../src/guestfs-actions.pod:786
26029 msgid "guestfs_blockdev_getss"
26033 #: ../src/guestfs-actions.pod:788
26037 " guestfs_blockdev_getss (guestfs_h *g,\n"
26038 " const char *device);\n"
26043 #: ../src/guestfs-actions.pod:795
26045 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
26050 #: ../src/guestfs-actions.pod:804
26051 msgid "guestfs_blockdev_getsz"
26055 #: ../src/guestfs-actions.pod:806
26059 " guestfs_blockdev_getsz (guestfs_h *g,\n"
26060 " const char *device);\n"
26065 #: ../src/guestfs-actions.pod:813
26067 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
26068 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
26072 #: ../src/guestfs-actions.pod:823
26073 msgid "guestfs_blockdev_rereadpt"
26077 #: ../src/guestfs-actions.pod:825
26081 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
26082 " const char *device);\n"
26087 #: ../src/guestfs-actions.pod:837
26088 msgid "guestfs_blockdev_setbsz"
26092 #: ../src/guestfs-actions.pod:839
26096 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
26097 " const char *device,\n"
26098 " int blocksize);\n"
26103 #: ../src/guestfs-actions.pod:855
26104 msgid "guestfs_blockdev_setro"
26108 #: ../src/guestfs-actions.pod:857
26112 " guestfs_blockdev_setro (guestfs_h *g,\n"
26113 " const char *device);\n"
26118 #: ../src/guestfs-actions.pod:869
26119 msgid "guestfs_blockdev_setrw"
26123 #: ../src/guestfs-actions.pod:871
26127 " guestfs_blockdev_setrw (guestfs_h *g,\n"
26128 " const char *device);\n"
26133 #: ../src/guestfs-actions.pod:883
26134 msgid "guestfs_btrfs_filesystem_resize"
26138 #: ../src/guestfs-actions.pod:885
26142 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
26143 " const char *mountpoint,\n"
26149 #: ../src/guestfs-actions.pod:895
26152 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
26157 #: ../src/guestfs-actions.pod:918
26158 msgid "(Added in 1.11.17)"
26162 #: ../src/guestfs-actions.pod:920
26163 msgid "guestfs_btrfs_filesystem_resize_va"
26167 #: ../src/guestfs-actions.pod:922
26171 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
26172 " const char *mountpoint,\n"
26173 " va_list args);\n"
26178 #: ../src/guestfs-actions.pod:927
26179 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
26183 #: ../src/guestfs-actions.pod:931
26184 msgid "guestfs_btrfs_filesystem_resize_argv"
26188 #: ../src/guestfs-actions.pod:933
26192 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
26193 " const char *mountpoint,\n"
26195 "guestfs_btrfs_filesystem_resize_argv *optargs);\n"
26200 #: ../src/guestfs-actions.pod:938
26201 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
26205 #: ../src/guestfs-actions.pod:942
26206 msgid "guestfs_case_sensitive_path"
26210 #: ../src/guestfs-actions.pod:944
26214 " guestfs_case_sensitive_path (guestfs_h *g,\n"
26215 " const char *path);\n"
26220 #: ../src/guestfs-actions.pod:970
26222 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
26223 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
26224 "how the directories were originally created under Windows)."
26228 #: ../src/guestfs-actions.pod:978
26229 msgid "See also C<guestfs_realpath>."
26233 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:8144
26234 msgid "(Added in 1.0.75)"
26238 #: ../src/guestfs-actions.pod:985
26239 msgid "guestfs_cat"
26243 #: ../src/guestfs-actions.pod:987
26247 " guestfs_cat (guestfs_h *g,\n"
26248 " const char *path);\n"
26253 #: ../src/guestfs-actions.pod:993
26255 "Note that this function cannot correctly handle binary files (specifically, "
26256 "files containing C<\\0> character which is treated as end of string). For "
26257 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
26258 "functions which have a more complex interface."
26262 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4211 ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:4323 ../src/guestfs-actions.pod:4411 ../src/guestfs-actions.pod:4810 ../src/guestfs-actions.pod:4824 ../src/guestfs-actions.pod:6351 ../src/guestfs-actions.pod:6365 ../src/guestfs-actions.pod:8297 ../src/guestfs-actions.pod:8311
26263 msgid "(Added in 0.4)"
26267 #: ../src/guestfs-actions.pod:1006
26268 msgid "guestfs_checksum"
26272 #: ../src/guestfs-actions.pod:1008
26276 " guestfs_checksum (guestfs_h *g,\n"
26277 " const char *csumtype,\n"
26278 " const char *path);\n"
26283 #: ../src/guestfs-actions.pod:1054
26284 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
26288 #: ../src/guestfs-actions.pod:1056
26289 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
26293 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1728 ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3938 ../src/guestfs-actions.pod:3999 ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:8000
26294 msgid "(Added in 1.0.2)"
26298 #: ../src/guestfs-actions.pod:1063
26299 msgid "guestfs_checksum_device"
26303 #: ../src/guestfs-actions.pod:1065
26307 " guestfs_checksum_device (guestfs_h *g,\n"
26308 " const char *csumtype,\n"
26309 " const char *device);\n"
26314 #: ../src/guestfs-actions.pod:1070
26316 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
26317 "device named C<device>. For the types of checksums supported see the "
26318 "C<guestfs_checksum> command."
26322 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5783 ../src/guestfs-actions.pod:5918 ../src/guestfs-actions.pod:5952 ../src/guestfs-actions.pod:5970 ../src/guestfs-actions.pod:6152 ../src/guestfs-actions.pod:7909 ../src/guestfs-actions.pod:7923 ../src/guestfs-actions.pod:8323
26323 msgid "(Added in 1.3.2)"
26327 #: ../src/guestfs-actions.pod:1079
26328 msgid "guestfs_checksums_out"
26332 #: ../src/guestfs-actions.pod:1081
26336 " guestfs_checksums_out (guestfs_h *g,\n"
26337 " const char *csumtype,\n"
26338 " const char *directory,\n"
26339 " const char *sumsfile);\n"
26344 #: ../src/guestfs-actions.pod:1101
26345 msgid "(Added in 1.3.7)"
26349 #: ../src/guestfs-actions.pod:1103
26350 msgid "guestfs_chmod"
26354 #: ../src/guestfs-actions.pod:1105
26358 " guestfs_chmod (guestfs_h *g,\n"
26360 " const char *path);\n"
26365 #: ../src/guestfs-actions.pod:1123
26366 msgid "guestfs_chown"
26370 #: ../src/guestfs-actions.pod:1125
26374 " guestfs_chown (guestfs_h *g,\n"
26377 " const char *path);\n"
26382 #: ../src/guestfs-actions.pod:1141
26383 msgid "guestfs_command"
26387 #: ../src/guestfs-actions.pod:1143
26391 " guestfs_command (guestfs_h *g,\n"
26392 " char *const *arguments);\n"
26397 #: ../src/guestfs-actions.pod:1152
26399 "The single parameter is an argv-style list of arguments. The first element "
26400 "is the name of the program to run. Subsequent elements are parameters. The "
26401 "list must be non-empty (ie. must contain a program name). Note that the "
26402 "command runs directly, and is I<not> invoked via the shell (see "
26407 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203 ../src/guestfs-actions.pod:2027
26408 msgid "(Added in 0.9.1)"
26412 #: ../src/guestfs-actions.pod:1185
26413 msgid "guestfs_command_lines"
26417 #: ../src/guestfs-actions.pod:1187
26421 " guestfs_command_lines (guestfs_h *g,\n"
26422 " char *const *arguments);\n"
26427 #: ../src/guestfs-actions.pod:1191
26429 "This is the same as C<guestfs_command>, but splits the result into a list of "
26434 #: ../src/guestfs-actions.pod:1194
26435 msgid "See also: C<guestfs_sh_lines>"
26439 #: ../src/guestfs-actions.pod:1205
26440 msgid "guestfs_compress_device_out"
26444 #: ../src/guestfs-actions.pod:1207
26448 " guestfs_compress_device_out (guestfs_h *g,\n"
26449 " const char *ctype,\n"
26450 " const char *device,\n"
26451 " const char *zdevice,\n"
26457 #: ../src/guestfs-actions.pod:1219
26460 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
26465 #: ../src/guestfs-actions.pod:1224
26467 "The C<ctype> and optional C<level> parameters have the same meaning as in "
26468 "C<guestfs_compress_out>."
26472 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288 ../src/guestfs-actions.pod:2572 ../src/guestfs-actions.pod:7068
26473 msgid "(Added in 1.13.15)"
26477 #: ../src/guestfs-actions.pod:1231
26478 msgid "guestfs_compress_device_out_va"
26482 #: ../src/guestfs-actions.pod:1233
26486 " guestfs_compress_device_out_va (guestfs_h *g,\n"
26487 " const char *ctype,\n"
26488 " const char *device,\n"
26489 " const char *zdevice,\n"
26490 " va_list args);\n"
26495 #: ../src/guestfs-actions.pod:1240
26496 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
26500 #: ../src/guestfs-actions.pod:1244
26501 msgid "guestfs_compress_device_out_argv"
26505 #: ../src/guestfs-actions.pod:1246
26509 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
26510 " const char *ctype,\n"
26511 " const char *device,\n"
26512 " const char *zdevice,\n"
26514 "guestfs_compress_device_out_argv *optargs);\n"
26519 #: ../src/guestfs-actions.pod:1253
26520 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
26524 #: ../src/guestfs-actions.pod:1257
26525 msgid "guestfs_compress_out"
26529 #: ../src/guestfs-actions.pod:1259
26533 " guestfs_compress_out (guestfs_h *g,\n"
26534 " const char *ctype,\n"
26535 " const char *file,\n"
26536 " const char *zfile,\n"
26542 #: ../src/guestfs-actions.pod:1271
26545 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26550 #: ../src/guestfs-actions.pod:1290
26551 msgid "guestfs_compress_out_va"
26555 #: ../src/guestfs-actions.pod:1292
26559 " guestfs_compress_out_va (guestfs_h *g,\n"
26560 " const char *ctype,\n"
26561 " const char *file,\n"
26562 " const char *zfile,\n"
26563 " va_list args);\n"
26568 #: ../src/guestfs-actions.pod:1299
26569 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26573 #: ../src/guestfs-actions.pod:1303
26574 msgid "guestfs_compress_out_argv"
26578 #: ../src/guestfs-actions.pod:1305
26582 " guestfs_compress_out_argv (guestfs_h *g,\n"
26583 " const char *ctype,\n"
26584 " const char *file,\n"
26585 " const char *zfile,\n"
26586 " const struct guestfs_compress_out_argv "
26592 #: ../src/guestfs-actions.pod:1312
26593 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26597 #: ../src/guestfs-actions.pod:1316
26598 msgid "guestfs_config"
26602 #: ../src/guestfs-actions.pod:1318
26606 " guestfs_config (guestfs_h *g,\n"
26607 " const char *qemuparam,\n"
26608 " const char *qemuvalue);\n"
26613 #: ../src/guestfs-actions.pod:1336
26614 msgid "guestfs_copy_device_to_device"
26618 #: ../src/guestfs-actions.pod:1338
26622 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26623 " const char *src,\n"
26624 " const char *dest,\n"
26630 #: ../src/guestfs-actions.pod:1349
26633 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26634 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26635 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26640 #: ../src/guestfs-actions.pod:1353
26642 "The four calls C<guestfs_copy_device_to_device>, "
26643 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26644 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26645 "destination (device|file)."
26649 #: ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1427 ../src/guestfs-actions.pod:1480 ../src/guestfs-actions.pod:1538 ../src/guestfs-actions.pod:1592 ../src/guestfs-actions.pod:1723 ../src/guestfs-actions.pod:1754 ../src/guestfs-actions.pod:1799 ../src/guestfs-actions.pod:2176 ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:4109 ../src/guestfs-actions.pod:7995 ../src/guestfs-actions.pod:8029 ../src/guestfs-actions.pod:8536 ../src/guestfs-actions.pod:8559
26651 "This long-running command can generate progress notification messages so "
26652 "that the caller can display a progress bar or indicator. To receive these "
26653 "messages, the caller must register a progress event callback. See "
26654 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
26658 #: ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1543 ../src/guestfs-actions.pod:6208
26659 msgid "(Added in 1.13.25)"
26663 #: ../src/guestfs-actions.pod:1381
26664 msgid "guestfs_copy_device_to_device_va"
26668 #: ../src/guestfs-actions.pod:1383
26672 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26673 " const char *src,\n"
26674 " const char *dest,\n"
26675 " va_list args);\n"
26680 #: ../src/guestfs-actions.pod:1389
26681 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26685 #: ../src/guestfs-actions.pod:1393
26686 msgid "guestfs_copy_device_to_device_argv"
26690 #: ../src/guestfs-actions.pod:1395
26694 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26695 " const char *src,\n"
26696 " const char *dest,\n"
26698 "guestfs_copy_device_to_device_argv *optargs);\n"
26703 #: ../src/guestfs-actions.pod:1401
26704 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26708 #: ../src/guestfs-actions.pod:1405
26709 msgid "guestfs_copy_device_to_file"
26713 #: ../src/guestfs-actions.pod:1407
26717 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26718 " const char *src,\n"
26719 " const char *dest,\n"
26725 #: ../src/guestfs-actions.pod:1418
26728 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26729 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26730 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26735 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1475 ../src/guestfs-actions.pod:1528
26736 msgid "See C<guestfs_copy_device_to_device> for a general overview of this call."
26740 #: ../src/guestfs-actions.pod:1434
26741 msgid "guestfs_copy_device_to_file_va"
26745 #: ../src/guestfs-actions.pod:1436
26749 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26750 " const char *src,\n"
26751 " const char *dest,\n"
26752 " va_list args);\n"
26757 #: ../src/guestfs-actions.pod:1442
26758 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26762 #: ../src/guestfs-actions.pod:1446
26763 msgid "guestfs_copy_device_to_file_argv"
26767 #: ../src/guestfs-actions.pod:1448
26771 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26772 " const char *src,\n"
26773 " const char *dest,\n"
26775 "guestfs_copy_device_to_file_argv *optargs);\n"
26780 #: ../src/guestfs-actions.pod:1454
26781 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26785 #: ../src/guestfs-actions.pod:1458
26786 msgid "guestfs_copy_file_to_device"
26790 #: ../src/guestfs-actions.pod:1460
26794 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26795 " const char *src,\n"
26796 " const char *dest,\n"
26802 #: ../src/guestfs-actions.pod:1471
26805 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26806 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26807 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26812 #: ../src/guestfs-actions.pod:1487
26813 msgid "guestfs_copy_file_to_device_va"
26817 #: ../src/guestfs-actions.pod:1489
26821 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26822 " const char *src,\n"
26823 " const char *dest,\n"
26824 " va_list args);\n"
26829 #: ../src/guestfs-actions.pod:1495
26830 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26834 #: ../src/guestfs-actions.pod:1499
26835 msgid "guestfs_copy_file_to_device_argv"
26839 #: ../src/guestfs-actions.pod:1501
26843 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26844 " const char *src,\n"
26845 " const char *dest,\n"
26847 "guestfs_copy_file_to_device_argv *optargs);\n"
26852 #: ../src/guestfs-actions.pod:1507
26853 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26857 #: ../src/guestfs-actions.pod:1511
26858 msgid "guestfs_copy_file_to_file"
26862 #: ../src/guestfs-actions.pod:1513
26866 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26867 " const char *src,\n"
26868 " const char *dest,\n"
26874 #: ../src/guestfs-actions.pod:1524
26877 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26878 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26879 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26884 #: ../src/guestfs-actions.pod:1531
26886 "This is B<not> the function you want for copying files. This is for copying "
26887 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26888 "C<guestfs_mv> for general file copying and moving functions."
26892 #: ../src/guestfs-actions.pod:1545
26893 msgid "guestfs_copy_file_to_file_va"
26897 #: ../src/guestfs-actions.pod:1547
26901 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26902 " const char *src,\n"
26903 " const char *dest,\n"
26904 " va_list args);\n"
26909 #: ../src/guestfs-actions.pod:1553
26910 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26914 #: ../src/guestfs-actions.pod:1557
26915 msgid "guestfs_copy_file_to_file_argv"
26919 #: ../src/guestfs-actions.pod:1559
26923 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26924 " const char *src,\n"
26925 " const char *dest,\n"
26926 " const struct guestfs_copy_file_to_file_argv "
26932 #: ../src/guestfs-actions.pod:1565
26933 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26937 #: ../src/guestfs-actions.pod:1569
26938 msgid "guestfs_copy_size"
26942 #: ../src/guestfs-actions.pod:1571
26946 " guestfs_copy_size (guestfs_h *g,\n"
26947 " const char *src,\n"
26948 " const char *dest,\n"
26949 " int64_t size);\n"
26954 #: ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1634
26956 "I<This function is deprecated.> In new code, use the "
26957 "L</guestfs_copy_device_to_device> call instead."
26961 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:4837 ../src/guestfs-actions.pod:6378 ../src/guestfs-actions.pod:8230 ../src/guestfs-actions.pod:8250 ../src/guestfs-actions.pod:8336
26962 msgid "(Added in 1.0.87)"
26966 #: ../src/guestfs-actions.pod:1599
26971 #: ../src/guestfs-actions.pod:1601
26975 " guestfs_cp (guestfs_h *g,\n"
26976 " const char *src,\n"
26977 " const char *dest);\n"
26982 #: ../src/guestfs-actions.pod:1611 ../src/guestfs-actions.pod:1625 ../src/guestfs-actions.pod:1705 ../src/guestfs-actions.pod:1779 ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:5730 ../src/guestfs-actions.pod:6222
26983 msgid "(Added in 1.0.18)"
26987 #: ../src/guestfs-actions.pod:1613
26988 msgid "guestfs_cp_a"
26992 #: ../src/guestfs-actions.pod:1615
26996 " guestfs_cp_a (guestfs_h *g,\n"
26997 " const char *src,\n"
26998 " const char *dest);\n"
27003 #: ../src/guestfs-actions.pod:1627
27008 #: ../src/guestfs-actions.pod:1629
27012 " guestfs_dd (guestfs_h *g,\n"
27013 " const char *src,\n"
27014 " const char *dest);\n"
27019 #: ../src/guestfs-actions.pod:1646
27021 "If the destination is a device, it must be as large or larger than the "
27022 "source file or device, otherwise the copy will fail. This command cannot do "
27023 "partial copies (see C<guestfs_copy_device_to_device>)."
27027 #: ../src/guestfs-actions.pod:1655
27032 #: ../src/guestfs-actions.pod:1657
27036 " guestfs_df (guestfs_h *g);\n"
27041 #: ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1679
27043 "This command is mostly useful for interactive sessions. It is I<not> "
27044 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
27049 #: ../src/guestfs-actions.pod:1669 ../src/guestfs-actions.pod:1686 ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:2811 ../src/guestfs-actions.pod:2835 ../src/guestfs-actions.pod:2903 ../src/guestfs-actions.pod:5096 ../src/guestfs-actions.pod:5630 ../src/guestfs-actions.pod:7611 ../src/guestfs-actions.pod:7635 ../src/guestfs-actions.pod:8376 ../src/guestfs-actions.pod:8389 ../src/guestfs-actions.pod:8402
27050 msgid "(Added in 1.0.54)"
27054 #: ../src/guestfs-actions.pod:1671
27055 msgid "guestfs_df_h"
27059 #: ../src/guestfs-actions.pod:1673
27063 " guestfs_df_h (guestfs_h *g);\n"
27068 #: ../src/guestfs-actions.pod:1688
27069 msgid "guestfs_dmesg"
27073 #: ../src/guestfs-actions.pod:1690
27077 " guestfs_dmesg (guestfs_h *g);\n"
27082 #: ../src/guestfs-actions.pod:1697
27084 "Another way to get the same information is to enable verbose messages with "
27085 "C<guestfs_set_verbose> or by setting the environment variable "
27086 "C<LIBGUESTFS_DEBUG=1> before running the program."
27090 #: ../src/guestfs-actions.pod:1707
27091 msgid "guestfs_download"
27095 #: ../src/guestfs-actions.pod:1709
27099 " guestfs_download (guestfs_h *g,\n"
27100 " const char *remotefilename,\n"
27101 " const char *filename);\n"
27106 #: ../src/guestfs-actions.pod:1719
27107 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
27111 #: ../src/guestfs-actions.pod:1730
27112 msgid "guestfs_download_offset"
27116 #: ../src/guestfs-actions.pod:1732
27120 " guestfs_download_offset (guestfs_h *g,\n"
27121 " const char *remotefilename,\n"
27122 " const char *filename,\n"
27123 " int64_t offset,\n"
27124 " int64_t size);\n"
27129 #: ../src/guestfs-actions.pod:1745
27131 "Note that there is no limit on the amount of data that can be downloaded "
27132 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
27133 "full amount unless an error occurs."
27137 #: ../src/guestfs-actions.pod:1750
27138 msgid "See also C<guestfs_download>, C<guestfs_pread>."
27142 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:8034
27143 msgid "(Added in 1.5.17)"
27147 #: ../src/guestfs-actions.pod:1761
27148 msgid "guestfs_drop_caches"
27152 #: ../src/guestfs-actions.pod:1763
27156 " guestfs_drop_caches (guestfs_h *g,\n"
27157 " int whattodrop);\n"
27162 #: ../src/guestfs-actions.pod:1781
27167 #: ../src/guestfs-actions.pod:1783
27171 " guestfs_du (guestfs_h *g,\n"
27172 " const char *path);\n"
27177 #: ../src/guestfs-actions.pod:1806
27178 msgid "guestfs_e2fsck_f"
27182 #: ../src/guestfs-actions.pod:1808
27186 " guestfs_e2fsck_f (guestfs_h *g,\n"
27187 " const char *device);\n"
27192 #: ../src/guestfs-actions.pod:1816
27194 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
27195 "Normally you should use C<guestfs_fsck>."
27199 #: ../src/guestfs-actions.pod:1821
27200 msgid "(Added in 1.0.29)"
27204 #: ../src/guestfs-actions.pod:1823
27205 msgid "guestfs_echo_daemon"
27209 #: ../src/guestfs-actions.pod:1825
27213 " guestfs_echo_daemon (guestfs_h *g,\n"
27214 " char *const *words);\n"
27219 #: ../src/guestfs-actions.pod:1834
27220 msgid "See also C<guestfs_ping_daemon>."
27224 #: ../src/guestfs-actions.pod:1839 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:7092
27225 msgid "(Added in 1.0.69)"
27229 #: ../src/guestfs-actions.pod:1841
27230 msgid "guestfs_egrep"
27234 #: ../src/guestfs-actions.pod:1843
27238 " guestfs_egrep (guestfs_h *g,\n"
27239 " const char *regex,\n"
27240 " const char *path);\n"
27245 #: ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:1877 ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:1980 ../src/guestfs-actions.pod:1999 ../src/guestfs-actions.pod:2727 ../src/guestfs-actions.pod:2746 ../src/guestfs-actions.pod:2924 ../src/guestfs-actions.pod:2937 ../src/guestfs-actions.pod:2952 ../src/guestfs-actions.pod:2998 ../src/guestfs-actions.pod:3020 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:4336 ../src/guestfs-actions.pod:4350 ../src/guestfs-actions.pod:4363 ../src/guestfs-actions.pod:4377 ../src/guestfs-actions.pod:5518 ../src/guestfs-actions.pod:6556 ../src/guestfs-actions.pod:6605 ../src/guestfs-actions.pod:7479 ../src/guestfs-actions.pod:7491 ../src/guestfs-actions.pod:7504 ../src/guestfs-actions.pod:7517 ../src/guestfs-actions.pod:7539 ../src/guestfs-actions.pod:7552 ../src/guestfs-actions.pod:7565 ../src/guestfs-actions.pod:7578 ../src/guestfs-actions.pod:8494 ../src/guestfs-actions.pod:8513 ../src/guestfs-actions.pod:8604 ../src/guestfs-actions.pod:8623 ../src/guestfs-actions.pod:8669 ../src/guestfs-actions.pod:8688
27246 msgid "(Added in 1.0.66)"
27250 #: ../src/guestfs-actions.pod:1860
27251 msgid "guestfs_egrepi"
27255 #: ../src/guestfs-actions.pod:1862
27259 " guestfs_egrepi (guestfs_h *g,\n"
27260 " const char *regex,\n"
27261 " const char *path);\n"
27266 #: ../src/guestfs-actions.pod:1879
27267 msgid "guestfs_equal"
27271 #: ../src/guestfs-actions.pod:1881
27275 " guestfs_equal (guestfs_h *g,\n"
27276 " const char *file1,\n"
27277 " const char *file2);\n"
27282 #: ../src/guestfs-actions.pod:1895
27283 msgid "guestfs_exists"
27287 #: ../src/guestfs-actions.pod:1897
27291 " guestfs_exists (guestfs_h *g,\n"
27292 " const char *path);\n"
27297 #: ../src/guestfs-actions.pod:1904
27298 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
27302 #: ../src/guestfs-actions.pod:1910
27303 msgid "guestfs_fallocate"
27307 #: ../src/guestfs-actions.pod:1912
27311 " guestfs_fallocate (guestfs_h *g,\n"
27312 " const char *path,\n"
27318 #: ../src/guestfs-actions.pod:1917
27320 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
27325 #: ../src/guestfs-actions.pod:1936
27326 msgid "guestfs_fallocate64"
27330 #: ../src/guestfs-actions.pod:1938
27334 " guestfs_fallocate64 (guestfs_h *g,\n"
27335 " const char *path,\n"
27341 #: ../src/guestfs-actions.pod:1947
27343 "Note that this call allocates disk blocks for the file. To create a sparse "
27344 "file use C<guestfs_truncate_size> instead."
27348 #: ../src/guestfs-actions.pod:1950
27350 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
27351 "oversight it only allowed 30 bit lengths to be specified, effectively "
27352 "limiting the maximum size of files created through that call to 1GB."
27356 #: ../src/guestfs-actions.pod:1961
27357 msgid "(Added in 1.3.17)"
27361 #: ../src/guestfs-actions.pod:1963
27362 msgid "guestfs_fgrep"
27366 #: ../src/guestfs-actions.pod:1965
27370 " guestfs_fgrep (guestfs_h *g,\n"
27371 " const char *pattern,\n"
27372 " const char *path);\n"
27377 #: ../src/guestfs-actions.pod:1982
27378 msgid "guestfs_fgrepi"
27382 #: ../src/guestfs-actions.pod:1984
27386 " guestfs_fgrepi (guestfs_h *g,\n"
27387 " const char *pattern,\n"
27388 " const char *path);\n"
27393 #: ../src/guestfs-actions.pod:2001
27394 msgid "guestfs_file"
27398 #: ../src/guestfs-actions.pod:2003
27402 " guestfs_file (guestfs_h *g,\n"
27403 " const char *path);\n"
27408 #: ../src/guestfs-actions.pod:2021
27410 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
27411 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
27415 #: ../src/guestfs-actions.pod:2029
27416 msgid "guestfs_file_architecture"
27420 #: ../src/guestfs-actions.pod:2031
27424 " guestfs_file_architecture (guestfs_h *g,\n"
27425 " const char *filename);\n"
27430 #: ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:2302 ../src/guestfs-actions.pod:2319 ../src/guestfs-actions.pod:3053 ../src/guestfs-actions.pod:3155 ../src/guestfs-actions.pod:3221 ../src/guestfs-actions.pod:3408 ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3542 ../src/guestfs-actions.pod:3643 ../src/guestfs-actions.pod:3880 ../src/guestfs-actions.pod:4012
27431 msgid "(Added in 1.5.3)"
27435 #: ../src/guestfs-actions.pod:2141
27436 msgid "guestfs_filesize"
27440 #: ../src/guestfs-actions.pod:2143
27444 " guestfs_filesize (guestfs_h *g,\n"
27445 " const char *file);\n"
27450 #: ../src/guestfs-actions.pod:2149
27452 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
27453 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
27454 "devices, use C<guestfs_blockdev_getsize64>."
27458 #: ../src/guestfs-actions.pod:2155
27459 msgid "(Added in 1.0.82)"
27463 #: ../src/guestfs-actions.pod:2157
27464 msgid "guestfs_fill"
27468 #: ../src/guestfs-actions.pod:2159
27472 " guestfs_fill (guestfs_h *g,\n"
27475 " const char *path);\n"
27480 #: ../src/guestfs-actions.pod:2169
27482 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
27483 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
27484 "bytes use C<guestfs_fill_pattern>."
27488 #: ../src/guestfs-actions.pod:2181
27489 msgid "(Added in 1.0.79)"
27493 #: ../src/guestfs-actions.pod:2183
27494 msgid "guestfs_fill_pattern"
27498 #: ../src/guestfs-actions.pod:2185
27502 " guestfs_fill_pattern (guestfs_h *g,\n"
27503 " const char *pattern,\n"
27505 " const char *path);\n"
27510 #: ../src/guestfs-actions.pod:2191
27512 "This function is like C<guestfs_fill> except that it creates a new file of "
27513 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
27514 "pattern is truncated if necessary to ensure the length of the file is "
27515 "exactly C<len> bytes."
27519 #: ../src/guestfs-actions.pod:2203
27520 msgid "(Added in 1.3.12)"
27524 #: ../src/guestfs-actions.pod:2205
27525 msgid "guestfs_find"
27529 #: ../src/guestfs-actions.pod:2207
27533 " guestfs_find (guestfs_h *g,\n"
27534 " const char *directory);\n"
27539 #: ../src/guestfs-actions.pod:2223
27540 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27544 #: ../src/guestfs-actions.pod:2236
27545 msgid "See also C<guestfs_find0>."
27549 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:4774 ../src/guestfs-actions.pod:6640
27550 msgid "(Added in 1.0.27)"
27554 #: ../src/guestfs-actions.pod:2247
27555 msgid "guestfs_find0"
27559 #: ../src/guestfs-actions.pod:2249
27563 " guestfs_find0 (guestfs_h *g,\n"
27564 " const char *directory,\n"
27565 " const char *files);\n"
27570 #: ../src/guestfs-actions.pod:2258
27572 "This command works the same way as C<guestfs_find> with the following "
27577 #: ../src/guestfs-actions.pod:2285
27578 msgid "(Added in 1.0.74)"
27582 #: ../src/guestfs-actions.pod:2287
27583 msgid "guestfs_findfs_label"
27587 #: ../src/guestfs-actions.pod:2289
27591 " guestfs_findfs_label (guestfs_h *g,\n"
27592 " const char *label);\n"
27597 #: ../src/guestfs-actions.pod:2297
27598 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27602 #: ../src/guestfs-actions.pod:2304
27603 msgid "guestfs_findfs_uuid"
27607 #: ../src/guestfs-actions.pod:2306
27611 " guestfs_findfs_uuid (guestfs_h *g,\n"
27612 " const char *uuid);\n"
27617 #: ../src/guestfs-actions.pod:2314
27618 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27622 #: ../src/guestfs-actions.pod:2321
27623 msgid "guestfs_fsck"
27627 #: ../src/guestfs-actions.pod:2323
27631 " guestfs_fsck (guestfs_h *g,\n"
27632 " const char *fstype,\n"
27633 " const char *device);\n"
27638 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:8541
27639 msgid "(Added in 1.0.16)"
27643 #: ../src/guestfs-actions.pod:2360
27644 msgid "guestfs_get_append"
27648 #: ../src/guestfs-actions.pod:2362
27652 " guestfs_get_append (guestfs_h *g);\n"
27657 #: ../src/guestfs-actions.pod:2370
27659 "This function returns a string which may be NULL. There is no way to return "
27660 "an error from this function. The string is owned by the guest handle and "
27661 "must I<not> be freed."
27665 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:6318 ../src/guestfs-actions.pod:6797 ../src/guestfs-actions.pod:7246 ../src/guestfs-actions.pod:7265 ../src/guestfs-actions.pod:7281 ../src/guestfs-actions.pod:7305 ../src/guestfs-actions.pod:8181 ../src/guestfs-actions.pod:8196 ../src/guestfs-actions.pod:8585
27666 msgid "(Added in 1.0.26)"
27670 #: ../src/guestfs-actions.pod:2376
27671 msgid "guestfs_get_attach_method"
27675 #: ../src/guestfs-actions.pod:2378
27679 " guestfs_get_attach_method (guestfs_h *g);\n"
27684 #: ../src/guestfs-actions.pod:2381
27685 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27689 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:6827
27690 msgid "(Added in 1.9.8)"
27694 #: ../src/guestfs-actions.pod:2388
27695 msgid "guestfs_get_autosync"
27699 #: ../src/guestfs-actions.pod:2390
27703 " guestfs_get_autosync (guestfs_h *g);\n"
27708 #: ../src/guestfs-actions.pod:2399
27709 msgid "guestfs_get_direct"
27713 #: ../src/guestfs-actions.pod:2401
27717 " guestfs_get_direct (guestfs_h *g);\n"
27722 #: ../src/guestfs-actions.pod:2408 ../src/guestfs-actions.pod:6868
27723 msgid "(Added in 1.0.72)"
27727 #: ../src/guestfs-actions.pod:2410
27728 msgid "guestfs_get_e2label"
27732 #: ../src/guestfs-actions.pod:2412
27736 " guestfs_get_e2label (guestfs_h *g,\n"
27737 " const char *device);\n"
27742 #: ../src/guestfs-actions.pod:2416
27744 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27749 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:6886 ../src/guestfs-actions.pod:6905
27750 msgid "(Added in 1.0.15)"
27754 #: ../src/guestfs-actions.pod:2431
27755 msgid "guestfs_get_e2uuid"
27759 #: ../src/guestfs-actions.pod:2433
27763 " guestfs_get_e2uuid (guestfs_h *g,\n"
27764 " const char *device);\n"
27769 #: ../src/guestfs-actions.pod:2437
27771 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27776 #: ../src/guestfs-actions.pod:2452
27777 msgid "guestfs_get_memsize"
27781 #: ../src/guestfs-actions.pod:2454
27785 " guestfs_get_memsize (guestfs_h *g);\n"
27790 #: ../src/guestfs-actions.pod:2460
27792 "If C<guestfs_set_memsize> was not called on this handle, and if "
27793 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27794 "value for memsize."
27798 #: ../src/guestfs-actions.pod:2469 ../src/guestfs-actions.pod:5214 ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5442 ../src/guestfs-actions.pod:5461 ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:5490 ../src/guestfs-actions.pod:5503 ../src/guestfs-actions.pod:6543 ../src/guestfs-actions.pod:6926 ../src/guestfs-actions.pod:7216 ../src/guestfs-actions.pod:7950
27799 msgid "(Added in 1.0.55)"
27803 #: ../src/guestfs-actions.pod:2471
27804 msgid "guestfs_get_network"
27808 #: ../src/guestfs-actions.pod:2473
27812 " guestfs_get_network (guestfs_h *g);\n"
27817 #: ../src/guestfs-actions.pod:2480 ../src/guestfs-actions.pod:6945
27818 msgid "(Added in 1.5.4)"
27822 #: ../src/guestfs-actions.pod:2482
27823 msgid "guestfs_get_path"
27827 #: ../src/guestfs-actions.pod:2484
27831 " guestfs_get_path (guestfs_h *g);\n"
27836 #: ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2532
27838 "This function returns a string, or NULL on error. The string is owned by "
27839 "the guest handle and must I<not> be freed."
27843 #: ../src/guestfs-actions.pod:2497
27844 msgid "guestfs_get_pgroup"
27848 #: ../src/guestfs-actions.pod:2499
27852 " guestfs_get_pgroup (guestfs_h *g);\n"
27857 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:6981 ../src/guestfs-actions.pod:8442
27858 msgid "(Added in 1.11.18)"
27862 #: ../src/guestfs-actions.pod:2508
27863 msgid "guestfs_get_pid"
27867 #: ../src/guestfs-actions.pod:2510
27871 " guestfs_get_pid (guestfs_h *g);\n"
27876 #: ../src/guestfs-actions.pod:2520
27877 msgid "(Added in 1.0.56)"
27881 #: ../src/guestfs-actions.pod:2522
27882 msgid "guestfs_get_qemu"
27886 #: ../src/guestfs-actions.pod:2524
27890 " guestfs_get_qemu (guestfs_h *g);\n"
27895 #: ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:7009
27896 msgid "(Added in 1.0.6)"
27900 #: ../src/guestfs-actions.pod:2537
27901 msgid "guestfs_get_recovery_proc"
27905 #: ../src/guestfs-actions.pod:2539
27909 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27914 #: ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:4134 ../src/guestfs-actions.pod:4478 ../src/guestfs-actions.pod:4872 ../src/guestfs-actions.pod:5053 ../src/guestfs-actions.pod:6248 ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:7033 ../src/guestfs-actions.pod:7731 ../src/guestfs-actions.pod:7751 ../src/guestfs-actions.pod:8065
27915 msgid "(Added in 1.0.77)"
27919 #: ../src/guestfs-actions.pod:2548
27920 msgid "guestfs_get_selinux"
27924 #: ../src/guestfs-actions.pod:2550
27928 " guestfs_get_selinux (guestfs_h *g);\n"
27933 #: ../src/guestfs-actions.pod:2553
27935 "This returns the current setting of the selinux flag which is passed to the "
27936 "appliance at boot time. See C<guestfs_set_selinux>."
27940 #: ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:7052 ../src/guestfs-actions.pod:7126
27941 msgid "(Added in 1.0.67)"
27945 #: ../src/guestfs-actions.pod:2563
27946 msgid "guestfs_get_smp"
27950 #: ../src/guestfs-actions.pod:2565
27954 " guestfs_get_smp (guestfs_h *g);\n"
27959 #: ../src/guestfs-actions.pod:2574
27960 msgid "guestfs_get_state"
27964 #: ../src/guestfs-actions.pod:2576
27968 " guestfs_get_state (guestfs_h *g);\n"
27973 #: ../src/guestfs-actions.pod:2588
27974 msgid "guestfs_get_trace"
27978 #: ../src/guestfs-actions.pod:2590
27982 " guestfs_get_trace (guestfs_h *g);\n"
27987 #: ../src/guestfs-actions.pod:2599
27988 msgid "guestfs_get_umask"
27992 #: ../src/guestfs-actions.pod:2601
27996 " guestfs_get_umask (guestfs_h *g);\n"
28001 #: ../src/guestfs-actions.pod:2604
28003 "Return the current umask. By default the umask is C<022> unless it has been "
28004 "set by calling C<guestfs_umask>."
28008 #: ../src/guestfs-actions.pod:2611
28009 msgid "guestfs_get_verbose"
28013 #: ../src/guestfs-actions.pod:2613
28017 " guestfs_get_verbose (guestfs_h *g);\n"
28022 #: ../src/guestfs-actions.pod:2622
28023 msgid "guestfs_getcon"
28027 #: ../src/guestfs-actions.pod:2624
28031 " guestfs_getcon (guestfs_h *g);\n"
28036 #: ../src/guestfs-actions.pod:2629
28037 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
28041 #: ../src/guestfs-actions.pod:2637
28042 msgid "guestfs_getxattr"
28046 #: ../src/guestfs-actions.pod:2639
28050 " guestfs_getxattr (guestfs_h *g,\n"
28051 " const char *path,\n"
28052 " const char *name,\n"
28053 " size_t *size_r);\n"
28058 #: ../src/guestfs-actions.pod:2645
28060 "Get a single extended attribute from file C<path> named C<name>. This call "
28061 "follows symlinks. If you want to lookup an extended attribute for the "
28062 "symlink itself, use C<guestfs_lgetxattr>."
28066 #: ../src/guestfs-actions.pod:2649 ../src/guestfs-actions.pod:4148
28068 "Normally it is better to get all extended attributes from a file in one go "
28069 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
28070 "implementations are buggy and do not provide a way to list out attributes. "
28071 "For these filesystems (notably ntfs-3g) you have to know the names of the "
28072 "extended attributes you want in advance and call this function."
28076 #: ../src/guestfs-actions.pod:2659
28077 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
28081 #: ../src/guestfs-actions.pod:2661 ../src/guestfs-actions.pod:2874 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4160 ../src/guestfs-actions.pod:6241 ../src/guestfs-actions.pod:6267 ../src/guestfs-actions.pod:6448
28083 "This function returns a buffer, or NULL on error. The size of the returned "
28084 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
28089 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4164
28090 msgid "(Added in 1.7.24)"
28094 #: ../src/guestfs-actions.pod:2667
28095 msgid "guestfs_getxattrs"
28099 #: ../src/guestfs-actions.pod:2669
28102 " struct guestfs_xattr_list *\n"
28103 " guestfs_getxattrs (guestfs_h *g,\n"
28104 " const char *path);\n"
28109 #: ../src/guestfs-actions.pod:2679
28110 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
28114 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:4176 ../src/guestfs-actions.pod:4868
28116 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
28117 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
28121 #: ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4392 ../src/guestfs-actions.pod:4428 ../src/guestfs-actions.pod:6621 ../src/guestfs-actions.pod:7145 ../src/guestfs-actions.pod:8650
28122 msgid "(Added in 1.0.59)"
28126 #: ../src/guestfs-actions.pod:2687
28127 msgid "guestfs_glob_expand"
28131 #: ../src/guestfs-actions.pod:2689
28135 " guestfs_glob_expand (guestfs_h *g,\n"
28136 " const char *pattern);\n"
28141 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:7329 ../src/guestfs-actions.pod:7346
28142 msgid "(Added in 1.0.50)"
28146 #: ../src/guestfs-actions.pod:2710
28147 msgid "guestfs_grep"
28151 #: ../src/guestfs-actions.pod:2712
28155 " guestfs_grep (guestfs_h *g,\n"
28156 " const char *regex,\n"
28157 " const char *path);\n"
28162 #: ../src/guestfs-actions.pod:2729
28163 msgid "guestfs_grepi"
28167 #: ../src/guestfs-actions.pod:2731
28171 " guestfs_grepi (guestfs_h *g,\n"
28172 " const char *regex,\n"
28173 " const char *path);\n"
28178 #: ../src/guestfs-actions.pod:2748
28179 msgid "guestfs_grub_install"
28183 #: ../src/guestfs-actions.pod:2750
28187 " guestfs_grub_install (guestfs_h *g,\n"
28188 " const char *root,\n"
28189 " const char *device);\n"
28194 #: ../src/guestfs-actions.pod:2793
28195 msgid "(Added in 1.0.17)"
28199 #: ../src/guestfs-actions.pod:2795
28200 msgid "guestfs_head"
28204 #: ../src/guestfs-actions.pod:2797
28208 " guestfs_head (guestfs_h *g,\n"
28209 " const char *path);\n"
28214 #: ../src/guestfs-actions.pod:2813
28215 msgid "guestfs_head_n"
28219 #: ../src/guestfs-actions.pod:2815
28223 " guestfs_head_n (guestfs_h *g,\n"
28225 " const char *path);\n"
28230 #: ../src/guestfs-actions.pod:2837
28231 msgid "guestfs_hexdump"
28235 #: ../src/guestfs-actions.pod:2839
28239 " guestfs_hexdump (guestfs_h *g,\n"
28240 " const char *path);\n"
28245 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:7410 ../src/guestfs-actions.pod:7465
28246 msgid "(Added in 1.0.22)"
28250 #: ../src/guestfs-actions.pod:2854
28251 msgid "guestfs_initrd_cat"
28255 #: ../src/guestfs-actions.pod:2856
28259 " guestfs_initrd_cat (guestfs_h *g,\n"
28260 " const char *initrdpath,\n"
28261 " const char *filename,\n"
28262 " size_t *size_r);\n"
28267 #: ../src/guestfs-actions.pod:2872
28268 msgid "See also C<guestfs_initrd_list>."
28272 #: ../src/guestfs-actions.pod:2883
28273 msgid "guestfs_initrd_list"
28277 #: ../src/guestfs-actions.pod:2885
28281 " guestfs_initrd_list (guestfs_h *g,\n"
28282 " const char *path);\n"
28287 #: ../src/guestfs-actions.pod:2905
28288 msgid "guestfs_inotify_add_watch"
28292 #: ../src/guestfs-actions.pod:2907
28296 " guestfs_inotify_add_watch (guestfs_h *g,\n"
28297 " const char *path,\n"
28303 #: ../src/guestfs-actions.pod:2926
28304 msgid "guestfs_inotify_close"
28308 #: ../src/guestfs-actions.pod:2928
28312 " guestfs_inotify_close (guestfs_h *g);\n"
28317 #: ../src/guestfs-actions.pod:2939
28318 msgid "guestfs_inotify_files"
28322 #: ../src/guestfs-actions.pod:2941
28326 " guestfs_inotify_files (guestfs_h *g);\n"
28331 #: ../src/guestfs-actions.pod:2944
28333 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
28334 "returns a list of pathnames of objects that were touched. The returned "
28335 "pathnames are sorted and deduplicated."
28339 #: ../src/guestfs-actions.pod:2954
28340 msgid "guestfs_inotify_init"
28344 #: ../src/guestfs-actions.pod:2956
28348 " guestfs_inotify_init (guestfs_h *g,\n"
28349 " int maxevents);\n"
28354 #: ../src/guestfs-actions.pod:2964
28356 "C<maxevents> is the maximum number of events which will be queued up between "
28357 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
28358 "passed as C<0>, then the kernel (or previously set) default is used. For "
28359 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
28360 "throws away events, but records the fact that it threw them away by setting "
28361 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
28362 "C<guestfs_inotify_read>)."
28366 #: ../src/guestfs-actions.pod:2974
28368 "Before any events are generated, you have to add some watches to the "
28369 "internal watch list. See: C<guestfs_inotify_add_watch>, "
28370 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
28374 #: ../src/guestfs-actions.pod:2980
28376 "Queued up events should be read periodically by calling "
28377 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
28378 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
28379 "often enough then you risk the internal queue overflowing."
28383 #: ../src/guestfs-actions.pod:2987
28385 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
28386 "This also removes any watches automatically."
28390 #: ../src/guestfs-actions.pod:3000
28391 msgid "guestfs_inotify_read"
28395 #: ../src/guestfs-actions.pod:3002
28398 " struct guestfs_inotify_event_list *\n"
28399 " guestfs_inotify_read (guestfs_h *g);\n"
28404 #: ../src/guestfs-actions.pod:3016
28406 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
28407 "there was an error. I<The caller must call "
28408 "C<guestfs_free_inotify_event_list> after use>."
28412 #: ../src/guestfs-actions.pod:3022
28413 msgid "guestfs_inotify_rm_watch"
28417 #: ../src/guestfs-actions.pod:3024
28421 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
28427 #: ../src/guestfs-actions.pod:3028
28429 "Remove a previously defined inotify watch. See "
28430 "C<guestfs_inotify_add_watch>."
28434 #: ../src/guestfs-actions.pod:3035
28435 msgid "guestfs_inspect_get_arch"
28439 #: ../src/guestfs-actions.pod:3037
28443 " guestfs_inspect_get_arch (guestfs_h *g,\n"
28444 " const char *root);\n"
28449 #: ../src/guestfs-actions.pod:3041
28451 "This returns the architecture of the inspected operating system. The "
28452 "possible return values are listed under C<guestfs_file_architecture>."
28456 #: ../src/guestfs-actions.pod:3055
28457 msgid "guestfs_inspect_get_distro"
28461 #: ../src/guestfs-actions.pod:3057
28465 " guestfs_inspect_get_distro (guestfs_h *g,\n"
28466 " const char *root);\n"
28471 #: ../src/guestfs-actions.pod:3157
28472 msgid "guestfs_inspect_get_drive_mappings"
28476 #: ../src/guestfs-actions.pod:3159
28480 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
28481 " const char *root);\n"
28486 #: ../src/guestfs-actions.pod:3188
28488 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28489 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
28493 #: ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3460 ../src/guestfs-actions.pod:4267 ../src/guestfs-actions.pod:5006 ../src/guestfs-actions.pod:5692 ../src/guestfs-actions.pod:7889
28495 "This function returns a NULL-terminated array of strings, or NULL if there "
28496 "was an error. The array of strings will always have length C<2n+1>, where "
28497 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
28498 "caller must free the strings and the array after use>."
28502 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3663
28503 msgid "(Added in 1.9.17)"
28507 #: ../src/guestfs-actions.pod:3200
28508 msgid "guestfs_inspect_get_filesystems"
28512 #: ../src/guestfs-actions.pod:3202
28516 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
28517 " const char *root);\n"
28522 #: ../src/guestfs-actions.pod:3214
28524 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28525 "C<guestfs_inspect_get_mountpoints>."
28529 #: ../src/guestfs-actions.pod:3223
28530 msgid "guestfs_inspect_get_format"
28534 #: ../src/guestfs-actions.pod:3225
28538 " guestfs_inspect_get_format (guestfs_h *g,\n"
28539 " const char *root);\n"
28544 #: ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3699 ../src/guestfs-actions.pod:3715 ../src/guestfs-actions.pod:3733 ../src/guestfs-actions.pod:6659
28545 msgid "(Added in 1.9.4)"
28549 #: ../src/guestfs-actions.pod:3261
28550 msgid "guestfs_inspect_get_hostname"
28554 #: ../src/guestfs-actions.pod:3263
28558 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28559 " const char *root);\n"
28564 #: ../src/guestfs-actions.pod:3278
28565 msgid "(Added in 1.7.9)"
28569 #: ../src/guestfs-actions.pod:3280
28570 msgid "guestfs_inspect_get_icon"
28574 #: ../src/guestfs-actions.pod:3282
28578 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28579 " const char *root,\n"
28580 " size_t *size_r,\n"
28586 #: ../src/guestfs-actions.pod:3293
28589 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28590 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28595 #: ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:4194 ../src/guestfs-actions.pod:5591
28596 msgid "(Added in 1.11.12)"
28600 #: ../src/guestfs-actions.pod:3362
28601 msgid "guestfs_inspect_get_icon_va"
28605 #: ../src/guestfs-actions.pod:3364
28609 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28610 " const char *root,\n"
28611 " size_t *size_r,\n"
28612 " va_list args);\n"
28617 #: ../src/guestfs-actions.pod:3370
28618 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28622 #: ../src/guestfs-actions.pod:3374
28623 msgid "guestfs_inspect_get_icon_argv"
28627 #: ../src/guestfs-actions.pod:3376
28631 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28632 " const char *root,\n"
28633 " size_t *size_r,\n"
28634 " const struct guestfs_inspect_get_icon_argv "
28640 #: ../src/guestfs-actions.pod:3382
28641 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28645 #: ../src/guestfs-actions.pod:3386
28646 msgid "guestfs_inspect_get_major_version"
28650 #: ../src/guestfs-actions.pod:3388
28654 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28655 " const char *root);\n"
28660 #: ../src/guestfs-actions.pod:3410
28661 msgid "guestfs_inspect_get_minor_version"
28665 #: ../src/guestfs-actions.pod:3412
28669 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28670 " const char *root);\n"
28675 #: ../src/guestfs-actions.pod:3421
28677 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28678 "C<guestfs_inspect_get_major_version>."
28682 #: ../src/guestfs-actions.pod:3428
28683 msgid "guestfs_inspect_get_mountpoints"
28687 #: ../src/guestfs-actions.pod:3430
28691 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28692 " const char *root);\n"
28697 #: ../src/guestfs-actions.pod:3451
28699 "For operating systems like Windows which still use drive letters, this call "
28700 "will only return an entry for the first drive \"mounted on\" C</>. For "
28701 "information about the mapping of drive letters to partitions, see "
28702 "C<guestfs_inspect_get_drive_mappings>."
28706 #: ../src/guestfs-actions.pod:3457
28708 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28709 "C<guestfs_inspect_get_filesystems>."
28713 #: ../src/guestfs-actions.pod:3468
28714 msgid "guestfs_inspect_get_package_format"
28718 #: ../src/guestfs-actions.pod:3470
28722 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28723 " const char *root);\n"
28728 #: ../src/guestfs-actions.pod:3474
28730 "This function and C<guestfs_inspect_get_package_management> return the "
28731 "package format and package management tool used by the inspected operating "
28732 "system. For example for Fedora these functions would return C<rpm> (package "
28733 "format) and C<yum> (package management)."
28737 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3521
28738 msgid "(Added in 1.7.5)"
28742 #: ../src/guestfs-actions.pod:3495
28743 msgid "guestfs_inspect_get_package_management"
28747 #: ../src/guestfs-actions.pod:3497
28751 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28752 " const char *root);\n"
28757 #: ../src/guestfs-actions.pod:3501
28759 "C<guestfs_inspect_get_package_format> and this function return the package "
28760 "format and package management tool used by the inspected operating system. "
28761 "For example for Fedora these functions would return C<rpm> (package format) "
28762 "and C<yum> (package management)."
28766 #: ../src/guestfs-actions.pod:3523
28767 msgid "guestfs_inspect_get_product_name"
28771 #: ../src/guestfs-actions.pod:3525
28775 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28776 " const char *root);\n"
28781 #: ../src/guestfs-actions.pod:3544
28782 msgid "guestfs_inspect_get_product_variant"
28786 #: ../src/guestfs-actions.pod:3546
28790 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28791 " const char *root);\n"
28796 #: ../src/guestfs-actions.pod:3569
28798 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28799 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28803 #: ../src/guestfs-actions.pod:3576
28804 msgid "(Added in 1.9.13)"
28808 #: ../src/guestfs-actions.pod:3578
28809 msgid "guestfs_inspect_get_roots"
28813 #: ../src/guestfs-actions.pod:3580
28817 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28822 #: ../src/guestfs-actions.pod:3583
28824 "This function is a convenient way to get the list of root devices, as "
28825 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28826 "the whole inspection process."
28830 #: ../src/guestfs-actions.pod:3587
28832 "This returns an empty list if either no root devices were found or the "
28833 "caller has not called C<guestfs_inspect_os>."
28837 #: ../src/guestfs-actions.pod:3596
28838 msgid "(Added in 1.7.3)"
28842 #: ../src/guestfs-actions.pod:3598
28843 msgid "guestfs_inspect_get_type"
28847 #: ../src/guestfs-actions.pod:3600
28851 " guestfs_inspect_get_type (guestfs_h *g,\n"
28852 " const char *root);\n"
28857 #: ../src/guestfs-actions.pod:3645
28858 msgid "guestfs_inspect_get_windows_current_control_set"
28862 #: ../src/guestfs-actions.pod:3647
28866 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28867 " const char *root);\n"
28872 #: ../src/guestfs-actions.pod:3665
28873 msgid "guestfs_inspect_get_windows_systemroot"
28877 #: ../src/guestfs-actions.pod:3667
28881 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28882 " const char *root);\n"
28887 #: ../src/guestfs-actions.pod:3683
28888 msgid "(Added in 1.5.25)"
28892 #: ../src/guestfs-actions.pod:3685
28893 msgid "guestfs_inspect_is_live"
28897 #: ../src/guestfs-actions.pod:3687
28901 " guestfs_inspect_is_live (guestfs_h *g,\n"
28902 " const char *root);\n"
28907 #: ../src/guestfs-actions.pod:3691
28909 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28910 "disk), then this returns true if a live image was detected on the disk."
28914 #: ../src/guestfs-actions.pod:3701
28915 msgid "guestfs_inspect_is_multipart"
28919 #: ../src/guestfs-actions.pod:3703
28923 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28924 " const char *root);\n"
28929 #: ../src/guestfs-actions.pod:3707
28931 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28932 "disk), then this returns true if the disk is part of a set."
28936 #: ../src/guestfs-actions.pod:3717
28937 msgid "guestfs_inspect_is_netinst"
28941 #: ../src/guestfs-actions.pod:3719
28945 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28946 " const char *root);\n"
28951 #: ../src/guestfs-actions.pod:3723
28953 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28954 "disk), then this returns true if the disk is a network installer, ie. not a "
28955 "self-contained install CD but one which is likely to require network access "
28956 "to complete the install."
28960 #: ../src/guestfs-actions.pod:3735
28961 msgid "guestfs_inspect_list_applications"
28965 #: ../src/guestfs-actions.pod:3737
28968 " struct guestfs_application_list *\n"
28969 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28970 " const char *root);\n"
28975 #: ../src/guestfs-actions.pod:3743
28977 "I<Note:> This call works differently from other parts of the inspection "
28978 "API. You have to call C<guestfs_inspect_os>, then "
28979 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28980 "this. Listing applications is a significantly more difficult operation "
28981 "which requires access to the full filesystem. Also note that unlike the "
28982 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28983 "the libguestfs handle, this call actually reads parts of the mounted "
28984 "filesystems during the call."
28988 #: ../src/guestfs-actions.pod:3833
28990 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28991 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28996 #: ../src/guestfs-actions.pod:3837
28997 msgid "(Added in 1.7.8)"
29001 #: ../src/guestfs-actions.pod:3839
29002 msgid "guestfs_inspect_os"
29006 #: ../src/guestfs-actions.pod:3841
29010 " guestfs_inspect_os (guestfs_h *g);\n"
29015 #: ../src/guestfs-actions.pod:3857
29017 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
29018 "functions in order to query further information about each operating system, "
29019 "such as the name and version."
29023 #: ../src/guestfs-actions.pod:3862
29025 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
29026 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
29027 "the contents. This should be called with no disks currently mounted. The "
29028 "function may also use Augeas, so any existing Augeas handle will be closed."
29032 #: ../src/guestfs-actions.pod:3874 ../src/guestfs-actions.pod:4205 ../src/guestfs-actions.pod:4300
29033 msgid "See also C<guestfs_list_filesystems>."
29037 #: ../src/guestfs-actions.pod:3882
29038 msgid "guestfs_is_blockdev"
29042 #: ../src/guestfs-actions.pod:3884
29046 " guestfs_is_blockdev (guestfs_h *g,\n"
29047 " const char *path);\n"
29052 #: ../src/guestfs-actions.pod:3891 ../src/guestfs-actions.pod:3920 ../src/guestfs-actions.pod:3950 ../src/guestfs-actions.pod:3965 ../src/guestfs-actions.pod:3981 ../src/guestfs-actions.pod:4037 ../src/guestfs-actions.pod:4052
29053 msgid "See also C<guestfs_stat>."
29057 #: ../src/guestfs-actions.pod:3895 ../src/guestfs-actions.pod:3924 ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:4041 ../src/guestfs-actions.pod:4056
29058 msgid "(Added in 1.5.10)"
29062 #: ../src/guestfs-actions.pod:3897
29063 msgid "guestfs_is_busy"
29067 #: ../src/guestfs-actions.pod:3899
29071 " guestfs_is_busy (guestfs_h *g);\n"
29076 #: ../src/guestfs-actions.pod:3911
29077 msgid "guestfs_is_chardev"
29081 #: ../src/guestfs-actions.pod:3913
29085 " guestfs_is_chardev (guestfs_h *g,\n"
29086 " const char *path);\n"
29091 #: ../src/guestfs-actions.pod:3926
29092 msgid "guestfs_is_config"
29096 #: ../src/guestfs-actions.pod:3928
29100 " guestfs_is_config (guestfs_h *g);\n"
29105 #: ../src/guestfs-actions.pod:3940
29106 msgid "guestfs_is_dir"
29110 #: ../src/guestfs-actions.pod:3942
29114 " guestfs_is_dir (guestfs_h *g,\n"
29115 " const char *path);\n"
29120 #: ../src/guestfs-actions.pod:3956
29121 msgid "guestfs_is_fifo"
29125 #: ../src/guestfs-actions.pod:3958
29129 " guestfs_is_fifo (guestfs_h *g,\n"
29130 " const char *path);\n"
29135 #: ../src/guestfs-actions.pod:3971
29136 msgid "guestfs_is_file"
29140 #: ../src/guestfs-actions.pod:3973
29144 " guestfs_is_file (guestfs_h *g,\n"
29145 " const char *path);\n"
29150 #: ../src/guestfs-actions.pod:3987
29151 msgid "guestfs_is_launching"
29155 #: ../src/guestfs-actions.pod:3989
29159 " guestfs_is_launching (guestfs_h *g);\n"
29164 #: ../src/guestfs-actions.pod:4001
29165 msgid "guestfs_is_lv"
29169 #: ../src/guestfs-actions.pod:4003
29173 " guestfs_is_lv (guestfs_h *g,\n"
29174 " const char *device);\n"
29179 #: ../src/guestfs-actions.pod:4014
29180 msgid "guestfs_is_ready"
29184 #: ../src/guestfs-actions.pod:4016
29188 " guestfs_is_ready (guestfs_h *g);\n"
29193 #: ../src/guestfs-actions.pod:4028
29194 msgid "guestfs_is_socket"
29198 #: ../src/guestfs-actions.pod:4030
29202 " guestfs_is_socket (guestfs_h *g,\n"
29203 " const char *path);\n"
29208 #: ../src/guestfs-actions.pod:4043
29209 msgid "guestfs_is_symlink"
29213 #: ../src/guestfs-actions.pod:4045
29217 " guestfs_is_symlink (guestfs_h *g,\n"
29218 " const char *path);\n"
29223 #: ../src/guestfs-actions.pod:4058
29224 msgid "guestfs_is_zero"
29228 #: ../src/guestfs-actions.pod:4060
29232 " guestfs_is_zero (guestfs_h *g,\n"
29233 " const char *path);\n"
29238 #: ../src/guestfs-actions.pod:4069 ../src/guestfs-actions.pod:4083
29239 msgid "(Added in 1.11.8)"
29243 #: ../src/guestfs-actions.pod:4071
29244 msgid "guestfs_is_zero_device"
29248 #: ../src/guestfs-actions.pod:4073
29252 " guestfs_is_zero_device (guestfs_h *g,\n"
29253 " const char *device);\n"
29258 #: ../src/guestfs-actions.pod:4085
29259 msgid "guestfs_kill_subprocess"
29263 #: ../src/guestfs-actions.pod:4087
29267 " guestfs_kill_subprocess (guestfs_h *g);\n"
29272 #: ../src/guestfs-actions.pod:4096
29273 msgid "guestfs_launch"
29277 #: ../src/guestfs-actions.pod:4098
29281 " guestfs_launch (guestfs_h *g);\n"
29286 #: ../src/guestfs-actions.pod:4116
29287 msgid "guestfs_lchown"
29291 #: ../src/guestfs-actions.pod:4118
29295 " guestfs_lchown (guestfs_h *g,\n"
29298 " const char *path);\n"
29303 #: ../src/guestfs-actions.pod:4124
29305 "Change the file owner to C<owner> and group to C<group>. This is like "
29306 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
29307 "changed, not the target."
29311 #: ../src/guestfs-actions.pod:4136
29312 msgid "guestfs_lgetxattr"
29316 #: ../src/guestfs-actions.pod:4138
29320 " guestfs_lgetxattr (guestfs_h *g,\n"
29321 " const char *path,\n"
29322 " const char *name,\n"
29323 " size_t *size_r);\n"
29328 #: ../src/guestfs-actions.pod:4158
29329 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
29333 #: ../src/guestfs-actions.pod:4166
29334 msgid "guestfs_lgetxattrs"
29338 #: ../src/guestfs-actions.pod:4168
29341 " struct guestfs_xattr_list *\n"
29342 " guestfs_lgetxattrs (guestfs_h *g,\n"
29343 " const char *path);\n"
29348 #: ../src/guestfs-actions.pod:4172
29350 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
29351 "then it returns the extended attributes of the link itself."
29355 #: ../src/guestfs-actions.pod:4182
29356 msgid "guestfs_list_9p"
29360 #: ../src/guestfs-actions.pod:4184
29364 " guestfs_list_9p (guestfs_h *g);\n"
29369 #: ../src/guestfs-actions.pod:4196
29370 msgid "guestfs_list_devices"
29374 #: ../src/guestfs-actions.pod:4198
29378 " guestfs_list_devices (guestfs_h *g);\n"
29383 #: ../src/guestfs-actions.pod:4213
29384 msgid "guestfs_list_dm_devices"
29388 #: ../src/guestfs-actions.pod:4215
29392 " guestfs_list_dm_devices (guestfs_h *g);\n"
29397 #: ../src/guestfs-actions.pod:4220
29399 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
29400 "previous call to C<guestfs_luks_open>."
29404 #: ../src/guestfs-actions.pod:4223
29406 "Device mapper devices which correspond to logical volumes are I<not> "
29407 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
29412 #: ../src/guestfs-actions.pod:4231 ../src/guestfs-actions.pod:5830
29413 msgid "(Added in 1.11.15)"
29417 #: ../src/guestfs-actions.pod:4233
29418 msgid "guestfs_list_filesystems"
29422 #: ../src/guestfs-actions.pod:4235
29426 " guestfs_list_filesystems (guestfs_h *g);\n"
29431 #: ../src/guestfs-actions.pod:4255
29433 "This command runs other libguestfs commands, which might include "
29434 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
29435 "soon after launch and only when nothing is mounted."
29439 #: ../src/guestfs-actions.pod:4259
29441 "Not all of the filesystems returned will be mountable. In particular, swap "
29442 "partitions are returned in the list. Also this command does not check that "
29443 "each filesystem found is valid and mountable, and some filesystems might be "
29444 "mountable but require special options. Filesystems may not all belong to a "
29445 "single logical operating system (use C<guestfs_inspect_os> to look for "
29450 #: ../src/guestfs-actions.pod:4273 ../src/guestfs-actions.pod:6190
29451 msgid "(Added in 1.5.15)"
29455 #: ../src/guestfs-actions.pod:4275
29456 msgid "guestfs_list_md_devices"
29460 #: ../src/guestfs-actions.pod:4277
29464 " guestfs_list_md_devices (guestfs_h *g);\n"
29469 #: ../src/guestfs-actions.pod:4286 ../src/guestfs-actions.pod:7851
29470 msgid "(Added in 1.15.4)"
29474 #: ../src/guestfs-actions.pod:4288
29475 msgid "guestfs_list_partitions"
29479 #: ../src/guestfs-actions.pod:4290
29483 " guestfs_list_partitions (guestfs_h *g);\n"
29488 #: ../src/guestfs-actions.pod:4297
29490 "This does not return logical volumes. For that you will need to call "
29495 #: ../src/guestfs-actions.pod:4308
29500 #: ../src/guestfs-actions.pod:4310
29504 " guestfs_ll (guestfs_h *g,\n"
29505 " const char *directory);\n"
29510 #: ../src/guestfs-actions.pod:4325
29515 #: ../src/guestfs-actions.pod:4327
29519 " guestfs_ln (guestfs_h *g,\n"
29520 " const char *target,\n"
29521 " const char *linkname);\n"
29526 #: ../src/guestfs-actions.pod:4338
29527 msgid "guestfs_ln_f"
29531 #: ../src/guestfs-actions.pod:4340
29535 " guestfs_ln_f (guestfs_h *g,\n"
29536 " const char *target,\n"
29537 " const char *linkname);\n"
29542 #: ../src/guestfs-actions.pod:4352
29543 msgid "guestfs_ln_s"
29547 #: ../src/guestfs-actions.pod:4354
29551 " guestfs_ln_s (guestfs_h *g,\n"
29552 " const char *target,\n"
29553 " const char *linkname);\n"
29558 #: ../src/guestfs-actions.pod:4365
29559 msgid "guestfs_ln_sf"
29563 #: ../src/guestfs-actions.pod:4367
29567 " guestfs_ln_sf (guestfs_h *g,\n"
29568 " const char *target,\n"
29569 " const char *linkname);\n"
29574 #: ../src/guestfs-actions.pod:4379
29575 msgid "guestfs_lremovexattr"
29579 #: ../src/guestfs-actions.pod:4381
29583 " guestfs_lremovexattr (guestfs_h *g,\n"
29584 " const char *xattr,\n"
29585 " const char *path);\n"
29590 #: ../src/guestfs-actions.pod:4386
29592 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29593 "link, then it removes an extended attribute of the link itself."
29597 #: ../src/guestfs-actions.pod:4394
29602 #: ../src/guestfs-actions.pod:4396
29606 " guestfs_ls (guestfs_h *g,\n"
29607 " const char *directory);\n"
29612 #: ../src/guestfs-actions.pod:4404
29614 "This command is mostly useful for interactive sessions. Programs should "
29615 "probably use C<guestfs_readdir> instead."
29619 #: ../src/guestfs-actions.pod:4413
29620 msgid "guestfs_lsetxattr"
29624 #: ../src/guestfs-actions.pod:4415
29628 " guestfs_lsetxattr (guestfs_h *g,\n"
29629 " const char *xattr,\n"
29630 " const char *val,\n"
29632 " const char *path);\n"
29637 #: ../src/guestfs-actions.pod:4422
29639 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29640 "then it sets an extended attribute of the link itself."
29644 #: ../src/guestfs-actions.pod:4430
29645 msgid "guestfs_lstat"
29649 #: ../src/guestfs-actions.pod:4432
29652 " struct guestfs_stat *\n"
29653 " guestfs_lstat (guestfs_h *g,\n"
29654 " const char *path);\n"
29659 #: ../src/guestfs-actions.pod:4438
29661 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29662 "link, then the link is stat-ed, not the file it refers to."
29666 #: ../src/guestfs-actions.pod:4444 ../src/guestfs-actions.pod:7370
29668 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29669 "error. I<The caller must call C<guestfs_free_stat> after use>."
29673 #: ../src/guestfs-actions.pod:4448 ../src/guestfs-actions.pod:7374 ../src/guestfs-actions.pod:7392 ../src/guestfs-actions.pod:7895
29674 msgid "(Added in 0.9.2)"
29678 #: ../src/guestfs-actions.pod:4450
29679 msgid "guestfs_lstatlist"
29683 #: ../src/guestfs-actions.pod:4452
29686 " struct guestfs_stat_list *\n"
29687 " guestfs_lstatlist (guestfs_h *g,\n"
29688 " const char *path,\n"
29689 " char *const *names);\n"
29694 #: ../src/guestfs-actions.pod:4457
29696 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29697 "files, where all files are in the directory C<path>. C<names> is the list "
29698 "of files from this directory."
29702 #: ../src/guestfs-actions.pod:4466
29704 "This call is intended for programs that want to efficiently list a directory "
29705 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
29706 "for a similarly efficient call for getting extended attributes. Very long "
29707 "directory listings might cause the protocol message size to be exceeded, "
29708 "causing this call to fail. The caller must split up such requests into "
29709 "smaller groups of names."
29713 #: ../src/guestfs-actions.pod:4474
29715 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29716 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29720 #: ../src/guestfs-actions.pod:4480
29721 msgid "guestfs_luks_add_key"
29725 #: ../src/guestfs-actions.pod:4482
29729 " guestfs_luks_add_key (guestfs_h *g,\n"
29730 " const char *device,\n"
29731 " const char *key,\n"
29732 " const char *newkey,\n"
29738 #: ../src/guestfs-actions.pod:4494
29740 "Note that if C<keyslot> already contains a key, then this command will "
29741 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
29745 #: ../src/guestfs-actions.pod:4500 ../src/guestfs-actions.pod:4537 ../src/guestfs-actions.pod:4557 ../src/guestfs-actions.pod:4577 ../src/guestfs-actions.pod:4612 ../src/guestfs-actions.pod:4631
29747 "This function takes a key or passphrase parameter which could contain "
29748 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29753 #: ../src/guestfs-actions.pod:4504 ../src/guestfs-actions.pod:4541 ../src/guestfs-actions.pod:4561 ../src/guestfs-actions.pod:4581
29754 msgid "(Added in 1.5.2)"
29758 #: ../src/guestfs-actions.pod:4506
29759 msgid "guestfs_luks_close"
29763 #: ../src/guestfs-actions.pod:4508
29767 " guestfs_luks_close (guestfs_h *g,\n"
29768 " const char *device);\n"
29773 #: ../src/guestfs-actions.pod:4512
29775 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29776 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
29777 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
29778 "underlying block device."
29782 #: ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4616 ../src/guestfs-actions.pod:4635 ../src/guestfs-actions.pod:4685 ../src/guestfs-actions.pod:4730
29783 msgid "(Added in 1.5.1)"
29787 #: ../src/guestfs-actions.pod:4522
29788 msgid "guestfs_luks_format"
29792 #: ../src/guestfs-actions.pod:4524
29796 " guestfs_luks_format (guestfs_h *g,\n"
29797 " const char *device,\n"
29798 " const char *key,\n"
29804 #: ../src/guestfs-actions.pod:4543
29805 msgid "guestfs_luks_format_cipher"
29809 #: ../src/guestfs-actions.pod:4545
29813 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29814 " const char *device,\n"
29815 " const char *key,\n"
29817 " const char *cipher);\n"
29822 #: ../src/guestfs-actions.pod:4552
29824 "This command is the same as C<guestfs_luks_format> but it also allows you to "
29825 "set the C<cipher> used."
29829 #: ../src/guestfs-actions.pod:4563
29830 msgid "guestfs_luks_kill_slot"
29834 #: ../src/guestfs-actions.pod:4565
29838 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29839 " const char *device,\n"
29840 " const char *key,\n"
29846 #: ../src/guestfs-actions.pod:4583
29847 msgid "guestfs_luks_open"
29851 #: ../src/guestfs-actions.pod:4585
29855 " guestfs_luks_open (guestfs_h *g,\n"
29856 " const char *device,\n"
29857 " const char *key,\n"
29858 " const char *mapname);\n"
29863 #: ../src/guestfs-actions.pod:4603
29865 "If this block device contains LVM volume groups, then calling "
29866 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29871 #: ../src/guestfs-actions.pod:4607
29872 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29876 #: ../src/guestfs-actions.pod:4618
29877 msgid "guestfs_luks_open_ro"
29881 #: ../src/guestfs-actions.pod:4620
29885 " guestfs_luks_open_ro (guestfs_h *g,\n"
29886 " const char *device,\n"
29887 " const char *key,\n"
29888 " const char *mapname);\n"
29893 #: ../src/guestfs-actions.pod:4626
29895 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29900 #: ../src/guestfs-actions.pod:4637
29901 msgid "guestfs_lvcreate"
29905 #: ../src/guestfs-actions.pod:4639
29909 " guestfs_lvcreate (guestfs_h *g,\n"
29910 " const char *logvol,\n"
29911 " const char *volgroup,\n"
29917 #: ../src/guestfs-actions.pod:4652
29918 msgid "guestfs_lvm_canonical_lv_name"
29922 #: ../src/guestfs-actions.pod:4654
29926 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29927 " const char *lvname);\n"
29932 #: ../src/guestfs-actions.pod:4665
29933 msgid "See also C<guestfs_is_lv>."
29937 #: ../src/guestfs-actions.pod:4670
29938 msgid "(Added in 1.5.24)"
29942 #: ../src/guestfs-actions.pod:4672
29943 msgid "guestfs_lvm_clear_filter"
29947 #: ../src/guestfs-actions.pod:4674
29951 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29956 #: ../src/guestfs-actions.pod:4677
29958 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29959 "see every block device."
29963 #: ../src/guestfs-actions.pod:4687
29964 msgid "guestfs_lvm_remove_all"
29968 #: ../src/guestfs-actions.pod:4689
29972 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29977 #: ../src/guestfs-actions.pod:4699
29978 msgid "guestfs_lvm_set_filter"
29982 #: ../src/guestfs-actions.pod:4701
29986 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29987 " char *const *devices);\n"
29992 #: ../src/guestfs-actions.pod:4732
29993 msgid "guestfs_lvremove"
29997 #: ../src/guestfs-actions.pod:4734
30001 " guestfs_lvremove (guestfs_h *g,\n"
30002 " const char *device);\n"
30007 #: ../src/guestfs-actions.pod:4746 ../src/guestfs-actions.pod:6305 ../src/guestfs-actions.pod:8265
30008 msgid "(Added in 1.0.13)"
30012 #: ../src/guestfs-actions.pod:4748
30013 msgid "guestfs_lvrename"
30017 #: ../src/guestfs-actions.pod:4750
30021 " guestfs_lvrename (guestfs_h *g,\n"
30022 " const char *logvol,\n"
30023 " const char *newlogvol);\n"
30028 #: ../src/guestfs-actions.pod:4759 ../src/guestfs-actions.pod:8278
30029 msgid "(Added in 1.0.83)"
30033 #: ../src/guestfs-actions.pod:4761
30034 msgid "guestfs_lvresize"
30038 #: ../src/guestfs-actions.pod:4763
30042 " guestfs_lvresize (guestfs_h *g,\n"
30043 " const char *device,\n"
30049 #: ../src/guestfs-actions.pod:4776
30050 msgid "guestfs_lvresize_free"
30054 #: ../src/guestfs-actions.pod:4778
30058 " guestfs_lvresize_free (guestfs_h *g,\n"
30059 " const char *lv,\n"
30065 #: ../src/guestfs-actions.pod:4791
30066 msgid "(Added in 1.3.3)"
30070 #: ../src/guestfs-actions.pod:4793
30071 msgid "guestfs_lvs"
30075 #: ../src/guestfs-actions.pod:4795
30079 " guestfs_lvs (guestfs_h *g);\n"
30084 #: ../src/guestfs-actions.pod:4804
30085 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
30089 #: ../src/guestfs-actions.pod:4812
30090 msgid "guestfs_lvs_full"
30094 #: ../src/guestfs-actions.pod:4814
30097 " struct guestfs_lvm_lv_list *\n"
30098 " guestfs_lvs_full (guestfs_h *g);\n"
30103 #: ../src/guestfs-actions.pod:4820
30105 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
30106 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
30111 #: ../src/guestfs-actions.pod:4826
30112 msgid "guestfs_lvuuid"
30116 #: ../src/guestfs-actions.pod:4828
30120 " guestfs_lvuuid (guestfs_h *g,\n"
30121 " const char *device);\n"
30126 #: ../src/guestfs-actions.pod:4839
30127 msgid "guestfs_lxattrlist"
30131 #: ../src/guestfs-actions.pod:4841
30134 " struct guestfs_xattr_list *\n"
30135 " guestfs_lxattrlist (guestfs_h *g,\n"
30136 " const char *path,\n"
30137 " char *const *names);\n"
30142 #: ../src/guestfs-actions.pod:4860
30144 "This call is intended for programs that want to efficiently list a directory "
30145 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
30146 "a similarly efficient call for getting standard stats. Very long directory "
30147 "listings might cause the protocol message size to be exceeded, causing this "
30148 "call to fail. The caller must split up such requests into smaller groups of "
30153 #: ../src/guestfs-actions.pod:4874
30154 msgid "guestfs_md_create"
30158 #: ../src/guestfs-actions.pod:4876
30162 " guestfs_md_create (guestfs_h *g,\n"
30163 " const char *name,\n"
30164 " char *const *devices,\n"
30170 #: ../src/guestfs-actions.pod:4887
30173 " GUESTFS_MD_CREATE_MISSINGBITMAP, int64_t missingbitmap,\n"
30174 " GUESTFS_MD_CREATE_NRDEVICES, int nrdevices,\n"
30175 " GUESTFS_MD_CREATE_SPARE, int spare,\n"
30176 " GUESTFS_MD_CREATE_CHUNK, int64_t chunk,\n"
30177 " GUESTFS_MD_CREATE_LEVEL, const char *level,\n"
30182 #: ../src/guestfs-actions.pod:4949
30183 msgid "guestfs_md_create_va"
30187 #: ../src/guestfs-actions.pod:4951
30191 " guestfs_md_create_va (guestfs_h *g,\n"
30192 " const char *name,\n"
30193 " char *const *devices,\n"
30194 " va_list args);\n"
30199 #: ../src/guestfs-actions.pod:4957
30200 msgid "This is the \"va_list variant\" of L</guestfs_md_create>."
30204 #: ../src/guestfs-actions.pod:4961
30205 msgid "guestfs_md_create_argv"
30209 #: ../src/guestfs-actions.pod:4963
30213 " guestfs_md_create_argv (guestfs_h *g,\n"
30214 " const char *name,\n"
30215 " char *const *devices,\n"
30216 " const struct guestfs_md_create_argv *optargs);\n"
30221 #: ../src/guestfs-actions.pod:4969
30222 msgid "This is the \"argv variant\" of L</guestfs_md_create>."
30226 #: ../src/guestfs-actions.pod:4973
30227 msgid "guestfs_md_detail"
30231 #: ../src/guestfs-actions.pod:4975
30235 " guestfs_md_detail (guestfs_h *g,\n"
30236 " const char *md);\n"
30241 #: ../src/guestfs-actions.pod:5012
30242 msgid "guestfs_md_stop"
30246 #: ../src/guestfs-actions.pod:5014
30250 " guestfs_md_stop (guestfs_h *g,\n"
30251 " const char *md);\n"
30256 #: ../src/guestfs-actions.pod:5023
30257 msgid "guestfs_mkdir"
30261 #: ../src/guestfs-actions.pod:5025
30265 " guestfs_mkdir (guestfs_h *g,\n"
30266 " const char *path);\n"
30271 #: ../src/guestfs-actions.pod:5035
30272 msgid "guestfs_mkdir_mode"
30276 #: ../src/guestfs-actions.pod:5037
30280 " guestfs_mkdir_mode (guestfs_h *g,\n"
30281 " const char *path,\n"
30287 #: ../src/guestfs-actions.pod:5049
30288 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
30292 #: ../src/guestfs-actions.pod:5055
30293 msgid "guestfs_mkdir_p"
30297 #: ../src/guestfs-actions.pod:5057
30301 " guestfs_mkdir_p (guestfs_h *g,\n"
30302 " const char *path);\n"
30307 #: ../src/guestfs-actions.pod:5068
30308 msgid "guestfs_mkdtemp"
30312 #: ../src/guestfs-actions.pod:5070
30316 " guestfs_mkdtemp (guestfs_h *g,\n"
30317 " const char *template);\n"
30322 #: ../src/guestfs-actions.pod:5098
30323 msgid "guestfs_mke2fs_J"
30327 #: ../src/guestfs-actions.pod:5100
30331 " guestfs_mke2fs_J (guestfs_h *g,\n"
30332 " const char *fstype,\n"
30333 " int blocksize,\n"
30334 " const char *device,\n"
30335 " const char *journal);\n"
30340 #: ../src/guestfs-actions.pod:5113
30341 msgid "See also C<guestfs_mke2journal>."
30345 #: ../src/guestfs-actions.pod:5117 ../src/guestfs-actions.pod:5135 ../src/guestfs-actions.pod:5153 ../src/guestfs-actions.pod:5169 ../src/guestfs-actions.pod:5183 ../src/guestfs-actions.pod:5197 ../src/guestfs-actions.pod:5256 ../src/guestfs-actions.pod:5533
30346 msgid "(Added in 1.0.68)"
30350 #: ../src/guestfs-actions.pod:5119
30351 msgid "guestfs_mke2fs_JL"
30355 #: ../src/guestfs-actions.pod:5121
30359 " guestfs_mke2fs_JL (guestfs_h *g,\n"
30360 " const char *fstype,\n"
30361 " int blocksize,\n"
30362 " const char *device,\n"
30363 " const char *label);\n"
30368 #: ../src/guestfs-actions.pod:5131
30369 msgid "See also C<guestfs_mke2journal_L>."
30373 #: ../src/guestfs-actions.pod:5137
30374 msgid "guestfs_mke2fs_JU"
30378 #: ../src/guestfs-actions.pod:5139
30382 " guestfs_mke2fs_JU (guestfs_h *g,\n"
30383 " const char *fstype,\n"
30384 " int blocksize,\n"
30385 " const char *device,\n"
30386 " const char *uuid);\n"
30391 #: ../src/guestfs-actions.pod:5149
30392 msgid "See also C<guestfs_mke2journal_U>."
30396 #: ../src/guestfs-actions.pod:5155
30397 msgid "guestfs_mke2journal"
30401 #: ../src/guestfs-actions.pod:5157
30405 " guestfs_mke2journal (guestfs_h *g,\n"
30406 " int blocksize,\n"
30407 " const char *device);\n"
30412 #: ../src/guestfs-actions.pod:5171
30413 msgid "guestfs_mke2journal_L"
30417 #: ../src/guestfs-actions.pod:5173
30421 " guestfs_mke2journal_L (guestfs_h *g,\n"
30422 " int blocksize,\n"
30423 " const char *label,\n"
30424 " const char *device);\n"
30429 #: ../src/guestfs-actions.pod:5185
30430 msgid "guestfs_mke2journal_U"
30434 #: ../src/guestfs-actions.pod:5187
30438 " guestfs_mke2journal_U (guestfs_h *g,\n"
30439 " int blocksize,\n"
30440 " const char *uuid,\n"
30441 " const char *device);\n"
30446 #: ../src/guestfs-actions.pod:5199
30447 msgid "guestfs_mkfifo"
30451 #: ../src/guestfs-actions.pod:5201
30455 " guestfs_mkfifo (guestfs_h *g,\n"
30457 " const char *path);\n"
30462 #: ../src/guestfs-actions.pod:5206
30464 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
30465 "is just a convenient wrapper around C<guestfs_mknod>."
30469 #: ../src/guestfs-actions.pod:5216
30470 msgid "guestfs_mkfs"
30474 #: ../src/guestfs-actions.pod:5218
30478 " guestfs_mkfs (guestfs_h *g,\n"
30479 " const char *fstype,\n"
30480 " const char *device);\n"
30485 #: ../src/guestfs-actions.pod:5231
30486 msgid "guestfs_mkfs_b"
30490 #: ../src/guestfs-actions.pod:5233
30494 " guestfs_mkfs_b (guestfs_h *g,\n"
30495 " const char *fstype,\n"
30496 " int blocksize,\n"
30497 " const char *device);\n"
30502 #: ../src/guestfs-actions.pod:5239
30504 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
30509 #: ../src/guestfs-actions.pod:5246
30511 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
30512 "block size of the resulting filesystem. Supported block sizes depend on the "
30513 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
30517 #: ../src/guestfs-actions.pod:5258
30518 msgid "guestfs_mkfs_opts"
30522 #: ../src/guestfs-actions.pod:5260
30526 " guestfs_mkfs_opts (guestfs_h *g,\n"
30527 " const char *fstype,\n"
30528 " const char *device,\n"
30534 #: ../src/guestfs-actions.pod:5271
30537 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
30538 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
30539 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
30540 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
30545 #: ../src/guestfs-actions.pod:5319
30546 msgid "(Added in 1.7.19)"
30550 #: ../src/guestfs-actions.pod:5321
30551 msgid "guestfs_mkfs_opts_va"
30555 #: ../src/guestfs-actions.pod:5323
30559 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
30560 " const char *fstype,\n"
30561 " const char *device,\n"
30562 " va_list args);\n"
30567 #: ../src/guestfs-actions.pod:5329
30568 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
30572 #: ../src/guestfs-actions.pod:5333
30573 msgid "guestfs_mkfs_opts_argv"
30577 #: ../src/guestfs-actions.pod:5335
30581 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
30582 " const char *fstype,\n"
30583 " const char *device,\n"
30584 " const struct guestfs_mkfs_opts_argv *optargs);\n"
30589 #: ../src/guestfs-actions.pod:5341
30590 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
30594 #: ../src/guestfs-actions.pod:5345
30595 msgid "guestfs_mkmountpoint"
30599 #: ../src/guestfs-actions.pod:5347
30603 " guestfs_mkmountpoint (guestfs_h *g,\n"
30604 " const char *exemptpath);\n"
30609 #: ../src/guestfs-actions.pod:5351
30611 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
30612 "that can be used to create extra mountpoints before mounting the first "
30617 #: ../src/guestfs-actions.pod:5375
30619 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
30620 "may get unexpected errors if you try to mix these calls. It is safest to "
30621 "manually unmount filesystems and remove mountpoints after use."
30625 #: ../src/guestfs-actions.pod:5379
30627 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
30628 "first, so for this to work for manual mountpoints, you must ensure that the "
30629 "innermost mountpoints have the longest pathnames, as in the example code "
30634 #: ../src/guestfs-actions.pod:5386
30636 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
30637 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
30638 "can also trigger these issues."
30642 #: ../src/guestfs-actions.pod:5392 ../src/guestfs-actions.pod:5698 ../src/guestfs-actions.pod:6725
30643 msgid "(Added in 1.0.62)"
30647 #: ../src/guestfs-actions.pod:5394
30648 msgid "guestfs_mknod"
30652 #: ../src/guestfs-actions.pod:5396
30656 " guestfs_mknod (guestfs_h *g,\n"
30660 " const char *path);\n"
30665 #: ../src/guestfs-actions.pod:5411
30667 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30668 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30669 "regular file). These constants are available in the standard Linux header "
30670 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30671 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
30672 "the appropriate constant for you."
30676 #: ../src/guestfs-actions.pod:5425
30677 msgid "guestfs_mknod_b"
30681 #: ../src/guestfs-actions.pod:5427
30685 " guestfs_mknod_b (guestfs_h *g,\n"
30689 " const char *path);\n"
30694 #: ../src/guestfs-actions.pod:5434
30696 "This call creates a block device node called C<path> with mode C<mode> and "
30697 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30698 "wrapper around C<guestfs_mknod>."
30702 #: ../src/guestfs-actions.pod:5444
30703 msgid "guestfs_mknod_c"
30707 #: ../src/guestfs-actions.pod:5446
30711 " guestfs_mknod_c (guestfs_h *g,\n"
30715 " const char *path);\n"
30720 #: ../src/guestfs-actions.pod:5453
30722 "This call creates a char device node called C<path> with mode C<mode> and "
30723 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30724 "wrapper around C<guestfs_mknod>."
30728 #: ../src/guestfs-actions.pod:5463
30729 msgid "guestfs_mkswap"
30733 #: ../src/guestfs-actions.pod:5465
30737 " guestfs_mkswap (guestfs_h *g,\n"
30738 " const char *device);\n"
30743 #: ../src/guestfs-actions.pod:5475
30744 msgid "guestfs_mkswap_L"
30748 #: ../src/guestfs-actions.pod:5477
30752 " guestfs_mkswap_L (guestfs_h *g,\n"
30753 " const char *label,\n"
30754 " const char *device);\n"
30759 #: ../src/guestfs-actions.pod:5492
30760 msgid "guestfs_mkswap_U"
30764 #: ../src/guestfs-actions.pod:5494
30768 " guestfs_mkswap_U (guestfs_h *g,\n"
30769 " const char *uuid,\n"
30770 " const char *device);\n"
30775 #: ../src/guestfs-actions.pod:5505
30776 msgid "guestfs_mkswap_file"
30780 #: ../src/guestfs-actions.pod:5507
30784 " guestfs_mkswap_file (guestfs_h *g,\n"
30785 " const char *path);\n"
30790 #: ../src/guestfs-actions.pod:5513
30792 "This command just writes a swap file signature to an existing file. To "
30793 "create the file itself, use something like C<guestfs_fallocate>."
30797 #: ../src/guestfs-actions.pod:5520
30798 msgid "guestfs_modprobe"
30802 #: ../src/guestfs-actions.pod:5522
30806 " guestfs_modprobe (guestfs_h *g,\n"
30807 " const char *modulename);\n"
30812 #: ../src/guestfs-actions.pod:5535
30813 msgid "guestfs_mount"
30817 #: ../src/guestfs-actions.pod:5537
30821 " guestfs_mount (guestfs_h *g,\n"
30822 " const char *device,\n"
30823 " const char *mountpoint);\n"
30828 #: ../src/guestfs-actions.pod:5556
30830 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30831 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30832 "problems for users. If your program might need to work with older versions "
30833 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30834 "for the first parameter if you don't want any options)."
30838 #: ../src/guestfs-actions.pod:5567
30839 msgid "guestfs_mount_9p"
30843 #: ../src/guestfs-actions.pod:5569
30847 " guestfs_mount_9p (guestfs_h *g,\n"
30848 " const char *mounttag,\n"
30849 " const char *mountpoint,\n"
30855 #: ../src/guestfs-actions.pod:5580
30858 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30863 #: ../src/guestfs-actions.pod:5593
30864 msgid "guestfs_mount_9p_va"
30868 #: ../src/guestfs-actions.pod:5595
30872 " guestfs_mount_9p_va (guestfs_h *g,\n"
30873 " const char *mounttag,\n"
30874 " const char *mountpoint,\n"
30875 " va_list args);\n"
30880 #: ../src/guestfs-actions.pod:5601
30881 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30885 #: ../src/guestfs-actions.pod:5605
30886 msgid "guestfs_mount_9p_argv"
30890 #: ../src/guestfs-actions.pod:5607
30894 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30895 " const char *mounttag,\n"
30896 " const char *mountpoint,\n"
30897 " const struct guestfs_mount_9p_argv *optargs);\n"
30902 #: ../src/guestfs-actions.pod:5613
30903 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30907 #: ../src/guestfs-actions.pod:5617
30908 msgid "guestfs_mount_loop"
30912 #: ../src/guestfs-actions.pod:5619
30916 " guestfs_mount_loop (guestfs_h *g,\n"
30917 " const char *file,\n"
30918 " const char *mountpoint);\n"
30923 #: ../src/guestfs-actions.pod:5632
30924 msgid "guestfs_mount_options"
30928 #: ../src/guestfs-actions.pod:5634
30932 " guestfs_mount_options (guestfs_h *g,\n"
30933 " const char *options,\n"
30934 " const char *device,\n"
30935 " const char *mountpoint);\n"
30940 #: ../src/guestfs-actions.pod:5640
30942 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30943 "the mount options as for the L<mount(8)> I<-o> flag."
30947 #: ../src/guestfs-actions.pod:5650 ../src/guestfs-actions.pod:5664 ../src/guestfs-actions.pod:5681
30948 msgid "(Added in 1.0.10)"
30952 #: ../src/guestfs-actions.pod:5652
30953 msgid "guestfs_mount_ro"
30957 #: ../src/guestfs-actions.pod:5654
30961 " guestfs_mount_ro (guestfs_h *g,\n"
30962 " const char *device,\n"
30963 " const char *mountpoint);\n"
30968 #: ../src/guestfs-actions.pod:5659
30970 "This is the same as the C<guestfs_mount> command, but it mounts the "
30971 "filesystem with the read-only (I<-o ro>) flag."
30975 #: ../src/guestfs-actions.pod:5666
30976 msgid "guestfs_mount_vfs"
30980 #: ../src/guestfs-actions.pod:5668
30984 " guestfs_mount_vfs (guestfs_h *g,\n"
30985 " const char *options,\n"
30986 " const char *vfstype,\n"
30987 " const char *device,\n"
30988 " const char *mountpoint);\n"
30993 #: ../src/guestfs-actions.pod:5675
30995 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30996 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
31001 #: ../src/guestfs-actions.pod:5683
31002 msgid "guestfs_mountpoints"
31006 #: ../src/guestfs-actions.pod:5685
31010 " guestfs_mountpoints (guestfs_h *g);\n"
31015 #: ../src/guestfs-actions.pod:5688
31017 "This call is similar to C<guestfs_mounts>. That call returns a list of "
31018 "devices. This one returns a hash table (map) of device name to directory "
31019 "where the device is mounted."
31023 #: ../src/guestfs-actions.pod:5700
31024 msgid "guestfs_mounts"
31028 #: ../src/guestfs-actions.pod:5702
31032 " guestfs_mounts (guestfs_h *g);\n"
31037 #: ../src/guestfs-actions.pod:5710
31038 msgid "See also: C<guestfs_mountpoints>"
31042 #: ../src/guestfs-actions.pod:5718
31047 #: ../src/guestfs-actions.pod:5720
31051 " guestfs_mv (guestfs_h *g,\n"
31052 " const char *src,\n"
31053 " const char *dest);\n"
31058 #: ../src/guestfs-actions.pod:5732
31059 msgid "guestfs_ntfs_3g_probe"
31063 #: ../src/guestfs-actions.pod:5734
31067 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
31069 " const char *device);\n"
31074 #: ../src/guestfs-actions.pod:5753
31075 msgid "(Added in 1.0.43)"
31079 #: ../src/guestfs-actions.pod:5755
31080 msgid "guestfs_ntfsresize"
31084 #: ../src/guestfs-actions.pod:5757
31088 " guestfs_ntfsresize (guestfs_h *g,\n"
31089 " const char *device);\n"
31094 #: ../src/guestfs-actions.pod:5761 ../src/guestfs-actions.pod:5861
31096 "I<This function is deprecated.> In new code, use the "
31097 "L</guestfs_ntfsresize_opts> call instead."
31101 #: ../src/guestfs-actions.pod:5785
31102 msgid "guestfs_ntfsresize_opts"
31106 #: ../src/guestfs-actions.pod:5787
31110 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
31111 " const char *device,\n"
31117 #: ../src/guestfs-actions.pod:5797
31120 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
31121 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
31126 #: ../src/guestfs-actions.pod:5817
31128 "After the resize operation, the filesystem is always marked as requiring a "
31129 "consistency check (for safety). You have to boot into Windows to perform "
31130 "this check and clear this condition. If you I<don't> set the C<force> "
31131 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
31132 "times on a single filesystem without booting into Windows between each "
31137 #: ../src/guestfs-actions.pod:5832
31138 msgid "guestfs_ntfsresize_opts_va"
31142 #: ../src/guestfs-actions.pod:5834
31146 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
31147 " const char *device,\n"
31148 " va_list args);\n"
31153 #: ../src/guestfs-actions.pod:5839
31154 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
31158 #: ../src/guestfs-actions.pod:5843
31159 msgid "guestfs_ntfsresize_opts_argv"
31163 #: ../src/guestfs-actions.pod:5845
31167 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
31168 " const char *device,\n"
31169 " const struct guestfs_ntfsresize_opts_argv "
31175 #: ../src/guestfs-actions.pod:5850
31176 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
31180 #: ../src/guestfs-actions.pod:5854
31181 msgid "guestfs_ntfsresize_size"
31185 #: ../src/guestfs-actions.pod:5856
31189 " guestfs_ntfsresize_size (guestfs_h *g,\n"
31190 " const char *device,\n"
31191 " int64_t size);\n"
31196 #: ../src/guestfs-actions.pod:5868
31198 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
31199 "to specify the new size (in bytes) explicitly."
31203 #: ../src/guestfs-actions.pod:5873 ../src/guestfs-actions.pod:6332 ../src/guestfs-actions.pod:6405 ../src/guestfs-actions.pod:6673 ../src/guestfs-actions.pod:8422
31204 msgid "(Added in 1.3.14)"
31208 #: ../src/guestfs-actions.pod:5875
31209 msgid "guestfs_part_add"
31213 #: ../src/guestfs-actions.pod:5877
31217 " guestfs_part_add (guestfs_h *g,\n"
31218 " const char *device,\n"
31219 " const char *prlogex,\n"
31220 " int64_t startsect,\n"
31221 " int64_t endsect);\n"
31226 #: ../src/guestfs-actions.pod:5884
31228 "This command adds a partition to C<device>. If there is no partition table "
31229 "on the device, call C<guestfs_part_init> first."
31233 #: ../src/guestfs-actions.pod:5896
31235 "Creating a partition which covers the whole disk is not so easy. Use "
31236 "C<guestfs_part_disk> to do that."
31240 #: ../src/guestfs-actions.pod:5901 ../src/guestfs-actions.pod:5936 ../src/guestfs-actions.pod:5989 ../src/guestfs-actions.pod:6073 ../src/guestfs-actions.pod:6111 ../src/guestfs-actions.pod:6130 ../src/guestfs-actions.pod:6170
31241 msgid "(Added in 1.0.78)"
31245 #: ../src/guestfs-actions.pod:5903
31246 msgid "guestfs_part_del"
31250 #: ../src/guestfs-actions.pod:5905
31254 " guestfs_part_del (guestfs_h *g,\n"
31255 " const char *device,\n"
31261 #: ../src/guestfs-actions.pod:5920
31262 msgid "guestfs_part_disk"
31266 #: ../src/guestfs-actions.pod:5922
31270 " guestfs_part_disk (guestfs_h *g,\n"
31271 " const char *device,\n"
31272 " const char *parttype);\n"
31277 #: ../src/guestfs-actions.pod:5927
31279 "This command is simply a combination of C<guestfs_part_init> followed by "
31280 "C<guestfs_part_add> to create a single primary partition covering the whole "
31285 #: ../src/guestfs-actions.pod:5931
31287 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
31288 "possible values are described in C<guestfs_part_init>."
31292 #: ../src/guestfs-actions.pod:5938
31293 msgid "guestfs_part_get_bootable"
31297 #: ../src/guestfs-actions.pod:5940
31301 " guestfs_part_get_bootable (guestfs_h *g,\n"
31302 " const char *device,\n"
31308 #: ../src/guestfs-actions.pod:5948
31309 msgid "See also C<guestfs_part_set_bootable>."
31313 #: ../src/guestfs-actions.pod:5954
31314 msgid "guestfs_part_get_mbr_id"
31318 #: ../src/guestfs-actions.pod:5956
31322 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
31323 " const char *device,\n"
31329 #: ../src/guestfs-actions.pod:5964 ../src/guestfs-actions.pod:6146
31331 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
31332 "undefined results for other partition table types (see "
31333 "C<guestfs_part_get_parttype>)."
31337 #: ../src/guestfs-actions.pod:5972
31338 msgid "guestfs_part_get_parttype"
31342 #: ../src/guestfs-actions.pod:5974
31346 " guestfs_part_get_parttype (guestfs_h *g,\n"
31347 " const char *device);\n"
31352 #: ../src/guestfs-actions.pod:5981
31354 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
31355 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
31356 "possible, although unusual. See C<guestfs_part_init> for a full list."
31360 #: ../src/guestfs-actions.pod:5991
31361 msgid "guestfs_part_init"
31365 #: ../src/guestfs-actions.pod:5993
31369 " guestfs_part_init (guestfs_h *g,\n"
31370 " const char *device,\n"
31371 " const char *parttype);\n"
31376 #: ../src/guestfs-actions.pod:6002
31378 "Initially there are no partitions. Following this, you should call "
31379 "C<guestfs_part_add> for each partition required."
31383 #: ../src/guestfs-actions.pod:6075
31384 msgid "guestfs_part_list"
31388 #: ../src/guestfs-actions.pod:6077
31391 " struct guestfs_partition_list *\n"
31392 " guestfs_part_list (guestfs_h *g,\n"
31393 " const char *device);\n"
31398 #: ../src/guestfs-actions.pod:6094
31400 "Start of the partition I<in bytes>. To get sectors you have to divide by "
31401 "the device's sector size, see C<guestfs_blockdev_getss>."
31405 #: ../src/guestfs-actions.pod:6107
31407 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
31408 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
31413 #: ../src/guestfs-actions.pod:6113
31414 msgid "guestfs_part_set_bootable"
31418 #: ../src/guestfs-actions.pod:6115
31422 " guestfs_part_set_bootable (guestfs_h *g,\n"
31423 " const char *device,\n"
31425 " int bootable);\n"
31430 #: ../src/guestfs-actions.pod:6132
31431 msgid "guestfs_part_set_mbr_id"
31435 #: ../src/guestfs-actions.pod:6134
31439 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
31440 " const char *device,\n"
31447 #: ../src/guestfs-actions.pod:6154
31448 msgid "guestfs_part_set_name"
31452 #: ../src/guestfs-actions.pod:6156
31456 " guestfs_part_set_name (guestfs_h *g,\n"
31457 " const char *device,\n"
31459 " const char *name);\n"
31464 #: ../src/guestfs-actions.pod:6172
31465 msgid "guestfs_part_to_dev"
31469 #: ../src/guestfs-actions.pod:6174
31473 " guestfs_part_to_dev (guestfs_h *g,\n"
31474 " const char *partition);\n"
31479 #: ../src/guestfs-actions.pod:6182 ../src/guestfs-actions.pod:6201
31481 "The named partition must exist, for example as a string returned from "
31482 "C<guestfs_list_partitions>."
31486 #: ../src/guestfs-actions.pod:6185
31487 msgid "See also C<guestfs_part_to_partnum>."
31491 #: ../src/guestfs-actions.pod:6192
31492 msgid "guestfs_part_to_partnum"
31496 #: ../src/guestfs-actions.pod:6194
31500 " guestfs_part_to_partnum (guestfs_h *g,\n"
31501 " const char *partition);\n"
31506 #: ../src/guestfs-actions.pod:6204
31507 msgid "See also C<guestfs_part_to_dev>."
31511 #: ../src/guestfs-actions.pod:6210
31512 msgid "guestfs_ping_daemon"
31516 #: ../src/guestfs-actions.pod:6212
31520 " guestfs_ping_daemon (guestfs_h *g);\n"
31525 #: ../src/guestfs-actions.pod:6224
31526 msgid "guestfs_pread"
31530 #: ../src/guestfs-actions.pod:6226
31534 " guestfs_pread (guestfs_h *g,\n"
31535 " const char *path,\n"
31537 " int64_t offset,\n"
31538 " size_t *size_r);\n"
31543 #: ../src/guestfs-actions.pod:6239
31544 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
31548 #: ../src/guestfs-actions.pod:6250
31549 msgid "guestfs_pread_device"
31553 #: ../src/guestfs-actions.pod:6252
31557 " guestfs_pread_device (guestfs_h *g,\n"
31558 " const char *device,\n"
31560 " int64_t offset,\n"
31561 " size_t *size_r);\n"
31566 #: ../src/guestfs-actions.pod:6265
31567 msgid "See also C<guestfs_pread>."
31571 #: ../src/guestfs-actions.pod:6274
31572 msgid "(Added in 1.5.21)"
31576 #: ../src/guestfs-actions.pod:6276
31577 msgid "guestfs_pvcreate"
31581 #: ../src/guestfs-actions.pod:6278
31585 " guestfs_pvcreate (guestfs_h *g,\n"
31586 " const char *device);\n"
31591 #: ../src/guestfs-actions.pod:6290
31592 msgid "guestfs_pvremove"
31596 #: ../src/guestfs-actions.pod:6292
31600 " guestfs_pvremove (guestfs_h *g,\n"
31601 " const char *device);\n"
31606 #: ../src/guestfs-actions.pod:6307
31607 msgid "guestfs_pvresize"
31611 #: ../src/guestfs-actions.pod:6309
31615 " guestfs_pvresize (guestfs_h *g,\n"
31616 " const char *device);\n"
31621 #: ../src/guestfs-actions.pod:6320
31622 msgid "guestfs_pvresize_size"
31626 #: ../src/guestfs-actions.pod:6322
31630 " guestfs_pvresize_size (guestfs_h *g,\n"
31631 " const char *device,\n"
31632 " int64_t size);\n"
31637 #: ../src/guestfs-actions.pod:6327
31639 "This command is the same as C<guestfs_pvresize> except that it allows you to "
31640 "specify the new size (in bytes) explicitly."
31644 #: ../src/guestfs-actions.pod:6334
31645 msgid "guestfs_pvs"
31649 #: ../src/guestfs-actions.pod:6336
31653 " guestfs_pvs (guestfs_h *g);\n"
31658 #: ../src/guestfs-actions.pod:6345
31659 msgid "See also C<guestfs_pvs_full>."
31663 #: ../src/guestfs-actions.pod:6353
31664 msgid "guestfs_pvs_full"
31668 #: ../src/guestfs-actions.pod:6355
31671 " struct guestfs_lvm_pv_list *\n"
31672 " guestfs_pvs_full (guestfs_h *g);\n"
31677 #: ../src/guestfs-actions.pod:6361
31679 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31680 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
31685 #: ../src/guestfs-actions.pod:6367
31686 msgid "guestfs_pvuuid"
31690 #: ../src/guestfs-actions.pod:6369
31694 " guestfs_pvuuid (guestfs_h *g,\n"
31695 " const char *device);\n"
31700 #: ../src/guestfs-actions.pod:6380
31701 msgid "guestfs_pwrite"
31705 #: ../src/guestfs-actions.pod:6382
31709 " guestfs_pwrite (guestfs_h *g,\n"
31710 " const char *path,\n"
31711 " const char *content,\n"
31712 " size_t content_size,\n"
31713 " int64_t offset);\n"
31718 #: ../src/guestfs-actions.pod:6398
31719 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31723 #: ../src/guestfs-actions.pod:6407
31724 msgid "guestfs_pwrite_device"
31728 #: ../src/guestfs-actions.pod:6409
31732 " guestfs_pwrite_device (guestfs_h *g,\n"
31733 " const char *device,\n"
31734 " const char *content,\n"
31735 " size_t content_size,\n"
31736 " int64_t offset);\n"
31741 #: ../src/guestfs-actions.pod:6424
31742 msgid "See also C<guestfs_pwrite>."
31746 #: ../src/guestfs-actions.pod:6431
31747 msgid "(Added in 1.5.20)"
31751 #: ../src/guestfs-actions.pod:6433
31752 msgid "guestfs_read_file"
31756 #: ../src/guestfs-actions.pod:6435
31760 " guestfs_read_file (guestfs_h *g,\n"
31761 " const char *path,\n"
31762 " size_t *size_r);\n"
31767 #: ../src/guestfs-actions.pod:6443
31769 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
31770 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31771 "function is limited in the total size of file that can be handled."
31775 #: ../src/guestfs-actions.pod:6455
31776 msgid "(Added in 1.0.63)"
31780 #: ../src/guestfs-actions.pod:6457
31781 msgid "guestfs_read_lines"
31785 #: ../src/guestfs-actions.pod:6459
31789 " guestfs_read_lines (guestfs_h *g,\n"
31790 " const char *path);\n"
31795 #: ../src/guestfs-actions.pod:6468
31797 "Note that this function cannot correctly handle binary files (specifically, "
31798 "files containing C<\\0> character which is treated as end of line). For "
31799 "those you need to use the C<guestfs_read_file> function which has a more "
31800 "complex interface."
31804 #: ../src/guestfs-actions.pod:6479
31805 msgid "guestfs_readdir"
31809 #: ../src/guestfs-actions.pod:6481
31812 " struct guestfs_dirent_list *\n"
31813 " guestfs_readdir (guestfs_h *g,\n"
31814 " const char *dir);\n"
31819 #: ../src/guestfs-actions.pod:6535
31821 "This function is primarily intended for use by programs. To get a simple "
31822 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31823 "consumption, use C<guestfs_ll>."
31827 #: ../src/guestfs-actions.pod:6539
31829 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31830 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
31835 #: ../src/guestfs-actions.pod:6545
31836 msgid "guestfs_readlink"
31840 #: ../src/guestfs-actions.pod:6547
31844 " guestfs_readlink (guestfs_h *g,\n"
31845 " const char *path);\n"
31850 #: ../src/guestfs-actions.pod:6558
31851 msgid "guestfs_readlinklist"
31855 #: ../src/guestfs-actions.pod:6560
31859 " guestfs_readlinklist (guestfs_h *g,\n"
31860 " const char *path,\n"
31861 " char *const *names);\n"
31866 #: ../src/guestfs-actions.pod:6593
31867 msgid "guestfs_realpath"
31871 #: ../src/guestfs-actions.pod:6595
31875 " guestfs_realpath (guestfs_h *g,\n"
31876 " const char *path);\n"
31881 #: ../src/guestfs-actions.pod:6607
31882 msgid "guestfs_removexattr"
31886 #: ../src/guestfs-actions.pod:6609
31890 " guestfs_removexattr (guestfs_h *g,\n"
31891 " const char *xattr,\n"
31892 " const char *path);\n"
31897 #: ../src/guestfs-actions.pod:6617
31898 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31902 #: ../src/guestfs-actions.pod:6623
31903 msgid "guestfs_resize2fs"
31907 #: ../src/guestfs-actions.pod:6625
31911 " guestfs_resize2fs (guestfs_h *g,\n"
31912 " const char *device);\n"
31917 #: ../src/guestfs-actions.pod:6632
31919 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31920 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31921 "sometimes gives an error about this and sometimes not. In any case, it is "
31922 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31926 #: ../src/guestfs-actions.pod:6642
31927 msgid "guestfs_resize2fs_M"
31931 #: ../src/guestfs-actions.pod:6644
31935 " guestfs_resize2fs_M (guestfs_h *g,\n"
31936 " const char *device);\n"
31941 #: ../src/guestfs-actions.pod:6648
31943 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31944 "resized to its minimum size. This works like the I<-M> option to the "
31945 "C<resize2fs> command."
31949 #: ../src/guestfs-actions.pod:6652
31951 "To get the resulting size of the filesystem you should call "
31952 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31953 "These two numbers, multiplied together, give the resulting size of the "
31954 "minimal filesystem in bytes."
31958 #: ../src/guestfs-actions.pod:6661
31959 msgid "guestfs_resize2fs_size"
31963 #: ../src/guestfs-actions.pod:6663
31967 " guestfs_resize2fs_size (guestfs_h *g,\n"
31968 " const char *device,\n"
31969 " int64_t size);\n"
31974 #: ../src/guestfs-actions.pod:6668
31976 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31977 "to specify the new size (in bytes) explicitly."
31981 #: ../src/guestfs-actions.pod:6675
31986 #: ../src/guestfs-actions.pod:6677
31990 " guestfs_rm (guestfs_h *g,\n"
31991 " const char *path);\n"
31996 #: ../src/guestfs-actions.pod:6687
31997 msgid "guestfs_rm_rf"
32001 #: ../src/guestfs-actions.pod:6689
32005 " guestfs_rm_rf (guestfs_h *g,\n"
32006 " const char *path);\n"
32011 #: ../src/guestfs-actions.pod:6701
32012 msgid "guestfs_rmdir"
32016 #: ../src/guestfs-actions.pod:6703
32020 " guestfs_rmdir (guestfs_h *g,\n"
32021 " const char *path);\n"
32026 #: ../src/guestfs-actions.pod:6713
32027 msgid "guestfs_rmmountpoint"
32031 #: ../src/guestfs-actions.pod:6715
32035 " guestfs_rmmountpoint (guestfs_h *g,\n"
32036 " const char *exemptpath);\n"
32041 #: ../src/guestfs-actions.pod:6719
32043 "This calls removes a mountpoint that was previously created with "
32044 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
32048 #: ../src/guestfs-actions.pod:6727
32049 msgid "guestfs_scrub_device"
32053 #: ../src/guestfs-actions.pod:6729
32057 " guestfs_scrub_device (guestfs_h *g,\n"
32058 " const char *device);\n"
32063 #: ../src/guestfs-actions.pod:6741 ../src/guestfs-actions.pod:6759 ../src/guestfs-actions.pod:6778
32064 msgid "(Added in 1.0.52)"
32068 #: ../src/guestfs-actions.pod:6743
32069 msgid "guestfs_scrub_file"
32073 #: ../src/guestfs-actions.pod:6745
32077 " guestfs_scrub_file (guestfs_h *g,\n"
32078 " const char *file);\n"
32083 #: ../src/guestfs-actions.pod:6761
32084 msgid "guestfs_scrub_freespace"
32088 #: ../src/guestfs-actions.pod:6763
32092 " guestfs_scrub_freespace (guestfs_h *g,\n"
32093 " const char *dir);\n"
32098 #: ../src/guestfs-actions.pod:6767
32100 "This command creates the directory C<dir> and then fills it with files until "
32101 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
32102 "and deletes them. The intention is to scrub any free space on the partition "
32103 "containing C<dir>."
32107 #: ../src/guestfs-actions.pod:6780
32108 msgid "guestfs_set_append"
32112 #: ../src/guestfs-actions.pod:6782
32116 " guestfs_set_append (guestfs_h *g,\n"
32117 " const char *append);\n"
32122 #: ../src/guestfs-actions.pod:6799
32123 msgid "guestfs_set_attach_method"
32127 #: ../src/guestfs-actions.pod:6801
32131 " guestfs_set_attach_method (guestfs_h *g,\n"
32132 " const char *attachmethod);\n"
32137 #: ../src/guestfs-actions.pod:6829
32138 msgid "guestfs_set_autosync"
32142 #: ../src/guestfs-actions.pod:6831
32146 " guestfs_set_autosync (guestfs_h *g,\n"
32147 " int autosync);\n"
32152 #: ../src/guestfs-actions.pod:6847
32153 msgid "guestfs_set_direct"
32157 #: ../src/guestfs-actions.pod:6849
32161 " guestfs_set_direct (guestfs_h *g,\n"
32167 #: ../src/guestfs-actions.pod:6857
32169 "One consequence of this is that log messages aren't caught by the library "
32170 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
32175 #: ../src/guestfs-actions.pod:6870
32176 msgid "guestfs_set_e2label"
32180 #: ../src/guestfs-actions.pod:6872
32184 " guestfs_set_e2label (guestfs_h *g,\n"
32185 " const char *device,\n"
32186 " const char *label);\n"
32191 #: ../src/guestfs-actions.pod:6881
32193 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
32194 "the existing label on a filesystem."
32198 #: ../src/guestfs-actions.pod:6888
32199 msgid "guestfs_set_e2uuid"
32203 #: ../src/guestfs-actions.pod:6890
32207 " guestfs_set_e2uuid (guestfs_h *g,\n"
32208 " const char *device,\n"
32209 " const char *uuid);\n"
32214 #: ../src/guestfs-actions.pod:6900
32216 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
32217 "the existing UUID of a filesystem."
32221 #: ../src/guestfs-actions.pod:6907
32222 msgid "guestfs_set_memsize"
32226 #: ../src/guestfs-actions.pod:6909
32230 " guestfs_set_memsize (guestfs_h *g,\n"
32236 #: ../src/guestfs-actions.pod:6913
32238 "This sets the memory size in megabytes allocated to the qemu subprocess. "
32239 "This only has any effect if called before C<guestfs_launch>."
32243 #: ../src/guestfs-actions.pod:6928
32244 msgid "guestfs_set_network"
32248 #: ../src/guestfs-actions.pod:6930
32252 " guestfs_set_network (guestfs_h *g,\n"
32258 #: ../src/guestfs-actions.pod:6940
32260 "You must call this before calling C<guestfs_launch>, otherwise it has no "
32265 #: ../src/guestfs-actions.pod:6947
32266 msgid "guestfs_set_path"
32270 #: ../src/guestfs-actions.pod:6949
32274 " guestfs_set_path (guestfs_h *g,\n"
32275 " const char *searchpath);\n"
32280 #: ../src/guestfs-actions.pod:6964
32281 msgid "guestfs_set_pgroup"
32285 #: ../src/guestfs-actions.pod:6966
32289 " guestfs_set_pgroup (guestfs_h *g,\n"
32295 #: ../src/guestfs-actions.pod:6983
32296 msgid "guestfs_set_qemu"
32300 #: ../src/guestfs-actions.pod:6985
32304 " guestfs_set_qemu (guestfs_h *g,\n"
32305 " const char *qemu);\n"
32310 #: ../src/guestfs-actions.pod:7011
32311 msgid "guestfs_set_recovery_proc"
32315 #: ../src/guestfs-actions.pod:7013
32319 " guestfs_set_recovery_proc (guestfs_h *g,\n"
32320 " int recoveryproc);\n"
32325 #: ../src/guestfs-actions.pod:7017
32327 "If this is called with the parameter C<false> then C<guestfs_launch> does "
32328 "not create a recovery process. The purpose of the recovery process is to "
32329 "stop runaway qemu processes in the case where the main program aborts "
32334 #: ../src/guestfs-actions.pod:7022
32336 "This only has any effect if called before C<guestfs_launch>, and the default "
32341 #: ../src/guestfs-actions.pod:7035
32342 msgid "guestfs_set_selinux"
32346 #: ../src/guestfs-actions.pod:7037
32350 " guestfs_set_selinux (guestfs_h *g,\n"
32356 #: ../src/guestfs-actions.pod:7054
32357 msgid "guestfs_set_smp"
32361 #: ../src/guestfs-actions.pod:7056
32365 " guestfs_set_smp (guestfs_h *g,\n"
32371 #: ../src/guestfs-actions.pod:7064
32372 msgid "This function must be called before C<guestfs_launch>."
32376 #: ../src/guestfs-actions.pod:7070
32377 msgid "guestfs_set_trace"
32381 #: ../src/guestfs-actions.pod:7072
32385 " guestfs_set_trace (guestfs_h *g,\n"
32391 #: ../src/guestfs-actions.pod:7086
32393 "Trace messages are normally sent to C<stderr>, unless you register a "
32394 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32398 #: ../src/guestfs-actions.pod:7094
32399 msgid "guestfs_set_verbose"
32403 #: ../src/guestfs-actions.pod:7096
32407 " guestfs_set_verbose (guestfs_h *g,\n"
32413 #: ../src/guestfs-actions.pod:7105
32415 "Verbose messages are normally sent to C<stderr>, unless you register a "
32416 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32420 #: ../src/guestfs-actions.pod:7113
32421 msgid "guestfs_setcon"
32425 #: ../src/guestfs-actions.pod:7115
32429 " guestfs_setcon (guestfs_h *g,\n"
32430 " const char *context);\n"
32435 #: ../src/guestfs-actions.pod:7128
32436 msgid "guestfs_setxattr"
32440 #: ../src/guestfs-actions.pod:7130
32444 " guestfs_setxattr (guestfs_h *g,\n"
32445 " const char *xattr,\n"
32446 " const char *val,\n"
32448 " const char *path);\n"
32453 #: ../src/guestfs-actions.pod:7141
32454 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
32458 #: ../src/guestfs-actions.pod:7147
32459 msgid "guestfs_sfdisk"
32463 #: ../src/guestfs-actions.pod:7149
32467 " guestfs_sfdisk (guestfs_h *g,\n"
32468 " const char *device,\n"
32472 " char *const *lines);\n"
32477 #: ../src/guestfs-actions.pod:7157 ../src/guestfs-actions.pod:7198 ../src/guestfs-actions.pod:7229
32479 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
32484 #: ../src/guestfs-actions.pod:7184
32485 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
32489 #: ../src/guestfs-actions.pod:7191
32490 msgid "guestfs_sfdiskM"
32494 #: ../src/guestfs-actions.pod:7193
32498 " guestfs_sfdiskM (guestfs_h *g,\n"
32499 " const char *device,\n"
32500 " char *const *lines);\n"
32505 #: ../src/guestfs-actions.pod:7205
32507 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
32508 "partition sizes are specified in megabytes only (rounded to the nearest "
32509 "cylinder) and you don't need to specify the cyls, heads and sectors "
32510 "parameters which were rarely if ever used anyway."
32514 #: ../src/guestfs-actions.pod:7211
32516 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
32517 "C<guestfs_part_disk>"
32521 #: ../src/guestfs-actions.pod:7218
32522 msgid "guestfs_sfdisk_N"
32526 #: ../src/guestfs-actions.pod:7220
32530 " guestfs_sfdisk_N (guestfs_h *g,\n"
32531 " const char *device,\n"
32536 " const char *line);\n"
32541 #: ../src/guestfs-actions.pod:7239
32543 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
32544 "for the cyls/heads/sectors parameters."
32548 #: ../src/guestfs-actions.pod:7242
32549 msgid "See also: C<guestfs_part_add>"
32553 #: ../src/guestfs-actions.pod:7248
32554 msgid "guestfs_sfdisk_disk_geometry"
32558 #: ../src/guestfs-actions.pod:7250
32562 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
32563 " const char *device);\n"
32568 #: ../src/guestfs-actions.pod:7254
32570 "This displays the disk geometry of C<device> read from the partition table. "
32571 "Especially in the case where the underlying block device has been resized, "
32572 "this can be different from the kernel's idea of the geometry (see "
32573 "C<guestfs_sfdisk_kernel_geometry>)."
32577 #: ../src/guestfs-actions.pod:7267
32578 msgid "guestfs_sfdisk_kernel_geometry"
32582 #: ../src/guestfs-actions.pod:7269
32586 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
32587 " const char *device);\n"
32592 #: ../src/guestfs-actions.pod:7283
32593 msgid "guestfs_sfdisk_l"
32597 #: ../src/guestfs-actions.pod:7285
32601 " guestfs_sfdisk_l (guestfs_h *g,\n"
32602 " const char *device);\n"
32607 #: ../src/guestfs-actions.pod:7289
32609 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
32614 #: ../src/guestfs-actions.pod:7300
32615 msgid "See also: C<guestfs_part_list>"
32619 #: ../src/guestfs-actions.pod:7307
32624 #: ../src/guestfs-actions.pod:7309
32628 " guestfs_sh (guestfs_h *g,\n"
32629 " const char *command);\n"
32634 #: ../src/guestfs-actions.pod:7316
32635 msgid "This is like C<guestfs_command>, but passes the command to:"
32639 #: ../src/guestfs-actions.pod:7324
32640 msgid "All the provisos about C<guestfs_command> apply to this call."
32644 #: ../src/guestfs-actions.pod:7331
32645 msgid "guestfs_sh_lines"
32649 #: ../src/guestfs-actions.pod:7333
32653 " guestfs_sh_lines (guestfs_h *g,\n"
32654 " const char *command);\n"
32659 #: ../src/guestfs-actions.pod:7337
32661 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32666 #: ../src/guestfs-actions.pod:7340
32667 msgid "See also: C<guestfs_command_lines>"
32671 #: ../src/guestfs-actions.pod:7348
32672 msgid "guestfs_sleep"
32676 #: ../src/guestfs-actions.pod:7350
32680 " guestfs_sleep (guestfs_h *g,\n"
32686 #: ../src/guestfs-actions.pod:7358
32687 msgid "(Added in 1.0.41)"
32691 #: ../src/guestfs-actions.pod:7360 ../src/guestfs-structs.pod:109
32692 msgid "guestfs_stat"
32696 #: ../src/guestfs-actions.pod:7362
32699 " struct guestfs_stat *\n"
32700 " guestfs_stat (guestfs_h *g,\n"
32701 " const char *path);\n"
32706 #: ../src/guestfs-actions.pod:7376 ../src/guestfs-structs.pod:135
32707 msgid "guestfs_statvfs"
32711 #: ../src/guestfs-actions.pod:7378
32714 " struct guestfs_statvfs *\n"
32715 " guestfs_statvfs (guestfs_h *g,\n"
32716 " const char *path);\n"
32721 #: ../src/guestfs-actions.pod:7388
32723 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
32724 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
32728 #: ../src/guestfs-actions.pod:7394
32729 msgid "guestfs_strings"
32733 #: ../src/guestfs-actions.pod:7396
32737 " guestfs_strings (guestfs_h *g,\n"
32738 " const char *path);\n"
32743 #: ../src/guestfs-actions.pod:7412
32744 msgid "guestfs_strings_e"
32748 #: ../src/guestfs-actions.pod:7414
32752 " guestfs_strings_e (guestfs_h *g,\n"
32753 " const char *encoding,\n"
32754 " const char *path);\n"
32759 #: ../src/guestfs-actions.pod:7419
32761 "This is like the C<guestfs_strings> command, but allows you to specify the "
32762 "encoding of strings that are looked for in the source file C<path>."
32766 #: ../src/guestfs-actions.pod:7429
32768 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32769 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32773 #: ../src/guestfs-actions.pod:7467
32774 msgid "guestfs_swapoff_device"
32778 #: ../src/guestfs-actions.pod:7469
32782 " guestfs_swapoff_device (guestfs_h *g,\n"
32783 " const char *device);\n"
32788 #: ../src/guestfs-actions.pod:7473
32790 "This command disables the libguestfs appliance swap device or partition "
32791 "named C<device>. See C<guestfs_swapon_device>."
32795 #: ../src/guestfs-actions.pod:7481
32796 msgid "guestfs_swapoff_file"
32800 #: ../src/guestfs-actions.pod:7483
32804 " guestfs_swapoff_file (guestfs_h *g,\n"
32805 " const char *file);\n"
32810 #: ../src/guestfs-actions.pod:7493
32811 msgid "guestfs_swapoff_label"
32815 #: ../src/guestfs-actions.pod:7495
32819 " guestfs_swapoff_label (guestfs_h *g,\n"
32820 " const char *label);\n"
32825 #: ../src/guestfs-actions.pod:7506
32826 msgid "guestfs_swapoff_uuid"
32830 #: ../src/guestfs-actions.pod:7508
32834 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32835 " const char *uuid);\n"
32840 #: ../src/guestfs-actions.pod:7519
32841 msgid "guestfs_swapon_device"
32845 #: ../src/guestfs-actions.pod:7521
32849 " guestfs_swapon_device (guestfs_h *g,\n"
32850 " const char *device);\n"
32855 #: ../src/guestfs-actions.pod:7525
32857 "This command enables the libguestfs appliance to use the swap device or "
32858 "partition named C<device>. The increased memory is made available for all "
32859 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32863 #: ../src/guestfs-actions.pod:7541
32864 msgid "guestfs_swapon_file"
32868 #: ../src/guestfs-actions.pod:7543
32872 " guestfs_swapon_file (guestfs_h *g,\n"
32873 " const char *file);\n"
32878 #: ../src/guestfs-actions.pod:7547
32880 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32885 #: ../src/guestfs-actions.pod:7554
32886 msgid "guestfs_swapon_label"
32890 #: ../src/guestfs-actions.pod:7556
32894 " guestfs_swapon_label (guestfs_h *g,\n"
32895 " const char *label);\n"
32900 #: ../src/guestfs-actions.pod:7560
32902 "This command enables swap to a labeled swap partition. See "
32903 "C<guestfs_swapon_device> for other notes."
32907 #: ../src/guestfs-actions.pod:7567
32908 msgid "guestfs_swapon_uuid"
32912 #: ../src/guestfs-actions.pod:7569
32916 " guestfs_swapon_uuid (guestfs_h *g,\n"
32917 " const char *uuid);\n"
32922 #: ../src/guestfs-actions.pod:7573
32924 "This command enables swap to a swap partition with the given UUID. See "
32925 "C<guestfs_swapon_device> for other notes."
32929 #: ../src/guestfs-actions.pod:7580
32930 msgid "guestfs_sync"
32934 #: ../src/guestfs-actions.pod:7582
32938 " guestfs_sync (guestfs_h *g);\n"
32943 #: ../src/guestfs-actions.pod:7595
32944 msgid "guestfs_tail"
32948 #: ../src/guestfs-actions.pod:7597
32952 " guestfs_tail (guestfs_h *g,\n"
32953 " const char *path);\n"
32958 #: ../src/guestfs-actions.pod:7613
32959 msgid "guestfs_tail_n"
32963 #: ../src/guestfs-actions.pod:7615
32967 " guestfs_tail_n (guestfs_h *g,\n"
32969 " const char *path);\n"
32974 #: ../src/guestfs-actions.pod:7637
32975 msgid "guestfs_tar_in"
32979 #: ../src/guestfs-actions.pod:7639
32983 " guestfs_tar_in (guestfs_h *g,\n"
32984 " const char *tarfile,\n"
32985 " const char *directory);\n"
32990 #: ../src/guestfs-actions.pod:7647
32991 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32995 #: ../src/guestfs-actions.pod:7652 ../src/guestfs-actions.pod:7669 ../src/guestfs-actions.pod:7685 ../src/guestfs-actions.pod:7701
32996 msgid "(Added in 1.0.3)"
33000 #: ../src/guestfs-actions.pod:7654
33001 msgid "guestfs_tar_out"
33005 #: ../src/guestfs-actions.pod:7656
33009 " guestfs_tar_out (guestfs_h *g,\n"
33010 " const char *directory,\n"
33011 " const char *tarfile);\n"
33016 #: ../src/guestfs-actions.pod:7664
33018 "To download a compressed tarball, use C<guestfs_tgz_out> or "
33019 "C<guestfs_txz_out>."
33023 #: ../src/guestfs-actions.pod:7671
33024 msgid "guestfs_tgz_in"
33028 #: ../src/guestfs-actions.pod:7673
33032 " guestfs_tgz_in (guestfs_h *g,\n"
33033 " const char *tarball,\n"
33034 " const char *directory);\n"
33039 #: ../src/guestfs-actions.pod:7681
33040 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
33044 #: ../src/guestfs-actions.pod:7687
33045 msgid "guestfs_tgz_out"
33049 #: ../src/guestfs-actions.pod:7689
33053 " guestfs_tgz_out (guestfs_h *g,\n"
33054 " const char *directory,\n"
33055 " const char *tarball);\n"
33060 #: ../src/guestfs-actions.pod:7697
33061 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
33065 #: ../src/guestfs-actions.pod:7703
33066 msgid "guestfs_touch"
33070 #: ../src/guestfs-actions.pod:7705
33074 " guestfs_touch (guestfs_h *g,\n"
33075 " const char *path);\n"
33080 #: ../src/guestfs-actions.pod:7720
33081 msgid "guestfs_truncate"
33085 #: ../src/guestfs-actions.pod:7722
33089 " guestfs_truncate (guestfs_h *g,\n"
33090 " const char *path);\n"
33095 #: ../src/guestfs-actions.pod:7733
33096 msgid "guestfs_truncate_size"
33100 #: ../src/guestfs-actions.pod:7735
33104 " guestfs_truncate_size (guestfs_h *g,\n"
33105 " const char *path,\n"
33106 " int64_t size);\n"
33111 #: ../src/guestfs-actions.pod:7743
33113 "If the current file size is less than C<size> then the file is extended to "
33114 "the required size with zero bytes. This creates a sparse file (ie. disk "
33115 "blocks are not allocated for the file until you write to it). To create a "
33116 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
33120 #: ../src/guestfs-actions.pod:7753
33121 msgid "guestfs_tune2fs"
33125 #: ../src/guestfs-actions.pod:7755
33129 " guestfs_tune2fs (guestfs_h *g,\n"
33130 " const char *device,\n"
33136 #: ../src/guestfs-actions.pod:7765
33139 " GUESTFS_TUNE2FS_FORCE, int force,\n"
33140 " GUESTFS_TUNE2FS_MAXMOUNTCOUNT, int maxmountcount,\n"
33141 " GUESTFS_TUNE2FS_MOUNTCOUNT, int mountcount,\n"
33142 " GUESTFS_TUNE2FS_ERRORBEHAVIOR, const char *errorbehavior,\n"
33143 " GUESTFS_TUNE2FS_GROUP, int64_t group,\n"
33144 " GUESTFS_TUNE2FS_INTERVALBETWEENCHECKS, int intervalbetweenchecks,\n"
33145 " GUESTFS_TUNE2FS_RESERVEDBLOCKSPERCENTAGE, int reservedblockspercentage,\n"
33146 " GUESTFS_TUNE2FS_LASTMOUNTEDDIRECTORY, const char *lastmounteddirectory,\n"
33147 " GUESTFS_TUNE2FS_RESERVEDBLOCKSCOUNT, int64_t reservedblockscount,\n"
33148 " GUESTFS_TUNE2FS_USER, int64_t user,\n"
33153 #: ../src/guestfs-actions.pod:7845
33155 "To get the current values of filesystem parameters, see "
33156 "C<guestfs_tune2fs_l>. For precise details of how tune2fs works, see the "
33157 "L<tune2fs(8)> man page."
33161 #: ../src/guestfs-actions.pod:7853
33162 msgid "guestfs_tune2fs_va"
33166 #: ../src/guestfs-actions.pod:7855
33170 " guestfs_tune2fs_va (guestfs_h *g,\n"
33171 " const char *device,\n"
33172 " va_list args);\n"
33177 #: ../src/guestfs-actions.pod:7860
33178 msgid "This is the \"va_list variant\" of L</guestfs_tune2fs>."
33182 #: ../src/guestfs-actions.pod:7864
33183 msgid "guestfs_tune2fs_argv"
33187 #: ../src/guestfs-actions.pod:7866
33191 " guestfs_tune2fs_argv (guestfs_h *g,\n"
33192 " const char *device,\n"
33193 " const struct guestfs_tune2fs_argv *optargs);\n"
33198 #: ../src/guestfs-actions.pod:7871
33199 msgid "This is the \"argv variant\" of L</guestfs_tune2fs>."
33203 #: ../src/guestfs-actions.pod:7875
33204 msgid "guestfs_tune2fs_l"
33208 #: ../src/guestfs-actions.pod:7877
33212 " guestfs_tune2fs_l (guestfs_h *g,\n"
33213 " const char *device);\n"
33218 #: ../src/guestfs-actions.pod:7897
33219 msgid "guestfs_txz_in"
33223 #: ../src/guestfs-actions.pod:7899
33227 " guestfs_txz_in (guestfs_h *g,\n"
33228 " const char *tarball,\n"
33229 " const char *directory);\n"
33234 #: ../src/guestfs-actions.pod:7911
33235 msgid "guestfs_txz_out"
33239 #: ../src/guestfs-actions.pod:7913
33243 " guestfs_txz_out (guestfs_h *g,\n"
33244 " const char *directory,\n"
33245 " const char *tarball);\n"
33250 #: ../src/guestfs-actions.pod:7925
33251 msgid "guestfs_umask"
33255 #: ../src/guestfs-actions.pod:7927
33259 " guestfs_umask (guestfs_h *g,\n"
33265 #: ../src/guestfs-actions.pod:7943
33267 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
33268 "C<guestfs_mkdir>."
33272 #: ../src/guestfs-actions.pod:7952
33273 msgid "guestfs_umount"
33277 #: ../src/guestfs-actions.pod:7954
33281 " guestfs_umount (guestfs_h *g,\n"
33282 " const char *pathordevice);\n"
33287 #: ../src/guestfs-actions.pod:7966
33288 msgid "guestfs_umount_all"
33292 #: ../src/guestfs-actions.pod:7968
33296 " guestfs_umount_all (guestfs_h *g);\n"
33301 #: ../src/guestfs-actions.pod:7979
33302 msgid "guestfs_upload"
33306 #: ../src/guestfs-actions.pod:7981
33310 " guestfs_upload (guestfs_h *g,\n"
33311 " const char *filename,\n"
33312 " const char *remotefilename);\n"
33317 #: ../src/guestfs-actions.pod:7991
33318 msgid "See also C<guestfs_download>."
33322 #: ../src/guestfs-actions.pod:8002
33323 msgid "guestfs_upload_offset"
33327 #: ../src/guestfs-actions.pod:8004
33331 " guestfs_upload_offset (guestfs_h *g,\n"
33332 " const char *filename,\n"
33333 " const char *remotefilename,\n"
33334 " int64_t offset);\n"
33339 #: ../src/guestfs-actions.pod:8020
33341 "Note that there is no limit on the amount of data that can be uploaded with "
33342 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
33343 "full amount unless an error occurs."
33347 #: ../src/guestfs-actions.pod:8025
33348 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
33352 #: ../src/guestfs-actions.pod:8036
33353 msgid "guestfs_utimens"
33357 #: ../src/guestfs-actions.pod:8038
33361 " guestfs_utimens (guestfs_h *g,\n"
33362 " const char *path,\n"
33363 " int64_t atsecs,\n"
33364 " int64_t atnsecs,\n"
33365 " int64_t mtsecs,\n"
33366 " int64_t mtnsecs);\n"
33371 #: ../src/guestfs-actions.pod:8067 ../src/guestfs-structs.pod:175
33372 msgid "guestfs_version"
33376 #: ../src/guestfs-actions.pod:8069
33379 " struct guestfs_version *\n"
33380 " guestfs_version (guestfs_h *g);\n"
33385 #: ../src/guestfs-actions.pod:8097
33387 "I<Note:> Don't use this call to test for availability of features. In "
33388 "enterprise distributions we backport features from later versions into "
33389 "earlier versions, making this an unreliable way to test for features. Use "
33390 "C<guestfs_available> instead."
33394 #: ../src/guestfs-actions.pod:8103
33396 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
33397 "error. I<The caller must call C<guestfs_free_version> after use>."
33401 #: ../src/guestfs-actions.pod:8107
33402 msgid "(Added in 1.0.58)"
33406 #: ../src/guestfs-actions.pod:8109
33407 msgid "guestfs_vfs_label"
33411 #: ../src/guestfs-actions.pod:8111
33415 " guestfs_vfs_label (guestfs_h *g,\n"
33416 " const char *device);\n"
33421 #: ../src/guestfs-actions.pod:8120
33422 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
33426 #: ../src/guestfs-actions.pod:8125 ../src/guestfs-actions.pod:8162
33427 msgid "(Added in 1.3.18)"
33431 #: ../src/guestfs-actions.pod:8127
33432 msgid "guestfs_vfs_type"
33436 #: ../src/guestfs-actions.pod:8129
33440 " guestfs_vfs_type (guestfs_h *g,\n"
33441 " const char *device);\n"
33446 #: ../src/guestfs-actions.pod:8146
33447 msgid "guestfs_vfs_uuid"
33451 #: ../src/guestfs-actions.pod:8148
33455 " guestfs_vfs_uuid (guestfs_h *g,\n"
33456 " const char *device);\n"
33461 #: ../src/guestfs-actions.pod:8157
33462 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
33466 #: ../src/guestfs-actions.pod:8164
33467 msgid "guestfs_vg_activate"
33471 #: ../src/guestfs-actions.pod:8166
33475 " guestfs_vg_activate (guestfs_h *g,\n"
33477 " char *const *volgroups);\n"
33482 #: ../src/guestfs-actions.pod:8183
33483 msgid "guestfs_vg_activate_all"
33487 #: ../src/guestfs-actions.pod:8185
33491 " guestfs_vg_activate_all (guestfs_h *g,\n"
33492 " int activate);\n"
33497 #: ../src/guestfs-actions.pod:8198
33498 msgid "guestfs_vgcreate"
33502 #: ../src/guestfs-actions.pod:8200
33506 " guestfs_vgcreate (guestfs_h *g,\n"
33507 " const char *volgroup,\n"
33508 " char *const *physvols);\n"
33513 #: ../src/guestfs-actions.pod:8212
33514 msgid "guestfs_vglvuuids"
33518 #: ../src/guestfs-actions.pod:8214
33522 " guestfs_vglvuuids (guestfs_h *g,\n"
33523 " const char *vgname);\n"
33528 #: ../src/guestfs-actions.pod:8221
33530 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
33531 "associate logical volumes and volume groups."
33535 #: ../src/guestfs-actions.pod:8224
33536 msgid "See also C<guestfs_vgpvuuids>."
33540 #: ../src/guestfs-actions.pod:8232
33541 msgid "guestfs_vgpvuuids"
33545 #: ../src/guestfs-actions.pod:8234
33549 " guestfs_vgpvuuids (guestfs_h *g,\n"
33550 " const char *vgname);\n"
33555 #: ../src/guestfs-actions.pod:8241
33557 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
33558 "associate physical volumes and volume groups."
33562 #: ../src/guestfs-actions.pod:8244
33563 msgid "See also C<guestfs_vglvuuids>."
33567 #: ../src/guestfs-actions.pod:8252
33568 msgid "guestfs_vgremove"
33572 #: ../src/guestfs-actions.pod:8254
33576 " guestfs_vgremove (guestfs_h *g,\n"
33577 " const char *vgname);\n"
33582 #: ../src/guestfs-actions.pod:8267
33583 msgid "guestfs_vgrename"
33587 #: ../src/guestfs-actions.pod:8269
33591 " guestfs_vgrename (guestfs_h *g,\n"
33592 " const char *volgroup,\n"
33593 " const char *newvolgroup);\n"
33598 #: ../src/guestfs-actions.pod:8280
33599 msgid "guestfs_vgs"
33603 #: ../src/guestfs-actions.pod:8282
33607 " guestfs_vgs (guestfs_h *g);\n"
33612 #: ../src/guestfs-actions.pod:8291
33613 msgid "See also C<guestfs_vgs_full>."
33617 #: ../src/guestfs-actions.pod:8299
33618 msgid "guestfs_vgs_full"
33622 #: ../src/guestfs-actions.pod:8301
33625 " struct guestfs_lvm_vg_list *\n"
33626 " guestfs_vgs_full (guestfs_h *g);\n"
33631 #: ../src/guestfs-actions.pod:8307
33633 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
33634 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
33639 #: ../src/guestfs-actions.pod:8313
33640 msgid "guestfs_vgscan"
33644 #: ../src/guestfs-actions.pod:8315
33648 " guestfs_vgscan (guestfs_h *g);\n"
33653 #: ../src/guestfs-actions.pod:8325
33654 msgid "guestfs_vguuid"
33658 #: ../src/guestfs-actions.pod:8327
33662 " guestfs_vguuid (guestfs_h *g,\n"
33663 " const char *vgname);\n"
33668 #: ../src/guestfs-actions.pod:8338
33669 msgid "guestfs_wait_ready"
33673 #: ../src/guestfs-actions.pod:8340
33677 " guestfs_wait_ready (guestfs_h *g);\n"
33682 #: ../src/guestfs-actions.pod:8343
33684 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
33689 #: ../src/guestfs-actions.pod:8350
33690 msgid "This function is a no op."
33694 #: ../src/guestfs-actions.pod:8352
33696 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
33697 "calling C<guestfs_launch> to wait for the launch to complete. However this "
33698 "is no longer necessary because C<guestfs_launch> now does the waiting."
33702 #: ../src/guestfs-actions.pod:8357
33704 "If you see any calls to this function in code then you can just remove them, "
33705 "unless you want to retain compatibility with older versions of the API."
33709 #: ../src/guestfs-actions.pod:8365
33710 msgid "guestfs_wc_c"
33714 #: ../src/guestfs-actions.pod:8367
33718 " guestfs_wc_c (guestfs_h *g,\n"
33719 " const char *path);\n"
33724 #: ../src/guestfs-actions.pod:8378
33725 msgid "guestfs_wc_l"
33729 #: ../src/guestfs-actions.pod:8380
33733 " guestfs_wc_l (guestfs_h *g,\n"
33734 " const char *path);\n"
33739 #: ../src/guestfs-actions.pod:8391
33740 msgid "guestfs_wc_w"
33744 #: ../src/guestfs-actions.pod:8393
33748 " guestfs_wc_w (guestfs_h *g,\n"
33749 " const char *path);\n"
33754 #: ../src/guestfs-actions.pod:8404
33755 msgid "guestfs_write"
33759 #: ../src/guestfs-actions.pod:8406
33763 " guestfs_write (guestfs_h *g,\n"
33764 " const char *path,\n"
33765 " const char *content,\n"
33766 " size_t content_size);\n"
33771 #: ../src/guestfs-actions.pod:8415
33772 msgid "See also C<guestfs_write_append>."
33776 #: ../src/guestfs-actions.pod:8424
33777 msgid "guestfs_write_append"
33781 #: ../src/guestfs-actions.pod:8426
33785 " guestfs_write_append (guestfs_h *g,\n"
33786 " const char *path,\n"
33787 " const char *content,\n"
33788 " size_t content_size);\n"
33793 #: ../src/guestfs-actions.pod:8435
33794 msgid "See also C<guestfs_write>."
33798 #: ../src/guestfs-actions.pod:8444
33799 msgid "guestfs_write_file"
33803 #: ../src/guestfs-actions.pod:8446
33807 " guestfs_write_file (guestfs_h *g,\n"
33808 " const char *path,\n"
33809 " const char *content,\n"
33815 #: ../src/guestfs-actions.pod:8452
33817 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33822 #: ../src/guestfs-actions.pod:8477
33823 msgid "guestfs_zegrep"
33827 #: ../src/guestfs-actions.pod:8479
33831 " guestfs_zegrep (guestfs_h *g,\n"
33832 " const char *regex,\n"
33833 " const char *path);\n"
33838 #: ../src/guestfs-actions.pod:8496
33839 msgid "guestfs_zegrepi"
33843 #: ../src/guestfs-actions.pod:8498
33847 " guestfs_zegrepi (guestfs_h *g,\n"
33848 " const char *regex,\n"
33849 " const char *path);\n"
33854 #: ../src/guestfs-actions.pod:8515
33855 msgid "guestfs_zero"
33859 #: ../src/guestfs-actions.pod:8517
33863 " guestfs_zero (guestfs_h *g,\n"
33864 " const char *device);\n"
33869 #: ../src/guestfs-actions.pod:8531
33871 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33872 "C<guestfs_is_zero_device>"
33876 #: ../src/guestfs-actions.pod:8543
33877 msgid "guestfs_zero_device"
33881 #: ../src/guestfs-actions.pod:8545
33885 " guestfs_zero_device (guestfs_h *g,\n"
33886 " const char *device);\n"
33891 #: ../src/guestfs-actions.pod:8549
33893 "This command writes zeroes over the entire C<device>. Compare with "
33894 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33898 #: ../src/guestfs-actions.pod:8564
33899 msgid "(Added in 1.3.1)"
33903 #: ../src/guestfs-actions.pod:8566
33904 msgid "guestfs_zerofree"
33908 #: ../src/guestfs-actions.pod:8568
33912 " guestfs_zerofree (guestfs_h *g,\n"
33913 " const char *device);\n"
33918 #: ../src/guestfs-actions.pod:8587
33919 msgid "guestfs_zfgrep"
33923 #: ../src/guestfs-actions.pod:8589
33927 " guestfs_zfgrep (guestfs_h *g,\n"
33928 " const char *pattern,\n"
33929 " const char *path);\n"
33934 #: ../src/guestfs-actions.pod:8606
33935 msgid "guestfs_zfgrepi"
33939 #: ../src/guestfs-actions.pod:8608
33943 " guestfs_zfgrepi (guestfs_h *g,\n"
33944 " const char *pattern,\n"
33945 " const char *path);\n"
33950 #: ../src/guestfs-actions.pod:8625
33951 msgid "guestfs_zfile"
33955 #: ../src/guestfs-actions.pod:8627
33959 " guestfs_zfile (guestfs_h *g,\n"
33960 " const char *meth,\n"
33961 " const char *path);\n"
33966 #: ../src/guestfs-actions.pod:8632
33968 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33973 #: ../src/guestfs-actions.pod:8644
33975 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33980 #: ../src/guestfs-actions.pod:8652
33981 msgid "guestfs_zgrep"
33985 #: ../src/guestfs-actions.pod:8654
33989 " guestfs_zgrep (guestfs_h *g,\n"
33990 " const char *regex,\n"
33991 " const char *path);\n"
33996 #: ../src/guestfs-actions.pod:8671
33997 msgid "guestfs_zgrepi"
34001 #: ../src/guestfs-actions.pod:8673
34005 " guestfs_zgrepi (guestfs_h *g,\n"
34006 " const char *regex,\n"
34007 " const char *path);\n"
34012 #: ../src/guestfs-availability.pod:3
34017 #: ../src/guestfs-availability.pod:5
34019 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
34020 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
34021 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
34022 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
34023 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
34027 #: ../src/guestfs-availability.pod:21
34032 #: ../src/guestfs-availability.pod:23
34033 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
34037 #: ../src/guestfs-availability.pod:26
34042 #: ../src/guestfs-availability.pod:28
34043 msgid "The following functions: L</guestfs_grub_install>"
34047 #: ../src/guestfs-availability.pod:31
34052 #: ../src/guestfs-availability.pod:33
34054 "The following functions: L</guestfs_inotify_add_watch> "
34055 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
34056 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
34060 #: ../src/guestfs-availability.pod:41
34061 msgid "B<linuxfsuuid>"
34065 #: ../src/guestfs-availability.pod:43
34067 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
34068 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
34072 #: ../src/guestfs-availability.pod:50
34073 msgid "B<linuxmodules>"
34077 #: ../src/guestfs-availability.pod:52
34078 msgid "The following functions: L</guestfs_modprobe>"
34082 #: ../src/guestfs-availability.pod:55
34083 msgid "B<linuxxattrs>"
34087 #: ../src/guestfs-availability.pod:57
34089 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
34090 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
34091 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
34092 "L</guestfs_setxattr>"
34096 #: ../src/guestfs-availability.pod:68
34101 #: ../src/guestfs-availability.pod:70
34103 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
34104 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
34105 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
34109 #: ../src/guestfs-availability.pod:79
34114 #: ../src/guestfs-availability.pod:81
34116 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
34117 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
34118 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
34119 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
34120 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
34121 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
34122 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
34123 "L</guestfs_vgs_full>"
34127 #: ../src/guestfs-availability.pod:104
34132 #: ../src/guestfs-availability.pod:106
34134 "The following functions: L</guestfs_md_create> L</guestfs_md_detail> "
34135 "L</guestfs_md_stop>"
34139 #: ../src/guestfs-availability.pod:111
34144 #: ../src/guestfs-availability.pod:113
34146 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
34147 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
34151 #: ../src/guestfs-availability.pod:119
34156 #: ../src/guestfs-availability.pod:121
34157 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
34161 #: ../src/guestfs-availability.pod:124
34162 msgid "B<ntfsprogs>"
34166 #: ../src/guestfs-availability.pod:126
34168 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
34169 "L</guestfs_ntfsresize_size>"
34173 #: ../src/guestfs-availability.pod:131
34174 msgid "B<realpath>"
34178 #: ../src/guestfs-availability.pod:133
34179 msgid "The following functions: L</guestfs_realpath>"
34183 #: ../src/guestfs-availability.pod:136
34188 #: ../src/guestfs-availability.pod:138
34190 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
34191 "L</guestfs_scrub_freespace>"
34195 #: ../src/guestfs-availability.pod:143
34200 #: ../src/guestfs-availability.pod:145
34201 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
34205 #: ../src/guestfs-availability.pod:149
34210 #: ../src/guestfs-availability.pod:151
34211 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
34215 #: ../src/guestfs-availability.pod:155
34216 msgid "B<zerofree>"
34220 #: ../src/guestfs-availability.pod:157
34221 msgid "The following functions: L</guestfs_zerofree>"
34225 #: ../src/guestfs-structs.pod:1
34226 msgid "guestfs_int_bool"
34230 #: ../src/guestfs-structs.pod:3
34233 " struct guestfs_int_bool {\n"
34241 #: ../src/guestfs-structs.pod:8
34244 " struct guestfs_int_bool_list {\n"
34245 " uint32_t len; /* Number of elements in list. */\n"
34246 " struct guestfs_int_bool *val; /* Elements. */\n"
34252 #: ../src/guestfs-structs.pod:13
34255 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
34256 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
34261 #: ../src/guestfs-structs.pod:16
34262 msgid "guestfs_lvm_pv"
34266 #: ../src/guestfs-structs.pod:18
34269 " struct guestfs_lvm_pv {\n"
34270 " char *pv_name;\n"
34271 " /* The next field is NOT nul-terminated, be careful when printing it: "
34273 " char pv_uuid[32];\n"
34275 " uint64_t pv_size;\n"
34276 " uint64_t dev_size;\n"
34277 " uint64_t pv_free;\n"
34278 " uint64_t pv_used;\n"
34279 " char *pv_attr;\n"
34280 " int64_t pv_pe_count;\n"
34281 " int64_t pv_pe_alloc_count;\n"
34282 " char *pv_tags;\n"
34283 " uint64_t pe_start;\n"
34284 " int64_t pv_mda_count;\n"
34285 " uint64_t pv_mda_free;\n"
34291 #: ../src/guestfs-structs.pod:36
34294 " struct guestfs_lvm_pv_list {\n"
34295 " uint32_t len; /* Number of elements in list. */\n"
34296 " struct guestfs_lvm_pv *val; /* Elements. */\n"
34302 #: ../src/guestfs-structs.pod:41
34305 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
34306 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
34311 #: ../src/guestfs-structs.pod:44
34312 msgid "guestfs_lvm_vg"
34316 #: ../src/guestfs-structs.pod:46
34319 " struct guestfs_lvm_vg {\n"
34320 " char *vg_name;\n"
34321 " /* The next field is NOT nul-terminated, be careful when printing it: "
34323 " char vg_uuid[32];\n"
34325 " char *vg_attr;\n"
34326 " uint64_t vg_size;\n"
34327 " uint64_t vg_free;\n"
34328 " char *vg_sysid;\n"
34329 " uint64_t vg_extent_size;\n"
34330 " int64_t vg_extent_count;\n"
34331 " int64_t vg_free_count;\n"
34332 " int64_t max_lv;\n"
34333 " int64_t max_pv;\n"
34334 " int64_t pv_count;\n"
34335 " int64_t lv_count;\n"
34336 " int64_t snap_count;\n"
34337 " int64_t vg_seqno;\n"
34338 " char *vg_tags;\n"
34339 " int64_t vg_mda_count;\n"
34340 " uint64_t vg_mda_free;\n"
34346 #: ../src/guestfs-structs.pod:69
34349 " struct guestfs_lvm_vg_list {\n"
34350 " uint32_t len; /* Number of elements in list. */\n"
34351 " struct guestfs_lvm_vg *val; /* Elements. */\n"
34357 #: ../src/guestfs-structs.pod:74
34360 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
34361 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
34366 #: ../src/guestfs-structs.pod:77
34367 msgid "guestfs_lvm_lv"
34371 #: ../src/guestfs-structs.pod:79
34374 " struct guestfs_lvm_lv {\n"
34375 " char *lv_name;\n"
34376 " /* The next field is NOT nul-terminated, be careful when printing it: "
34378 " char lv_uuid[32];\n"
34379 " char *lv_attr;\n"
34380 " int64_t lv_major;\n"
34381 " int64_t lv_minor;\n"
34382 " int64_t lv_kernel_major;\n"
34383 " int64_t lv_kernel_minor;\n"
34384 " uint64_t lv_size;\n"
34385 " int64_t seg_count;\n"
34387 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
34388 " float snap_percent;\n"
34389 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
34390 " float copy_percent;\n"
34391 " char *move_pv;\n"
34392 " char *lv_tags;\n"
34393 " char *mirror_log;\n"
34394 " char *modules;\n"
34400 #: ../src/guestfs-structs.pod:101
34403 " struct guestfs_lvm_lv_list {\n"
34404 " uint32_t len; /* Number of elements in list. */\n"
34405 " struct guestfs_lvm_lv *val; /* Elements. */\n"
34411 #: ../src/guestfs-structs.pod:106
34414 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
34415 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
34420 #: ../src/guestfs-structs.pod:111
34423 " struct guestfs_stat {\n"
34427 " int64_t nlink;\n"
34432 " int64_t blksize;\n"
34433 " int64_t blocks;\n"
34434 " int64_t atime;\n"
34435 " int64_t mtime;\n"
34436 " int64_t ctime;\n"
34442 #: ../src/guestfs-structs.pod:127
34445 " struct guestfs_stat_list {\n"
34446 " uint32_t len; /* Number of elements in list. */\n"
34447 " struct guestfs_stat *val; /* Elements. */\n"
34453 #: ../src/guestfs-structs.pod:132
34456 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
34457 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
34462 #: ../src/guestfs-structs.pod:137
34465 " struct guestfs_statvfs {\n"
34466 " int64_t bsize;\n"
34467 " int64_t frsize;\n"
34468 " int64_t blocks;\n"
34469 " int64_t bfree;\n"
34470 " int64_t bavail;\n"
34471 " int64_t files;\n"
34472 " int64_t ffree;\n"
34473 " int64_t favail;\n"
34476 " int64_t namemax;\n"
34482 #: ../src/guestfs-structs.pod:151
34485 " struct guestfs_statvfs_list {\n"
34486 " uint32_t len; /* Number of elements in list. */\n"
34487 " struct guestfs_statvfs *val; /* Elements. */\n"
34493 #: ../src/guestfs-structs.pod:156
34496 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
34497 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
34502 #: ../src/guestfs-structs.pod:159
34503 msgid "guestfs_dirent"
34507 #: ../src/guestfs-structs.pod:161
34510 " struct guestfs_dirent {\n"
34519 #: ../src/guestfs-structs.pod:167
34522 " struct guestfs_dirent_list {\n"
34523 " uint32_t len; /* Number of elements in list. */\n"
34524 " struct guestfs_dirent *val; /* Elements. */\n"
34530 #: ../src/guestfs-structs.pod:172
34533 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
34534 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
34539 #: ../src/guestfs-structs.pod:177
34542 " struct guestfs_version {\n"
34543 " int64_t major;\n"
34544 " int64_t minor;\n"
34545 " int64_t release;\n"
34552 #: ../src/guestfs-structs.pod:184
34555 " struct guestfs_version_list {\n"
34556 " uint32_t len; /* Number of elements in list. */\n"
34557 " struct guestfs_version *val; /* Elements. */\n"
34563 #: ../src/guestfs-structs.pod:189
34566 " void guestfs_free_version (struct guestfs_free_version *);\n"
34567 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
34572 #: ../src/guestfs-structs.pod:192
34573 msgid "guestfs_xattr"
34577 #: ../src/guestfs-structs.pod:194
34580 " struct guestfs_xattr {\n"
34581 " char *attrname;\n"
34582 " /* The next two fields describe a byte array. */\n"
34583 " uint32_t attrval_len;\n"
34584 " char *attrval;\n"
34590 #: ../src/guestfs-structs.pod:201
34593 " struct guestfs_xattr_list {\n"
34594 " uint32_t len; /* Number of elements in list. */\n"
34595 " struct guestfs_xattr *val; /* Elements. */\n"
34601 #: ../src/guestfs-structs.pod:206
34604 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
34605 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
34610 #: ../src/guestfs-structs.pod:209
34611 msgid "guestfs_inotify_event"
34615 #: ../src/guestfs-structs.pod:211
34618 " struct guestfs_inotify_event {\n"
34619 " int64_t in_wd;\n"
34620 " uint32_t in_mask;\n"
34621 " uint32_t in_cookie;\n"
34622 " char *in_name;\n"
34628 #: ../src/guestfs-structs.pod:218
34631 " struct guestfs_inotify_event_list {\n"
34632 " uint32_t len; /* Number of elements in list. */\n"
34633 " struct guestfs_inotify_event *val; /* Elements. */\n"
34639 #: ../src/guestfs-structs.pod:223
34642 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
34643 " void guestfs_free_inotify_event_list (struct "
34644 "guestfs_free_inotify_event_list *);\n"
34649 #: ../src/guestfs-structs.pod:226
34650 msgid "guestfs_partition"
34654 #: ../src/guestfs-structs.pod:228
34657 " struct guestfs_partition {\n"
34658 " int32_t part_num;\n"
34659 " uint64_t part_start;\n"
34660 " uint64_t part_end;\n"
34661 " uint64_t part_size;\n"
34667 #: ../src/guestfs-structs.pod:235
34670 " struct guestfs_partition_list {\n"
34671 " uint32_t len; /* Number of elements in list. */\n"
34672 " struct guestfs_partition *val; /* Elements. */\n"
34678 #: ../src/guestfs-structs.pod:240
34681 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
34682 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
34687 #: ../src/guestfs-structs.pod:243
34688 msgid "guestfs_application"
34692 #: ../src/guestfs-structs.pod:245
34695 " struct guestfs_application {\n"
34696 " char *app_name;\n"
34697 " char *app_display_name;\n"
34698 " int32_t app_epoch;\n"
34699 " char *app_version;\n"
34700 " char *app_release;\n"
34701 " char *app_install_path;\n"
34702 " char *app_trans_path;\n"
34703 " char *app_publisher;\n"
34704 " char *app_url;\n"
34705 " char *app_source_package;\n"
34706 " char *app_summary;\n"
34707 " char *app_description;\n"
34713 #: ../src/guestfs-structs.pod:260
34716 " struct guestfs_application_list {\n"
34717 " uint32_t len; /* Number of elements in list. */\n"
34718 " struct guestfs_application *val; /* Elements. */\n"
34724 #: ../src/guestfs-structs.pod:265
34727 " void guestfs_free_application (struct guestfs_free_application *);\n"
34728 " void guestfs_free_application_list (struct guestfs_free_application_list "
34734 #: ../src/guestfs.pod:5
34735 msgid "guestfs - Library for accessing and modifying virtual machine images"
34739 #: ../src/guestfs.pod:11
34742 " guestfs_h *g = guestfs_create ();\n"
34743 " guestfs_add_drive (g, \"guest.img\");\n"
34744 " guestfs_launch (g);\n"
34745 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34746 " guestfs_touch (g, \"/hello\");\n"
34747 " guestfs_umount (g, \"/\");\n"
34748 " guestfs_close (g);\n"
34753 #: ../src/guestfs.pod:25
34755 "Libguestfs is a library for accessing and modifying guest disk images. "
34756 "Amongst the things this is good for: making batch configuration changes to "
34757 "guests, getting disk used/free statistics (see also: virt-df), migrating "
34758 "between virtualization systems (see also: virt-p2v), performing partial "
34759 "backups, performing partial guest clones, cloning guests and changing "
34760 "registry/UUID/hostname info, and much else besides."
34764 #: ../src/guestfs.pod:33
34766 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
34767 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
34768 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34773 #: ../src/guestfs.pod:38
34775 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34776 "what filesystem is in each LV, etc.). It can also run commands in the "
34777 "context of the guest. Also you can access filesystems over FUSE."
34781 #: ../src/guestfs.pod:43
34783 "Libguestfs is a library that can be linked with C and C++ management "
34784 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
34785 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
34790 #: ../src/guestfs.pod:48
34792 "You don't need to be root to use libguestfs, although obviously you do need "
34793 "enough permissions to access the disk images."
34797 #: ../src/guestfs.pod:51
34799 "Libguestfs is a large API because it can do many things. For a gentle "
34800 "introduction, please read the L</API OVERVIEW> section next."
34804 #: ../src/guestfs.pod:54
34806 "There are also some example programs in the L<guestfs-examples(3)> manual "
34811 #: ../src/guestfs.pod:57
34812 msgid "API OVERVIEW"
34816 #: ../src/guestfs.pod:59
34818 "This section provides a gentler overview of the libguestfs API. We also try "
34819 "to group API calls together, where that may not be obvious from reading "
34820 "about the individual calls in the main section of this manual."
34824 #: ../src/guestfs.pod:64
34829 #: ../src/guestfs.pod:66
34831 "Before you can use libguestfs calls, you have to create a handle. Then you "
34832 "must add at least one disk image to the handle, followed by launching the "
34833 "handle, then performing whatever operations you want, and finally closing "
34834 "the handle. By convention we use the single letter C<g> for the name of the "
34835 "handle variable, although of course you can use any name you want."
34839 #: ../src/guestfs.pod:73
34840 msgid "The general structure of all libguestfs-using programs looks like this:"
34844 #: ../src/guestfs.pod:76
34847 " guestfs_h *g = guestfs_create ();\n"
34852 #: ../src/guestfs.pod:78
34855 " /* Call guestfs_add_drive additional times if there are\n"
34856 " * multiple disk images.\n"
34858 " guestfs_add_drive (g, \"guest.img\");\n"
34863 #: ../src/guestfs.pod:83
34866 " /* Most manipulation calls won't work until you've launched\n"
34867 " * the handle 'g'. You have to do this _after_ adding drives\n"
34868 " * and _before_ other commands.\n"
34870 " guestfs_launch (g);\n"
34875 #: ../src/guestfs.pod:89
34878 " /* Now you can examine what partitions, LVs etc are available.\n"
34880 " char **partitions = guestfs_list_partitions (g);\n"
34881 " char **logvols = guestfs_lvs (g);\n"
34886 #: ../src/guestfs.pod:94
34889 " /* To access a filesystem in the image, you must mount it.\n"
34891 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34896 #: ../src/guestfs.pod:98
34899 " /* Now you can perform filesystem actions on the guest\n"
34902 " guestfs_touch (g, \"/hello\");\n"
34907 #: ../src/guestfs.pod:103
34910 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34911 " * it is done automatically when you close the handle. See\n"
34912 " * discussion of autosync in this page.\n"
34914 " guestfs_sync (g);\n"
34919 #: ../src/guestfs.pod:109
34922 " /* Close the handle 'g'. */\n"
34923 " guestfs_close (g);\n"
34928 #: ../src/guestfs.pod:112
34930 "The code above doesn't include any error checking. In real code you should "
34931 "check return values carefully for errors. In general all functions that "
34932 "return integers return C<-1> on error, and all functions that return "
34933 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34934 "how to handle errors, and consult the documentation for each function call "
34935 "below to see precisely how they return error indications. See "
34936 "L<guestfs-examples(3)> for fully worked examples."
34940 #: ../src/guestfs.pod:121
34941 msgid "DISK IMAGES"
34945 #: ../src/guestfs.pod:123
34947 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34948 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34949 "actual block device, or simply an empty file of zeroes that you have created "
34950 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
34955 #: ../src/guestfs.pod:129
34957 "The call you should use in modern code for adding drives is "
34958 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34959 "specifying that the format is raw, do:"
34963 #: ../src/guestfs.pod:133
34966 " guestfs_add_drive_opts (g, filename,\n"
34967 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34973 #: ../src/guestfs.pod:137
34974 msgid "You can add a disk read-only using:"
34978 #: ../src/guestfs.pod:139
34981 " guestfs_add_drive_opts (g, filename,\n"
34982 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34983 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34989 #: ../src/guestfs.pod:144
34991 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34992 "libguestfs won't modify the file."
34996 #: ../src/guestfs.pod:147
34998 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34999 "by a virtual machine. Adding it read-write will almost certainly cause disk "
35000 "corruption, but adding it read-only is safe."
35004 #: ../src/guestfs.pod:151
35006 "You must add at least one disk image, and you may add multiple disk images. "
35007 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
35008 "first one you added), C</dev/sdb> (for the second one you added), etc."
35012 #: ../src/guestfs.pod:156
35014 "Once L</guestfs_launch> has been called you cannot add any more images. You "
35015 "can call L</guestfs_list_devices> to get a list of the device names, in the "
35016 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
35020 #: ../src/guestfs.pod:161
35025 #: ../src/guestfs.pod:163
35027 "Before you can read or write files, create directories and so on in a disk "
35028 "image that contains filesystems, you have to mount those filesystems using "
35029 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
35030 "a disk image contains (for example) one partition with a filesystem on that "
35031 "partition, then you can mount it directly:"
35035 #: ../src/guestfs.pod:170
35038 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
35043 #: ../src/guestfs.pod:172
35045 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
35046 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
35047 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
35048 "that these are libguestfs virtual devices, and are nothing to do with host "
35053 #: ../src/guestfs.pod:178
35055 "If you are given a disk image and you don't know what it contains then you "
35056 "have to find out. Libguestfs can do that too: use "
35057 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
35058 "and LVs, and either try mounting each to see what is mountable, or else "
35059 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
35060 "filesystems, use L</guestfs_list_filesystems>."
35064 #: ../src/guestfs.pod:186
35066 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
35067 "L</INSPECTION> below). But you might find it easier to look at higher level "
35068 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
35072 #: ../src/guestfs.pod:191
35074 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
35075 "several other variations of the C<guestfs_mount_*> call."
35079 #: ../src/guestfs.pod:194
35080 msgid "FILESYSTEM ACCESS AND MODIFICATION"
35084 #: ../src/guestfs.pod:196
35086 "The majority of the libguestfs API consists of fairly low-level calls for "
35087 "accessing and modifying the files, directories, symlinks etc on mounted "
35088 "filesystems. There are over a hundred such calls which you can find listed "
35089 "in detail below in this man page, and we don't even pretend to cover them "
35090 "all in this overview."
35094 #: ../src/guestfs.pod:202
35096 "Specify filenames as full paths, starting with C<\"/\"> and including the "
35101 #: ../src/guestfs.pod:205
35103 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
35104 "the file called C<\"etc/passwd\"> then you could do:"
35108 #: ../src/guestfs.pod:208
35111 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
35116 #: ../src/guestfs.pod:210
35118 "This would return C<data> as a newly allocated buffer containing the full "
35119 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
35120 "or C<NULL> if there was an error."
35124 #: ../src/guestfs.pod:214
35126 "As another example, to create a top-level directory on that filesystem "
35127 "called C<\"var\"> you would do:"
35131 #: ../src/guestfs.pod:217
35134 " guestfs_mkdir (g, \"/var\");\n"
35139 #: ../src/guestfs.pod:219
35140 msgid "To create a symlink you could do:"
35144 #: ../src/guestfs.pod:221
35147 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
35148 " \"/etc/rc3.d/S30portmap\");\n"
35153 #: ../src/guestfs.pod:224
35155 "Libguestfs will reject attempts to use relative paths and there is no "
35156 "concept of a current working directory."
35160 #: ../src/guestfs.pod:227
35162 "Libguestfs can return errors in many situations: for example if the "
35163 "filesystem isn't writable, or if a file or directory that you requested "
35164 "doesn't exist. If you are using the C API (documented here) you have to "
35165 "check for those error conditions after each call. (Other language bindings "
35166 "turn these errors into exceptions)."
35170 #: ../src/guestfs.pod:233
35172 "File writes are affected by the per-handle umask, set by calling "
35173 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
35177 #: ../src/guestfs.pod:236
35178 msgid "PARTITIONING"
35182 #: ../src/guestfs.pod:238
35184 "Libguestfs contains API calls to read, create and modify partition tables on "
35189 #: ../src/guestfs.pod:241
35191 "In the common case where you want to create a single partition covering the "
35192 "whole disk, you should use the L</guestfs_part_disk> call:"
35196 #: ../src/guestfs.pod:245
35199 " const char *parttype = \"mbr\";\n"
35200 " if (disk_is_larger_than_2TB)\n"
35201 " parttype = \"gpt\";\n"
35202 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
35207 #: ../src/guestfs.pod:250
35209 "Obviously this effectively wipes anything that was on that disk image "
35214 #: ../src/guestfs.pod:253
35219 #: ../src/guestfs.pod:255
35221 "Libguestfs provides access to a large part of the LVM2 API, such as "
35222 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
35223 "unless you familiarize yourself with the concepts of physical volumes, "
35224 "volume groups and logical volumes."
35228 #: ../src/guestfs.pod:260
35230 "This author strongly recommends reading the LVM HOWTO, online at "
35231 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
35235 #: ../src/guestfs.pod:263
35236 msgid "DOWNLOADING"
35240 #: ../src/guestfs.pod:265
35242 "Use L</guestfs_cat> to download small, text only files. This call is "
35243 "limited to files which are less than 2 MB and which cannot contain any ASCII "
35244 "NUL (C<\\0>) characters. However the API is very simple to use."
35248 #: ../src/guestfs.pod:269
35250 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
35251 "bit data, since it returns a (pointer, size) pair. However it is still "
35252 "limited to \"small\" files, less than 2 MB."
35256 #: ../src/guestfs.pod:273
35258 "L</guestfs_download> can be used to download any file, with no limits on "
35259 "content or size (even files larger than 4 GB)."
35263 #: ../src/guestfs.pod:276
35264 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
35268 #: ../src/guestfs.pod:279
35273 #: ../src/guestfs.pod:281
35275 "It's often the case that you want to write a file or files to the disk "
35280 #: ../src/guestfs.pod:284
35282 "To write a small file with fixed content, use L</guestfs_write>. To create "
35283 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
35284 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
35285 "variety of other functions for creating test files, for example "
35286 "L</guestfs_fill> and L</guestfs_fill_pattern>."
35290 #: ../src/guestfs.pod:290
35292 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
35293 "file content or size (even files larger than 4 GB)."
35297 #: ../src/guestfs.pod:293
35298 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
35302 #: ../src/guestfs.pod:295
35304 "However the fastest way to upload I<large numbers of arbitrary files> is to "
35305 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
35306 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
35307 "the drive in a predictable way (eg. adding it last after all other drives) "
35308 "then you can get the device name from L</guestfs_list_devices> and mount it "
35309 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
35310 "sometimes non-portable between kernel versions, and they don't support "
35311 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
35312 "using a label or UUID, use an ISO image instead."
35316 #: ../src/guestfs.pod:306
35321 #: ../src/guestfs.pod:308
35323 "There are various different commands for copying between files and devices "
35324 "and in and out of the guest filesystem. These are summarised in the table "
35329 #: ../src/guestfs.pod:314
35330 msgid "B<file> to B<file>"
35334 #: ../src/guestfs.pod:316
35336 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
35337 "directories recursively."
35341 #: ../src/guestfs.pod:319
35342 msgid "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
35346 #: ../src/guestfs.pod:322
35347 msgid "B<file> to B<device>"
35351 #: ../src/guestfs.pod:324
35352 msgid "B<device> to B<file>"
35356 #: ../src/guestfs.pod:326
35357 msgid "B<device> to B<device>"
35361 #: ../src/guestfs.pod:328
35363 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or "
35364 "L</guestfs_copy_device_to_device>."
35368 #: ../src/guestfs.pod:331
35369 msgid "Example: duplicate the contents of an LV:"
35373 #: ../src/guestfs.pod:333
35376 " guestfs_copy_device_to_device (g,\n"
35377 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
35378 " /* -1 marks the end of the list of optional parameters */\n"
35384 #: ../src/guestfs.pod:338
35386 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
35387 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
35388 "optional C<size> parameter:"
35392 #: ../src/guestfs.pod:342
35395 " guestfs_copy_device_to_device (g,\n"
35396 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
35397 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
35403 #: ../src/guestfs.pod:347
35404 msgid "B<file on the host> to B<file or device>"
35408 #: ../src/guestfs.pod:349
35409 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
35413 #: ../src/guestfs.pod:351
35414 msgid "B<file or device> to B<file on the host>"
35418 #: ../src/guestfs.pod:353
35419 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
35423 #: ../src/guestfs.pod:357
35424 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
35428 #: ../src/guestfs.pod:359
35430 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
35431 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
35432 "appears you can only upload and download to files. However many Un*x-like "
35433 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
35434 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
35435 "stderr, and arbitrary file descriptor N."
35439 #: ../src/guestfs.pod:367
35440 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
35444 #: ../src/guestfs.pod:370
35447 " guestfs_download (g, filename, \"/dev/stdout\");\n"
35452 #: ../src/guestfs.pod:372
35453 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
35457 #: ../src/guestfs.pod:374
35460 " char devfd[64];\n"
35461 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
35462 " guestfs_tar_out (g, \"/\", devfd);\n"
35467 #: ../src/guestfs.pod:378
35468 msgid "LISTING FILES"
35472 #: ../src/guestfs.pod:380
35474 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
35475 "L<guestfish(1)>-equivalent command C<ll>)."
35479 #: ../src/guestfs.pod:383
35481 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
35482 "programs, as a flat list of strings."
35486 #: ../src/guestfs.pod:386
35488 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
35489 "directory, plus additional information about each one. It is more "
35490 "equivalent to using the L<readdir(3)> call on a local filesystem."
35494 #: ../src/guestfs.pod:390
35496 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
35501 #: ../src/guestfs.pod:393
35502 msgid "RUNNING COMMANDS"
35506 #: ../src/guestfs.pod:395
35508 "Although libguestfs is primarily an API for manipulating files inside guest "
35509 "images, we also provide some limited facilities for running commands inside "
35514 #: ../src/guestfs.pod:399
35515 msgid "There are many limitations to this:"
35519 #: ../src/guestfs.pod:405
35521 "The kernel version that the command runs under will be different from what "
35526 #: ../src/guestfs.pod:410
35528 "If the command needs to communicate with daemons, then most likely they "
35529 "won't be running."
35533 #: ../src/guestfs.pod:415
35534 msgid "The command will be running in limited memory."
35538 #: ../src/guestfs.pod:419
35540 "The network may not be available unless you enable it (see "
35541 "L</guestfs_set_network>)."
35545 #: ../src/guestfs.pod:424
35546 msgid "Only supports Linux guests (not Windows, BSD, etc)."
35550 #: ../src/guestfs.pod:428
35551 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
35555 #: ../src/guestfs.pod:433
35557 "For SELinux guests, you may need to enable SELinux and load policy first. "
35558 "See L</SELINUX> in this manpage."
35562 #: ../src/guestfs.pod:438
35564 "I<Security:> It is not safe to run commands from untrusted, possibly "
35565 "malicious guests. These commands may attempt to exploit your program by "
35566 "sending unexpected output. They could also try to exploit the Linux kernel "
35567 "or qemu provided by the libguestfs appliance. They could use the network "
35568 "provided by the libguestfs appliance to bypass ordinary network partitions "
35569 "and firewalls. They could use the elevated privileges or different SELinux "
35570 "context of your program to their advantage."
35574 #: ../src/guestfs.pod:447
35576 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
35577 "(a script which runs when the guest next boots normally), and to have this "
35578 "script run the commands you want in the normal context of the running guest, "
35579 "network security and so on. For information about other security issues, "
35580 "see L</SECURITY>."
35584 #: ../src/guestfs.pod:455
35586 "The two main API calls to run commands are L</guestfs_command> and "
35587 "L</guestfs_sh> (there are also variations)."
35591 #: ../src/guestfs.pod:458
35593 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
35594 "shell globs, redirections, etc will work."
35598 #: ../src/guestfs.pod:461
35599 msgid "CONFIGURATION FILES"
35603 #: ../src/guestfs.pod:463
35605 "To read and write configuration files in Linux guest filesystems, we "
35606 "strongly recommend using Augeas. For example, Augeas understands how to "
35607 "read and write, say, a Linux shadow password file or X.org configuration "
35608 "file, and so avoids you having to write that code."
35612 #: ../src/guestfs.pod:468
35614 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
35615 "document Augeas itself here because there is excellent documentation on the "
35616 "L<http://augeas.net/> website."
35620 #: ../src/guestfs.pod:472
35622 "If you don't want to use Augeas (you fool!) then try calling "
35623 "L</guestfs_read_lines> to get the file as a list of lines which you can "
35628 #: ../src/guestfs.pod:476
35633 #: ../src/guestfs.pod:478
35635 "We support SELinux guests. To ensure that labeling happens correctly in "
35636 "SELinux guests, you need to enable SELinux and load the guest's policy:"
35640 #: ../src/guestfs.pod:486
35641 msgid "Before launching, do:"
35645 #: ../src/guestfs.pod:488
35648 " guestfs_set_selinux (g, 1);\n"
35653 #: ../src/guestfs.pod:492
35655 "After mounting the guest's filesystem(s), load the policy. This is best "
35656 "done by running the L<load_policy(8)> command in the guest itself:"
35660 #: ../src/guestfs.pod:496
35663 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
35668 #: ../src/guestfs.pod:498
35670 "(Older versions of C<load_policy> require you to specify the name of the "
35675 #: ../src/guestfs.pod:503
35677 "Optionally, set the security context for the API. The correct security "
35678 "context to use can only be known by inspecting the guest. As an example:"
35682 #: ../src/guestfs.pod:507
35685 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
35690 #: ../src/guestfs.pod:511
35691 msgid "This will work for running commands and editing existing files."
35695 #: ../src/guestfs.pod:513
35697 "When new files are created, you may need to label them explicitly, for "
35698 "example by running the external command C<restorecon pathname>."
35702 #: ../src/guestfs.pod:517
35707 #: ../src/guestfs.pod:519
35709 "Certain calls are affected by the current file mode creation mask (the "
35710 "\"umask\"). In particular ones which create files or directories, such as "
35711 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
35712 "either the default mode that the file is created with or modifies the mode "
35717 #: ../src/guestfs.pod:525
35719 "The default umask is C<022>, so files are created with modes such as C<0644> "
35720 "and directories with C<0755>."
35724 #: ../src/guestfs.pod:528
35726 "There are two ways to avoid being affected by umask. Either set umask to 0 "
35727 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
35728 "L</guestfs_chmod> after creating each file or directory."
35732 #: ../src/guestfs.pod:532
35733 msgid "For more information about umask, see L<umask(2)>."
35737 #: ../src/guestfs.pod:536
35739 "Libguestfs allows you to access Linux guests which have been encrypted using "
35740 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
35741 "standard. This includes nearly all whole disk encryption systems used by "
35742 "modern Linux guests."
35746 #: ../src/guestfs.pod:542
35748 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
35749 "returns the string C<crypto_LUKS>)."
35753 #: ../src/guestfs.pod:545
35755 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
35756 "will require the passphrase!"
35760 #: ../src/guestfs.pod:548
35762 "Opening a LUKS device creates a new device mapper device called "
35763 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
35764 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
35765 "decrypted from and encrypted to the underlying block device respectively."
35769 #: ../src/guestfs.pod:554
35771 "LVM volume groups on the device can be made visible by calling "
35772 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
35773 "volume(s) can now be mounted in the usual way."
35777 #: ../src/guestfs.pod:558
35779 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
35780 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35781 "[\"/dev/VG\"])>. Then close the mapper device by calling "
35782 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35783 "underlying encrypted block device)."
35787 #: ../src/guestfs.pod:565
35792 #: ../src/guestfs.pod:567
35794 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35795 "contains operating systems, an install CD or a live CD. (These APIs used to "
35796 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
35797 "version 1.5.3 the most frequently used part of this library has been "
35798 "rewritten in C and moved into the core code)."
35802 #: ../src/guestfs.pod:574
35804 "Add all disks belonging to the unknown virtual machine and call "
35805 "L</guestfs_launch> in the usual way."
35809 #: ../src/guestfs.pod:577
35811 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
35812 "and certain heuristics, and returns a list of operating systems that were "
35813 "found. An empty list means none were found. A single element is the root "
35814 "filesystem of the operating system. For dual- or multi-boot guests, "
35815 "multiple roots can be returned, each one corresponding to a separate "
35816 "operating system. (Multi-boot virtual machines are extremely rare in the "
35817 "world of virtualization, but since this scenario can happen, we have built "
35818 "libguestfs to deal with it.)"
35822 #: ../src/guestfs.pod:586
35824 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35825 "to get additional details about that operating system. For example, call "
35826 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
35827 "Windows and Linux-based operating systems respectively."
35831 #: ../src/guestfs.pod:592
35833 "Un*x-like and Linux-based operating systems usually consist of several "
35834 "filesystems which are mounted at boot time (for example, a separate boot "
35835 "partition mounted on C</boot>). The inspection rules are able to detect how "
35836 "filesystems correspond to mount points. Call "
35837 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35838 "hash table like this example:"
35842 #: ../src/guestfs.pod:599
35845 " /boot => /dev/sda1\n"
35846 " / => /dev/vg_guest/lv_root\n"
35847 " /usr => /dev/vg_guest/lv_usr\n"
35852 #: ../src/guestfs.pod:603
35854 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35855 "filesystems as suggested."
35859 #: ../src/guestfs.pod:606
35861 "Be careful to mount filesystems in the right order (eg. C</> before "
35862 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
35867 #: ../src/guestfs.pod:610
35869 "Inspection currently only works for some common operating systems. "
35870 "Contributors are welcome to send patches for other operating systems that we "
35871 "currently cannot detect."
35875 #: ../src/guestfs.pod:614
35877 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35878 "for more details. The L</guestfs_inspect_os> function just ignores any "
35879 "encrypted devices."
35883 #: ../src/guestfs.pod:618
35885 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35886 "inspection and caches the results in the guest handle. Subsequent calls to "
35887 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
35888 "re-read the disks. If you change the content of the guest disks, you can "
35889 "redo inspection by calling L</guestfs_inspect_os> again. "
35890 "(L</guestfs_inspect_list_applications> works a little differently from the "
35891 "other calls and does read the disks. See documentation for that function "
35896 #: ../src/guestfs.pod:627
35897 msgid "INSPECTING INSTALL DISKS"
35901 #: ../src/guestfs.pod:629
35903 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35908 #: ../src/guestfs.pod:632
35910 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35911 "system, which currently can be C<installed> (a regular operating system) or "
35912 "C<installer> (some sort of install disk)."
35916 #: ../src/guestfs.pod:636
35918 "Further information is available about the operating system that can be "
35919 "installed using the regular inspection APIs like "
35920 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
35925 #: ../src/guestfs.pod:641
35927 "Some additional information specific to installer disks is also available "
35928 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
35929 "L</guestfs_inspect_is_multipart> calls."
35933 #: ../src/guestfs.pod:646
35934 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35938 #: ../src/guestfs.pod:648
35940 "Libguestfs can mount NTFS partitions. It does this using the "
35941 "L<http://www.ntfs-3g.org/> driver."
35945 #: ../src/guestfs.pod:651
35946 msgid "DRIVE LETTERS AND PATHS"
35950 #: ../src/guestfs.pod:653
35952 "DOS and Windows still use drive letters, and the filesystems are always "
35953 "treated as case insensitive by Windows itself, and therefore you might find "
35954 "a Windows configuration file referring to a path like "
35955 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
35956 "that directory might be referred to as C</WINDOWS/System32>."
35960 #: ../src/guestfs.pod:659
35962 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35963 "L</guestfs_inspect_get_drive_mappings>)"
35967 #: ../src/guestfs.pod:662
35969 "Dealing with separator characters (backslash vs forward slash) is outside "
35970 "the scope of libguestfs, but usually a simple character replacement will "
35975 #: ../src/guestfs.pod:666
35977 "To resolve the case insensitivity of paths, call "
35978 "L</guestfs_case_sensitive_path>."
35982 #: ../src/guestfs.pod:669
35983 msgid "ACCESSING THE WINDOWS REGISTRY"
35987 #: ../src/guestfs.pod:671
35989 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35990 "files, through the library C<hivex> which is part of the libguestfs project "
35991 "although ships as a separate tarball. You have to locate and download the "
35992 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35993 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
35994 "L<virt-win-reg(1)> for more help on this issue."
35998 #: ../src/guestfs.pod:679
35999 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
36003 #: ../src/guestfs.pod:681
36005 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
36006 "provide something which looks like a Linux symlink. The way it tries to do "
36007 "the rewriting is described here:"
36011 #: ../src/guestfs.pod:685
36012 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
36016 #: ../src/guestfs.pod:687
36018 "The essential problem is that ntfs-3g simply does not have enough "
36019 "information to do a correct job. NTFS links can contain drive letters and "
36020 "references to external device GUIDs that ntfs-3g has no way of resolving. "
36021 "It is almost certainly the case that libguestfs callers should ignore what "
36022 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
36026 #: ../src/guestfs.pod:694
36028 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
36029 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
36030 "attribute, and read the raw reparse data from that (you can find the format "
36031 "documented in various places around the web)."
36035 #: ../src/guestfs.pod:699
36036 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
36040 #: ../src/guestfs.pod:701
36042 "There are other useful extended attributes that can be read from ntfs-3g "
36043 "filesystems (using L</guestfs_getxattr>). See:"
36047 #: ../src/guestfs.pod:704
36048 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
36052 #: ../src/guestfs.pod:706
36053 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
36057 #: ../src/guestfs.pod:708
36059 "Although we don't want to discourage you from using the C API, we will "
36060 "mention here that the same API is also available in other languages."
36064 #: ../src/guestfs.pod:711
36066 "The API is broadly identical in all supported languages. This means that "
36067 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
36068 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
36069 "OCaml. In other words, a straightforward, predictable isomorphism between "
36074 #: ../src/guestfs.pod:717
36076 "Error messages are automatically transformed into exceptions if the language "
36081 #: ../src/guestfs.pod:720
36083 "We don't try to \"object orientify\" parts of the API in OO languages, "
36084 "although contributors are welcome to write higher level APIs above what we "
36085 "provide in their favourite languages if they wish."
36089 #: ../src/guestfs.pod:726
36094 #: ../src/guestfs.pod:728
36096 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
36097 "identical to the C API. C++ classes and exceptions are not used."
36101 #: ../src/guestfs.pod:732
36106 #: ../src/guestfs.pod:734
36108 "The C# bindings are highly experimental. Please read the warnings at the "
36109 "top of C<csharp/Libguestfs.cs>."
36113 #: ../src/guestfs.pod:737
36118 #: ../src/guestfs.pod:739
36119 msgid "See L<guestfs-erlang(3)>."
36123 #: ../src/guestfs.pod:741
36128 #: ../src/guestfs.pod:743
36130 "This is the only language binding that is working but incomplete. Only "
36131 "calls which return simple integers have been bound in Haskell, and we are "
36132 "looking for help to complete this binding."
36136 #: ../src/guestfs.pod:747
36141 #: ../src/guestfs.pod:749
36143 "Full documentation is contained in the Javadoc which is distributed with "
36144 "libguestfs. For examples, see L<guestfs-java(3)>."
36148 #: ../src/guestfs.pod:752
36153 #: ../src/guestfs.pod:754
36154 msgid "See L<guestfs-ocaml(3)>."
36158 #: ../src/guestfs.pod:756
36163 #: ../src/guestfs.pod:758
36164 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
36168 #: ../src/guestfs.pod:760
36173 #: ../src/guestfs.pod:762
36175 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
36176 "the php-libguestfs package for your distribution."
36180 #: ../src/guestfs.pod:765
36181 msgid "The PHP binding only works correctly on 64 bit machines."
36185 #: ../src/guestfs.pod:767
36190 #: ../src/guestfs.pod:769
36191 msgid "See L<guestfs-python(3)>."
36195 #: ../src/guestfs.pod:771
36200 #: ../src/guestfs.pod:773
36201 msgid "See L<guestfs-ruby(3)>."
36205 #: ../src/guestfs.pod:775
36206 msgid "B<shell scripts>"
36210 #: ../src/guestfs.pod:777
36211 msgid "See L<guestfish(1)>."
36215 #: ../src/guestfs.pod:781
36216 msgid "LIBGUESTFS GOTCHAS"
36220 #: ../src/guestfs.pod:783
36222 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
36223 "system [...] that works in the way it is documented but is counterintuitive "
36224 "and almost invites mistakes.\""
36228 #: ../src/guestfs.pod:787
36230 "Since we developed libguestfs and the associated tools, there are several "
36231 "things we would have designed differently, but are now stuck with for "
36232 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
36233 "release, you can expect these to change. Beware of them."
36237 #: ../src/guestfs.pod:795
36238 msgid "Autosync / forgetting to sync."
36242 #: ../src/guestfs.pod:797
36244 "I<Update:> Autosync is enabled by default for all API users starting from "
36245 "libguestfs 1.5.24. This section only applies to older versions."
36249 #: ../src/guestfs.pod:800
36251 "When modifying a filesystem from C or another language, you B<must> unmount "
36252 "all filesystems and call L</guestfs_sync> explicitly before you close the "
36253 "libguestfs handle. You can also call:"
36257 #: ../src/guestfs.pod:804
36260 " guestfs_set_autosync (g, 1);\n"
36265 #: ../src/guestfs.pod:806
36267 "to have the unmount/sync done automatically for you when the handle 'g' is "
36268 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
36273 #: ../src/guestfs.pod:810
36275 "If you forget to do this, then it is entirely possible that your changes "
36276 "won't be written out, or will be partially written, or (very rarely) that "
36277 "you'll get disk corruption."
36281 #: ../src/guestfs.pod:814
36283 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
36284 "guestfish scripts that forget to sync will work just fine, which can make "
36285 "this very puzzling if you are trying to debug a problem."
36289 #: ../src/guestfs.pod:818
36290 msgid "Mount option C<-o sync> should not be the default."
36294 #: ../src/guestfs.pod:820
36296 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
36297 "libguestfs 1.13.16. This section only applies to older versions."
36301 #: ../src/guestfs.pod:823
36303 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
36304 "However C<-o sync> does not add any reliability benefit, but does have a "
36305 "very large performance impact."
36309 #: ../src/guestfs.pod:827
36311 "The work around is to use L</guestfs_mount_options> and set the mount "
36312 "options that you actually want to use."
36316 #: ../src/guestfs.pod:830
36317 msgid "Read-only should be the default."
36321 #: ../src/guestfs.pod:832
36323 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
36324 "specify I<--rw> if you want to make changes to the image."
36328 #: ../src/guestfs.pod:835
36329 msgid "This would reduce the potential to corrupt live VM images."
36333 #: ../src/guestfs.pod:837
36335 "Note that many filesystems change the disk when you just mount and unmount, "
36336 "even if you didn't perform any writes. You need to use "
36337 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
36341 #: ../src/guestfs.pod:841
36342 msgid "guestfish command line is hard to use."
36346 #: ../src/guestfs.pod:843
36348 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
36349 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
36350 "exist, so it fails. In earlier versions of guestfish the error message was "
36351 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
36352 "we should have used C<guestfish -c command> to run commands."
36356 #: ../src/guestfs.pod:850
36357 msgid "guestfish megabyte modifiers don't work right on all commands"
36361 #: ../src/guestfs.pod:852
36363 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
36364 "other modifiers). What guestfish actually does is to multiply the number "
36365 "part by the modifier part and pass the result to the C API. However this "
36366 "doesn't work for a few APIs which aren't expecting bytes, but are already "
36367 "expecting some other unit (eg. megabytes)."
36371 #: ../src/guestfs.pod:859
36372 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
36376 #: ../src/guestfs.pod:861
36379 " lvcreate LV VG 100M\n"
36384 #: ../src/guestfs.pod:863
36386 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
36387 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
36388 "megabytes * megabytes) logical volume. The error message you get from this "
36389 "is also a little obscure."
36393 #: ../src/guestfs.pod:868
36395 "This could be fixed in the generator by specially marking parameters and "
36396 "return values which take bytes or other units."
36400 #: ../src/guestfs.pod:871
36401 msgid "Ambiguity between devices and paths"
36405 #: ../src/guestfs.pod:873
36407 "There is a subtle ambiguity in the API between a device name "
36408 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
36409 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
36413 #: ../src/guestfs.pod:878
36415 "In the current API we usually resolve this ambiguity by having two separate "
36416 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
36417 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
36418 "detecting if the path supplied begins with C</dev/>."
36422 #: ../src/guestfs.pod:884
36424 "To avoid both the ambiguity and the need to duplicate some calls, we could "
36425 "make paths/devices into structured names. One way to do this would be to "
36426 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
36427 "aspect of grub. Another way would be to use a structured type, equivalent "
36428 "to this OCaml type:"
36432 #: ../src/guestfs.pod:890
36435 " type path = Path of string | Device of int | Partition of int * int\n"
36440 #: ../src/guestfs.pod:892
36441 msgid "which would allow you to pass arguments like:"
36445 #: ../src/guestfs.pod:894
36448 " Path \"/foo/bar\"\n"
36449 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
36450 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
36451 " Path \"/dev/sdb2\" (* not a device *)\n"
36456 #: ../src/guestfs.pod:899
36458 "As you can see there are still problems to resolve even with this "
36459 "representation. Also consider how it might work in guestfish."
36463 #: ../src/guestfs.pod:904
36464 msgid "KEYS AND PASSPHRASES"
36468 #: ../src/guestfs.pod:906
36470 "Certain libguestfs calls take a parameter that contains sensitive key "
36471 "material, passed in as a C string."
36475 #: ../src/guestfs.pod:909
36477 "In the future we would hope to change the libguestfs implementation so that "
36478 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
36479 "swap. However this is I<not> done at the moment, because of the complexity "
36480 "of such an implementation."
36484 #: ../src/guestfs.pod:914
36486 "Therefore you should be aware that any key parameter you pass to libguestfs "
36487 "might end up being written out to the swap partition. If this is a concern, "
36488 "scrub the swap partition or don't use libguestfs on encrypted devices."
36492 #: ../src/guestfs.pod:919
36493 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
36497 #: ../src/guestfs.pod:921
36499 "All high-level libguestfs actions are synchronous. If you want to use "
36500 "libguestfs asynchronously then you must create a thread."
36504 #: ../src/guestfs.pod:924
36506 "Only use the handle from a single thread. Either use the handle exclusively "
36507 "from one thread, or provide your own mutex so that two threads cannot issue "
36508 "calls on the same handle at the same time."
36512 #: ../src/guestfs.pod:928
36514 "See the graphical program guestfs-browser for one possible architecture for "
36515 "multithreaded programs using libvirt and libguestfs."
36519 #: ../src/guestfs.pod:931
36524 #: ../src/guestfs.pod:933
36526 "Libguestfs needs a supermin appliance, which it finds by looking along an "
36531 #: ../src/guestfs.pod:936
36533 "By default it looks for these in the directory C<$libdir/guestfs> "
36534 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
36538 #: ../src/guestfs.pod:939
36540 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
36541 "to change the directories that libguestfs will search in. The value is a "
36542 "colon-separated list of paths. The current directory is I<not> searched "
36543 "unless the path contains an empty element or C<.>. For example "
36544 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
36545 "then C</usr/lib/guestfs>."
36549 #: ../src/guestfs.pod:946
36550 msgid "QEMU WRAPPERS"
36554 #: ../src/guestfs.pod:948
36556 "If you want to compile your own qemu, run qemu from a non-standard location, "
36557 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
36562 #: ../src/guestfs.pod:952
36564 "There is one important rule to remember: you I<must C<exec qemu>> as the "
36565 "last command in the shell script (so that qemu replaces the shell and "
36566 "becomes the direct child of the libguestfs-using program). If you don't do "
36567 "this, then the qemu process won't be cleaned up correctly."
36571 #: ../src/guestfs.pod:957
36573 "Here is an example of a wrapper, where I have built my own copy of qemu from "
36578 #: ../src/guestfs.pod:960
36582 " qemudir=/home/rjones/d/qemu\n"
36583 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
36589 #: ../src/guestfs.pod:964
36591 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
36592 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
36597 #: ../src/guestfs.pod:968
36600 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
36605 #: ../src/guestfs.pod:970
36607 "Note that libguestfs also calls qemu with the -help and -version options in "
36608 "order to determine features."
36612 #: ../src/guestfs.pod:973
36614 "Wrappers can also be used to edit the options passed to qemu. In the "
36615 "following example, the C<-machine ...> option (C<-machine> and the following "
36616 "argument) are removed from the command line and replaced with C<-machine "
36617 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
36618 "right one to remove, putting the remaining options into the C<args> array."
36622 #: ../src/guestfs.pod:982
36626 " while [ $# -gt 0 ]; do\n"
36627 " case \"$1\" in\n"
36631 " args[i]=\"$1\"\n"
36640 #: ../src/guestfs.pod:994
36643 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
36648 #: ../src/guestfs.pod:996
36649 msgid "ATTACHING TO RUNNING DAEMONS"
36653 #: ../src/guestfs.pod:998
36655 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
36656 "babies. Use with caution."
36660 #: ../src/guestfs.pod:1001
36662 "I<Note (2):> This section explains how to attach to a running daemon from a "
36663 "low level perspective. For most users, simply using virt tools such as "
36664 "L<guestfish(1)> with the I<--live> option will \"just work\"."
36668 #: ../src/guestfs.pod:1005
36669 msgid "Using guestfs_set_attach_method"
36673 #: ../src/guestfs.pod:1007
36675 "By calling L</guestfs_set_attach_method> you can change how the library "
36676 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
36677 "L</ARCHITECTURE> for some background)."
36681 #: ../src/guestfs.pod:1011
36683 "The normal attach method is C<appliance>, where a small appliance is created "
36684 "containing the daemon, and then the library connects to this."
36688 #: ../src/guestfs.pod:1014
36690 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
36691 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
36692 "daemon over the Unix domain socket."
36696 #: ../src/guestfs.pod:1018
36698 "The normal use for this is to connect to a running virtual machine that "
36699 "contains a C<guestfsd> daemon, and send commands so you can read and write "
36700 "files inside the live virtual machine."
36704 #: ../src/guestfs.pod:1022
36705 msgid "Using guestfs_add_domain with live flag"
36709 #: ../src/guestfs.pod:1024
36711 "L</guestfs_add_domain> provides some help for getting the correct attach "
36712 "method. If you pass the C<live> option to this function, then (if the "
36713 "virtual machine is running) it will examine the libvirt XML looking for a "
36714 "virtio-serial channel to connect to:"
36718 #: ../src/guestfs.pod:1030
36725 " <channel type='unix'>\n"
36726 " <source mode='bind' path='/path/to/socket'/>\n"
36727 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
36736 #: ../src/guestfs.pod:1042
36738 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
36739 "method to C<unix:/path/to/socket>."
36743 #: ../src/guestfs.pod:1045
36745 "Some of the libguestfs tools (including guestfish) support a I<--live> "
36746 "option which is passed through to L</guestfs_add_domain> thus allowing you "
36747 "to attach to and modify live virtual machines."
36751 #: ../src/guestfs.pod:1049
36753 "The virtual machine needs to have been set up beforehand so that it has the "
36754 "virtio-serial channel and so that guestfsd is running inside it."
36758 #: ../src/guestfs.pod:1053
36759 msgid "ABI GUARANTEE"
36763 #: ../src/guestfs.pod:1055
36765 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36766 "actions as outlined in this section. Although we will deprecate some "
36767 "actions, for example if they get replaced by newer calls, we will keep the "
36768 "old actions forever. This allows you the developer to program in confidence "
36769 "against the libguestfs API."
36773 #: ../src/guestfs.pod:1061
36774 msgid "BLOCK DEVICE NAMING"
36778 #: ../src/guestfs.pod:1063
36780 "In the kernel there is now quite a profusion of schemata for naming block "
36781 "devices (in this context, by I<block device> I mean a physical or virtual "
36782 "hard drive). The original Linux IDE driver used names starting with "
36783 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
36784 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
36785 "replacement for the old IDE driver (particularly for SATA devices) those "
36786 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
36787 "machines with paravirtualized drivers. This has created several different "
36788 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
36793 #: ../src/guestfs.pod:1075
36795 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36796 "Linux kernel to access block devices. We can run a variety of appliances "
36797 "based on a variety of Linux kernels."
36801 #: ../src/guestfs.pod:1079
36803 "This causes a problem for libguestfs because many API calls use device or "
36804 "partition names. Working scripts and the recipe (example) scripts that we "
36805 "make available over the internet could fail if the naming scheme changes."
36809 #: ../src/guestfs.pod:1084
36811 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36812 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
36813 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
36814 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36818 #: ../src/guestfs.pod:1090
36820 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
36821 "L</guestfs_list_partitions> and similar calls return the true names of the "
36822 "devices and partitions as known to the appliance."
36826 #: ../src/guestfs.pod:1095
36827 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36831 #: ../src/guestfs.pod:1097
36833 "Usually this translation is transparent. However in some (very rare) cases "
36834 "you may need to know the exact algorithm. Such cases include where you use "
36835 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
36836 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
36841 #: ../src/guestfs.pod:1103
36843 "The algorithm is applied only to I<parameters> which are known to be either "
36844 "device or partition names. Return values from functions such as "
36845 "L</guestfs_list_devices> are never changed."
36849 #: ../src/guestfs.pod:1111
36850 msgid "Is the string a parameter which is a device or partition name?"
36854 #: ../src/guestfs.pod:1115
36855 msgid "Does the string begin with C</dev/sd>?"
36859 #: ../src/guestfs.pod:1119
36861 "Does the named device exist? If so, we use that device. However if I<not> "
36862 "then we continue with this algorithm."
36866 #: ../src/guestfs.pod:1124
36867 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36871 #: ../src/guestfs.pod:1126
36872 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36876 #: ../src/guestfs.pod:1128
36877 msgid "If that named device exists, use it. If not, continue."
36881 #: ../src/guestfs.pod:1132
36882 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36886 #: ../src/guestfs.pod:1134
36887 msgid "If that named device exists, use it. If not, return an error."
36891 #: ../src/guestfs.pod:1138
36892 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36896 #: ../src/guestfs.pod:1140
36898 "Although the standard naming scheme and automatic translation is useful for "
36899 "simple programs and guestfish scripts, for larger programs it is best not to "
36900 "rely on this mechanism."
36904 #: ../src/guestfs.pod:1144
36906 "Where possible for maximum future portability programs using libguestfs "
36907 "should use these future-proof techniques:"
36911 #: ../src/guestfs.pod:1151
36913 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36914 "device names, and then use those names directly."
36918 #: ../src/guestfs.pod:1154
36919 msgid "Since those device names exist by definition, they will never be translated."
36923 #: ../src/guestfs.pod:1159
36925 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36926 "filesystem labels."
36930 #: ../src/guestfs.pod:1166
36932 "This section discusses security implications of using libguestfs, "
36933 "particularly with untrusted or malicious guests or disk images."
36937 #: ../src/guestfs.pod:1169
36938 msgid "GENERAL SECURITY CONSIDERATIONS"
36942 #: ../src/guestfs.pod:1171
36944 "Be careful with any files or data that you download from a guest (by "
36945 "\"download\" we mean not just the L</guestfs_download> command but any "
36946 "command that reads files, filenames, directories or anything else from a "
36947 "disk image). An attacker could manipulate the data to fool your program "
36948 "into doing the wrong thing. Consider cases such as:"
36952 #: ../src/guestfs.pod:1181
36953 msgid "the data (file etc) not being present"
36957 #: ../src/guestfs.pod:1185
36958 msgid "being present but empty"
36962 #: ../src/guestfs.pod:1189
36963 msgid "being much larger than normal"
36967 #: ../src/guestfs.pod:1193
36968 msgid "containing arbitrary 8 bit data"
36972 #: ../src/guestfs.pod:1197
36973 msgid "being in an unexpected character encoding"
36977 #: ../src/guestfs.pod:1201
36978 msgid "containing homoglyphs."
36982 #: ../src/guestfs.pod:1205
36983 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36987 #: ../src/guestfs.pod:1207
36989 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36990 "(VFS) module can sometimes be escalated into exploits by deliberately "
36991 "creating a malicious, malformed filesystem. These exploits are very severe "
36992 "for two reasons. Firstly there are very many filesystem drivers in the "
36993 "kernel, and many of them are infrequently used and not much developer "
36994 "attention has been paid to the code. Linux userspace helps potential "
36995 "crackers by detecting the filesystem type and automatically choosing the "
36996 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36997 "the administrator. Secondly, a kernel-level exploit is like a local root "
36998 "exploit (worse in some ways), giving immediate and total access to the "
36999 "system right down to the hardware level."
37003 #: ../src/guestfs.pod:1220
37005 "That explains why you should never mount a filesystem from an untrusted "
37006 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
37007 "inside a qemu virtual machine, usually running as a non-root user. The "
37008 "attacker would need to write a filesystem which first exploited the kernel, "
37009 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
37010 "the libguestfs protocol, and finally to be as serious as the host kernel "
37011 "exploit it would need to escalate its privileges to root. This multi-step "
37012 "escalation, performed by a static piece of data, is thought to be extremely "
37013 "hard to do, although we never say 'never' about security issues."
37017 #: ../src/guestfs.pod:1231
37019 "In any case callers can reduce the attack surface by forcing the filesystem "
37020 "type when mounting (use L</guestfs_mount_vfs>)."
37024 #: ../src/guestfs.pod:1234
37025 msgid "PROTOCOL SECURITY"
37029 #: ../src/guestfs.pod:1236
37031 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
37032 "defined upper message size. However a program that uses libguestfs must "
37033 "also take care - for example you can write a program that downloads a binary "
37034 "from a disk image and executes it locally, and no amount of protocol "
37035 "security will save you from the consequences."
37039 #: ../src/guestfs.pod:1242
37040 msgid "INSPECTION SECURITY"
37044 #: ../src/guestfs.pod:1244
37046 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
37047 "directly from the guest, and these could contain any 8 bit data. Callers "
37048 "should be careful to escape these before printing them to a structured file "
37049 "(for example, use HTML escaping if creating a web page)."
37053 #: ../src/guestfs.pod:1250
37055 "Guest configuration may be altered in unusual ways by the administrator of "
37056 "the virtual machine, and may not reflect reality (particularly for untrusted "
37057 "or actively malicious guests). For example we parse the hostname from "
37058 "configuration files like C</etc/sysconfig/network> that we find in the "
37059 "guest, but the guest administrator can easily manipulate these files to "
37060 "provide the wrong hostname."
37064 #: ../src/guestfs.pod:1258
37066 "The inspection API parses guest configuration using two external libraries: "
37067 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
37068 "designed to be robust in the face of malicious data, although denial of "
37069 "service attacks are still possible, for example with oversized configuration "
37074 #: ../src/guestfs.pod:1264
37075 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
37079 #: ../src/guestfs.pod:1266
37081 "Be very cautious about running commands from the guest. By running a "
37082 "command in the guest, you are giving CPU time to a binary that you do not "
37083 "control, under the same user account as the library, albeit wrapped in qemu "
37084 "virtualization. More information and alternatives can be found in the "
37085 "section L</RUNNING COMMANDS>."
37089 #: ../src/guestfs.pod:1272
37090 msgid "CVE-2010-3851"
37094 #: ../src/guestfs.pod:1274
37095 msgid "https://bugzilla.redhat.com/642934"
37099 #: ../src/guestfs.pod:1276
37101 "This security bug concerns the automatic disk format detection that qemu "
37102 "does on disk images."
37106 #: ../src/guestfs.pod:1279
37108 "A raw disk image is just the raw bytes, there is no header. Other disk "
37109 "images like qcow2 contain a special header. Qemu deals with this by looking "
37110 "for one of the known headers, and if none is found then assuming the disk "
37111 "image must be raw."
37115 #: ../src/guestfs.pod:1284
37117 "This allows a guest which has been given a raw disk image to write some "
37118 "other header. At next boot (or when the disk image is accessed by "
37119 "libguestfs) qemu would do autodetection and think the disk image format was, "
37120 "say, qcow2 based on the header written by the guest."
37124 #: ../src/guestfs.pod:1289
37126 "This in itself would not be a problem, but qcow2 offers many features, one "
37127 "of which is to allow a disk image to refer to another image (called the "
37128 "\"backing disk\"). It does this by placing the path to the backing disk "
37129 "into the qcow2 header. This path is not validated and could point to any "
37130 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
37131 "\"holes\" in the qcow2 disk image, which of course is completely under the "
37132 "control of the attacker."
37136 #: ../src/guestfs.pod:1297
37137 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
37141 #: ../src/guestfs.pod:1304
37142 msgid "You have enabled the network or have opened the disk in write mode."
37146 #: ../src/guestfs.pod:1308
37148 "You are also running untrusted code from the guest (see L</RUNNING "
37153 #: ../src/guestfs.pod:1313
37155 "The way to avoid this is to specify the expected disk format when adding "
37156 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
37157 "should always do this if the disk is raw format, and it's a good idea for "
37162 #: ../src/guestfs.pod:1318
37164 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
37165 "format is fetched from libvirt and passed through."
37169 #: ../src/guestfs.pod:1321
37171 "For libguestfs tools, use the I<--format> command line parameter as "
37176 #: ../src/guestfs.pod:1324
37177 msgid "CONNECTION MANAGEMENT"
37181 #: ../src/guestfs.pod:1326
37182 msgid "guestfs_h *"
37186 #: ../src/guestfs.pod:1328
37188 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
37189 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
37190 "handle and release all resources used."
37194 #: ../src/guestfs.pod:1332
37196 "For information on using multiple handles and threads, see the section "
37197 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
37201 #: ../src/guestfs.pod:1335
37202 msgid "guestfs_create"
37206 #: ../src/guestfs.pod:1337
37209 " guestfs_h *guestfs_create (void);\n"
37214 #: ../src/guestfs.pod:1339
37215 msgid "Create a connection handle."
37219 #: ../src/guestfs.pod:1341
37221 "On success this returns a non-NULL pointer to a handle. On error it returns "
37226 #: ../src/guestfs.pod:1344
37228 "You have to \"configure\" the handle after creating it. This includes "
37229 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
37230 "handle at least once."
37234 #: ../src/guestfs.pod:1348
37235 msgid "After configuring the handle, you have to call L</guestfs_launch>."
37239 #: ../src/guestfs.pod:1350
37241 "You may also want to configure error handling for the handle. See the "
37242 "L</ERROR HANDLING> section below."
37246 #: ../src/guestfs.pod:1353
37247 msgid "guestfs_close"
37251 #: ../src/guestfs.pod:1355
37254 " void guestfs_close (guestfs_h *g);\n"
37259 #: ../src/guestfs.pod:1357
37260 msgid "This closes the connection handle and frees up all resources used."
37264 #: ../src/guestfs.pod:1359
37266 "If autosync was set on the handle and the handle was launched, then this "
37267 "implicitly calls various functions to unmount filesystems and sync the "
37268 "disk. See L</guestfs_set_autosync> for more details."
37272 #: ../src/guestfs.pod:1363
37273 msgid "If a close callback was set on the handle, then it is called."
37277 #: ../src/guestfs.pod:1365
37278 msgid "ERROR HANDLING"
37282 #: ../src/guestfs.pod:1367
37284 "API functions can return errors. For example, almost all functions that "
37285 "return C<int> will return C<-1> to indicate an error."
37289 #: ../src/guestfs.pod:1370
37291 "Additional information is available for errors: an error message string and "
37292 "optionally an error number (errno) if the thing that failed was a system "
37297 #: ../src/guestfs.pod:1374
37299 "You can get at the additional information about the last error on the handle "
37300 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
37301 "up an error handler with L</guestfs_set_error_handler>."
37305 #: ../src/guestfs.pod:1379
37307 "When the handle is created, a default error handler is installed which "
37308 "prints the error message string to C<stderr>. For small short-running "
37309 "command line programs it is sufficient to do:"
37313 #: ../src/guestfs.pod:1383
37316 " if (guestfs_launch (g) == -1)\n"
37317 " exit (EXIT_FAILURE);\n"
37322 #: ../src/guestfs.pod:1386
37324 "since the default error handler will ensure that an error message has been "
37325 "printed to C<stderr> before the program exits."
37329 #: ../src/guestfs.pod:1389
37331 "For other programs the caller will almost certainly want to install an "
37332 "alternate error handler or do error handling in-line like this:"
37336 #: ../src/guestfs.pod:1392
37339 " /* This disables the default behaviour of printing errors\n"
37341 " guestfs_set_error_handler (g, NULL, NULL);\n"
37346 #: ../src/guestfs.pod:1396
37349 " if (guestfs_launch (g) == -1) {\n"
37350 " /* Examine the error message and print it etc. */\n"
37351 " char *msg = guestfs_last_error (g);\n"
37352 " int errnum = guestfs_last_errno (g);\n"
37353 " fprintf (stderr, \"%s\", msg);\n"
37354 " if (errnum != 0)\n"
37355 " fprintf (stderr, \": %s\", strerror (errnum));\n"
37356 " fprintf (stderr, \"\\n\");\n"
37363 #: ../src/guestfs.pod:1407
37365 "Out of memory errors are handled differently. The default action is to call "
37366 "L<abort(3)>. If this is undesirable, then you can set a handler using "
37367 "L</guestfs_set_out_of_memory_handler>."
37371 #: ../src/guestfs.pod:1411
37373 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
37374 "because there is no handle if this happens there is no way to get additional "
37375 "error information. However L</guestfs_create> is supposed to be a "
37376 "lightweight operation which can only fail because of insufficient memory (it "
37377 "returns NULL in this case)."
37381 #: ../src/guestfs.pod:1417
37382 msgid "guestfs_last_error"
37386 #: ../src/guestfs.pod:1419
37389 " const char *guestfs_last_error (guestfs_h *g);\n"
37394 #: ../src/guestfs.pod:1421
37396 "This returns the last error message that happened on C<g>. If there has not "
37397 "been an error since the handle was created, then this returns C<NULL>."
37401 #: ../src/guestfs.pod:1425
37403 "The lifetime of the returned string is until the next error occurs, or "
37404 "L</guestfs_close> is called."
37408 #: ../src/guestfs.pod:1428
37409 msgid "guestfs_last_errno"
37413 #: ../src/guestfs.pod:1430
37416 " int guestfs_last_errno (guestfs_h *g);\n"
37421 #: ../src/guestfs.pod:1432
37422 msgid "This returns the last error number (errno) that happened on C<g>."
37426 #: ../src/guestfs.pod:1434
37427 msgid "If successful, an errno integer not equal to zero is returned."
37431 #: ../src/guestfs.pod:1436
37432 msgid "If no error, this returns 0. This call can return 0 in three situations:"
37436 #: ../src/guestfs.pod:1443
37437 msgid "There has not been any error on the handle."
37441 #: ../src/guestfs.pod:1447
37443 "There has been an error but the errno was meaningless. This corresponds to "
37444 "the case where the error did not come from a failed system call, but for "
37445 "some other reason."
37449 #: ../src/guestfs.pod:1453
37451 "There was an error from a failed system call, but for some reason the errno "
37452 "was not captured and returned. This usually indicates a bug in libguestfs."
37456 #: ../src/guestfs.pod:1459
37458 "Libguestfs tries to convert the errno from inside the applicance into a "
37459 "corresponding errno for the caller (not entirely trivial: the appliance "
37460 "might be running a completely different operating system from the library "
37461 "and error numbers are not standardized across Un*xen). If this could not be "
37462 "done, then the error is translated to C<EINVAL>. In practice this should "
37463 "only happen in very rare circumstances."
37467 #: ../src/guestfs.pod:1467
37468 msgid "guestfs_set_error_handler"
37472 #: ../src/guestfs.pod:1469
37475 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
37477 " const char *msg);\n"
37478 " void guestfs_set_error_handler (guestfs_h *g,\n"
37479 " guestfs_error_handler_cb cb,\n"
37480 " void *opaque);\n"
37485 #: ../src/guestfs.pod:1476
37487 "The callback C<cb> will be called if there is an error. The parameters "
37488 "passed to the callback are an opaque data pointer and the error message "
37493 #: ../src/guestfs.pod:1480
37495 "C<errno> is not passed to the callback. To get that the callback must call "
37496 "L</guestfs_last_errno>."
37500 #: ../src/guestfs.pod:1483
37502 "Note that the message string C<msg> is freed as soon as the callback "
37503 "function returns, so if you want to stash it somewhere you must make your "
37508 #: ../src/guestfs.pod:1487
37509 msgid "The default handler prints messages on C<stderr>."
37513 #: ../src/guestfs.pod:1489
37514 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
37518 #: ../src/guestfs.pod:1491
37519 msgid "guestfs_get_error_handler"
37523 #: ../src/guestfs.pod:1493
37526 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
37527 " void **opaque_rtn);\n"
37532 #: ../src/guestfs.pod:1496
37533 msgid "Returns the current error handler callback."
37537 #: ../src/guestfs.pod:1498
37538 msgid "guestfs_set_out_of_memory_handler"
37542 #: ../src/guestfs.pod:1500
37545 " typedef void (*guestfs_abort_cb) (void);\n"
37546 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
37547 " guestfs_abort_cb);\n"
37552 #: ../src/guestfs.pod:1504
37554 "The callback C<cb> will be called if there is an out of memory situation. "
37555 "I<Note this callback must not return>."
37559 #: ../src/guestfs.pod:1507
37560 msgid "The default is to call L<abort(3)>."
37564 #: ../src/guestfs.pod:1509
37565 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
37569 #: ../src/guestfs.pod:1512
37570 msgid "guestfs_get_out_of_memory_handler"
37574 #: ../src/guestfs.pod:1514
37577 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
37582 #: ../src/guestfs.pod:1516
37583 msgid "This returns the current out of memory handler."
37587 #: ../src/guestfs.pod:1518
37592 #: ../src/guestfs.pod:1522
37597 #: ../src/guestfs.pod:1524
37602 #: ../src/guestfs.pod:1526
37603 msgid "AVAILABILITY"
37607 #: ../src/guestfs.pod:1528
37608 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
37612 #: ../src/guestfs.pod:1530
37614 "Using L</guestfs_available> you can test availability of the following "
37615 "groups of functions. This test queries the appliance to see if the "
37616 "appliance you are currently using supports the functionality."
37620 #: ../src/guestfs.pod:1535
37621 msgid "@AVAILABILITY@"
37625 #: ../src/guestfs.pod:1537
37626 msgid "GUESTFISH supported COMMAND"
37630 #: ../src/guestfs.pod:1539
37632 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
37633 "prints out the available groups and whether they are supported by this build "
37634 "of libguestfs. Note however that you have to do C<run> first."
37638 #: ../src/guestfs.pod:1544
37639 msgid "SINGLE CALLS AT COMPILE TIME"
37643 #: ../src/guestfs.pod:1546
37645 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
37646 "function, such as:"
37650 #: ../src/guestfs.pod:1549
37653 " #define LIBGUESTFS_HAVE_DD 1\n"
37658 #: ../src/guestfs.pod:1551
37659 msgid "if L</guestfs_dd> is available."
37663 #: ../src/guestfs.pod:1553
37665 "Before version 1.5.8, if you needed to test whether a single libguestfs "
37666 "function is available at compile time, we recommended using build tools such "
37667 "as autoconf or cmake. For example in autotools you could use:"
37671 #: ../src/guestfs.pod:1558
37674 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
37675 " AC_CHECK_FUNCS([guestfs_dd])\n"
37680 #: ../src/guestfs.pod:1561
37682 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
37687 #: ../src/guestfs.pod:1564
37688 msgid "SINGLE CALLS AT RUN TIME"
37692 #: ../src/guestfs.pod:1566
37694 "Testing at compile time doesn't guarantee that a function really exists in "
37695 "the library. The reason is that you might be dynamically linked against a "
37696 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
37697 "This situation unfortunately results in a segmentation fault, which is a "
37698 "shortcoming of the C dynamic linking system itself."
37702 #: ../src/guestfs.pod:1573
37704 "You can use L<dlopen(3)> to test if a function is available at run time, as "
37705 "in this example program (note that you still need the compile time check as "
37710 #: ../src/guestfs.pod:1577
37713 " #include <stdio.h>\n"
37714 " #include <stdlib.h>\n"
37715 " #include <unistd.h>\n"
37716 " #include <dlfcn.h>\n"
37717 " #include <guestfs.h>\n"
37722 #: ../src/guestfs.pod:1583
37727 " #ifdef LIBGUESTFS_HAVE_DD\n"
37729 " int has_function;\n"
37734 #: ../src/guestfs.pod:1589
37737 " /* Test if the function guestfs_dd is really available. */\n"
37738 " dl = dlopen (NULL, RTLD_LAZY);\n"
37740 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
37741 " exit (EXIT_FAILURE);\n"
37743 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
37749 #: ../src/guestfs.pod:1598
37752 " if (!has_function)\n"
37753 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
37755 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
37756 " /* Now it's safe to call\n"
37757 " guestfs_dd (g, \"foo\", \"bar\");\n"
37761 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37768 #: ../src/guestfs.pod:1611
37770 "You may think the above is an awful lot of hassle, and it is. There are "
37771 "other ways outside of the C linking system to ensure that this kind of "
37772 "incompatibility never arises, such as using package versioning:"
37776 #: ../src/guestfs.pod:1616
37779 " Requires: libguestfs >= 1.0.80\n"
37784 #: ../src/guestfs.pod:1618
37785 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37789 #: ../src/guestfs.pod:1620
37791 "A recent feature of the API is the introduction of calls which take optional "
37792 "arguments. In C these are declared 3 ways. The main way is as a call which "
37793 "takes variable arguments (ie. C<...>), as in this example:"
37797 #: ../src/guestfs.pod:1625
37800 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37805 #: ../src/guestfs.pod:1627
37807 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37808 "call with no optional arguments specified:"
37812 #: ../src/guestfs.pod:1630
37815 " guestfs_add_drive_opts (g, filename, -1);\n"
37820 #: ../src/guestfs.pod:1632
37821 msgid "With a single optional argument:"
37825 #: ../src/guestfs.pod:1634
37828 " guestfs_add_drive_opts (g, filename,\n"
37829 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37835 #: ../src/guestfs.pod:1638
37840 #: ../src/guestfs.pod:1640
37843 " guestfs_add_drive_opts (g, filename,\n"
37844 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37845 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37851 #: ../src/guestfs.pod:1645
37853 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37858 #: ../src/guestfs.pod:1648
37859 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37863 #: ../src/guestfs.pod:1650
37865 "The second variant has the same name with the suffix C<_va>, which works the "
37866 "same way but takes a C<va_list>. See the C manual for details. For the "
37867 "example function, this is declared:"
37871 #: ../src/guestfs.pod:1654
37874 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37875 " va_list args);\n"
37880 #: ../src/guestfs.pod:1657
37881 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37885 #: ../src/guestfs.pod:1659
37887 "The third variant is useful where you need to construct these calls. You "
37888 "pass in a structure where you fill in the optional fields. The structure "
37889 "has a bitmask as the first element which you must set to indicate which "
37890 "fields you have filled in. For our example function the structure and call "
37895 #: ../src/guestfs.pod:1665
37898 " struct guestfs_add_drive_opts_argv {\n"
37899 " uint64_t bitmask;\n"
37901 " const char *format;\n"
37904 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37905 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37910 #: ../src/guestfs.pod:1674
37911 msgid "You could call it like this:"
37915 #: ../src/guestfs.pod:1676
37918 " struct guestfs_add_drive_opts_argv optargs = {\n"
37919 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37920 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37921 " .readonly = 1,\n"
37922 " .format = \"qcow2\"\n"
37928 #: ../src/guestfs.pod:1683
37931 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37936 #: ../src/guestfs.pod:1691
37937 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37941 #: ../src/guestfs.pod:1696
37942 msgid "You do not need to fill in all fields of the structure."
37946 #: ../src/guestfs.pod:1700
37948 "There must be a one-to-one correspondence between fields of the structure "
37949 "that are filled in, and bits set in the bitmask."
37953 #: ../src/guestfs.pod:1705
37954 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37958 #: ../src/guestfs.pod:1707
37960 "In other languages, optional arguments are expressed in the way that is "
37961 "natural for that language. We refer you to the language-specific "
37962 "documentation for more details on that."
37966 #: ../src/guestfs.pod:1711
37967 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37971 #: ../src/guestfs.pod:1713
37972 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37976 #: ../src/guestfs.pod:1715
37978 "B<Note:> This section documents the generic event mechanism introduced in "
37979 "libguestfs 1.10, which you should use in new code if possible. The old "
37980 "functions C<guestfs_set_log_message_callback>, "
37981 "C<guestfs_set_subprocess_quit_callback>, "
37982 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37983 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37984 "page. Because of the ABI guarantee, the old functions continue to work."
37988 #: ../src/guestfs.pod:1724
37990 "Handles generate events when certain things happen, such as log messages "
37991 "being generated, progress messages during long-running operations, or the "
37992 "handle being closed. The API calls described below let you register a "
37993 "callback to be called when events happen. You can register multiple "
37994 "callbacks (for the same, different or overlapping sets of events), and "
37995 "individually remove callbacks. If callbacks are not removed, then they "
37996 "remain in force until the handle is closed."
38000 #: ../src/guestfs.pod:1732
38002 "In the current implementation, events are only generated synchronously: that "
38003 "means that events (and hence callbacks) can only happen while you are in the "
38004 "middle of making another libguestfs call. The callback is called in the "
38009 #: ../src/guestfs.pod:1737
38011 "Events may contain a payload, usually nothing (void), an array of 64 bit "
38012 "unsigned integers, or a message buffer. Payloads are discussed later on."
38016 #: ../src/guestfs.pod:1741
38017 msgid "CLASSES OF EVENTS"
38021 #: ../src/guestfs.pod:1745
38022 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
38026 #: ../src/guestfs.pod:1748
38028 "The callback function will be called while the handle is being closed "
38029 "(synchronously from L</guestfs_close>)."
38033 #: ../src/guestfs.pod:1751
38035 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
38036 "handles that are open when the program exits. This means that this callback "
38037 "might be called indirectly from L<exit(3)>, which can cause unexpected "
38038 "problems in higher-level languages (eg. if your HLL interpreter has already "
38039 "been cleaned up by the time this is called, and if your callback then jumps "
38040 "into some HLL function)."
38044 #: ../src/guestfs.pod:1758
38046 "If no callback is registered: the handle is closed without any callback "
38051 #: ../src/guestfs.pod:1761
38052 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
38056 #: ../src/guestfs.pod:1764
38058 "The callback function will be called when the child process quits, either "
38059 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
38060 "corresponds to a transition from any state to the CONFIG state)."
38064 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
38065 msgid "If no callback is registered: the event is ignored."
38069 #: ../src/guestfs.pod:1770
38070 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
38074 #: ../src/guestfs.pod:1773
38076 "The callback function will be called when the child process becomes ready "
38077 "first time after it has been launched. (This corresponds to a transition "
38078 "from LAUNCHING to the READY state)."
38082 #: ../src/guestfs.pod:1779
38083 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
38087 #: ../src/guestfs.pod:1782
38089 "Some long-running operations can generate progress messages. If this "
38090 "callback is registered, then it will be called each time a progress message "
38091 "is generated (usually two seconds after the operation started, and three "
38092 "times per second thereafter until it completes, although the frequency may "
38093 "change in future versions)."
38097 #: ../src/guestfs.pod:1788
38099 "The callback receives in the payload four unsigned 64 bit numbers which are "
38100 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
38104 #: ../src/guestfs.pod:1791
38106 "The units of C<total> are not defined, although for some operations C<total> "
38107 "may relate in some way to the amount of data to be transferred (eg. in bytes "
38108 "or megabytes), and C<position> may be the portion which has been "
38113 #: ../src/guestfs.pod:1796
38114 msgid "The only defined and stable parts of the API are:"
38118 #: ../src/guestfs.pod:1802
38120 "The callback can display to the user some type of progress bar or indicator "
38121 "which shows the ratio of C<position>:C<total>."
38125 #: ../src/guestfs.pod:1807
38126 msgid "0 E<lt>= C<position> E<lt>= C<total>"
38130 #: ../src/guestfs.pod:1811
38132 "If any progress notification is sent during a call, then a final progress "
38133 "notification is always sent when C<position> = C<total> (I<unless> the call "
38134 "fails with an error)."
38138 #: ../src/guestfs.pod:1815
38140 "This is to simplify caller code, so callers can easily set the progress "
38141 "indicator to \"100%\" at the end of the operation, without requiring special "
38142 "code to detect this case."
38146 #: ../src/guestfs.pod:1821
38148 "For some calls we are unable to estimate the progress of the call, but we "
38149 "can still generate progress messages to indicate activity. This is known as "
38150 "\"pulse mode\", and is directly supported by certain progress bar "
38151 "implementations (eg. GtkProgressBar)."
38155 #: ../src/guestfs.pod:1826
38157 "For these calls, zero or more progress messages are generated with "
38158 "C<position = 0> and C<total = 1>, followed by a final message with "
38159 "C<position = total = 1>."
38163 #: ../src/guestfs.pod:1830
38165 "As noted above, if the call fails with an error then the final message may "
38166 "not be generated."
38170 #: ../src/guestfs.pod:1835
38172 "The callback also receives the procedure number (C<proc_nr>) and serial "
38173 "number (C<serial>) of the call. These are only useful for debugging "
38174 "protocol issues, and the callback can normally ignore them. The callback "
38175 "may want to print these numbers in error messages or debugging messages."
38179 #: ../src/guestfs.pod:1841
38180 msgid "If no callback is registered: progress messages are discarded."
38184 #: ../src/guestfs.pod:1843
38185 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
38189 #: ../src/guestfs.pod:1846
38191 "The callback function is called whenever a log message is generated by qemu, "
38192 "the appliance kernel, guestfsd (daemon), or utility programs."
38196 #: ../src/guestfs.pod:1849
38198 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
38199 "(L</guestfs_launch>) then additional debug messages are generated."
38203 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
38205 "If no callback is registered: the messages are discarded unless the verbose "
38206 "flag is set in which case they are sent to stderr. You can override the "
38207 "printing of verbose messages to stderr by setting up a callback."
38211 #: ../src/guestfs.pod:1857
38212 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
38216 #: ../src/guestfs.pod:1860
38218 "The callback function is called whenever a log message is generated by the "
38219 "library part of libguestfs."
38223 #: ../src/guestfs.pod:1863
38225 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
38226 "messages are generated."
38230 #: ../src/guestfs.pod:1871
38231 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
38235 #: ../src/guestfs.pod:1874
38237 "The callback function is called whenever a trace message is generated. This "
38238 "only applies if the trace flag (L</guestfs_set_trace>) is set."
38242 #: ../src/guestfs.pod:1877
38244 "If no callback is registered: the messages are sent to stderr. You can "
38245 "override the printing of trace messages to stderr by setting up a callback."
38249 #: ../src/guestfs.pod:1881
38250 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
38254 #: ../src/guestfs.pod:1884
38255 msgid "The callback function is called whenever a libguestfs function is entered."
38259 #: ../src/guestfs.pod:1887
38261 "The payload is a string which contains the name of the function that we are "
38262 "entering (not including C<guestfs_> prefix)."
38266 #: ../src/guestfs.pod:1890
38268 "Note that libguestfs functions can call themselves, so you may see many "
38269 "events from a single call. A few libguestfs functions do not generate this "
38274 #: ../src/guestfs.pod:1898
38275 msgid "guestfs_set_event_callback"
38279 #: ../src/guestfs.pod:1900
38282 " int guestfs_set_event_callback (guestfs_h *g,\n"
38283 " guestfs_event_callback cb,\n"
38284 " uint64_t event_bitmask,\n"
38286 " void *opaque);\n"
38291 #: ../src/guestfs.pod:1906
38293 "This function registers a callback (C<cb>) for all event classes in the "
38294 "C<event_bitmask>."
38298 #: ../src/guestfs.pod:1909
38300 "For example, to register for all log message events, you could call this "
38301 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
38302 "To register a single callback for all possible classes of events, use "
38303 "C<GUESTFS_EVENT_ALL>."
38307 #: ../src/guestfs.pod:1915
38308 msgid "C<flags> should always be passed as 0."
38312 #: ../src/guestfs.pod:1917
38314 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
38315 "it for any purpose."
38319 #: ../src/guestfs.pod:1920
38321 "The return value is the event handle (an integer) which you can use to "
38322 "delete the callback (see below)."
38326 #: ../src/guestfs.pod:1923
38328 "If there is an error, this function returns C<-1>, and sets the error in the "
38329 "handle in the usual way (see L</guestfs_last_error> etc.)"
38333 #: ../src/guestfs.pod:1926
38335 "Callbacks remain in effect until they are deleted, or until the handle is "
38340 #: ../src/guestfs.pod:1929
38342 "In the case where multiple callbacks are registered for a particular event "
38343 "class, all of the callbacks are called. The order in which multiple "
38344 "callbacks are called is not defined."
38348 #: ../src/guestfs.pod:1933
38349 msgid "guestfs_delete_event_callback"
38353 #: ../src/guestfs.pod:1935
38356 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
38361 #: ../src/guestfs.pod:1937
38363 "Delete a callback that was previously registered. C<event_handle> should be "
38364 "the integer that was returned by a previous call to "
38365 "C<guestfs_set_event_callback> on the same handle."
38369 #: ../src/guestfs.pod:1941
38370 msgid "guestfs_event_callback"
38374 #: ../src/guestfs.pod:1943
38377 " typedef void (*guestfs_event_callback) (\n"
38380 " uint64_t event,\n"
38381 " int event_handle,\n"
38383 " const char *buf, size_t buf_len,\n"
38384 " const uint64_t *array, size_t array_len);\n"
38389 #: ../src/guestfs.pod:1952
38390 msgid "This is the type of the event callback function that you have to provide."
38394 #: ../src/guestfs.pod:1955
38396 "The basic parameters are: the handle (C<g>), the opaque user pointer "
38397 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
38398 "handle, and C<flags> which in the current API you should ignore."
38402 #: ../src/guestfs.pod:1959
38404 "The remaining parameters contain the event payload (if any). Each event may "
38405 "contain a payload, which usually relates to the event class, but for future "
38406 "proofing your code should be written to handle any payload for any event "
38411 #: ../src/guestfs.pod:1964
38413 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
38414 "there is no message buffer). Note that this message buffer can contain "
38415 "arbitrary 8 bit data, including NUL bytes."
38419 #: ../src/guestfs.pod:1968
38421 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
38422 "moment this is only used for progress messages."
38426 #: ../src/guestfs.pod:1971
38427 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
38431 #: ../src/guestfs.pod:1973
38433 "One motivation for the generic event API was to allow GUI programs to "
38434 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
38435 "unconditionally to C<stderr>."
38439 #: ../src/guestfs.pod:1977
38441 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
38442 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
38443 "messages are not events; you must capture error messages separately)."
38447 #: ../src/guestfs.pod:1982
38449 "Programs have to set up a callback to capture the classes of events of "
38454 #: ../src/guestfs.pod:1985
38458 " guestfs_set_event_callback\n"
38459 " (g, message_callback,\n"
38460 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
38461 " GUESTFS_EVENT_TRACE,\n"
38462 " 0, NULL) == -1)\n"
38463 " if (eh == -1) {\n"
38464 " // handle error in the usual way\n"
38470 #: ../src/guestfs.pod:1995
38472 "The callback can then direct messages to the appropriate place. In this "
38473 "example, messages are directed to syslog:"
38477 #: ../src/guestfs.pod:1998
38481 " message_callback (\n"
38484 " uint64_t event,\n"
38485 " int event_handle,\n"
38487 " const char *buf, size_t buf_len,\n"
38488 " const uint64_t *array, size_t array_len)\n"
38490 " const int priority = LOG_USER|LOG_INFO;\n"
38491 " if (buf_len > 0)\n"
38492 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
38498 #: ../src/guestfs.pod:2013
38499 msgid "CANCELLING LONG TRANSFERS"
38503 #: ../src/guestfs.pod:2015
38505 "Some operations can be cancelled by the caller while they are in progress. "
38506 "Currently only operations that involve uploading or downloading data can be "
38507 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
38508 "parameters in the generator)."
38512 #: ../src/guestfs.pod:2020
38513 msgid "guestfs_user_cancel"
38517 #: ../src/guestfs.pod:2022
38520 " void guestfs_user_cancel (guestfs_h *g);\n"
38525 #: ../src/guestfs.pod:2024
38526 msgid "C<guestfs_user_cancel> cancels the current upload or download operation."
38530 #: ../src/guestfs.pod:2027
38532 "Unlike most other libguestfs calls, this function is signal safe and thread "
38533 "safe. You can call it from a signal handler or from another thread, without "
38534 "needing to do any locking."
38538 #: ../src/guestfs.pod:2031
38540 "The transfer that was in progress (if there is one) will stop shortly "
38541 "afterwards, and will return an error. The errno (see "
38542 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
38543 "out if the operation was cancelled or failed because of another error."
38547 #: ../src/guestfs.pod:2037
38549 "No cleanup is performed: for example, if a file was being uploaded then "
38550 "after cancellation there may be a partially uploaded file. It is the "
38551 "caller's responsibility to clean up if necessary."
38555 #: ../src/guestfs.pod:2041
38556 msgid "There are two common places that you might call C<guestfs_user_cancel>."
38560 #: ../src/guestfs.pod:2043
38562 "In an interactive text-based program, you might call it from a C<SIGINT> "
38563 "signal handler so that pressing C<^C> cancels the current operation. (You "
38564 "also need to call L</guestfs_set_pgroup> so that child processes don't "
38565 "receive the C<^C> signal)."
38569 #: ../src/guestfs.pod:2048
38571 "In a graphical program, when the main thread is displaying a progress bar "
38572 "with a cancel button, wire up the cancel button to call this function."
38576 #: ../src/guestfs.pod:2052
38577 msgid "PRIVATE DATA AREA"
38581 #: ../src/guestfs.pod:2054
38583 "You can attach named pieces of private data to the libguestfs handle, fetch "
38584 "them by name, and walk over them, for the lifetime of the handle. This is "
38585 "called the private data area and is only available from the C API."
38589 #: ../src/guestfs.pod:2059
38590 msgid "To attach a named piece of data, use the following call:"
38594 #: ../src/guestfs.pod:2061
38597 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
38602 #: ../src/guestfs.pod:2063
38604 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
38605 "pointer (which can be C<NULL>). Any previous item with the same key is "
38610 #: ../src/guestfs.pod:2067
38612 "You can use any C<key> you want, but your key should I<not> start with an "
38613 "underscore character. Keys beginning with an underscore character are "
38614 "reserved for internal libguestfs purposes (eg. for implementing language "
38615 "bindings). It is recommended that you prefix the key with some unique "
38616 "string to avoid collisions with other users."
38620 #: ../src/guestfs.pod:2073
38621 msgid "To retrieve the pointer, use:"
38625 #: ../src/guestfs.pod:2075
38628 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
38633 #: ../src/guestfs.pod:2077
38635 "This function returns C<NULL> if either no data is found associated with "
38636 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
38641 #: ../src/guestfs.pod:2081
38643 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
38644 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
38645 "all. In particular, libguestfs does I<not> try to free the data when the "
38646 "handle is closed. If the data must be freed, then the caller must either "
38647 "free it before calling L</guestfs_close> or must set up a close callback to "
38648 "do it (see L</GUESTFS_EVENT_CLOSE>)."
38652 #: ../src/guestfs.pod:2088
38653 msgid "To walk over all entries, use these two functions:"
38657 #: ../src/guestfs.pod:2090
38660 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
38665 #: ../src/guestfs.pod:2092
38668 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
38673 #: ../src/guestfs.pod:2094
38675 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
38676 "not have any particular meaning -- keys are not returned in any defined "
38677 "order). A pointer to the key is returned in C<*key_rtn> and the "
38678 "corresponding data pointer is returned from the function. C<NULL> is "
38679 "returned if there are no keys stored in the handle."
38683 #: ../src/guestfs.pod:2100
38685 "C<guestfs_next_private> returns the next key, pointer pair. The return "
38686 "value of this function is also C<NULL> is there are no further entries to "
38691 #: ../src/guestfs.pod:2104
38692 msgid "Notes about walking over entries:"
38696 #: ../src/guestfs.pod:2110
38697 msgid "You must not call C<guestfs_set_private> while walking over the entries."
38701 #: ../src/guestfs.pod:2115
38703 "The handle maintains an internal iterator which is reset when you call "
38704 "C<guestfs_first_private>. This internal iterator is invalidated when you "
38705 "call C<guestfs_set_private>."
38709 #: ../src/guestfs.pod:2121
38710 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
38714 #: ../src/guestfs.pod:2123
38717 " guestfs_set_private (g, key, NULL);\n"
38722 #: ../src/guestfs.pod:2125
38723 msgid "then that C<key> is not returned when walking."
38727 #: ../src/guestfs.pod:2129
38729 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
38730 "C<guestfs_next_private> or C<guestfs_set_private>."
38734 #: ../src/guestfs.pod:2135
38736 "The following example code shows how to print all keys and data pointers "
38737 "that are associated with the handle C<g>:"
38741 #: ../src/guestfs.pod:2138
38744 " const char *key;\n"
38745 " void *data = guestfs_first_private (g, &key);\n"
38746 " while (data != NULL)\n"
38748 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38749 " data = guestfs_next_private (g, &key);\n"
38755 #: ../src/guestfs.pod:2146
38757 "More commonly you are only interested in keys that begin with an "
38758 "application-specific prefix C<foo_>. Modify the loop like so:"
38762 #: ../src/guestfs.pod:2149
38765 " const char *key;\n"
38766 " void *data = guestfs_first_private (g, &key);\n"
38767 " while (data != NULL)\n"
38769 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38770 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38771 " data = guestfs_next_private (g, &key);\n"
38777 #: ../src/guestfs.pod:2158
38779 "If you need to modify keys while walking, then you have to jump back to the "
38780 "beginning of the loop. For example, to delete all keys prefixed with "
38785 #: ../src/guestfs.pod:2162
38788 " const char *key;\n"
38791 " data = guestfs_first_private (g, &key);\n"
38792 " while (data != NULL)\n"
38794 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38796 " guestfs_set_private (g, key, NULL);\n"
38797 " /* note that 'key' pointer is now invalid, and so is\n"
38798 " the internal iterator */\n"
38801 " data = guestfs_next_private (g, &key);\n"
38807 #: ../src/guestfs.pod:2178
38809 "Note that the above loop is guaranteed to terminate because the keys are "
38810 "being deleted, but other manipulations of keys within the loop might not "
38811 "terminate unless you also maintain an indication of which keys have been "
38816 #: ../src/guestfs.pod:2183
38821 #: ../src/guestfs.pod:2185
38823 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38824 "true of any library, not just libguestfs. However libguestfs also contains "
38825 "static markers to help in probing internal operations."
38829 #: ../src/guestfs.pod:2189
38830 msgid "You can list all the static markers by doing:"
38834 #: ../src/guestfs.pod:2191
38837 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38838 " .provider(\"guestfs\").mark(\"*\")'\n"
38843 #: ../src/guestfs.pod:2194
38845 "B<Note:> These static markers are I<not> part of the stable API and may "
38846 "change in future versions."
38850 #: ../src/guestfs.pod:2197
38851 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38855 #: ../src/guestfs.pod:2199
38857 "This script contains examples of displaying both the static markers and some "
38858 "ordinary C entry points:"
38862 #: ../src/guestfs.pod:2202
38870 #: ../src/guestfs.pod:2204
38873 " function display_time () {\n"
38874 " now = gettimeofday_us ();\n"
38877 " delta = now - last;\n"
38883 #: ../src/guestfs.pod:2211
38886 " printf (\"%d (+%d):\", now, delta);\n"
38892 #: ../src/guestfs.pod:2214
38897 " printf (\"ready\\n\");\n"
38903 #: ../src/guestfs.pod:2219
38906 " /* Display all calls to static markers. */\n"
38907 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38908 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38909 " display_time();\n"
38910 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38916 #: ../src/guestfs.pod:2226
38919 " /* Display all calls to guestfs_mkfs* functions. */\n"
38920 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38921 " .function(\"guestfs_mkfs*\") ? {\n"
38922 " display_time();\n"
38923 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38929 #: ../src/guestfs.pod:2233
38931 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38932 "program. Note that you either have to be root, or you have to add yourself "
38933 "to several special stap groups. Consult the systemtap documentation for "
38934 "more information."
38938 #: ../src/guestfs.pod:2238
38941 " # stap /tmp/test.stap\n"
38947 #: ../src/guestfs.pod:2241
38948 msgid "In another terminal, run a guestfish command such as this:"
38952 #: ../src/guestfs.pod:2245
38953 msgid "In the first terminal, stap trace output similar to this is shown:"
38957 #: ../src/guestfs.pod:2247
38960 " 1318248056692655 (+0):\tlaunch_start\n"
38961 " 1318248056692850 (+195): launch_build_appliance_start\n"
38962 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38963 " 1318248056838059 (+19774): launch_run_qemu\n"
38964 " 1318248061071167 (+4233108): launch_end\n"
38965 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f "
38966 "device=0x1024e60\n"
38971 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38976 #: ../src/guestfs.pod:2256
38978 "<!-- old anchor for the next section --> <a "
38979 "name=\"state_machine_and_low_level_event_api\"/>"
38983 #: ../src/guestfs.pod:2261
38984 msgid "ARCHITECTURE"
38988 #: ../src/guestfs.pod:2263
38990 "Internally, libguestfs is implemented by running an appliance (a special "
38991 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38992 "process of the main program."
38996 #: ../src/guestfs.pod:2267
38999 " ___________________\n"
39001 " | main program |\n"
39003 " | | child process / appliance\n"
39004 " | | __________________________\n"
39006 " +-------------------+ RPC | +-----------------+ |\n"
39007 " | libguestfs <--------------------> guestfsd | |\n"
39008 " | | | +-----------------+ |\n"
39009 " \\___________________/ | | Linux kernel | |\n"
39010 " | +--^--------------+ |\n"
39011 " \\_________|________________/\n"
39013 " _______v______\n"
39016 " | disk image |\n"
39017 " \\______________/\n"
39022 #: ../src/guestfs.pod:2287
39024 "The library, linked to the main program, creates the child process and hence "
39025 "the appliance in the L</guestfs_launch> function."
39029 #: ../src/guestfs.pod:2290
39031 "Inside the appliance is a Linux kernel and a complete stack of userspace "
39032 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
39033 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
39034 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
39035 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
39036 "attached to the qemu process which translates device access by the "
39037 "appliance's Linux kernel into accesses to the image."
39041 #: ../src/guestfs.pod:2299
39043 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
39044 "Although the disk image you are attached to might also be used by some "
39045 "virtual machine, libguestfs doesn't know or care about this. (But you will "
39046 "care if both libguestfs's qemu process and your virtual machine are trying "
39047 "to update the disk image at the same time, since these usually results in "
39048 "massive disk corruption)."
39052 #: ../src/guestfs.pod:2306
39053 msgid "STATE MACHINE"
39057 #: ../src/guestfs.pod:2308
39058 msgid "libguestfs uses a state machine to model the child process:"
39062 #: ../src/guestfs.pod:2310
39066 " guestfs_create\n"
39074 " / | \\ \\ guestfs_launch\n"
39075 " / | _\\__V______\n"
39077 " / | | LAUNCHING |\n"
39078 " / | \\___________/\n"
39080 " / | guestfs_launch\n"
39082 " ______ / __|____V\n"
39083 " / \\ ------> / \\\n"
39084 " | BUSY | | READY |\n"
39085 " \\______/ <------ \\________/\n"
39090 #: ../src/guestfs.pod:2332
39092 "The normal transitions are (1) CONFIG (when the handle is created, but there "
39093 "is no child process), (2) LAUNCHING (when the child process is booting up), "
39094 "(3) alternating between READY and BUSY as commands are issued to, and "
39095 "carried out by, the child process."
39099 #: ../src/guestfs.pod:2337
39101 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
39102 "asynchronously at any time (eg. due to some internal error), and that causes "
39103 "the state to transition back to CONFIG."
39107 #: ../src/guestfs.pod:2341
39109 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
39110 "issued when in the CONFIG state."
39114 #: ../src/guestfs.pod:2344
39116 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
39117 "L</guestfs_launch> blocks until the child process is READY to accept "
39118 "commands (or until some failure or timeout). L</guestfs_launch> internally "
39119 "moves the state from CONFIG to LAUNCHING while it is running."
39123 #: ../src/guestfs.pod:2350
39125 "API actions such as L</guestfs_mount> can only be issued when in the READY "
39126 "state. These API calls block waiting for the command to be carried out "
39127 "(ie. the state to transition to BUSY and then back to READY). There are no "
39128 "non-blocking versions, and no way to issue more than one command per handle "
39129 "at the same time."
39133 #: ../src/guestfs.pod:2356
39135 "Finally, the child process sends asynchronous messages back to the main "
39136 "program, such as kernel log messages. You can register a callback to "
39137 "receive these messages."
39141 #: ../src/guestfs.pod:2360
39146 #: ../src/guestfs.pod:2362
39147 msgid "APPLIANCE BOOT PROCESS"
39151 #: ../src/guestfs.pod:2364
39153 "This process has evolved and continues to evolve. The description here "
39154 "corresponds only to the current version of libguestfs and is provided for "
39155 "information only."
39159 #: ../src/guestfs.pod:2368
39161 "In order to follow the stages involved below, enable libguestfs debugging "
39162 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
39166 #: ../src/guestfs.pod:2373
39167 msgid "Create the appliance"
39171 #: ../src/guestfs.pod:2375
39173 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
39174 "initrd and the appliance."
39178 #: ../src/guestfs.pod:2378
39180 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
39181 "directory if C<TMPDIR> is set)."
39185 #: ../src/guestfs.pod:2381
39187 "For a complete description of how the appliance is created and cached, read "
39188 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
39192 #: ../src/guestfs.pod:2385
39193 msgid "Start qemu and boot the kernel"
39197 #: ../src/guestfs.pod:2387
39198 msgid "qemu is invoked to boot the kernel."
39202 #: ../src/guestfs.pod:2389
39203 msgid "Run the initrd"
39207 #: ../src/guestfs.pod:2391
39209 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
39210 "appliance. The purpose of the initrd is to load enough kernel modules in "
39211 "order that the appliance itself can be mounted and started."
39215 #: ../src/guestfs.pod:2395
39217 "The initrd is a cpio archive called "
39218 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
39222 #: ../src/guestfs.pod:2398
39224 "When the initrd has started you will see messages showing that kernel "
39225 "modules are being loaded, similar to this:"
39229 #: ../src/guestfs.pod:2401
39232 " febootstrap: ext2 mini initrd starting up\n"
39233 " febootstrap: mounting /sys\n"
39234 " febootstrap: internal insmod libcrc32c.ko\n"
39235 " febootstrap: internal insmod crc32c-intel.ko\n"
39240 #: ../src/guestfs.pod:2406
39241 msgid "Find and mount the appliance device"
39245 #: ../src/guestfs.pod:2408
39247 "The appliance is a sparse file containing an ext2 filesystem which contains "
39248 "a familiar (although reduced in size) Linux operating system. It would "
39249 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
39253 #: ../src/guestfs.pod:2412
39255 "The regular disks being inspected by libguestfs are the first devices "
39256 "exposed by qemu (eg. as C</dev/vda>)."
39260 #: ../src/guestfs.pod:2415
39262 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
39263 "there was only one regular disk)."
39267 #: ../src/guestfs.pod:2418
39269 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
39270 "and switch root into the appliance, and run C</init> from the appliance."
39274 #: ../src/guestfs.pod:2422
39275 msgid "If this works successfully you will see messages such as:"
39279 #: ../src/guestfs.pod:2424
39282 " febootstrap: picked /sys/block/vdb/dev as root device\n"
39283 " febootstrap: creating /dev/root as block special 252:16\n"
39284 " febootstrap: mounting new root on /root\n"
39285 " febootstrap: chroot\n"
39286 " Starting /init script ...\n"
39291 #: ../src/guestfs.pod:2430
39293 "Note that C<Starting /init script ...> indicates that the appliance's init "
39294 "script is now running."
39298 #: ../src/guestfs.pod:2433
39299 msgid "Initialize the appliance"
39303 #: ../src/guestfs.pod:2435
39305 "The appliance itself now initializes itself. This involves starting certain "
39306 "processes like C<udev>, possibly printing some debug information, and "
39307 "finally running the daemon (C<guestfsd>)."
39311 #: ../src/guestfs.pod:2439
39316 #: ../src/guestfs.pod:2441
39318 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
39323 #: ../src/guestfs.pod:2444
39326 " verbose daemon enabled\n"
39331 #: ../src/guestfs.pod:2446
39333 "The daemon expects to see a named virtio-serial port exposed by qemu and "
39334 "connected on the other end to the library."
39338 #: ../src/guestfs.pod:2449
39340 "The daemon connects to this port (and hence to the library) and sends a four "
39341 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
39342 "protocol (see below)."
39346 #: ../src/guestfs.pod:2455
39347 msgid "COMMUNICATION PROTOCOL"
39351 #: ../src/guestfs.pod:2457
39353 "Don't rely on using this protocol directly. This section documents how it "
39354 "currently works, but it may change at any time."
39358 #: ../src/guestfs.pod:2460
39360 "The protocol used to talk between the library and the daemon running inside "
39361 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
39362 "1014, RFC 1832, RFC 4506)."
39366 #: ../src/guestfs.pod:2464
39368 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
39369 "this file is automatically generated)."
39373 #: ../src/guestfs.pod:2467
39375 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
39376 "and C<FileOut> parameters, which are handled with very simple request/reply "
39377 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
39378 "parameters, which use the same request and reply messages, but they may also "
39379 "be followed by files sent using a chunked encoding."
39383 #: ../src/guestfs.pod:2474
39384 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
39388 #: ../src/guestfs.pod:2476
39389 msgid "For ordinary functions, the request message is:"
39393 #: ../src/guestfs.pod:2478
39396 " total length (header + arguments,\n"
39397 " but not including the length word itself)\n"
39398 " struct guestfs_message_header (encoded as XDR)\n"
39399 " struct guestfs_<foo>_args (encoded as XDR)\n"
39404 #: ../src/guestfs.pod:2483
39406 "The total length field allows the daemon to allocate a fixed size buffer "
39407 "into which it slurps the rest of the message. As a result, the total length "
39408 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
39409 "effective size of any request is limited to somewhere under this size."
39413 #: ../src/guestfs.pod:2489
39415 "Note also that many functions don't take any arguments, in which case the "
39416 "C<guestfs_I<foo>_args> is completely omitted."
39420 #: ../src/guestfs.pod:2492
39422 "The header contains the procedure number (C<guestfs_proc>) which is how the "
39423 "receiver knows what type of args structure to expect, or none at all."
39427 #: ../src/guestfs.pod:2496
39429 "For functions that take optional arguments, the optional arguments are "
39430 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
39431 "arguments. A bitmask in the header indicates which optional arguments are "
39432 "meaningful. The bitmask is also checked to see if it contains bits set "
39433 "which the daemon does not know about (eg. if more optional arguments were "
39434 "added in a later version of the library), and this causes the call to be "
39439 #: ../src/guestfs.pod:2504
39440 msgid "The reply message for ordinary functions is:"
39444 #: ../src/guestfs.pod:2506
39447 " total length (header + ret,\n"
39448 " but not including the length word itself)\n"
39449 " struct guestfs_message_header (encoded as XDR)\n"
39450 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39455 #: ../src/guestfs.pod:2511
39457 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
39458 "functions that return no formal return values."
39462 #: ../src/guestfs.pod:2514
39463 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
39467 #: ../src/guestfs.pod:2517
39469 "In the case of an error, a flag is set in the header, and the reply message "
39470 "is slightly changed:"
39474 #: ../src/guestfs.pod:2520
39477 " total length (header + error,\n"
39478 " but not including the length word itself)\n"
39479 " struct guestfs_message_header (encoded as XDR)\n"
39480 " struct guestfs_message_error (encoded as XDR)\n"
39485 #: ../src/guestfs.pod:2525
39487 "The C<guestfs_message_error> structure contains the error message as a "
39492 #: ../src/guestfs.pod:2528
39493 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
39497 #: ../src/guestfs.pod:2530
39499 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
39500 "The normal request message is sent (see above). However this is followed by "
39501 "a sequence of file chunks."
39505 #: ../src/guestfs.pod:2534
39508 " total length (header + arguments,\n"
39509 " but not including the length word itself,\n"
39510 " and not including the chunks)\n"
39511 " struct guestfs_message_header (encoded as XDR)\n"
39512 " struct guestfs_<foo>_args (encoded as XDR)\n"
39513 " sequence of chunks for FileIn param #0\n"
39514 " sequence of chunks for FileIn param #1 etc.\n"
39519 #: ../src/guestfs.pod:2542
39520 msgid "The \"sequence of chunks\" is:"
39524 #: ../src/guestfs.pod:2544
39527 " length of chunk (not including length word itself)\n"
39528 " struct guestfs_chunk (encoded as XDR)\n"
39529 " length of chunk\n"
39530 " struct guestfs_chunk (encoded as XDR)\n"
39532 " length of chunk\n"
39533 " struct guestfs_chunk (with data.data_len == 0)\n"
39538 #: ../src/guestfs.pod:2552
39540 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
39541 "is set in the final chunk to indicate either successful completion or early "
39546 #: ../src/guestfs.pod:2556
39548 "At time of writing there are no functions that have more than one FileIn "
39549 "parameter. However this is (theoretically) supported, by sending the "
39550 "sequence of chunks for each FileIn parameter one after another (from left to "
39555 #: ../src/guestfs.pod:2561
39557 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
39558 "transfer. The library does this by sending a chunk with a special flag set "
39559 "to indicate cancellation. When the daemon sees this, it cancels the whole "
39560 "RPC, does I<not> send any reply, and goes back to reading the next request."
39564 #: ../src/guestfs.pod:2567
39566 "The daemon may also cancel. It does this by writing a special word "
39567 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
39568 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
39569 "cancel chunk). The special word is chosen so that even if cancellation "
39570 "happens right at the end of the transfer (after the library has finished "
39571 "writing and has started listening for the reply), the \"spurious\" cancel "
39572 "flag will not be confused with the reply message."
39576 #: ../src/guestfs.pod:2576
39578 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
39579 "limit), and also files where the size is not known in advance (eg. from "
39580 "pipes or sockets). However the chunks are rather small "
39581 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
39582 "to keep much in memory."
39586 #: ../src/guestfs.pod:2582
39587 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
39591 #: ../src/guestfs.pod:2584
39593 "The protocol for FileOut parameters is exactly the same as for FileIn "
39594 "parameters, but with the roles of daemon and library reversed."
39598 #: ../src/guestfs.pod:2587
39601 " total length (header + ret,\n"
39602 " but not including the length word itself,\n"
39603 " and not including the chunks)\n"
39604 " struct guestfs_message_header (encoded as XDR)\n"
39605 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39606 " sequence of chunks for FileOut param #0\n"
39607 " sequence of chunks for FileOut param #1 etc.\n"
39612 #: ../src/guestfs.pod:2595
39613 msgid "INITIAL MESSAGE"
39617 #: ../src/guestfs.pod:2597
39619 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
39620 "which indicates that the guest and daemon is alive. This is what "
39621 "L</guestfs_launch> waits for."
39625 #: ../src/guestfs.pod:2601
39626 msgid "PROGRESS NOTIFICATION MESSAGES"
39630 #: ../src/guestfs.pod:2603
39632 "The daemon may send progress notification messages at any time. These are "
39633 "distinguished by the normal length word being replaced by "
39634 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
39638 #: ../src/guestfs.pod:2607
39640 "The library turns them into progress callbacks (see "
39641 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
39646 #: ../src/guestfs.pod:2611
39648 "The daemon self-limits the frequency of progress messages it sends (see "
39649 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
39654 #: ../src/guestfs.pod:2615
39655 msgid "LIBGUESTFS VERSION NUMBERS"
39659 #: ../src/guestfs.pod:2617
39661 "Since April 2010, libguestfs has started to make separate development and "
39662 "stable releases, along with corresponding branches in our git repository. "
39663 "These separate releases can be identified by version number:"
39667 #: ../src/guestfs.pod:2622
39670 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
39671 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
39677 " | `-------- sub-version\n"
39679 " `------ always '1' because we don't change the ABI\n"
39684 #: ../src/guestfs.pod:2633
39685 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
39689 #: ../src/guestfs.pod:2635
39691 "As time passes we cherry pick fixes from the development branch and backport "
39692 "those into the stable branch, the effect being that the stable branch should "
39693 "get more stable and less buggy over time. So the stable releases are ideal "
39694 "for people who don't need new features but would just like the software to "
39699 #: ../src/guestfs.pod:2641
39700 msgid "Our criteria for backporting changes are:"
39704 #: ../src/guestfs.pod:2647
39706 "Documentation changes which don't affect any code are backported unless the "
39707 "documentation refers to a future feature which is not in stable."
39711 #: ../src/guestfs.pod:2653
39713 "Bug fixes which are not controversial, fix obvious problems, and have been "
39714 "well tested are backported."
39718 #: ../src/guestfs.pod:2658
39720 "Simple rearrangements of code which shouldn't affect how it works get "
39721 "backported. This is so that the code in the two branches doesn't get too "
39722 "far out of step, allowing us to backport future fixes more easily."
39726 #: ../src/guestfs.pod:2664
39728 "We I<don't> backport new features, new APIs, new tools etc, except in one "
39729 "exceptional case: the new feature is required in order to implement an "
39730 "important bug fix."
39734 #: ../src/guestfs.pod:2670
39736 "A new stable branch starts when we think the new features in development are "
39737 "substantial and compelling enough over the current stable branch to warrant "
39738 "it. When that happens we create new stable and development versions 1.N.0 "
39739 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
39740 "stable at this point, but by backporting fixes from development, that branch "
39741 "will stabilize over time."
39745 #: ../src/guestfs.pod:2678
39746 msgid "EXTENDING LIBGUESTFS"
39750 #: ../src/guestfs.pod:2680
39751 msgid "ADDING A NEW API ACTION"
39755 #: ../src/guestfs.pod:2682
39757 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
39758 "documentation) are generated, and this makes it easy to extend the "
39763 #: ../src/guestfs.pod:2686
39764 msgid "To add a new API action there are two changes:"
39768 #: ../src/guestfs.pod:2692
39770 "You need to add a description of the call (name, parameters, return type, "
39771 "tests, documentation) to C<generator/generator_actions.ml>."
39775 #: ../src/guestfs.pod:2695
39777 "There are two sorts of API action, depending on whether the call goes "
39778 "through to the daemon in the appliance, or is serviced entirely by the "
39779 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
39780 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39781 "an example of the latter, since a trace flag is maintained in the handle and "
39782 "all tracing is done on the library side."
39786 #: ../src/guestfs.pod:2703
39788 "Most new actions are of the first type, and get added to the "
39789 "C<daemon_functions> list. Each function has a unique procedure number used "
39790 "in the RPC protocol which is assigned to that action when we publish "
39791 "libguestfs and cannot be reused. Take the latest procedure number and "
39796 #: ../src/guestfs.pod:2709
39798 "For library-only actions of the second type, add to the "
39799 "C<non_daemon_functions> list. Since these functions are serviced by the "
39800 "library and do not travel over the RPC mechanism to the daemon, these "
39801 "functions do not need a procedure number, and so the procedure number is set "
39806 #: ../src/guestfs.pod:2717
39807 msgid "Implement the action (in C):"
39811 #: ../src/guestfs.pod:2719
39813 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39814 "C<daemon/> directory."
39818 #: ../src/guestfs.pod:2722
39820 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39821 "(note: double underscore) in the C<src/> directory."
39825 #: ../src/guestfs.pod:2725
39826 msgid "In either case, use another function as an example of what to do."
39830 #: ../src/guestfs.pod:2729
39831 msgid "After making these changes, use C<make> to compile."
39835 #: ../src/guestfs.pod:2731
39837 "Note that you don't need to implement the RPC, language bindings, manual "
39838 "pages or anything else. It's all automatically generated from the OCaml "
39843 #: ../src/guestfs.pod:2735
39844 msgid "ADDING TESTS FOR AN API ACTION"
39848 #: ../src/guestfs.pod:2737
39850 "You can supply zero or as many tests as you want per API call. The tests "
39851 "can either be added as part of the API description "
39852 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
39853 "drop a script into C<regressions/>. Note that adding a script to "
39854 "C<regressions/> is slower, so if possible use the first method."
39858 #: ../src/guestfs.pod:2743
39860 "The following describes the test environment used when you add an API test "
39861 "in C<generator_actions.ml>."
39865 #: ../src/guestfs.pod:2746
39866 msgid "The test environment has 4 block devices:"
39870 #: ../src/guestfs.pod:2750
39871 msgid "C</dev/sda> 500MB"
39875 #: ../src/guestfs.pod:2752
39876 msgid "General block device for testing."
39880 #: ../src/guestfs.pod:2754
39881 msgid "C</dev/sdb> 50MB"
39885 #: ../src/guestfs.pod:2756
39887 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39892 #: ../src/guestfs.pod:2759
39893 msgid "C</dev/sdc> 10MB"
39897 #: ../src/guestfs.pod:2761
39898 msgid "Used in a few tests where two block devices are needed."
39902 #: ../src/guestfs.pod:2763
39903 msgid "C</dev/sdd>"
39907 #: ../src/guestfs.pod:2765
39908 msgid "ISO with fixed content (see C<images/test.iso>)."
39912 #: ../src/guestfs.pod:2769
39914 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39915 "appliance and block devices are reused between tests. So don't try testing "
39916 "L</guestfs_kill_subprocess> :-x"
39920 #: ../src/guestfs.pod:2773
39922 "Each test starts with an initial scenario, selected using one of the "
39923 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39924 "initialize the disks mentioned above in a particular way as documented in "
39925 "C<generator_types.ml>. You should not assume anything about the previous "
39926 "contents of other disks that are not initialized."
39930 #: ../src/guestfs.pod:2779
39932 "You can add a prerequisite clause to any individual test. This is a "
39933 "run-time check, which, if it fails, causes the test to be skipped. Useful "
39934 "if testing a command which might not work on all variations of libguestfs "
39935 "builds. A test that has prerequisite of C<Always> means to run "
39940 #: ../src/guestfs.pod:2785
39942 "In addition, packagers can skip individual tests by setting environment "
39943 "variables before running C<make check>."
39947 #: ../src/guestfs.pod:2788
39950 " SKIP_TEST_<CMD>_<NUM>=1\n"
39955 #: ../src/guestfs.pod:2790
39956 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39960 #: ../src/guestfs.pod:2794
39963 " SKIP_TEST_<CMD>=1\n"
39968 #: ../src/guestfs.pod:2796
39969 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39973 #: ../src/guestfs.pod:2798
39974 msgid "Packagers can run only certain tests by setting for example:"
39978 #: ../src/guestfs.pod:2800
39981 " TEST_ONLY=\"vfs_type zerofree\"\n"
39986 #: ../src/guestfs.pod:2802
39988 "See C<capitests/tests.c> for more details of how these environment variables "
39993 #: ../src/guestfs.pod:2805
39994 msgid "DEBUGGING NEW API ACTIONS"
39998 #: ../src/guestfs.pod:2807
39999 msgid "Test new actions work before submitting them."
40003 #: ../src/guestfs.pod:2809
40004 msgid "You can use guestfish to try out new commands."
40008 #: ../src/guestfs.pod:2811
40010 "Debugging the daemon is a problem because it runs inside a minimal "
40011 "environment. However you can fprintf messages in the daemon to stderr, and "
40012 "they will show up if you use C<guestfish -v>."
40016 #: ../src/guestfs.pod:2815
40017 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
40021 #: ../src/guestfs.pod:2817
40023 "Our C source code generally adheres to some basic code-formatting "
40024 "conventions. The existing code base is not totally consistent on this "
40025 "front, but we do prefer that contributed code be formatted similarly. In "
40026 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
40027 "indentation level, and other than that, follow the K&R style."
40031 #: ../src/guestfs.pod:2823
40033 "If you use Emacs, add the following to one of one of your start-up files "
40034 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
40038 #: ../src/guestfs.pod:2826
40041 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
40042 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
40043 " (add-hook 'find-file-hook\n"
40044 " '(lambda () (if (and buffer-file-name\n"
40045 " (string-match \"/libguestfs\\\\>\"\n"
40046 " (buffer-file-name))\n"
40047 " (not (string-equal mode-name \"Change Log\"))\n"
40048 " (not (string-equal mode-name \"Makefile\")))\n"
40049 " (setq indent-tabs-mode nil))))\n"
40054 #: ../src/guestfs.pod:2836
40057 " ;;; When editing C sources in libguestfs, use this style.\n"
40058 " (defun libguestfs-c-mode ()\n"
40059 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
40061 " (c-set-style \"K&R\")\n"
40062 " (setq c-indent-level 2)\n"
40063 " (setq c-basic-offset 2))\n"
40064 " (add-hook 'c-mode-hook\n"
40065 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
40066 " (buffer-file-name))\n"
40067 " (libguestfs-c-mode))))\n"
40072 #: ../src/guestfs.pod:2848
40073 msgid "Enable warnings when compiling (and fix any problems this finds):"
40077 #: ../src/guestfs.pod:2851
40080 " ./configure --enable-gcc-warnings\n"
40085 #: ../src/guestfs.pod:2853
40086 msgid "Useful targets are:"
40090 #: ../src/guestfs.pod:2855
40093 " make syntax-check # checks the syntax of the C code\n"
40094 " make check # runs the test suite\n"
40099 #: ../src/guestfs.pod:2858
40100 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
40104 #: ../src/guestfs.pod:2860
40106 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
40107 "which are used to do shell quoting."
40111 #: ../src/guestfs.pod:2865
40116 #: ../src/guestfs.pod:2867
40118 "Simple shell quoted string. Any spaces or other shell characters are "
40123 #: ../src/guestfs.pod:2870
40128 #: ../src/guestfs.pod:2872
40130 "Same as C<%Q> except the string is treated as a path which is prefixed by "
40135 #: ../src/guestfs.pod:2879
40138 " asprintf (&cmd, \"cat %R\", path);\n"
40143 #: ../src/guestfs.pod:2881
40144 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
40148 #: ../src/guestfs.pod:2883
40150 "I<Note:> Do I<not> use these when you are passing parameters to the "
40151 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
40152 "because they are not passed via the shell (instead, straight to exec). You "
40153 "probably want to use the C<sysroot_path()> function however."
40157 #: ../src/guestfs.pod:2889
40158 msgid "SUBMITTING YOUR NEW API ACTIONS"
40162 #: ../src/guestfs.pod:2891
40164 "Submit patches to the mailing list: "
40165 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
40166 "L<rjones@redhat.com>."
40170 #: ../src/guestfs.pod:2895
40171 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
40175 #: ../src/guestfs.pod:2897
40176 msgid "We support i18n (gettext anyhow) in the library."
40180 #: ../src/guestfs.pod:2899
40182 "However many messages come from the daemon, and we don't translate those at "
40183 "the moment. One reason is that the appliance generally has all locale files "
40184 "removed from it, because they take up a lot of space. So we'd have to readd "
40185 "some of those, as well as copying our PO files into the appliance."
40189 #: ../src/guestfs.pod:2905
40191 "Debugging messages are never translated, since they are intended for the "
40196 #: ../src/guestfs.pod:2908
40197 msgid "SOURCE CODE SUBDIRECTORIES"
40201 #: ../src/guestfs.pod:2912
40206 #: ../src/guestfs.pod:2914
40207 msgid "L<virt-alignment-scan(1)> command and documentation."
40211 #: ../src/guestfs.pod:2918
40212 msgid "The libguestfs appliance, build scripts and so on."
40216 #: ../src/guestfs.pod:2920
40217 msgid "C<capitests>"
40221 #: ../src/guestfs.pod:2922
40222 msgid "Automated tests of the C API."
40226 #: ../src/guestfs.pod:2924
40231 #: ../src/guestfs.pod:2926
40233 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
40238 #: ../src/guestfs.pod:2929
40243 #: ../src/guestfs.pod:2931
40245 "Safety and liveness tests of components that libguestfs depends upon (not of "
40246 "libguestfs itself). Mainly this is for qemu and the kernel."
40250 #: ../src/guestfs.pod:2934
40255 #: ../src/guestfs.pod:2936
40257 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
40258 "command and documentation."
40262 #: ../src/guestfs.pod:2939
40267 #: ../src/guestfs.pod:2941
40268 msgid "Outside contributions, experimental parts."
40272 #: ../src/guestfs.pod:2943
40277 #: ../src/guestfs.pod:2945
40279 "The daemon that runs inside the libguestfs appliance and carries out "
40284 #: ../src/guestfs.pod:2948
40289 #: ../src/guestfs.pod:2950
40290 msgid "L<virt-df(1)> command and documentation."
40294 #: ../src/guestfs.pod:2952
40299 #: ../src/guestfs.pod:2954
40300 msgid "L<virt-edit(1)> command and documentation."
40304 #: ../src/guestfs.pod:2956
40305 msgid "C<examples>"
40309 #: ../src/guestfs.pod:2958
40310 msgid "C API example code."
40314 #: ../src/guestfs.pod:2960
40315 msgid "C<extratests>"
40319 #: ../src/guestfs.pod:2962
40321 "Extra tests. These are not run by default because they require special "
40322 "tools or configuration."
40326 #: ../src/guestfs.pod:2965
40331 #: ../src/guestfs.pod:2967
40333 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
40334 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
40335 "L<virt-tar-out(1)>."
40339 #: ../src/guestfs.pod:2971
40344 #: ../src/guestfs.pod:2973
40345 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
40349 #: ../src/guestfs.pod:2975
40350 msgid "C<generator>"
40354 #: ../src/guestfs.pod:2977
40356 "The crucially important generator, used to automatically generate large "
40357 "amounts of boilerplate C code for things like RPC and bindings."
40361 #: ../src/guestfs.pod:2980
40366 #: ../src/guestfs.pod:2982
40367 msgid "Files used by the test suite."
40371 #: ../src/guestfs.pod:2984
40372 msgid "Some \"phony\" guest images which we test against."
40376 #: ../src/guestfs.pod:2986
40377 msgid "C<inspector>"
40381 #: ../src/guestfs.pod:2988
40382 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
40386 #: ../src/guestfs.pod:2990
40391 #: ../src/guestfs.pod:2992
40392 msgid "Logo used on the website. The fish is called Arthur by the way."
40396 #: ../src/guestfs.pod:2994
40401 #: ../src/guestfs.pod:2996
40402 msgid "M4 macros used by autoconf."
40406 #: ../src/guestfs.pod:2998
40411 #: ../src/guestfs.pod:3000
40412 msgid "Translations of simple gettext strings."
40416 #: ../src/guestfs.pod:3002
40421 #: ../src/guestfs.pod:3004
40423 "The build infrastructure and PO files for translations of manpages and POD "
40424 "files. Eventually this will be combined with the C<po> directory, but that "
40425 "is rather complicated."
40429 #: ../src/guestfs.pod:3008
40430 msgid "C<regressions>"
40434 #: ../src/guestfs.pod:3010
40435 msgid "Regression tests."
40439 #: ../src/guestfs.pod:3012
40444 #: ../src/guestfs.pod:3014
40445 msgid "L<virt-rescue(1)> command and documentation."
40449 #: ../src/guestfs.pod:3016
40454 #: ../src/guestfs.pod:3018
40455 msgid "L<virt-resize(1)> command and documentation."
40459 #: ../src/guestfs.pod:3020
40460 msgid "C<sparsify>"
40464 #: ../src/guestfs.pod:3022
40465 msgid "L<virt-sparsify(1)> command and documentation."
40469 #: ../src/guestfs.pod:3024
40474 #: ../src/guestfs.pod:3026
40475 msgid "Source code to the C library."
40479 #: ../src/guestfs.pod:3028
40484 #: ../src/guestfs.pod:3030
40485 msgid "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
40489 #: ../src/guestfs.pod:3032
40490 msgid "C<test-tool>"
40494 #: ../src/guestfs.pod:3034
40496 "Test tool for end users to test if their qemu/kernel combination will work "
40501 #: ../src/guestfs.pod:3037
40506 #: ../src/guestfs.pod:3039
40511 #: ../src/guestfs.pod:3041
40516 #: ../src/guestfs.pod:3043
40521 #: ../src/guestfs.pod:3045
40526 #: ../src/guestfs.pod:3047
40531 #: ../src/guestfs.pod:3049
40536 #: ../src/guestfs.pod:3051
40541 #: ../src/guestfs.pod:3053
40546 #: ../src/guestfs.pod:3055
40547 msgid "Language bindings."
40551 #: ../src/guestfs.pod:3059
40552 msgid "MAKING A STABLE RELEASE"
40556 #: ../src/guestfs.pod:3061
40558 "When we make a stable release, there are several steps documented here. See "
40559 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
40564 #: ../src/guestfs.pod:3069
40565 msgid "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
40569 #: ../src/guestfs.pod:3074
40570 msgid "Finalize RELEASE-NOTES."
40574 #: ../src/guestfs.pod:3078
40575 msgid "Update ROADMAP."
40579 #: ../src/guestfs.pod:3082
40580 msgid "Run C<src/api-support/update-from-tarballs.sh>."
40584 #: ../src/guestfs.pod:3086
40585 msgid "Push and pull from Transifex."
40589 #: ../src/guestfs.pod:3090
40597 #: ../src/guestfs.pod:3092
40598 msgid "to push the latest POT files to Transifex. Then run:"
40602 #: ../src/guestfs.pod:3094
40610 #: ../src/guestfs.pod:3096
40611 msgid "which is a wrapper to pull the latest translated C<*.po> files."
40615 #: ../src/guestfs.pod:3100
40617 "Create new stable and development directories under "
40618 "L<http://libguestfs.org/download>."
40622 #: ../src/guestfs.pod:3105
40623 msgid "Create the branch in git:"
40627 #: ../src/guestfs.pod:3107
40630 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
40631 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
40632 " git branch stable-1.XX\n"
40633 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
40638 #: ../src/guestfs.pod:3114
40643 #: ../src/guestfs.pod:3116
40644 msgid "PROTOCOL LIMITS"
40648 #: ../src/guestfs.pod:3118
40650 "Internally libguestfs uses a message-based protocol to pass API calls and "
40651 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
40652 "plenty more detail about this). The maximum message size used by the "
40653 "protocol is slightly less than 4 MB. For some API calls you may need to be "
40654 "aware of this limit. The API calls which may be affected are individually "
40655 "documented, with a link back to this section of the documentation."
40659 #: ../src/guestfs.pod:3126
40661 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
40662 "a simple string. Because this string is at some point internally encoded as "
40663 "a message, the maximum size that it can return is slightly under 4 MB. If "
40664 "the requested file is larger than this then you will get an error."
40668 #: ../src/guestfs.pod:3132
40670 "In order to transfer large files into and out of the guest filesystem, you "
40671 "need to use particular calls that support this. The sections L</UPLOADING> "
40672 "and L</DOWNLOADING> document how to do this."
40676 #: ../src/guestfs.pod:3136
40678 "You might also consider mounting the disk image using our FUSE filesystem "
40679 "support (L<guestmount(1)>)."
40683 #: ../src/guestfs.pod:3139
40684 msgid "MAXIMUM NUMBER OF DISKS"
40688 #: ../src/guestfs.pod:3141
40689 msgid "When using virtio disks (the default) the current limit is B<25> disks."
40693 #: ../src/guestfs.pod:3144
40695 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
40696 "slots. However febootstrap only understands disks with names C</dev/vda> "
40697 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
40702 #: ../src/guestfs.pod:3149
40704 "We are working to substantially raise this limit in future versions but it "
40705 "requires complex changes to qemu."
40709 #: ../src/guestfs.pod:3152
40711 "In future versions of libguestfs it should also be possible to \"hot plug\" "
40712 "disks (add and remove disks after calling L</guestfs_launch>). This also "
40713 "requires changes to qemu."
40717 #: ../src/guestfs.pod:3156
40718 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
40722 #: ../src/guestfs.pod:3158
40723 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
40727 #: ../src/guestfs.pod:3160
40729 "This is because it reserves 4 bits for the minor device number (thus "
40730 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
40734 #: ../src/guestfs.pod:3163
40736 "If you attach a disk with more than 15 partitions, the extra partitions are "
40737 "ignored by libguestfs."
40741 #: ../src/guestfs.pod:3166
40742 msgid "MAXIMUM SIZE OF A DISK"
40746 #: ../src/guestfs.pod:3168
40747 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
40751 #: ../src/guestfs.pod:3170
40753 "We have tested block devices up to 1 exabyte (2**60 or "
40754 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
40759 #: ../src/guestfs.pod:3174
40761 "Although libguestfs probably does not impose any limit, the underlying host "
40762 "storage will. If you store disk images on a host ext4 filesystem, then the "
40763 "maximum size will be limited by the maximum ext4 file size (currently 16 "
40764 "TB). If you store disk images as host logical volumes then you are limited "
40765 "by the maximum size of an LV."
40769 #: ../src/guestfs.pod:3180
40771 "For the hugest disk image files, we recommend using XFS on the host for "
40776 #: ../src/guestfs.pod:3183
40777 msgid "MAXIMUM SIZE OF A PARTITION"
40781 #: ../src/guestfs.pod:3185
40783 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
40784 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
40785 "address a partition located beyond 2 TB on the disk."
40789 #: ../src/guestfs.pod:3189
40791 "It is recommended that you use GPT partitions on disks which are larger than "
40792 "this size. GPT uses 64 bit sector numbers and so can address partitions "
40793 "which are theoretically larger than the largest disk we could support."
40797 #: ../src/guestfs.pod:3194
40798 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40802 #: ../src/guestfs.pod:3196
40804 "This depends on the filesystem type. libguestfs itself does not impose any "
40805 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40806 "what these limits are."
40810 #: ../src/guestfs.pod:3200
40811 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40815 #: ../src/guestfs.pod:3202
40817 "The API functions L</guestfs_upload>, L</guestfs_download>, "
40818 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40819 "uploads and downloads."
40823 #: ../src/guestfs.pod:3206
40824 msgid "INSPECTION LIMITS"
40828 #: ../src/guestfs.pod:3208
40830 "The inspection code has several arbitrary limits on things like the size of "
40831 "Windows Registry hive it will read, and the length of product name. These "
40832 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40833 "memory and disk space on the host, and should not be reached in practice. "
40834 "See the source code for more information."
40838 #: ../src/guestfs.pod:3234
40840 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40841 "effect as calling C<guestfs_set_verbose (g, 1)>."
40845 #: ../src/guestfs.pod:3246
40847 "Set the path that libguestfs uses to search for a supermin appliance. See "
40848 "the discussion of paths in section L</PATH> above."
40852 #: ../src/guestfs.pod:3255
40853 msgid "See also L</QEMU WRAPPERS> above."
40857 #: ../src/guestfs.pod:3259
40859 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40860 "effect as calling C<guestfs_set_trace (g, 1)>."
40864 #: ../src/guestfs.pod:3277
40866 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
40867 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
40868 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, "
40869 "L<virt-alignment-scan(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
40870 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
40871 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40872 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
40873 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, "
40874 "L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
40875 "L<virt-win-reg(1)>, L<guestfs-testing(1)>, L<qemu(1)>, L<febootstrap(1)>, "
40876 "L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)>, "
40877 "L<http://libguestfs.org/>."
40881 #: ../src/guestfs.pod:3314
40883 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
40884 "L<lvm(8)>, L<disktype(1)>."
40888 #: ../src/guestfs.pod:3321 ../tools/virt-make-fs.pl:571 ../tools/virt-win-reg.pl:772
40893 #: ../src/guestfs.pod:3323
40894 msgid "To get a list of bugs against libguestfs use this link:"
40898 #: ../src/guestfs.pod:3325
40899 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
40903 #: ../src/guestfs.pod:3327
40904 msgid "To report a new bug against libguestfs use this link:"
40908 #: ../src/guestfs.pod:3329
40909 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
40913 #: ../src/guestfs.pod:3331
40914 msgid "When reporting a bug, please check:"
40918 #: ../src/guestfs.pod:3337
40919 msgid "That the bug hasn't been reported already."
40923 #: ../src/guestfs.pod:3341
40924 msgid "That you are testing a recent version."
40928 #: ../src/guestfs.pod:3345
40929 msgid "Describe the bug accurately, and give a way to reproduce it."
40933 #: ../src/guestfs.pod:3349
40935 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
40940 #: ../test-tool/libguestfs-test-tool.pod:5
40941 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40945 #: ../test-tool/libguestfs-test-tool.pod:9
40948 " libguestfs-test-tool [--options]\n"
40953 #: ../test-tool/libguestfs-test-tool.pod:13
40955 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40956 "to check basic libguestfs functionality is working. This is needed because "
40957 "libguestfs occasionally breaks for reasons beyond our control: usually "
40958 "because of changes in the underlying qemu or kernel packages, or the host "
40963 #: ../test-tool/libguestfs-test-tool.pod:19
40964 msgid "If you suspect a problem in libguestfs, then just run:"
40968 #: ../test-tool/libguestfs-test-tool.pod:21
40971 " libguestfs-test-tool\n"
40976 #: ../test-tool/libguestfs-test-tool.pod:23
40977 msgid "It will print lots of diagnostic messages."
40981 #: ../test-tool/libguestfs-test-tool.pod:25
40982 msgid "If it runs to completion successfully, you will see this near the end:"
40986 #: ../test-tool/libguestfs-test-tool.pod:27
40989 " ===== TEST FINISHED OK =====\n"
40994 #: ../test-tool/libguestfs-test-tool.pod:29
40995 msgid "and the test tool will exit with code 0."
40999 #: ../test-tool/libguestfs-test-tool.pod:31
41001 "If it fails (and/or exits with non-zero error code), please paste the "
41002 "I<complete, unedited> output of the test tool into a bug report. More "
41003 "information about reporting bugs can be found on the "
41004 "L<http://libguestfs.org/> website."
41008 #: ../test-tool/libguestfs-test-tool.pod:42
41009 msgid "Display short usage information and exit."
41013 #: ../test-tool/libguestfs-test-tool.pod:44
41014 msgid "B<--qemu qemu_binary>"
41018 #: ../test-tool/libguestfs-test-tool.pod:46
41020 "If you have downloaded another qemu binary, point this option at the full "
41021 "path of the binary to try it."
41025 #: ../test-tool/libguestfs-test-tool.pod:49
41026 msgid "B<--qemudir qemu_source_dir>"
41030 #: ../test-tool/libguestfs-test-tool.pod:51
41032 "If you have compiled qemu from source, point this option at the source "
41033 "directory to try it."
41037 #: ../test-tool/libguestfs-test-tool.pod:54
41042 #: ../test-tool/libguestfs-test-tool.pod:56
41043 msgid "B<--timeout N>"
41047 #: ../test-tool/libguestfs-test-tool.pod:58
41049 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
41050 "minutes) which does not usually need to be adjusted."
41054 #: ../test-tool/libguestfs-test-tool.pod:63
41055 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
41059 #: ../test-tool/libguestfs-test-tool.pod:65
41061 "If you have compiled another version of qemu from source and would like to "
41062 "try that, then you can use the I<--qemudir> option to point to the qemu "
41063 "source directory."
41067 #: ../test-tool/libguestfs-test-tool.pod:69
41069 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
41070 "option to point to the binary."
41074 #: ../test-tool/libguestfs-test-tool.pod:72
41076 "Note when using these options, you can ignore the business of qemu wrapper "
41077 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
41078 "wrapper script for you if one is needed."
41082 #: ../test-tool/libguestfs-test-tool.pod:76
41083 msgid "TRYING OUT A DIFFERENT KERNEL"
41087 #: ../test-tool/libguestfs-test-tool.pod:78
41089 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
41090 "libguestfs tries. You do this by setting the environment variables "
41091 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
41095 #: ../test-tool/libguestfs-test-tool.pod:82
41097 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
41102 #: ../test-tool/libguestfs-test-tool.pod:85
41103 msgid "SELF-DIAGNOSIS"
41107 #: ../test-tool/libguestfs-test-tool.pod:87
41109 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
41110 "produced by libguestfs-test-tool and/or possible errors."
41114 #: ../test-tool/libguestfs-test-tool.pod:92
41116 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
41117 "I<1> if there was an error."
41121 #: ../test-tool/libguestfs-test-tool.pod:97
41123 "For the full list of environment variables which may affect libguestfs, "
41124 "please see the L<guestfs(3)> manual page."
41128 #: ../test-tool/libguestfs-test-tool.pod:102
41129 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
41133 #: ../tools/virt-list-filesystems.pl:32
41134 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
41138 #: ../tools/virt-list-filesystems.pl:36
41141 " virt-list-filesystems [--options] domname\n"
41146 #: ../tools/virt-list-filesystems.pl:38
41149 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
41154 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
41156 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
41161 #: ../tools/virt-list-filesystems.pl:45
41163 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
41164 "are contained in a virtual machine or disk image."
41168 #: ../tools/virt-list-filesystems.pl:49
41170 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
41171 "functionality. For more complex cases you should look at the "
41172 "L<guestfish(1)> tool."
41176 #: ../tools/virt-list-filesystems.pl:112
41178 "With this option, C<virt-list-filesystems> displays the type of each "
41179 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
41183 #: ../tools/virt-list-filesystems.pl:119
41188 #: ../tools/virt-list-filesystems.pl:123
41190 "Normally we only show mountable filesystems. If this option is given then "
41191 "swap devices are shown too."
41195 #: ../tools/virt-list-filesystems.pl:197
41197 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
41198 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
41199 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41203 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
41204 msgid "Copyright (C) 2009 Red Hat Inc."
41208 #: ../tools/virt-list-partitions.pl:32
41209 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
41213 #: ../tools/virt-list-partitions.pl:36
41216 " virt-list-partitions [--options] domname\n"
41221 #: ../tools/virt-list-partitions.pl:38
41224 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
41229 #: ../tools/virt-list-partitions.pl:45
41231 "C<virt-list-partitions> is a command line tool to list the partitions that "
41232 "are contained in a virtual machine or disk image. It is mainly useful as a "
41233 "first step to using L<virt-resize(1)>."
41237 #: ../tools/virt-list-partitions.pl:50
41239 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
41240 "functionality. For more complex cases you should look at the "
41241 "L<guestfish(1)> tool."
41245 #: ../tools/virt-list-partitions.pl:113
41246 msgid "Show sizes in human-readable form (eg. \"1G\")."
41250 #: ../tools/virt-list-partitions.pl:123
41252 "With this option, C<virt-list-partitions> displays the type and size of each "
41253 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
41257 #: ../tools/virt-list-partitions.pl:130
41262 #: ../tools/virt-list-partitions.pl:132
41267 #: ../tools/virt-list-partitions.pl:134
41268 msgid "Display the total size of each block device (as a separate row or rows)."
41272 #: ../tools/virt-list-partitions.pl:267
41274 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
41275 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
41276 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41280 #: ../tools/virt-list-partitions.pl:283
41281 msgid "Copyright (C) 2009-2010 Red Hat Inc."
41285 #: ../tools/virt-make-fs.pl:37
41286 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
41290 #: ../tools/virt-make-fs.pl:41
41293 " virt-make-fs [--options] input.tar output.img\n"
41298 #: ../tools/virt-make-fs.pl:43
41301 " virt-make-fs [--options] input.tar.gz output.img\n"
41306 #: ../tools/virt-make-fs.pl:45
41309 " virt-make-fs [--options] directory output.img\n"
41314 #: ../tools/virt-make-fs.pl:49
41316 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
41317 "archive or some files in a directory. It is similar to tools like "
41318 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
41319 "it can create common filesystem types like ext2/3 or NTFS, which can be "
41320 "useful if you want to attach these filesystems to existing virtual machines "
41321 "(eg. to import large amounts of read-only data to a VM)."
41325 #: ../tools/virt-make-fs.pl:57
41326 msgid "Basic usage is:"
41330 #: ../tools/virt-make-fs.pl:59
41333 " virt-make-fs input output.img\n"
41338 #: ../tools/virt-make-fs.pl:61
41340 "where C<input> is either a directory containing files that you want to add, "
41341 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
41342 "C<output.img> is a disk image. The input type is detected automatically. "
41343 "The output disk image defaults to a raw ext2 sparse image unless you specify "
41344 "extra flags (see L</OPTIONS> below)."
41348 #: ../tools/virt-make-fs.pl:67
41349 msgid "FILESYSTEM TYPE"
41353 #: ../tools/virt-make-fs.pl:69
41355 "The default filesystem type is C<ext2>. Just about any filesystem type that "
41356 "libguestfs supports can be used (but I<not> read-only formats like "
41357 "ISO9660). Here are some of the more common choices:"
41361 #: ../tools/virt-make-fs.pl:75
41366 #: ../tools/virt-make-fs.pl:77
41368 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
41369 "you are not going to use the filesystem in a way that requires the journal, "
41370 "then this is just wasted overhead."
41374 #: ../tools/virt-make-fs.pl:81
41375 msgid "I<ntfs> or I<vfat>"
41379 #: ../tools/virt-make-fs.pl:83
41380 msgid "Useful if exporting data to a Windows guest."
41384 #: ../tools/virt-make-fs.pl:85
41386 "I<Note for vfat>: The tar archive or local directory must only contain files "
41387 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
41388 "program running within libguestfs is unable to change the ownership of "
41389 "non-root files, since vfat itself does not support this."
41393 #: ../tools/virt-make-fs.pl:90
41398 #: ../tools/virt-make-fs.pl:92
41400 "Lower overhead than C<ext2>, but certain limitations on filename length and "
41401 "total filesystem size."
41405 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116 ../tools/virt-make-fs.pl:149
41410 #: ../tools/virt-make-fs.pl:99
41413 " virt-make-fs --type=minix input minixfs.img\n"
41418 #: ../tools/virt-make-fs.pl:101
41419 msgid "TO PARTITION OR NOT TO PARTITION"
41423 #: ../tools/virt-make-fs.pl:103
41424 msgid "Optionally virt-make-fs can add a partition table to the output disk."
41428 #: ../tools/virt-make-fs.pl:105
41430 "Adding a partition can make the disk image more compatible with certain "
41431 "virtualized operating systems which don't expect to see a filesystem "
41432 "directly located on a block device (Linux doesn't care and will happily "
41433 "handle both types)."
41437 #: ../tools/virt-make-fs.pl:110
41439 "On the other hand, if you have a partition table then the output image is no "
41440 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
41441 "directly on a partitioned disk image. (However libguestfs tools such as "
41442 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
41446 #: ../tools/virt-make-fs.pl:118
41447 msgid "Add an MBR partition:"
41451 #: ../tools/virt-make-fs.pl:120
41454 " virt-make-fs --partition -- input disk.img\n"
41459 #: ../tools/virt-make-fs.pl:122
41461 "If the output disk image could be terabyte-sized or larger, it's better to "
41462 "use an EFI/GPT-compatible partition table:"
41466 #: ../tools/virt-make-fs.pl:125
41469 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
41474 #: ../tools/virt-make-fs.pl:127
41475 msgid "EXTRA SPACE"
41479 #: ../tools/virt-make-fs.pl:129
41481 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
41482 "the files that it contains, but might have extra space. Depending on how "
41483 "you are going to use the output, you might think this extra space is wasted "
41484 "and want to minimize it, or you might want to leave space so that more files "
41485 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
41486 "but you can use the I<--size> flag to leave space in the filesystem if you "
41491 #: ../tools/virt-make-fs.pl:137
41493 "An alternative way to leave extra space but not make the output image any "
41494 "bigger is to use an alternative disk image format (instead of the default "
41495 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
41496 "image format (check your hypervisor supports this before using it). This "
41497 "allows you to choose a large I<--size> but the extra space won't actually be "
41498 "allocated in the image until you try to store something in it."
41502 #: ../tools/virt-make-fs.pl:145
41504 "Don't forget that you can also use local commands including L<resize2fs(8)> "
41505 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
41506 "to build another image from scratch."
41510 #: ../tools/virt-make-fs.pl:151
41513 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
41518 #: ../tools/virt-make-fs.pl:179
41519 msgid "Enable debugging information."
41523 #: ../tools/virt-make-fs.pl:185
41524 msgid "B<--size=E<lt>NE<gt>>"
41528 #: ../tools/virt-make-fs.pl:187
41529 msgid "B<--size=+E<lt>NE<gt>>"
41533 #: ../tools/virt-make-fs.pl:189
41534 msgid "B<-s E<lt>NE<gt>>"
41538 #: ../tools/virt-make-fs.pl:191
41539 msgid "B<-s +E<lt>NE<gt>>"
41543 #: ../tools/virt-make-fs.pl:193
41544 msgid "Use the I<--size> (or I<-s>) option to choose the size of the output image."
41548 #: ../tools/virt-make-fs.pl:196
41550 "If this option is I<not> given, then the output image will be just large "
41551 "enough to contain all the files, with not much wasted space."
41555 #: ../tools/virt-make-fs.pl:199
41557 "To choose a fixed size output disk, specify an absolute number followed by "
41558 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41559 "Petabytes or Exabytes. This must be large enough to contain all the input "
41560 "files, else you will get an error."
41564 #: ../tools/virt-make-fs.pl:204
41566 "To leave extra space, specify C<+> (plus sign) and a number followed by "
41567 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41568 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
41569 "the input files, and (approximately) an extra 200 MB free space."
41573 #: ../tools/virt-make-fs.pl:210
41575 "Note that virt-make-fs estimates free space, and therefore will not produce "
41576 "filesystems containing precisely the free space requested. (It is much more "
41577 "expensive and time-consuming to produce a filesystem which has precisely the "
41578 "desired free space)."
41582 #: ../tools/virt-make-fs.pl:219
41583 msgid "B<--format=E<lt>fmtE<gt>>"
41587 #: ../tools/virt-make-fs.pl:221
41588 msgid "B<-F E<lt>fmtE<gt>>"
41592 #: ../tools/virt-make-fs.pl:223
41593 msgid "Choose the output disk image format."
41597 #: ../tools/virt-make-fs.pl:225
41598 msgid "The default is C<raw> (raw sparse disk image)."
41602 #: ../tools/virt-make-fs.pl:227
41604 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
41605 "that would really make sense here is C<qcow2>."
41609 #: ../tools/virt-make-fs.pl:234
41610 msgid "B<--type=E<lt>fsE<gt>>"
41614 #: ../tools/virt-make-fs.pl:236
41615 msgid "B<-t E<lt>fsE<gt>>"
41619 #: ../tools/virt-make-fs.pl:238
41620 msgid "Choose the output filesystem type."
41624 #: ../tools/virt-make-fs.pl:240
41625 msgid "The default is C<ext2>."
41629 #: ../tools/virt-make-fs.pl:242
41630 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
41634 #: ../tools/virt-make-fs.pl:249
41635 msgid "B<--partition>"
41639 #: ../tools/virt-make-fs.pl:251
41640 msgid "B<--partition=E<lt>parttypeE<gt>>"
41644 #: ../tools/virt-make-fs.pl:253
41646 "If specified, this flag adds an MBR partition table to the output disk "
41651 #: ../tools/virt-make-fs.pl:256
41653 "You can change the partition table type, eg. I<--partition=gpt> for large "
41658 #: ../tools/virt-make-fs.pl:259
41660 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
41661 "might consider the next parameter to be the partition type. For example:"
41665 #: ../tools/virt-make-fs.pl:263
41668 " virt-make-fs --partition input.tar output.img\n"
41673 #: ../tools/virt-make-fs.pl:265
41675 "would cause virt-make-fs to think you wanted to use a partition type of "
41676 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
41677 "dash) between options and the input and output arguments:"
41681 #: ../tools/virt-make-fs.pl:269
41684 " virt-make-fs --partition -- input.tar output.img\n"
41689 #: ../tools/virt-make-fs.pl:271
41690 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
41694 #: ../tools/virt-make-fs.pl:559
41696 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
41697 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
41698 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
41702 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
41704 "When reporting bugs, please enable debugging and capture the I<complete> "
41709 #: ../tools/virt-make-fs.pl:576
41712 " export LIBGUESTFS_DEBUG=1\n"
41713 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
41718 #: ../tools/virt-make-fs.pl:579
41720 "Attach /tmp/virt-make-fs.log to a new bug report at "
41721 "L<https://bugzilla.redhat.com/>"
41725 #: ../tools/virt-tar.pl:33
41726 msgid "virt-tar - Extract or upload files to a virtual machine"
41730 #: ../tools/virt-tar.pl:37
41733 " virt-tar [--options] -x domname directory tarball\n"
41738 #: ../tools/virt-tar.pl:39
41741 " virt-tar [--options] -u domname tarball directory\n"
41746 #: ../tools/virt-tar.pl:41
41749 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
41754 #: ../tools/virt-tar.pl:43
41757 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
41762 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
41767 #: ../tools/virt-tar.pl:47
41769 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
41770 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
41774 #: ../tools/virt-tar.pl:52
41775 msgid "Download C</home> from the VM into a local tarball:"
41779 #: ../tools/virt-tar.pl:54
41782 " virt-tar -x domname /home home.tar\n"
41787 #: ../tools/virt-tar.pl:56
41790 " virt-tar -zx domname /home home.tar.gz\n"
41795 #: ../tools/virt-tar.pl:58
41796 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41800 #: ../tools/virt-tar.pl:60
41803 " virt-tar -u domname uploadstuff.tar /tmp\n"
41808 #: ../tools/virt-tar.pl:62
41811 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41816 #: ../tools/virt-tar.pl:66
41818 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41819 "virtual machines. If you do this, you risk disk corruption in the VM. "
41820 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41824 #: ../tools/virt-tar.pl:71
41826 "You can use I<-x> (extract) on live virtual machines, but you might get "
41827 "inconsistent results or errors if there is filesystem activity inside the "
41828 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41829 "work, but the only way to guarantee consistent results is if the virtual "
41830 "machine is shut down."
41834 #: ../tools/virt-tar.pl:79
41836 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41837 "parts of a guest filesystem. There are many possibilities: making backups, "
41838 "uploading data files, snooping on guest activity, fixing or customizing "
41843 #: ../tools/virt-tar.pl:84
41845 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41846 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
41847 "should look at the L<guestfish(1)> tool."
41851 #: ../tools/virt-tar.pl:88
41853 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41854 "its contents (recursively) from the virtual machine into a local tarball. "
41855 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
41856 "virtual machine. You cannot use these two options together."
41860 #: ../tools/virt-tar.pl:94
41862 "In addition, you may need to use the I<-z> (gZip) option to enable "
41863 "compression. When uploading, you have to specify I<-z> if the upload file "
41864 "is compressed because virt-tar won't detect this on its own."
41868 #: ../tools/virt-tar.pl:98
41870 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41871 "example it cannot do PKZip files or bzip2 compression. If you want that "
41872 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41873 "the L<libguestfs(3)> API)."
41877 #: ../tools/virt-tar.pl:160
41878 msgid "B<--extract>"
41882 #: ../tools/virt-tar.pl:162
41883 msgid "B<--download>"
41887 #: ../tools/virt-tar.pl:164
41892 #: ../tools/virt-tar.pl:166
41893 msgid "B<--upload>"
41897 #: ../tools/virt-tar.pl:168
41899 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41904 #: ../tools/virt-tar.pl:171
41906 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41907 "Please read the L</WARNING> section above before using this option."
41911 #: ../tools/virt-tar.pl:175
41912 msgid "You must specify exactly one of these options."
41916 #: ../tools/virt-tar.pl:181
41921 #: ../tools/virt-tar.pl:183
41926 #: ../tools/virt-tar.pl:185
41927 msgid "Specify that the input or output tarball is gzip-compressed."
41931 #: ../tools/virt-tar.pl:298
41933 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
41934 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
41935 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
41936 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41940 #: ../tools/virt-win-reg.pl:37
41942 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
41947 #: ../tools/virt-win-reg.pl:41
41950 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41955 #: ../tools/virt-win-reg.pl:43
41958 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41963 #: ../tools/virt-win-reg.pl:45
41966 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41971 #: ../tools/virt-win-reg.pl:47
41974 " virt-win-reg --merge domname [input.reg ...]\n"
41979 #: ../tools/virt-win-reg.pl:49
41982 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41987 #: ../tools/virt-win-reg.pl:53
41989 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41990 "virtual machines. If you do this, you I<will> get irreversible disk "
41991 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41992 "but doesn't catch all cases."
41996 #: ../tools/virt-win-reg.pl:58
41998 "Modifying the Windows Registry is an inherently risky operation. The format "
41999 "is deliberately obscure and undocumented, and Registry changes can leave the "
42000 "system unbootable. Therefore when using the I<--merge> option, make sure "
42001 "you have a reliable backup first."
42005 #: ../tools/virt-win-reg.pl:65
42007 "This program can export and merge Windows Registry entries from a Windows "
42012 #: ../tools/virt-win-reg.pl:68
42014 "The first parameter is the libvirt guest name or the raw disk image of a "
42019 #: ../tools/virt-win-reg.pl:71
42021 "If I<--merge> is I<not> specified, then the chosen registry key is "
42022 "displayed/exported (recursively). For example:"
42026 #: ../tools/virt-win-reg.pl:74
42029 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
42034 #: ../tools/virt-win-reg.pl:76
42035 msgid "You can also display single values from within registry keys, for example:"
42039 #: ../tools/virt-win-reg.pl:79
42042 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
42043 " $ virt-win-reg Windows7 $cvkey ProductName\n"
42044 " Windows 7 Enterprise\n"
42049 #: ../tools/virt-win-reg.pl:83
42051 "With I<--merge>, you can merge a textual regedit file into the Windows "
42056 #: ../tools/virt-win-reg.pl:86
42059 " $ virt-win-reg --merge Windows7 changes.reg\n"
42064 #: ../tools/virt-win-reg.pl:90
42066 "This program is only meant for simple access to the registry. If you want "
42067 "to do complicated things with the registry, we suggest you download the "
42068 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
42069 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
42070 "L<hivexregedit(1)>."
42074 #: ../tools/virt-win-reg.pl:159
42079 #: ../tools/virt-win-reg.pl:161
42081 "In merge mode, this merges a textual regedit file into the Windows Registry "
42082 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
42083 "displays or exports Registry entries instead."
42087 #: ../tools/virt-win-reg.pl:165
42089 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
42090 "result in disk corruption. However exporting (without this flag) is always "
42095 #: ../tools/virt-win-reg.pl:173
42096 msgid "B<--encoding> UTF-16LE|ASCII"
42100 #: ../tools/virt-win-reg.pl:175
42102 "When merging (only), you may need to specify the encoding for strings to be "
42103 "used in the hive file. This is explained in detail in "
42104 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
42108 #: ../tools/virt-win-reg.pl:179
42110 "The default is to use UTF-16LE, which should work with recent versions of "
42115 #: ../tools/virt-win-reg.pl:186
42116 msgid "B<--unsafe-printable-strings>"
42120 #: ../tools/virt-win-reg.pl:188
42122 "When exporting (only), assume strings are UTF-16LE and print them as strings "
42123 "instead of hex sequences. Remove the final zero codepoint from strings if "
42128 #: ../tools/virt-win-reg.pl:192
42130 "This is unsafe and does not preserve the fidelity of strings in the original "
42131 "Registry for various reasons:"
42135 #: ../tools/virt-win-reg.pl:199
42137 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
42138 "other encodings will be corrupted by this transformation."
42142 #: ../tools/virt-win-reg.pl:204
42144 "Assumes that everything which has type 1 or 2 is really a string and that "
42145 "everything else is not a string, but the type field in real Registries is "
42150 #: ../tools/virt-win-reg.pl:210
42152 "Loses information about whether a zero codepoint followed the string in the "
42157 #: ../tools/virt-win-reg.pl:215
42159 "This all happens because the Registry itself contains no information about "
42160 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
42164 #: ../tools/virt-win-reg.pl:219
42166 "You should only use this option for quick hacking and debugging of the "
42167 "Registry contents, and I<never> use it if the output is going to be passed "
42168 "into another program or stored in another Registry."
42172 #: ../tools/virt-win-reg.pl:556
42173 msgid "SUPPORTED SYSTEMS"
42177 #: ../tools/virt-win-reg.pl:558
42179 "The program currently supports Windows NT-derived guests starting with "
42180 "Windows XP through to at least Windows 7."
42184 #: ../tools/virt-win-reg.pl:561
42185 msgid "The following Registry keys are supported:"
42189 #: ../tools/virt-win-reg.pl:565
42190 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
42194 #: ../tools/virt-win-reg.pl:567
42195 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
42199 #: ../tools/virt-win-reg.pl:569
42200 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
42204 #: ../tools/virt-win-reg.pl:571
42205 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
42209 #: ../tools/virt-win-reg.pl:573
42210 msgid "C<HKEY_USERS\\.DEFAULT>"
42214 #: ../tools/virt-win-reg.pl:575
42215 msgid "C<HKEY_USERS\\I<SID>>"
42219 #: ../tools/virt-win-reg.pl:577
42220 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
42224 #: ../tools/virt-win-reg.pl:579
42225 msgid "C<HKEY_USERS\\I<username>>"
42229 #: ../tools/virt-win-reg.pl:581
42230 msgid "where I<username> is a local user name (this is a libguestfs extension)."
42234 #: ../tools/virt-win-reg.pl:585
42236 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
42241 #: ../tools/virt-win-reg.pl:588
42243 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
42244 "supported (there is no \"current user\")."
42248 #: ../tools/virt-win-reg.pl:591
42253 #: ../tools/virt-win-reg.pl:593
42255 "C<virt-win-reg> expects that regedit files have already been reencoded in "
42256 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
42257 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
42258 "with Windows-style line endings, you may need to reencode the whole file "
42259 "before or after processing."
42263 #: ../tools/virt-win-reg.pl:599
42265 "To reencode a file from Windows format to Linux (before processing it with "
42266 "the I<--merge> option), you would do something like this:"
42270 #: ../tools/virt-win-reg.pl:602
42273 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
42278 #: ../tools/virt-win-reg.pl:604
42280 "To go in the opposite direction, after exporting and before sending the file "
42281 "to a Windows user, do something like this:"
42285 #: ../tools/virt-win-reg.pl:607
42288 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
42293 #: ../tools/virt-win-reg.pl:609
42294 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
42298 #: ../tools/virt-win-reg.pl:611
42300 "If you are unsure about the current encoding, use the L<file(1)> command. "
42301 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
42302 "Windows-style (CRLF) line endings, like this:"
42306 #: ../tools/virt-win-reg.pl:615
42309 " $ file software.reg\n"
42310 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
42311 " with CRLF line terminators\n"
42316 #: ../tools/virt-win-reg.pl:619
42317 msgid "This file would need conversion before you could I<--merge> it."
42321 #: ../tools/virt-win-reg.pl:621
42322 msgid "CurrentControlSet etc."
42326 #: ../tools/virt-win-reg.pl:623
42328 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
42329 "Registry at the level of the hive file, and therefore you cannot modify "
42334 #: ../tools/virt-win-reg.pl:627
42336 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
42337 "circumstances it might refer to another control set. The way to find out is "
42338 "to look at the C<HKLM\\SYSTEM\\Select> key:"
42342 #: ../tools/virt-win-reg.pl:631
42345 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
42346 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
42347 " \"Current\"=dword:00000001\n"
42348 " \"Default\"=dword:00000001\n"
42349 " \"Failed\"=dword:00000000\n"
42350 " \"LastKnownGood\"=dword:00000002\n"
42355 #: ../tools/virt-win-reg.pl:638
42356 msgid "\"Current\" is the one which Windows will choose when it boots."
42360 #: ../tools/virt-win-reg.pl:640
42361 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
42365 #: ../tools/virt-win-reg.pl:643
42366 msgid "DELETING REGISTRY KEYS AND VALUES"
42370 #: ../tools/virt-win-reg.pl:645
42371 msgid "To delete a whole registry key, use the syntax:"
42375 #: ../tools/virt-win-reg.pl:647
42378 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
42383 #: ../tools/virt-win-reg.pl:649
42384 msgid "To delete a single value within a key, use the syntax:"
42388 #: ../tools/virt-win-reg.pl:651
42391 " [HKEY_LOCAL_MACHINE\\Foo]\n"
42397 #: ../tools/virt-win-reg.pl:654
42398 msgid "WINDOWS TIPS"
42402 #: ../tools/virt-win-reg.pl:656
42404 "Note that some of these tips modify the guest disk image. The guest I<must> "
42405 "be shut off, else you will get disk corruption."
42409 #: ../tools/virt-win-reg.pl:659
42410 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
42414 #: ../tools/virt-win-reg.pl:661
42416 "Prepare a DOS batch script, VBScript or executable. Upload this using "
42417 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
42418 "is uploaded into C<C:\\>:"
42422 #: ../tools/virt-win-reg.pl:665
42425 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
42430 #: ../tools/virt-win-reg.pl:667
42431 msgid "Prepare a regedit file containing the registry change:"
42435 #: ../tools/virt-win-reg.pl:669
42438 " cat > test.reg <<'EOF'\n"
42439 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
42440 " \"Test\"=\"c:\\\\test.bat\"\n"
42446 #: ../tools/virt-win-reg.pl:674
42448 "In this example we use the key C<RunOnce> which means that the script will "
42449 "run precisely once when the first user logs in. If you want it to run every "
42450 "time a user logs in, replace C<RunOnce> with C<Run>."
42454 #: ../tools/virt-win-reg.pl:678
42455 msgid "Now update the registry:"
42459 #: ../tools/virt-win-reg.pl:680
42462 " virt-win-reg --merge WindowsGuest test.reg\n"
42467 #: ../tools/virt-win-reg.pl:682
42468 msgid "INSTALLING A SERVICE"
42472 #: ../tools/virt-win-reg.pl:684
42474 "This section assumes you are familiar with Windows services, and you either "
42475 "have a program which handles the Windows Service Control Protocol directly "
42476 "or you want to run any program using a service wrapper like SrvAny or the "
42481 #: ../tools/virt-win-reg.pl:689
42483 "First upload the program and optionally the service wrapper. In this case "
42484 "the test program is called C<test.exe> and we are using the RHSrvAny "
42489 #: ../tools/virt-win-reg.pl:693
42492 " guestfish -i -d WindowsGuest <<EOF\n"
42493 " upload rhsrvany.exe /rhsrvany.exe\n"
42494 " upload test.exe /test.exe\n"
42500 #: ../tools/virt-win-reg.pl:698
42502 "Prepare a regedit file containing the registry changes. In this example, "
42503 "the first registry change is needed for the service itself or the service "
42504 "wrapper (if used). The second registry change is only needed because I am "
42505 "using the RHSrvAny service wrapper."
42509 #: ../tools/virt-win-reg.pl:703
42512 " cat > service.reg <<'EOF'\n"
42513 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
42514 " \"Type\"=dword:00000010\n"
42515 " \"Start\"=dword:00000002\n"
42516 " \"ErrorControl\"=dword:00000001\n"
42517 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
42518 " \"DisplayName\"=\"RHSrvAny\"\n"
42519 " \"ObjectName\"=\"NetworkService\"\n"
42524 #: ../tools/virt-win-reg.pl:712
42527 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
42528 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
42529 " \"PWD\"=\"c:\\\\Temp\"\n"
42535 #: ../tools/virt-win-reg.pl:723
42537 "For use of C<ControlSet001> see the section above in this manual page. You "
42538 "may need to adjust this according to the control set that is in use by the "
42543 #: ../tools/virt-win-reg.pl:729
42545 "C<\"ObjectName\"> controls the privileges that the service will have. An "
42546 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
42547 "privileged account."
42551 #: ../tools/virt-win-reg.pl:735
42553 "For the meaning of the magic numbers, see this Microsoft KB article: "
42554 "L<http://support.microsoft.com/kb/103000>."
42558 #: ../tools/virt-win-reg.pl:740
42559 msgid "Update the registry:"
42563 #: ../tools/virt-win-reg.pl:742
42566 " virt-win-reg --merge WindowsGuest service.reg\n"
42571 #: ../tools/virt-win-reg.pl:746
42573 "Be careful when passing parameters containing C<\\> (backslash) in the "
42574 "shell. Usually you will have to use 'single quotes' or double backslashes "
42575 "(but not both) to protect them from the shell."
42579 #: ../tools/virt-win-reg.pl:750
42580 msgid "Paths and value names are case-insensitive."
42584 #: ../tools/virt-win-reg.pl:759
42586 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
42587 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
42588 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
42589 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42593 #: ../tools/virt-win-reg.pl:777
42596 " export LIBGUESTFS_DEBUG=1\n"
42597 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
42602 #: ../tools/virt-win-reg.pl:780
42604 "Attach /tmp/virt-win-reg.log to a new bug report at "
42605 "L<https://bugzilla.redhat.com/>"