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.14.5\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-12-02 09:28+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:29 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77 ../tools/virt-win-reg.pl:63
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:84 ../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:88 ../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:90 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106
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:92
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:94
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:100
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:107
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:109
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:111 ../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:114
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:117
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:119
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:121
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:124
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:126
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:128
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:133 ../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:137
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:141
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:144
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:158
358 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:499 ../sparsify/virt-sparsify.pod:160
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:182 ../sparsify/virt-sparsify.pod:164
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:184 ../sparsify/virt-sparsify.pod:166
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:186 ../sparsify/virt-sparsify.pod:168
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:188 ../resize/virt-resize.pod:567 ../sparsify/virt-sparsify.pod:170
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:190 ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:172 ../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:192 ../resize/virt-resize.pod:571 ../sparsify/virt-sparsify.pod:174 ../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:203 ../sparsify/virt-sparsify.pod:176 ../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:205 ../sparsify/virt-sparsify.pod:178
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:266 ../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:268 ../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:232 ../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:288 ../resize/virt-resize.pod:694 ../ruby/examples/guestfs-ruby.pod:36 ../sparsify/virt-sparsify.pod:256 ../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:296 ../resize/virt-resize.pod:717 ../sparsify/virt-sparsify.pod:269 ../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:298 ../resize/virt-resize.pod:719 ../sparsify/virt-sparsify.pod:271 ../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:300 ../resize/virt-resize.pod:721 ../ruby/examples/guestfs-ruby.pod:52 ../sparsify/virt-sparsify.pod:273 ../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:275
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:304 ../resize/virt-resize.pod:725 ../sparsify/virt-sparsify.pod:277 ../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:309 ../resize/virt-resize.pod:730 ../sparsify/virt-sparsify.pod:282 ../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:314 ../resize/virt-resize.pod:735 ../sparsify/virt-sparsify.pod:287 ../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:96
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:209
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:215
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:219
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:223
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:234
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:13
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:4380
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:302
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:19 ../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:261 ../sparsify/virt-sparsify.pod:237 ../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:3284 ../fish/guestfish-actions.pod:3595 ../fish/guestfish-actions.pod:3643 ../fish/guestfish-actions.pod:4561 ../fish/guestfish-actions.pod:4581 ../fish/guestfish-actions.pod:4600 ../fish/guestfish-actions.pod:4638 ../fish/guestfish-actions.pod:5287 ../fish/guestfish-actions.pod:5390 ../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:5076 ../src/guestfs-actions.pod:5598 ../src/guestfs-actions.pod:5698 ../src/guestfs-actions.pod:6994 ../src/guestfs-actions.pod:7035 ../src/guestfs-actions.pod:7066 ../src/guestfs-actions.pod:7126 ../src/guestfs-actions.pod:8058 ../src/guestfs-actions.pod:8167 ../src/guestfs-actions.pod:8347
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:3333 ../fish/guestfish-actions.pod:3496 ../fish/guestfish-actions.pod:3631
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:3295 ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5113
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 ../src/guestfs-actions.pod:247
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:4858 ../fish/guestfish-actions.pod:4870 ../fish/guestfish-actions.pod:4881 ../fish/guestfish-actions.pod:4892 ../fish/guestfish-actions.pod:4944 ../fish/guestfish-actions.pod:4953 ../fish/guestfish-actions.pod:5007 ../fish/guestfish-actions.pod:5030
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:3606 ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:5637
7261 msgid "The optional parameters are:"
7265 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3610 ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5641
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:4037 ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6297
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:3907 ../fish/guestfish-actions.pod:3922 ../fish/guestfish-actions.pod:3998 ../fish/guestfish-actions.pod:4015 ../fish/guestfish-actions.pod:4030 ../fish/guestfish-actions.pod:4699 ../fish/guestfish-actions.pod:4745 ../fish/guestfish-actions.pod:4830 ../fish/guestfish-actions.pod:4845 ../fish/guestfish-actions.pod:5251 ../fish/guestfish-actions.pod:5263 ../fish/guestfish-actions.pod:5281 ../fish/guestfish-actions.pod:5298 ../fish/guestfish-actions.pod:5308 ../fish/guestfish-actions.pod:5362 ../fish/guestfish-actions.pod:5372 ../fish/guestfish-actions.pod:5401 ../fish/guestfish-actions.pod:5411 ../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:6079 ../src/guestfs-actions.pod:6105 ../src/guestfs-actions.pod:6236 ../src/guestfs-actions.pod:6262 ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:7241 ../src/guestfs-actions.pod:7296 ../src/guestfs-actions.pod:7442 ../src/guestfs-actions.pod:7466 ../src/guestfs-actions.pod:8131 ../src/guestfs-actions.pod:8151 ../src/guestfs-actions.pod:8184 ../src/guestfs-actions.pod:8203 ../src/guestfs-actions.pod:8222 ../src/guestfs-actions.pod:8313 ../src/guestfs-actions.pod:8332 ../src/guestfs-actions.pod:8378 ../src/guestfs-actions.pod:8397
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:3259 ../fish/guestfish-actions.pod:3398 ../fish/guestfish-actions.pod:3408 ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:5044 ../src/guestfs-actions.pod:5253 ../src/guestfs-actions.pod:5272 ../src/guestfs-actions.pod:5291
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:2703 ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4124
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:5003 ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:7701
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:4360 ../fish/guestfish-actions.pod:4462 ../src/guestfs-actions.pod:2464 ../src/guestfs-actions.pod:2556 ../src/guestfs-actions.pod:6755 ../src/guestfs-actions.pod:6881
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:2570 ../fish/guestfish-actions.pod:2588 ../fish/guestfish-actions.pod:2626 ../fish/guestfish-actions.pod:2642 ../src/guestfs-actions.pod:2582 ../src/guestfs-actions.pod:3901 ../src/guestfs-actions.pod:3930 ../src/guestfs-actions.pod:3991 ../src/guestfs-actions.pod:4018
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:2715
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:2722 ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:4151
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:4843 ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:7460
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:2362 ../fish/guestfish-actions.pod:2375 ../fish/guestfish-actions.pod:2388 ../fish/guestfish-actions.pod:2398 ../fish/guestfish-actions.pod:2408 ../fish/guestfish-actions.pod:2420 ../fish/guestfish-actions.pod:2516 ../fish/guestfish-actions.pod:2550 ../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:3634 ../src/guestfs-actions.pod:3654 ../src/guestfs-actions.pod:3674 ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3707 ../src/guestfs-actions.pod:3725 ../src/guestfs-actions.pod:3827 ../src/guestfs-actions.pod:3868
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:2353 ../src/guestfs-actions.pod:3136 ../src/guestfs-actions.pod:3245 ../src/guestfs-actions.pod:3625
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:2359 ../src/guestfs-actions.pod:3147 ../src/guestfs-actions.pod:3251 ../src/guestfs-actions.pod:3631
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:2355 ../src/guestfs-actions.pod:3627
10817 msgid "The operating system type could not be determined."
10821 #: ../fish/guestfish-actions.pod:2364
10822 msgid "inspect-get-windows-current-control-set"
10826 #: ../fish/guestfish-actions.pod:2366
10829 " inspect-get-windows-current-control-set root\n"
10834 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3647
10836 "This returns the Windows CurrentControlSet of the inspected guest. The "
10837 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10841 #: ../fish/guestfish-actions.pod:2371 ../src/guestfs-actions.pod:3650
10843 "This call assumes that the guest is Windows and that the Registry could be "
10844 "examined by inspection. If this is not the case then an error is returned."
10848 #: ../fish/guestfish-actions.pod:2377
10849 msgid "inspect-get-windows-systemroot"
10853 #: ../fish/guestfish-actions.pod:2379
10856 " inspect-get-windows-systemroot root\n"
10861 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3667
10863 "This returns the Windows systemroot of the inspected guest. The systemroot "
10864 "is a directory path such as C</WINDOWS>."
10868 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3670
10870 "This call assumes that the guest is Windows and that the systemroot could be "
10871 "determined by inspection. If this is not the case then an error is "
10876 #: ../fish/guestfish-actions.pod:2390
10877 msgid "inspect-is-live"
10881 #: ../fish/guestfish-actions.pod:2392
10884 " inspect-is-live root\n"
10889 #: ../fish/guestfish-actions.pod:2394
10891 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10892 "then this returns true if a live image was detected on the disk."
10896 #: ../fish/guestfish-actions.pod:2400
10897 msgid "inspect-is-multipart"
10901 #: ../fish/guestfish-actions.pod:2402
10904 " inspect-is-multipart root\n"
10909 #: ../fish/guestfish-actions.pod:2404
10911 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10912 "then this returns true if the disk is part of a set."
10916 #: ../fish/guestfish-actions.pod:2410
10917 msgid "inspect-is-netinst"
10921 #: ../fish/guestfish-actions.pod:2412
10924 " inspect-is-netinst root\n"
10929 #: ../fish/guestfish-actions.pod:2414
10931 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10932 "then this returns true if the disk is a network installer, ie. not a "
10933 "self-contained install CD but one which is likely to require network access "
10934 "to complete the install."
10938 #: ../fish/guestfish-actions.pod:2422
10939 msgid "inspect-list-applications"
10943 #: ../fish/guestfish-actions.pod:2424
10946 " inspect-list-applications root\n"
10951 #: ../fish/guestfish-actions.pod:2426 ../src/guestfs-actions.pod:3737
10952 msgid "Return the list of applications installed in the operating system."
10956 #: ../fish/guestfish-actions.pod:2428
10958 "I<Note:> This call works differently from other parts of the inspection "
10959 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10960 "then mount up the disks, before calling this. Listing applications is a "
10961 "significantly more difficult operation which requires access to the full "
10962 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10963 "are just returning data cached in the libguestfs handle, this call actually "
10964 "reads parts of the mounted filesystems during the call."
10968 #: ../fish/guestfish-actions.pod:2438 ../src/guestfs-actions.pod:3749
10970 "This returns an empty list if the inspection code was not able to determine "
10971 "the list of applications."
10975 #: ../fish/guestfish-actions.pod:2441 ../src/guestfs-actions.pod:3752
10976 msgid "The application structure contains the following fields:"
10980 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3756
10981 msgid "C<app_name>"
10985 #: ../fish/guestfish-actions.pod:2447 ../src/guestfs-actions.pod:3758
10987 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10988 "guests, this is the package name."
10992 #: ../fish/guestfish-actions.pod:2450 ../src/guestfs-actions.pod:3761
10993 msgid "C<app_display_name>"
10997 #: ../fish/guestfish-actions.pod:2452 ../src/guestfs-actions.pod:3763
10999 "The display name of the application, sometimes localized to the install "
11000 "language of the guest operating system."
11004 #: ../fish/guestfish-actions.pod:2455 ../src/guestfs-actions.pod:3766
11006 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11007 "to display something can use C<app_name> instead."
11011 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3769
11012 msgid "C<app_epoch>"
11016 #: ../fish/guestfish-actions.pod:2460 ../src/guestfs-actions.pod:3771
11018 "For package managers which use epochs, this contains the epoch of the "
11019 "package (an integer). If unavailable, this is returned as C<0>."
11023 #: ../fish/guestfish-actions.pod:2463 ../src/guestfs-actions.pod:3774
11024 msgid "C<app_version>"
11028 #: ../fish/guestfish-actions.pod:2465 ../src/guestfs-actions.pod:3776
11030 "The version string of the application or package. If unavailable this is "
11031 "returned as an empty string C<\"\">."
11035 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3779
11036 msgid "C<app_release>"
11040 #: ../fish/guestfish-actions.pod:2470 ../src/guestfs-actions.pod:3781
11042 "The release string of the application or package, for package managers that "
11043 "use this. If unavailable this is returned as an empty string C<\"\">."
11047 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3785
11048 msgid "C<app_install_path>"
11052 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3787
11054 "The installation path of the application (on operating systems such as "
11055 "Windows which use installation paths). This path is in the format used by "
11056 "the guest operating system, it is not a libguestfs path."
11060 #: ../fish/guestfish-actions.pod:2481 ../src/guestfs-actions.pod:3792
11061 msgid "If unavailable this is returned as an empty string C<\"\">."
11065 #: ../fish/guestfish-actions.pod:2483 ../src/guestfs-actions.pod:3794
11066 msgid "C<app_trans_path>"
11070 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3796
11072 "The install path translated into a libguestfs path. If unavailable this is "
11073 "returned as an empty string C<\"\">."
11077 #: ../fish/guestfish-actions.pod:2488 ../src/guestfs-actions.pod:3799
11078 msgid "C<app_publisher>"
11082 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3801
11084 "The name of the publisher of the application, for package managers that use "
11085 "this. If unavailable this is returned as an empty string C<\"\">."
11089 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3805
11094 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3807
11096 "The URL (eg. upstream URL) of the application. If unavailable this is "
11097 "returned as an empty string C<\"\">."
11101 #: ../fish/guestfish-actions.pod:2499 ../src/guestfs-actions.pod:3810
11102 msgid "C<app_source_package>"
11106 #: ../fish/guestfish-actions.pod:2501 ../src/guestfs-actions.pod:3812
11108 "For packaging systems which support this, the name of the source package. "
11109 "If unavailable this is returned as an empty string C<\"\">."
11113 #: ../fish/guestfish-actions.pod:2504 ../src/guestfs-actions.pod:3815
11114 msgid "C<app_summary>"
11118 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:3817
11120 "A short (usually one line) description of the application or package. If "
11121 "unavailable this is returned as an empty string C<\"\">."
11125 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3820
11126 msgid "C<app_description>"
11130 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3822
11132 "A longer description of the application or package. If unavailable this is "
11133 "returned as an empty string C<\"\">."
11137 #: ../fish/guestfish-actions.pod:2518
11142 #: ../fish/guestfish-actions.pod:2520
11150 #: ../fish/guestfish-actions.pod:2522 ../src/guestfs-actions.pod:3840
11152 "This function uses other libguestfs functions and certain heuristics to "
11153 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11154 "for operating systems."
11158 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3844
11159 msgid "The list returned is empty if no operating systems were found."
11163 #: ../fish/guestfish-actions.pod:2528 ../src/guestfs-actions.pod:3846
11165 "If one operating system was found, then this returns a list with a single "
11166 "element, which is the name of the root filesystem of this operating system. "
11167 "It is also possible for this function to return a list containing more than "
11168 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11169 "element being the root filesystem of one of the operating systems."
11173 #: ../fish/guestfish-actions.pod:2535
11175 "You can pass the root string(s) returned to other L</inspect-get-*> "
11176 "functions in order to query further information about each operating system, "
11177 "such as the name and version."
11181 #: ../fish/guestfish-actions.pod:2540
11183 "This function uses other libguestfs features such as L</mount-ro> and "
11184 "L</umount-all> in order to mount and unmount filesystems and look at the "
11185 "contents. This should be called with no disks currently mounted. The "
11186 "function may also use Augeas, so any existing Augeas handle will be closed."
11190 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3864
11192 "This function cannot decrypt encrypted disks. The caller must do that first "
11193 "(supplying the necessary keys) if the disk is encrypted."
11197 #: ../fish/guestfish-actions.pod:2552 ../fish/guestfish-actions.pod:2750 ../fish/guestfish-actions.pod:2809
11198 msgid "See also L</list-filesystems>."
11202 #: ../fish/guestfish-actions.pod:2554
11203 msgid "is-blockdev"
11207 #: ../fish/guestfish-actions.pod:2556
11210 " is-blockdev path\n"
11215 #: ../fish/guestfish-actions.pod:2558 ../src/guestfs-actions.pod:3884
11217 "This returns C<true> if and only if there is a block device with the given "
11222 #: ../fish/guestfish-actions.pod:2561 ../fish/guestfish-actions.pod:2579 ../fish/guestfish-actions.pod:2598 ../fish/guestfish-actions.pod:2607 ../fish/guestfish-actions.pod:2617 ../fish/guestfish-actions.pod:2651 ../fish/guestfish-actions.pod:2660
11223 msgid "See also L</stat>."
11227 #: ../fish/guestfish-actions.pod:2563
11232 #: ../fish/guestfish-actions.pod:2565
11240 #: ../fish/guestfish-actions.pod:2567 ../src/guestfs-actions.pod:3898
11242 "This returns true iff this handle is busy processing a command (in the "
11247 #: ../fish/guestfish-actions.pod:2572
11252 #: ../fish/guestfish-actions.pod:2574
11255 " is-chardev path\n"
11260 #: ../fish/guestfish-actions.pod:2576 ../src/guestfs-actions.pod:3913
11262 "This returns C<true> if and only if there is a character device with the "
11263 "given C<path> name."
11267 #: ../fish/guestfish-actions.pod:2581
11272 #: ../fish/guestfish-actions.pod:2583
11280 #: ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3927
11282 "This returns true iff this handle is being configured (in the C<CONFIG> "
11287 #: ../fish/guestfish-actions.pod:2590
11292 #: ../fish/guestfish-actions.pod:2592
11300 #: ../fish/guestfish-actions.pod:2594 ../src/guestfs-actions.pod:3942
11302 "This returns C<true> if and only if there is a directory with the given "
11303 "C<path> name. Note that it returns false for other objects like files."
11307 #: ../fish/guestfish-actions.pod:2600
11312 #: ../fish/guestfish-actions.pod:2602
11320 #: ../fish/guestfish-actions.pod:2604 ../src/guestfs-actions.pod:3958
11322 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11323 "given C<path> name."
11327 #: ../fish/guestfish-actions.pod:2609
11332 #: ../fish/guestfish-actions.pod:2611
11340 #: ../fish/guestfish-actions.pod:2613 ../src/guestfs-actions.pod:3973
11342 "This returns C<true> if and only if there is a regular file with the given "
11343 "C<path> name. Note that it returns false for other objects like "
11348 #: ../fish/guestfish-actions.pod:2619
11349 msgid "is-launching"
11353 #: ../fish/guestfish-actions.pod:2621
11361 #: ../fish/guestfish-actions.pod:2623 ../src/guestfs-actions.pod:3988
11363 "This returns true iff this handle is launching the subprocess (in the "
11364 "C<LAUNCHING> state)."
11368 #: ../fish/guestfish-actions.pod:2628
11373 #: ../fish/guestfish-actions.pod:2630
11381 #: ../fish/guestfish-actions.pod:2632 ../src/guestfs-actions.pod:4003
11383 "This command tests whether C<device> is a logical volume, and returns true "
11384 "iff this is the case."
11388 #: ../fish/guestfish-actions.pod:2635
11393 #: ../fish/guestfish-actions.pod:2637
11401 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4015
11403 "This returns true iff this handle is ready to accept commands (in the "
11408 #: ../fish/guestfish-actions.pod:2644
11413 #: ../fish/guestfish-actions.pod:2646
11416 " is-socket path\n"
11421 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4030
11423 "This returns C<true> if and only if there is a Unix domain socket with the "
11424 "given C<path> name."
11428 #: ../fish/guestfish-actions.pod:2653
11433 #: ../fish/guestfish-actions.pod:2655
11436 " is-symlink path\n"
11441 #: ../fish/guestfish-actions.pod:2657 ../src/guestfs-actions.pod:4045
11443 "This returns C<true> if and only if there is a symbolic link with the given "
11448 #: ../fish/guestfish-actions.pod:2662
11453 #: ../fish/guestfish-actions.pod:2664
11461 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:4060
11463 "This returns true iff the file exists and the file is empty or it contains "
11468 #: ../fish/guestfish-actions.pod:2669
11469 msgid "is-zero-device"
11473 #: ../fish/guestfish-actions.pod:2671
11476 " is-zero-device device\n"
11481 #: ../fish/guestfish-actions.pod:2673 ../src/guestfs-actions.pod:4073
11482 msgid "This returns true iff the device exists and contains all zero bytes."
11486 #: ../fish/guestfish-actions.pod:2675 ../src/guestfs-actions.pod:4075
11487 msgid "Note that for large devices this can take a long time to run."
11491 #: ../fish/guestfish-actions.pod:2677
11492 msgid "kill-subprocess"
11496 #: ../fish/guestfish-actions.pod:2679
11499 " kill-subprocess\n"
11504 #: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:4086
11505 msgid "This kills the qemu subprocess. You should never need to call this."
11509 #: ../fish/guestfish-actions.pod:2683
11514 #: ../fish/guestfish-actions.pod:2685
11519 #: ../fish/guestfish-actions.pod:2687
11527 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:4097
11529 "Internally libguestfs is implemented by running a virtual machine using "
11534 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4100
11536 "You should call this after configuring the handle (eg. adding drives) but "
11537 "before performing any actions."
11541 #: ../fish/guestfish-actions.pod:2695
11546 #: ../fish/guestfish-actions.pod:2697
11549 " lchown owner group path\n"
11554 #: ../fish/guestfish-actions.pod:2699
11556 "Change the file owner to C<owner> and group to C<group>. This is like "
11557 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
11562 #: ../fish/guestfish-actions.pod:2707
11567 #: ../fish/guestfish-actions.pod:2709
11570 " lgetxattr path name\n"
11575 #: ../fish/guestfish-actions.pod:2711 ../src/guestfs-actions.pod:4140
11577 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11578 "is a symlink, then this call returns an extended attribute from the symlink."
11582 #: ../fish/guestfish-actions.pod:2725
11583 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11587 #: ../fish/guestfish-actions.pod:2727
11592 #: ../fish/guestfish-actions.pod:2729
11595 " lgetxattrs path\n"
11600 #: ../fish/guestfish-actions.pod:2731
11602 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11603 "it returns the extended attributes of the link itself."
11607 #: ../fish/guestfish-actions.pod:2735
11612 #: ../fish/guestfish-actions.pod:2737
11620 #: ../fish/guestfish-actions.pod:2739 ../src/guestfs-actions.pod:4183
11622 "List all 9p filesystems attached to the guest. A list of mount tags is "
11627 #: ../fish/guestfish-actions.pod:2742
11628 msgid "list-devices"
11632 #: ../fish/guestfish-actions.pod:2744
11640 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4197
11641 msgid "List all the block devices."
11645 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4199
11646 msgid "The full block device names are returned, eg. C</dev/sda>."
11650 #: ../fish/guestfish-actions.pod:2752
11651 msgid "list-dm-devices"
11655 #: ../fish/guestfish-actions.pod:2754
11658 " list-dm-devices\n"
11663 #: ../fish/guestfish-actions.pod:2756 ../src/guestfs-actions.pod:4214
11664 msgid "List all device mapper devices."
11668 #: ../fish/guestfish-actions.pod:2758
11670 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11671 "previous call to L</luks-open>."
11675 #: ../fish/guestfish-actions.pod:2761
11677 "Device mapper devices which correspond to logical volumes are I<not> "
11678 "returned in this list. Call L</lvs> if you want to list logical volumes."
11682 #: ../fish/guestfish-actions.pod:2765
11683 msgid "list-filesystems"
11687 #: ../fish/guestfish-actions.pod:2767
11690 " list-filesystems\n"
11695 #: ../fish/guestfish-actions.pod:2769 ../src/guestfs-actions.pod:4234
11697 "This inspection command looks for filesystems on partitions, block devices "
11698 "and logical volumes, returning a list of devices containing filesystems and "
11703 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4238
11705 "The return value is a hash, where the keys are the devices containing "
11706 "filesystems, and the values are the filesystem types. For example:"
11710 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4242
11713 " \"/dev/sda1\" => \"ntfs\"\n"
11714 " \"/dev/sda2\" => \"ext2\"\n"
11715 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11716 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11721 #: ../fish/guestfish-actions.pod:2782 ../src/guestfs-actions.pod:4247
11723 "The value can have the special value \"unknown\", meaning the content of the "
11724 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11728 #: ../fish/guestfish-actions.pod:2786
11730 "This command runs other libguestfs commands, which might include L</mount> "
11731 "and L</umount>, and therefore you should use this soon after launch and only "
11732 "when nothing is mounted."
11736 #: ../fish/guestfish-actions.pod:2790
11738 "Not all of the filesystems returned will be mountable. In particular, swap "
11739 "partitions are returned in the list. Also this command does not check that "
11740 "each filesystem found is valid and mountable, and some filesystems might be "
11741 "mountable but require special options. Filesystems may not all belong to a "
11742 "single logical operating system (use L</inspect-os> to look for OSes)."
11746 #: ../fish/guestfish-actions.pod:2798
11747 msgid "list-partitions"
11751 #: ../fish/guestfish-actions.pod:2800
11754 " list-partitions\n"
11759 #: ../fish/guestfish-actions.pod:2802 ../src/guestfs-actions.pod:4276
11760 msgid "List all the partitions detected on all block devices."
11764 #: ../fish/guestfish-actions.pod:2804 ../src/guestfs-actions.pod:4278
11765 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11769 #: ../fish/guestfish-actions.pod:2806
11771 "This does not return logical volumes. For that you will need to call "
11776 #: ../fish/guestfish-actions.pod:2811
11781 #: ../fish/guestfish-actions.pod:2813
11789 #: ../fish/guestfish-actions.pod:2815 ../src/guestfs-actions.pod:4297
11791 "List the files in C<directory> (relative to the root directory, there is no "
11792 "cwd) in the format of 'ls -la'."
11796 #: ../fish/guestfish-actions.pod:2818 ../src/guestfs-actions.pod:4300
11798 "This command is mostly useful for interactive sessions. It is I<not> "
11799 "intended that you try to parse the output string."
11803 #: ../fish/guestfish-actions.pod:2821
11808 #: ../fish/guestfish-actions.pod:2823
11811 " ln target linkname\n"
11816 #: ../fish/guestfish-actions.pod:2825 ../src/guestfs-actions.pod:4315
11817 msgid "This command creates a hard link using the C<ln> command."
11821 #: ../fish/guestfish-actions.pod:2827
11826 #: ../fish/guestfish-actions.pod:2829
11829 " ln-f target linkname\n"
11834 #: ../fish/guestfish-actions.pod:2831 ../src/guestfs-actions.pod:4328
11836 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11837 "option removes the link (C<linkname>) if it exists already."
11841 #: ../fish/guestfish-actions.pod:2834
11846 #: ../fish/guestfish-actions.pod:2836
11849 " ln-s target linkname\n"
11854 #: ../fish/guestfish-actions.pod:2838 ../src/guestfs-actions.pod:4342
11855 msgid "This command creates a symbolic link using the C<ln -s> command."
11859 #: ../fish/guestfish-actions.pod:2840
11864 #: ../fish/guestfish-actions.pod:2842
11867 " ln-sf target linkname\n"
11872 #: ../fish/guestfish-actions.pod:2844 ../src/guestfs-actions.pod:4355
11874 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11875 "option removes the link (C<linkname>) if it exists already."
11879 #: ../fish/guestfish-actions.pod:2847
11880 msgid "lremovexattr"
11884 #: ../fish/guestfish-actions.pod:2849
11887 " lremovexattr xattr path\n"
11892 #: ../fish/guestfish-actions.pod:2851
11894 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11895 "it removes an extended attribute of the link itself."
11899 #: ../fish/guestfish-actions.pod:2855
11904 #: ../fish/guestfish-actions.pod:2857
11912 #: ../fish/guestfish-actions.pod:2859 ../src/guestfs-actions.pod:4383
11914 "List the files in C<directory> (relative to the root directory, there is no "
11915 "cwd). The '.' and '..' entries are not returned, but hidden files are "
11920 #: ../fish/guestfish-actions.pod:2863
11922 "This command is mostly useful for interactive sessions. Programs should "
11923 "probably use L</readdir> instead."
11927 #: ../fish/guestfish-actions.pod:2866
11932 #: ../fish/guestfish-actions.pod:2868
11935 " lsetxattr xattr val vallen path\n"
11940 #: ../fish/guestfish-actions.pod:2870
11942 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11943 "sets an extended attribute of the link itself."
11947 #: ../fish/guestfish-actions.pod:2874
11952 #: ../fish/guestfish-actions.pod:2876
11960 #: ../fish/guestfish-actions.pod:2878 ../fish/guestfish-actions.pod:4678 ../src/guestfs-actions.pod:4419 ../src/guestfs-actions.pod:7200
11961 msgid "Returns file information for the given C<path>."
11965 #: ../fish/guestfish-actions.pod:2880
11967 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11968 "the link is stat-ed, not the file it refers to."
11972 #: ../fish/guestfish-actions.pod:2884 ../src/guestfs-actions.pod:4425
11973 msgid "This is the same as the C<lstat(2)> system call."
11977 #: ../fish/guestfish-actions.pod:2886
11982 #: ../fish/guestfish-actions.pod:2888
11985 " lstatlist path 'names ...'\n"
11990 #: ../fish/guestfish-actions.pod:2890
11992 "This call allows you to perform the L</lstat> operation on multiple files, "
11993 "where all files are in the directory C<path>. C<names> is the list of files "
11994 "from this directory."
11998 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4444
12000 "On return you get a list of stat structs, with a one-to-one correspondence "
12001 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12002 "then the C<ino> field of that structure is set to C<-1>."
12006 #: ../fish/guestfish-actions.pod:2899
12008 "This call is intended for programs that want to efficiently list a directory "
12009 "contents without making many round-trips. See also L</lxattrlist> for a "
12010 "similarly efficient call for getting extended attributes. Very long "
12011 "directory listings might cause the protocol message size to be exceeded, "
12012 "causing this call to fail. The caller must split up such requests into "
12013 "smaller groups of names."
12017 #: ../fish/guestfish-actions.pod:2907
12018 msgid "luks-add-key"
12022 #: ../fish/guestfish-actions.pod:2909
12025 " luks-add-key device keyslot\n"
12030 #: ../fish/guestfish-actions.pod:2911 ../src/guestfs-actions.pod:4472
12032 "This command adds a new key on LUKS device C<device>. C<key> is any "
12033 "existing key, and is used to access the device. C<newkey> is the new key to "
12034 "add. C<keyslot> is the key slot that will be replaced."
12038 #: ../fish/guestfish-actions.pod:2916
12040 "Note that if C<keyslot> already contains a key, then this command will "
12041 "fail. You have to use L</luks-kill-slot> first to remove that key."
12045 #: ../fish/guestfish-actions.pod:2920 ../fish/guestfish-actions.pod:2942 ../fish/guestfish-actions.pod:2952 ../fish/guestfish-actions.pod:2963 ../fish/guestfish-actions.pod:2989 ../fish/guestfish-actions.pod:2999
12047 "This command has one or more key or passphrase parameters. Guestfish will "
12048 "prompt for these separately."
12052 #: ../fish/guestfish-actions.pod:2923
12057 #: ../fish/guestfish-actions.pod:2925
12060 " luks-close device\n"
12065 #: ../fish/guestfish-actions.pod:2927
12067 "This closes a LUKS device that was created earlier by L</luks-open> or "
12068 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
12069 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12070 "underlying block device."
12074 #: ../fish/guestfish-actions.pod:2933
12075 msgid "luks-format"
12079 #: ../fish/guestfish-actions.pod:2935
12082 " luks-format device keyslot\n"
12087 #: ../fish/guestfish-actions.pod:2937 ../src/guestfs-actions.pod:4513
12089 "This command erases existing data on C<device> and formats the device as a "
12090 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12091 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12095 #: ../fish/guestfish-actions.pod:2945
12096 msgid "luks-format-cipher"
12100 #: ../fish/guestfish-actions.pod:2947
12103 " luks-format-cipher device keyslot cipher\n"
12108 #: ../fish/guestfish-actions.pod:2949
12110 "This command is the same as L</luks-format> but it also allows you to set "
12111 "the C<cipher> used."
12115 #: ../fish/guestfish-actions.pod:2955
12116 msgid "luks-kill-slot"
12120 #: ../fish/guestfish-actions.pod:2957
12123 " luks-kill-slot device keyslot\n"
12128 #: ../fish/guestfish-actions.pod:2959 ../src/guestfs-actions.pod:4554
12130 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12131 "device C<device>. C<key> must be one of the I<other> keys."
12135 #: ../fish/guestfish-actions.pod:2966
12140 #: ../fish/guestfish-actions.pod:2968
12143 " luks-open device mapname\n"
12148 #: ../fish/guestfish-actions.pod:2970 ../src/guestfs-actions.pod:4574
12150 "This command opens a block device which has been encrypted according to the "
12151 "Linux Unified Key Setup (LUKS) standard."
12155 #: ../fish/guestfish-actions.pod:2973 ../src/guestfs-actions.pod:4577
12156 msgid "C<device> is the encrypted block device or partition."
12160 #: ../fish/guestfish-actions.pod:2975 ../src/guestfs-actions.pod:4579
12162 "The caller must supply one of the keys associated with the LUKS block "
12163 "device, in the C<key> parameter."
12167 #: ../fish/guestfish-actions.pod:2978 ../src/guestfs-actions.pod:4582
12169 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12170 "writes to this block device are decrypted from and encrypted to the "
12171 "underlying C<device> respectively."
12175 #: ../fish/guestfish-actions.pod:2982
12177 "If this block device contains LVM volume groups, then calling L</vgscan> "
12178 "followed by L</vg-activate-all> will make them visible."
12182 #: ../fish/guestfish-actions.pod:2986
12183 msgid "Use L</list-dm-devices> to list all device mapper devices."
12187 #: ../fish/guestfish-actions.pod:2992
12188 msgid "luks-open-ro"
12192 #: ../fish/guestfish-actions.pod:2994
12195 " luks-open-ro device mapname\n"
12200 #: ../fish/guestfish-actions.pod:2996
12202 "This is the same as L</luks-open> except that a read-only mapping is "
12207 #: ../fish/guestfish-actions.pod:3002
12212 #: ../fish/guestfish-actions.pod:3004
12215 " lvcreate logvol volgroup mbytes\n"
12220 #: ../fish/guestfish-actions.pod:3006 ../src/guestfs-actions.pod:4628
12222 "This creates an LVM logical volume called C<logvol> on the volume group "
12223 "C<volgroup>, with C<size> megabytes."
12227 #: ../fish/guestfish-actions.pod:3009
12228 msgid "lvm-canonical-lv-name"
12232 #: ../fish/guestfish-actions.pod:3011
12235 " lvm-canonical-lv-name lvname\n"
12240 #: ../fish/guestfish-actions.pod:3013 ../src/guestfs-actions.pod:4641
12242 "This converts alternative naming schemes for LVs that you might find to the "
12243 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
12248 #: ../fish/guestfish-actions.pod:3017 ../src/guestfs-actions.pod:4645
12250 "This command returns an error if the C<lvname> parameter does not refer to a "
12255 #: ../fish/guestfish-actions.pod:3020
12256 msgid "See also L</is-lv>."
12260 #: ../fish/guestfish-actions.pod:3022
12261 msgid "lvm-clear-filter"
12265 #: ../fish/guestfish-actions.pod:3024
12268 " lvm-clear-filter\n"
12273 #: ../fish/guestfish-actions.pod:3026
12275 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12280 #: ../fish/guestfish-actions.pod:3029 ../fish/guestfish-actions.pod:3057 ../src/guestfs-actions.pod:4663 ../src/guestfs-actions.pod:4702
12281 msgid "This command also clears the LVM cache and performs a volume group scan."
12285 #: ../fish/guestfish-actions.pod:3032
12286 msgid "lvm-remove-all"
12290 #: ../fish/guestfish-actions.pod:3034
12293 " lvm-remove-all\n"
12298 #: ../fish/guestfish-actions.pod:3036 ../src/guestfs-actions.pod:4675
12300 "This command removes all LVM logical volumes, volume groups and physical "
12305 #: ../fish/guestfish-actions.pod:3039
12306 msgid "lvm-set-filter"
12310 #: ../fish/guestfish-actions.pod:3041
12313 " lvm-set-filter 'devices ...'\n"
12318 #: ../fish/guestfish-actions.pod:3043 ../src/guestfs-actions.pod:4688
12320 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12321 "block devices in the list C<devices>, and will ignore all other attached "
12326 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4692
12328 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12329 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12330 "there are two types of duplication possible: either cloned PVs/VGs which "
12331 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12332 "same name. In normal operation you cannot create this situation, but you "
12333 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12334 "inside the LVM metadata."
12338 #: ../fish/guestfish-actions.pod:3060 ../src/guestfs-actions.pod:4705
12339 msgid "You can filter whole block devices or individual partitions."
12343 #: ../fish/guestfish-actions.pod:3062 ../src/guestfs-actions.pod:4707
12345 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12346 "filesystem), even if you are not filtering out that VG."
12350 #: ../fish/guestfish-actions.pod:3066
12355 #: ../fish/guestfish-actions.pod:3068
12358 " lvremove device\n"
12363 #: ../fish/guestfish-actions.pod:3070 ../src/guestfs-actions.pod:4721
12365 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12366 "LV, such as C</dev/VG/LV>."
12370 #: ../fish/guestfish-actions.pod:3073 ../src/guestfs-actions.pod:4724
12372 "You can also remove all LVs in a volume group by specifying the VG name, "
12377 #: ../fish/guestfish-actions.pod:3076
12382 #: ../fish/guestfish-actions.pod:3078
12385 " lvrename logvol newlogvol\n"
12390 #: ../fish/guestfish-actions.pod:3080 ../src/guestfs-actions.pod:4738
12391 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12395 #: ../fish/guestfish-actions.pod:3082
12400 #: ../fish/guestfish-actions.pod:3084
12403 " lvresize device mbytes\n"
12408 #: ../fish/guestfish-actions.pod:3086 ../src/guestfs-actions.pod:4751
12410 "This resizes (expands or shrinks) an existing LVM logical volume to "
12411 "C<mbytes>. When reducing, data in the reduced part is lost."
12415 #: ../fish/guestfish-actions.pod:3090
12416 msgid "lvresize-free"
12420 #: ../fish/guestfish-actions.pod:3092
12423 " lvresize-free lv percent\n"
12428 #: ../fish/guestfish-actions.pod:3094 ../src/guestfs-actions.pod:4766
12430 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12431 "remaining free space in the volume group. Commonly you would call this with "
12432 "pc = 100 which expands the logical volume as much as possible, using all "
12433 "remaining free space in the volume group."
12437 #: ../fish/guestfish-actions.pod:3100
12442 #: ../fish/guestfish-actions.pod:3102
12450 #: ../fish/guestfish-actions.pod:3104 ../src/guestfs-actions.pod:4781
12452 "List all the logical volumes detected. This is the equivalent of the "
12453 "L<lvs(8)> command."
12457 #: ../fish/guestfish-actions.pod:3107 ../src/guestfs-actions.pod:4784
12459 "This returns a list of the logical volume device names "
12460 "(eg. C</dev/VolGroup00/LogVol00>)."
12464 #: ../fish/guestfish-actions.pod:3110
12465 msgid "See also L</lvs-full>, L</list-filesystems>."
12469 #: ../fish/guestfish-actions.pod:3112
12474 #: ../fish/guestfish-actions.pod:3114
12482 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4800
12484 "List all the logical volumes detected. This is the equivalent of the "
12485 "L<lvs(8)> command. The \"full\" version includes all fields."
12489 #: ../fish/guestfish-actions.pod:3119
12494 #: ../fish/guestfish-actions.pod:3121
12502 #: ../fish/guestfish-actions.pod:3123 ../src/guestfs-actions.pod:4815
12503 msgid "This command returns the UUID of the LVM LV C<device>."
12507 #: ../fish/guestfish-actions.pod:3125
12512 #: ../fish/guestfish-actions.pod:3127
12515 " lxattrlist path 'names ...'\n"
12520 #: ../fish/guestfish-actions.pod:3129 ../src/guestfs-actions.pod:4829
12522 "This call allows you to get the extended attributes of multiple files, where "
12523 "all files are in the directory C<path>. C<names> is the list of files from "
12528 #: ../fish/guestfish-actions.pod:3133 ../src/guestfs-actions.pod:4833
12530 "On return you get a flat list of xattr structs which must be interpreted "
12531 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12532 "C<attrval> in this struct is zero-length to indicate there was an error "
12533 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12534 "number (the number of following attributes for this file, which could be "
12535 "C<\"0\">). Then after the first xattr struct are the zero or more "
12536 "attributes for the first named file. This repeats for the second and "
12537 "subsequent files."
12541 #: ../fish/guestfish-actions.pod:3143
12543 "This call is intended for programs that want to efficiently list a directory "
12544 "contents without making many round-trips. See also L</lstatlist> for a "
12545 "similarly efficient call for getting standard stats. Very long directory "
12546 "listings might cause the protocol message size to be exceeded, causing this "
12547 "call to fail. The caller must split up such requests into smaller groups of "
12552 #: ../fish/guestfish-actions.pod:3151
12557 #: ../fish/guestfish-actions.pod:3153
12565 #: ../fish/guestfish-actions.pod:3155 ../src/guestfs-actions.pod:4863
12566 msgid "Create a directory named C<path>."
12570 #: ../fish/guestfish-actions.pod:3157
12575 #: ../fish/guestfish-actions.pod:3159
12578 " mkdir-mode path mode\n"
12583 #: ../fish/guestfish-actions.pod:3161 ../src/guestfs-actions.pod:4876
12585 "This command creates a directory, setting the initial permissions of the "
12586 "directory to C<mode>."
12590 #: ../fish/guestfish-actions.pod:3164 ../src/guestfs-actions.pod:4879
12592 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12593 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12598 #: ../fish/guestfish-actions.pod:3168
12599 msgid "See also L</mkdir>, L</umask>"
12603 #: ../fish/guestfish-actions.pod:3170
12608 #: ../fish/guestfish-actions.pod:3172
12616 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4895
12618 "Create a directory named C<path>, creating any parent directories as "
12619 "necessary. This is like the C<mkdir -p> shell command."
12623 #: ../fish/guestfish-actions.pod:3177
12628 #: ../fish/guestfish-actions.pod:3179
12631 " mkdtemp template\n"
12636 #: ../fish/guestfish-actions.pod:3181 ../src/guestfs-actions.pod:4908
12638 "This command creates a temporary directory. The C<template> parameter "
12639 "should be a full pathname for the temporary directory name with the final "
12640 "six characters being \"XXXXXX\"."
12644 #: ../fish/guestfish-actions.pod:3186 ../src/guestfs-actions.pod:4913
12646 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12647 "being suitable for Windows filesystems."
12651 #: ../fish/guestfish-actions.pod:3189 ../src/guestfs-actions.pod:4916
12652 msgid "The name of the temporary directory that was created is returned."
12656 #: ../fish/guestfish-actions.pod:3192 ../src/guestfs-actions.pod:4919
12657 msgid "The temporary directory is created with mode 0700 and is owned by root."
12661 #: ../fish/guestfish-actions.pod:3195 ../src/guestfs-actions.pod:4922
12663 "The caller is responsible for deleting the temporary directory and its "
12664 "contents after use."
12668 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4925
12669 msgid "See also: L<mkdtemp(3)>"
12673 #: ../fish/guestfish-actions.pod:3200
12678 #: ../fish/guestfish-actions.pod:3202
12681 " mke2fs-J fstype blocksize device journal\n"
12686 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4941
12688 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12689 "C<journal>. It is equivalent to the command:"
12693 #: ../fish/guestfish-actions.pod:3208 ../src/guestfs-actions.pod:4945
12696 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12701 #: ../fish/guestfish-actions.pod:3210
12702 msgid "See also L</mke2journal>."
12706 #: ../fish/guestfish-actions.pod:3212
12711 #: ../fish/guestfish-actions.pod:3214
12714 " mke2fs-JL fstype blocksize device label\n"
12719 #: ../fish/guestfish-actions.pod:3216 ../src/guestfs-actions.pod:4962
12721 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12722 "the journal labeled C<label>."
12726 #: ../fish/guestfish-actions.pod:3219
12727 msgid "See also L</mke2journal-L>."
12731 #: ../fish/guestfish-actions.pod:3221
12736 #: ../fish/guestfish-actions.pod:3223
12739 " mke2fs-JU fstype blocksize device uuid\n"
12744 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4980
12746 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12747 "the journal with UUID C<uuid>."
12751 #: ../fish/guestfish-actions.pod:3228
12752 msgid "See also L</mke2journal-U>."
12756 #: ../fish/guestfish-actions.pod:3230
12757 msgid "mke2journal"
12761 #: ../fish/guestfish-actions.pod:3232
12764 " mke2journal blocksize device\n"
12769 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4996
12771 "This creates an ext2 external journal on C<device>. It is equivalent to the "
12776 #: ../fish/guestfish-actions.pod:3237 ../src/guestfs-actions.pod:4999
12779 " mke2fs -O journal_dev -b blocksize device\n"
12784 #: ../fish/guestfish-actions.pod:3239
12785 msgid "mke2journal-L"
12789 #: ../fish/guestfish-actions.pod:3241
12792 " mke2journal-L blocksize label device\n"
12797 #: ../fish/guestfish-actions.pod:3243 ../src/guestfs-actions.pod:5013
12798 msgid "This creates an ext2 external journal on C<device> with label C<label>."
12802 #: ../fish/guestfish-actions.pod:3245
12803 msgid "mke2journal-U"
12807 #: ../fish/guestfish-actions.pod:3247
12810 " mke2journal-U blocksize uuid device\n"
12815 #: ../fish/guestfish-actions.pod:3249 ../src/guestfs-actions.pod:5027
12816 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12820 #: ../fish/guestfish-actions.pod:3251
12825 #: ../fish/guestfish-actions.pod:3253
12828 " mkfifo mode path\n"
12833 #: ../fish/guestfish-actions.pod:3255
12835 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12836 "is just a convenient wrapper around L</mknod>."
12840 #: ../fish/guestfish-actions.pod:3261
12845 #: ../fish/guestfish-actions.pod:3263
12848 " mkfs fstype device\n"
12853 #: ../fish/guestfish-actions.pod:3265 ../src/guestfs-actions.pod:5057
12855 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12856 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12860 #: ../fish/guestfish-actions.pod:3269
12865 #: ../fish/guestfish-actions.pod:3271
12868 " mkfs-b fstype blocksize device\n"
12873 #: ../fish/guestfish-actions.pod:3273
12875 "This call is similar to L</mkfs>, but it allows you to control the block "
12876 "size of the resulting filesystem. Supported block sizes depend on the "
12877 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12881 #: ../fish/guestfish-actions.pod:3278 ../fish/guestfish-actions.pod:3305 ../src/guestfs-actions.pod:5085 ../src/guestfs-actions.pod:5123
12883 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12888 #: ../fish/guestfish-actions.pod:3281
12890 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
12895 #: ../fish/guestfish-actions.pod:3288
12900 #: ../fish/guestfish-actions.pod:3290
12903 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] "
12909 #: ../fish/guestfish-actions.pod:3292 ../src/guestfs-actions.pod:5110
12911 "This function creates a filesystem on C<device>. The filesystem type is "
12912 "C<fstype>, for example C<ext3>."
12916 #: ../fish/guestfish-actions.pod:3299 ../src/guestfs-actions.pod:5117
12917 msgid "C<blocksize>"
12921 #: ../fish/guestfish-actions.pod:3301 ../src/guestfs-actions.pod:5119
12923 "The filesystem block size. Supported block sizes depend on the filesystem "
12924 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12929 #: ../fish/guestfish-actions.pod:3308 ../src/guestfs-actions.pod:5126
12930 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
12934 #: ../fish/guestfish-actions.pod:3310 ../src/guestfs-actions.pod:5128
12935 msgid "C<features>"
12939 #: ../fish/guestfish-actions.pod:3312 ../src/guestfs-actions.pod:5130
12940 msgid "This passes the I<-O> parameter to the external mkfs program."
12944 #: ../fish/guestfish-actions.pod:3314 ../src/guestfs-actions.pod:5132
12946 "For certain filesystem types, this allows extra filesystem features to be "
12947 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
12951 #: ../fish/guestfish-actions.pod:3318 ../src/guestfs-actions.pod:5136
12953 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
12958 #: ../fish/guestfish-actions.pod:3321 ../src/guestfs-actions.pod:5139
12963 #: ../fish/guestfish-actions.pod:3323 ../src/guestfs-actions.pod:5141
12965 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
12966 "sets the inode size (only for ext2/3/4 filesystems at present)."
12970 #: ../fish/guestfish-actions.pod:3326 ../src/guestfs-actions.pod:5144
12971 msgid "C<sectorsize>"
12975 #: ../fish/guestfish-actions.pod:3328 ../src/guestfs-actions.pod:5146
12977 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
12978 "sets sector size for ufs filesystem."
12982 #: ../fish/guestfish-actions.pod:3335
12983 msgid "mkmountpoint"
12987 #: ../fish/guestfish-actions.pod:3337
12990 " mkmountpoint exemptpath\n"
12995 #: ../fish/guestfish-actions.pod:3339
12997 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
12998 "to create extra mountpoints before mounting the first filesystem."
13002 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5189
13004 "These calls are I<only> necessary in some very limited circumstances, mainly "
13005 "the case where you want to mount a mix of unrelated and/or read-only "
13006 "filesystems together."
13010 #: ../fish/guestfish-actions.pod:3347 ../src/guestfs-actions.pod:5193
13012 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13013 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13014 "inside that. You can unpack this as follows in guestfish:"
13018 #: ../fish/guestfish-actions.pod:3352 ../src/guestfs-actions.pod:5198
13021 " add-ro Fedora-11-i686-Live.iso\n"
13023 " mkmountpoint /cd\n"
13024 " mkmountpoint /sqsh\n"
13025 " mkmountpoint /ext3fs\n"
13026 " mount /dev/sda /cd\n"
13027 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13028 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13033 #: ../fish/guestfish-actions.pod:3361 ../src/guestfs-actions.pod:5207
13034 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13038 #: ../fish/guestfish-actions.pod:3363
13040 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
13041 "unexpected errors if you try to mix these calls. It is safest to manually "
13042 "unmount filesystems and remove mountpoints after use."
13046 #: ../fish/guestfish-actions.pod:3367
13048 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
13049 "for this to work for manual mountpoints, you must ensure that the innermost "
13050 "mountpoints have the longest pathnames, as in the example code above."
13054 #: ../fish/guestfish-actions.pod:3372 ../src/guestfs-actions.pod:5218
13055 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13059 #: ../fish/guestfish-actions.pod:3374
13061 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
13062 "L</umount-all> to be called when the handle is closed which can also trigger "
13067 #: ../fish/guestfish-actions.pod:3378
13072 #: ../fish/guestfish-actions.pod:3380
13075 " mknod mode devmajor devminor path\n"
13080 #: ../fish/guestfish-actions.pod:3382 ../src/guestfs-actions.pod:5237
13082 "This call creates block or character special devices, or named pipes "
13087 #: ../fish/guestfish-actions.pod:3385 ../src/guestfs-actions.pod:5240
13089 "The C<mode> parameter should be the mode, using the standard constants. "
13090 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13091 "used when creating block and character special devices."
13095 #: ../fish/guestfish-actions.pod:3390
13097 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13098 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13099 "regular file). These constants are available in the standard Linux header "
13100 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
13101 "wrappers around this command which bitwise OR in the appropriate constant "
13106 #: ../fish/guestfish-actions.pod:3400
13111 #: ../fish/guestfish-actions.pod:3402
13114 " mknod-b mode devmajor devminor path\n"
13119 #: ../fish/guestfish-actions.pod:3404
13121 "This call creates a block device node called C<path> with mode C<mode> and "
13122 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13123 "wrapper around L</mknod>."
13127 #: ../fish/guestfish-actions.pod:3410
13132 #: ../fish/guestfish-actions.pod:3412
13135 " mknod-c mode devmajor devminor path\n"
13140 #: ../fish/guestfish-actions.pod:3414
13142 "This call creates a char device node called C<path> with mode C<mode> and "
13143 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13144 "wrapper around L</mknod>."
13148 #: ../fish/guestfish-actions.pod:3420
13153 #: ../fish/guestfish-actions.pod:3422
13161 #: ../fish/guestfish-actions.pod:3424 ../src/guestfs-actions.pod:5303
13162 msgid "Create a swap partition on C<device>."
13166 #: ../fish/guestfish-actions.pod:3426
13171 #: ../fish/guestfish-actions.pod:3428
13174 " mkswap-L label device\n"
13179 #: ../fish/guestfish-actions.pod:3430 ../src/guestfs-actions.pod:5316
13180 msgid "Create a swap partition on C<device> with label C<label>."
13184 #: ../fish/guestfish-actions.pod:3432 ../src/guestfs-actions.pod:5318
13186 "Note that you cannot attach a swap label to a block device "
13187 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
13188 "the kernel or swap tools."
13192 #: ../fish/guestfish-actions.pod:3436
13197 #: ../fish/guestfish-actions.pod:3438
13200 " mkswap-U uuid device\n"
13205 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5333
13206 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13210 #: ../fish/guestfish-actions.pod:3442
13211 msgid "mkswap-file"
13215 #: ../fish/guestfish-actions.pod:3444
13218 " mkswap-file path\n"
13223 #: ../fish/guestfish-actions.pod:3446 ../src/guestfs-actions.pod:5345
13224 msgid "Create a swap file."
13228 #: ../fish/guestfish-actions.pod:3448
13230 "This command just writes a swap file signature to an existing file. To "
13231 "create the file itself, use something like L</fallocate>."
13235 #: ../fish/guestfish-actions.pod:3451
13240 #: ../fish/guestfish-actions.pod:3453
13243 " modprobe modulename\n"
13248 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5360
13249 msgid "This loads a kernel module in the appliance."
13253 #: ../fish/guestfish-actions.pod:3457 ../src/guestfs-actions.pod:5362
13255 "The kernel module must have been whitelisted when libguestfs was built (see "
13256 "C<appliance/kmod.whitelist.in> in the source)."
13260 #: ../fish/guestfish-actions.pod:3460
13265 #: ../fish/guestfish-actions.pod:3462
13268 " mount device mountpoint\n"
13273 #: ../fish/guestfish-actions.pod:3464 ../src/guestfs-actions.pod:5376
13275 "Mount a guest disk at a position in the filesystem. Block devices are named "
13276 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13277 "those block devices contain partitions, they will have the usual names "
13278 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13282 #: ../fish/guestfish-actions.pod:3470 ../src/guestfs-actions.pod:5382
13284 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13285 "mounted on C</> before others can be mounted. Other filesystems can only be "
13286 "mounted on directories which already exist."
13290 #: ../fish/guestfish-actions.pod:3475 ../src/guestfs-actions.pod:5387
13292 "The mounted filesystem is writable, if we have sufficient permissions on the "
13293 "underlying device."
13297 #: ../fish/guestfish-actions.pod:3478
13299 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13300 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13301 "problems for users. If your program might need to work with older versions "
13302 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13303 "first parameter if you don't want any options)."
13307 #: ../fish/guestfish-actions.pod:3485
13312 #: ../fish/guestfish-actions.pod:3487
13315 " mount-9p mounttag mountpoint [options:..]\n"
13320 #: ../fish/guestfish-actions.pod:3489 ../src/guestfs-actions.pod:5416
13322 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13327 #: ../fish/guestfish-actions.pod:3492 ../src/guestfs-actions.pod:5419
13329 "If required, C<trans=virtio> will be automatically added to the options. "
13330 "Any other options required can be passed in the optional C<options> "
13335 #: ../fish/guestfish-actions.pod:3498
13340 #: ../fish/guestfish-actions.pod:3500
13343 " mount-loop file mountpoint\n"
13348 #: ../fish/guestfish-actions.pod:3502 ../src/guestfs-actions.pod:5458
13350 "This command lets you mount C<file> (a filesystem image in a file) on a "
13351 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13356 #: ../fish/guestfish-actions.pod:3506
13357 msgid "mount-options"
13361 #: ../fish/guestfish-actions.pod:3508
13364 " mount-options options device mountpoint\n"
13369 #: ../fish/guestfish-actions.pod:3510
13371 "This is the same as the L</mount> command, but it allows you to set the "
13372 "mount options as for the L<mount(8)> I<-o> flag."
13376 #: ../fish/guestfish-actions.pod:3514 ../src/guestfs-actions.pod:5478
13378 "If the C<options> parameter is an empty string, then no options are passed "
13379 "(all options default to whatever the filesystem uses)."
13383 #: ../fish/guestfish-actions.pod:3518
13388 #: ../fish/guestfish-actions.pod:3520
13391 " mount-ro device mountpoint\n"
13396 #: ../fish/guestfish-actions.pod:3522
13398 "This is the same as the L</mount> command, but it mounts the filesystem with "
13399 "the read-only (I<-o ro>) flag."
13403 #: ../fish/guestfish-actions.pod:3525
13408 #: ../fish/guestfish-actions.pod:3527
13411 " mount-vfs options vfstype device mountpoint\n"
13416 #: ../fish/guestfish-actions.pod:3529
13418 "This is the same as the L</mount> command, but it allows you to set both the "
13419 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13423 #: ../fish/guestfish-actions.pod:3533
13424 msgid "mountpoints"
13428 #: ../fish/guestfish-actions.pod:3535
13436 #: ../fish/guestfish-actions.pod:3537
13438 "This call is similar to L</mounts>. That call returns a list of devices. "
13439 "This one returns a hash table (map) of device name to directory where the "
13440 "device is mounted."
13444 #: ../fish/guestfish-actions.pod:3541
13449 #: ../fish/guestfish-actions.pod:3543
13457 #: ../fish/guestfish-actions.pod:3545 ../src/guestfs-actions.pod:5539
13459 "This returns the list of currently mounted filesystems. It returns the list "
13460 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13464 #: ../fish/guestfish-actions.pod:3548 ../src/guestfs-actions.pod:5542
13465 msgid "Some internal mounts are not shown."
13469 #: ../fish/guestfish-actions.pod:3550
13470 msgid "See also: L</mountpoints>"
13474 #: ../fish/guestfish-actions.pod:3552
13479 #: ../fish/guestfish-actions.pod:3554
13487 #: ../fish/guestfish-actions.pod:3556 ../src/guestfs-actions.pod:5559
13489 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13490 "destination filename or destination directory."
13494 #: ../fish/guestfish-actions.pod:3559
13495 msgid "ntfs-3g-probe"
13499 #: ../fish/guestfish-actions.pod:3561
13502 " ntfs-3g-probe true|false device\n"
13507 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5573
13509 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13510 "C<device> for mountability. (Not all NTFS volumes can be mounted "
13511 "read-write, and some cannot be mounted at all)."
13515 #: ../fish/guestfish-actions.pod:3567 ../src/guestfs-actions.pod:5577
13517 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13518 "can be mounted read-write. Set it to false if you want to test if the "
13519 "volume can be mounted read-only."
13523 #: ../fish/guestfish-actions.pod:3571 ../src/guestfs-actions.pod:5581
13525 "The return value is an integer which C<0> if the operation would succeed, or "
13526 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13530 #: ../fish/guestfish-actions.pod:3575
13535 #: ../fish/guestfish-actions.pod:3577
13538 " ntfsresize device\n"
13543 #: ../fish/guestfish-actions.pod:3579 ../fish/guestfish-actions.pod:3603 ../src/guestfs-actions.pod:5602 ../src/guestfs-actions.pod:5634
13545 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13546 "size of the underlying device."
13550 #: ../fish/guestfish-actions.pod:3582 ../src/guestfs-actions.pod:5605
13552 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13553 "consistency check (for safety). You have to boot into Windows to perform "
13554 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13555 "resize filesystems which have been marked in this way. So in effect it is "
13556 "not possible to call ntfsresize multiple times on a single filesystem "
13557 "without booting into Windows between each resize."
13561 #: ../fish/guestfish-actions.pod:3590 ../fish/guestfish-actions.pod:3629 ../src/guestfs-actions.pod:5613 ../src/guestfs-actions.pod:5660
13562 msgid "See also L<ntfsresize(8)>."
13566 #: ../fish/guestfish-actions.pod:3592 ../fish/guestfish-actions.pod:3640
13568 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13573 #: ../fish/guestfish-actions.pod:3599
13574 msgid "ntfsresize-opts"
13578 #: ../fish/guestfish-actions.pod:3601
13581 " ntfsresize-opts device [size:N] [force:true|false]\n"
13586 #: ../fish/guestfish-actions.pod:3612 ../src/guestfs-actions.pod:5643
13588 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13589 "resized to fit the container (eg. partition)."
13593 #: ../fish/guestfish-actions.pod:3615 ../src/guestfs-actions.pod:5646
13598 #: ../fish/guestfish-actions.pod:3617 ../src/guestfs-actions.pod:5648
13600 "If this option is true, then force the resize of the filesystem even if the "
13601 "filesystem is marked as requiring a consistency check."
13605 #: ../fish/guestfish-actions.pod:3620
13607 "After the resize operation, the filesystem is always marked as requiring a "
13608 "consistency check (for safety). You have to boot into Windows to perform "
13609 "this check and clear this condition. If you I<don't> set the C<force> "
13610 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13611 "a single filesystem without booting into Windows between each resize."
13615 #: ../fish/guestfish-actions.pod:3633
13616 msgid "ntfsresize-size"
13620 #: ../fish/guestfish-actions.pod:3635
13623 " ntfsresize-size device size\n"
13628 #: ../fish/guestfish-actions.pod:3637
13630 "This command is the same as L</ntfsresize> except that it allows you to "
13631 "specify the new size (in bytes) explicitly."
13635 #: ../fish/guestfish-actions.pod:3647
13640 #: ../fish/guestfish-actions.pod:3649
13643 " part-add device prlogex startsect endsect\n"
13648 #: ../fish/guestfish-actions.pod:3651
13650 "This command adds a partition to C<device>. If there is no partition table "
13651 "on the device, call L</part-init> first."
13655 #: ../fish/guestfish-actions.pod:3654 ../src/guestfs-actions.pod:5721
13657 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13658 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13659 "C<logical>) and C<e> (or C<extended>) partition types."
13663 #: ../fish/guestfish-actions.pod:3659 ../src/guestfs-actions.pod:5726
13665 "C<startsect> and C<endsect> are the start and end of the partition in "
13666 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13667 "from the end of the disk (C<-1> is the last sector)."
13671 #: ../fish/guestfish-actions.pod:3663
13673 "Creating a partition which covers the whole disk is not so easy. Use "
13674 "L</part-disk> to do that."
13678 #: ../fish/guestfish-actions.pod:3666
13683 #: ../fish/guestfish-actions.pod:3668
13686 " part-del device partnum\n"
13691 #: ../fish/guestfish-actions.pod:3670 ../src/guestfs-actions.pod:5744
13692 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13696 #: ../fish/guestfish-actions.pod:3672 ../src/guestfs-actions.pod:5746
13698 "Note that in the case of MBR partitioning, deleting an extended partition "
13699 "also deletes any logical partitions it contains."
13703 #: ../fish/guestfish-actions.pod:3676
13708 #: ../fish/guestfish-actions.pod:3678
13711 " part-disk device parttype\n"
13716 #: ../fish/guestfish-actions.pod:3680
13718 "This command is simply a combination of L</part-init> followed by "
13719 "L</part-add> to create a single primary partition covering the whole disk."
13723 #: ../fish/guestfish-actions.pod:3684
13725 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13726 "possible values are described in L</part-init>."
13730 #: ../fish/guestfish-actions.pod:3687
13731 msgid "part-get-bootable"
13735 #: ../fish/guestfish-actions.pod:3689
13738 " part-get-bootable device partnum\n"
13743 #: ../fish/guestfish-actions.pod:3691 ../src/guestfs-actions.pod:5779
13745 "This command returns true if the partition C<partnum> on C<device> has the "
13746 "bootable flag set."
13750 #: ../fish/guestfish-actions.pod:3694
13751 msgid "See also L</part-set-bootable>."
13755 #: ../fish/guestfish-actions.pod:3696
13756 msgid "part-get-mbr-id"
13760 #: ../fish/guestfish-actions.pod:3698
13763 " part-get-mbr-id device partnum\n"
13768 #: ../fish/guestfish-actions.pod:3700 ../src/guestfs-actions.pod:5795
13770 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13771 "partition C<partnum>."
13775 #: ../fish/guestfish-actions.pod:3703 ../fish/guestfish-actions.pod:3847
13777 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
13778 "undefined results for other partition table types (see "
13779 "L</part-get-parttype>)."
13783 #: ../fish/guestfish-actions.pod:3707
13784 msgid "part-get-parttype"
13788 #: ../fish/guestfish-actions.pod:3709
13791 " part-get-parttype device\n"
13796 #: ../fish/guestfish-actions.pod:3711 ../src/guestfs-actions.pod:5812
13798 "This command examines the partition table on C<device> and returns the "
13799 "partition table type (format) being used."
13803 #: ../fish/guestfish-actions.pod:3714
13805 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13806 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13807 "possible, although unusual. See L</part-init> for a full list."
13811 #: ../fish/guestfish-actions.pod:3719
13816 #: ../fish/guestfish-actions.pod:3721
13819 " part-init device parttype\n"
13824 #: ../fish/guestfish-actions.pod:3723 ../src/guestfs-actions.pod:5832
13826 "This creates an empty partition table on C<device> of one of the partition "
13827 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13828 "(for large disks)."
13832 #: ../fish/guestfish-actions.pod:3727
13834 "Initially there are no partitions. Following this, you should call "
13835 "L</part-add> for each partition required."
13839 #: ../fish/guestfish-actions.pod:3730 ../src/guestfs-actions.pod:5839
13840 msgid "Possible values for C<parttype> are:"
13844 #: ../fish/guestfish-actions.pod:3734 ../src/guestfs-actions.pod:5843
13849 #: ../fish/guestfish-actions.pod:3736 ../src/guestfs-actions.pod:5845
13854 #: ../fish/guestfish-actions.pod:3738 ../src/guestfs-actions.pod:5847
13855 msgid "Intel EFI / GPT partition table."
13859 #: ../fish/guestfish-actions.pod:3740 ../src/guestfs-actions.pod:5849
13861 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13862 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13863 "the C<mbr> format."
13867 #: ../fish/guestfish-actions.pod:3744 ../src/guestfs-actions.pod:5853
13872 #: ../fish/guestfish-actions.pod:3746 ../src/guestfs-actions.pod:5855
13877 #: ../fish/guestfish-actions.pod:3748 ../src/guestfs-actions.pod:5857
13879 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13880 "Windows. This partition type will B<only> work for device sizes up to 2 "
13881 "TB. For large disks we recommend using C<gpt>."
13885 #: ../fish/guestfish-actions.pod:3755 ../src/guestfs-actions.pod:5864
13886 msgid "Other partition table types that may work but are not supported include:"
13890 #: ../fish/guestfish-actions.pod:3760 ../src/guestfs-actions.pod:5869
13895 #: ../fish/guestfish-actions.pod:3762 ../src/guestfs-actions.pod:5871
13896 msgid "AIX disk labels."
13900 #: ../fish/guestfish-actions.pod:3764 ../src/guestfs-actions.pod:5873
13905 #: ../fish/guestfish-actions.pod:3766 ../src/guestfs-actions.pod:5875
13910 #: ../fish/guestfish-actions.pod:3768 ../src/guestfs-actions.pod:5877
13911 msgid "Amiga \"Rigid Disk Block\" format."
13915 #: ../fish/guestfish-actions.pod:3770 ../src/guestfs-actions.pod:5879
13920 #: ../fish/guestfish-actions.pod:3772 ../src/guestfs-actions.pod:5881
13921 msgid "BSD disk labels."
13925 #: ../fish/guestfish-actions.pod:3774 ../src/guestfs-actions.pod:5883
13930 #: ../fish/guestfish-actions.pod:3776 ../src/guestfs-actions.pod:5885
13931 msgid "DASD, used on IBM mainframes."
13935 #: ../fish/guestfish-actions.pod:3778 ../src/guestfs-actions.pod:5887
13940 #: ../fish/guestfish-actions.pod:3780 ../src/guestfs-actions.pod:5889
13941 msgid "MIPS/SGI volumes."
13945 #: ../fish/guestfish-actions.pod:3782 ../src/guestfs-actions.pod:5891
13950 #: ../fish/guestfish-actions.pod:3784 ../src/guestfs-actions.pod:5893
13951 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13955 #: ../fish/guestfish-actions.pod:3786 ../src/guestfs-actions.pod:5895
13960 #: ../fish/guestfish-actions.pod:3788 ../src/guestfs-actions.pod:5897
13961 msgid "NEC PC-98 format, common in Japan apparently."
13965 #: ../fish/guestfish-actions.pod:3790 ../src/guestfs-actions.pod:5899
13970 #: ../fish/guestfish-actions.pod:3792 ../src/guestfs-actions.pod:5901
13971 msgid "Sun disk labels."
13975 #: ../fish/guestfish-actions.pod:3796
13980 #: ../fish/guestfish-actions.pod:3798
13983 " part-list device\n"
13988 #: ../fish/guestfish-actions.pod:3800 ../src/guestfs-actions.pod:5915
13990 "This command parses the partition table on C<device> and returns the list of "
13991 "partitions found."
13995 #: ../fish/guestfish-actions.pod:3803 ../src/guestfs-actions.pod:5918
13996 msgid "The fields in the returned structure are:"
14000 #: ../fish/guestfish-actions.pod:3807 ../src/guestfs-actions.pod:5922
14001 msgid "B<part_num>"
14005 #: ../fish/guestfish-actions.pod:3809 ../src/guestfs-actions.pod:5924
14006 msgid "Partition number, counting from 1."
14010 #: ../fish/guestfish-actions.pod:3811 ../src/guestfs-actions.pod:5926
14011 msgid "B<part_start>"
14015 #: ../fish/guestfish-actions.pod:3813
14017 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14018 "the device's sector size, see L</blockdev-getss>."
14022 #: ../fish/guestfish-actions.pod:3816 ../src/guestfs-actions.pod:5931
14023 msgid "B<part_end>"
14027 #: ../fish/guestfish-actions.pod:3818 ../src/guestfs-actions.pod:5933
14028 msgid "End of the partition in bytes."
14032 #: ../fish/guestfish-actions.pod:3820 ../src/guestfs-actions.pod:5935
14033 msgid "B<part_size>"
14037 #: ../fish/guestfish-actions.pod:3822 ../src/guestfs-actions.pod:5937
14038 msgid "Size of the partition in bytes."
14042 #: ../fish/guestfish-actions.pod:3826
14043 msgid "part-set-bootable"
14047 #: ../fish/guestfish-actions.pod:3828
14050 " part-set-bootable device partnum true|false\n"
14055 #: ../fish/guestfish-actions.pod:3830 ../src/guestfs-actions.pod:5955
14057 "This sets the bootable flag on partition numbered C<partnum> on device "
14058 "C<device>. Note that partitions are numbered from 1."
14062 #: ../fish/guestfish-actions.pod:3833 ../src/guestfs-actions.pod:5958
14064 "The bootable flag is used by some operating systems (notably Windows) to "
14065 "determine which partition to boot from. It is by no means universally "
14070 #: ../fish/guestfish-actions.pod:3837
14071 msgid "part-set-mbr-id"
14075 #: ../fish/guestfish-actions.pod:3839
14078 " part-set-mbr-id device partnum idbyte\n"
14083 #: ../fish/guestfish-actions.pod:3841 ../src/guestfs-actions.pod:5974
14085 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14086 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14087 "documentation are in fact hexadecimal numbers, but usually documented "
14088 "without any leading \"0x\" which might be confusing."
14092 #: ../fish/guestfish-actions.pod:3851
14093 msgid "part-set-name"
14097 #: ../fish/guestfish-actions.pod:3853
14100 " part-set-name device partnum name\n"
14105 #: ../fish/guestfish-actions.pod:3855 ../src/guestfs-actions.pod:5996
14107 "This sets the partition name on partition numbered C<partnum> on device "
14108 "C<device>. Note that partitions are numbered from 1."
14112 #: ../fish/guestfish-actions.pod:3858 ../src/guestfs-actions.pod:5999
14114 "The partition name can only be set on certain types of partition table. "
14115 "This works on C<gpt> but not on C<mbr> partitions."
14119 #: ../fish/guestfish-actions.pod:3861
14120 msgid "part-to-dev"
14124 #: ../fish/guestfish-actions.pod:3863
14127 " part-to-dev partition\n"
14132 #: ../fish/guestfish-actions.pod:3865 ../src/guestfs-actions.pod:6012
14134 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14135 "partition number, returning the device name (eg. \"/dev/sdb\")."
14139 #: ../fish/guestfish-actions.pod:3869 ../fish/guestfish-actions.pod:3881
14141 "The named partition must exist, for example as a string returned from "
14142 "L</list-partitions>."
14146 #: ../fish/guestfish-actions.pod:3872
14147 msgid "See also L</part-to-partnum>."
14151 #: ../fish/guestfish-actions.pod:3874
14152 msgid "part-to-partnum"
14156 #: ../fish/guestfish-actions.pod:3876
14159 " part-to-partnum partition\n"
14164 #: ../fish/guestfish-actions.pod:3878 ../src/guestfs-actions.pod:6032
14166 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14167 "partition number (eg. C<1>)."
14171 #: ../fish/guestfish-actions.pod:3884
14172 msgid "See also L</part-to-dev>."
14176 #: ../fish/guestfish-actions.pod:3886
14177 msgid "ping-daemon"
14181 #: ../fish/guestfish-actions.pod:3888
14189 #: ../fish/guestfish-actions.pod:3890 ../src/guestfs-actions.pod:6049
14191 "This is a test probe into the guestfs daemon running inside the qemu "
14192 "subprocess. Calling this function checks that the daemon responds to the "
14193 "ping message, without affecting the daemon or attached block device(s) in "
14198 #: ../fish/guestfish-actions.pod:3895
14203 #: ../fish/guestfish-actions.pod:3897
14206 " pread path count offset\n"
14211 #: ../fish/guestfish-actions.pod:3899 ../src/guestfs-actions.pod:6067
14213 "This command lets you read part of a file. It reads C<count> bytes of the "
14214 "file, starting at C<offset>, from file C<path>."
14218 #: ../fish/guestfish-actions.pod:3902 ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6070 ../src/guestfs-actions.pod:6096
14220 "This may read fewer bytes than requested. For further details see the "
14221 "L<pread(2)> system call."
14225 #: ../fish/guestfish-actions.pod:3905
14226 msgid "See also L</pwrite>, L</pread-device>."
14230 #: ../fish/guestfish-actions.pod:3910
14231 msgid "pread-device"
14235 #: ../fish/guestfish-actions.pod:3912
14238 " pread-device device count offset\n"
14243 #: ../fish/guestfish-actions.pod:3914 ../src/guestfs-actions.pod:6093
14245 "This command lets you read part of a file. It reads C<count> bytes of "
14246 "C<device>, starting at C<offset>."
14250 #: ../fish/guestfish-actions.pod:3920
14251 msgid "See also L</pread>."
14255 #: ../fish/guestfish-actions.pod:3925
14260 #: ../fish/guestfish-actions.pod:3927
14263 " pvcreate device\n"
14268 #: ../fish/guestfish-actions.pod:3929 ../src/guestfs-actions.pod:6116
14270 "This creates an LVM physical volume on the named C<device>, where C<device> "
14271 "should usually be a partition name such as C</dev/sda1>."
14275 #: ../fish/guestfish-actions.pod:3933
14280 #: ../fish/guestfish-actions.pod:3935
14283 " pvremove device\n"
14288 #: ../fish/guestfish-actions.pod:3937 ../src/guestfs-actions.pod:6130
14290 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14295 #: ../fish/guestfish-actions.pod:3940 ../src/guestfs-actions.pod:6133
14297 "The implementation uses the C<pvremove> command which refuses to wipe "
14298 "physical volumes that contain any volume groups, so you have to remove those "
14303 #: ../fish/guestfish-actions.pod:3944
14308 #: ../fish/guestfish-actions.pod:3946
14311 " pvresize device\n"
14316 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6147
14318 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14319 "the new size of the underlying device."
14323 #: ../fish/guestfish-actions.pod:3951
14324 msgid "pvresize-size"
14328 #: ../fish/guestfish-actions.pod:3953
14331 " pvresize-size device size\n"
14336 #: ../fish/guestfish-actions.pod:3955
14338 "This command is the same as L</pvresize> except that it allows you to "
14339 "specify the new size (in bytes) explicitly."
14343 #: ../fish/guestfish-actions.pod:3958
14348 #: ../fish/guestfish-actions.pod:3960
14356 #: ../fish/guestfish-actions.pod:3962 ../src/guestfs-actions.pod:6173
14358 "List all the physical volumes detected. This is the equivalent of the "
14359 "L<pvs(8)> command."
14363 #: ../fish/guestfish-actions.pod:3965 ../src/guestfs-actions.pod:6176
14365 "This returns a list of just the device names that contain PVs "
14366 "(eg. C</dev/sda2>)."
14370 #: ../fish/guestfish-actions.pod:3968
14371 msgid "See also L</pvs-full>."
14375 #: ../fish/guestfish-actions.pod:3970
14380 #: ../fish/guestfish-actions.pod:3972
14388 #: ../fish/guestfish-actions.pod:3974 ../src/guestfs-actions.pod:6192
14390 "List all the physical volumes detected. This is the equivalent of the "
14391 "L<pvs(8)> command. The \"full\" version includes all fields."
14395 #: ../fish/guestfish-actions.pod:3977
14400 #: ../fish/guestfish-actions.pod:3979
14408 #: ../fish/guestfish-actions.pod:3981 ../src/guestfs-actions.pod:6207
14409 msgid "This command returns the UUID of the LVM PV C<device>."
14413 #: ../fish/guestfish-actions.pod:3983
14418 #: ../fish/guestfish-actions.pod:3985
14421 " pwrite path content offset\n"
14426 #: ../fish/guestfish-actions.pod:3987 ../src/guestfs-actions.pod:6223
14428 "This command writes to part of a file. It writes the data buffer C<content> "
14429 "to the file C<path> starting at offset C<offset>."
14433 #: ../fish/guestfish-actions.pod:3990 ../src/guestfs-actions.pod:6226
14435 "This command implements the L<pwrite(2)> system call, and like that system "
14436 "call it may not write the full data requested. The return value is the "
14437 "number of bytes that were actually written to the file. This could even be "
14438 "0, although short writes are unlikely for regular files in ordinary "
14443 #: ../fish/guestfish-actions.pod:3996
14444 msgid "See also L</pread>, L</pwrite-device>."
14448 #: ../fish/guestfish-actions.pod:4001
14449 msgid "pwrite-device"
14453 #: ../fish/guestfish-actions.pod:4003
14456 " pwrite-device device content offset\n"
14461 #: ../fish/guestfish-actions.pod:4005 ../src/guestfs-actions.pod:6250
14463 "This command writes to part of a device. It writes the data buffer "
14464 "C<content> to C<device> starting at offset C<offset>."
14468 #: ../fish/guestfish-actions.pod:4008 ../src/guestfs-actions.pod:6253
14470 "This command implements the L<pwrite(2)> system call, and like that system "
14471 "call it may not write the full data requested (although short writes to disk "
14472 "devices and partitions are probably impossible with standard Linux kernels)."
14476 #: ../fish/guestfish-actions.pod:4013
14477 msgid "See also L</pwrite>."
14481 #: ../fish/guestfish-actions.pod:4018
14486 #: ../fish/guestfish-actions.pod:4020
14489 " read-file path\n"
14494 #: ../fish/guestfish-actions.pod:4022 ../src/guestfs-actions.pod:6274
14495 msgid "This calls returns the contents of the file C<path> as a buffer."
14499 #: ../fish/guestfish-actions.pod:4025
14501 "Unlike L</cat>, this function can correctly handle files that contain "
14502 "embedded ASCII NUL characters. However unlike L</download>, this function "
14503 "is limited in the total size of file that can be handled."
14507 #: ../fish/guestfish-actions.pod:4033
14512 #: ../fish/guestfish-actions.pod:4035
14515 " read-lines path\n"
14520 #: ../fish/guestfish-actions.pod:4039 ../src/guestfs-actions.pod:6299
14522 "The file contents are returned as a list of lines. Trailing C<LF> and "
14523 "C<CRLF> character sequences are I<not> returned."
14527 #: ../fish/guestfish-actions.pod:4042
14529 "Note that this function cannot correctly handle binary files (specifically, "
14530 "files containing C<\\0> character which is treated as end of line). For "
14531 "those you need to use the L</read-file> function which has a more complex "
14536 #: ../fish/guestfish-actions.pod:4047
14541 #: ../fish/guestfish-actions.pod:4049
14549 #: ../fish/guestfish-actions.pod:4051 ../src/guestfs-actions.pod:6319
14550 msgid "This returns the list of directory entries in directory C<dir>."
14554 #: ../fish/guestfish-actions.pod:4053 ../src/guestfs-actions.pod:6321
14556 "All entries in the directory are returned, including C<.> and C<..>. The "
14557 "entries are I<not> sorted, but returned in the same order as the underlying "
14562 #: ../fish/guestfish-actions.pod:4057 ../src/guestfs-actions.pod:6325
14564 "Also this call returns basic file type information about each file. The "
14565 "C<ftyp> field will contain one of the following characters:"
14569 #: ../fish/guestfish-actions.pod:4062 ../src/guestfs-actions.pod:6330
14574 #: ../fish/guestfish-actions.pod:4064 ../src/guestfs-actions.pod:6332
14575 msgid "Block special"
14579 #: ../fish/guestfish-actions.pod:4066 ../src/guestfs-actions.pod:6334
14584 #: ../fish/guestfish-actions.pod:4068 ../src/guestfs-actions.pod:6336
14585 msgid "Char special"
14589 #: ../fish/guestfish-actions.pod:4070 ../src/guestfs-actions.pod:6338
14594 #: ../fish/guestfish-actions.pod:4072 ../src/guestfs-actions.pod:6340
14599 #: ../fish/guestfish-actions.pod:4074 ../src/guestfs-actions.pod:6342
14604 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6344
14605 msgid "FIFO (named pipe)"
14609 #: ../fish/guestfish-actions.pod:4078 ../src/guestfs-actions.pod:6346
14614 #: ../fish/guestfish-actions.pod:4080 ../src/guestfs-actions.pod:6348
14615 msgid "Symbolic link"
14619 #: ../fish/guestfish-actions.pod:4082 ../src/guestfs-actions.pod:6350
14624 #: ../fish/guestfish-actions.pod:4084 ../src/guestfs-actions.pod:6352
14625 msgid "Regular file"
14629 #: ../fish/guestfish-actions.pod:4086 ../src/guestfs-actions.pod:6354
14634 #: ../fish/guestfish-actions.pod:4088 ../src/guestfs-actions.pod:6356
14639 #: ../fish/guestfish-actions.pod:4090 ../src/guestfs-actions.pod:6358
14644 #: ../fish/guestfish-actions.pod:4092 ../src/guestfs-actions.pod:6360
14645 msgid "Unknown file type"
14649 #: ../fish/guestfish-actions.pod:4094 ../src/guestfs-actions.pod:6362
14654 #: ../fish/guestfish-actions.pod:4096 ../src/guestfs-actions.pod:6364
14655 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14659 #: ../fish/guestfish-actions.pod:4101
14661 "This function is primarily intended for use by programs. To get a simple "
14662 "list of names, use L</ls>. To get a printable directory for human "
14663 "consumption, use L</ll>."
14667 #: ../fish/guestfish-actions.pod:4105
14672 #: ../fish/guestfish-actions.pod:4107
14680 #: ../fish/guestfish-actions.pod:4109 ../src/guestfs-actions.pod:6385
14681 msgid "This command reads the target of a symbolic link."
14685 #: ../fish/guestfish-actions.pod:4111
14686 msgid "readlinklist"
14690 #: ../fish/guestfish-actions.pod:4113
14693 " readlinklist path 'names ...'\n"
14698 #: ../fish/guestfish-actions.pod:4115 ../src/guestfs-actions.pod:6399
14700 "This call allows you to do a C<readlink> operation on multiple files, where "
14701 "all files are in the directory C<path>. C<names> is the list of files from "
14706 #: ../fish/guestfish-actions.pod:4119 ../src/guestfs-actions.pod:6403
14708 "On return you get a list of strings, with a one-to-one correspondence to the "
14709 "C<names> list. Each string is the value of the symbolic link."
14713 #: ../fish/guestfish-actions.pod:4123 ../src/guestfs-actions.pod:6407
14715 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14716 "result string is the empty string C<\"\">. However the whole operation is "
14717 "completed even if there were C<readlink(2)> errors, and so you can call this "
14718 "function with names where you don't know if they are symbolic links already "
14719 "(albeit slightly less efficient)."
14723 #: ../fish/guestfish-actions.pod:4130 ../src/guestfs-actions.pod:6414
14725 "This call is intended for programs that want to efficiently list a directory "
14726 "contents without making many round-trips. Very long directory listings "
14727 "might cause the protocol message size to be exceeded, causing this call to "
14728 "fail. The caller must split up such requests into smaller groups of names."
14732 #: ../fish/guestfish-actions.pod:4137
14737 #: ../fish/guestfish-actions.pod:4139
14745 #: ../fish/guestfish-actions.pod:4141 ../src/guestfs-actions.pod:6433
14747 "Return the canonicalized absolute pathname of C<path>. The returned path "
14748 "has no C<.>, C<..> or symbolic link path elements."
14752 #: ../fish/guestfish-actions.pod:4144
14753 msgid "removexattr"
14757 #: ../fish/guestfish-actions.pod:4146
14760 " removexattr xattr path\n"
14765 #: ../fish/guestfish-actions.pod:4148 ../src/guestfs-actions.pod:6448
14766 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
14770 #: ../fish/guestfish-actions.pod:4151
14771 msgid "See also: L</lremovexattr>, L<attr(5)>."
14775 #: ../fish/guestfish-actions.pod:4153
14780 #: ../fish/guestfish-actions.pod:4155
14783 " resize2fs device\n"
14788 #: ../fish/guestfish-actions.pod:4157 ../src/guestfs-actions.pod:6463
14790 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14791 "underlying device."
14795 #: ../fish/guestfish-actions.pod:4160
14797 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
14798 "before calling this command. For unknown reasons C<resize2fs> sometimes "
14799 "gives an error about this and sometimes not. In any case, it is always safe "
14800 "to call L</e2fsck-f> before calling this function."
14804 #: ../fish/guestfish-actions.pod:4166
14805 msgid "resize2fs-M"
14809 #: ../fish/guestfish-actions.pod:4168
14812 " resize2fs-M device\n"
14817 #: ../fish/guestfish-actions.pod:4170
14819 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14820 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14825 #: ../fish/guestfish-actions.pod:4174
14827 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14828 "and read the C<Block size> and C<Block count> values. These two numbers, "
14829 "multiplied together, give the resulting size of the minimal filesystem in "
14834 #: ../fish/guestfish-actions.pod:4179
14835 msgid "resize2fs-size"
14839 #: ../fish/guestfish-actions.pod:4181
14842 " resize2fs-size device size\n"
14847 #: ../fish/guestfish-actions.pod:4183
14849 "This command is the same as L</resize2fs> except that it allows you to "
14850 "specify the new size (in bytes) explicitly."
14854 #: ../fish/guestfish-actions.pod:4186
14859 #: ../fish/guestfish-actions.pod:4188
14867 #: ../fish/guestfish-actions.pod:4190 ../src/guestfs-actions.pod:6515
14868 msgid "Remove the single file C<path>."
14872 #: ../fish/guestfish-actions.pod:4192
14877 #: ../fish/guestfish-actions.pod:4194
14885 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6527
14887 "Remove the file or directory C<path>, recursively removing the contents if "
14888 "its a directory. This is like the C<rm -rf> shell command."
14892 #: ../fish/guestfish-actions.pod:4200
14897 #: ../fish/guestfish-actions.pod:4202
14905 #: ../fish/guestfish-actions.pod:4204 ../src/guestfs-actions.pod:6541
14906 msgid "Remove the single directory C<path>."
14910 #: ../fish/guestfish-actions.pod:4206
14911 msgid "rmmountpoint"
14915 #: ../fish/guestfish-actions.pod:4208
14918 " rmmountpoint exemptpath\n"
14923 #: ../fish/guestfish-actions.pod:4210
14925 "This calls removes a mountpoint that was previously created with "
14926 "L</mkmountpoint>. See L</mkmountpoint> for full details."
14930 #: ../fish/guestfish-actions.pod:4214
14931 msgid "scrub-device"
14935 #: ../fish/guestfish-actions.pod:4216
14938 " scrub-device device\n"
14943 #: ../fish/guestfish-actions.pod:4218 ../src/guestfs-actions.pod:6567
14945 "This command writes patterns over C<device> to make data retrieval more "
14950 #: ../fish/guestfish-actions.pod:4221 ../fish/guestfish-actions.pod:4233 ../fish/guestfish-actions.pod:4246 ../src/guestfs-actions.pod:6570 ../src/guestfs-actions.pod:6588 ../src/guestfs-actions.pod:6607
14952 "It is an interface to the L<scrub(1)> program. See that manual page for "
14957 #: ../fish/guestfish-actions.pod:4224
14962 #: ../fish/guestfish-actions.pod:4226
14965 " scrub-file file\n"
14970 #: ../fish/guestfish-actions.pod:4228 ../src/guestfs-actions.pod:6583
14972 "This command writes patterns over a file to make data retrieval more "
14977 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6586
14978 msgid "The file is I<removed> after scrubbing."
14982 #: ../fish/guestfish-actions.pod:4236
14983 msgid "scrub-freespace"
14987 #: ../fish/guestfish-actions.pod:4238
14990 " scrub-freespace dir\n"
14995 #: ../fish/guestfish-actions.pod:4240
14997 "This command creates the directory C<dir> and then fills it with files until "
14998 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
14999 "deletes them. The intention is to scrub any free space on the partition "
15000 "containing C<dir>."
15004 #: ../fish/guestfish-actions.pod:4249
15009 #: ../fish/guestfish-actions.pod:4251
15014 #: ../fish/guestfish-actions.pod:4253
15017 " set-append append\n"
15022 #: ../fish/guestfish-actions.pod:4255 ../src/guestfs-actions.pod:6620
15024 "This function is used to add additional options to the guest kernel command "
15029 #: ../fish/guestfish-actions.pod:4258 ../src/guestfs-actions.pod:6623
15031 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15032 "environment variable."
15036 #: ../fish/guestfish-actions.pod:4261 ../src/guestfs-actions.pod:6626
15038 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15039 "(libguestfs always adds a few of its own)."
15043 #: ../fish/guestfish-actions.pod:4264
15044 msgid "set-attach-method"
15048 #: ../fish/guestfish-actions.pod:4266
15049 msgid "attach-method"
15053 #: ../fish/guestfish-actions.pod:4268
15056 " set-attach-method attachmethod\n"
15061 #: ../fish/guestfish-actions.pod:4270 ../src/guestfs-actions.pod:6639
15063 "Set the method that libguestfs uses to connect to the back end guestfsd "
15064 "daemon. Possible methods are:"
15068 #: ../fish/guestfish-actions.pod:4275 ../src/guestfs-actions.pod:6644 ../src/guestfs.pod:2916
15069 msgid "C<appliance>"
15073 #: ../fish/guestfish-actions.pod:4277 ../src/guestfs-actions.pod:6646
15075 "Launch an appliance and connect to it. This is the ordinary method and the "
15080 #: ../fish/guestfish-actions.pod:4280 ../src/guestfs-actions.pod:6649
15081 msgid "C<unix:I<path>>"
15085 #: ../fish/guestfish-actions.pod:4282 ../src/guestfs-actions.pod:6651
15086 msgid "Connect to the Unix domain socket I<path>."
15090 #: ../fish/guestfish-actions.pod:4284 ../src/guestfs-actions.pod:6653
15092 "This method lets you connect to an existing daemon or (using virtio-serial) "
15093 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15094 "RUNNING DAEMONS>."
15098 #: ../fish/guestfish-actions.pod:4290
15099 msgid "set-autosync"
15103 #: ../fish/guestfish-actions.pod:4292
15108 #: ../fish/guestfish-actions.pod:4294
15111 " set-autosync true|false\n"
15116 #: ../fish/guestfish-actions.pod:4296 ../src/guestfs-actions.pod:6669
15118 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15119 "effort attempt to make filesystems consistent and synchronized when the "
15120 "handle is closed (also if the program exits without closing handles)."
15124 #: ../fish/guestfish-actions.pod:4301 ../src/guestfs-actions.pod:6674
15126 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15127 "disabled by default)."
15131 #: ../fish/guestfish-actions.pod:4304
15136 #: ../fish/guestfish-actions.pod:4306
15141 #: ../fish/guestfish-actions.pod:4308
15144 " set-direct true|false\n"
15149 #: ../fish/guestfish-actions.pod:4310 ../src/guestfs-actions.pod:6687
15151 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15152 "passed directly through to the appliance once it is launched."
15156 #: ../fish/guestfish-actions.pod:4314
15158 "One consequence of this is that log messages aren't caught by the library "
15159 "and handled by L</set-log-message-callback>, but go straight to stdout."
15163 #: ../fish/guestfish-actions.pod:4318 ../src/guestfs-actions.pod:6695
15164 msgid "You probably don't want to use this unless you know what you are doing."
15168 #: ../fish/guestfish-actions.pod:4321 ../src/guestfs-actions.pod:6698
15169 msgid "The default is disabled."
15173 #: ../fish/guestfish-actions.pod:4323
15174 msgid "set-e2label"
15178 #: ../fish/guestfish-actions.pod:4325
15181 " set-e2label device label\n"
15186 #: ../fish/guestfish-actions.pod:4327 ../src/guestfs-actions.pod:6711
15188 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15189 "C<label>. Filesystem labels are limited to 16 characters."
15193 #: ../fish/guestfish-actions.pod:4331
15195 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15196 "label on a filesystem."
15200 #: ../fish/guestfish-actions.pod:4334
15205 #: ../fish/guestfish-actions.pod:4336
15208 " set-e2uuid device uuid\n"
15213 #: ../fish/guestfish-actions.pod:4338 ../src/guestfs-actions.pod:6729
15215 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15216 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15217 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15221 #: ../fish/guestfish-actions.pod:4343
15223 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15224 "UUID of a filesystem."
15228 #: ../fish/guestfish-actions.pod:4346
15229 msgid "set-memsize"
15233 #: ../fish/guestfish-actions.pod:4348
15238 #: ../fish/guestfish-actions.pod:4350
15241 " set-memsize memsize\n"
15246 #: ../fish/guestfish-actions.pod:4352
15248 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15249 "This only has any effect if called before L</launch>."
15253 #: ../fish/guestfish-actions.pod:4356 ../src/guestfs-actions.pod:6751
15255 "You can also change this by setting the environment variable "
15256 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15260 #: ../fish/guestfish-actions.pod:4363
15261 msgid "set-network"
15265 #: ../fish/guestfish-actions.pod:4365
15270 #: ../fish/guestfish-actions.pod:4367
15273 " set-network true|false\n"
15278 #: ../fish/guestfish-actions.pod:4369 ../src/guestfs-actions.pod:6768
15280 "If C<network> is true, then the network is enabled in the libguestfs "
15281 "appliance. The default is false."
15285 #: ../fish/guestfish-actions.pod:4372 ../src/guestfs-actions.pod:6771
15287 "This affects whether commands are able to access the network (see "
15288 "L<guestfs(3)/RUNNING COMMANDS>)."
15292 #: ../fish/guestfish-actions.pod:4375
15293 msgid "You must call this before calling L</launch>, otherwise it has no effect."
15297 #: ../fish/guestfish-actions.pod:4378
15302 #: ../fish/guestfish-actions.pod:4382
15305 " set-path searchpath\n"
15310 #: ../fish/guestfish-actions.pod:4384 ../src/guestfs-actions.pod:6787
15311 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15315 #: ../fish/guestfish-actions.pod:4386 ../src/guestfs-actions.pod:6789
15317 "The default is C<$libdir/guestfs> unless overridden by setting "
15318 "C<LIBGUESTFS_PATH> environment variable."
15322 #: ../fish/guestfish-actions.pod:4389 ../src/guestfs-actions.pod:6792
15323 msgid "Setting C<path> to C<NULL> restores the default path."
15327 #: ../fish/guestfish-actions.pod:4391
15332 #: ../fish/guestfish-actions.pod:4393
15337 #: ../fish/guestfish-actions.pod:4395
15340 " set-pgroup true|false\n"
15345 #: ../fish/guestfish-actions.pod:4397 ../src/guestfs-actions.pod:6804
15347 "If C<pgroup> is true, child processes are placed into their own process "
15352 #: ../fish/guestfish-actions.pod:4400 ../src/guestfs-actions.pod:6807
15354 "The practical upshot of this is that signals like C<SIGINT> (from users "
15355 "pressing C<^C>) won't be received by the child process."
15359 #: ../fish/guestfish-actions.pod:4403 ../src/guestfs-actions.pod:6810
15361 "The default for this flag is false, because usually you want C<^C> to kill "
15366 #: ../fish/guestfish-actions.pod:4406
15371 #: ../fish/guestfish-actions.pod:4408
15376 #: ../fish/guestfish-actions.pod:4410
15384 #: ../fish/guestfish-actions.pod:4412 ../src/guestfs-actions.pod:6823
15385 msgid "Set the qemu binary that we will use."
15389 #: ../fish/guestfish-actions.pod:4414 ../src/guestfs-actions.pod:6825
15390 msgid "The default is chosen when the library was compiled by the configure script."
15394 #: ../fish/guestfish-actions.pod:4417 ../src/guestfs-actions.pod:6828
15396 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15401 #: ../fish/guestfish-actions.pod:4420 ../src/guestfs-actions.pod:6831
15402 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15406 #: ../fish/guestfish-actions.pod:4422 ../src/guestfs-actions.pod:6833
15408 "Note that you should call this function as early as possible after creating "
15409 "the handle. This is because some pre-launch operations depend on testing "
15410 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15411 "don't retest features, and so you might see inconsistent results. Using the "
15412 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15413 "the qemu binary at the same time as the handle is created."
15417 #: ../fish/guestfish-actions.pod:4430
15418 msgid "set-recovery-proc"
15422 #: ../fish/guestfish-actions.pod:4432
15423 msgid "recovery-proc"
15427 #: ../fish/guestfish-actions.pod:4434
15430 " set-recovery-proc true|false\n"
15435 #: ../fish/guestfish-actions.pod:4436
15437 "If this is called with the parameter C<false> then L</launch> does not "
15438 "create a recovery process. The purpose of the recovery process is to stop "
15439 "runaway qemu processes in the case where the main program aborts abruptly."
15443 #: ../fish/guestfish-actions.pod:4441
15445 "This only has any effect if called before L</launch>, and the default is "
15450 #: ../fish/guestfish-actions.pod:4444 ../src/guestfs-actions.pod:6859
15452 "About the only time when you would want to disable this is if the main "
15453 "process will fork itself into the background (\"daemonize\" itself). In "
15454 "this case the recovery process thinks that the main program has disappeared "
15455 "and so kills qemu, which is not very helpful."
15459 #: ../fish/guestfish-actions.pod:4450
15460 msgid "set-selinux"
15464 #: ../fish/guestfish-actions.pod:4452
15469 #: ../fish/guestfish-actions.pod:4454
15472 " set-selinux true|false\n"
15477 #: ../fish/guestfish-actions.pod:4456 ../src/guestfs-actions.pod:6875
15479 "This sets the selinux flag that is passed to the appliance at boot time. "
15480 "The default is C<selinux=0> (disabled)."
15484 #: ../fish/guestfish-actions.pod:4459 ../src/guestfs-actions.pod:6878
15486 "Note that if SELinux is enabled, it is always in Permissive mode "
15487 "(C<enforcing=0>)."
15491 #: ../fish/guestfish-actions.pod:4465
15496 #: ../fish/guestfish-actions.pod:4467
15501 #: ../fish/guestfish-actions.pod:4469
15509 #: ../fish/guestfish-actions.pod:4471 ../src/guestfs-actions.pod:6894
15511 "Change the number of virtual CPUs assigned to the appliance. The default is "
15512 "C<1>. Increasing this may improve performance, though often it has no "
15517 #: ../fish/guestfish-actions.pod:4475
15518 msgid "This function must be called before L</launch>."
15522 #: ../fish/guestfish-actions.pod:4477
15527 #: ../fish/guestfish-actions.pod:4479
15532 #: ../fish/guestfish-actions.pod:4481
15535 " set-trace true|false\n"
15540 #: ../fish/guestfish-actions.pod:4483 ../src/guestfs-actions.pod:6910
15542 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15543 "return values are traced."
15547 #: ../fish/guestfish-actions.pod:4486 ../src/guestfs-actions.pod:6913
15549 "If you want to trace C API calls into libguestfs (and other libraries) then "
15550 "possibly a better way is to use the external ltrace(1) command."
15554 #: ../fish/guestfish-actions.pod:4490 ../src/guestfs-actions.pod:6917
15556 "Command traces are disabled unless the environment variable "
15557 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15561 #: ../fish/guestfish-actions.pod:4493
15563 "Trace messages are normally sent to C<stderr>, unless you register a "
15564 "callback to send them somewhere else (see L</set-event-callback>)."
15568 #: ../fish/guestfish-actions.pod:4497
15569 msgid "set-verbose"
15573 #: ../fish/guestfish-actions.pod:4499
15578 #: ../fish/guestfish-actions.pod:4501
15581 " set-verbose true|false\n"
15586 #: ../fish/guestfish-actions.pod:4503 ../src/guestfs-actions.pod:6934
15587 msgid "If C<verbose> is true, this turns on verbose messages."
15591 #: ../fish/guestfish-actions.pod:4505 ../src/guestfs-actions.pod:6936
15593 "Verbose messages are disabled unless the environment variable "
15594 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15598 #: ../fish/guestfish-actions.pod:4508
15600 "Verbose messages are normally sent to C<stderr>, unless you register a "
15601 "callback to send them somewhere else (see L</set-event-callback>)."
15605 #: ../fish/guestfish-actions.pod:4512
15610 #: ../fish/guestfish-actions.pod:4514
15613 " setcon context\n"
15618 #: ../fish/guestfish-actions.pod:4516 ../src/guestfs-actions.pod:6953
15620 "This sets the SELinux security context of the daemon to the string "
15625 #: ../fish/guestfish-actions.pod:4519 ../src/guestfs-actions.pod:6956
15626 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15630 #: ../fish/guestfish-actions.pod:4521
15635 #: ../fish/guestfish-actions.pod:4523
15638 " setxattr xattr val vallen path\n"
15643 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6971
15645 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15646 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15650 #: ../fish/guestfish-actions.pod:4529
15651 msgid "See also: L</lsetxattr>, L<attr(5)>."
15655 #: ../fish/guestfish-actions.pod:4531
15660 #: ../fish/guestfish-actions.pod:4533
15663 " sfdisk device cyls heads sectors 'lines ...'\n"
15668 #: ../fish/guestfish-actions.pod:4535 ../src/guestfs-actions.pod:6998
15670 "This is a direct interface to the L<sfdisk(8)> program for creating "
15671 "partitions on block devices."
15675 #: ../fish/guestfish-actions.pod:4538 ../src/guestfs-actions.pod:7001
15676 msgid "C<device> should be a block device, for example C</dev/sda>."
15680 #: ../fish/guestfish-actions.pod:4540 ../src/guestfs-actions.pod:7003
15682 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15683 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
15684 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15685 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15686 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15687 "the kernel) cannot work out the right geometry and you will need to tell it."
15691 #: ../fish/guestfish-actions.pod:4548 ../src/guestfs-actions.pod:7011
15693 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15694 "refer to the L<sfdisk(8)> manpage."
15698 #: ../fish/guestfish-actions.pod:4551 ../src/guestfs-actions.pod:7014
15700 "To create a single partition occupying the whole disk, you would pass "
15701 "C<lines> as a single element list, when the single element being the string "
15706 #: ../fish/guestfish-actions.pod:4555
15707 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15711 #: ../fish/guestfish-actions.pod:4558 ../fish/guestfish-actions.pod:4578 ../fish/guestfish-actions.pod:4597
15713 "I<This function is deprecated.> In new code, use the L</part_add> call "
15718 #: ../fish/guestfish-actions.pod:4565
15723 #: ../fish/guestfish-actions.pod:4567
15726 " sfdiskM device 'lines ...'\n"
15731 #: ../fish/guestfish-actions.pod:4569
15733 "This is a simplified interface to the L</sfdisk> command, where partition "
15734 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15735 "you don't need to specify the cyls, heads and sectors parameters which were "
15736 "rarely if ever used anyway."
15740 #: ../fish/guestfish-actions.pod:4575
15741 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15745 #: ../fish/guestfish-actions.pod:4585
15750 #: ../fish/guestfish-actions.pod:4587
15753 " sfdisk-N device partnum cyls heads sectors line\n"
15758 #: ../fish/guestfish-actions.pod:4589 ../src/guestfs-actions.pod:7070
15760 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15761 "(note: C<n> counts from 1)."
15765 #: ../fish/guestfish-actions.pod:4592
15767 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15768 "cyls/heads/sectors parameters."
15772 #: ../fish/guestfish-actions.pod:4595
15773 msgid "See also: L</part-add>"
15777 #: ../fish/guestfish-actions.pod:4604
15778 msgid "sfdisk-disk-geometry"
15782 #: ../fish/guestfish-actions.pod:4606
15785 " sfdisk-disk-geometry device\n"
15790 #: ../fish/guestfish-actions.pod:4608
15792 "This displays the disk geometry of C<device> read from the partition table. "
15793 "Especially in the case where the underlying block device has been resized, "
15794 "this can be different from the kernel's idea of the geometry (see "
15795 "L</sfdisk-kernel-geometry>)."
15799 #: ../fish/guestfish-actions.pod:4613 ../fish/guestfish-actions.pod:4622 ../src/guestfs-actions.pod:7093 ../src/guestfs-actions.pod:7109
15800 msgid "The result is in human-readable format, and not designed to be parsed."
15804 #: ../fish/guestfish-actions.pod:4616
15805 msgid "sfdisk-kernel-geometry"
15809 #: ../fish/guestfish-actions.pod:4618
15812 " sfdisk-kernel-geometry device\n"
15817 #: ../fish/guestfish-actions.pod:4620 ../src/guestfs-actions.pod:7107
15818 msgid "This displays the kernel's idea of the geometry of C<device>."
15822 #: ../fish/guestfish-actions.pod:4625
15827 #: ../fish/guestfish-actions.pod:4627
15830 " sfdisk-l device\n"
15835 #: ../fish/guestfish-actions.pod:4629 ../src/guestfs-actions.pod:7130
15837 "This displays the partition table on C<device>, in the human-readable output "
15838 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15842 #: ../fish/guestfish-actions.pod:4633
15843 msgid "See also: L</part-list>"
15847 #: ../fish/guestfish-actions.pod:4635
15849 "I<This function is deprecated.> In new code, use the L</part_list> call "
15854 #: ../fish/guestfish-actions.pod:4642
15859 #: ../fish/guestfish-actions.pod:4644
15867 #: ../fish/guestfish-actions.pod:4646 ../src/guestfs-actions.pod:7147
15869 "This call runs a command from the guest filesystem via the guest's "
15874 #: ../fish/guestfish-actions.pod:4649
15875 msgid "This is like L</command>, but passes the command to:"
15879 #: ../fish/guestfish-actions.pod:4651 ../src/guestfs-actions.pod:7152
15882 " /bin/sh -c \"command\"\n"
15887 #: ../fish/guestfish-actions.pod:4653 ../src/guestfs-actions.pod:7154
15889 "Depending on the guest's shell, this usually results in wildcards being "
15890 "expanded, shell expressions being interpolated and so on."
15894 #: ../fish/guestfish-actions.pod:4657
15895 msgid "All the provisos about L</command> apply to this call."
15899 #: ../fish/guestfish-actions.pod:4659
15904 #: ../fish/guestfish-actions.pod:4661
15907 " sh-lines command\n"
15912 #: ../fish/guestfish-actions.pod:4663
15913 msgid "This is the same as L</sh>, but splits the result into a list of lines."
15917 #: ../fish/guestfish-actions.pod:4666
15918 msgid "See also: L</command-lines>"
15922 #: ../fish/guestfish-actions.pod:4668
15927 #: ../fish/guestfish-actions.pod:4670
15935 #: ../fish/guestfish-actions.pod:4672 ../src/guestfs-actions.pod:7188
15936 msgid "Sleep for C<secs> seconds."
15940 #: ../fish/guestfish-actions.pod:4674
15945 #: ../fish/guestfish-actions.pod:4676
15953 #: ../fish/guestfish-actions.pod:4680 ../src/guestfs-actions.pod:7202
15954 msgid "This is the same as the C<stat(2)> system call."
15958 #: ../fish/guestfish-actions.pod:4682
15963 #: ../fish/guestfish-actions.pod:4684
15971 #: ../fish/guestfish-actions.pod:4686 ../src/guestfs-actions.pod:7216
15973 "Returns file system statistics for any mounted file system. C<path> should "
15974 "be a file or directory in the mounted file system (typically it is the mount "
15975 "point itself, but it doesn't need to be)."
15979 #: ../fish/guestfish-actions.pod:4690 ../src/guestfs-actions.pod:7220
15980 msgid "This is the same as the C<statvfs(2)> system call."
15984 #: ../fish/guestfish-actions.pod:4692
15989 #: ../fish/guestfish-actions.pod:4694
15997 #: ../fish/guestfish-actions.pod:4696 ../src/guestfs-actions.pod:7234
15999 "This runs the L<strings(1)> command on a file and returns the list of "
16000 "printable strings found."
16004 #: ../fish/guestfish-actions.pod:4702
16009 #: ../fish/guestfish-actions.pod:4704
16012 " strings-e encoding path\n"
16017 #: ../fish/guestfish-actions.pod:4706
16019 "This is like the L</strings> command, but allows you to specify the encoding "
16020 "of strings that are looked for in the source file C<path>."
16024 #: ../fish/guestfish-actions.pod:4710 ../src/guestfs-actions.pod:7257
16025 msgid "Allowed encodings are:"
16029 #: ../fish/guestfish-actions.pod:4714 ../src/guestfs-actions.pod:7261
16034 #: ../fish/guestfish-actions.pod:4716
16036 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16037 "ISO-8859-X (this is what L</strings> uses)."
16041 #: ../fish/guestfish-actions.pod:4719 ../src/guestfs-actions.pod:7266
16046 #: ../fish/guestfish-actions.pod:4721 ../src/guestfs-actions.pod:7268
16047 msgid "Single 8-bit-byte characters."
16051 #: ../fish/guestfish-actions.pod:4723 ../src/guestfs-actions.pod:7270
16056 #: ../fish/guestfish-actions.pod:4725 ../src/guestfs-actions.pod:7272
16057 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16061 #: ../fish/guestfish-actions.pod:4728 ../src/guestfs-actions.pod:7275
16062 msgid "l (lower case letter L)"
16066 #: ../fish/guestfish-actions.pod:4730 ../src/guestfs-actions.pod:7277
16068 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16069 "examining binaries in Windows guests."
16073 #: ../fish/guestfish-actions.pod:4733 ../src/guestfs-actions.pod:7280
16078 #: ../fish/guestfish-actions.pod:4735 ../src/guestfs-actions.pod:7282
16079 msgid "32-bit big endian such as UCS-4BE."
16083 #: ../fish/guestfish-actions.pod:4737 ../src/guestfs-actions.pod:7284
16088 #: ../fish/guestfish-actions.pod:4739 ../src/guestfs-actions.pod:7286
16089 msgid "32-bit little endian such as UCS-4LE."
16093 #: ../fish/guestfish-actions.pod:4743 ../src/guestfs-actions.pod:7290
16094 msgid "The returned strings are transcoded to UTF-8."
16098 #: ../fish/guestfish-actions.pod:4748
16099 msgid "swapoff-device"
16103 #: ../fish/guestfish-actions.pod:4750
16106 " swapoff-device device\n"
16111 #: ../fish/guestfish-actions.pod:4752
16113 "This command disables the libguestfs appliance swap device or partition "
16114 "named C<device>. See L</swapon-device>."
16118 #: ../fish/guestfish-actions.pod:4756
16119 msgid "swapoff-file"
16123 #: ../fish/guestfish-actions.pod:4758
16126 " swapoff-file file\n"
16131 #: ../fish/guestfish-actions.pod:4760 ../src/guestfs-actions.pod:7321
16132 msgid "This command disables the libguestfs appliance swap on file."
16136 #: ../fish/guestfish-actions.pod:4762
16137 msgid "swapoff-label"
16141 #: ../fish/guestfish-actions.pod:4764
16144 " swapoff-label label\n"
16149 #: ../fish/guestfish-actions.pod:4766 ../src/guestfs-actions.pod:7333
16151 "This command disables the libguestfs appliance swap on labeled swap "
16156 #: ../fish/guestfish-actions.pod:4769
16157 msgid "swapoff-uuid"
16161 #: ../fish/guestfish-actions.pod:4771
16164 " swapoff-uuid uuid\n"
16169 #: ../fish/guestfish-actions.pod:4773 ../src/guestfs-actions.pod:7346
16171 "This command disables the libguestfs appliance swap partition with the given "
16176 #: ../fish/guestfish-actions.pod:4776
16177 msgid "swapon-device"
16181 #: ../fish/guestfish-actions.pod:4778
16184 " swapon-device device\n"
16189 #: ../fish/guestfish-actions.pod:4780
16191 "This command enables the libguestfs appliance to use the swap device or "
16192 "partition named C<device>. The increased memory is made available for all "
16193 "commands, for example those run using L</command> or L</sh>."
16197 #: ../fish/guestfish-actions.pod:4785 ../src/guestfs-actions.pod:7364
16199 "Note that you should not swap to existing guest swap partitions unless you "
16200 "know what you are doing. They may contain hibernation information, or other "
16201 "information that the guest doesn't want you to trash. You also risk leaking "
16202 "information about the host to the guest this way. Instead, attach a new "
16203 "host device to the guest and swap on that."
16207 #: ../fish/guestfish-actions.pod:4792
16208 msgid "swapon-file"
16212 #: ../fish/guestfish-actions.pod:4794
16215 " swapon-file file\n"
16220 #: ../fish/guestfish-actions.pod:4796
16221 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
16225 #: ../fish/guestfish-actions.pod:4799
16226 msgid "swapon-label"
16230 #: ../fish/guestfish-actions.pod:4801
16233 " swapon-label label\n"
16238 #: ../fish/guestfish-actions.pod:4803
16240 "This command enables swap to a labeled swap partition. See "
16241 "L</swapon-device> for other notes."
16245 #: ../fish/guestfish-actions.pod:4806
16246 msgid "swapon-uuid"
16250 #: ../fish/guestfish-actions.pod:4808
16253 " swapon-uuid uuid\n"
16258 #: ../fish/guestfish-actions.pod:4810
16260 "This command enables swap to a swap partition with the given UUID. See "
16261 "L</swapon-device> for other notes."
16265 #: ../fish/guestfish-actions.pod:4813
16270 #: ../fish/guestfish-actions.pod:4815
16278 #: ../fish/guestfish-actions.pod:4817 ../src/guestfs-actions.pod:7419
16280 "This syncs the disk, so that any writes are flushed through to the "
16281 "underlying disk image."
16285 #: ../fish/guestfish-actions.pod:4820 ../src/guestfs-actions.pod:7422
16287 "You should always call this if you have modified a disk image, before "
16288 "closing the handle."
16292 #: ../fish/guestfish-actions.pod:4823
16297 #: ../fish/guestfish-actions.pod:4825
16305 #: ../fish/guestfish-actions.pod:4827 ../src/guestfs-actions.pod:7435
16306 msgid "This command returns up to the last 10 lines of a file as a list of strings."
16310 #: ../fish/guestfish-actions.pod:4833
16315 #: ../fish/guestfish-actions.pod:4835
16318 " tail-n nrlines path\n"
16323 #: ../fish/guestfish-actions.pod:4837 ../src/guestfs-actions.pod:7454
16325 "If the parameter C<nrlines> is a positive number, this returns the last "
16326 "C<nrlines> lines of the file C<path>."
16330 #: ../fish/guestfish-actions.pod:4840 ../src/guestfs-actions.pod:7457
16332 "If the parameter C<nrlines> is a negative number, this returns lines from "
16333 "the file C<path>, starting with the C<-nrlines>th line."
16337 #: ../fish/guestfish-actions.pod:4848
16342 #: ../fish/guestfish-actions.pod:4850
16345 " tar-in (tarfile|-) directory\n"
16350 #: ../fish/guestfish-actions.pod:4852 ../src/guestfs-actions.pod:7478
16352 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16353 "tar file) into C<directory>."
16357 #: ../fish/guestfish-actions.pod:4855
16358 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16362 #: ../fish/guestfish-actions.pod:4860
16367 #: ../fish/guestfish-actions.pod:4862
16370 " tar-out directory (tarfile|-)\n"
16375 #: ../fish/guestfish-actions.pod:4864 ../src/guestfs-actions.pod:7495
16377 "This command packs the contents of C<directory> and downloads it to local "
16382 #: ../fish/guestfish-actions.pod:4867
16383 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16387 #: ../fish/guestfish-actions.pod:4872
16392 #: ../fish/guestfish-actions.pod:4874
16395 " tgz-in (tarball|-) directory\n"
16400 #: ../fish/guestfish-actions.pod:4876 ../src/guestfs-actions.pod:7512
16402 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16403 "tar file) into C<directory>."
16407 #: ../fish/guestfish-actions.pod:4879
16408 msgid "To upload an uncompressed tarball, use L</tar-in>."
16412 #: ../fish/guestfish-actions.pod:4883
16417 #: ../fish/guestfish-actions.pod:4885
16420 " tgz-out directory (tarball|-)\n"
16425 #: ../fish/guestfish-actions.pod:4887 ../src/guestfs-actions.pod:7528
16427 "This command packs the contents of C<directory> and downloads it to local "
16432 #: ../fish/guestfish-actions.pod:4890
16433 msgid "To download an uncompressed tarball, use L</tar-out>."
16437 #: ../fish/guestfish-actions.pod:4894
16442 #: ../fish/guestfish-actions.pod:4896
16450 #: ../fish/guestfish-actions.pod:4898 ../src/guestfs-actions.pod:7543
16452 "Touch acts like the L<touch(1)> command. It can be used to update the "
16453 "timestamps on a file, or, if the file does not exist, to create a new "
16454 "zero-length file."
16458 #: ../fish/guestfish-actions.pod:4902 ../src/guestfs-actions.pod:7547
16460 "This command only works on regular files, and will fail on other file types "
16461 "such as directories, symbolic links, block special etc."
16465 #: ../fish/guestfish-actions.pod:4905
16470 #: ../fish/guestfish-actions.pod:4907
16478 #: ../fish/guestfish-actions.pod:4909 ../src/guestfs-actions.pod:7560
16480 "This command truncates C<path> to a zero-length file. The file must exist "
16485 #: ../fish/guestfish-actions.pod:4912
16486 msgid "truncate-size"
16490 #: ../fish/guestfish-actions.pod:4914
16493 " truncate-size path size\n"
16498 #: ../fish/guestfish-actions.pod:4916 ../src/guestfs-actions.pod:7574
16500 "This command truncates C<path> to size C<size> bytes. The file must exist "
16505 #: ../fish/guestfish-actions.pod:4919
16507 "If the current file size is less than C<size> then the file is extended to "
16508 "the required size with zero bytes. This creates a sparse file (ie. disk "
16509 "blocks are not allocated for the file until you write to it). To create a "
16510 "non-sparse file of zeroes, use L</fallocate64> instead."
16514 #: ../fish/guestfish-actions.pod:4925
16519 #: ../fish/guestfish-actions.pod:4927
16522 " tune2fs-l device\n"
16527 #: ../fish/guestfish-actions.pod:4929 ../src/guestfs-actions.pod:7593
16529 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16534 #: ../fish/guestfish-actions.pod:4932 ../src/guestfs-actions.pod:7596
16536 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16537 "for more details. The list of fields returned isn't clearly defined, and "
16538 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16539 "and the filesystem itself."
16543 #: ../fish/guestfish-actions.pod:4937
16548 #: ../fish/guestfish-actions.pod:4939
16551 " txz-in (tarball|-) directory\n"
16556 #: ../fish/guestfish-actions.pod:4941 ../src/guestfs-actions.pod:7616
16558 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16559 "tar file) into C<directory>."
16563 #: ../fish/guestfish-actions.pod:4946
16568 #: ../fish/guestfish-actions.pod:4948
16571 " txz-out directory (tarball|-)\n"
16576 #: ../fish/guestfish-actions.pod:4950 ../src/guestfs-actions.pod:7630
16578 "This command packs the contents of C<directory> and downloads it to local "
16579 "file C<tarball> (as an xz compressed tar archive)."
16583 #: ../fish/guestfish-actions.pod:4955
16588 #: ../fish/guestfish-actions.pod:4957
16596 #: ../fish/guestfish-actions.pod:4959 ../src/guestfs-actions.pod:7643
16598 "This function sets the mask used for creating new files and device nodes to "
16603 #: ../fish/guestfish-actions.pod:4962 ../src/guestfs-actions.pod:7646
16605 "Typical umask values would be C<022> which creates new files with "
16606 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16607 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16611 #: ../fish/guestfish-actions.pod:4967 ../src/guestfs-actions.pod:7651
16613 "The default umask is C<022>. This is important because it means that "
16614 "directories and device nodes will be created with C<0644> or C<0755> mode "
16615 "even if you specify C<0777>."
16619 #: ../fish/guestfish-actions.pod:4971
16620 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16624 #: ../fish/guestfish-actions.pod:4974 ../src/guestfs-actions.pod:7658
16625 msgid "This call returns the previous umask."
16629 #: ../fish/guestfish-actions.pod:4976
16634 #: ../fish/guestfish-actions.pod:4978
16639 #: ../fish/guestfish-actions.pod:4980
16642 " umount pathordevice\n"
16647 #: ../fish/guestfish-actions.pod:4982 ../src/guestfs-actions.pod:7670
16649 "This unmounts the given filesystem. The filesystem may be specified either "
16650 "by its mountpoint (path) or the device which contains the filesystem."
16654 #: ../fish/guestfish-actions.pod:4986
16659 #: ../fish/guestfish-actions.pod:4988
16660 msgid "unmount-all"
16664 #: ../fish/guestfish-actions.pod:4990
16672 #: ../fish/guestfish-actions.pod:4992 ../src/guestfs-actions.pod:7683
16673 msgid "This unmounts all mounted filesystems."
16677 #: ../fish/guestfish-actions.pod:4994 ../src/guestfs-actions.pod:7685
16678 msgid "Some internal mounts are not unmounted by this call."
16682 #: ../fish/guestfish-actions.pod:4996
16687 #: ../fish/guestfish-actions.pod:4998
16690 " upload (filename|-) remotefilename\n"
16695 #: ../fish/guestfish-actions.pod:5000 ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7698 ../src/guestfs-actions.pod:7722
16696 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16700 #: ../fish/guestfish-actions.pod:5005
16701 msgid "See also L</download>."
16705 #: ../fish/guestfish-actions.pod:5009
16706 msgid "upload-offset"
16710 #: ../fish/guestfish-actions.pod:5011
16713 " upload-offset (filename|-) remotefilename offset\n"
16718 #: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7725
16720 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
16721 "The intention is to overwrite parts of existing files or devices, although "
16722 "if a non-existant file is specified then it is created with a \"hole\" "
16723 "before C<offset>. The size of the data written is implicit in the size of "
16724 "the source C<filename>."
16728 #: ../fish/guestfish-actions.pod:5023
16730 "Note that there is no limit on the amount of data that can be uploaded with "
16731 "this call, unlike with L</pwrite>, and this call always writes the full "
16732 "amount unless an error occurs."
16736 #: ../fish/guestfish-actions.pod:5028
16737 msgid "See also L</upload>, L</pwrite>."
16741 #: ../fish/guestfish-actions.pod:5032
16746 #: ../fish/guestfish-actions.pod:5034
16749 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
16754 #: ../fish/guestfish-actions.pod:5036 ../src/guestfs-actions.pod:7758
16755 msgid "This command sets the timestamps of a file with nanosecond precision."
16759 #: ../fish/guestfish-actions.pod:5039 ../src/guestfs-actions.pod:7761
16761 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16766 #: ../fish/guestfish-actions.pod:5042 ../src/guestfs-actions.pod:7764
16768 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16769 "nanoseconds from the epoch."
16773 #: ../fish/guestfish-actions.pod:5045 ../src/guestfs-actions.pod:7767
16775 "If the C<*nsecs> field contains the special value C<-1> then the "
16776 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16777 "ignored in this case)."
16781 #: ../fish/guestfish-actions.pod:5049 ../src/guestfs-actions.pod:7771
16783 "If the C<*nsecs> field contains the special value C<-2> then the "
16784 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16789 #: ../fish/guestfish-actions.pod:5053
16794 #: ../fish/guestfish-actions.pod:5055
16802 #: ../fish/guestfish-actions.pod:5057 ../src/guestfs-actions.pod:7784
16803 msgid "Return the libguestfs version number that the program is linked against."
16807 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7787
16809 "Note that because of dynamic linking this is not necessarily the version of "
16810 "libguestfs that you compiled against. You can compile the program, and then "
16811 "at runtime dynamically link against a completely different C<libguestfs.so> "
16816 #: ../fish/guestfish-actions.pod:5065 ../src/guestfs-actions.pod:7792
16818 "This call was added in version C<1.0.58>. In previous versions of "
16819 "libguestfs there was no way to get the version number. From C code you can "
16820 "use dynamic linker functions to find out if this symbol exists (if it "
16821 "doesn't, then it's an earlier version)."
16825 #: ../fish/guestfish-actions.pod:5071 ../src/guestfs-actions.pod:7798
16827 "The call returns a structure with four elements. The first three (C<major>, "
16828 "C<minor> and C<release>) are numbers and correspond to the usual version "
16829 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16830 "but may be used for distro-specific information."
16834 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7804
16835 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
16839 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7807
16840 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16844 #: ../fish/guestfish-actions.pod:5082
16846 "I<Note:> Don't use this call to test for availability of features. In "
16847 "enterprise distributions we backport features from later versions into "
16848 "earlier versions, making this an unreliable way to test for features. Use "
16849 "L</available> instead."
16853 #: ../fish/guestfish-actions.pod:5088
16858 #: ../fish/guestfish-actions.pod:5090
16861 " vfs-label device\n"
16866 #: ../fish/guestfish-actions.pod:5092 ../src/guestfs-actions.pod:7827
16867 msgid "This returns the filesystem label of the filesystem on C<device>."
16871 #: ../fish/guestfish-actions.pod:5095 ../src/guestfs-actions.pod:7830
16872 msgid "If the filesystem is unlabeled, this returns the empty string."
16876 #: ../fish/guestfish-actions.pod:5097
16877 msgid "To find a filesystem from the label, use L</findfs-label>."
16881 #: ../fish/guestfish-actions.pod:5099
16886 #: ../fish/guestfish-actions.pod:5101
16889 " vfs-type device\n"
16894 #: ../fish/guestfish-actions.pod:5103 ../src/guestfs-actions.pod:7845
16896 "This command gets the filesystem type corresponding to the filesystem on "
16901 #: ../fish/guestfish-actions.pod:5106 ../src/guestfs-actions.pod:7848
16903 "For most filesystems, the result is the name of the Linux VFS module which "
16904 "would be used to mount this filesystem if you mounted it without specifying "
16905 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16909 #: ../fish/guestfish-actions.pod:5111
16914 #: ../fish/guestfish-actions.pod:5113
16917 " vfs-uuid device\n"
16922 #: ../fish/guestfish-actions.pod:5115 ../src/guestfs-actions.pod:7864
16923 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16927 #: ../fish/guestfish-actions.pod:5118 ../src/guestfs-actions.pod:7867
16928 msgid "If the filesystem does not have a UUID, this returns the empty string."
16932 #: ../fish/guestfish-actions.pod:5120
16933 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
16937 #: ../fish/guestfish-actions.pod:5122
16938 msgid "vg-activate"
16942 #: ../fish/guestfish-actions.pod:5124
16945 " vg-activate true|false 'volgroups ...'\n"
16950 #: ../fish/guestfish-actions.pod:5126 ../src/guestfs-actions.pod:7883
16952 "This command activates or (if C<activate> is false) deactivates all logical "
16953 "volumes in the listed volume groups C<volgroups>."
16957 #: ../fish/guestfish-actions.pod:5129 ../src/guestfs-actions.pod:7886
16958 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16962 #: ../fish/guestfish-actions.pod:5131 ../src/guestfs-actions.pod:7888
16964 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16965 "activated or deactivated."
16969 #: ../fish/guestfish-actions.pod:5134
16970 msgid "vg-activate-all"
16974 #: ../fish/guestfish-actions.pod:5136
16977 " vg-activate-all true|false\n"
16982 #: ../fish/guestfish-actions.pod:5138 ../src/guestfs-actions.pod:7901
16984 "This command activates or (if C<activate> is false) deactivates all logical "
16985 "volumes in all volume groups."
16989 #: ../fish/guestfish-actions.pod:5141 ../src/guestfs-actions.pod:7904
16990 msgid "This command is the same as running C<vgchange -a y|n>"
16994 #: ../fish/guestfish-actions.pod:5143
16999 #: ../fish/guestfish-actions.pod:5145
17002 " vgcreate volgroup 'physvols ...'\n"
17007 #: ../fish/guestfish-actions.pod:5147 ../src/guestfs-actions.pod:7917
17009 "This creates an LVM volume group called C<volgroup> from the non-empty list "
17010 "of physical volumes C<physvols>."
17014 #: ../fish/guestfish-actions.pod:5150
17019 #: ../fish/guestfish-actions.pod:5152
17022 " vglvuuids vgname\n"
17027 #: ../fish/guestfish-actions.pod:5154 ../src/guestfs-actions.pod:7930
17029 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
17030 "volumes created in this volume group."
17034 #: ../fish/guestfish-actions.pod:5157
17036 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
17037 "logical volumes and volume groups."
17041 #: ../fish/guestfish-actions.pod:5160
17042 msgid "See also L</vgpvuuids>."
17046 #: ../fish/guestfish-actions.pod:5162
17051 #: ../fish/guestfish-actions.pod:5164
17054 " vgpvuuids vgname\n"
17059 #: ../fish/guestfish-actions.pod:5166 ../src/guestfs-actions.pod:7950
17061 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
17062 "volumes that this volume group resides on."
17066 #: ../fish/guestfish-actions.pod:5169
17068 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
17069 "physical volumes and volume groups."
17073 #: ../fish/guestfish-actions.pod:5172
17074 msgid "See also L</vglvuuids>."
17078 #: ../fish/guestfish-actions.pod:5174
17083 #: ../fish/guestfish-actions.pod:5176
17086 " vgremove vgname\n"
17091 #: ../fish/guestfish-actions.pod:5178 ../src/guestfs-actions.pod:7970
17092 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17096 #: ../fish/guestfish-actions.pod:5180 ../src/guestfs-actions.pod:7972
17097 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
17101 #: ../fish/guestfish-actions.pod:5183
17106 #: ../fish/guestfish-actions.pod:5185
17109 " vgrename volgroup newvolgroup\n"
17114 #: ../fish/guestfish-actions.pod:5187 ../src/guestfs-actions.pod:7986
17115 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17119 #: ../fish/guestfish-actions.pod:5189
17124 #: ../fish/guestfish-actions.pod:5191
17132 #: ../fish/guestfish-actions.pod:5193 ../src/guestfs-actions.pod:7997
17134 "List all the volumes groups detected. This is the equivalent of the "
17135 "L<vgs(8)> command."
17139 #: ../fish/guestfish-actions.pod:5196 ../src/guestfs-actions.pod:8000
17141 "This returns a list of just the volume group names that were detected "
17142 "(eg. C<VolGroup00>)."
17146 #: ../fish/guestfish-actions.pod:5199
17147 msgid "See also L</vgs-full>."
17151 #: ../fish/guestfish-actions.pod:5201
17156 #: ../fish/guestfish-actions.pod:5203
17164 #: ../fish/guestfish-actions.pod:5205 ../src/guestfs-actions.pod:8016
17166 "List all the volumes groups detected. This is the equivalent of the "
17167 "L<vgs(8)> command. The \"full\" version includes all fields."
17171 #: ../fish/guestfish-actions.pod:5208
17176 #: ../fish/guestfish-actions.pod:5210
17184 #: ../fish/guestfish-actions.pod:5212 ../src/guestfs-actions.pod:8030
17186 "This rescans all block devices and rebuilds the list of LVM physical "
17187 "volumes, volume groups and logical volumes."
17191 #: ../fish/guestfish-actions.pod:5215
17196 #: ../fish/guestfish-actions.pod:5217
17204 #: ../fish/guestfish-actions.pod:5219 ../src/guestfs-actions.pod:8043
17205 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17209 #: ../fish/guestfish-actions.pod:5221
17214 #: ../fish/guestfish-actions.pod:5223
17222 #: ../fish/guestfish-actions.pod:5225 ../src/guestfs-actions.pod:8083
17224 "This command counts the characters in a file, using the C<wc -c> external "
17229 #: ../fish/guestfish-actions.pod:5228
17234 #: ../fish/guestfish-actions.pod:5230
17242 #: ../fish/guestfish-actions.pod:5232 ../src/guestfs-actions.pod:8096
17244 "This command counts the lines in a file, using the C<wc -l> external "
17249 #: ../fish/guestfish-actions.pod:5235
17254 #: ../fish/guestfish-actions.pod:5237
17262 #: ../fish/guestfish-actions.pod:5239 ../src/guestfs-actions.pod:8109
17264 "This command counts the words in a file, using the C<wc -w> external "
17269 #: ../fish/guestfish-actions.pod:5242
17274 #: ../fish/guestfish-actions.pod:5244
17277 " write path content\n"
17282 #: ../fish/guestfish-actions.pod:5246 ../src/guestfs-actions.pod:8124
17284 "This call creates a file called C<path>. The content of the file is the "
17285 "string C<content> (which can contain any 8 bit data)."
17289 #: ../fish/guestfish-actions.pod:5249
17290 msgid "See also L</write-append>."
17294 #: ../fish/guestfish-actions.pod:5254
17295 msgid "write-append"
17299 #: ../fish/guestfish-actions.pod:5256
17302 " write-append path content\n"
17307 #: ../fish/guestfish-actions.pod:5258 ../src/guestfs-actions.pod:8144
17309 "This call appends C<content> to the end of file C<path>. If C<path> does "
17310 "not exist, then a new file is created."
17314 #: ../fish/guestfish-actions.pod:5261
17315 msgid "See also L</write>."
17319 #: ../fish/guestfish-actions.pod:5266
17324 #: ../fish/guestfish-actions.pod:5268
17327 " write-file path content size\n"
17332 #: ../fish/guestfish-actions.pod:5270 ../src/guestfs-actions.pod:8171
17334 "This call creates a file called C<path>. The contents of the file is the "
17335 "string C<content> (which can contain any 8 bit data), with length C<size>."
17339 #: ../fish/guestfish-actions.pod:5274 ../src/guestfs-actions.pod:8175
17341 "As a special case, if C<size> is C<0> then the length is calculated using "
17342 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17346 #: ../fish/guestfish-actions.pod:5278 ../src/guestfs-actions.pod:8179
17348 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17349 "I<not> work, even if the length is specified."
17353 #: ../fish/guestfish-actions.pod:5284
17354 msgid "I<This function is deprecated.> In new code, use the L</write> call instead."
17358 #: ../fish/guestfish-actions.pod:5291
17363 #: ../fish/guestfish-actions.pod:5293
17366 " zegrep regex path\n"
17371 #: ../fish/guestfish-actions.pod:5295 ../src/guestfs-actions.pod:8196
17372 msgid "This calls the external C<zegrep> program and returns the matching lines."
17376 #: ../fish/guestfish-actions.pod:5301
17381 #: ../fish/guestfish-actions.pod:5303
17384 " zegrepi regex path\n"
17389 #: ../fish/guestfish-actions.pod:5305 ../src/guestfs-actions.pod:8215
17390 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
17394 #: ../fish/guestfish-actions.pod:5311
17399 #: ../fish/guestfish-actions.pod:5313
17407 #: ../fish/guestfish-actions.pod:5315 ../src/guestfs-actions.pod:8233
17408 msgid "This command writes zeroes over the first few blocks of C<device>."
17412 #: ../fish/guestfish-actions.pod:5317 ../src/guestfs-actions.pod:8235
17414 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17415 "securely wipe the device). It should be sufficient to remove any partition "
17416 "tables, filesystem superblocks and so on."
17420 #: ../fish/guestfish-actions.pod:5321 ../fish/guestfish-actions.pod:5336 ../src/guestfs-actions.pod:8239 ../src/guestfs-actions.pod:8265
17422 "If blocks are already zero, then this command avoids writing zeroes. This "
17423 "prevents the underlying device from becoming non-sparse or growing "
17428 #: ../fish/guestfish-actions.pod:5325
17429 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17433 #: ../fish/guestfish-actions.pod:5328
17434 msgid "zero-device"
17438 #: ../fish/guestfish-actions.pod:5330
17441 " zero-device device\n"
17446 #: ../fish/guestfish-actions.pod:5332
17448 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17449 "which just zeroes the first few blocks of a device."
17453 #: ../fish/guestfish-actions.pod:5340
17458 #: ../fish/guestfish-actions.pod:5342
17461 " zerofree device\n"
17466 #: ../fish/guestfish-actions.pod:5344 ../src/guestfs-actions.pod:8284
17468 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17469 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17470 "possible to compress the filesystem more effectively."
17474 #: ../fish/guestfish-actions.pod:5349 ../src/guestfs-actions.pod:8289
17475 msgid "You should B<not> run this program if the filesystem is mounted."
17479 #: ../fish/guestfish-actions.pod:5352 ../src/guestfs-actions.pod:8292
17481 "It is possible that using this program can damage the filesystem or data on "
17486 #: ../fish/guestfish-actions.pod:5355
17491 #: ../fish/guestfish-actions.pod:5357
17494 " zfgrep pattern path\n"
17499 #: ../fish/guestfish-actions.pod:5359 ../src/guestfs-actions.pod:8306
17500 msgid "This calls the external C<zfgrep> program and returns the matching lines."
17504 #: ../fish/guestfish-actions.pod:5365
17509 #: ../fish/guestfish-actions.pod:5367
17512 " zfgrepi pattern path\n"
17517 #: ../fish/guestfish-actions.pod:5369 ../src/guestfs-actions.pod:8325
17518 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
17522 #: ../fish/guestfish-actions.pod:5375
17527 #: ../fish/guestfish-actions.pod:5377
17530 " zfile meth path\n"
17535 #: ../fish/guestfish-actions.pod:5379 ../src/guestfs-actions.pod:8351
17536 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
17540 #: ../fish/guestfish-actions.pod:5382 ../src/guestfs-actions.pod:8354
17541 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17545 #: ../fish/guestfish-actions.pod:5384
17546 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
17550 #: ../fish/guestfish-actions.pod:5387
17551 msgid "I<This function is deprecated.> In new code, use the L</file> call instead."
17555 #: ../fish/guestfish-actions.pod:5394
17560 #: ../fish/guestfish-actions.pod:5396
17563 " zgrep regex path\n"
17568 #: ../fish/guestfish-actions.pod:5398 ../src/guestfs-actions.pod:8371
17569 msgid "This calls the external C<zgrep> program and returns the matching lines."
17573 #: ../fish/guestfish-actions.pod:5404
17578 #: ../fish/guestfish-actions.pod:5406
17581 " zgrepi regex path\n"
17586 #: ../fish/guestfish-actions.pod:5408 ../src/guestfs-actions.pod:8390
17587 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
17591 #: ../fish/guestfish-commands.pod:1
17596 #: ../fish/guestfish-commands.pod:3
17601 #: ../fish/guestfish-commands.pod:5
17604 " alloc filename size\n"
17609 #: ../fish/guestfish-commands.pod:7
17611 "This creates an empty (zeroed) file of the given size, and then adds so it "
17612 "can be further examined."
17616 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17617 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17621 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17622 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17626 #: ../fish/guestfish-commands.pod:14
17628 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17629 "image, see L</PREPARED DISK IMAGES>."
17633 #: ../fish/guestfish-commands.pod:17
17638 #: ../fish/guestfish-commands.pod:19
17641 " copy-in local [local ...] /remotedir\n"
17646 #: ../fish/guestfish-commands.pod:21
17648 "C<copy-in> copies local files or directories recursively into the disk "
17649 "image, placing them in the directory called C</remotedir> (which must "
17650 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
17651 "other commands as necessary."
17655 #: ../fish/guestfish-commands.pod:26
17657 "Multiple local files and directories can be specified, but the last "
17658 "parameter must always be a remote directory. Wildcards cannot be used."
17662 #: ../fish/guestfish-commands.pod:30
17667 #: ../fish/guestfish-commands.pod:32
17670 " copy-out remote [remote ...] localdir\n"
17675 #: ../fish/guestfish-commands.pod:34
17677 "C<copy-out> copies remote files or directories recursively out of the disk "
17678 "image, placing them on the host disk in a local directory called C<localdir> "
17679 "(which must exist). This guestfish meta-command turns into a sequence of "
17680 "L</download>, L</tar-out> and other commands as necessary."
17684 #: ../fish/guestfish-commands.pod:40
17686 "Multiple remote files and directories can be specified, but the last "
17687 "parameter must always be a local directory. To download to the current "
17688 "directory, use C<.> as in:"
17692 #: ../fish/guestfish-commands.pod:44
17695 " copy-out /home .\n"
17700 #: ../fish/guestfish-commands.pod:46
17702 "Wildcards cannot be used in the ordinary command, but you can use them with "
17703 "the help of L</glob> like this:"
17707 #: ../fish/guestfish-commands.pod:49
17710 " glob copy-out /home/* .\n"
17715 #: ../fish/guestfish-commands.pod:51
17720 #: ../fish/guestfish-commands.pod:53
17723 " display filename\n"
17728 #: ../fish/guestfish-commands.pod:55
17730 "Use C<display> (a graphical display program) to display an image file. It "
17731 "downloads the file, and runs C<display> on it."
17735 #: ../fish/guestfish-commands.pod:58
17737 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
17738 "environment variable. For example to use the GNOME display program:"
17742 #: ../fish/guestfish-commands.pod:61
17745 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
17750 #: ../fish/guestfish-commands.pod:63
17751 msgid "See also L<display(1)>."
17755 #: ../fish/guestfish-commands.pod:65
17760 #: ../fish/guestfish-commands.pod:67
17763 " echo [params ...]\n"
17768 #: ../fish/guestfish-commands.pod:69
17769 msgid "This echos the parameters to the terminal."
17773 #: ../fish/guestfish-commands.pod:71
17778 #: ../fish/guestfish-commands.pod:73
17783 #: ../fish/guestfish-commands.pod:75
17788 #: ../fish/guestfish-commands.pod:77
17796 #: ../fish/guestfish-commands.pod:79
17798 "This is used to edit a file. It downloads the file, edits it locally using "
17799 "your editor, then uploads the result."
17803 #: ../fish/guestfish-commands.pod:82
17805 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
17806 "or C<emacs> you will get those corresponding editors."
17810 #: ../fish/guestfish-commands.pod:86
17815 #: ../fish/guestfish-commands.pod:88
17818 " glob command args...\n"
17823 #: ../fish/guestfish-commands.pod:90
17825 "Expand wildcards in any paths in the args list, and run C<command> "
17826 "repeatedly on each matching path."
17830 #: ../fish/guestfish-commands.pod:93
17831 msgid "See L</WILDCARDS AND GLOBBING>."
17835 #: ../fish/guestfish-commands.pod:95
17840 #: ../fish/guestfish-commands.pod:97
17843 " hexedit <filename|device>\n"
17844 " hexedit <filename|device> <max>\n"
17845 " hexedit <filename|device> <start> <max>\n"
17850 #: ../fish/guestfish-commands.pod:101
17852 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
17857 #: ../fish/guestfish-commands.pod:104
17859 "This command works by downloading potentially the whole file or device, "
17860 "editing it locally, then uploading it. If the file or device is large, you "
17861 "have to specify which part you wish to edit by using C<max> and/or C<start> "
17862 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
17863 "usual modifiers allowed such as C<1M> (1 megabyte)."
17867 #: ../fish/guestfish-commands.pod:111
17868 msgid "For example to edit the first few sectors of a disk you might do:"
17872 #: ../fish/guestfish-commands.pod:114
17875 " hexedit /dev/sda 1M\n"
17880 #: ../fish/guestfish-commands.pod:116
17882 "which would allow you to edit anywhere within the first megabyte of the "
17887 #: ../fish/guestfish-commands.pod:119
17888 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
17892 #: ../fish/guestfish-commands.pod:121
17895 " hexedit /dev/sda1 0x400 0x400\n"
17900 #: ../fish/guestfish-commands.pod:123
17901 msgid "(assuming the superblock is in the standard location)."
17905 #: ../fish/guestfish-commands.pod:125
17907 "This command requires the external L<hexedit(1)> program. You can specify "
17908 "another program to use by setting the C<HEXEDITOR> environment variable."
17912 #: ../fish/guestfish-commands.pod:129
17913 msgid "See also L</hexdump>."
17917 #: ../fish/guestfish-commands.pod:131
17922 #: ../fish/guestfish-commands.pod:133
17930 #: ../fish/guestfish-commands.pod:135
17931 msgid "Change the local directory, ie. the current directory of guestfish itself."
17935 #: ../fish/guestfish-commands.pod:138
17936 msgid "Note that C<!cd> won't do what you might expect."
17940 #: ../fish/guestfish-commands.pod:140
17945 #: ../fish/guestfish-commands.pod:142
17950 #: ../fish/guestfish-commands.pod:144
17958 #: ../fish/guestfish-commands.pod:146
17959 msgid "Opens the manual page for guestfish."
17963 #: ../fish/guestfish-commands.pod:148
17968 #: ../fish/guestfish-commands.pod:150
17973 #: ../fish/guestfish-commands.pod:152
17981 #: ../fish/guestfish-commands.pod:154
17989 #: ../fish/guestfish-commands.pod:156
17990 msgid "This is used to view a file."
17994 #: ../fish/guestfish-commands.pod:158
17996 "The default viewer is C<$PAGER>. However if you use the alternate command "
17997 "C<less> you will get the C<less> command specifically."
18001 #: ../fish/guestfish-commands.pod:161
18006 #: ../fish/guestfish-commands.pod:163
18014 #: ../fish/guestfish-commands.pod:165
18016 "Close and reopen the libguestfs handle. It is not necessary to use this "
18017 "normally, because the handle is closed properly when guestfish exits. "
18018 "However this is occasionally useful for testing."
18022 #: ../fish/guestfish-commands.pod:169
18027 #: ../fish/guestfish-commands.pod:171
18030 " setenv VAR value\n"
18035 #: ../fish/guestfish-commands.pod:173
18036 msgid "Set the environment variable C<VAR> to the string C<value>."
18040 #: ../fish/guestfish-commands.pod:175
18041 msgid "To print the value of an environment variable use a shell command such as:"
18045 #: ../fish/guestfish-commands.pod:178
18053 #: ../fish/guestfish-commands.pod:180
18058 #: ../fish/guestfish-commands.pod:182
18061 " sparse filename size\n"
18066 #: ../fish/guestfish-commands.pod:184
18068 "This creates an empty sparse file of the given size, and then adds so it can "
18069 "be further examined."
18073 #: ../fish/guestfish-commands.pod:187
18075 "In all respects it works the same as the L</alloc> command, except that the "
18076 "image file is allocated sparsely, which means that disk blocks are not "
18077 "assigned to the file until they are needed. Sparse disk files only use "
18078 "space when written to, but they are slower and there is a danger you could "
18079 "run out of real disk space during a write operation."
18083 #: ../fish/guestfish-commands.pod:197
18088 #: ../fish/guestfish-commands.pod:199
18096 #: ../fish/guestfish-commands.pod:201
18098 "This command returns a list of the optional groups known to the daemon, and "
18099 "indicates which ones are supported by this build of the libguestfs "
18104 #: ../fish/guestfish-commands.pod:205
18105 msgid "See also L<guestfs(3)/AVAILABILITY>."
18109 #: ../fish/guestfish-commands.pod:207
18114 #: ../fish/guestfish-commands.pod:209
18117 " time command args...\n"
18122 #: ../fish/guestfish-commands.pod:211
18124 "Run the command as usual, but print the elapsed time afterwards. This can "
18125 "be useful for benchmarking operations."
18129 #: ../fish/guestfish-commands.pod:214
18134 #: ../fish/guestfish-commands.pod:216
18142 #: ../fish/guestfish-commands.pod:218
18143 msgid "Remove C<VAR> from the environment."
18147 #: ../fish/guestfish.pod:5
18148 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18152 #: ../fish/guestfish.pod:9
18155 " guestfish [--options] [commands]\n"
18160 #: ../fish/guestfish.pod:11
18168 #: ../fish/guestfish.pod:13
18171 " guestfish [--ro|--rw] -a disk.img\n"
18176 #: ../fish/guestfish.pod:15
18179 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18184 #: ../fish/guestfish.pod:17
18187 " guestfish -d libvirt-domain\n"
18192 #: ../fish/guestfish.pod:19
18195 " guestfish [--ro|--rw] -a disk.img -i\n"
18200 #: ../fish/guestfish.pod:21
18203 " guestfish -d libvirt-domain -i\n"
18208 #: ../fish/guestfish.pod:25
18210 "Using guestfish in read/write mode on live virtual machines can be "
18211 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
18212 "option to use guestfish safely if the disk image or virtual machine might be "
18217 #: ../fish/guestfish.pod:32
18219 "Guestfish is a shell and command-line tool for examining and modifying "
18220 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18221 "functionality of the guestfs API, see L<guestfs(3)>."
18225 #: ../fish/guestfish.pod:36
18227 "Guestfish gives you structured access to the libguestfs API, from shell "
18228 "scripts or the command line or interactively. If you want to rescue a "
18229 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18234 #: ../fish/guestfish.pod:43
18235 msgid "As an interactive shell"
18239 #: ../fish/guestfish.pod:45
18247 #: ../fish/guestfish.pod:47
18250 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18251 " editing virtual machine filesystems.\n"
18256 #: ../fish/guestfish.pod:50
18259 " Type: 'help' for a list of commands\n"
18260 " 'man' to read the manual\n"
18261 " 'quit' to quit the shell\n"
18266 #: ../fish/guestfish.pod:54
18269 " ><fs> add-ro disk.img\n"
18271 " ><fs> list-filesystems\n"
18272 " /dev/sda1: ext4\n"
18273 " /dev/vg_guest/lv_root: ext4\n"
18274 " /dev/vg_guest/lv_swap: swap\n"
18275 " ><fs> mount /dev/vg_guest/lv_root /\n"
18276 " ><fs> cat /etc/fstab\n"
18278 " # Created by anaconda\n"
18285 #: ../fish/guestfish.pod:67
18286 msgid "From shell scripts"
18290 #: ../fish/guestfish.pod:69
18291 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18295 #: ../fish/guestfish.pod:71
18298 " guestfish <<_EOF_\n"
18301 " mount /dev/vg_guest/lv_root /\n"
18302 " write /etc/motd \"Welcome, new users\"\n"
18308 #: ../fish/guestfish.pod:78
18309 msgid "List the LVM logical volumes in a disk image:"
18313 #: ../fish/guestfish.pod:80
18316 " guestfish -a disk.img --ro <<_EOF_\n"
18324 #: ../fish/guestfish.pod:85
18325 msgid "List all the filesystems in a disk image:"
18329 #: ../fish/guestfish.pod:87
18332 " guestfish -a disk.img --ro <<_EOF_\n"
18334 " list-filesystems\n"
18340 #: ../fish/guestfish.pod:92
18341 msgid "On one command line"
18345 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18346 msgid "Update C</etc/resolv.conf> in a guest:"
18350 #: ../fish/guestfish.pod:96
18354 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18355 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18360 #: ../fish/guestfish.pod:100
18361 msgid "Edit C</boot/grub/grub.conf> interactively:"
18365 #: ../fish/guestfish.pod:102
18368 " guestfish --rw --add disk.img \\\n"
18369 " --mount /dev/vg_guest/lv_root \\\n"
18370 " --mount /dev/sda1:/boot \\\n"
18371 " edit /boot/grub/grub.conf\n"
18376 #: ../fish/guestfish.pod:107
18377 msgid "Mount disks automatically"
18381 #: ../fish/guestfish.pod:109
18383 "Use the I<-i> option to automatically mount the disks from a virtual "
18388 #: ../fish/guestfish.pod:112
18391 " guestfish --ro -a disk.img -i cat /etc/group\n"
18396 #: ../fish/guestfish.pod:114
18399 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18404 #: ../fish/guestfish.pod:116
18405 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18409 #: ../fish/guestfish.pod:118
18412 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18417 #: ../fish/guestfish.pod:120
18418 msgid "As a script interpreter"
18422 #: ../fish/guestfish.pod:122
18423 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18427 #: ../fish/guestfish.pod:124
18430 " #!/usr/bin/guestfish -f\n"
18431 " sparse test1.img 100M\n"
18433 " part-disk /dev/sda mbr\n"
18434 " mkfs ext2 /dev/sda1\n"
18439 #: ../fish/guestfish.pod:130
18440 msgid "Start with a prepared disk"
18444 #: ../fish/guestfish.pod:132
18446 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18447 "single ext2-formatted partition:"
18451 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18454 " guestfish -N fs\n"
18459 #: ../fish/guestfish.pod:137
18460 msgid "To list what is available do:"
18464 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18467 " guestfish -N help | less\n"
18472 #: ../fish/guestfish.pod:141
18473 msgid "Remote control"
18477 #: ../fish/guestfish.pod:143
18480 " eval \"`guestfish --listen`\"\n"
18481 " guestfish --remote add-ro disk.img\n"
18482 " guestfish --remote run\n"
18483 " guestfish --remote lvs\n"
18488 #: ../fish/guestfish.pod:154
18489 msgid "Displays general help on options."
18493 #: ../fish/guestfish.pod:158
18494 msgid "B<--cmd-help>"
18498 #: ../fish/guestfish.pod:160
18499 msgid "Lists all available guestfish commands."
18503 #: ../fish/guestfish.pod:162
18508 #: ../fish/guestfish.pod:164
18509 msgid "B<--cmd-help cmd>"
18513 #: ../fish/guestfish.pod:166
18514 msgid "Displays detailed help on a single command C<cmd>."
18518 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18519 msgid "B<-a image>"
18523 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18524 msgid "B<--add image>"
18528 #: ../fish/guestfish.pod:172
18529 msgid "Add a block device or virtual machine image to the shell."
18533 #: ../fish/guestfish.pod:177
18535 "Using this flag is mostly equivalent to using the C<add> command, with "
18536 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18537 "the I<--format=...> flag was given."
18541 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18543 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18544 "URI to use. The default is to use the default libvirt connection."
18548 #: ../fish/guestfish.pod:189
18553 #: ../fish/guestfish.pod:191
18555 "If using the I<--listen> option and a csh-like shell, use this option. See "
18556 "section L</REMOTE CONTROL AND CSH> below."
18560 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18561 msgid "B<-d libvirt-domain>"
18565 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18566 msgid "B<--domain libvirt-domain>"
18570 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18572 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18573 "used, then any libvirt domain can be used. However in write mode, only "
18574 "libvirt domains which are shut down can be named here."
18578 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18579 msgid "Domain UUIDs can be used instead of names."
18583 #: ../fish/guestfish.pod:204
18585 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18586 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18587 "if the I<--format:...> flag was given."
18591 #: ../fish/guestfish.pod:208
18596 #: ../fish/guestfish.pod:210
18597 msgid "B<--no-dest-paths>"
18601 #: ../fish/guestfish.pod:212
18603 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18604 "to hit the tab key to complete paths on the guest filesystem, but this "
18605 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18606 "allow this feature to be disabled."
18610 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18612 "When prompting for keys and passphrases, guestfish normally turns echoing "
18613 "off so you cannot see what you are typing. If you are not worried about "
18614 "Tempest attacks and there is no one else in the room you can specify this "
18615 "flag to see what you are typing."
18619 #: ../fish/guestfish.pod:224
18624 #: ../fish/guestfish.pod:226
18625 msgid "B<--file file>"
18629 #: ../fish/guestfish.pod:228
18630 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18634 #: ../fish/guestfish.pod:231
18637 " #!/usr/bin/guestfish -f\n"
18642 #: ../fish/guestfish.pod:244
18645 " guestfish --format=raw -a disk.img\n"
18650 #: ../fish/guestfish.pod:248
18653 " guestfish --format=raw -a disk.img --format -a another.img\n"
18658 #: ../fish/guestfish.pod:253
18660 "If you have untrusted raw-format guest disk images, you should use this "
18661 "option to specify the disk format. This avoids a possible security problem "
18662 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18666 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18667 msgid "B<--inspector>"
18671 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18673 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18674 "system and mount filesystems as they would be mounted on the real virtual "
18679 #: ../fish/guestfish.pod:266
18680 msgid "Typical usage is either:"
18684 #: ../fish/guestfish.pod:268
18687 " guestfish -d myguest -i\n"
18692 #: ../fish/guestfish.pod:270
18693 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18697 #: ../fish/guestfish.pod:272
18700 " guestfish --ro -d myguest -i\n"
18705 #: ../fish/guestfish.pod:274
18706 msgid "(for active domains, readonly), or specify the block device directly:"
18710 #: ../fish/guestfish.pod:276
18713 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18718 #: ../fish/guestfish.pod:278
18720 "Note that the command line syntax changed slightly over older versions of "
18721 "guestfish. You can still use the old syntax:"
18725 #: ../fish/guestfish.pod:281
18728 " guestfish [--ro] -i disk.img\n"
18733 #: ../fish/guestfish.pod:283
18736 " guestfish [--ro] -i libvirt-domain\n"
18741 #: ../fish/guestfish.pod:285
18743 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18744 "then using other commands to mount the filesystems that were found."
18748 #: ../fish/guestfish.pod:294
18749 msgid "B<--listen>"
18753 #: ../fish/guestfish.pod:296
18755 "Fork into the background and listen for remote commands. See section "
18756 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18760 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
18765 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
18767 "Connect to a live virtual machine. (Experimental, see "
18768 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
18772 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
18773 msgid "B<-m dev[:mountpoint[:options]]>"
18777 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
18778 msgid "B<--mount dev[:mountpoint[:options]]>"
18782 #: ../fish/guestfish.pod:308
18783 msgid "Mount the named partition or logical volume on the given mountpoint."
18787 #: ../fish/guestfish.pod:310
18788 msgid "If the mountpoint is omitted, it defaults to C</>."
18792 #: ../fish/guestfish.pod:312
18793 msgid "You have to mount something on C</> before most commands will work."
18797 #: ../fish/guestfish.pod:314
18799 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18804 #: ../fish/guestfish.pod:317
18806 "If you don't know what filesystems a disk image contains, you can either run "
18807 "guestfish without this option, then list the partitions, filesystems and LVs "
18808 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18809 "commands), or you can use the L<virt-filesystems(1)> program."
18813 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
18815 "The third (and rarely used) part of the mount parameter is the list of mount "
18816 "options used to mount the underlying filesystem. If this is not given, then "
18817 "the mount options are either the empty string or C<ro> (the latter if the "
18818 "I<--ro> flag is used). By specifying the mount options, you override this "
18819 "default choice. Probably the only time you would use this is to enable ACLs "
18820 "and/or extended attributes if the filesystem can support them:"
18824 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
18827 " -m /dev/sda1:/:acl,user_xattr\n"
18832 #: ../fish/guestfish.pod:333
18833 msgid "Using this flag is equivalent to using the C<mount-options> command."
18837 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202 ../resize/virt-resize.pod:441
18842 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
18843 msgid "B<--no-sync>"
18847 #: ../fish/guestfish.pod:339
18849 "Disable autosync. This is enabled by default. See the discussion of "
18850 "autosync in the L<guestfs(3)> manpage."
18854 #: ../fish/guestfish.pod:342
18859 #: ../fish/guestfish.pod:344
18860 msgid "B<--new type>"
18864 #: ../fish/guestfish.pod:346
18869 #: ../fish/guestfish.pod:348
18871 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
18872 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18873 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18878 #: ../fish/guestfish.pod:353
18879 msgid "B<--progress-bars>"
18883 #: ../fish/guestfish.pod:355
18884 msgid "Enable progress bars, even when guestfish is used non-interactively."
18888 #: ../fish/guestfish.pod:357
18890 "Progress bars are enabled by default when guestfish is used as an "
18891 "interactive shell."
18895 #: ../fish/guestfish.pod:360
18896 msgid "B<--no-progress-bars>"
18900 #: ../fish/guestfish.pod:362
18901 msgid "Disable progress bars."
18905 #: ../fish/guestfish.pod:364
18906 msgid "B<--remote[=pid]>"
18910 #: ../fish/guestfish.pod:366
18912 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18913 "CONTROL GUESTFISH OVER A SOCKET> below."
18917 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248 ../rescue/virt-rescue.pod:161
18922 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250 ../rescue/virt-rescue.pod:163
18927 #: ../fish/guestfish.pod:373
18929 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18930 "mounts are done read-only."
18934 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
18936 "The option must always be used if the disk image or virtual machine might be "
18937 "running, and is generally recommended in cases where you don't need write "
18938 "access to the disk."
18942 #: ../fish/guestfish.pod:380
18944 "Note that prepared disk images created with I<-N> are not affected by this "
18945 "option. Also commands like C<add> are not affected - you have to specify "
18946 "the C<readonly:true> option explicitly if you need it."
18950 #: ../fish/guestfish.pod:384
18951 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18955 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262 ../rescue/virt-rescue.pod:173
18956 msgid "B<--selinux>"
18960 #: ../fish/guestfish.pod:388
18961 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18965 #: ../fish/guestfish.pod:394
18967 "Enable very verbose messages. This is particularly useful if you find a "
18972 #: ../fish/guestfish.pod:401
18973 msgid "Display the guestfish / libguestfs version number and exit."
18977 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278 ../rescue/virt-rescue.pod:194
18982 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280 ../rescue/virt-rescue.pod:196
18987 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
18989 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18990 "mounts are done read-write."
18994 #: ../fish/guestfish.pod:410
18995 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
18999 #: ../fish/guestfish.pod:414
19000 msgid "Echo each command before executing it."
19004 #: ../fish/guestfish.pod:418
19005 msgid "COMMANDS ON COMMAND LINE"
19009 #: ../fish/guestfish.pod:420
19010 msgid "Any additional (non-option) arguments are treated as commands to execute."
19014 #: ../fish/guestfish.pod:423
19016 "Commands to execute should be separated by a colon (C<:>), where the colon "
19017 "is a separate parameter. Thus:"
19021 #: ../fish/guestfish.pod:426
19024 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
19029 #: ../fish/guestfish.pod:428
19031 "If there are no additional arguments, then we enter a shell, either an "
19032 "interactive shell with a prompt (if the input is a terminal) or a "
19033 "non-interactive shell."
19037 #: ../fish/guestfish.pod:432
19039 "In either command line mode or non-interactive shell, the first command that "
19040 "gives an error causes the whole shell to exit. In interactive mode (with a "
19041 "prompt) if a command fails, you can continue to enter commands."
19045 #: ../fish/guestfish.pod:437
19046 msgid "USING launch (OR run)"
19050 #: ../fish/guestfish.pod:439
19052 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
19053 "then launch it, then mount any disks you need, and finally issue "
19054 "actions/commands. So the general order of the day is:"
19058 #: ../fish/guestfish.pod:447
19059 msgid "add or -a/--add"
19063 #: ../fish/guestfish.pod:451
19064 msgid "launch (aka run)"
19068 #: ../fish/guestfish.pod:455
19069 msgid "mount or -m/--mount"
19073 #: ../fish/guestfish.pod:459
19074 msgid "any other commands"
19078 #: ../fish/guestfish.pod:463
19080 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19081 "guest before mounting or performing any other commands."
19085 #: ../fish/guestfish.pod:466
19087 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19088 "I<--new> options were given then C<run> is done automatically, simply "
19089 "because guestfish can't perform the action you asked for without doing this."
19093 #: ../fish/guestfish.pod:471
19094 msgid "OPENING DISKS FOR READ AND WRITE"
19098 #: ../fish/guestfish.pod:473
19100 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19101 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19102 "I<-i> and I<-m> open disk images read-only or for writing."
19106 #: ../fish/guestfish.pod:478
19108 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
19109 "opening disk images supplied on the command line for write. To open a disk "
19110 "image read-only you have to do I<-a image --ro>."
19114 #: ../fish/guestfish.pod:482
19116 "This matters: If you accidentally open a live VM disk image writable then "
19117 "you will cause irreversible disk corruption."
19121 #: ../fish/guestfish.pod:485
19123 "In a future libguestfs we intend to change the default the other way. Disk "
19124 "images will be opened read-only. You will have to either specify "
19125 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19126 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19127 "access for disk images specified by those other command line options."
19131 #: ../fish/guestfish.pod:492
19133 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19134 "which does nothing (it is already the default). However it is highly "
19135 "recommended that you use this option to indicate that you need write access, "
19136 "and prepare your scripts for the day when this option will be required for "
19141 #: ../fish/guestfish.pod:498
19143 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
19144 "other libguestfs program apart from guestfish and guestmount."
19148 #: ../fish/guestfish.pod:501
19153 #: ../fish/guestfish.pod:503
19155 "You can quote ordinary parameters using either single or double quotes. For "
19160 #: ../fish/guestfish.pod:506
19163 " add \"file with a space.img\"\n"
19168 #: ../fish/guestfish.pod:508
19171 " rm '/file name'\n"
19176 #: ../fish/guestfish.pod:510
19184 #: ../fish/guestfish.pod:512
19186 "A few commands require a list of strings to be passed. For these, use a "
19187 "whitespace-separated list, enclosed in quotes. Strings containing "
19188 "whitespace to be passed through must be enclosed in single quotes. A "
19189 "literal single quote must be escaped with a backslash."
19193 #: ../fish/guestfish.pod:517
19196 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19197 " command \"/bin/echo 'foo bar'\"\n"
19198 " command \"/bin/echo \\'foo\\'\"\n"
19203 #: ../fish/guestfish.pod:521
19204 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19208 #: ../fish/guestfish.pod:523
19210 "In double-quoted arguments (only) use backslash to insert special "
19215 #: ../fish/guestfish.pod:528
19220 #: ../fish/guestfish.pod:530
19221 msgid "Alert (bell) character."
19225 #: ../fish/guestfish.pod:532
19230 #: ../fish/guestfish.pod:534
19231 msgid "Backspace character."
19235 #: ../fish/guestfish.pod:536
19240 #: ../fish/guestfish.pod:538
19241 msgid "Form feed character."
19245 #: ../fish/guestfish.pod:540
19250 #: ../fish/guestfish.pod:542
19251 msgid "Newline character."
19255 #: ../fish/guestfish.pod:544
19260 #: ../fish/guestfish.pod:546
19261 msgid "Carriage return character."
19265 #: ../fish/guestfish.pod:548
19270 #: ../fish/guestfish.pod:550
19271 msgid "Horizontal tab character."
19275 #: ../fish/guestfish.pod:552
19280 #: ../fish/guestfish.pod:554
19281 msgid "Vertical tab character."
19285 #: ../fish/guestfish.pod:556
19290 #: ../fish/guestfish.pod:558
19291 msgid "A literal double quote character."
19295 #: ../fish/guestfish.pod:560
19300 #: ../fish/guestfish.pod:562
19302 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
19307 #: ../fish/guestfish.pod:565
19312 #: ../fish/guestfish.pod:567
19313 msgid "A character with hex value I<hh>. There must be precisely 2 hex digits."
19317 #: ../fish/guestfish.pod:570
19319 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19324 #: ../fish/guestfish.pod:573
19329 #: ../fish/guestfish.pod:575
19330 msgid "A literal backslash character."
19334 #: ../fish/guestfish.pod:579
19335 msgid "OPTIONAL ARGUMENTS"
19339 #: ../fish/guestfish.pod:581
19341 "Some commands take optional arguments. These arguments appear in this "
19342 "documentation as C<[argname:..]>. You can use them as in these examples:"
19346 #: ../fish/guestfish.pod:585
19349 " add-drive-opts filename\n"
19354 #: ../fish/guestfish.pod:587
19357 " add-drive-opts filename readonly:true\n"
19362 #: ../fish/guestfish.pod:589
19365 " add-drive-opts filename format:qcow2 readonly:false\n"
19370 #: ../fish/guestfish.pod:591
19372 "Each optional argument can appear at most once. All optional arguments must "
19373 "appear after the required ones."
19377 #: ../fish/guestfish.pod:594
19382 #: ../fish/guestfish.pod:596
19383 msgid "This section applies to all commands which can take integers as parameters."
19387 #: ../fish/guestfish.pod:599
19388 msgid "SIZE SUFFIX"
19392 #: ../fish/guestfish.pod:601
19394 "When the command takes a parameter measured in bytes, you can use one of the "
19395 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19399 #: ../fish/guestfish.pod:607
19400 msgid "B<k> or B<K> or B<KiB>"
19404 #: ../fish/guestfish.pod:609
19405 msgid "The size in kilobytes (multiplied by 1024)."
19409 #: ../fish/guestfish.pod:611
19414 #: ../fish/guestfish.pod:613
19415 msgid "The size in SI 1000 byte units."
19419 #: ../fish/guestfish.pod:615
19420 msgid "B<M> or B<MiB>"
19424 #: ../fish/guestfish.pod:617
19425 msgid "The size in megabytes (multiplied by 1048576)."
19429 #: ../fish/guestfish.pod:619
19434 #: ../fish/guestfish.pod:621
19435 msgid "The size in SI 1000000 byte units."
19439 #: ../fish/guestfish.pod:623
19440 msgid "B<G> or B<GiB>"
19444 #: ../fish/guestfish.pod:625
19445 msgid "The size in gigabytes (multiplied by 2**30)."
19449 #: ../fish/guestfish.pod:627
19454 #: ../fish/guestfish.pod:629
19455 msgid "The size in SI 10**9 byte units."
19459 #: ../fish/guestfish.pod:631
19460 msgid "B<T> or B<TiB>"
19464 #: ../fish/guestfish.pod:633
19465 msgid "The size in terabytes (multiplied by 2**40)."
19469 #: ../fish/guestfish.pod:635
19474 #: ../fish/guestfish.pod:637
19475 msgid "The size in SI 10**12 byte units."
19479 #: ../fish/guestfish.pod:639
19480 msgid "B<P> or B<PiB>"
19484 #: ../fish/guestfish.pod:641
19485 msgid "The size in petabytes (multiplied by 2**50)."
19489 #: ../fish/guestfish.pod:643
19494 #: ../fish/guestfish.pod:645
19495 msgid "The size in SI 10**15 byte units."
19499 #: ../fish/guestfish.pod:647
19500 msgid "B<E> or B<EiB>"
19504 #: ../fish/guestfish.pod:649
19505 msgid "The size in exabytes (multiplied by 2**60)."
19509 #: ../fish/guestfish.pod:651
19514 #: ../fish/guestfish.pod:653
19515 msgid "The size in SI 10**18 byte units."
19519 #: ../fish/guestfish.pod:655
19520 msgid "B<Z> or B<ZiB>"
19524 #: ../fish/guestfish.pod:657
19525 msgid "The size in zettabytes (multiplied by 2**70)."
19529 #: ../fish/guestfish.pod:659
19534 #: ../fish/guestfish.pod:661
19535 msgid "The size in SI 10**21 byte units."
19539 #: ../fish/guestfish.pod:663
19540 msgid "B<Y> or B<YiB>"
19544 #: ../fish/guestfish.pod:665
19545 msgid "The size in yottabytes (multiplied by 2**80)."
19549 #: ../fish/guestfish.pod:667
19554 #: ../fish/guestfish.pod:669
19555 msgid "The size in SI 10**24 byte units."
19559 #: ../fish/guestfish.pod:675
19562 " truncate-size /file 1G\n"
19567 #: ../fish/guestfish.pod:677
19568 msgid "would truncate the file to 1 gigabyte."
19572 #: ../fish/guestfish.pod:679
19574 "Be careful because a few commands take sizes in kilobytes or megabytes "
19575 "(eg. the parameter to L</memsize> is specified in megabytes already). "
19576 "Adding a suffix will probably not do what you expect."
19580 #: ../fish/guestfish.pod:683
19581 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19585 #: ../fish/guestfish.pod:685
19587 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19588 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19592 #: ../fish/guestfish.pod:688
19595 " 1234 decimal number 1234\n"
19596 " 02322 octal number, equivalent to decimal 1234\n"
19597 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19602 #: ../fish/guestfish.pod:692
19604 "When using the C<chmod> command, you almost always want to specify an octal "
19605 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19606 "L<chmod(1)> program):"
19610 #: ../fish/guestfish.pod:696
19613 " chmod 0777 /public # OK\n"
19614 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19619 #: ../fish/guestfish.pod:699
19621 "Commands that return numbers usually print them in decimal, but some "
19622 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19623 "octal, preceeded by C<0>)."
19627 #: ../fish/guestfish.pod:703
19628 msgid "WILDCARDS AND GLOBBING"
19632 #: ../fish/guestfish.pod:705
19634 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19635 "(globbing) by default. So for example the following will not do what you "
19640 #: ../fish/guestfish.pod:709
19648 #: ../fish/guestfish.pod:711
19650 "Assuming you don't have a directory called literally C</home/*> then the "
19651 "above command will return an error."
19655 #: ../fish/guestfish.pod:714
19656 msgid "To perform wildcard expansion, use the C<glob> command."
19660 #: ../fish/guestfish.pod:716
19663 " glob rm-rf /home/*\n"
19668 #: ../fish/guestfish.pod:718
19670 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19671 "many times), equivalent to:"
19675 #: ../fish/guestfish.pod:721
19678 " rm-rf /home/jim\n"
19679 " rm-rf /home/joe\n"
19680 " rm-rf /home/mary\n"
19685 #: ../fish/guestfish.pod:725
19686 msgid "C<glob> only works on simple guest paths and not on device names."
19690 #: ../fish/guestfish.pod:727
19692 "If you have several parameters, each containing a wildcard, then glob will "
19693 "perform a Cartesian product."
19697 #: ../fish/guestfish.pod:730
19702 #: ../fish/guestfish.pod:732
19704 "Any line which starts with a I<#> character is treated as a comment and "
19705 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19706 "a command. For example:"
19710 #: ../fish/guestfish.pod:736
19713 " # this is a comment\n"
19714 " # this is a comment\n"
19715 " foo # NOT a comment\n"
19720 #: ../fish/guestfish.pod:740
19721 msgid "Blank lines are also ignored."
19725 #: ../fish/guestfish.pod:742
19726 msgid "RUNNING COMMANDS LOCALLY"
19730 #: ../fish/guestfish.pod:744
19732 "Any line which starts with a I<!> character is treated as a command sent to "
19733 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19737 #: ../fish/guestfish.pod:748
19741 " tgz-out /remote local/remote-data.tar.gz\n"
19746 #: ../fish/guestfish.pod:751
19748 "will create a directory C<local> on the host, and then export the contents "
19749 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19750 "(See C<tgz-out>)."
19754 #: ../fish/guestfish.pod:755
19756 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19757 "effect, due to the way that subprocesses work in Unix."
19761 #: ../fish/guestfish.pod:758
19762 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19766 #: ../fish/guestfish.pod:760
19768 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19769 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19770 "and executed as guestfish commands."
19774 #: ../fish/guestfish.pod:764
19776 "Thus you can use shell script to construct arbitrary guestfish commands "
19777 "which are then parsed by guestfish."
19781 #: ../fish/guestfish.pod:767
19783 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19784 "through C</foo.100>) using guestfish commands alone. However this is simple "
19785 "if we use a shell script to create the guestfish commands for us:"
19789 #: ../fish/guestfish.pod:772
19792 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19797 #: ../fish/guestfish.pod:774
19798 msgid "or with names like C</foo.001>:"
19802 #: ../fish/guestfish.pod:776
19805 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19810 #: ../fish/guestfish.pod:778
19812 "When using guestfish interactively it can be helpful to just run the shell "
19813 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19814 "ordinary I<!> local command), see what guestfish commands it would run, and "
19815 "when you are happy with those prepend the C<E<lt>> character to run the "
19816 "guestfish commands for real."
19820 #: ../fish/guestfish.pod:784
19825 #: ../fish/guestfish.pod:786
19827 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19828 "command (a guestfish command) to the second command (any host command). For "
19833 #: ../fish/guestfish.pod:790
19836 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19841 #: ../fish/guestfish.pod:792
19843 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19844 "program). The above command would list all accounts in the guest filesystem "
19845 "which have UID 0, ie. root accounts including backdoors. Other examples:"
19849 #: ../fish/guestfish.pod:797
19852 " hexdump /bin/ls | head\n"
19853 " list-devices | tail -1\n"
19854 " tgz-out / - | tar ztf -\n"
19859 #: ../fish/guestfish.pod:801
19861 "The space before the pipe symbol is required, any space after the pipe "
19862 "symbol is optional. Everything after the pipe symbol is just passed "
19863 "straight to the host shell, so it can contain redirections, globs and "
19864 "anything else that makes sense on the host side."
19868 #: ../fish/guestfish.pod:806
19870 "To use a literal argument which begins with a pipe symbol, you have to quote "
19875 #: ../fish/guestfish.pod:809
19883 #: ../fish/guestfish.pod:811
19884 msgid "HOME DIRECTORIES"
19888 #: ../fish/guestfish.pod:813
19890 "If a parameter starts with the character C<~> then the tilde may be expanded "
19891 "as a home directory path (either C<~> for the current user's home directory, "
19892 "or C<~user> for another user)."
19896 #: ../fish/guestfish.pod:817
19898 "Note that home directory expansion happens for users known I<on the host>, "
19899 "not in the guest filesystem."
19903 #: ../fish/guestfish.pod:820
19905 "To use a literal argument which begins with a tilde, you have to quote it, "
19910 #: ../fish/guestfish.pod:823
19918 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
19919 msgid "ENCRYPTED DISKS"
19923 #: ../fish/guestfish.pod:827
19925 "Libguestfs has some support for Linux guests encrypted according to the "
19926 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19927 "disk encryption systems used by modern Linux guests. Currently only "
19928 "LVM-on-LUKS is supported."
19932 #: ../fish/guestfish.pod:832
19933 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19937 #: ../fish/guestfish.pod:834
19940 " ><fs> vfs-type /dev/sda2\n"
19946 #: ../fish/guestfish.pod:837
19948 "Then open those devices using L</luks-open>. This creates a device-mapper "
19949 "device called C</dev/mapper/luksdev>."
19953 #: ../fish/guestfish.pod:840
19956 " ><fs> luks-open /dev/sda2 luksdev\n"
19957 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19962 #: ../fish/guestfish.pod:843
19964 "Finally you have to tell LVM to scan for volume groups on the newly created "
19969 #: ../fish/guestfish.pod:846
19973 " vg-activate-all true\n"
19978 #: ../fish/guestfish.pod:849
19979 msgid "The logical volume(s) can now be mounted in the usual way."
19983 #: ../fish/guestfish.pod:851
19985 "Before closing a LUKS device you must unmount any logical volumes on it and "
19986 "deactivate the volume groups by calling C<vg-activate false VG> on each "
19987 "one. Then you can close the mapper device:"
19991 #: ../fish/guestfish.pod:855
19994 " vg-activate false /dev/VG\n"
19995 " luks-close /dev/mapper/luksdev\n"
20000 #: ../fish/guestfish.pod:860
20002 "If a path is prefixed with C<win:> then you can use Windows-style drive "
20003 "letters and paths (with some limitations). The following commands are "
20008 #: ../fish/guestfish.pod:864
20011 " file /WINDOWS/system32/config/system.LOG\n"
20016 #: ../fish/guestfish.pod:866
20019 " file win:\\windows\\system32\\config\\system.log\n"
20024 #: ../fish/guestfish.pod:868
20027 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
20032 #: ../fish/guestfish.pod:870
20034 "The parameter is rewritten \"behind the scenes\" by looking up the position "
20035 "where the drive is mounted, prepending that to the path, changing all "
20036 "backslash characters to forward slash, then resolving the result using "
20037 "L</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
20038 "then the parameter might be rewritten like this:"
20042 #: ../fish/guestfish.pod:876
20045 " win:e:\\foo\\bar => /e/FOO/bar\n"
20050 #: ../fish/guestfish.pod:878
20051 msgid "This only works in argument positions that expect a path."
20055 #: ../fish/guestfish.pod:880
20056 msgid "UPLOADING AND DOWNLOADING FILES"
20060 #: ../fish/guestfish.pod:882
20062 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
20063 "others which upload from or download to a local file, you can use the "
20064 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
20068 #: ../fish/guestfish.pod:886
20076 #: ../fish/guestfish.pod:888
20077 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
20081 #: ../fish/guestfish.pod:891
20084 " tar-out /etc - | tar tf -\n"
20089 #: ../fish/guestfish.pod:893
20091 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20092 "command (see L</PIPES>)."
20096 #: ../fish/guestfish.pod:896
20098 "When using C<-> to read from stdin, the input is read up to the end of "
20099 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20100 "some arbitrary end marker:"
20104 #: ../fish/guestfish.pod:900
20107 " upload -<<END /foo\n"
20116 #: ../fish/guestfish.pod:906
20118 "Any string of characters can be used instead of C<END>. The end marker must "
20119 "appear on a line of its own, without any preceeding or following characters "
20120 "(not even spaces)."
20124 #: ../fish/guestfish.pod:910
20126 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20127 "upload local files (so-called \"FileIn\" parameters in the generator)."
20131 #: ../fish/guestfish.pod:913
20132 msgid "EXIT ON ERROR BEHAVIOUR"
20136 #: ../fish/guestfish.pod:915
20138 "By default, guestfish will ignore any errors when in interactive mode "
20139 "(ie. taking commands from a human over a tty), and will exit on the first "
20140 "error in non-interactive mode (scripts, commands given on the command line)."
20144 #: ../fish/guestfish.pod:920
20146 "If you prefix a command with a I<-> character, then that command will not "
20147 "cause guestfish to exit, even if that (one) command returns an error."
20151 #: ../fish/guestfish.pod:924
20152 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20156 #: ../fish/guestfish.pod:926
20158 "Guestfish can be remote-controlled over a socket. This is useful "
20159 "particularly in shell scripts where you want to make several different "
20160 "changes to a filesystem, but you don't want the overhead of starting up a "
20161 "guestfish process each time."
20165 #: ../fish/guestfish.pod:931
20166 msgid "Start a guestfish server process using:"
20170 #: ../fish/guestfish.pod:933
20173 " eval \"`guestfish --listen`\"\n"
20178 #: ../fish/guestfish.pod:935
20179 msgid "and then send it commands by doing:"
20183 #: ../fish/guestfish.pod:937
20186 " guestfish --remote cmd [...]\n"
20191 #: ../fish/guestfish.pod:939
20192 msgid "To cause the server to exit, send it the exit command:"
20196 #: ../fish/guestfish.pod:943
20198 "Note that the server will normally exit if there is an error in a command. "
20199 "You can change this in the usual way. See section L</EXIT ON ERROR "
20204 #: ../fish/guestfish.pod:947
20205 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20209 #: ../fish/guestfish.pod:949
20211 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
20212 "is how the I<--remote> option knows where to send the commands. You can "
20213 "have several guestfish listener processes running using:"
20217 #: ../fish/guestfish.pod:953
20220 " eval \"`guestfish --listen`\"\n"
20221 " pid1=$GUESTFISH_PID\n"
20222 " eval \"`guestfish --listen`\"\n"
20223 " pid2=$GUESTFISH_PID\n"
20225 " guestfish --remote=$pid1 cmd\n"
20226 " guestfish --remote=$pid2 cmd\n"
20231 #: ../fish/guestfish.pod:961
20232 msgid "REMOTE CONTROL AND CSH"
20236 #: ../fish/guestfish.pod:963
20238 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20243 #: ../fish/guestfish.pod:966
20246 " eval \"`guestfish --listen --csh`\"\n"
20251 #: ../fish/guestfish.pod:968
20252 msgid "REMOTE CONTROL DETAILS"
20256 #: ../fish/guestfish.pod:970
20258 "Remote control happens over a Unix domain socket called "
20259 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
20260 "of the process, and C<$PID> is the process ID of the server."
20264 #: ../fish/guestfish.pod:974
20265 msgid "Guestfish client and server versions must match exactly."
20269 #: ../fish/guestfish.pod:976
20270 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20274 #: ../fish/guestfish.pod:978
20276 "From Bash, you can use the following code which creates a guestfish "
20277 "instance, correctly quotes the command line, handles failure to start, and "
20278 "cleans up guestfish when the script exits:"
20282 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20290 #: ../fish/guestfish.pod:986
20293 " guestfish[0]=\"guestfish\"\n"
20294 " guestfish[1]=\"--listen\"\n"
20295 " guestfish[2]=\"--ro\"\n"
20296 " guestfish[3]=\"-a\"\n"
20297 " guestfish[4]=\"disk.img\"\n"
20302 #: ../fish/guestfish.pod:992
20305 " GUESTFISH_PID=\n"
20306 " eval $(\"${guestfish[@]}\")\n"
20307 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20308 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20315 #: ../fish/guestfish.pod:999
20318 " cleanup_guestfish ()\n"
20320 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20322 " trap cleanup_guestfish EXIT ERR\n"
20327 #: ../fish/guestfish.pod:1005
20330 " guestfish --remote -- run\n"
20335 #: ../fish/guestfish.pod:1007
20343 #: ../fish/guestfish.pod:1009
20344 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20348 #: ../fish/guestfish.pod:1011
20350 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20351 "context hangs, ie. don't do (note the backquotes):"
20355 #: ../fish/guestfish.pod:1014
20358 " a=`guestfish --remote run`\n"
20363 #: ../fish/guestfish.pod:1016
20365 "Since the C<run> command produces no output on stdout, this is not useful "
20366 "anyway. For further information see "
20367 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
20371 #: ../fish/guestfish.pod:1020
20372 msgid "PREPARED DISK IMAGES"
20376 #: ../fish/guestfish.pod:1022
20378 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20379 "preformatted disk images that guestfish can make for you to save typing. "
20380 "This is particularly useful for testing purposes. This option is used "
20381 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20382 "can be mixed with I<-a>)."
20386 #: ../fish/guestfish.pod:1028
20388 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20389 "the second and so on. Existing files in the current directory are "
20394 #: ../fish/guestfish.pod:1032
20396 "The type briefly describes how the disk should be sized, partitioned, how "
20397 "filesystem(s) should be created, and how content should be added. "
20398 "Optionally the type can be followed by extra parameters, separated by C<:> "
20399 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
20400 "sparsely-allocated disk, containing a single partition, with the partition "
20401 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
20402 "on a 1GB disk instead."
20406 #: ../fish/guestfish.pod:1040
20407 msgid "To list the available types and any extra parameters they take, run:"
20411 #: ../fish/guestfish.pod:1044
20413 "Note that the prepared filesystem is not mounted. You would usually have to "
20414 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20418 #: ../fish/guestfish.pod:1048
20420 "If any I<-N> or I<--new> options are given, the guest is automatically "
20425 #: ../fish/guestfish.pod:1053
20426 msgid "Create a 100MB disk with an ext4-formatted partition:"
20430 #: ../fish/guestfish.pod:1055
20433 " guestfish -N fs:ext4\n"
20438 #: ../fish/guestfish.pod:1057
20439 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20443 #: ../fish/guestfish.pod:1059
20446 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20451 #: ../fish/guestfish.pod:1061
20452 msgid "Create a blank 200MB disk:"
20456 #: ../fish/guestfish.pod:1063
20459 " guestfish -N disk:200M\n"
20464 #: ../fish/guestfish.pod:1065
20465 msgid "PROGRESS BARS"
20469 #: ../fish/guestfish.pod:1067
20471 "Some (not all) long-running commands send progress notification messages as "
20472 "they are running. Guestfish turns these messages into progress bars."
20476 #: ../fish/guestfish.pod:1071
20478 "When a command that supports progress bars takes longer than two seconds to "
20479 "run, and if progress bars are enabled, then you will see one appearing below "
20484 #: ../fish/guestfish.pod:1075
20487 " ><fs> copy-size /large-file /another-file 2048M\n"
20488 " / 10% [#####-----------------------------------------] 00:30\n"
20493 #: ../fish/guestfish.pod:1078
20495 "The spinner on the left hand side moves round once for every progress "
20496 "notification received from the backend. This is a (reasonably) golden "
20497 "assurance that the command is \"doing something\" even if the progress bar "
20498 "is not moving, because the command is able to send the progress "
20499 "notifications. When the bar reaches 100% and the command finishes, the "
20500 "spinner disappears."
20504 #: ../fish/guestfish.pod:1085
20506 "Progress bars are enabled by default when guestfish is used interactively. "
20507 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20508 "and you can disable them completely using I<--no-progress-bars>."
20512 #: ../fish/guestfish.pod:1090
20513 msgid "GUESTFISH COMMANDS"
20517 #: ../fish/guestfish.pod:1092
20519 "The commands in this section are guestfish convenience commands, in other "
20520 "words, they are not part of the L<guestfs(3)> API."
20524 #: ../fish/guestfish.pod:1095
20529 #: ../fish/guestfish.pod:1097
20538 #: ../fish/guestfish.pod:1100
20539 msgid "Without any parameter, this provides general help."
20543 #: ../fish/guestfish.pod:1102
20544 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20548 #: ../fish/guestfish.pod:1104
20549 msgid "quit | exit"
20553 #: ../fish/guestfish.pod:1106
20554 msgid "This exits guestfish. You can also use C<^D> key."
20558 #: ../fish/guestfish.pod:1108
20559 msgid "@FISH_COMMANDS@"
20563 #: ../fish/guestfish.pod:1110
20568 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20573 #: ../fish/guestfish.pod:1116
20575 "guestfish returns 0 if the commands completed without error, or 1 if there "
20580 #: ../fish/guestfish.pod:1123
20585 #: ../fish/guestfish.pod:1125
20587 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20592 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3218
20593 msgid "FEBOOTSTRAP_KERNEL"
20597 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3220
20598 msgid "FEBOOTSTRAP_MODULES"
20602 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3222
20604 "These two environment variables allow the kernel that libguestfs uses in the "
20605 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20606 "most recent host kernel is chosen. For more information about kernel "
20607 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20608 "available in febootstrap E<ge> 3.8."
20612 #: ../fish/guestfish.pod:1138
20613 msgid "GUESTFISH_DISPLAY_IMAGE"
20617 #: ../fish/guestfish.pod:1140
20619 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20620 "If not set, it uses L<display(1)>."
20624 #: ../fish/guestfish.pod:1143
20625 msgid "GUESTFISH_PID"
20629 #: ../fish/guestfish.pod:1145
20631 "Used with the I<--remote> option to specify the remote guestfish process to "
20632 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20636 #: ../fish/guestfish.pod:1149
20641 #: ../fish/guestfish.pod:1151
20643 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20644 "not specified, the external L<hexedit(1)> program is used."
20648 #: ../fish/guestfish.pod:1155
20653 #: ../fish/guestfish.pod:1157
20655 "If compiled with GNU readline support, various files in the home directory "
20656 "can be used. See L</FILES>."
20660 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3228
20661 msgid "LIBGUESTFS_APPEND"
20665 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3230
20666 msgid "Pass additional options to the guest kernel."
20670 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3232
20671 msgid "LIBGUESTFS_DEBUG"
20675 #: ../fish/guestfish.pod:1166
20677 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20678 "effect as using the B<-v> option."
20682 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3237
20683 msgid "LIBGUESTFS_MEMSIZE"
20687 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3239
20688 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
20692 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3242
20695 " LIBGUESTFS_MEMSIZE=700\n"
20700 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3244
20701 msgid "LIBGUESTFS_PATH"
20705 #: ../fish/guestfish.pod:1178
20707 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20708 "the discussion of paths in L<guestfs(3)>."
20712 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3249
20713 msgid "LIBGUESTFS_QEMU"
20717 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3251
20719 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
20720 "which was found at compile time by the configure script is used."
20724 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3257
20725 msgid "LIBGUESTFS_TRACE"
20729 #: ../fish/guestfish.pod:1189
20730 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
20734 #: ../fish/guestfish.pod:1191
20739 #: ../fish/guestfish.pod:1193
20741 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
20746 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:241 ../src/guestfs.pod:3262
20751 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3264
20753 "Location of temporary directory, defaults to C</tmp> except for the cached "
20754 "supermin appliance which defaults to C</var/tmp>."
20758 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3267
20760 "If libguestfs was compiled to use the supermin appliance then the real "
20761 "appliance is cached in this directory, shared between all handles belonging "
20762 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
20763 "use in case C</var/tmp> is not large enough."
20767 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297 ../rescue/virt-rescue.pod:273
20772 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301 ../rescue/virt-rescue.pod:277
20773 msgid "$HOME/.libguestfs-tools.rc"
20777 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303 ../rescue/virt-rescue.pod:279
20778 msgid "/etc/libguestfs-tools.conf"
20782 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305 ../rescue/virt-rescue.pod:281
20784 "This configuration file controls the default read-only or read-write mode "
20785 "(I<--ro> or I<--rw>)."
20789 #: ../fish/guestfish.pod:1220
20790 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
20794 #: ../fish/guestfish.pod:1222
20795 msgid "$HOME/.guestfish"
20799 #: ../fish/guestfish.pod:1224
20801 "If compiled with GNU readline support, then the command history is saved in "
20806 #: ../fish/guestfish.pod:1227
20807 msgid "$HOME/.inputrc"
20811 #: ../fish/guestfish.pod:1229
20812 msgid "/etc/inputrc"
20816 #: ../fish/guestfish.pod:1231
20818 "If compiled with GNU readline support, then these files can be used to "
20819 "configure readline. For further information, please see "
20820 "L<readline(3)/INITIALIZATION FILE>."
20824 #: ../fish/guestfish.pod:1235
20825 msgid "To write rules which only apply to guestfish, use:"
20829 #: ../fish/guestfish.pod:1237
20839 #: ../fish/guestfish.pod:1241
20841 "Variables that you can set in inputrc that change the behaviour of guestfish "
20842 "in useful ways include:"
20846 #: ../fish/guestfish.pod:1246
20847 msgid "completion-ignore-case (default: on)"
20851 #: ../fish/guestfish.pod:1248
20853 "By default, guestfish will ignore case when tab-completing paths on the "
20858 #: ../fish/guestfish.pod:1251
20861 " set completion-ignore-case off\n"
20866 #: ../fish/guestfish.pod:1253
20867 msgid "to make guestfish case sensitive."
20871 #: ../fish/guestfish.pod:1257
20876 #: ../fish/guestfish.pod:1259
20877 msgid "test2.img (etc)"
20881 #: ../fish/guestfish.pod:1261
20883 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
20884 "will be created in the file C<test1.img> in the current directory. The "
20885 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
20886 "the same name will be overwritten."
20890 #: ../fish/guestfish.pod:1270
20892 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, "
20893 "L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, "
20894 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
20895 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
20896 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
20897 "L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, "
20898 "L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<display(1)>, L<hexedit(1)>, "
20899 "L<febootstrap-supermin-helper(8)>."
20903 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3360 ../test-tool/libguestfs-test-tool.pod:112
20904 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
20908 #: ../fish/virt-copy-in.pod:5
20909 msgid "virt-copy-in - Copy files and directories into a virtual machine disk image."
20913 #: ../fish/virt-copy-in.pod:9
20916 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
20921 #: ../fish/virt-copy-in.pod:11
20924 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
20929 #: ../fish/virt-copy-in.pod:15
20931 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
20932 "causing disk corruption. The virtual machine must be shut down before you "
20933 "use this command."
20937 #: ../fish/virt-copy-in.pod:21
20939 "C<virt-copy-in> copies files and directories from the local disk into a "
20940 "virtual machine disk image or named libvirt domain."
20944 #: ../fish/virt-copy-in.pod:24
20946 "You can give one of more filenames and directories on the command line. "
20947 "Directories are copied in recursively. The final parameter must be the "
20948 "destination directory in the disk image which must be an absolute path "
20949 "starting with a C</> character."
20953 #: ../fish/virt-copy-in.pod:33
20956 " virt-copy-in -d MyGuest resolv.conf /etc\n"
20961 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
20962 msgid "Upload a home directory to a guest:"
20966 #: ../fish/virt-copy-in.pod:37
20969 " virt-copy-in -d MyGuest skel /home\n"
20974 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28 ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
20975 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
20979 #: ../fish/virt-copy-in.pod:41
20981 "This command is just a simple shell script wrapper around the "
20982 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
20983 "trivial copy, you are probably better off using guestfish directly."
20987 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36 ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
20989 "Since the shell script just passes options straight to guestfish, read "
20990 "L<guestfish(1)> to see the full list of options."
20994 #: ../fish/virt-copy-in.pod:52
20996 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
20997 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21001 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55 ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
21002 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
21006 #: ../fish/virt-copy-out.pod:5
21008 "virt-copy-out - Copy files and directories out of a virtual machine disk "
21013 #: ../fish/virt-copy-out.pod:9
21016 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
21021 #: ../fish/virt-copy-out.pod:11
21024 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
21029 #: ../fish/virt-copy-out.pod:15
21031 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
21032 "image or named libvirt domain."
21036 #: ../fish/virt-copy-out.pod:18
21038 "You can give one of more filenames and directories on the command line. "
21039 "Directories are copied out recursively."
21043 #: ../fish/virt-copy-out.pod:23
21044 msgid "Download the home directories from a virtual machine:"
21048 #: ../fish/virt-copy-out.pod:25
21052 " virt-copy-out -d MyGuest /home homes\n"
21057 #: ../fish/virt-copy-out.pod:30
21059 "This command is just a simple shell script wrapper around the "
21060 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
21061 "trivial copy, you are probably better off using guestfish directly."
21065 #: ../fish/virt-copy-out.pod:41
21067 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, "
21068 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21072 #: ../fish/virt-tar-in.pod:5
21073 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21077 #: ../fish/virt-tar-in.pod:9
21080 " virt-tar-in -a disk.img data.tar /destination\n"
21085 #: ../fish/virt-tar-in.pod:11
21088 " virt-tar-in -d domain data.tar /destination\n"
21093 #: ../fish/virt-tar-in.pod:13
21096 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21101 #: ../fish/virt-tar-in.pod:17
21103 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21104 "causing disk corruption. The virtual machine must be shut down before you "
21105 "use this command."
21109 #: ../fish/virt-tar-in.pod:23
21111 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21112 "image or named libvirt domain."
21116 #: ../fish/virt-tar-in.pod:26
21118 "The first parameter is the tar file. Use C<-> to read the tar file from "
21119 "standard input. The second parameter is the absolute target directory to "
21124 #: ../fish/virt-tar-in.pod:34
21127 " virt-tar-in -d MyGuest homes.tar /home\n"
21132 #: ../fish/virt-tar-in.pod:38
21134 "This command is just a simple shell script wrapper around the "
21135 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial "
21136 "copy, you are probably better off using guestfish directly."
21140 #: ../fish/virt-tar-in.pod:49
21142 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21143 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
21144 "L<http://libguestfs.org/>."
21148 #: ../fish/virt-tar-out.pod:5
21149 msgid "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21153 #: ../fish/virt-tar-out.pod:9
21156 " virt-tar-out -a disk.img /dir files.tar\n"
21161 #: ../fish/virt-tar-out.pod:11
21164 " virt-tar-out -d domain /dir files.tar\n"
21169 #: ../fish/virt-tar-out.pod:13
21172 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21177 #: ../fish/virt-tar-out.pod:17
21178 msgid "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21182 #: ../fish/virt-tar-out.pod:20
21184 "The first parameter is the absolute path of the virtual machine directory. "
21185 "The second parameter is the tar file to write. Use C<-> to write to "
21190 #: ../fish/virt-tar-out.pod:26
21191 msgid "Download the home directories from a guest:"
21195 #: ../fish/virt-tar-out.pod:28
21198 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21203 #: ../fish/virt-tar-out.pod:32
21205 "This command is just a simple shell script wrapper around the "
21206 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
21207 "trivial copy, you are probably better off using guestfish directly."
21211 #: ../fish/virt-tar-out.pod:43
21213 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21214 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21218 #: ../fuse/guestmount.pod:5
21219 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21223 #: ../fuse/guestmount.pod:9
21226 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21231 #: ../fuse/guestmount.pod:11
21234 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21239 #: ../fuse/guestmount.pod:13
21242 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21247 #: ../fuse/guestmount.pod:17
21249 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21250 "machines. If you do this, you risk disk corruption in the VM."
21254 #: ../fuse/guestmount.pod:22
21256 "The guestmount program can be used to mount virtual machine filesystems and "
21257 "other disk images on the host. It uses libguestfs for access to the guest "
21258 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21259 "a mountable device."
21263 #: ../fuse/guestmount.pod:27
21265 "Along with other options, you have to give at least one device (I<-a> "
21266 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
21267 "option) or use the I<-i> inspection option or the I<--live> option. How "
21268 "this works is better explained in the L<guestfish(1)> manual page, or by "
21269 "looking at the examples below."
21273 #: ../fuse/guestmount.pod:33
21275 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21276 "by you, and the filesystem will not be visible to any other users unless you "
21277 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21278 "the filesystem, use the C<fusermount -u> command."
21282 #: ../fuse/guestmount.pod:41
21284 "For a typical Windows guest which has its main filesystem on the first "
21289 #: ../fuse/guestmount.pod:44
21292 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21297 #: ../fuse/guestmount.pod:46
21299 "For a typical Linux guest which has a /boot filesystem on the first "
21300 "partition, and the root filesystem on a logical volume:"
21304 #: ../fuse/guestmount.pod:49
21307 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21312 #: ../fuse/guestmount.pod:51
21313 msgid "To get libguestfs to detect guest mountpoints for you:"
21317 #: ../fuse/guestmount.pod:53
21320 " guestmount -a guest.img -i --ro /mnt\n"
21325 #: ../fuse/guestmount.pod:55
21326 msgid "For a libvirt guest called \"Guest\" you could do:"
21330 #: ../fuse/guestmount.pod:57
21333 " guestmount -d Guest -i --ro /mnt\n"
21338 #: ../fuse/guestmount.pod:59
21340 "If you don't know what filesystems are contained in a guest or disk image, "
21341 "use L<virt-filesystems(1)> first:"
21345 #: ../fuse/guestmount.pod:62
21348 " virt-filesystems MyGuest\n"
21353 #: ../fuse/guestmount.pod:64
21355 "If you want to trace the libguestfs calls but without excessive debugging "
21356 "information, we recommend:"
21360 #: ../fuse/guestmount.pod:67
21363 " guestmount [...] --trace /mnt\n"
21368 #: ../fuse/guestmount.pod:69
21369 msgid "If you want to debug the program, we recommend:"
21373 #: ../fuse/guestmount.pod:71
21376 " guestmount [...] --trace --verbose /mnt\n"
21381 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68 ../resize/virt-resize.pod:627
21386 #: ../fuse/guestmount.pod:75
21387 msgid "Other users cannot see the filesystem by default"
21391 #: ../fuse/guestmount.pod:77
21393 "If you mount a filesystem as one user (eg. root), then other users will not "
21394 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21395 "option when mounting:"
21399 #: ../fuse/guestmount.pod:81
21402 " sudo guestmount [...] -o allow_other /mnt\n"
21407 #: ../fuse/guestmount.pod:83
21408 msgid "Enabling FUSE"
21412 #: ../fuse/guestmount.pod:85
21414 "On some distros, you may need to add yourself to a special group "
21415 "(eg. C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21416 "Debian and derivatives."
21420 #: ../fuse/guestmount.pod:89
21422 "On other distros, no special group is required. It is not necessary on "
21423 "Fedora or Red Hat Enterprise Linux."
21427 #: ../fuse/guestmount.pod:100
21428 msgid "Add a block device or virtual machine image."
21432 #: ../fuse/guestmount.pod:123
21433 msgid "B<--dir-cache-timeout N>"
21437 #: ../fuse/guestmount.pod:125
21439 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21440 "seconds. The readdir cache [actually, there are several semi-independent "
21441 "caches] is populated after a readdir(2) call with the stat and extended "
21442 "attributes of the files in the directory, in anticipation that they will be "
21443 "requested soon after."
21447 #: ../fuse/guestmount.pod:131
21449 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21450 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21451 "requests, only cache existing ones."
21455 #: ../fuse/guestmount.pod:151
21457 "If you have untrusted raw-format guest disk images, you should use this "
21458 "option to specify the disk format. This avoids a possible security problem "
21459 "with malicious guests (CVE-2010-3851). See also "
21460 "L<guestfs(3)/guestfs_add_drive_opts>."
21464 #: ../fuse/guestmount.pod:156
21465 msgid "B<--fuse-help>"
21469 #: ../fuse/guestmount.pod:158
21470 msgid "Display help on special FUSE options (see I<-o> below)."
21474 #: ../fuse/guestmount.pod:162
21475 msgid "Display brief help and exit."
21479 #: ../fuse/guestmount.pod:186
21481 "Mount the named partition or logical volume on the given mountpoint B<in the "
21482 "guest> (this has nothing to do with mountpoints in the host)."
21486 #: ../fuse/guestmount.pod:189
21488 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21489 "something on C</>."
21493 #: ../fuse/guestmount.pod:206
21495 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21496 "unmounted. If you specify this option, then we don't attempt to sync the "
21497 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21501 #: ../fuse/guestmount.pod:211
21502 msgid "B<-o option>"
21506 #: ../fuse/guestmount.pod:213
21507 msgid "B<--option option>"
21511 #: ../fuse/guestmount.pod:215
21512 msgid "Pass extra options to FUSE."
21516 #: ../fuse/guestmount.pod:217
21518 "To get a list of all the extra options supported by FUSE, use the command "
21519 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21520 "of them are a good idea."
21524 #: ../fuse/guestmount.pod:221
21527 " guestmount --fuse-help\n"
21532 #: ../fuse/guestmount.pod:223
21533 msgid "Some potentially useful FUSE options:"
21537 #: ../fuse/guestmount.pod:227
21538 msgid "B<-o allow_other>"
21542 #: ../fuse/guestmount.pod:229
21543 msgid "Allow other users to see the filesystem."
21547 #: ../fuse/guestmount.pod:231
21548 msgid "B<-o attr_timeout=N>"
21552 #: ../fuse/guestmount.pod:233
21553 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21557 #: ../fuse/guestmount.pod:235
21558 msgid "B<-o kernel_cache>"
21562 #: ../fuse/guestmount.pod:237
21564 "Allow the kernel to cache files (reduces the number of reads that have to go "
21565 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21566 "afford the extra memory usage."
21570 #: ../fuse/guestmount.pod:241
21571 msgid "B<-o uid=N> B<-o gid=N>"
21575 #: ../fuse/guestmount.pod:243
21577 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21578 "the chosen values."
21582 #: ../fuse/guestmount.pod:252
21584 "Add devices and mount everything read-only. Also disallow writes and make "
21585 "the disk appear read-only to FUSE."
21589 #: ../fuse/guestmount.pod:255
21591 "This is highly recommended if you are not going to edit the guest disk. If "
21592 "the guest is running and this option is I<not> supplied, then there is a "
21593 "strong risk of disk corruption in the guest. We try to prevent this from "
21594 "happening, but it is not always possible."
21598 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:171
21599 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21603 #: ../fuse/guestmount.pod:264
21604 msgid "Enable SELinux support for the guest."
21608 #: ../fuse/guestmount.pod:270
21609 msgid "Enable verbose messages from underlying libguestfs."
21613 #: ../fuse/guestmount.pod:276
21614 msgid "Display the program version and exit."
21618 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308 ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
21619 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21623 #: ../fuse/guestmount.pod:289
21628 #: ../fuse/guestmount.pod:291
21629 msgid "Trace libguestfs calls and entry into each FUSE function."
21633 #: ../fuse/guestmount.pod:293
21634 msgid "This also stops the daemon from forking into the background."
21638 #: ../fuse/guestmount.pod:319
21640 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21641 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
21642 "L<http://fuse.sf.net/>."
21646 #: ../fuse/guestmount.pod:334
21647 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21651 #: ../inspector/virt-inspector.pod:5
21653 "virt-inspector - Display operating system version and other information "
21654 "about a virtual machine"
21658 #: ../inspector/virt-inspector.pod:9
21661 " virt-inspector [--options] -d domname\n"
21666 #: ../inspector/virt-inspector.pod:11
21669 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21674 #: ../inspector/virt-inspector.pod:15
21677 " virt-inspector domname\n"
21682 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
21685 " virt-inspector disk.img [disk.img ...]\n"
21690 #: ../inspector/virt-inspector.pod:21
21692 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21693 "determine the version of the operating system and other information about "
21694 "the virtual machine."
21698 #: ../inspector/virt-inspector.pod:25
21699 msgid "Virt-inspector produces XML output for feeding into other programs."
21703 #: ../inspector/virt-inspector.pod:27
21705 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21706 "the libvirt domain (see: C<virsh list --all>)."
21710 #: ../inspector/virt-inspector.pod:30
21712 "You can also run virt-inspector directly on disk images from a single "
21713 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
21714 "has several block devices, in which case you should list several I<-a> "
21715 "options one after another, with the first corresponding to the guest's "
21716 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
21720 #: ../inspector/virt-inspector.pod:37
21722 "You can also run virt-inspector on install disks, live CDs, bootable USB "
21723 "keys and similar."
21727 #: ../inspector/virt-inspector.pod:40
21729 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
21730 "inspect several virtual machines, you have to run virt-inspector several "
21731 "times (for example, from a shell script for-loop)."
21735 #: ../inspector/virt-inspector.pod:45
21737 "Because virt-inspector needs direct access to guest images, it won't "
21738 "normally work over remote libvirt connections."
21742 #: ../inspector/virt-inspector.pod:48
21744 "All of the information available from virt-inspector is also available "
21745 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
21746 "The same information can also be fetched using guestfish or via libguestfs "
21747 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
21748 "WITH OTHER PROGRAMMING LANGUAGES>)."
21752 #: ../inspector/virt-inspector.pod:81
21754 "Libvirt is only used if you specify a C<domname> on the command line. If "
21755 "you specify guest block devices directly (I<-a>), then libvirt is not used "
21760 #: ../inspector/virt-inspector.pod:94
21762 "When prompting for keys and passphrases, virt-inspector normally turns "
21763 "echoing off so you cannot see what you are typing. If you are not worried "
21764 "about Tempest attacks and there is no one else in the room you can specify "
21765 "this flag to see what you are typing."
21769 #: ../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
21771 "Specify the format of disk images given on the command line. If this is "
21772 "omitted then the format is autodetected from the content of the disk image."
21776 #: ../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
21778 "If disk images are requested from libvirt, then this program asks libvirt "
21779 "for this information. In this case, the value of the format parameter is "
21784 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:397 ../resize/virt-resize.pod:489 ../sparsify/virt-sparsify.pod:137 ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
21786 "If working with untrusted raw-format guest disk images, you should ensure "
21787 "the format is always specified."
21791 #: ../inspector/virt-inspector.pod:135
21792 msgid "B<--xpath> query"
21796 #: ../inspector/virt-inspector.pod:137
21798 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
21799 "In this mode virt-inspector simply runs an XPath query; all other inspection "
21800 "functions are disabled. See L</XPATH QUERIES> below for some examples."
21804 #: ../inspector/virt-inspector.pod:146
21805 msgid "Previous versions of virt-inspector allowed you to write either:"
21809 #: ../inspector/virt-inspector.pod:152
21812 " virt-inspector guestname\n"
21817 #: ../inspector/virt-inspector.pod:160
21822 #: ../inspector/virt-inspector.pod:162
21824 "The virt-inspector XML is described precisely in a RELAX NG schema file "
21825 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
21826 "just an overview."
21830 #: ../inspector/virt-inspector.pod:166
21832 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
21833 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
21834 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
21835 "which is vanishingly rare in real world VMs."
21839 #: ../inspector/virt-inspector.pod:171
21840 msgid "E<lt>operatingsystemE<gt>"
21844 #: ../inspector/virt-inspector.pod:173
21846 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
21847 "describe the operating system, its architecture, the descriptive \"product "
21848 "name\" string, the type of OS and so on, as in this example:"
21852 #: ../inspector/virt-inspector.pod:177
21855 " <operatingsystems>\n"
21856 " <operatingsystem>\n"
21857 " <root>/dev/sda2</root>\n"
21858 " <name>windows</name>\n"
21859 " <arch>i386</arch>\n"
21860 " <distro>windows</distro>\n"
21861 " <product_name>Windows 7 Enterprise</product_name>\n"
21862 " <product_variant>Client</product_variant>\n"
21863 " <major_version>6</major_version>\n"
21864 " <minor_version>1</minor_version>\n"
21865 " <windows_systemroot>/Windows</windows_systemroot>\n"
21866 " <format>installed</format>\n"
21871 #: ../inspector/virt-inspector.pod:190
21873 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
21874 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
21875 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
21876 "architecture. The other fields are fairly self-explanatory, but because "
21877 "these fields are taken directly from the libguestfs inspection API you can "
21878 "find precise information from L<guestfs(3)/INSPECTION>."
21882 #: ../inspector/virt-inspector.pod:198
21884 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
21885 "of view of libguestfs (block devices may have completely different names "
21886 "inside the VM itself)."
21890 #: ../inspector/virt-inspector.pod:202
21891 msgid "E<lt>mountpointsE<gt>"
21895 #: ../inspector/virt-inspector.pod:204
21897 "Un*x-like guests typically have multiple filesystems which are mounted at "
21898 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
21899 "element which looks like this:"
21903 #: ../inspector/virt-inspector.pod:208
21906 " <operatingsystems>\n"
21907 " <operatingsystem>\n"
21910 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
21911 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
21912 " </mountpoints>\n"
21917 #: ../inspector/virt-inspector.pod:216
21919 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
21920 "and may have completely different names inside the guest. Only mountable "
21921 "filesystems appear in this list, not things like swap devices."
21925 #: ../inspector/virt-inspector.pod:221
21926 msgid "E<lt>filesystemsE<gt>"
21930 #: ../inspector/virt-inspector.pod:223
21932 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
21933 "filesystems belonging to the guest, including swap and empty partitions. "
21934 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
21935 "this OS or shared with this OS and other OSes)."
21939 #: ../inspector/virt-inspector.pod:229
21940 msgid "You might see something like this:"
21944 #: ../inspector/virt-inspector.pod:231
21947 " <operatingsystems>\n"
21948 " <operatingsystem>\n"
21951 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21952 " <type>ext4</type>\n"
21953 " <label>Fedora-13-x86_64</label>\n"
21954 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
21960 #: ../inspector/virt-inspector.pod:241
21962 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
21963 "the label, and the UUID."
21967 #: ../inspector/virt-inspector.pod:244
21968 msgid "E<lt>applicationsE<gt>"
21972 #: ../inspector/virt-inspector.pod:246
21974 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
21975 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
21980 #: ../inspector/virt-inspector.pod:250
21982 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
21983 "Typical values would be C<rpm> and C<deb>."
21987 #: ../inspector/virt-inspector.pod:253
21989 "E<lt>package_managementE<gt>, if present, describes the package manager. "
21990 "Typical values include C<yum>, C<up2date> and C<apt>"
21994 #: ../inspector/virt-inspector.pod:256
21995 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
21999 #: ../inspector/virt-inspector.pod:259
22002 " <operatingsystems>\n"
22003 " <operatingsystem>\n"
22005 " <applications>\n"
22007 " <name>coreutils</name>\n"
22008 " <version>8.5</version>\n"
22009 " <release>1</release>\n"
22010 " </application>\n"
22015 #: ../inspector/virt-inspector.pod:269
22017 "The version and release fields may not be available for some types guests. "
22018 "Other fields are possible, see "
22019 "L<guestfs(3)/guestfs_inspect_list_applications>."
22023 #: ../inspector/virt-inspector.pod:273
22024 msgid "E<lt>drive_mappingsE<gt>"
22028 #: ../inspector/virt-inspector.pod:275
22030 "For operating systems like Windows which use drive letters, virt-inspector "
22031 "is able to find out how drive letters map to filesystems."
22035 #: ../inspector/virt-inspector.pod:279
22038 " <operatingsystems>\n"
22039 " <operatingsystem>\n"
22041 " <drive_mappings>\n"
22042 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
22043 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
22044 " </drive_mappings>\n"
22049 #: ../inspector/virt-inspector.pod:287
22051 "In the example above, drive C maps to the filesystem on the second partition "
22052 "on the first disk, and drive E maps to the filesystem on the first partition "
22053 "on the second disk."
22057 #: ../inspector/virt-inspector.pod:291
22059 "Note that this only covers permanent local filesystem mappings, not things "
22060 "like network shares. Furthermore NTFS volume mount points may not be listed "
22065 #: ../inspector/virt-inspector.pod:295
22066 msgid "E<lt>iconE<gt>"
22070 #: ../inspector/virt-inspector.pod:297
22072 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22073 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22074 "very large and high quality."
22078 #: ../inspector/virt-inspector.pod:301
22081 " <operatingsystems>\n"
22082 " <operatingsystem>\n"
22085 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22086 " [... many lines of base64 data ...]\n"
22092 #: ../inspector/virt-inspector.pod:309
22094 "To display the icon, you have to extract it and convert the base64 data back "
22095 "to a binary file. Use an XPath query or simply an editor to extract the "
22096 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22101 #: ../inspector/virt-inspector.pod:314
22104 " base64 -i -d < icon.data > icon.png\n"
22109 #: ../inspector/virt-inspector.pod:316
22110 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22114 #: ../inspector/virt-inspector.pod:318
22116 "Virt-inspector can detect some operating system installers on install disks, "
22117 "live CDs, bootable USB keys and more."
22121 #: ../inspector/virt-inspector.pod:321
22123 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22124 "fields may be present to indicate a live CD, network installer, or one part "
22125 "of a multipart CD. For example:"
22129 #: ../inspector/virt-inspector.pod:325
22132 " <operatingsystems>\n"
22133 " <operatingsystem>\n"
22134 " <root>/dev/sda</root>\n"
22135 " <name>linux</name>\n"
22136 " <arch>i386</arch>\n"
22137 " <distro>ubuntu</distro>\n"
22138 " <product_name>Ubuntu 10.10 "Maverick "
22139 "Meerkat"</product_name>\n"
22140 " <major_version>10</major_version>\n"
22141 " <minor_version>10</minor_version>\n"
22142 " <format>installer</format>\n"
22148 #: ../inspector/virt-inspector.pod:337
22149 msgid "XPATH QUERIES"
22153 #: ../inspector/virt-inspector.pod:339
22155 "Virt-inspector includes built in support for running XPath queries. The "
22156 "reason for including XPath support directly in virt-inspector is simply that "
22157 "there are no good and widely available command line programs that can do "
22158 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
22159 "available on Red Hat Enterprise Linux."
22163 #: ../inspector/virt-inspector.pod:346
22165 "To perform an XPath query, use the I<--xpath> option. Note that in this "
22166 "mode, virt-inspector simply reads XML from stdin and outputs the query "
22167 "result on stdout. All other inspection features are disabled in this mode."
22171 #: ../inspector/virt-inspector.pod:353
22174 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
22176 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22177 " <type>ext4</type>\n"
22183 #: ../inspector/virt-inspector.pod:359
22186 " $ virt-inspector -d Guest | \\\n"
22187 " virt-inspector --xpath "
22188 "\"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22194 #: ../inspector/virt-inspector.pod:363
22197 " $ virt-inspector -d Guest | \\\n"
22198 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
22199 " [displays the guest icon, if there is one]\n"
22204 #: ../inspector/virt-inspector.pod:374
22205 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22209 #: ../inspector/virt-inspector.pod:376
22211 "Early versions of libguestfs shipped with a different virt-inspector program "
22212 "written in Perl (the current version is written in C). The XML output of "
22213 "the Perl virt-inspector was different and it could also output in other "
22214 "formats like text."
22218 #: ../inspector/virt-inspector.pod:381
22219 msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
22223 #: ../inspector/virt-inspector.pod:384
22225 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22226 "versions of virt-inspector with different names:"
22230 #: ../inspector/virt-inspector.pod:387
22233 " virt-inspector Old Perl version.\n"
22234 " virt-inspector2 New C version.\n"
22239 #: ../inspector/virt-inspector.pod:397
22241 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
22242 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22246 #: ../inspector/virt-inspector.pod:414
22247 msgid "Matthew Booth L<mbooth@redhat.com>"
22251 #: ../java/examples/guestfs-java.pod:5
22252 msgid "guestfs-java - How to use libguestfs from Java"
22256 #: ../java/examples/guestfs-java.pod:9
22259 " import com.redhat.et.libguestfs.*;\n"
22264 #: ../java/examples/guestfs-java.pod:11
22267 " GuestFS g = new GuestFS ();\n"
22268 " g.add_drive_opts (\"disk.img\", null);\n"
22274 #: ../java/examples/guestfs-java.pod:17
22276 "This manual page documents how to call libguestfs from the Java programming "
22277 "language. This page just documents the differences from the C API and gives "
22278 "some examples. If you are not familiar with using libguestfs, you also need "
22279 "to read L<guestfs(3)>."
22283 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22284 msgid "CLOSING THE HANDLE"
22288 #: ../java/examples/guestfs-java.pod:24
22290 "The handle is closed when it is reaped by the garbage collector. Because "
22291 "libguestfs handles include a lot of state, it is also possible to close (and "
22292 "hence free) them explicitly by calling the C<close> method."
22296 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60 ../python/examples/guestfs-python.pod:21 ../ruby/examples/guestfs-ruby.pod:22
22301 #: ../java/examples/guestfs-java.pod:31
22303 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22304 "exception. This has a single parameter which is the error message (a "
22309 #: ../java/examples/guestfs-java.pod:35
22310 msgid "Calling any method on a closed handle raises the same exception."
22314 #: ../java/examples/guestfs-java.pod:47
22316 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22317 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22318 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22319 "L<http://caml.inria.fr/>."
22323 #: ../ocaml/examples/guestfs-ocaml.pod:5
22324 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22328 #: ../ocaml/examples/guestfs-ocaml.pod:9
22329 msgid "Module style:"
22333 #: ../ocaml/examples/guestfs-ocaml.pod:11
22336 " let g = Guestfs.create () in\n"
22337 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22338 " Guestfs.launch g;\n"
22343 #: ../ocaml/examples/guestfs-ocaml.pod:15
22344 msgid "Object-oriented style:"
22348 #: ../ocaml/examples/guestfs-ocaml.pod:17
22351 " let g = new Guestfs.guestfs () in\n"
22352 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22358 #: ../ocaml/examples/guestfs-ocaml.pod:21
22361 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22363 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22368 #: ../ocaml/examples/guestfs-ocaml.pod:27
22370 "This manual page documents how to call libguestfs from the OCaml programming "
22371 "language. This page just documents the differences from the C API and gives "
22372 "some examples. If you are not familiar with using libguestfs, you also need "
22373 "to read L<guestfs(3)>."
22377 #: ../ocaml/examples/guestfs-ocaml.pod:32
22378 msgid "PROGRAMMING STYLES"
22382 #: ../ocaml/examples/guestfs-ocaml.pod:34
22384 "There are two different programming styles supported by the OCaml bindings. "
22385 "You can use a module style, with each C function mapped to an OCaml "
22390 #: ../ocaml/examples/guestfs-ocaml.pod:38
22393 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22398 #: ../ocaml/examples/guestfs-ocaml.pod:40
22403 #: ../ocaml/examples/guestfs-ocaml.pod:42
22406 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22411 #: ../ocaml/examples/guestfs-ocaml.pod:44
22413 "Alternately you can use an object-oriented style, calling methods on the "
22414 "class C<Guestfs.guestfs>:"
22418 #: ../ocaml/examples/guestfs-ocaml.pod:47
22421 " method set_verbose : bool -> unit\n"
22426 #: ../ocaml/examples/guestfs-ocaml.pod:49
22428 "The object-oriented style is usually briefer, and the minor performance "
22429 "penalty isn't noticable in the general overhead of performing libguestfs "
22434 #: ../ocaml/examples/guestfs-ocaml.pod:55
22436 "The handle is closed when it is reaped by the garbage collector. Because "
22437 "libguestfs handles include a lot of state, it is also possible to close (and "
22438 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22443 #: ../ocaml/examples/guestfs-ocaml.pod:62
22445 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22446 "exception. This has a single parameter which is the error message (a "
22451 #: ../ocaml/examples/guestfs-ocaml.pod:66
22453 "Calling any function/method on a closed handle raises "
22454 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
22459 #: ../ocaml/examples/guestfs-ocaml.pod:80
22461 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22462 "L<guestfs-java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22463 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22464 "L<http://caml.inria.fr/>."
22468 #: ../perl/examples/guestfs-perl.pod:5
22469 msgid "guestfs-perl - How to use libguestfs from Perl"
22473 #: ../perl/examples/guestfs-perl.pod:9
22476 " use Sys::Guestfs;\n"
22481 #: ../perl/examples/guestfs-perl.pod:11
22484 " my $h = Sys::Guestfs->new ();\n"
22485 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22486 " $h->launch ();\n"
22487 " $h->mount_options ('', '/dev/sda1', '/');\n"
22488 " $h->touch ('/hello');\n"
22494 #: ../perl/examples/guestfs-perl.pod:20
22496 "This manual page documents how to call libguestfs from the Perl programming "
22497 "language. This page just documents the differences from the C API and gives "
22498 "some examples. If you are not familiar with using libguestfs, you also need "
22499 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22503 #: ../perl/examples/guestfs-perl.pod:26
22508 #: ../perl/examples/guestfs-perl.pod:28
22510 "Errors from libguestfs functions turn into calls to C<croak> (see "
22515 #: ../perl/examples/guestfs-perl.pod:41
22517 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, "
22518 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
22519 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
22520 "L<http://libguestfs.org/>."
22524 #: ../python/examples/guestfs-python.pod:5
22525 msgid "guestfs-python - How to use libguestfs from Python"
22529 #: ../python/examples/guestfs-python.pod:9
22532 " import guestfs\n"
22533 " g = guestfs.GuestFS ()\n"
22534 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22540 #: ../python/examples/guestfs-python.pod:16
22542 "This manual page documents how to call libguestfs from the Python "
22543 "programming language. This page just documents the differences from the C "
22544 "API and gives some examples. If you are not familiar with using libguestfs, "
22545 "you also need to read L<guestfs(3)>."
22549 #: ../python/examples/guestfs-python.pod:23
22551 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22552 "single string argument which is the error message."
22556 #: ../python/examples/guestfs-python.pod:26
22557 msgid "MORE DOCUMENTATION"
22561 #: ../python/examples/guestfs-python.pod:28
22566 #: ../python/examples/guestfs-python.pod:30
22570 " >>> import guestfs\n"
22571 " >>> help (guestfs)\n"
22576 #: ../python/examples/guestfs-python.pod:44
22578 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22579 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
22580 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22584 #: ../rescue/virt-rescue.pod:5
22585 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22589 #: ../rescue/virt-rescue.pod:9
22592 " virt-rescue [--options] -d domname\n"
22597 #: ../rescue/virt-rescue.pod:11
22600 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22605 #: ../rescue/virt-rescue.pod:15
22608 " virt-rescue [--options] domname\n"
22613 #: ../rescue/virt-rescue.pod:17
22616 " virt-rescue [--options] disk.img [disk.img ...]\n"
22621 #: ../rescue/virt-rescue.pod:21
22623 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22624 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22625 "you from doing this, but doesn't catch all cases."
22629 #: ../rescue/virt-rescue.pod:25
22631 "However if you use the I<--ro> (read only) option, then you can attach a "
22632 "shell to a live virtual machine. The results might be strange or "
22633 "inconsistent at times but you won't get disk corruption."
22637 #: ../rescue/virt-rescue.pod:31
22639 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22640 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22641 "recovery tools which you can use to examine or rescue a virtual machine or "
22646 #: ../rescue/virt-rescue.pod:36
22648 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
22649 "on disk image(s):"
22653 #: ../rescue/virt-rescue.pod:39
22656 " virt-rescue -d GuestName\n"
22661 #: ../rescue/virt-rescue.pod:41
22664 " virt-rescue --ro -a /path/to/disk.img\n"
22669 #: ../rescue/virt-rescue.pod:43
22672 " virt-rescue -a /dev/sdc\n"
22677 #: ../rescue/virt-rescue.pod:45
22678 msgid "For live VMs you I<must> use the --ro option."
22682 #: ../rescue/virt-rescue.pod:47
22684 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22685 "in an interactive bash shell where you can use many ordinary Linux "
22686 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
22687 "appliance. You must mount the virtual machine's filesystems by hand. There "
22688 "is an empty directory called C</sysroot> where you can mount filesystems."
22692 #: ../rescue/virt-rescue.pod:54
22694 "In the example below, we list logical volumes, then choose one to mount "
22695 "under C</sysroot>:"
22699 #: ../rescue/virt-rescue.pod:57
22703 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
22704 " lv_root vg_f11x64 -wi-a- 8.83G\n"
22705 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
22706 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
22707 " ><rescue> ls /sysroot\n"
22712 #: ../rescue/virt-rescue.pod:64
22714 "If you don't know what filesystems are available on the virtual machine then "
22715 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
22719 #: ../rescue/virt-rescue.pod:70
22721 "Virt-rescue can be used on I<any> disk image file or device, not just a "
22722 "virtual machine. For example you can use it on a blank file if you want to "
22723 "partition that file (although we would recommend using L<guestfish(1)> "
22724 "instead as it is more suitable for this purpose). You can even use "
22725 "virt-rescue on things like SD cards."
22729 #: ../rescue/virt-rescue.pod:76
22731 "Virt-rescue does not require root. You only need to run it as root if you "
22732 "need root to open the disk image."
22736 #: ../rescue/virt-rescue.pod:79
22738 "This tool is just designed for quick interactive hacking on a virtual "
22739 "machine. For more structured access to a virtual machine disk image, you "
22740 "should use L<guestfs(3)>. To get a structured shell that you can use to "
22741 "make scripted changes to guests, use L<guestfish(1)>."
22745 #: ../rescue/virt-rescue.pod:103
22746 msgid "B<--append kernelopts>"
22750 #: ../rescue/virt-rescue.pod:105
22751 msgid "Pass additional options to the rescue kernel."
22755 #: ../rescue/virt-rescue.pod:135
22758 " virt-rescue --format=raw -a disk.img\n"
22763 #: ../rescue/virt-rescue.pod:139
22766 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
22771 #: ../rescue/virt-rescue.pod:148
22776 #: ../rescue/virt-rescue.pod:150
22777 msgid "B<--memsize MB>"
22781 #: ../rescue/virt-rescue.pod:152
22783 "Change the amount of memory allocated to the rescue system. The default is "
22784 "set by libguestfs and is small but adequate for running system tools. The "
22785 "occasional program might need more memory. The parameter is specified in "
22790 #: ../rescue/virt-rescue.pod:157
22791 msgid "B<--network>"
22795 #: ../rescue/virt-rescue.pod:159
22796 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
22800 #: ../rescue/virt-rescue.pod:165
22801 msgid "Open the image read-only."
22805 #: ../rescue/virt-rescue.pod:175
22807 "Enable SELinux in the rescue appliance. You should read "
22808 "L<guestfs(3)/SELINUX> before using this option."
22812 #: ../rescue/virt-rescue.pod:178
22817 #: ../rescue/virt-rescue.pod:180
22818 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
22822 #: ../rescue/virt-rescue.pod:198
22824 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
22825 "are done read-write."
22829 #: ../rescue/virt-rescue.pod:211
22830 msgid "Previous versions of virt-rescue allowed you to write either:"
22834 #: ../rescue/virt-rescue.pod:213
22837 " virt-rescue disk.img [disk.img ...]\n"
22842 #: ../rescue/virt-rescue.pod:217
22845 " virt-rescue guestname\n"
22850 #: ../rescue/virt-rescue.pod:225
22855 #: ../rescue/virt-rescue.pod:227
22857 "Adding the I<--network> option enables QEMU user networking in the rescue "
22858 "appliance. There are some differences between user networking and ordinary "
22863 #: ../rescue/virt-rescue.pod:233
22864 msgid "ping does not work"
22868 #: ../rescue/virt-rescue.pod:235
22870 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
22871 "send the ping packets, and because virt-rescue must be able to run as "
22872 "non-root, QEMU user networking is not able to emulate the L<ping(8)> "
22873 "command. The ping command will appear to resolve addresses but will not be "
22874 "able to send or receive any packets. This does not mean that the network is "
22879 #: ../rescue/virt-rescue.pod:242
22880 msgid "cannot receive connections"
22884 #: ../rescue/virt-rescue.pod:244
22885 msgid "QEMU user networking cannot receive incoming connections."
22889 #: ../rescue/virt-rescue.pod:246
22890 msgid "making TCP connections"
22894 #: ../rescue/virt-rescue.pod:248
22896 "The virt-rescue appliance needs to be small and so does not include many "
22897 "network tools. In particular there is no L<telnet(1)> command. You can "
22898 "make TCP connections from the shell using the magical "
22899 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
22903 #: ../rescue/virt-rescue.pod:253
22906 " exec 3<>/dev/tcp/redhat.com/80\n"
22907 " echo \"GET /\" >&3\n"
22913 #: ../rescue/virt-rescue.pod:257
22914 msgid "See L<bash(1)> for more details."
22918 #: ../rescue/virt-rescue.pod:263
22920 "Several environment variables affect virt-rescue. See "
22921 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
22925 #: ../rescue/virt-rescue.pod:290
22927 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22928 "L<http://libguestfs.org/>."
22932 #: ../resize/virt-resize.pod:5
22933 msgid "virt-resize - Resize a virtual machine disk"
22937 #: ../resize/virt-resize.pod:9
22940 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
22941 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
22942 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
22947 #: ../resize/virt-resize.pod:15
22949 "Virt-resize is a tool which can resize a virtual machine disk, making it "
22950 "larger or smaller overall, and resizing or deleting any partitions contained "
22955 #: ../resize/virt-resize.pod:19
22957 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
22958 "not> be used on live virtual machines - for consistent results, shut the "
22959 "virtual machine down before resizing it."
22963 #: ../resize/virt-resize.pod:23
22965 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
22966 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
22970 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:603 ../sparsify/virt-sparsify.pod:208 ../src/guestfs.pod:484 ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
22975 #: ../resize/virt-resize.pod:33
22977 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
22978 "fill the extra 5GB of space."
22982 #: ../resize/virt-resize.pod:36
22985 " virt-filesystems --long -h --all -a olddisk\n"
22990 #: ../resize/virt-resize.pod:38
22993 " truncate -r olddisk newdisk\n"
22994 " truncate -s +5G newdisk\n"
22999 #: ../resize/virt-resize.pod:41
23002 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
23003 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
23008 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:215 ../src/guestfs.pod:490 ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
23013 #: ../resize/virt-resize.pod:46
23015 "As above, but make the /boot partition 200MB bigger, while giving the "
23016 "remaining space to /dev/sda2:"
23020 #: ../resize/virt-resize.pod:49
23023 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23024 " olddisk newdisk\n"
23029 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:616 ../sparsify/virt-sparsify.pod:221 ../src/guestfs.pod:501 ../src/guestfs.pod:1451
23034 #: ../resize/virt-resize.pod:54
23036 "As in the first example, but expand a logical volume as the final step. "
23037 "This is what you would typically use for Linux guests that use LVM:"
23041 #: ../resize/virt-resize.pod:58
23044 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
23045 " olddisk newdisk\n"
23050 #: ../resize/virt-resize.pod:61
23055 #: ../resize/virt-resize.pod:63
23057 "As in the first example, but the output format will be qcow2 instead of a "
23062 #: ../resize/virt-resize.pod:66
23065 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
23066 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23071 #: ../resize/virt-resize.pod:71
23072 msgid "DETAILED USAGE"
23076 #: ../resize/virt-resize.pod:73
23077 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23081 #: ../resize/virt-resize.pod:77
23082 msgid "1. Shut down the virtual machine"
23086 #: ../resize/virt-resize.pod:79
23087 msgid "2. Locate input disk image"
23091 #: ../resize/virt-resize.pod:81
23093 "Locate the input disk image (ie. the file or device on the host containing "
23094 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23095 "dumpxml> like this to find the disk image name:"
23099 #: ../resize/virt-resize.pod:85
23102 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23103 " Found 1 nodes:\n"
23105 " <source dev=\"/dev/vg/lv_guest\" />\n"
23110 #: ../resize/virt-resize.pod:90
23111 msgid "3. Look at current sizing"
23115 #: ../resize/virt-resize.pod:92
23116 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23120 #: ../resize/virt-resize.pod:95
23123 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23124 " Name Type Size Parent\n"
23125 " /dev/sda1 partition 101M /dev/sda\n"
23126 " /dev/sda2 partition 7.9G /dev/sda\n"
23127 " /dev/sda device 8.0G -\n"
23132 #: ../resize/virt-resize.pod:101
23134 "(This example is a virtual machine with an 8 GB disk which we would like to "
23135 "expand up to 10 GB)."
23139 #: ../resize/virt-resize.pod:104
23140 msgid "4. Create output disk"
23144 #: ../resize/virt-resize.pod:106
23146 "Virt-resize cannot do in-place disk modifications. You have to have space "
23147 "to store the resized output disk."
23151 #: ../resize/virt-resize.pod:109
23152 msgid "To store the resized disk image in a file, create a file of a suitable size:"
23156 #: ../resize/virt-resize.pod:112
23159 " # rm -f outdisk\n"
23160 " # truncate -s 10G outdisk\n"
23165 #: ../resize/virt-resize.pod:115
23166 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23170 #: ../resize/virt-resize.pod:117
23173 " # lvcreate -L 10G -n lv_name vg_name\n"
23178 #: ../resize/virt-resize.pod:119
23179 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23183 #: ../resize/virt-resize.pod:121
23186 " # virsh pool-list\n"
23187 " # virsh vol-create-as poolname newvol 10G\n"
23192 #: ../resize/virt-resize.pod:124
23197 #: ../resize/virt-resize.pod:126
23199 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23200 "file) and the output disk. The output disk is the one created in the "
23205 #: ../resize/virt-resize.pod:130
23208 " # virt-resize indisk outdisk\n"
23213 #: ../resize/virt-resize.pod:132
23215 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23216 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23217 "larger, then an extra, empty partition is created at the end of the disk "
23218 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23223 #: ../resize/virt-resize.pod:138
23225 "More realistically you'd want to expand existing partitions in the disk "
23226 "image by passing extra options (for the full list see the L</OPTIONS> "
23231 #: ../resize/virt-resize.pod:142
23233 "L</--expand> is the most useful option. It expands the named partition "
23234 "within the disk to fill any extra space:"
23238 #: ../resize/virt-resize.pod:145
23241 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23246 #: ../resize/virt-resize.pod:147
23248 "(In this case, an extra partition is I<not> created at the end of the disk, "
23249 "because there will be no unused space)."
23253 #: ../resize/virt-resize.pod:150
23255 "L</--resize> is the other commonly used option. The following would "
23256 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23257 "rest of the available space:"
23261 #: ../resize/virt-resize.pod:154
23264 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23265 " indisk outdisk\n"
23270 #: ../resize/virt-resize.pod:157
23272 "If the expanded partition in the image contains a filesystem or LVM PV, then "
23273 "if virt-resize knows how, it will resize the contents, the equivalent of "
23274 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23275 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23276 "filesystems, so you would have to online resize them after booting the "
23281 #: ../resize/virt-resize.pod:164
23282 msgid "Other options are covered below."
23286 #: ../resize/virt-resize.pod:166
23291 #: ../resize/virt-resize.pod:168
23292 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23296 #: ../resize/virt-resize.pod:170
23297 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23301 #: ../resize/virt-resize.pod:172
23304 " # virsh edit guestname\n"
23309 #: ../resize/virt-resize.pod:174
23311 "Change E<lt>source ...E<gt>, see "
23312 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
23316 #: ../resize/virt-resize.pod:177
23317 msgid "Then start up the domain with the new, resized disk:"
23321 #: ../resize/virt-resize.pod:179
23324 " # virsh start guestname\n"
23329 #: ../resize/virt-resize.pod:181
23331 "and check that it still works. See also the L</NOTES> section below for "
23332 "additional information."
23336 #: ../resize/virt-resize.pod:184
23337 msgid "7. Resize LVs etc inside the guest"
23341 #: ../resize/virt-resize.pod:186
23342 msgid "(This can also be done offline using L<guestfish(1)>)"
23346 #: ../resize/virt-resize.pod:188
23348 "Once the guest has booted you should see the new space available, at least "
23349 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23350 "may need to resize LVs inside PVs, and also resize filesystem types that "
23351 "virt-resize does not know how to expand."
23355 #: ../resize/virt-resize.pod:195
23356 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23360 #: ../resize/virt-resize.pod:197
23362 "Shrinking is somewhat more complex than expanding, and only an overview is "
23367 #: ../resize/virt-resize.pod:200
23369 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23370 "filesystems). The user has to shrink content before passing the disk image "
23371 "to virt-resize, and virt-resize will check that the content has been shrunk "
23376 #: ../resize/virt-resize.pod:205
23377 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23381 #: ../resize/virt-resize.pod:207
23383 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23384 "steps 3 and 4 above to allocate a new disk image."
23388 #: ../resize/virt-resize.pod:210
23389 msgid "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23393 #: ../resize/virt-resize.pod:213
23394 msgid "IGNORING OR DELETING PARTITIONS"
23398 #: ../resize/virt-resize.pod:215
23400 "virt-resize also gives a convenient way to ignore or delete partitions when "
23401 "copying from the input disk to the output disk. Ignoring a partition speeds "
23402 "up the copy where you don't care about the existing contents of a "
23403 "partition. Deleting a partition removes it completely, but note that it "
23404 "also renumbers any partitions after the one which is deleted, which can "
23405 "leave some guests unbootable."
23409 #: ../resize/virt-resize.pod:222
23410 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23414 #: ../resize/virt-resize.pod:224
23416 "If the input disk is in qcow2 format, then you may prefer that the output is "
23417 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23418 "the fly. The output format is simply determined by the format of the empty "
23419 "output container that you provide. Thus to create qcow2 output, use:"
23423 #: ../resize/virt-resize.pod:230
23426 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23431 #: ../resize/virt-resize.pod:232
23432 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23436 #: ../resize/virt-resize.pod:234
23437 msgid "Similarly, to get non-sparse raw output use:"
23441 #: ../resize/virt-resize.pod:236
23444 " fallocate -l size outdisk\n"
23449 #: ../resize/virt-resize.pod:238
23451 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
23452 "if=/dev/zero of=outdisk bs=1M count=..>)"
23456 #: ../resize/virt-resize.pod:241
23457 msgid "LOGICAL PARTITIONS"
23461 #: ../resize/virt-resize.pod:243
23463 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23464 "tables) cannot be resized."
23468 #: ../resize/virt-resize.pod:246
23470 "To understand what is going on, firstly one of the four partitions "
23471 "C</dev/sda1-4> will have MBR partition type C<05> or C<0f>. This is called "
23472 "the B<extended partition>. Use L<virt-filesystems(1)> to see the MBR "
23477 #: ../resize/virt-resize.pod:251
23478 msgid "Logical partitions live inside the extended partition."
23482 #: ../resize/virt-resize.pod:253
23484 "The extended partition can be expanded, but not shrunk (unless you force it, "
23485 "which is not advisable). When the extended partition is copied across, all "
23486 "the logical partitions contained inside are copied over implicitly. "
23487 "Virt-resize does not look inside the extended partition, so it copies the "
23488 "logical partitions blindly."
23492 #: ../resize/virt-resize.pod:259
23494 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
23495 "line. Doing so will give an error."
23499 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23500 msgid "Display help."
23504 #: ../resize/virt-resize.pod:270
23505 msgid "B<--align-first auto>"
23509 #: ../resize/virt-resize.pod:272
23510 msgid "B<--align-first never>"
23514 #: ../resize/virt-resize.pod:274
23515 msgid "B<--align-first always>"
23519 #: ../resize/virt-resize.pod:276
23521 "Align the first partition for improved performance (see also the "
23522 "I<--alignment> option)."
23526 #: ../resize/virt-resize.pod:279
23528 "The default is I<--align-first auto> which only aligns the first partition "
23529 "if it is safe to do so. That is, only when we know how to fix the "
23530 "bootloader automatically, and at the moment that can only be done for "
23535 #: ../resize/virt-resize.pod:284
23537 "I<--align-first never> means we never move the first partition. This is the "
23538 "safest option. Try this if the guest does not boot after resizing."
23542 #: ../resize/virt-resize.pod:288
23544 "I<--align-first always> means we always align the first partition (if it "
23545 "needs to be aligned). For some guests this will break the bootloader, "
23546 "making the guest unbootable."
23550 #: ../resize/virt-resize.pod:292
23551 msgid "B<--alignment N>"
23555 #: ../resize/virt-resize.pod:294
23557 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
23558 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
23562 #: ../resize/virt-resize.pod:298
23564 "Assuming 512 byte sector size inside the guest, here are some suitable "
23569 #: ../resize/virt-resize.pod:303
23570 msgid "I<--alignment 1> (512 bytes)"
23574 #: ../resize/virt-resize.pod:305
23576 "The partitions would be packed together as closely as possible, but would be "
23577 "completely unaligned. In some cases this can cause very poor performance. "
23578 "See L<virt-alignment-scan(1)> for further details."
23582 #: ../resize/virt-resize.pod:309
23583 msgid "I<--alignment 8> (4K)"
23587 #: ../resize/virt-resize.pod:311
23589 "This would be the minimum acceptable alignment for reasonable performance on "
23594 #: ../resize/virt-resize.pod:314
23595 msgid "I<--alignment 128> (64K)"
23599 #: ../resize/virt-resize.pod:316
23601 "This alignment provides good performance when the host is using high end "
23606 #: ../resize/virt-resize.pod:319
23607 msgid "I<--alignment 2048> (1M)"
23611 #: ../resize/virt-resize.pod:321
23613 "This is the standard alignment used by all newly installed guests since "
23618 #: ../resize/virt-resize.pod:326
23623 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:120
23628 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
23629 msgid "Enable debugging messages."
23633 #: ../resize/virt-resize.pod:332 ../sparsify/virt-sparsify.pod:124
23634 msgid "B<--debug-gc>"
23638 #: ../resize/virt-resize.pod:334
23640 "Debug garbage collection and memory allocation. This is only useful when "
23641 "debugging memory problems in virt-resize or the OCaml libguestfs bindings."
23645 #: ../resize/virt-resize.pod:338
23646 msgid "B<--delete part>"
23650 #: ../resize/virt-resize.pod:340
23652 "Delete the named partition. It would be more accurate to describe this as "
23653 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
23654 "the original disk image is left intact."
23658 #: ../resize/virt-resize.pod:344
23660 "Note that when you delete a partition, then anything contained in the "
23661 "partition is also deleted. Furthermore, this causes any partitions that "
23662 "come after to be I<renumbered>, which can easily make your guest unbootable."
23666 #: ../resize/virt-resize.pod:349 ../resize/virt-resize.pod:410 ../resize/virt-resize.pod:537 ../sparsify/virt-sparsify.pod:150
23667 msgid "You can give this option multiple times."
23671 #: ../resize/virt-resize.pod:351
23672 msgid "B<--expand part>"
23676 #: ../resize/virt-resize.pod:353
23678 "Expand the named partition so it uses up all extra space (space left over "
23679 "after any other resize changes that you request have been done)."
23683 #: ../resize/virt-resize.pod:356
23685 "If virt-resize knows how, it will expand the direct content of the "
23686 "partition. For example, if the partition is an LVM PV, it will expand the "
23687 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
23688 "content it doesn't know about alone."
23692 #: ../resize/virt-resize.pod:361
23693 msgid "Currently virt-resize can resize:"
23697 #: ../resize/virt-resize.pod:367
23698 msgid "ext2, ext3 and ext4 filesystems."
23702 #: ../resize/virt-resize.pod:371
23703 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
23707 #: ../resize/virt-resize.pod:373
23709 "The filesystem must have been shut down consistently last time it was used. "
23710 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
23711 "consistency check, so at the first boot after resizing Windows will check "
23716 #: ../resize/virt-resize.pod:380
23718 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
23719 "inside the PV, but see the I<--LV-expand> option. The user could also "
23720 "resize LVs as desired after boot."
23724 #: ../resize/virt-resize.pod:386
23725 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
23729 #: ../resize/virt-resize.pod:390 ../resize/virt-resize.pod:565
23730 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
23734 #: ../resize/virt-resize.pod:392 ../sparsify/virt-sparsify.pod:130 ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
23735 msgid "B<--format> raw"
23739 #: ../resize/virt-resize.pod:394 ../sparsify/virt-sparsify.pod:134
23741 "Specify the format of the input disk image. If this flag is not given then "
23742 "it is auto-detected from the image itself."
23746 #: ../resize/virt-resize.pod:400
23748 "Note that this option I<does not> affect the output format. See L</QCOW2 "
23749 "AND NON-SPARSE RAW FORMATS>."
23753 #: ../resize/virt-resize.pod:403
23754 msgid "B<--ignore part>"
23758 #: ../resize/virt-resize.pod:405
23760 "Ignore the named partition. Effectively this means the partition is "
23761 "allocated on the destination disk, but the content is not copied across from "
23762 "the source disk. The content of the partition will be blank (all zero "
23767 #: ../resize/virt-resize.pod:412
23768 msgid "B<--LV-expand logvol>"
23772 #: ../resize/virt-resize.pod:414
23774 "This takes the logical volume and, as a final step, expands it to fill all "
23775 "the space available in its volume group. A typical usage, assuming a Linux "
23776 "guest with a single PV C</dev/sda2> and a root device called "
23777 "C</dev/vg_guest/lv_root> would be:"
23781 #: ../resize/virt-resize.pod:419
23784 " virt-resize indisk outdisk \\\n"
23785 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
23790 #: ../resize/virt-resize.pod:422
23792 "This would first expand the partition (and PV), and then expand the root "
23793 "device to fill the extra space in the PV."
23797 #: ../resize/virt-resize.pod:425
23799 "The contents of the LV are also resized if virt-resize knows how to do "
23800 "that. You can stop virt-resize from trying to expand the content by using "
23801 "the option I<--no-expand-content>."
23805 #: ../resize/virt-resize.pod:429
23806 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
23810 #: ../resize/virt-resize.pod:431
23812 "You can give this option multiple times, I<but> it doesn't make sense to do "
23813 "this unless the logical volumes you specify are all in different volume "
23818 #: ../resize/virt-resize.pod:435 ../sparsify/virt-sparsify.pod:152
23819 msgid "B<--machine-readable>"
23823 #: ../resize/virt-resize.pod:437 ../sparsify/virt-sparsify.pod:154
23825 "This option is used to make the output more machine friendly when being "
23826 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
23830 #: ../resize/virt-resize.pod:443
23831 msgid "B<--dryrun>"
23835 #: ../resize/virt-resize.pod:445
23836 msgid "Print a summary of what would be done, but don't do anything."
23840 #: ../resize/virt-resize.pod:447
23841 msgid "B<--no-copy-boot-loader>"
23845 #: ../resize/virt-resize.pod:449
23847 "By default, virt-resize copies over some sectors at the start of the disk "
23848 "(up to the beginning of the first partition). Commonly these sectors "
23849 "contain the Master Boot Record (MBR) and the boot loader, and are required "
23850 "in order for the guest to boot correctly."
23854 #: ../resize/virt-resize.pod:454
23856 "If you specify this flag, then this initial copy is not done. You may need "
23857 "to reinstall the boot loader in this case."
23861 #: ../resize/virt-resize.pod:457
23862 msgid "B<--no-extra-partition>"
23866 #: ../resize/virt-resize.pod:459
23868 "By default, virt-resize creates an extra partition if there is any extra, "
23869 "unused space after all resizing has happened. Use this option to prevent "
23870 "the extra partition from being created. If you do this then the extra space "
23871 "will be inaccessible until you run fdisk, parted, or some other partitioning "
23872 "tool in the guest."
23876 #: ../resize/virt-resize.pod:465
23878 "Note that if the surplus space is smaller than 10 MB, no extra partition "
23883 #: ../resize/virt-resize.pod:468
23884 msgid "B<--no-expand-content>"
23888 #: ../resize/virt-resize.pod:470
23890 "By default, virt-resize will try to expand the direct contents of "
23891 "partitions, if it knows how (see I<--expand> option above)."
23895 #: ../resize/virt-resize.pod:473
23897 "If you give the I<--no-expand-content> option then virt-resize will not "
23902 #: ../resize/virt-resize.pod:476
23903 msgid "B<--ntfsresize-force>"
23907 #: ../resize/virt-resize.pod:478
23909 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
23910 "the NTFS disk is marked as needing a consistency check. You have to use "
23911 "this option if you want to resize a Windows guest multiple times without "
23912 "booting into Windows between each resize."
23916 #: ../resize/virt-resize.pod:484
23917 msgid "B<--output-format> raw"
23921 #: ../resize/virt-resize.pod:486
23923 "Specify the format of the output disk image. If this flag is not given then "
23924 "it is auto-detected from the image itself."
23928 #: ../resize/virt-resize.pod:492
23930 "Note that this option I<does not create> the output format. This option "
23931 "just tells libguestfs what it is so it doesn't try to guess it. You still "
23932 "need to create the output disk with the right format. See L</QCOW2 AND "
23933 "NON-SPARSE RAW FORMATS>."
23937 #: ../resize/virt-resize.pod:501
23938 msgid "Don't print the summary."
23942 #: ../resize/virt-resize.pod:503
23943 msgid "B<--resize part=size>"
23947 #: ../resize/virt-resize.pod:505
23949 "Resize the named partition (expanding or shrinking it) so that it has the "
23954 #: ../resize/virt-resize.pod:508
23956 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
23957 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
23958 "size; or as a relative number or percentage. For example:"
23962 #: ../resize/virt-resize.pod:514
23965 " --resize /dev/sda2=10G\n"
23970 #: ../resize/virt-resize.pod:516
23973 " --resize /dev/sda4=90%\n"
23978 #: ../resize/virt-resize.pod:518
23981 " --resize /dev/sda2=+1G\n"
23986 #: ../resize/virt-resize.pod:520
23989 " --resize /dev/sda2=-200M\n"
23994 #: ../resize/virt-resize.pod:522
23997 " --resize /dev/sda1=+128K\n"
24002 #: ../resize/virt-resize.pod:524
24005 " --resize /dev/sda1=+10%\n"
24010 #: ../resize/virt-resize.pod:526
24013 " --resize /dev/sda1=-10%\n"
24018 #: ../resize/virt-resize.pod:528
24020 "You can increase the size of any partition. Virt-resize will expand the "
24021 "direct content of the partition if it knows how (see I<--expand> below)."
24025 #: ../resize/virt-resize.pod:532
24027 "You can only I<decrease> the size of partitions that contain filesystems or "
24028 "PVs which have already been shrunk. Virt-resize will check this has been "
24029 "done before proceeding, or else will print an error (see also "
24030 "I<--resize-force>)."
24034 #: ../resize/virt-resize.pod:539
24035 msgid "B<--resize-force part=size>"
24039 #: ../resize/virt-resize.pod:541
24041 "This is the same as I<--resize> except that it will let you decrease the "
24042 "size of any partition. Generally this means you will lose any data which "
24043 "was at the end of the partition you shrink, but you may not care about that "
24044 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24045 "as a swap partition)."
24049 #: ../resize/virt-resize.pod:547
24050 msgid "See also the I<--ignore> option."
24054 #: ../resize/virt-resize.pod:549
24055 msgid "B<--shrink part>"
24059 #: ../resize/virt-resize.pod:551
24061 "Shrink the named partition until the overall disk image fits in the "
24062 "destination. The named partition B<must> contain a filesystem or PV which "
24063 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24064 "online tools). Virt-resize will check this and give an error if it has not "
24069 #: ../resize/virt-resize.pod:557
24071 "The amount by which the overall disk must be shrunk (after carrying out all "
24072 "other operations requested by the user) is called the \"deficit\". For "
24073 "example, a straight copy (assume no other operations) from a 5GB disk image "
24074 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24075 "would give an error unless the user specified a partition to shrink and that "
24076 "partition had more than a gigabyte of free space."
24080 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:182
24081 msgid "MACHINE READABLE OUTPUT"
24085 #: ../resize/virt-resize.pod:577
24087 "The I<--machine-readable> option can be used to make the output more machine "
24088 "friendly, which is useful when calling virt-resize from other programs, GUIs "
24093 #: ../resize/virt-resize.pod:581 ../sparsify/virt-sparsify.pod:188
24094 msgid "There are two ways to use this option."
24098 #: ../resize/virt-resize.pod:583
24100 "Firstly use the option on its own to query the capabilities of the "
24101 "virt-resize binary. Typical output looks like this:"
24105 #: ../resize/virt-resize.pod:586
24108 " $ virt-resize --machine-readable\n"
24110 " ntfsresize-force\n"
24118 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:198
24120 "A list of features is printed, one per line, and the program exits with "
24125 #: ../resize/virt-resize.pod:596 ../sparsify/virt-sparsify.pod:201
24127 "Secondly use the option in conjunction with other options to make the "
24128 "regular program output more machine friendly."
24132 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:204
24133 msgid "At the moment this means:"
24137 #: ../resize/virt-resize.pod:605 ../sparsify/virt-sparsify.pod:210
24139 "Progress bar messages can be parsed from stdout by looking for this regular "
24144 #: ../resize/virt-resize.pod:608 ../sparsify/virt-sparsify.pod:213
24147 " ^[0-9]+/[0-9]+$\n"
24152 #: ../resize/virt-resize.pod:612 ../sparsify/virt-sparsify.pod:217
24154 "The calling program should treat messages sent to stdout (except for "
24155 "progress bar messages) as status messages. They can be logged and/or "
24156 "displayed to the user."
24160 #: ../resize/virt-resize.pod:618
24162 "The calling program should treat messages sent to stderr as error messages. "
24163 "In addition, virt-resize exits with a non-zero status code if there was a "
24168 #: ../resize/virt-resize.pod:624
24170 "Versions of the program prior to 1.13.9 did not support the "
24171 "I<--machine-readable> option and will return an error."
24175 #: ../resize/virt-resize.pod:629
24176 msgid "\"Partition 1 does not end on cylinder boundary.\""
24180 #: ../resize/virt-resize.pod:631
24182 "Virt-resize aligns partitions to multiples of 128 sectors (see the "
24183 "I<--alignment> parameter). Usually this means the partitions will not be "
24184 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24185 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
24186 "drives. Alignment of partitions to cylinders is not required by any modern "
24187 "operating system."
24191 #: ../resize/virt-resize.pod:638
24192 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24196 #: ../resize/virt-resize.pod:640
24198 "In Windows Vista and later versions, Microsoft switched to using a separate "
24199 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24200 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24201 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24202 "the second partition (ie. C: drive) should work."
24206 #: ../resize/virt-resize.pod:647
24208 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24209 "NTFS partitions have been expanded. This is just a safety check and (unless "
24210 "it find errors) is nothing to worry about."
24214 #: ../resize/virt-resize.pod:651
24215 msgid "GUEST BOOT STUCK AT \"GRUB\""
24219 #: ../resize/virt-resize.pod:653
24221 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24222 "printing C<GRUB> on the console, try reinstalling grub."
24226 #: ../resize/virt-resize.pod:656
24229 " guestfish -i -a newdisk\n"
24230 " ><fs> cat /boot/grub/device.map\n"
24231 " # check the contents of this file are sensible or\n"
24232 " # edit the file if necessary\n"
24233 " ><fs> grub-install / /dev/vda\n"
24239 #: ../resize/virt-resize.pod:663
24241 "For more flexible guest reconfiguration, including if you need to specify "
24242 "other parameters to grub-install, use L<virt-rescue(1)>."
24246 #: ../resize/virt-resize.pod:666
24247 msgid "ALTERNATIVE TOOLS"
24251 #: ../resize/virt-resize.pod:668
24253 "There are several proprietary tools for resizing partitions. We won't "
24254 "mention any here."
24258 #: ../resize/virt-resize.pod:671
24260 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24261 "operations on disk images. They can resize and move partitions, but I don't "
24262 "think they can do anything with the contents, and they certainly don't "
24267 #: ../resize/virt-resize.pod:676
24269 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24270 "but at a much lower level. You will probably end up hand-calculating sector "
24271 "offsets, which is something that virt-resize was designed to avoid. If you "
24272 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24277 #: ../resize/virt-resize.pod:696
24279 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
24280 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
24281 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
24282 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
24283 "L<virt-sparsify(1)>, L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24287 #: ../ruby/examples/guestfs-ruby.pod:5
24288 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24292 #: ../ruby/examples/guestfs-ruby.pod:9
24295 " require 'guestfs'\n"
24296 " g = Guestfs::Guestfs.new()\n"
24297 " g.add_drive_opts(\"disk.img\",\n"
24298 " :readonly => 1, :format => \"raw\")\n"
24304 #: ../ruby/examples/guestfs-ruby.pod:17
24306 "This manual page documents how to call libguestfs from the Ruby programming "
24307 "language. This page just documents the differences from the C API and gives "
24308 "some examples. If you are not familiar with using libguestfs, you also need "
24309 "to read L<guestfs(3)>."
24313 #: ../ruby/examples/guestfs-ruby.pod:24
24315 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24316 "This has a single parameter which is the error message (a string)."
24320 #: ../ruby/examples/guestfs-ruby.pod:38
24322 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
24323 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
24324 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24328 #: ../sparsify/virt-sparsify.pod:5
24329 msgid "virt-sparsify - Make a virtual machine disk sparse"
24333 #: ../sparsify/virt-sparsify.pod:9
24336 " virt-sparsify [--options] indisk outdisk\n"
24341 #: ../sparsify/virt-sparsify.pod:13
24343 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24344 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24345 "the disk image can be converted back to free space on the host."
24349 #: ../sparsify/virt-sparsify.pod:18
24351 "Virt-sparsify can locate and sparsify free space in most filesystems "
24352 "(eg. ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24356 #: ../sparsify/virt-sparsify.pod:21
24358 "Virt-sparsify can also convert between some disk formats, for example "
24359 "converting a raw disk image to a thin-provisioned qcow2 image."
24363 #: ../sparsify/virt-sparsify.pod:24
24365 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24366 "machines. If a virtual machine has more than one attached disk, you must "
24367 "sparsify each one separately."
24371 #: ../sparsify/virt-sparsify.pod:28
24372 msgid "IMPORTANT LIMITATIONS"
24376 #: ../sparsify/virt-sparsify.pod:34
24378 "Virt-sparsify does not do in-place modifications. It copies from a source "
24379 "image to a destination image, leaving the source unchanged. I<Check that "
24380 "the sparsification was successful before deleting the source image>."
24384 #: ../sparsify/virt-sparsify.pod:41
24385 msgid "The virtual machine I<must be shut down> before using this tool."
24389 #: ../sparsify/virt-sparsify.pod:45
24391 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24392 "(1 temporary copy + 1 destination image). This is in the worst case and "
24393 "usually much less space is required."
24397 #: ../sparsify/virt-sparsify.pod:51
24398 msgid "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24402 #: ../sparsify/virt-sparsify.pod:56
24403 msgid "Virt-sparsify cannot handle encrypted disks."
24407 #: ../sparsify/virt-sparsify.pod:60
24409 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24410 "this space is often used for critical items like bootloaders so it's not "
24415 #: ../sparsify/virt-sparsify.pod:66
24417 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24418 "to do this unless we can be sure there is no hibernation data, so at the "
24419 "moment swap partitions are ignored."
24423 #: ../sparsify/virt-sparsify.pod:72
24425 "You may also want to read the manual pages for the associated tools "
24426 "L<virt-filesystems(1)> and L<virt-df(1)> before starting."
24430 #: ../sparsify/virt-sparsify.pod:77
24431 msgid "Typical usage is:"
24435 #: ../sparsify/virt-sparsify.pod:79
24438 " virt-sparsify indisk outdisk\n"
24443 #: ../sparsify/virt-sparsify.pod:81
24445 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24446 "is created, or overwritten if it already exists. The format of the input "
24447 "disk is detected (eg. qcow2) and the same format is used for the output "
24452 #: ../sparsify/virt-sparsify.pod:86
24453 msgid "To convert between formats, use the I<--convert> option:"
24457 #: ../sparsify/virt-sparsify.pod:88
24460 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24465 #: ../sparsify/virt-sparsify.pod:90
24467 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24468 "can find within the source disk image. You can get it to ignore (don't zero "
24469 "free space on) certain filesystems by doing:"
24473 #: ../sparsify/virt-sparsify.pod:94
24476 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24481 #: ../sparsify/virt-sparsify.pod:96
24482 msgid "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24486 #: ../sparsify/virt-sparsify.pod:107
24487 msgid "B<--convert> raw"
24491 #: ../sparsify/virt-sparsify.pod:109
24492 msgid "B<--convert> qcow2"
24496 #: ../sparsify/virt-sparsify.pod:111
24497 msgid "B<--convert> [other formats]"
24501 #: ../sparsify/virt-sparsify.pod:113
24503 "Use C<output-format> as the format for the destination image. If this is "
24504 "not specified, then the input format is used."
24508 #: ../sparsify/virt-sparsify.pod:116
24509 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>, C<vdi>."
24513 #: ../sparsify/virt-sparsify.pod:118
24515 "You can also use any format supported by the L<qemu-img(1)> program, "
24516 "eg. C<vmdk>, but support for other formats is reliant on qemu."
24520 #: ../sparsify/virt-sparsify.pod:121
24522 "Specifying the I<--convert> option is usually a good idea, because then "
24523 "virt-sparsify doesn't need to try to guess the input format."
24527 #: ../sparsify/virt-sparsify.pod:126
24529 "Debug garbage collection and memory allocation. This is only useful when "
24530 "debugging memory problems in virt-sparsify or the OCaml libguestfs bindings."
24534 #: ../sparsify/virt-sparsify.pod:132
24535 msgid "B<--format> qcow2"
24539 #: ../sparsify/virt-sparsify.pod:140
24540 msgid "B<--ignore> filesystem"
24544 #: ../sparsify/virt-sparsify.pod:142
24545 msgid "B<--ignore> volgroup"
24549 #: ../sparsify/virt-sparsify.pod:144
24551 "Ignore the named filesystem. Free space on the filesystem will not be "
24552 "zeroed, but existing blocks of zeroes will still be sparsified."
24556 #: ../sparsify/virt-sparsify.pod:147
24558 "In the second form, this ignores the named volume group. Use the volume "
24559 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24563 #: ../sparsify/virt-sparsify.pod:162
24564 msgid "This disables progress bars and other unnecessary output."
24568 #: ../sparsify/virt-sparsify.pod:184
24570 "The I<--machine-readable> option can be used to make the output more machine "
24571 "friendly, which is useful when calling virt-sparsify from other programs, "
24576 #: ../sparsify/virt-sparsify.pod:190
24578 "Firstly use the option on its own to query the capabilities of the "
24579 "virt-sparsify binary. Typical output looks like this:"
24583 #: ../sparsify/virt-sparsify.pod:193
24586 " $ virt-sparsify --machine-readable\n"
24594 #: ../sparsify/virt-sparsify.pod:223
24596 "The calling program should treat messages sent to stderr as error messages. "
24597 "In addition, virt-sparsify exits with a non-zero status code if there was a "
24602 #: ../sparsify/virt-sparsify.pod:229
24604 "All versions of virt-sparsify have supported the I<--machine-readable> "
24609 #: ../sparsify/virt-sparsify.pod:243
24611 "Location of the temporary directory used for the potentially large temporary "
24616 #: ../sparsify/virt-sparsify.pod:246
24618 "You should ensure there is enough free space in the worst case for a full "
24619 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24620 "to another directory that has enough space."
24624 #: ../sparsify/virt-sparsify.pod:250
24625 msgid "This defaults to C</tmp>."
24629 #: ../sparsify/virt-sparsify.pod:254
24630 msgid "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24634 #: ../sparsify/virt-sparsify.pod:258
24636 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
24637 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, "
24638 "L<qemu-img(1)>, L<http://libguestfs.org/>."
24642 #: ../src/guestfs-actions.pod:1
24643 msgid "guestfs_add_cdrom"
24647 #: ../src/guestfs-actions.pod:3
24651 " guestfs_add_cdrom (guestfs_h *g,\n"
24652 " const char *filename);\n"
24657 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:323
24659 "I<This function is deprecated.> In new code, use the "
24660 "L</guestfs_add_drive_opts> call instead."
24664 #: ../src/guestfs-actions.pod:24
24666 "This call checks for the existence of C<filename>. This stops you from "
24667 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24668 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
24673 #: ../src/guestfs-actions.pod:31
24675 "If you just want to add an ISO file (often you use this as an efficient way "
24676 "to transfer large files into the guest), then you should probably use "
24677 "C<guestfs_add_drive_ro> instead."
24681 #: ../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:4088 ../src/guestfs-actions.pod:4103 ../src/guestfs-actions.pod:4128 ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4331 ../src/guestfs-actions.pod:4344 ../src/guestfs-actions.pod:4358 ../src/guestfs-actions.pod:4373 ../src/guestfs-actions.pod:4409 ../src/guestfs-actions.pod:4481 ../src/guestfs-actions.pod:4501 ../src/guestfs-actions.pod:4518 ../src/guestfs-actions.pod:4538 ../src/guestfs-actions.pod:4558 ../src/guestfs-actions.pod:4593 ../src/guestfs-actions.pod:4612 ../src/guestfs-actions.pod:4631 ../src/guestfs-actions.pod:4666 ../src/guestfs-actions.pod:4678 ../src/guestfs-actions.pod:4711 ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:4740 ../src/guestfs-actions.pod:4755 ../src/guestfs-actions.pod:4772 ../src/guestfs-actions.pod:4865 ../src/guestfs-actions.pod:4885 ../src/guestfs-actions.pod:4898 ../src/guestfs-actions.pod:4949 ../src/guestfs-actions.pod:4967 ../src/guestfs-actions.pod:4985 ../src/guestfs-actions.pod:5001 ../src/guestfs-actions.pod:5015 ../src/guestfs-actions.pod:5029 ../src/guestfs-actions.pod:5046 ../src/guestfs-actions.pod:5061 ../src/guestfs-actions.pod:5088 ../src/guestfs-actions.pod:5151 ../src/guestfs-actions.pod:5224 ../src/guestfs-actions.pod:5255 ../src/guestfs-actions.pod:5274 ../src/guestfs-actions.pod:5293 ../src/guestfs-actions.pod:5305 ../src/guestfs-actions.pod:5322 ../src/guestfs-actions.pod:5335 ../src/guestfs-actions.pod:5350 ../src/guestfs-actions.pod:5365 ../src/guestfs-actions.pod:5397 ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5462 ../src/guestfs-actions.pod:5482 ../src/guestfs-actions.pod:5496 ../src/guestfs-actions.pod:5513 ../src/guestfs-actions.pod:5562 ../src/guestfs-actions.pod:5615 ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5705 ../src/guestfs-actions.pod:5733 ../src/guestfs-actions.pod:5750 ../src/guestfs-actions.pod:5768 ../src/guestfs-actions.pod:5905 ../src/guestfs-actions.pod:5962 ../src/guestfs-actions.pod:5984 ../src/guestfs-actions.pod:6002 ../src/guestfs-actions.pod:6054 ../src/guestfs-actions.pod:6120 ../src/guestfs-actions.pod:6137 ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6164 ../src/guestfs-actions.pod:6453 ../src/guestfs-actions.pod:6472 ../src/guestfs-actions.pod:6491 ../src/guestfs-actions.pod:6505 ../src/guestfs-actions.pod:6517 ../src/guestfs-actions.pod:6531 ../src/guestfs-actions.pod:6543 ../src/guestfs-actions.pod:6557 ../src/guestfs-actions.pod:6573 ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:6610 ../src/guestfs-actions.pod:6629 ../src/guestfs-actions.pod:6659 ../src/guestfs-actions.pod:6677 ../src/guestfs-actions.pod:6700 ../src/guestfs-actions.pod:6718 ../src/guestfs-actions.pod:6737 ../src/guestfs-actions.pod:6758 ../src/guestfs-actions.pod:6777 ../src/guestfs-actions.pod:6794 ../src/guestfs-actions.pod:6813 ../src/guestfs-actions.pod:6841 ../src/guestfs-actions.pod:6865 ../src/guestfs-actions.pod:6884 ../src/guestfs-actions.pod:6900 ../src/guestfs-actions.pod:6924 ../src/guestfs-actions.pod:6943 ../src/guestfs-actions.pod:6958 ../src/guestfs-actions.pod:6977 ../src/guestfs-actions.pod:7021 ../src/guestfs-actions.pod:7048 ../src/guestfs-actions.pod:7078 ../src/guestfs-actions.pod:7190 ../src/guestfs-actions.pod:7311 ../src/guestfs-actions.pod:7323 ../src/guestfs-actions.pod:7336 ../src/guestfs-actions.pod:7349 ../src/guestfs-actions.pod:7371 ../src/guestfs-actions.pod:7384 ../src/guestfs-actions.pod:7397 ../src/guestfs-actions.pod:7410 ../src/guestfs-actions.pod:7425 ../src/guestfs-actions.pod:7484 ../src/guestfs-actions.pod:7501 ../src/guestfs-actions.pod:7517 ../src/guestfs-actions.pod:7533 ../src/guestfs-actions.pod:7550 ../src/guestfs-actions.pod:7563 ../src/guestfs-actions.pod:7583 ../src/guestfs-actions.pod:7619 ../src/guestfs-actions.pod:7633 ../src/guestfs-actions.pod:7674 ../src/guestfs-actions.pod:7687 ../src/guestfs-actions.pod:7705 ../src/guestfs-actions.pod:7739 ../src/guestfs-actions.pod:7775 ../src/guestfs-actions.pod:7891 ../src/guestfs-actions.pod:7906 ../src/guestfs-actions.pod:7920 ../src/guestfs-actions.pod:7975 ../src/guestfs-actions.pod:7988 ../src/guestfs-actions.pod:8033 ../src/guestfs-actions.pod:8073 ../src/guestfs-actions.pod:8129 ../src/guestfs-actions.pod:8149 ../src/guestfs-actions.pod:8182 ../src/guestfs-actions.pod:8246 ../src/guestfs-actions.pod:8269 ../src/guestfs-actions.pod:8295
24682 msgid "This function returns 0 on success or -1 on error."
24686 #: ../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:4090 ../src/guestfs-actions.pod:4110 ../src/guestfs-actions.pod:5399 ../src/guestfs-actions.pod:6679 ../src/guestfs-actions.pod:6796 ../src/guestfs-actions.pod:6945 ../src/guestfs-actions.pod:7427 ../src/guestfs-actions.pod:7552 ../src/guestfs-actions.pod:8075
24687 msgid "(Added in 0.3)"
24691 #: ../src/guestfs-actions.pod:41
24692 msgid "guestfs_add_domain"
24696 #: ../src/guestfs-actions.pod:43
24700 " guestfs_add_domain (guestfs_h *g,\n"
24701 " const char *dom,\n"
24707 #: ../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:5100 ../src/guestfs-actions.pod:5409 ../src/guestfs-actions.pod:5626
24709 "You may supply a list of optional arguments to this call. Use zero or more "
24710 "of the following pairs of parameters, and terminate the list with C<-1> on "
24711 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
24715 #: ../src/guestfs-actions.pod:53
24718 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
24719 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
24720 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
24721 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
24722 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
24723 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
24728 #: ../src/guestfs-actions.pod:60
24730 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24731 "It works by connecting to libvirt, requesting the domain and domain XML from "
24732 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
24737 #: ../src/guestfs-actions.pod:141
24739 "The other optional parameters are passed directly through to "
24740 "C<guestfs_add_drive_opts>."
24744 #: ../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:5585 ../src/guestfs-actions.pod:5802 ../src/guestfs-actions.pod:6040 ../src/guestfs-actions.pod:6234 ../src/guestfs-actions.pod:6260 ../src/guestfs-actions.pod:7660 ../src/guestfs-actions.pod:8086 ../src/guestfs-actions.pod:8099 ../src/guestfs-actions.pod:8112
24745 msgid "On error this function returns -1."
24749 #: ../src/guestfs-actions.pod:146
24750 msgid "(Added in 1.7.4)"
24754 #: ../src/guestfs-actions.pod:148
24755 msgid "guestfs_add_domain_va"
24759 #: ../src/guestfs-actions.pod:150
24763 " guestfs_add_domain_va (guestfs_h *g,\n"
24764 " const char *dom,\n"
24765 " va_list args);\n"
24770 #: ../src/guestfs-actions.pod:155
24771 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
24775 #: ../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:5165 ../src/guestfs-actions.pod:5177 ../src/guestfs-actions.pod:5437 ../src/guestfs-actions.pod:5449 ../src/guestfs-actions.pod:5675 ../src/guestfs-actions.pod:5686
24776 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
24780 #: ../src/guestfs-actions.pod:159
24781 msgid "guestfs_add_domain_argv"
24785 #: ../src/guestfs-actions.pod:161
24789 " guestfs_add_domain_argv (guestfs_h *g,\n"
24790 " const char *dom,\n"
24791 " const struct guestfs_add_domain_argv *optargs);\n"
24796 #: ../src/guestfs-actions.pod:166
24797 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
24801 #: ../src/guestfs-actions.pod:170
24802 msgid "guestfs_add_drive"
24806 #: ../src/guestfs-actions.pod:172
24810 " guestfs_add_drive (guestfs_h *g,\n"
24811 " const char *filename);\n"
24816 #: ../src/guestfs-actions.pod:176
24818 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
24819 "optional parameters, so the disk is added writable, with the format being "
24820 "detected automatically."
24824 #: ../src/guestfs-actions.pod:180
24826 "Automatic detection of the format opens you up to a potential security hole "
24827 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24828 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24829 "you should think about replacing calls to this function with calls to "
24830 "C<guestfs_add_drive_opts>, and specifying the format."
24834 #: ../src/guestfs-actions.pod:191
24835 msgid "guestfs_add_drive_opts"
24839 #: ../src/guestfs-actions.pod:193
24843 " guestfs_add_drive_opts (guestfs_h *g,\n"
24844 " const char *filename,\n"
24850 #: ../src/guestfs-actions.pod:203
24853 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
24854 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
24855 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
24856 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
24861 #: ../src/guestfs-actions.pod:233
24863 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
24864 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
24865 "Possible formats include C<raw> and C<qcow2>."
24869 #: ../src/guestfs-actions.pod:244
24871 "This rarely-used option lets you emulate the behaviour of the deprecated "
24872 "C<guestfs_add_drive_with_if> call (q.v.)"
24876 #: ../src/guestfs-actions.pod:256
24877 msgid "(Added in 1.5.23)"
24881 #: ../src/guestfs-actions.pod:258
24882 msgid "guestfs_add_drive_opts_va"
24886 #: ../src/guestfs-actions.pod:260
24890 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
24891 " const char *filename,\n"
24892 " va_list args);\n"
24897 #: ../src/guestfs-actions.pod:265
24898 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
24902 #: ../src/guestfs-actions.pod:269
24903 msgid "guestfs_add_drive_opts_argv"
24907 #: ../src/guestfs-actions.pod:271
24911 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
24912 " const char *filename,\n"
24913 " const struct guestfs_add_drive_opts_argv "
24919 #: ../src/guestfs-actions.pod:276
24920 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
24924 #: ../src/guestfs-actions.pod:280
24925 msgid "guestfs_add_drive_ro"
24929 #: ../src/guestfs-actions.pod:282
24933 " guestfs_add_drive_ro (guestfs_h *g,\n"
24934 " const char *filename);\n"
24939 #: ../src/guestfs-actions.pod:286
24941 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
24942 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
24943 "disk is added read-only, with the format being detected automatically."
24947 #: ../src/guestfs-actions.pod:293
24948 msgid "(Added in 1.0.38)"
24952 #: ../src/guestfs-actions.pod:295
24953 msgid "guestfs_add_drive_ro_with_if"
24957 #: ../src/guestfs-actions.pod:297
24961 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
24962 " const char *filename,\n"
24963 " const char *iface);\n"
24968 #: ../src/guestfs-actions.pod:309
24970 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
24971 "QEMU interface emulation to use at run time."
24975 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335 ../src/guestfs-actions.pod:2881
24976 msgid "(Added in 1.0.84)"
24980 #: ../src/guestfs-actions.pod:316
24981 msgid "guestfs_add_drive_with_if"
24985 #: ../src/guestfs-actions.pod:318
24989 " guestfs_add_drive_with_if (guestfs_h *g,\n"
24990 " const char *filename,\n"
24991 " const char *iface);\n"
24996 #: ../src/guestfs-actions.pod:330
24998 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
24999 "QEMU interface emulation to use at run time."
25003 #: ../src/guestfs-actions.pod:337
25004 msgid "guestfs_aug_clear"
25008 #: ../src/guestfs-actions.pod:339
25012 " guestfs_aug_clear (guestfs_h *g,\n"
25013 " const char *augpath);\n"
25018 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2609
25019 msgid "(Added in 1.3.4)"
25023 #: ../src/guestfs-actions.pod:350
25024 msgid "guestfs_aug_close"
25028 #: ../src/guestfs-actions.pod:352
25032 " guestfs_aug_close (guestfs_h *g);\n"
25037 #: ../src/guestfs-actions.pod:355
25039 "Close the current Augeas handle and free up any resources used by it. After "
25040 "calling this, you have to call C<guestfs_aug_init> again before you can use "
25041 "any other Augeas functions."
25045 #: ../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:6311
25046 msgid "(Added in 0.7)"
25050 #: ../src/guestfs-actions.pod:364
25051 msgid "guestfs_aug_defnode"
25055 #: ../src/guestfs-actions.pod:366
25058 " struct guestfs_int_bool *\n"
25059 " guestfs_aug_defnode (guestfs_h *g,\n"
25060 " const char *name,\n"
25061 " const char *expr,\n"
25062 " const char *val);\n"
25067 #: ../src/guestfs-actions.pod:375
25069 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25070 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25071 "containing that single node."
25075 #: ../src/guestfs-actions.pod:383
25077 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25078 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25082 #: ../src/guestfs-actions.pod:389
25083 msgid "guestfs_aug_defvar"
25087 #: ../src/guestfs-actions.pod:391
25091 " guestfs_aug_defvar (guestfs_h *g,\n"
25092 " const char *name,\n"
25093 " const char *expr);\n"
25098 #: ../src/guestfs-actions.pod:407
25099 msgid "guestfs_aug_get"
25103 #: ../src/guestfs-actions.pod:409
25107 " guestfs_aug_get (guestfs_h *g,\n"
25108 " const char *augpath);\n"
25113 #: ../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:3636 ../src/guestfs-actions.pod:3656 ../src/guestfs-actions.pod:3676 ../src/guestfs-actions.pod:4303 ../src/guestfs-actions.pod:4650 ../src/guestfs-actions.pod:4817 ../src/guestfs-actions.pod:4927 ../src/guestfs-actions.pod:5820 ../src/guestfs-actions.pod:6021 ../src/guestfs-actions.pod:6209 ../src/guestfs-actions.pod:6387 ../src/guestfs-actions.pod:6436 ../src/guestfs-actions.pod:7096 ../src/guestfs-actions.pod:7112 ../src/guestfs-actions.pod:7136 ../src/guestfs-actions.pod:7160 ../src/guestfs-actions.pod:7834 ../src/guestfs-actions.pod:7853 ../src/guestfs-actions.pod:7871 ../src/guestfs-actions.pod:8045 ../src/guestfs-actions.pod:8359
25115 "This function returns a string, or NULL on error. I<The caller must free "
25116 "the returned string after use>."
25120 #: ../src/guestfs-actions.pod:421
25121 msgid "guestfs_aug_init"
25125 #: ../src/guestfs-actions.pod:423
25129 " guestfs_aug_init (guestfs_h *g,\n"
25130 " const char *root,\n"
25136 #: ../src/guestfs-actions.pod:432
25137 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25141 #: ../src/guestfs-actions.pod:457
25143 "This option is only useful when debugging Augeas lenses. Use of this option "
25144 "may require additional memory for the libguestfs appliance. You may need to "
25145 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25146 "C<guestfs_set_memsize>."
25150 #: ../src/guestfs-actions.pod:472
25151 msgid "Do not load the tree in C<guestfs_aug_init>."
25155 #: ../src/guestfs-actions.pod:476
25156 msgid "To close the handle, you can call C<guestfs_aug_close>."
25160 #: ../src/guestfs-actions.pod:484
25161 msgid "guestfs_aug_insert"
25165 #: ../src/guestfs-actions.pod:486
25169 " guestfs_aug_insert (guestfs_h *g,\n"
25170 " const char *augpath,\n"
25171 " const char *label,\n"
25177 #: ../src/guestfs-actions.pod:504
25178 msgid "guestfs_aug_load"
25182 #: ../src/guestfs-actions.pod:506
25186 " guestfs_aug_load (guestfs_h *g);\n"
25191 #: ../src/guestfs-actions.pod:518
25192 msgid "guestfs_aug_ls"
25196 #: ../src/guestfs-actions.pod:520
25200 " guestfs_aug_ls (guestfs_h *g,\n"
25201 " const char *augpath);\n"
25206 #: ../src/guestfs-actions.pod:524
25208 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25209 "sorting the resulting nodes into alphabetical order."
25213 #: ../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:3872 ../src/guestfs-actions.pod:4186 ../src/guestfs-actions.pod:4203 ../src/guestfs-actions.pod:4223 ../src/guestfs-actions.pod:4285 ../src/guestfs-actions.pod:4390 ../src/guestfs-actions.pod:4789 ../src/guestfs-actions.pod:5546 ../src/guestfs-actions.pod:6181 ../src/guestfs-actions.pod:6307 ../src/guestfs-actions.pod:6421 ../src/guestfs-actions.pod:7176 ../src/guestfs-actions.pod:7237 ../src/guestfs-actions.pod:7292 ../src/guestfs-actions.pod:7438 ../src/guestfs-actions.pod:7462 ../src/guestfs-actions.pod:7938 ../src/guestfs-actions.pod:7958 ../src/guestfs-actions.pod:8005 ../src/guestfs-actions.pod:8199 ../src/guestfs-actions.pod:8218 ../src/guestfs-actions.pod:8309 ../src/guestfs-actions.pod:8328 ../src/guestfs-actions.pod:8374 ../src/guestfs-actions.pod:8393
25215 "This function returns a NULL-terminated array of strings (like "
25216 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
25217 "strings and the array after use>."
25221 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1121 ../src/guestfs-actions.pod:1139 ../src/guestfs-actions.pod:1908 ../src/guestfs-actions.pod:3950 ../src/guestfs-actions.pod:3981 ../src/guestfs-actions.pod:4633 ../src/guestfs-actions.pod:4680 ../src/guestfs-actions.pod:4867 ../src/guestfs-actions.pod:4900 ../src/guestfs-actions.pod:5063 ../src/guestfs-actions.pod:5550 ../src/guestfs-actions.pod:6122 ../src/guestfs-actions.pod:6519 ../src/guestfs-actions.pod:6533 ../src/guestfs-actions.pod:6545 ../src/guestfs-actions.pod:7023 ../src/guestfs-actions.pod:7676 ../src/guestfs-actions.pod:7689 ../src/guestfs-actions.pod:7922 ../src/guestfs-actions.pod:8187
25222 msgid "(Added in 0.8)"
25226 #: ../src/guestfs-actions.pod:533
25227 msgid "guestfs_aug_match"
25231 #: ../src/guestfs-actions.pod:535
25235 " guestfs_aug_match (guestfs_h *g,\n"
25236 " const char *augpath);\n"
25241 #: ../src/guestfs-actions.pod:549
25242 msgid "guestfs_aug_mv"
25246 #: ../src/guestfs-actions.pod:551
25250 " guestfs_aug_mv (guestfs_h *g,\n"
25251 " const char *src,\n"
25252 " const char *dest);\n"
25257 #: ../src/guestfs-actions.pod:563
25258 msgid "guestfs_aug_rm"
25262 #: ../src/guestfs-actions.pod:565
25266 " guestfs_aug_rm (guestfs_h *g,\n"
25267 " const char *augpath);\n"
25272 #: ../src/guestfs-actions.pod:577
25273 msgid "guestfs_aug_save"
25277 #: ../src/guestfs-actions.pod:579
25281 " guestfs_aug_save (guestfs_h *g);\n"
25286 #: ../src/guestfs-actions.pod:584
25288 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25293 #: ../src/guestfs-actions.pod:591
25294 msgid "guestfs_aug_set"
25298 #: ../src/guestfs-actions.pod:593
25302 " guestfs_aug_set (guestfs_h *g,\n"
25303 " const char *augpath,\n"
25304 " const char *val);\n"
25309 #: ../src/guestfs-actions.pod:600
25311 "In the Augeas API, it is possible to clear a node by setting the value to "
25312 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25313 "this call. Instead you must use the C<guestfs_aug_clear> call."
25317 #: ../src/guestfs-actions.pod:609
25318 msgid "guestfs_available"
25322 #: ../src/guestfs-actions.pod:611
25326 " guestfs_available (guestfs_h *g,\n"
25327 " char *const *groups);\n"
25332 #: ../src/guestfs-actions.pod:619
25334 "The libguestfs groups, and the functions that those groups correspond to, "
25335 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25336 "runtime by calling C<guestfs_available_all_groups>."
25340 #: ../src/guestfs-actions.pod:643
25341 msgid "You must call C<guestfs_launch> before calling this function."
25345 #: ../src/guestfs-actions.pod:665
25347 "This call was added in version C<1.0.80>. In previous versions of "
25348 "libguestfs all you could do would be to speculatively execute a command to "
25349 "find out if the daemon implemented it. See also C<guestfs_version>."
25353 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1653
25354 msgid "(Added in 1.0.80)"
25358 #: ../src/guestfs-actions.pod:676
25359 msgid "guestfs_available_all_groups"
25363 #: ../src/guestfs-actions.pod:678
25367 " guestfs_available_all_groups (guestfs_h *g);\n"
25372 #: ../src/guestfs-actions.pod:681
25374 "This command returns a list of all optional groups that this daemon knows "
25375 "about. Note this returns both supported and unsupported groups. To find "
25376 "out which ones the daemon can actually support you have to call "
25377 "C<guestfs_available> on each member of the returned list."
25381 #: ../src/guestfs-actions.pod:687
25382 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25386 #: ../src/guestfs-actions.pod:693
25387 msgid "(Added in 1.3.15)"
25391 #: ../src/guestfs-actions.pod:695
25392 msgid "guestfs_base64_in"
25396 #: ../src/guestfs-actions.pod:697
25400 " guestfs_base64_in (guestfs_h *g,\n"
25401 " const char *base64file,\n"
25402 " const char *filename);\n"
25407 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25408 msgid "(Added in 1.3.5)"
25412 #: ../src/guestfs-actions.pod:709
25413 msgid "guestfs_base64_out"
25417 #: ../src/guestfs-actions.pod:711
25421 " guestfs_base64_out (guestfs_h *g,\n"
25422 " const char *filename,\n"
25423 " const char *base64file);\n"
25428 #: ../src/guestfs-actions.pod:723
25429 msgid "guestfs_blockdev_flushbufs"
25433 #: ../src/guestfs-actions.pod:725
25437 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25438 " const char *device);\n"
25443 #: ../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
25444 msgid "(Added in 0.9.3)"
25448 #: ../src/guestfs-actions.pod:738
25449 msgid "guestfs_blockdev_getbsz"
25453 #: ../src/guestfs-actions.pod:740
25457 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25458 " const char *device);\n"
25463 #: ../src/guestfs-actions.pod:755
25464 msgid "guestfs_blockdev_getro"
25468 #: ../src/guestfs-actions.pod:757
25472 " guestfs_blockdev_getro (guestfs_h *g,\n"
25473 " const char *device);\n"
25478 #: ../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:3693 ../src/guestfs-actions.pod:3709 ../src/guestfs-actions.pod:3727 ../src/guestfs-actions.pod:3889 ../src/guestfs-actions.pod:3903 ../src/guestfs-actions.pod:3918 ../src/guestfs-actions.pod:3932 ../src/guestfs-actions.pod:3948 ../src/guestfs-actions.pod:3963 ../src/guestfs-actions.pod:3979 ../src/guestfs-actions.pod:3993 ../src/guestfs-actions.pod:4006 ../src/guestfs-actions.pod:4020 ../src/guestfs-actions.pod:4035 ../src/guestfs-actions.pod:4050 ../src/guestfs-actions.pod:4063 ../src/guestfs-actions.pod:4077 ../src/guestfs-actions.pod:5784
25479 msgid "This function returns a C truth value on success or -1 on error."
25483 #: ../src/guestfs-actions.pod:770
25484 msgid "guestfs_blockdev_getsize64"
25488 #: ../src/guestfs-actions.pod:772
25492 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25493 " const char *device);\n"
25498 #: ../src/guestfs-actions.pod:778
25499 msgid "See also C<guestfs_blockdev_getsz>."
25503 #: ../src/guestfs-actions.pod:786
25504 msgid "guestfs_blockdev_getss"
25508 #: ../src/guestfs-actions.pod:788
25512 " guestfs_blockdev_getss (guestfs_h *g,\n"
25513 " const char *device);\n"
25518 #: ../src/guestfs-actions.pod:795
25520 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25525 #: ../src/guestfs-actions.pod:804
25526 msgid "guestfs_blockdev_getsz"
25530 #: ../src/guestfs-actions.pod:806
25534 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25535 " const char *device);\n"
25540 #: ../src/guestfs-actions.pod:813
25542 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25543 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25547 #: ../src/guestfs-actions.pod:823
25548 msgid "guestfs_blockdev_rereadpt"
25552 #: ../src/guestfs-actions.pod:825
25556 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25557 " const char *device);\n"
25562 #: ../src/guestfs-actions.pod:837
25563 msgid "guestfs_blockdev_setbsz"
25567 #: ../src/guestfs-actions.pod:839
25571 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25572 " const char *device,\n"
25573 " int blocksize);\n"
25578 #: ../src/guestfs-actions.pod:855
25579 msgid "guestfs_blockdev_setro"
25583 #: ../src/guestfs-actions.pod:857
25587 " guestfs_blockdev_setro (guestfs_h *g,\n"
25588 " const char *device);\n"
25593 #: ../src/guestfs-actions.pod:869
25594 msgid "guestfs_blockdev_setrw"
25598 #: ../src/guestfs-actions.pod:871
25602 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25603 " const char *device);\n"
25608 #: ../src/guestfs-actions.pod:883
25609 msgid "guestfs_btrfs_filesystem_resize"
25613 #: ../src/guestfs-actions.pod:885
25617 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25618 " const char *mountpoint,\n"
25624 #: ../src/guestfs-actions.pod:895
25627 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25632 #: ../src/guestfs-actions.pod:918
25633 msgid "(Added in 1.11.17)"
25637 #: ../src/guestfs-actions.pod:920
25638 msgid "guestfs_btrfs_filesystem_resize_va"
25642 #: ../src/guestfs-actions.pod:922
25646 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
25647 " const char *mountpoint,\n"
25648 " va_list args);\n"
25653 #: ../src/guestfs-actions.pod:927
25654 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
25658 #: ../src/guestfs-actions.pod:931
25659 msgid "guestfs_btrfs_filesystem_resize_argv"
25663 #: ../src/guestfs-actions.pod:933
25667 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
25668 " const char *mountpoint,\n"
25670 "guestfs_btrfs_filesystem_resize_argv *optargs);\n"
25675 #: ../src/guestfs-actions.pod:938
25676 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
25680 #: ../src/guestfs-actions.pod:942
25681 msgid "guestfs_case_sensitive_path"
25685 #: ../src/guestfs-actions.pod:944
25689 " guestfs_case_sensitive_path (guestfs_h *g,\n"
25690 " const char *path);\n"
25695 #: ../src/guestfs-actions.pod:970
25697 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
25698 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
25699 "how the directories were originally created under Windows)."
25703 #: ../src/guestfs-actions.pod:978
25704 msgid "See also C<guestfs_realpath>."
25708 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:7856
25709 msgid "(Added in 1.0.75)"
25713 #: ../src/guestfs-actions.pod:985
25714 msgid "guestfs_cat"
25718 #: ../src/guestfs-actions.pod:987
25722 " guestfs_cat (guestfs_h *g,\n"
25723 " const char *path);\n"
25728 #: ../src/guestfs-actions.pod:993
25730 "Note that this function cannot correctly handle binary files (specifically, "
25731 "files containing C<\\0> character which is treated as end of string). For "
25732 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
25733 "functions which have a more complex interface."
25737 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4289 ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:4394 ../src/guestfs-actions.pod:4793 ../src/guestfs-actions.pod:4807 ../src/guestfs-actions.pod:6185 ../src/guestfs-actions.pod:6199 ../src/guestfs-actions.pod:8009 ../src/guestfs-actions.pod:8023
25738 msgid "(Added in 0.4)"
25742 #: ../src/guestfs-actions.pod:1006
25743 msgid "guestfs_checksum"
25747 #: ../src/guestfs-actions.pod:1008
25751 " guestfs_checksum (guestfs_h *g,\n"
25752 " const char *csumtype,\n"
25753 " const char *path);\n"
25758 #: ../src/guestfs-actions.pod:1054
25759 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
25763 #: ../src/guestfs-actions.pod:1056
25764 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
25768 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1728 ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:3905 ../src/guestfs-actions.pod:3934 ../src/guestfs-actions.pod:3995 ../src/guestfs-actions.pod:4022 ../src/guestfs-actions.pod:7712
25769 msgid "(Added in 1.0.2)"
25773 #: ../src/guestfs-actions.pod:1063
25774 msgid "guestfs_checksum_device"
25778 #: ../src/guestfs-actions.pod:1065
25782 " guestfs_checksum_device (guestfs_h *g,\n"
25783 " const char *csumtype,\n"
25784 " const char *device);\n"
25789 #: ../src/guestfs-actions.pod:1070
25791 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25792 "device named C<device>. For the types of checksums supported see the "
25793 "C<guestfs_checksum> command."
25797 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5617 ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5786 ../src/guestfs-actions.pod:5804 ../src/guestfs-actions.pod:5986 ../src/guestfs-actions.pod:7621 ../src/guestfs-actions.pod:7635 ../src/guestfs-actions.pod:8035
25798 msgid "(Added in 1.3.2)"
25802 #: ../src/guestfs-actions.pod:1079
25803 msgid "guestfs_checksums_out"
25807 #: ../src/guestfs-actions.pod:1081
25811 " guestfs_checksums_out (guestfs_h *g,\n"
25812 " const char *csumtype,\n"
25813 " const char *directory,\n"
25814 " const char *sumsfile);\n"
25819 #: ../src/guestfs-actions.pod:1101
25820 msgid "(Added in 1.3.7)"
25824 #: ../src/guestfs-actions.pod:1103
25825 msgid "guestfs_chmod"
25829 #: ../src/guestfs-actions.pod:1105
25833 " guestfs_chmod (guestfs_h *g,\n"
25835 " const char *path);\n"
25840 #: ../src/guestfs-actions.pod:1123
25841 msgid "guestfs_chown"
25845 #: ../src/guestfs-actions.pod:1125
25849 " guestfs_chown (guestfs_h *g,\n"
25852 " const char *path);\n"
25857 #: ../src/guestfs-actions.pod:1141
25858 msgid "guestfs_command"
25862 #: ../src/guestfs-actions.pod:1143
25866 " guestfs_command (guestfs_h *g,\n"
25867 " char *const *arguments);\n"
25872 #: ../src/guestfs-actions.pod:1152
25874 "The single parameter is an argv-style list of arguments. The first element "
25875 "is the name of the program to run. Subsequent elements are parameters. The "
25876 "list must be non-empty (ie. must contain a program name). Note that the "
25877 "command runs directly, and is I<not> invoked via the shell (see "
25882 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203 ../src/guestfs-actions.pod:2027
25883 msgid "(Added in 0.9.1)"
25887 #: ../src/guestfs-actions.pod:1185
25888 msgid "guestfs_command_lines"
25892 #: ../src/guestfs-actions.pod:1187
25896 " guestfs_command_lines (guestfs_h *g,\n"
25897 " char *const *arguments);\n"
25902 #: ../src/guestfs-actions.pod:1191
25904 "This is the same as C<guestfs_command>, but splits the result into a list of "
25909 #: ../src/guestfs-actions.pod:1194
25910 msgid "See also: C<guestfs_sh_lines>"
25914 #: ../src/guestfs-actions.pod:1205
25915 msgid "guestfs_compress_device_out"
25919 #: ../src/guestfs-actions.pod:1207
25923 " guestfs_compress_device_out (guestfs_h *g,\n"
25924 " const char *ctype,\n"
25925 " const char *device,\n"
25926 " const char *zdevice,\n"
25932 #: ../src/guestfs-actions.pod:1219
25935 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
25940 #: ../src/guestfs-actions.pod:1224
25942 "The C<ctype> and optional C<level> parameters have the same meaning as in "
25943 "C<guestfs_compress_out>."
25947 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288 ../src/guestfs-actions.pod:2572 ../src/guestfs-actions.pod:6902
25948 msgid "(Added in 1.13.15)"
25952 #: ../src/guestfs-actions.pod:1231
25953 msgid "guestfs_compress_device_out_va"
25957 #: ../src/guestfs-actions.pod:1233
25961 " guestfs_compress_device_out_va (guestfs_h *g,\n"
25962 " const char *ctype,\n"
25963 " const char *device,\n"
25964 " const char *zdevice,\n"
25965 " va_list args);\n"
25970 #: ../src/guestfs-actions.pod:1240
25971 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
25975 #: ../src/guestfs-actions.pod:1244
25976 msgid "guestfs_compress_device_out_argv"
25980 #: ../src/guestfs-actions.pod:1246
25984 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
25985 " const char *ctype,\n"
25986 " const char *device,\n"
25987 " const char *zdevice,\n"
25989 "guestfs_compress_device_out_argv *optargs);\n"
25994 #: ../src/guestfs-actions.pod:1253
25995 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
25999 #: ../src/guestfs-actions.pod:1257
26000 msgid "guestfs_compress_out"
26004 #: ../src/guestfs-actions.pod:1259
26008 " guestfs_compress_out (guestfs_h *g,\n"
26009 " const char *ctype,\n"
26010 " const char *file,\n"
26011 " const char *zfile,\n"
26017 #: ../src/guestfs-actions.pod:1271
26020 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26025 #: ../src/guestfs-actions.pod:1290
26026 msgid "guestfs_compress_out_va"
26030 #: ../src/guestfs-actions.pod:1292
26034 " guestfs_compress_out_va (guestfs_h *g,\n"
26035 " const char *ctype,\n"
26036 " const char *file,\n"
26037 " const char *zfile,\n"
26038 " va_list args);\n"
26043 #: ../src/guestfs-actions.pod:1299
26044 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26048 #: ../src/guestfs-actions.pod:1303
26049 msgid "guestfs_compress_out_argv"
26053 #: ../src/guestfs-actions.pod:1305
26057 " guestfs_compress_out_argv (guestfs_h *g,\n"
26058 " const char *ctype,\n"
26059 " const char *file,\n"
26060 " const char *zfile,\n"
26061 " const struct guestfs_compress_out_argv "
26067 #: ../src/guestfs-actions.pod:1312
26068 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26072 #: ../src/guestfs-actions.pod:1316
26073 msgid "guestfs_config"
26077 #: ../src/guestfs-actions.pod:1318
26081 " guestfs_config (guestfs_h *g,\n"
26082 " const char *qemuparam,\n"
26083 " const char *qemuvalue);\n"
26088 #: ../src/guestfs-actions.pod:1336
26089 msgid "guestfs_copy_device_to_device"
26093 #: ../src/guestfs-actions.pod:1338
26097 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26098 " const char *src,\n"
26099 " const char *dest,\n"
26105 #: ../src/guestfs-actions.pod:1349
26108 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26109 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26110 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26115 #: ../src/guestfs-actions.pod:1353
26117 "The four calls C<guestfs_copy_device_to_device>, "
26118 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26119 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26120 "destination (device|file)."
26124 #: ../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:4105 ../src/guestfs-actions.pod:7707 ../src/guestfs-actions.pod:7741 ../src/guestfs-actions.pod:8248 ../src/guestfs-actions.pod:8271
26126 "This long-running command can generate progress notification messages so "
26127 "that the caller can display a progress bar or indicator. To receive these "
26128 "messages, the caller must register a progress event callback. See "
26129 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
26133 #: ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1543 ../src/guestfs-actions.pod:6042
26134 msgid "(Added in 1.13.25)"
26138 #: ../src/guestfs-actions.pod:1381
26139 msgid "guestfs_copy_device_to_device_va"
26143 #: ../src/guestfs-actions.pod:1383
26147 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26148 " const char *src,\n"
26149 " const char *dest,\n"
26150 " va_list args);\n"
26155 #: ../src/guestfs-actions.pod:1389
26156 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26160 #: ../src/guestfs-actions.pod:1393
26161 msgid "guestfs_copy_device_to_device_argv"
26165 #: ../src/guestfs-actions.pod:1395
26169 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26170 " const char *src,\n"
26171 " const char *dest,\n"
26173 "guestfs_copy_device_to_device_argv *optargs);\n"
26178 #: ../src/guestfs-actions.pod:1401
26179 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26183 #: ../src/guestfs-actions.pod:1405
26184 msgid "guestfs_copy_device_to_file"
26188 #: ../src/guestfs-actions.pod:1407
26192 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26193 " const char *src,\n"
26194 " const char *dest,\n"
26200 #: ../src/guestfs-actions.pod:1418
26203 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26204 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26205 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26210 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1475 ../src/guestfs-actions.pod:1528
26211 msgid "See C<guestfs_copy_device_to_device> for a general overview of this call."
26215 #: ../src/guestfs-actions.pod:1434
26216 msgid "guestfs_copy_device_to_file_va"
26220 #: ../src/guestfs-actions.pod:1436
26224 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26225 " const char *src,\n"
26226 " const char *dest,\n"
26227 " va_list args);\n"
26232 #: ../src/guestfs-actions.pod:1442
26233 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26237 #: ../src/guestfs-actions.pod:1446
26238 msgid "guestfs_copy_device_to_file_argv"
26242 #: ../src/guestfs-actions.pod:1448
26246 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26247 " const char *src,\n"
26248 " const char *dest,\n"
26250 "guestfs_copy_device_to_file_argv *optargs);\n"
26255 #: ../src/guestfs-actions.pod:1454
26256 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26260 #: ../src/guestfs-actions.pod:1458
26261 msgid "guestfs_copy_file_to_device"
26265 #: ../src/guestfs-actions.pod:1460
26269 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26270 " const char *src,\n"
26271 " const char *dest,\n"
26277 #: ../src/guestfs-actions.pod:1471
26280 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26281 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26282 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26287 #: ../src/guestfs-actions.pod:1487
26288 msgid "guestfs_copy_file_to_device_va"
26292 #: ../src/guestfs-actions.pod:1489
26296 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26297 " const char *src,\n"
26298 " const char *dest,\n"
26299 " va_list args);\n"
26304 #: ../src/guestfs-actions.pod:1495
26305 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26309 #: ../src/guestfs-actions.pod:1499
26310 msgid "guestfs_copy_file_to_device_argv"
26314 #: ../src/guestfs-actions.pod:1501
26318 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26319 " const char *src,\n"
26320 " const char *dest,\n"
26322 "guestfs_copy_file_to_device_argv *optargs);\n"
26327 #: ../src/guestfs-actions.pod:1507
26328 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26332 #: ../src/guestfs-actions.pod:1511
26333 msgid "guestfs_copy_file_to_file"
26337 #: ../src/guestfs-actions.pod:1513
26341 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26342 " const char *src,\n"
26343 " const char *dest,\n"
26349 #: ../src/guestfs-actions.pod:1524
26352 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26353 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26354 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26359 #: ../src/guestfs-actions.pod:1531
26361 "This is B<not> the function you want for copying files. This is for copying "
26362 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26363 "C<guestfs_mv> for general file copying and moving functions."
26367 #: ../src/guestfs-actions.pod:1545
26368 msgid "guestfs_copy_file_to_file_va"
26372 #: ../src/guestfs-actions.pod:1547
26376 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26377 " const char *src,\n"
26378 " const char *dest,\n"
26379 " va_list args);\n"
26384 #: ../src/guestfs-actions.pod:1553
26385 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26389 #: ../src/guestfs-actions.pod:1557
26390 msgid "guestfs_copy_file_to_file_argv"
26394 #: ../src/guestfs-actions.pod:1559
26398 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26399 " const char *src,\n"
26400 " const char *dest,\n"
26401 " const struct guestfs_copy_file_to_file_argv "
26407 #: ../src/guestfs-actions.pod:1565
26408 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26412 #: ../src/guestfs-actions.pod:1569
26413 msgid "guestfs_copy_size"
26417 #: ../src/guestfs-actions.pod:1571
26421 " guestfs_copy_size (guestfs_h *g,\n"
26422 " const char *src,\n"
26423 " const char *dest,\n"
26424 " int64_t size);\n"
26429 #: ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1634
26431 "I<This function is deprecated.> In new code, use the "
26432 "L</guestfs_copy_device_to_device> call instead."
26436 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:4820 ../src/guestfs-actions.pod:6212 ../src/guestfs-actions.pod:7942 ../src/guestfs-actions.pod:7962 ../src/guestfs-actions.pod:8048
26437 msgid "(Added in 1.0.87)"
26441 #: ../src/guestfs-actions.pod:1599
26446 #: ../src/guestfs-actions.pod:1601
26450 " guestfs_cp (guestfs_h *g,\n"
26451 " const char *src,\n"
26452 " const char *dest);\n"
26457 #: ../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:5564 ../src/guestfs-actions.pod:6056
26458 msgid "(Added in 1.0.18)"
26462 #: ../src/guestfs-actions.pod:1613
26463 msgid "guestfs_cp_a"
26467 #: ../src/guestfs-actions.pod:1615
26471 " guestfs_cp_a (guestfs_h *g,\n"
26472 " const char *src,\n"
26473 " const char *dest);\n"
26478 #: ../src/guestfs-actions.pod:1627
26483 #: ../src/guestfs-actions.pod:1629
26487 " guestfs_dd (guestfs_h *g,\n"
26488 " const char *src,\n"
26489 " const char *dest);\n"
26494 #: ../src/guestfs-actions.pod:1646
26496 "If the destination is a device, it must be as large or larger than the "
26497 "source file or device, otherwise the copy will fail. This command cannot do "
26498 "partial copies (see C<guestfs_copy_device_to_device>)."
26502 #: ../src/guestfs-actions.pod:1655
26507 #: ../src/guestfs-actions.pod:1657
26511 " guestfs_df (guestfs_h *g);\n"
26516 #: ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1679
26518 "This command is mostly useful for interactive sessions. It is I<not> "
26519 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
26524 #: ../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:4930 ../src/guestfs-actions.pod:5464 ../src/guestfs-actions.pod:7445 ../src/guestfs-actions.pod:7469 ../src/guestfs-actions.pod:8088 ../src/guestfs-actions.pod:8101 ../src/guestfs-actions.pod:8114
26525 msgid "(Added in 1.0.54)"
26529 #: ../src/guestfs-actions.pod:1671
26530 msgid "guestfs_df_h"
26534 #: ../src/guestfs-actions.pod:1673
26538 " guestfs_df_h (guestfs_h *g);\n"
26543 #: ../src/guestfs-actions.pod:1688
26544 msgid "guestfs_dmesg"
26548 #: ../src/guestfs-actions.pod:1690
26552 " guestfs_dmesg (guestfs_h *g);\n"
26557 #: ../src/guestfs-actions.pod:1697
26559 "Another way to get the same information is to enable verbose messages with "
26560 "C<guestfs_set_verbose> or by setting the environment variable "
26561 "C<LIBGUESTFS_DEBUG=1> before running the program."
26565 #: ../src/guestfs-actions.pod:1707
26566 msgid "guestfs_download"
26570 #: ../src/guestfs-actions.pod:1709
26574 " guestfs_download (guestfs_h *g,\n"
26575 " const char *remotefilename,\n"
26576 " const char *filename);\n"
26581 #: ../src/guestfs-actions.pod:1719
26582 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
26586 #: ../src/guestfs-actions.pod:1730
26587 msgid "guestfs_download_offset"
26591 #: ../src/guestfs-actions.pod:1732
26595 " guestfs_download_offset (guestfs_h *g,\n"
26596 " const char *remotefilename,\n"
26597 " const char *filename,\n"
26598 " int64_t offset,\n"
26599 " int64_t size);\n"
26604 #: ../src/guestfs-actions.pod:1745
26606 "Note that there is no limit on the amount of data that can be downloaded "
26607 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
26608 "full amount unless an error occurs."
26612 #: ../src/guestfs-actions.pod:1750
26613 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26617 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:7746
26618 msgid "(Added in 1.5.17)"
26622 #: ../src/guestfs-actions.pod:1761
26623 msgid "guestfs_drop_caches"
26627 #: ../src/guestfs-actions.pod:1763
26631 " guestfs_drop_caches (guestfs_h *g,\n"
26632 " int whattodrop);\n"
26637 #: ../src/guestfs-actions.pod:1781
26642 #: ../src/guestfs-actions.pod:1783
26646 " guestfs_du (guestfs_h *g,\n"
26647 " const char *path);\n"
26652 #: ../src/guestfs-actions.pod:1806
26653 msgid "guestfs_e2fsck_f"
26657 #: ../src/guestfs-actions.pod:1808
26661 " guestfs_e2fsck_f (guestfs_h *g,\n"
26662 " const char *device);\n"
26667 #: ../src/guestfs-actions.pod:1816
26669 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
26670 "Normally you should use C<guestfs_fsck>."
26674 #: ../src/guestfs-actions.pod:1821
26675 msgid "(Added in 1.0.29)"
26679 #: ../src/guestfs-actions.pod:1823
26680 msgid "guestfs_echo_daemon"
26684 #: ../src/guestfs-actions.pod:1825
26688 " guestfs_echo_daemon (guestfs_h *g,\n"
26689 " char *const *words);\n"
26694 #: ../src/guestfs-actions.pod:1834
26695 msgid "See also C<guestfs_ping_daemon>."
26699 #: ../src/guestfs-actions.pod:1839 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:6926
26700 msgid "(Added in 1.0.69)"
26704 #: ../src/guestfs-actions.pod:1841
26705 msgid "guestfs_egrep"
26709 #: ../src/guestfs-actions.pod:1843
26713 " guestfs_egrep (guestfs_h *g,\n"
26714 " const char *regex,\n"
26715 " const char *path);\n"
26720 #: ../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:4319 ../src/guestfs-actions.pod:4333 ../src/guestfs-actions.pod:4346 ../src/guestfs-actions.pod:4360 ../src/guestfs-actions.pod:5352 ../src/guestfs-actions.pod:6390 ../src/guestfs-actions.pod:6439 ../src/guestfs-actions.pod:7313 ../src/guestfs-actions.pod:7325 ../src/guestfs-actions.pod:7338 ../src/guestfs-actions.pod:7351 ../src/guestfs-actions.pod:7373 ../src/guestfs-actions.pod:7386 ../src/guestfs-actions.pod:7399 ../src/guestfs-actions.pod:7412 ../src/guestfs-actions.pod:8206 ../src/guestfs-actions.pod:8225 ../src/guestfs-actions.pod:8316 ../src/guestfs-actions.pod:8335 ../src/guestfs-actions.pod:8381 ../src/guestfs-actions.pod:8400
26721 msgid "(Added in 1.0.66)"
26725 #: ../src/guestfs-actions.pod:1860
26726 msgid "guestfs_egrepi"
26730 #: ../src/guestfs-actions.pod:1862
26734 " guestfs_egrepi (guestfs_h *g,\n"
26735 " const char *regex,\n"
26736 " const char *path);\n"
26741 #: ../src/guestfs-actions.pod:1879
26742 msgid "guestfs_equal"
26746 #: ../src/guestfs-actions.pod:1881
26750 " guestfs_equal (guestfs_h *g,\n"
26751 " const char *file1,\n"
26752 " const char *file2);\n"
26757 #: ../src/guestfs-actions.pod:1895
26758 msgid "guestfs_exists"
26762 #: ../src/guestfs-actions.pod:1897
26766 " guestfs_exists (guestfs_h *g,\n"
26767 " const char *path);\n"
26772 #: ../src/guestfs-actions.pod:1904
26773 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
26777 #: ../src/guestfs-actions.pod:1910
26778 msgid "guestfs_fallocate"
26782 #: ../src/guestfs-actions.pod:1912
26786 " guestfs_fallocate (guestfs_h *g,\n"
26787 " const char *path,\n"
26793 #: ../src/guestfs-actions.pod:1917
26795 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
26800 #: ../src/guestfs-actions.pod:1936
26801 msgid "guestfs_fallocate64"
26805 #: ../src/guestfs-actions.pod:1938
26809 " guestfs_fallocate64 (guestfs_h *g,\n"
26810 " const char *path,\n"
26816 #: ../src/guestfs-actions.pod:1947
26818 "Note that this call allocates disk blocks for the file. To create a sparse "
26819 "file use C<guestfs_truncate_size> instead."
26823 #: ../src/guestfs-actions.pod:1950
26825 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
26826 "oversight it only allowed 30 bit lengths to be specified, effectively "
26827 "limiting the maximum size of files created through that call to 1GB."
26831 #: ../src/guestfs-actions.pod:1961
26832 msgid "(Added in 1.3.17)"
26836 #: ../src/guestfs-actions.pod:1963
26837 msgid "guestfs_fgrep"
26841 #: ../src/guestfs-actions.pod:1965
26845 " guestfs_fgrep (guestfs_h *g,\n"
26846 " const char *pattern,\n"
26847 " const char *path);\n"
26852 #: ../src/guestfs-actions.pod:1982
26853 msgid "guestfs_fgrepi"
26857 #: ../src/guestfs-actions.pod:1984
26861 " guestfs_fgrepi (guestfs_h *g,\n"
26862 " const char *pattern,\n"
26863 " const char *path);\n"
26868 #: ../src/guestfs-actions.pod:2001
26869 msgid "guestfs_file"
26873 #: ../src/guestfs-actions.pod:2003
26877 " guestfs_file (guestfs_h *g,\n"
26878 " const char *path);\n"
26883 #: ../src/guestfs-actions.pod:2021
26885 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
26886 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
26890 #: ../src/guestfs-actions.pod:2029
26891 msgid "guestfs_file_architecture"
26895 #: ../src/guestfs-actions.pod:2031
26899 " guestfs_file_architecture (guestfs_h *g,\n"
26900 " const char *filename);\n"
26905 #: ../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:3639 ../src/guestfs-actions.pod:3876 ../src/guestfs-actions.pod:4008
26906 msgid "(Added in 1.5.3)"
26910 #: ../src/guestfs-actions.pod:2141
26911 msgid "guestfs_filesize"
26915 #: ../src/guestfs-actions.pod:2143
26919 " guestfs_filesize (guestfs_h *g,\n"
26920 " const char *file);\n"
26925 #: ../src/guestfs-actions.pod:2149
26927 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
26928 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
26929 "devices, use C<guestfs_blockdev_getsize64>."
26933 #: ../src/guestfs-actions.pod:2155
26934 msgid "(Added in 1.0.82)"
26938 #: ../src/guestfs-actions.pod:2157
26939 msgid "guestfs_fill"
26943 #: ../src/guestfs-actions.pod:2159
26947 " guestfs_fill (guestfs_h *g,\n"
26950 " const char *path);\n"
26955 #: ../src/guestfs-actions.pod:2169
26957 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
26958 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
26959 "bytes use C<guestfs_fill_pattern>."
26963 #: ../src/guestfs-actions.pod:2181
26964 msgid "(Added in 1.0.79)"
26968 #: ../src/guestfs-actions.pod:2183
26969 msgid "guestfs_fill_pattern"
26973 #: ../src/guestfs-actions.pod:2185
26977 " guestfs_fill_pattern (guestfs_h *g,\n"
26978 " const char *pattern,\n"
26980 " const char *path);\n"
26985 #: ../src/guestfs-actions.pod:2191
26987 "This function is like C<guestfs_fill> except that it creates a new file of "
26988 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
26989 "pattern is truncated if necessary to ensure the length of the file is "
26990 "exactly C<len> bytes."
26994 #: ../src/guestfs-actions.pod:2203
26995 msgid "(Added in 1.3.12)"
26999 #: ../src/guestfs-actions.pod:2205
27000 msgid "guestfs_find"
27004 #: ../src/guestfs-actions.pod:2207
27008 " guestfs_find (guestfs_h *g,\n"
27009 " const char *directory);\n"
27014 #: ../src/guestfs-actions.pod:2223
27015 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27019 #: ../src/guestfs-actions.pod:2236
27020 msgid "See also C<guestfs_find0>."
27024 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:4757 ../src/guestfs-actions.pod:6474
27025 msgid "(Added in 1.0.27)"
27029 #: ../src/guestfs-actions.pod:2247
27030 msgid "guestfs_find0"
27034 #: ../src/guestfs-actions.pod:2249
27038 " guestfs_find0 (guestfs_h *g,\n"
27039 " const char *directory,\n"
27040 " const char *files);\n"
27045 #: ../src/guestfs-actions.pod:2258
27047 "This command works the same way as C<guestfs_find> with the following "
27052 #: ../src/guestfs-actions.pod:2285
27053 msgid "(Added in 1.0.74)"
27057 #: ../src/guestfs-actions.pod:2287
27058 msgid "guestfs_findfs_label"
27062 #: ../src/guestfs-actions.pod:2289
27066 " guestfs_findfs_label (guestfs_h *g,\n"
27067 " const char *label);\n"
27072 #: ../src/guestfs-actions.pod:2297
27073 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27077 #: ../src/guestfs-actions.pod:2304
27078 msgid "guestfs_findfs_uuid"
27082 #: ../src/guestfs-actions.pod:2306
27086 " guestfs_findfs_uuid (guestfs_h *g,\n"
27087 " const char *uuid);\n"
27092 #: ../src/guestfs-actions.pod:2314
27093 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27097 #: ../src/guestfs-actions.pod:2321
27098 msgid "guestfs_fsck"
27102 #: ../src/guestfs-actions.pod:2323
27106 " guestfs_fsck (guestfs_h *g,\n"
27107 " const char *fstype,\n"
27108 " const char *device);\n"
27113 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:8253
27114 msgid "(Added in 1.0.16)"
27118 #: ../src/guestfs-actions.pod:2360
27119 msgid "guestfs_get_append"
27123 #: ../src/guestfs-actions.pod:2362
27127 " guestfs_get_append (guestfs_h *g);\n"
27132 #: ../src/guestfs-actions.pod:2370
27134 "This function returns a string which may be NULL. There is no way to return "
27135 "an error from this function. The string is owned by the guest handle and "
27136 "must I<not> be freed."
27140 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:6152 ../src/guestfs-actions.pod:6631 ../src/guestfs-actions.pod:7080 ../src/guestfs-actions.pod:7099 ../src/guestfs-actions.pod:7115 ../src/guestfs-actions.pod:7139 ../src/guestfs-actions.pod:7893 ../src/guestfs-actions.pod:7908 ../src/guestfs-actions.pod:8297
27141 msgid "(Added in 1.0.26)"
27145 #: ../src/guestfs-actions.pod:2376
27146 msgid "guestfs_get_attach_method"
27150 #: ../src/guestfs-actions.pod:2378
27154 " guestfs_get_attach_method (guestfs_h *g);\n"
27159 #: ../src/guestfs-actions.pod:2381
27160 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27164 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:6661
27165 msgid "(Added in 1.9.8)"
27169 #: ../src/guestfs-actions.pod:2388
27170 msgid "guestfs_get_autosync"
27174 #: ../src/guestfs-actions.pod:2390
27178 " guestfs_get_autosync (guestfs_h *g);\n"
27183 #: ../src/guestfs-actions.pod:2399
27184 msgid "guestfs_get_direct"
27188 #: ../src/guestfs-actions.pod:2401
27192 " guestfs_get_direct (guestfs_h *g);\n"
27197 #: ../src/guestfs-actions.pod:2408 ../src/guestfs-actions.pod:6702
27198 msgid "(Added in 1.0.72)"
27202 #: ../src/guestfs-actions.pod:2410
27203 msgid "guestfs_get_e2label"
27207 #: ../src/guestfs-actions.pod:2412
27211 " guestfs_get_e2label (guestfs_h *g,\n"
27212 " const char *device);\n"
27217 #: ../src/guestfs-actions.pod:2416
27219 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27224 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:6720 ../src/guestfs-actions.pod:6739
27225 msgid "(Added in 1.0.15)"
27229 #: ../src/guestfs-actions.pod:2431
27230 msgid "guestfs_get_e2uuid"
27234 #: ../src/guestfs-actions.pod:2433
27238 " guestfs_get_e2uuid (guestfs_h *g,\n"
27239 " const char *device);\n"
27244 #: ../src/guestfs-actions.pod:2437
27246 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27251 #: ../src/guestfs-actions.pod:2452
27252 msgid "guestfs_get_memsize"
27256 #: ../src/guestfs-actions.pod:2454
27260 " guestfs_get_memsize (guestfs_h *g);\n"
27265 #: ../src/guestfs-actions.pod:2460
27267 "If C<guestfs_set_memsize> was not called on this handle, and if "
27268 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27269 "value for memsize."
27273 #: ../src/guestfs-actions.pod:2469 ../src/guestfs-actions.pod:5048 ../src/guestfs-actions.pod:5257 ../src/guestfs-actions.pod:5276 ../src/guestfs-actions.pod:5295 ../src/guestfs-actions.pod:5307 ../src/guestfs-actions.pod:5324 ../src/guestfs-actions.pod:5337 ../src/guestfs-actions.pod:6377 ../src/guestfs-actions.pod:6760 ../src/guestfs-actions.pod:7050 ../src/guestfs-actions.pod:7662
27274 msgid "(Added in 1.0.55)"
27278 #: ../src/guestfs-actions.pod:2471
27279 msgid "guestfs_get_network"
27283 #: ../src/guestfs-actions.pod:2473
27287 " guestfs_get_network (guestfs_h *g);\n"
27292 #: ../src/guestfs-actions.pod:2480 ../src/guestfs-actions.pod:6779
27293 msgid "(Added in 1.5.4)"
27297 #: ../src/guestfs-actions.pod:2482
27298 msgid "guestfs_get_path"
27302 #: ../src/guestfs-actions.pod:2484
27306 " guestfs_get_path (guestfs_h *g);\n"
27311 #: ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2532
27313 "This function returns a string, or NULL on error. The string is owned by "
27314 "the guest handle and must I<not> be freed."
27318 #: ../src/guestfs-actions.pod:2497
27319 msgid "guestfs_get_pgroup"
27323 #: ../src/guestfs-actions.pod:2499
27327 " guestfs_get_pgroup (guestfs_h *g);\n"
27332 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:8154
27333 msgid "(Added in 1.11.18)"
27337 #: ../src/guestfs-actions.pod:2508
27338 msgid "guestfs_get_pid"
27342 #: ../src/guestfs-actions.pod:2510
27346 " guestfs_get_pid (guestfs_h *g);\n"
27351 #: ../src/guestfs-actions.pod:2520
27352 msgid "(Added in 1.0.56)"
27356 #: ../src/guestfs-actions.pod:2522
27357 msgid "guestfs_get_qemu"
27361 #: ../src/guestfs-actions.pod:2524
27365 " guestfs_get_qemu (guestfs_h *g);\n"
27370 #: ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:6843
27371 msgid "(Added in 1.0.6)"
27375 #: ../src/guestfs-actions.pod:2537
27376 msgid "guestfs_get_recovery_proc"
27380 #: ../src/guestfs-actions.pod:2539
27384 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27389 #: ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:4130 ../src/guestfs-actions.pod:4461 ../src/guestfs-actions.pod:4855 ../src/guestfs-actions.pod:4887 ../src/guestfs-actions.pod:6082 ../src/guestfs-actions.pod:6425 ../src/guestfs-actions.pod:6867 ../src/guestfs-actions.pod:7565 ../src/guestfs-actions.pod:7585 ../src/guestfs-actions.pod:7777
27390 msgid "(Added in 1.0.77)"
27394 #: ../src/guestfs-actions.pod:2548
27395 msgid "guestfs_get_selinux"
27399 #: ../src/guestfs-actions.pod:2550
27403 " guestfs_get_selinux (guestfs_h *g);\n"
27408 #: ../src/guestfs-actions.pod:2553
27410 "This returns the current setting of the selinux flag which is passed to the "
27411 "appliance at boot time. See C<guestfs_set_selinux>."
27415 #: ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:6886 ../src/guestfs-actions.pod:6960
27416 msgid "(Added in 1.0.67)"
27420 #: ../src/guestfs-actions.pod:2563
27421 msgid "guestfs_get_smp"
27425 #: ../src/guestfs-actions.pod:2565
27429 " guestfs_get_smp (guestfs_h *g);\n"
27434 #: ../src/guestfs-actions.pod:2574
27435 msgid "guestfs_get_state"
27439 #: ../src/guestfs-actions.pod:2576
27443 " guestfs_get_state (guestfs_h *g);\n"
27448 #: ../src/guestfs-actions.pod:2588
27449 msgid "guestfs_get_trace"
27453 #: ../src/guestfs-actions.pod:2590
27457 " guestfs_get_trace (guestfs_h *g);\n"
27462 #: ../src/guestfs-actions.pod:2599
27463 msgid "guestfs_get_umask"
27467 #: ../src/guestfs-actions.pod:2601
27471 " guestfs_get_umask (guestfs_h *g);\n"
27476 #: ../src/guestfs-actions.pod:2604
27478 "Return the current umask. By default the umask is C<022> unless it has been "
27479 "set by calling C<guestfs_umask>."
27483 #: ../src/guestfs-actions.pod:2611
27484 msgid "guestfs_get_verbose"
27488 #: ../src/guestfs-actions.pod:2613
27492 " guestfs_get_verbose (guestfs_h *g);\n"
27497 #: ../src/guestfs-actions.pod:2622
27498 msgid "guestfs_getcon"
27502 #: ../src/guestfs-actions.pod:2624
27506 " guestfs_getcon (guestfs_h *g);\n"
27511 #: ../src/guestfs-actions.pod:2629
27512 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
27516 #: ../src/guestfs-actions.pod:2637
27517 msgid "guestfs_getxattr"
27521 #: ../src/guestfs-actions.pod:2639
27525 " guestfs_getxattr (guestfs_h *g,\n"
27526 " const char *path,\n"
27527 " const char *name,\n"
27528 " size_t *size_r);\n"
27533 #: ../src/guestfs-actions.pod:2645
27535 "Get a single extended attribute from file C<path> named C<name>. This call "
27536 "follows symlinks. If you want to lookup an extended attribute for the "
27537 "symlink itself, use C<guestfs_lgetxattr>."
27541 #: ../src/guestfs-actions.pod:2649 ../src/guestfs-actions.pod:4144
27543 "Normally it is better to get all extended attributes from a file in one go "
27544 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
27545 "implementations are buggy and do not provide a way to list out attributes. "
27546 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27547 "extended attributes you want in advance and call this function."
27551 #: ../src/guestfs-actions.pod:2659
27552 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27556 #: ../src/guestfs-actions.pod:2661 ../src/guestfs-actions.pod:2874 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4156 ../src/guestfs-actions.pod:6075 ../src/guestfs-actions.pod:6101 ../src/guestfs-actions.pod:6282
27558 "This function returns a buffer, or NULL on error. The size of the returned "
27559 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
27564 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4160
27565 msgid "(Added in 1.7.24)"
27569 #: ../src/guestfs-actions.pod:2667
27570 msgid "guestfs_getxattrs"
27574 #: ../src/guestfs-actions.pod:2669
27577 " struct guestfs_xattr_list *\n"
27578 " guestfs_getxattrs (guestfs_h *g,\n"
27579 " const char *path);\n"
27584 #: ../src/guestfs-actions.pod:2679
27585 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27589 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:4172 ../src/guestfs-actions.pod:4851
27591 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
27592 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27596 #: ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:4176 ../src/guestfs-actions.pod:4375 ../src/guestfs-actions.pod:4411 ../src/guestfs-actions.pod:6455 ../src/guestfs-actions.pod:6979 ../src/guestfs-actions.pod:8362
27597 msgid "(Added in 1.0.59)"
27601 #: ../src/guestfs-actions.pod:2687
27602 msgid "guestfs_glob_expand"
27606 #: ../src/guestfs-actions.pod:2689
27610 " guestfs_glob_expand (guestfs_h *g,\n"
27611 " const char *pattern);\n"
27616 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:7163 ../src/guestfs-actions.pod:7180
27617 msgid "(Added in 1.0.50)"
27621 #: ../src/guestfs-actions.pod:2710
27622 msgid "guestfs_grep"
27626 #: ../src/guestfs-actions.pod:2712
27630 " guestfs_grep (guestfs_h *g,\n"
27631 " const char *regex,\n"
27632 " const char *path);\n"
27637 #: ../src/guestfs-actions.pod:2729
27638 msgid "guestfs_grepi"
27642 #: ../src/guestfs-actions.pod:2731
27646 " guestfs_grepi (guestfs_h *g,\n"
27647 " const char *regex,\n"
27648 " const char *path);\n"
27653 #: ../src/guestfs-actions.pod:2748
27654 msgid "guestfs_grub_install"
27658 #: ../src/guestfs-actions.pod:2750
27662 " guestfs_grub_install (guestfs_h *g,\n"
27663 " const char *root,\n"
27664 " const char *device);\n"
27669 #: ../src/guestfs-actions.pod:2793
27670 msgid "(Added in 1.0.17)"
27674 #: ../src/guestfs-actions.pod:2795
27675 msgid "guestfs_head"
27679 #: ../src/guestfs-actions.pod:2797
27683 " guestfs_head (guestfs_h *g,\n"
27684 " const char *path);\n"
27689 #: ../src/guestfs-actions.pod:2813
27690 msgid "guestfs_head_n"
27694 #: ../src/guestfs-actions.pod:2815
27698 " guestfs_head_n (guestfs_h *g,\n"
27700 " const char *path);\n"
27705 #: ../src/guestfs-actions.pod:2837
27706 msgid "guestfs_hexdump"
27710 #: ../src/guestfs-actions.pod:2839
27714 " guestfs_hexdump (guestfs_h *g,\n"
27715 " const char *path);\n"
27720 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:7244 ../src/guestfs-actions.pod:7299
27721 msgid "(Added in 1.0.22)"
27725 #: ../src/guestfs-actions.pod:2854
27726 msgid "guestfs_initrd_cat"
27730 #: ../src/guestfs-actions.pod:2856
27734 " guestfs_initrd_cat (guestfs_h *g,\n"
27735 " const char *initrdpath,\n"
27736 " const char *filename,\n"
27737 " size_t *size_r);\n"
27742 #: ../src/guestfs-actions.pod:2872
27743 msgid "See also C<guestfs_initrd_list>."
27747 #: ../src/guestfs-actions.pod:2883
27748 msgid "guestfs_initrd_list"
27752 #: ../src/guestfs-actions.pod:2885
27756 " guestfs_initrd_list (guestfs_h *g,\n"
27757 " const char *path);\n"
27762 #: ../src/guestfs-actions.pod:2905
27763 msgid "guestfs_inotify_add_watch"
27767 #: ../src/guestfs-actions.pod:2907
27771 " guestfs_inotify_add_watch (guestfs_h *g,\n"
27772 " const char *path,\n"
27778 #: ../src/guestfs-actions.pod:2926
27779 msgid "guestfs_inotify_close"
27783 #: ../src/guestfs-actions.pod:2928
27787 " guestfs_inotify_close (guestfs_h *g);\n"
27792 #: ../src/guestfs-actions.pod:2939
27793 msgid "guestfs_inotify_files"
27797 #: ../src/guestfs-actions.pod:2941
27801 " guestfs_inotify_files (guestfs_h *g);\n"
27806 #: ../src/guestfs-actions.pod:2944
27808 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
27809 "returns a list of pathnames of objects that were touched. The returned "
27810 "pathnames are sorted and deduplicated."
27814 #: ../src/guestfs-actions.pod:2954
27815 msgid "guestfs_inotify_init"
27819 #: ../src/guestfs-actions.pod:2956
27823 " guestfs_inotify_init (guestfs_h *g,\n"
27824 " int maxevents);\n"
27829 #: ../src/guestfs-actions.pod:2964
27831 "C<maxevents> is the maximum number of events which will be queued up between "
27832 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
27833 "passed as C<0>, then the kernel (or previously set) default is used. For "
27834 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
27835 "throws away events, but records the fact that it threw them away by setting "
27836 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
27837 "C<guestfs_inotify_read>)."
27841 #: ../src/guestfs-actions.pod:2974
27843 "Before any events are generated, you have to add some watches to the "
27844 "internal watch list. See: C<guestfs_inotify_add_watch>, "
27845 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
27849 #: ../src/guestfs-actions.pod:2980
27851 "Queued up events should be read periodically by calling "
27852 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
27853 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
27854 "often enough then you risk the internal queue overflowing."
27858 #: ../src/guestfs-actions.pod:2987
27860 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
27861 "This also removes any watches automatically."
27865 #: ../src/guestfs-actions.pod:3000
27866 msgid "guestfs_inotify_read"
27870 #: ../src/guestfs-actions.pod:3002
27873 " struct guestfs_inotify_event_list *\n"
27874 " guestfs_inotify_read (guestfs_h *g);\n"
27879 #: ../src/guestfs-actions.pod:3016
27881 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
27882 "there was an error. I<The caller must call "
27883 "C<guestfs_free_inotify_event_list> after use>."
27887 #: ../src/guestfs-actions.pod:3022
27888 msgid "guestfs_inotify_rm_watch"
27892 #: ../src/guestfs-actions.pod:3024
27896 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
27902 #: ../src/guestfs-actions.pod:3028
27904 "Remove a previously defined inotify watch. See "
27905 "C<guestfs_inotify_add_watch>."
27909 #: ../src/guestfs-actions.pod:3035
27910 msgid "guestfs_inspect_get_arch"
27914 #: ../src/guestfs-actions.pod:3037
27918 " guestfs_inspect_get_arch (guestfs_h *g,\n"
27919 " const char *root);\n"
27924 #: ../src/guestfs-actions.pod:3041
27926 "This returns the architecture of the inspected operating system. The "
27927 "possible return values are listed under C<guestfs_file_architecture>."
27931 #: ../src/guestfs-actions.pod:3055
27932 msgid "guestfs_inspect_get_distro"
27936 #: ../src/guestfs-actions.pod:3057
27940 " guestfs_inspect_get_distro (guestfs_h *g,\n"
27941 " const char *root);\n"
27946 #: ../src/guestfs-actions.pod:3157
27947 msgid "guestfs_inspect_get_drive_mappings"
27951 #: ../src/guestfs-actions.pod:3159
27955 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
27956 " const char *root);\n"
27961 #: ../src/guestfs-actions.pod:3188
27963 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27964 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
27968 #: ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3460 ../src/guestfs-actions.pod:4263 ../src/guestfs-actions.pod:5526 ../src/guestfs-actions.pod:7601
27970 "This function returns a NULL-terminated array of strings, or NULL if there "
27971 "was an error. The array of strings will always have length C<2n+1>, where "
27972 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
27973 "caller must free the strings and the array after use>."
27977 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3659
27978 msgid "(Added in 1.9.17)"
27982 #: ../src/guestfs-actions.pod:3200
27983 msgid "guestfs_inspect_get_filesystems"
27987 #: ../src/guestfs-actions.pod:3202
27991 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
27992 " const char *root);\n"
27997 #: ../src/guestfs-actions.pod:3214
27999 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28000 "C<guestfs_inspect_get_mountpoints>."
28004 #: ../src/guestfs-actions.pod:3223
28005 msgid "guestfs_inspect_get_format"
28009 #: ../src/guestfs-actions.pod:3225
28013 " guestfs_inspect_get_format (guestfs_h *g,\n"
28014 " const char *root);\n"
28019 #: ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3729 ../src/guestfs-actions.pod:6493
28020 msgid "(Added in 1.9.4)"
28024 #: ../src/guestfs-actions.pod:3261
28025 msgid "guestfs_inspect_get_hostname"
28029 #: ../src/guestfs-actions.pod:3263
28033 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28034 " const char *root);\n"
28039 #: ../src/guestfs-actions.pod:3278
28040 msgid "(Added in 1.7.9)"
28044 #: ../src/guestfs-actions.pod:3280
28045 msgid "guestfs_inspect_get_icon"
28049 #: ../src/guestfs-actions.pod:3282
28053 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28054 " const char *root,\n"
28055 " size_t *size_r,\n"
28061 #: ../src/guestfs-actions.pod:3293
28064 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28065 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28070 #: ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:4190 ../src/guestfs-actions.pod:5425
28071 msgid "(Added in 1.11.12)"
28075 #: ../src/guestfs-actions.pod:3362
28076 msgid "guestfs_inspect_get_icon_va"
28080 #: ../src/guestfs-actions.pod:3364
28084 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28085 " const char *root,\n"
28086 " size_t *size_r,\n"
28087 " va_list args);\n"
28092 #: ../src/guestfs-actions.pod:3370
28093 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28097 #: ../src/guestfs-actions.pod:3374
28098 msgid "guestfs_inspect_get_icon_argv"
28102 #: ../src/guestfs-actions.pod:3376
28106 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28107 " const char *root,\n"
28108 " size_t *size_r,\n"
28109 " const struct guestfs_inspect_get_icon_argv "
28115 #: ../src/guestfs-actions.pod:3382
28116 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28120 #: ../src/guestfs-actions.pod:3386
28121 msgid "guestfs_inspect_get_major_version"
28125 #: ../src/guestfs-actions.pod:3388
28129 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28130 " const char *root);\n"
28135 #: ../src/guestfs-actions.pod:3410
28136 msgid "guestfs_inspect_get_minor_version"
28140 #: ../src/guestfs-actions.pod:3412
28144 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28145 " const char *root);\n"
28150 #: ../src/guestfs-actions.pod:3421
28152 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28153 "C<guestfs_inspect_get_major_version>."
28157 #: ../src/guestfs-actions.pod:3428
28158 msgid "guestfs_inspect_get_mountpoints"
28162 #: ../src/guestfs-actions.pod:3430
28166 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28167 " const char *root);\n"
28172 #: ../src/guestfs-actions.pod:3451
28174 "For operating systems like Windows which still use drive letters, this call "
28175 "will only return an entry for the first drive \"mounted on\" C</>. For "
28176 "information about the mapping of drive letters to partitions, see "
28177 "C<guestfs_inspect_get_drive_mappings>."
28181 #: ../src/guestfs-actions.pod:3457
28183 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28184 "C<guestfs_inspect_get_filesystems>."
28188 #: ../src/guestfs-actions.pod:3468
28189 msgid "guestfs_inspect_get_package_format"
28193 #: ../src/guestfs-actions.pod:3470
28197 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28198 " const char *root);\n"
28203 #: ../src/guestfs-actions.pod:3474
28205 "This function and C<guestfs_inspect_get_package_management> return the "
28206 "package format and package management tool used by the inspected operating "
28207 "system. For example for Fedora these functions would return C<rpm> (package "
28208 "format) and C<yum> (package management)."
28212 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3521
28213 msgid "(Added in 1.7.5)"
28217 #: ../src/guestfs-actions.pod:3495
28218 msgid "guestfs_inspect_get_package_management"
28222 #: ../src/guestfs-actions.pod:3497
28226 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28227 " const char *root);\n"
28232 #: ../src/guestfs-actions.pod:3501
28234 "C<guestfs_inspect_get_package_format> and this function return the package "
28235 "format and package management tool used by the inspected operating system. "
28236 "For example for Fedora these functions would return C<rpm> (package format) "
28237 "and C<yum> (package management)."
28241 #: ../src/guestfs-actions.pod:3523
28242 msgid "guestfs_inspect_get_product_name"
28246 #: ../src/guestfs-actions.pod:3525
28250 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28251 " const char *root);\n"
28256 #: ../src/guestfs-actions.pod:3544
28257 msgid "guestfs_inspect_get_product_variant"
28261 #: ../src/guestfs-actions.pod:3546
28265 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28266 " const char *root);\n"
28271 #: ../src/guestfs-actions.pod:3569
28273 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28274 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28278 #: ../src/guestfs-actions.pod:3576
28279 msgid "(Added in 1.9.13)"
28283 #: ../src/guestfs-actions.pod:3578
28284 msgid "guestfs_inspect_get_roots"
28288 #: ../src/guestfs-actions.pod:3580
28292 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28297 #: ../src/guestfs-actions.pod:3583
28299 "This function is a convenient way to get the list of root devices, as "
28300 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28301 "the whole inspection process."
28305 #: ../src/guestfs-actions.pod:3587
28307 "This returns an empty list if either no root devices were found or the "
28308 "caller has not called C<guestfs_inspect_os>."
28312 #: ../src/guestfs-actions.pod:3596
28313 msgid "(Added in 1.7.3)"
28317 #: ../src/guestfs-actions.pod:3598
28318 msgid "guestfs_inspect_get_type"
28322 #: ../src/guestfs-actions.pod:3600
28326 " guestfs_inspect_get_type (guestfs_h *g,\n"
28327 " const char *root);\n"
28332 #: ../src/guestfs-actions.pod:3641
28333 msgid "guestfs_inspect_get_windows_current_control_set"
28337 #: ../src/guestfs-actions.pod:3643
28341 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28342 " const char *root);\n"
28347 #: ../src/guestfs-actions.pod:3661
28348 msgid "guestfs_inspect_get_windows_systemroot"
28352 #: ../src/guestfs-actions.pod:3663
28356 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28357 " const char *root);\n"
28362 #: ../src/guestfs-actions.pod:3679
28363 msgid "(Added in 1.5.25)"
28367 #: ../src/guestfs-actions.pod:3681
28368 msgid "guestfs_inspect_is_live"
28372 #: ../src/guestfs-actions.pod:3683
28376 " guestfs_inspect_is_live (guestfs_h *g,\n"
28377 " const char *root);\n"
28382 #: ../src/guestfs-actions.pod:3687
28384 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28385 "disk), then this returns true if a live image was detected on the disk."
28389 #: ../src/guestfs-actions.pod:3697
28390 msgid "guestfs_inspect_is_multipart"
28394 #: ../src/guestfs-actions.pod:3699
28398 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28399 " const char *root);\n"
28404 #: ../src/guestfs-actions.pod:3703
28406 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28407 "disk), then this returns true if the disk is part of a set."
28411 #: ../src/guestfs-actions.pod:3713
28412 msgid "guestfs_inspect_is_netinst"
28416 #: ../src/guestfs-actions.pod:3715
28420 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28421 " const char *root);\n"
28426 #: ../src/guestfs-actions.pod:3719
28428 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28429 "disk), then this returns true if the disk is a network installer, ie. not a "
28430 "self-contained install CD but one which is likely to require network access "
28431 "to complete the install."
28435 #: ../src/guestfs-actions.pod:3731
28436 msgid "guestfs_inspect_list_applications"
28440 #: ../src/guestfs-actions.pod:3733
28443 " struct guestfs_application_list *\n"
28444 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28445 " const char *root);\n"
28450 #: ../src/guestfs-actions.pod:3739
28452 "I<Note:> This call works differently from other parts of the inspection "
28453 "API. You have to call C<guestfs_inspect_os>, then "
28454 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28455 "this. Listing applications is a significantly more difficult operation "
28456 "which requires access to the full filesystem. Also note that unlike the "
28457 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28458 "the libguestfs handle, this call actually reads parts of the mounted "
28459 "filesystems during the call."
28463 #: ../src/guestfs-actions.pod:3829
28465 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28466 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28471 #: ../src/guestfs-actions.pod:3833
28472 msgid "(Added in 1.7.8)"
28476 #: ../src/guestfs-actions.pod:3835
28477 msgid "guestfs_inspect_os"
28481 #: ../src/guestfs-actions.pod:3837
28485 " guestfs_inspect_os (guestfs_h *g);\n"
28490 #: ../src/guestfs-actions.pod:3853
28492 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28493 "functions in order to query further information about each operating system, "
28494 "such as the name and version."
28498 #: ../src/guestfs-actions.pod:3858
28500 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
28501 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
28502 "the contents. This should be called with no disks currently mounted. The "
28503 "function may also use Augeas, so any existing Augeas handle will be closed."
28507 #: ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:4201 ../src/guestfs-actions.pod:4283
28508 msgid "See also C<guestfs_list_filesystems>."
28512 #: ../src/guestfs-actions.pod:3878
28513 msgid "guestfs_is_blockdev"
28517 #: ../src/guestfs-actions.pod:3880
28521 " guestfs_is_blockdev (guestfs_h *g,\n"
28522 " const char *path);\n"
28527 #: ../src/guestfs-actions.pod:3887 ../src/guestfs-actions.pod:3916 ../src/guestfs-actions.pod:3946 ../src/guestfs-actions.pod:3961 ../src/guestfs-actions.pod:3977 ../src/guestfs-actions.pod:4033 ../src/guestfs-actions.pod:4048
28528 msgid "See also C<guestfs_stat>."
28532 #: ../src/guestfs-actions.pod:3891 ../src/guestfs-actions.pod:3920 ../src/guestfs-actions.pod:3965 ../src/guestfs-actions.pod:4037 ../src/guestfs-actions.pod:4052
28533 msgid "(Added in 1.5.10)"
28537 #: ../src/guestfs-actions.pod:3893
28538 msgid "guestfs_is_busy"
28542 #: ../src/guestfs-actions.pod:3895
28546 " guestfs_is_busy (guestfs_h *g);\n"
28551 #: ../src/guestfs-actions.pod:3907
28552 msgid "guestfs_is_chardev"
28556 #: ../src/guestfs-actions.pod:3909
28560 " guestfs_is_chardev (guestfs_h *g,\n"
28561 " const char *path);\n"
28566 #: ../src/guestfs-actions.pod:3922
28567 msgid "guestfs_is_config"
28571 #: ../src/guestfs-actions.pod:3924
28575 " guestfs_is_config (guestfs_h *g);\n"
28580 #: ../src/guestfs-actions.pod:3936
28581 msgid "guestfs_is_dir"
28585 #: ../src/guestfs-actions.pod:3938
28589 " guestfs_is_dir (guestfs_h *g,\n"
28590 " const char *path);\n"
28595 #: ../src/guestfs-actions.pod:3952
28596 msgid "guestfs_is_fifo"
28600 #: ../src/guestfs-actions.pod:3954
28604 " guestfs_is_fifo (guestfs_h *g,\n"
28605 " const char *path);\n"
28610 #: ../src/guestfs-actions.pod:3967
28611 msgid "guestfs_is_file"
28615 #: ../src/guestfs-actions.pod:3969
28619 " guestfs_is_file (guestfs_h *g,\n"
28620 " const char *path);\n"
28625 #: ../src/guestfs-actions.pod:3983
28626 msgid "guestfs_is_launching"
28630 #: ../src/guestfs-actions.pod:3985
28634 " guestfs_is_launching (guestfs_h *g);\n"
28639 #: ../src/guestfs-actions.pod:3997
28640 msgid "guestfs_is_lv"
28644 #: ../src/guestfs-actions.pod:3999
28648 " guestfs_is_lv (guestfs_h *g,\n"
28649 " const char *device);\n"
28654 #: ../src/guestfs-actions.pod:4010
28655 msgid "guestfs_is_ready"
28659 #: ../src/guestfs-actions.pod:4012
28663 " guestfs_is_ready (guestfs_h *g);\n"
28668 #: ../src/guestfs-actions.pod:4024
28669 msgid "guestfs_is_socket"
28673 #: ../src/guestfs-actions.pod:4026
28677 " guestfs_is_socket (guestfs_h *g,\n"
28678 " const char *path);\n"
28683 #: ../src/guestfs-actions.pod:4039
28684 msgid "guestfs_is_symlink"
28688 #: ../src/guestfs-actions.pod:4041
28692 " guestfs_is_symlink (guestfs_h *g,\n"
28693 " const char *path);\n"
28698 #: ../src/guestfs-actions.pod:4054
28699 msgid "guestfs_is_zero"
28703 #: ../src/guestfs-actions.pod:4056
28707 " guestfs_is_zero (guestfs_h *g,\n"
28708 " const char *path);\n"
28713 #: ../src/guestfs-actions.pod:4065 ../src/guestfs-actions.pod:4079
28714 msgid "(Added in 1.11.8)"
28718 #: ../src/guestfs-actions.pod:4067
28719 msgid "guestfs_is_zero_device"
28723 #: ../src/guestfs-actions.pod:4069
28727 " guestfs_is_zero_device (guestfs_h *g,\n"
28728 " const char *device);\n"
28733 #: ../src/guestfs-actions.pod:4081
28734 msgid "guestfs_kill_subprocess"
28738 #: ../src/guestfs-actions.pod:4083
28742 " guestfs_kill_subprocess (guestfs_h *g);\n"
28747 #: ../src/guestfs-actions.pod:4092
28748 msgid "guestfs_launch"
28752 #: ../src/guestfs-actions.pod:4094
28756 " guestfs_launch (guestfs_h *g);\n"
28761 #: ../src/guestfs-actions.pod:4112
28762 msgid "guestfs_lchown"
28766 #: ../src/guestfs-actions.pod:4114
28770 " guestfs_lchown (guestfs_h *g,\n"
28773 " const char *path);\n"
28778 #: ../src/guestfs-actions.pod:4120
28780 "Change the file owner to C<owner> and group to C<group>. This is like "
28781 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
28782 "changed, not the target."
28786 #: ../src/guestfs-actions.pod:4132
28787 msgid "guestfs_lgetxattr"
28791 #: ../src/guestfs-actions.pod:4134
28795 " guestfs_lgetxattr (guestfs_h *g,\n"
28796 " const char *path,\n"
28797 " const char *name,\n"
28798 " size_t *size_r);\n"
28803 #: ../src/guestfs-actions.pod:4154
28804 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
28808 #: ../src/guestfs-actions.pod:4162
28809 msgid "guestfs_lgetxattrs"
28813 #: ../src/guestfs-actions.pod:4164
28816 " struct guestfs_xattr_list *\n"
28817 " guestfs_lgetxattrs (guestfs_h *g,\n"
28818 " const char *path);\n"
28823 #: ../src/guestfs-actions.pod:4168
28825 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
28826 "then it returns the extended attributes of the link itself."
28830 #: ../src/guestfs-actions.pod:4178
28831 msgid "guestfs_list_9p"
28835 #: ../src/guestfs-actions.pod:4180
28839 " guestfs_list_9p (guestfs_h *g);\n"
28844 #: ../src/guestfs-actions.pod:4192
28845 msgid "guestfs_list_devices"
28849 #: ../src/guestfs-actions.pod:4194
28853 " guestfs_list_devices (guestfs_h *g);\n"
28858 #: ../src/guestfs-actions.pod:4209
28859 msgid "guestfs_list_dm_devices"
28863 #: ../src/guestfs-actions.pod:4211
28867 " guestfs_list_dm_devices (guestfs_h *g);\n"
28872 #: ../src/guestfs-actions.pod:4216
28874 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
28875 "previous call to C<guestfs_luks_open>."
28879 #: ../src/guestfs-actions.pod:4219
28881 "Device mapper devices which correspond to logical volumes are I<not> "
28882 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
28887 #: ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:5664
28888 msgid "(Added in 1.11.15)"
28892 #: ../src/guestfs-actions.pod:4229
28893 msgid "guestfs_list_filesystems"
28897 #: ../src/guestfs-actions.pod:4231
28901 " guestfs_list_filesystems (guestfs_h *g);\n"
28906 #: ../src/guestfs-actions.pod:4251
28908 "This command runs other libguestfs commands, which might include "
28909 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
28910 "soon after launch and only when nothing is mounted."
28914 #: ../src/guestfs-actions.pod:4255
28916 "Not all of the filesystems returned will be mountable. In particular, swap "
28917 "partitions are returned in the list. Also this command does not check that "
28918 "each filesystem found is valid and mountable, and some filesystems might be "
28919 "mountable but require special options. Filesystems may not all belong to a "
28920 "single logical operating system (use C<guestfs_inspect_os> to look for "
28925 #: ../src/guestfs-actions.pod:4269 ../src/guestfs-actions.pod:6024
28926 msgid "(Added in 1.5.15)"
28930 #: ../src/guestfs-actions.pod:4271
28931 msgid "guestfs_list_partitions"
28935 #: ../src/guestfs-actions.pod:4273
28939 " guestfs_list_partitions (guestfs_h *g);\n"
28944 #: ../src/guestfs-actions.pod:4280
28946 "This does not return logical volumes. For that you will need to call "
28951 #: ../src/guestfs-actions.pod:4291
28956 #: ../src/guestfs-actions.pod:4293
28960 " guestfs_ll (guestfs_h *g,\n"
28961 " const char *directory);\n"
28966 #: ../src/guestfs-actions.pod:4308
28971 #: ../src/guestfs-actions.pod:4310
28975 " guestfs_ln (guestfs_h *g,\n"
28976 " const char *target,\n"
28977 " const char *linkname);\n"
28982 #: ../src/guestfs-actions.pod:4321
28983 msgid "guestfs_ln_f"
28987 #: ../src/guestfs-actions.pod:4323
28991 " guestfs_ln_f (guestfs_h *g,\n"
28992 " const char *target,\n"
28993 " const char *linkname);\n"
28998 #: ../src/guestfs-actions.pod:4335
28999 msgid "guestfs_ln_s"
29003 #: ../src/guestfs-actions.pod:4337
29007 " guestfs_ln_s (guestfs_h *g,\n"
29008 " const char *target,\n"
29009 " const char *linkname);\n"
29014 #: ../src/guestfs-actions.pod:4348
29015 msgid "guestfs_ln_sf"
29019 #: ../src/guestfs-actions.pod:4350
29023 " guestfs_ln_sf (guestfs_h *g,\n"
29024 " const char *target,\n"
29025 " const char *linkname);\n"
29030 #: ../src/guestfs-actions.pod:4362
29031 msgid "guestfs_lremovexattr"
29035 #: ../src/guestfs-actions.pod:4364
29039 " guestfs_lremovexattr (guestfs_h *g,\n"
29040 " const char *xattr,\n"
29041 " const char *path);\n"
29046 #: ../src/guestfs-actions.pod:4369
29048 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29049 "link, then it removes an extended attribute of the link itself."
29053 #: ../src/guestfs-actions.pod:4377
29058 #: ../src/guestfs-actions.pod:4379
29062 " guestfs_ls (guestfs_h *g,\n"
29063 " const char *directory);\n"
29068 #: ../src/guestfs-actions.pod:4387
29070 "This command is mostly useful for interactive sessions. Programs should "
29071 "probably use C<guestfs_readdir> instead."
29075 #: ../src/guestfs-actions.pod:4396
29076 msgid "guestfs_lsetxattr"
29080 #: ../src/guestfs-actions.pod:4398
29084 " guestfs_lsetxattr (guestfs_h *g,\n"
29085 " const char *xattr,\n"
29086 " const char *val,\n"
29088 " const char *path);\n"
29093 #: ../src/guestfs-actions.pod:4405
29095 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29096 "then it sets an extended attribute of the link itself."
29100 #: ../src/guestfs-actions.pod:4413
29101 msgid "guestfs_lstat"
29105 #: ../src/guestfs-actions.pod:4415
29108 " struct guestfs_stat *\n"
29109 " guestfs_lstat (guestfs_h *g,\n"
29110 " const char *path);\n"
29115 #: ../src/guestfs-actions.pod:4421
29117 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29118 "link, then the link is stat-ed, not the file it refers to."
29122 #: ../src/guestfs-actions.pod:4427 ../src/guestfs-actions.pod:7204
29124 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29125 "error. I<The caller must call C<guestfs_free_stat> after use>."
29129 #: ../src/guestfs-actions.pod:4431 ../src/guestfs-actions.pod:7208 ../src/guestfs-actions.pod:7226 ../src/guestfs-actions.pod:7607
29130 msgid "(Added in 0.9.2)"
29134 #: ../src/guestfs-actions.pod:4433
29135 msgid "guestfs_lstatlist"
29139 #: ../src/guestfs-actions.pod:4435
29142 " struct guestfs_stat_list *\n"
29143 " guestfs_lstatlist (guestfs_h *g,\n"
29144 " const char *path,\n"
29145 " char *const *names);\n"
29150 #: ../src/guestfs-actions.pod:4440
29152 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29153 "files, where all files are in the directory C<path>. C<names> is the list "
29154 "of files from this directory."
29158 #: ../src/guestfs-actions.pod:4449
29160 "This call is intended for programs that want to efficiently list a directory "
29161 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
29162 "for a similarly efficient call for getting extended attributes. Very long "
29163 "directory listings might cause the protocol message size to be exceeded, "
29164 "causing this call to fail. The caller must split up such requests into "
29165 "smaller groups of names."
29169 #: ../src/guestfs-actions.pod:4457
29171 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29172 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29176 #: ../src/guestfs-actions.pod:4463
29177 msgid "guestfs_luks_add_key"
29181 #: ../src/guestfs-actions.pod:4465
29185 " guestfs_luks_add_key (guestfs_h *g,\n"
29186 " const char *device,\n"
29187 " const char *key,\n"
29188 " const char *newkey,\n"
29194 #: ../src/guestfs-actions.pod:4477
29196 "Note that if C<keyslot> already contains a key, then this command will "
29197 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
29201 #: ../src/guestfs-actions.pod:4483 ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4540 ../src/guestfs-actions.pod:4560 ../src/guestfs-actions.pod:4595 ../src/guestfs-actions.pod:4614
29203 "This function takes a key or passphrase parameter which could contain "
29204 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29209 #: ../src/guestfs-actions.pod:4487 ../src/guestfs-actions.pod:4524 ../src/guestfs-actions.pod:4544 ../src/guestfs-actions.pod:4564
29210 msgid "(Added in 1.5.2)"
29214 #: ../src/guestfs-actions.pod:4489
29215 msgid "guestfs_luks_close"
29219 #: ../src/guestfs-actions.pod:4491
29223 " guestfs_luks_close (guestfs_h *g,\n"
29224 " const char *device);\n"
29229 #: ../src/guestfs-actions.pod:4495
29231 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29232 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
29233 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
29234 "underlying block device."
29238 #: ../src/guestfs-actions.pod:4503 ../src/guestfs-actions.pod:4599 ../src/guestfs-actions.pod:4618 ../src/guestfs-actions.pod:4668 ../src/guestfs-actions.pod:4713
29239 msgid "(Added in 1.5.1)"
29243 #: ../src/guestfs-actions.pod:4505
29244 msgid "guestfs_luks_format"
29248 #: ../src/guestfs-actions.pod:4507
29252 " guestfs_luks_format (guestfs_h *g,\n"
29253 " const char *device,\n"
29254 " const char *key,\n"
29260 #: ../src/guestfs-actions.pod:4526
29261 msgid "guestfs_luks_format_cipher"
29265 #: ../src/guestfs-actions.pod:4528
29269 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29270 " const char *device,\n"
29271 " const char *key,\n"
29273 " const char *cipher);\n"
29278 #: ../src/guestfs-actions.pod:4535
29280 "This command is the same as C<guestfs_luks_format> but it also allows you to "
29281 "set the C<cipher> used."
29285 #: ../src/guestfs-actions.pod:4546
29286 msgid "guestfs_luks_kill_slot"
29290 #: ../src/guestfs-actions.pod:4548
29294 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29295 " const char *device,\n"
29296 " const char *key,\n"
29302 #: ../src/guestfs-actions.pod:4566
29303 msgid "guestfs_luks_open"
29307 #: ../src/guestfs-actions.pod:4568
29311 " guestfs_luks_open (guestfs_h *g,\n"
29312 " const char *device,\n"
29313 " const char *key,\n"
29314 " const char *mapname);\n"
29319 #: ../src/guestfs-actions.pod:4586
29321 "If this block device contains LVM volume groups, then calling "
29322 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29327 #: ../src/guestfs-actions.pod:4590
29328 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29332 #: ../src/guestfs-actions.pod:4601
29333 msgid "guestfs_luks_open_ro"
29337 #: ../src/guestfs-actions.pod:4603
29341 " guestfs_luks_open_ro (guestfs_h *g,\n"
29342 " const char *device,\n"
29343 " const char *key,\n"
29344 " const char *mapname);\n"
29349 #: ../src/guestfs-actions.pod:4609
29351 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29356 #: ../src/guestfs-actions.pod:4620
29357 msgid "guestfs_lvcreate"
29361 #: ../src/guestfs-actions.pod:4622
29365 " guestfs_lvcreate (guestfs_h *g,\n"
29366 " const char *logvol,\n"
29367 " const char *volgroup,\n"
29373 #: ../src/guestfs-actions.pod:4635
29374 msgid "guestfs_lvm_canonical_lv_name"
29378 #: ../src/guestfs-actions.pod:4637
29382 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29383 " const char *lvname);\n"
29388 #: ../src/guestfs-actions.pod:4648
29389 msgid "See also C<guestfs_is_lv>."
29393 #: ../src/guestfs-actions.pod:4653
29394 msgid "(Added in 1.5.24)"
29398 #: ../src/guestfs-actions.pod:4655
29399 msgid "guestfs_lvm_clear_filter"
29403 #: ../src/guestfs-actions.pod:4657
29407 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29412 #: ../src/guestfs-actions.pod:4660
29414 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29415 "see every block device."
29419 #: ../src/guestfs-actions.pod:4670
29420 msgid "guestfs_lvm_remove_all"
29424 #: ../src/guestfs-actions.pod:4672
29428 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29433 #: ../src/guestfs-actions.pod:4682
29434 msgid "guestfs_lvm_set_filter"
29438 #: ../src/guestfs-actions.pod:4684
29442 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29443 " char *const *devices);\n"
29448 #: ../src/guestfs-actions.pod:4715
29449 msgid "guestfs_lvremove"
29453 #: ../src/guestfs-actions.pod:4717
29457 " guestfs_lvremove (guestfs_h *g,\n"
29458 " const char *device);\n"
29463 #: ../src/guestfs-actions.pod:4729 ../src/guestfs-actions.pod:6139 ../src/guestfs-actions.pod:7977
29464 msgid "(Added in 1.0.13)"
29468 #: ../src/guestfs-actions.pod:4731
29469 msgid "guestfs_lvrename"
29473 #: ../src/guestfs-actions.pod:4733
29477 " guestfs_lvrename (guestfs_h *g,\n"
29478 " const char *logvol,\n"
29479 " const char *newlogvol);\n"
29484 #: ../src/guestfs-actions.pod:4742 ../src/guestfs-actions.pod:7990
29485 msgid "(Added in 1.0.83)"
29489 #: ../src/guestfs-actions.pod:4744
29490 msgid "guestfs_lvresize"
29494 #: ../src/guestfs-actions.pod:4746
29498 " guestfs_lvresize (guestfs_h *g,\n"
29499 " const char *device,\n"
29505 #: ../src/guestfs-actions.pod:4759
29506 msgid "guestfs_lvresize_free"
29510 #: ../src/guestfs-actions.pod:4761
29514 " guestfs_lvresize_free (guestfs_h *g,\n"
29515 " const char *lv,\n"
29521 #: ../src/guestfs-actions.pod:4774
29522 msgid "(Added in 1.3.3)"
29526 #: ../src/guestfs-actions.pod:4776
29527 msgid "guestfs_lvs"
29531 #: ../src/guestfs-actions.pod:4778
29535 " guestfs_lvs (guestfs_h *g);\n"
29540 #: ../src/guestfs-actions.pod:4787
29541 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29545 #: ../src/guestfs-actions.pod:4795
29546 msgid "guestfs_lvs_full"
29550 #: ../src/guestfs-actions.pod:4797
29553 " struct guestfs_lvm_lv_list *\n"
29554 " guestfs_lvs_full (guestfs_h *g);\n"
29559 #: ../src/guestfs-actions.pod:4803
29561 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29562 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
29567 #: ../src/guestfs-actions.pod:4809
29568 msgid "guestfs_lvuuid"
29572 #: ../src/guestfs-actions.pod:4811
29576 " guestfs_lvuuid (guestfs_h *g,\n"
29577 " const char *device);\n"
29582 #: ../src/guestfs-actions.pod:4822
29583 msgid "guestfs_lxattrlist"
29587 #: ../src/guestfs-actions.pod:4824
29590 " struct guestfs_xattr_list *\n"
29591 " guestfs_lxattrlist (guestfs_h *g,\n"
29592 " const char *path,\n"
29593 " char *const *names);\n"
29598 #: ../src/guestfs-actions.pod:4843
29600 "This call is intended for programs that want to efficiently list a directory "
29601 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
29602 "a similarly efficient call for getting standard stats. Very long directory "
29603 "listings might cause the protocol message size to be exceeded, causing this "
29604 "call to fail. The caller must split up such requests into smaller groups of "
29609 #: ../src/guestfs-actions.pod:4857
29610 msgid "guestfs_mkdir"
29614 #: ../src/guestfs-actions.pod:4859
29618 " guestfs_mkdir (guestfs_h *g,\n"
29619 " const char *path);\n"
29624 #: ../src/guestfs-actions.pod:4869
29625 msgid "guestfs_mkdir_mode"
29629 #: ../src/guestfs-actions.pod:4871
29633 " guestfs_mkdir_mode (guestfs_h *g,\n"
29634 " const char *path,\n"
29640 #: ../src/guestfs-actions.pod:4883
29641 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
29645 #: ../src/guestfs-actions.pod:4889
29646 msgid "guestfs_mkdir_p"
29650 #: ../src/guestfs-actions.pod:4891
29654 " guestfs_mkdir_p (guestfs_h *g,\n"
29655 " const char *path);\n"
29660 #: ../src/guestfs-actions.pod:4902
29661 msgid "guestfs_mkdtemp"
29665 #: ../src/guestfs-actions.pod:4904
29669 " guestfs_mkdtemp (guestfs_h *g,\n"
29670 " const char *template);\n"
29675 #: ../src/guestfs-actions.pod:4932
29676 msgid "guestfs_mke2fs_J"
29680 #: ../src/guestfs-actions.pod:4934
29684 " guestfs_mke2fs_J (guestfs_h *g,\n"
29685 " const char *fstype,\n"
29686 " int blocksize,\n"
29687 " const char *device,\n"
29688 " const char *journal);\n"
29693 #: ../src/guestfs-actions.pod:4947
29694 msgid "See also C<guestfs_mke2journal>."
29698 #: ../src/guestfs-actions.pod:4951 ../src/guestfs-actions.pod:4969 ../src/guestfs-actions.pod:4987 ../src/guestfs-actions.pod:5003 ../src/guestfs-actions.pod:5017 ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5090 ../src/guestfs-actions.pod:5367
29699 msgid "(Added in 1.0.68)"
29703 #: ../src/guestfs-actions.pod:4953
29704 msgid "guestfs_mke2fs_JL"
29708 #: ../src/guestfs-actions.pod:4955
29712 " guestfs_mke2fs_JL (guestfs_h *g,\n"
29713 " const char *fstype,\n"
29714 " int blocksize,\n"
29715 " const char *device,\n"
29716 " const char *label);\n"
29721 #: ../src/guestfs-actions.pod:4965
29722 msgid "See also C<guestfs_mke2journal_L>."
29726 #: ../src/guestfs-actions.pod:4971
29727 msgid "guestfs_mke2fs_JU"
29731 #: ../src/guestfs-actions.pod:4973
29735 " guestfs_mke2fs_JU (guestfs_h *g,\n"
29736 " const char *fstype,\n"
29737 " int blocksize,\n"
29738 " const char *device,\n"
29739 " const char *uuid);\n"
29744 #: ../src/guestfs-actions.pod:4983
29745 msgid "See also C<guestfs_mke2journal_U>."
29749 #: ../src/guestfs-actions.pod:4989
29750 msgid "guestfs_mke2journal"
29754 #: ../src/guestfs-actions.pod:4991
29758 " guestfs_mke2journal (guestfs_h *g,\n"
29759 " int blocksize,\n"
29760 " const char *device);\n"
29765 #: ../src/guestfs-actions.pod:5005
29766 msgid "guestfs_mke2journal_L"
29770 #: ../src/guestfs-actions.pod:5007
29774 " guestfs_mke2journal_L (guestfs_h *g,\n"
29775 " int blocksize,\n"
29776 " const char *label,\n"
29777 " const char *device);\n"
29782 #: ../src/guestfs-actions.pod:5019
29783 msgid "guestfs_mke2journal_U"
29787 #: ../src/guestfs-actions.pod:5021
29791 " guestfs_mke2journal_U (guestfs_h *g,\n"
29792 " int blocksize,\n"
29793 " const char *uuid,\n"
29794 " const char *device);\n"
29799 #: ../src/guestfs-actions.pod:5033
29800 msgid "guestfs_mkfifo"
29804 #: ../src/guestfs-actions.pod:5035
29808 " guestfs_mkfifo (guestfs_h *g,\n"
29810 " const char *path);\n"
29815 #: ../src/guestfs-actions.pod:5040
29817 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
29818 "is just a convenient wrapper around C<guestfs_mknod>."
29822 #: ../src/guestfs-actions.pod:5050
29823 msgid "guestfs_mkfs"
29827 #: ../src/guestfs-actions.pod:5052
29831 " guestfs_mkfs (guestfs_h *g,\n"
29832 " const char *fstype,\n"
29833 " const char *device);\n"
29838 #: ../src/guestfs-actions.pod:5065
29839 msgid "guestfs_mkfs_b"
29843 #: ../src/guestfs-actions.pod:5067
29847 " guestfs_mkfs_b (guestfs_h *g,\n"
29848 " const char *fstype,\n"
29849 " int blocksize,\n"
29850 " const char *device);\n"
29855 #: ../src/guestfs-actions.pod:5073
29857 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
29862 #: ../src/guestfs-actions.pod:5080
29864 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
29865 "block size of the resulting filesystem. Supported block sizes depend on the "
29866 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
29870 #: ../src/guestfs-actions.pod:5092
29871 msgid "guestfs_mkfs_opts"
29875 #: ../src/guestfs-actions.pod:5094
29879 " guestfs_mkfs_opts (guestfs_h *g,\n"
29880 " const char *fstype,\n"
29881 " const char *device,\n"
29887 #: ../src/guestfs-actions.pod:5105
29890 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
29891 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
29892 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
29893 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
29898 #: ../src/guestfs-actions.pod:5153
29899 msgid "(Added in 1.7.19)"
29903 #: ../src/guestfs-actions.pod:5155
29904 msgid "guestfs_mkfs_opts_va"
29908 #: ../src/guestfs-actions.pod:5157
29912 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
29913 " const char *fstype,\n"
29914 " const char *device,\n"
29915 " va_list args);\n"
29920 #: ../src/guestfs-actions.pod:5163
29921 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
29925 #: ../src/guestfs-actions.pod:5167
29926 msgid "guestfs_mkfs_opts_argv"
29930 #: ../src/guestfs-actions.pod:5169
29934 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
29935 " const char *fstype,\n"
29936 " const char *device,\n"
29937 " const struct guestfs_mkfs_opts_argv *optargs);\n"
29942 #: ../src/guestfs-actions.pod:5175
29943 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
29947 #: ../src/guestfs-actions.pod:5179
29948 msgid "guestfs_mkmountpoint"
29952 #: ../src/guestfs-actions.pod:5181
29956 " guestfs_mkmountpoint (guestfs_h *g,\n"
29957 " const char *exemptpath);\n"
29962 #: ../src/guestfs-actions.pod:5185
29964 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
29965 "that can be used to create extra mountpoints before mounting the first "
29970 #: ../src/guestfs-actions.pod:5209
29972 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
29973 "may get unexpected errors if you try to mix these calls. It is safest to "
29974 "manually unmount filesystems and remove mountpoints after use."
29978 #: ../src/guestfs-actions.pod:5213
29980 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
29981 "first, so for this to work for manual mountpoints, you must ensure that the "
29982 "innermost mountpoints have the longest pathnames, as in the example code "
29987 #: ../src/guestfs-actions.pod:5220
29989 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
29990 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
29991 "can also trigger these issues."
29995 #: ../src/guestfs-actions.pod:5226 ../src/guestfs-actions.pod:5532 ../src/guestfs-actions.pod:6559
29996 msgid "(Added in 1.0.62)"
30000 #: ../src/guestfs-actions.pod:5228
30001 msgid "guestfs_mknod"
30005 #: ../src/guestfs-actions.pod:5230
30009 " guestfs_mknod (guestfs_h *g,\n"
30013 " const char *path);\n"
30018 #: ../src/guestfs-actions.pod:5245
30020 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30021 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30022 "regular file). These constants are available in the standard Linux header "
30023 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30024 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
30025 "the appropriate constant for you."
30029 #: ../src/guestfs-actions.pod:5259
30030 msgid "guestfs_mknod_b"
30034 #: ../src/guestfs-actions.pod:5261
30038 " guestfs_mknod_b (guestfs_h *g,\n"
30042 " const char *path);\n"
30047 #: ../src/guestfs-actions.pod:5268
30049 "This call creates a block device node called C<path> with mode C<mode> and "
30050 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30051 "wrapper around C<guestfs_mknod>."
30055 #: ../src/guestfs-actions.pod:5278
30056 msgid "guestfs_mknod_c"
30060 #: ../src/guestfs-actions.pod:5280
30064 " guestfs_mknod_c (guestfs_h *g,\n"
30068 " const char *path);\n"
30073 #: ../src/guestfs-actions.pod:5287
30075 "This call creates a char device node called C<path> with mode C<mode> and "
30076 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30077 "wrapper around C<guestfs_mknod>."
30081 #: ../src/guestfs-actions.pod:5297
30082 msgid "guestfs_mkswap"
30086 #: ../src/guestfs-actions.pod:5299
30090 " guestfs_mkswap (guestfs_h *g,\n"
30091 " const char *device);\n"
30096 #: ../src/guestfs-actions.pod:5309
30097 msgid "guestfs_mkswap_L"
30101 #: ../src/guestfs-actions.pod:5311
30105 " guestfs_mkswap_L (guestfs_h *g,\n"
30106 " const char *label,\n"
30107 " const char *device);\n"
30112 #: ../src/guestfs-actions.pod:5326
30113 msgid "guestfs_mkswap_U"
30117 #: ../src/guestfs-actions.pod:5328
30121 " guestfs_mkswap_U (guestfs_h *g,\n"
30122 " const char *uuid,\n"
30123 " const char *device);\n"
30128 #: ../src/guestfs-actions.pod:5339
30129 msgid "guestfs_mkswap_file"
30133 #: ../src/guestfs-actions.pod:5341
30137 " guestfs_mkswap_file (guestfs_h *g,\n"
30138 " const char *path);\n"
30143 #: ../src/guestfs-actions.pod:5347
30145 "This command just writes a swap file signature to an existing file. To "
30146 "create the file itself, use something like C<guestfs_fallocate>."
30150 #: ../src/guestfs-actions.pod:5354
30151 msgid "guestfs_modprobe"
30155 #: ../src/guestfs-actions.pod:5356
30159 " guestfs_modprobe (guestfs_h *g,\n"
30160 " const char *modulename);\n"
30165 #: ../src/guestfs-actions.pod:5369
30166 msgid "guestfs_mount"
30170 #: ../src/guestfs-actions.pod:5371
30174 " guestfs_mount (guestfs_h *g,\n"
30175 " const char *device,\n"
30176 " const char *mountpoint);\n"
30181 #: ../src/guestfs-actions.pod:5390
30183 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30184 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30185 "problems for users. If your program might need to work with older versions "
30186 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30187 "for the first parameter if you don't want any options)."
30191 #: ../src/guestfs-actions.pod:5401
30192 msgid "guestfs_mount_9p"
30196 #: ../src/guestfs-actions.pod:5403
30200 " guestfs_mount_9p (guestfs_h *g,\n"
30201 " const char *mounttag,\n"
30202 " const char *mountpoint,\n"
30208 #: ../src/guestfs-actions.pod:5414
30211 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30216 #: ../src/guestfs-actions.pod:5427
30217 msgid "guestfs_mount_9p_va"
30221 #: ../src/guestfs-actions.pod:5429
30225 " guestfs_mount_9p_va (guestfs_h *g,\n"
30226 " const char *mounttag,\n"
30227 " const char *mountpoint,\n"
30228 " va_list args);\n"
30233 #: ../src/guestfs-actions.pod:5435
30234 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30238 #: ../src/guestfs-actions.pod:5439
30239 msgid "guestfs_mount_9p_argv"
30243 #: ../src/guestfs-actions.pod:5441
30247 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30248 " const char *mounttag,\n"
30249 " const char *mountpoint,\n"
30250 " const struct guestfs_mount_9p_argv *optargs);\n"
30255 #: ../src/guestfs-actions.pod:5447
30256 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30260 #: ../src/guestfs-actions.pod:5451
30261 msgid "guestfs_mount_loop"
30265 #: ../src/guestfs-actions.pod:5453
30269 " guestfs_mount_loop (guestfs_h *g,\n"
30270 " const char *file,\n"
30271 " const char *mountpoint);\n"
30276 #: ../src/guestfs-actions.pod:5466
30277 msgid "guestfs_mount_options"
30281 #: ../src/guestfs-actions.pod:5468
30285 " guestfs_mount_options (guestfs_h *g,\n"
30286 " const char *options,\n"
30287 " const char *device,\n"
30288 " const char *mountpoint);\n"
30293 #: ../src/guestfs-actions.pod:5474
30295 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30296 "the mount options as for the L<mount(8)> I<-o> flag."
30300 #: ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:5498 ../src/guestfs-actions.pod:5515
30301 msgid "(Added in 1.0.10)"
30305 #: ../src/guestfs-actions.pod:5486
30306 msgid "guestfs_mount_ro"
30310 #: ../src/guestfs-actions.pod:5488
30314 " guestfs_mount_ro (guestfs_h *g,\n"
30315 " const char *device,\n"
30316 " const char *mountpoint);\n"
30321 #: ../src/guestfs-actions.pod:5493
30323 "This is the same as the C<guestfs_mount> command, but it mounts the "
30324 "filesystem with the read-only (I<-o ro>) flag."
30328 #: ../src/guestfs-actions.pod:5500
30329 msgid "guestfs_mount_vfs"
30333 #: ../src/guestfs-actions.pod:5502
30337 " guestfs_mount_vfs (guestfs_h *g,\n"
30338 " const char *options,\n"
30339 " const char *vfstype,\n"
30340 " const char *device,\n"
30341 " const char *mountpoint);\n"
30346 #: ../src/guestfs-actions.pod:5509
30348 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30349 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
30354 #: ../src/guestfs-actions.pod:5517
30355 msgid "guestfs_mountpoints"
30359 #: ../src/guestfs-actions.pod:5519
30363 " guestfs_mountpoints (guestfs_h *g);\n"
30368 #: ../src/guestfs-actions.pod:5522
30370 "This call is similar to C<guestfs_mounts>. That call returns a list of "
30371 "devices. This one returns a hash table (map) of device name to directory "
30372 "where the device is mounted."
30376 #: ../src/guestfs-actions.pod:5534
30377 msgid "guestfs_mounts"
30381 #: ../src/guestfs-actions.pod:5536
30385 " guestfs_mounts (guestfs_h *g);\n"
30390 #: ../src/guestfs-actions.pod:5544
30391 msgid "See also: C<guestfs_mountpoints>"
30395 #: ../src/guestfs-actions.pod:5552
30400 #: ../src/guestfs-actions.pod:5554
30404 " guestfs_mv (guestfs_h *g,\n"
30405 " const char *src,\n"
30406 " const char *dest);\n"
30411 #: ../src/guestfs-actions.pod:5566
30412 msgid "guestfs_ntfs_3g_probe"
30416 #: ../src/guestfs-actions.pod:5568
30420 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
30422 " const char *device);\n"
30427 #: ../src/guestfs-actions.pod:5587
30428 msgid "(Added in 1.0.43)"
30432 #: ../src/guestfs-actions.pod:5589
30433 msgid "guestfs_ntfsresize"
30437 #: ../src/guestfs-actions.pod:5591
30441 " guestfs_ntfsresize (guestfs_h *g,\n"
30442 " const char *device);\n"
30447 #: ../src/guestfs-actions.pod:5595 ../src/guestfs-actions.pod:5695
30449 "I<This function is deprecated.> In new code, use the "
30450 "L</guestfs_ntfsresize_opts> call instead."
30454 #: ../src/guestfs-actions.pod:5619
30455 msgid "guestfs_ntfsresize_opts"
30459 #: ../src/guestfs-actions.pod:5621
30463 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
30464 " const char *device,\n"
30470 #: ../src/guestfs-actions.pod:5631
30473 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
30474 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
30479 #: ../src/guestfs-actions.pod:5651
30481 "After the resize operation, the filesystem is always marked as requiring a "
30482 "consistency check (for safety). You have to boot into Windows to perform "
30483 "this check and clear this condition. If you I<don't> set the C<force> "
30484 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
30485 "times on a single filesystem without booting into Windows between each "
30490 #: ../src/guestfs-actions.pod:5666
30491 msgid "guestfs_ntfsresize_opts_va"
30495 #: ../src/guestfs-actions.pod:5668
30499 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
30500 " const char *device,\n"
30501 " va_list args);\n"
30506 #: ../src/guestfs-actions.pod:5673
30507 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
30511 #: ../src/guestfs-actions.pod:5677
30512 msgid "guestfs_ntfsresize_opts_argv"
30516 #: ../src/guestfs-actions.pod:5679
30520 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30521 " const char *device,\n"
30522 " const struct guestfs_ntfsresize_opts_argv "
30528 #: ../src/guestfs-actions.pod:5684
30529 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30533 #: ../src/guestfs-actions.pod:5688
30534 msgid "guestfs_ntfsresize_size"
30538 #: ../src/guestfs-actions.pod:5690
30542 " guestfs_ntfsresize_size (guestfs_h *g,\n"
30543 " const char *device,\n"
30544 " int64_t size);\n"
30549 #: ../src/guestfs-actions.pod:5702
30551 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
30552 "to specify the new size (in bytes) explicitly."
30556 #: ../src/guestfs-actions.pod:5707 ../src/guestfs-actions.pod:6166 ../src/guestfs-actions.pod:6239 ../src/guestfs-actions.pod:6507 ../src/guestfs-actions.pod:8134
30557 msgid "(Added in 1.3.14)"
30561 #: ../src/guestfs-actions.pod:5709
30562 msgid "guestfs_part_add"
30566 #: ../src/guestfs-actions.pod:5711
30570 " guestfs_part_add (guestfs_h *g,\n"
30571 " const char *device,\n"
30572 " const char *prlogex,\n"
30573 " int64_t startsect,\n"
30574 " int64_t endsect);\n"
30579 #: ../src/guestfs-actions.pod:5718
30581 "This command adds a partition to C<device>. If there is no partition table "
30582 "on the device, call C<guestfs_part_init> first."
30586 #: ../src/guestfs-actions.pod:5730
30588 "Creating a partition which covers the whole disk is not so easy. Use "
30589 "C<guestfs_part_disk> to do that."
30593 #: ../src/guestfs-actions.pod:5735 ../src/guestfs-actions.pod:5770 ../src/guestfs-actions.pod:5823 ../src/guestfs-actions.pod:5907 ../src/guestfs-actions.pod:5945 ../src/guestfs-actions.pod:5964 ../src/guestfs-actions.pod:6004
30594 msgid "(Added in 1.0.78)"
30598 #: ../src/guestfs-actions.pod:5737
30599 msgid "guestfs_part_del"
30603 #: ../src/guestfs-actions.pod:5739
30607 " guestfs_part_del (guestfs_h *g,\n"
30608 " const char *device,\n"
30614 #: ../src/guestfs-actions.pod:5754
30615 msgid "guestfs_part_disk"
30619 #: ../src/guestfs-actions.pod:5756
30623 " guestfs_part_disk (guestfs_h *g,\n"
30624 " const char *device,\n"
30625 " const char *parttype);\n"
30630 #: ../src/guestfs-actions.pod:5761
30632 "This command is simply a combination of C<guestfs_part_init> followed by "
30633 "C<guestfs_part_add> to create a single primary partition covering the whole "
30638 #: ../src/guestfs-actions.pod:5765
30640 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
30641 "possible values are described in C<guestfs_part_init>."
30645 #: ../src/guestfs-actions.pod:5772
30646 msgid "guestfs_part_get_bootable"
30650 #: ../src/guestfs-actions.pod:5774
30654 " guestfs_part_get_bootable (guestfs_h *g,\n"
30655 " const char *device,\n"
30661 #: ../src/guestfs-actions.pod:5782
30662 msgid "See also C<guestfs_part_set_bootable>."
30666 #: ../src/guestfs-actions.pod:5788
30667 msgid "guestfs_part_get_mbr_id"
30671 #: ../src/guestfs-actions.pod:5790
30675 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
30676 " const char *device,\n"
30682 #: ../src/guestfs-actions.pod:5798 ../src/guestfs-actions.pod:5980
30684 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
30685 "undefined results for other partition table types (see "
30686 "C<guestfs_part_get_parttype>)."
30690 #: ../src/guestfs-actions.pod:5806
30691 msgid "guestfs_part_get_parttype"
30695 #: ../src/guestfs-actions.pod:5808
30699 " guestfs_part_get_parttype (guestfs_h *g,\n"
30700 " const char *device);\n"
30705 #: ../src/guestfs-actions.pod:5815
30707 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30708 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30709 "possible, although unusual. See C<guestfs_part_init> for a full list."
30713 #: ../src/guestfs-actions.pod:5825
30714 msgid "guestfs_part_init"
30718 #: ../src/guestfs-actions.pod:5827
30722 " guestfs_part_init (guestfs_h *g,\n"
30723 " const char *device,\n"
30724 " const char *parttype);\n"
30729 #: ../src/guestfs-actions.pod:5836
30731 "Initially there are no partitions. Following this, you should call "
30732 "C<guestfs_part_add> for each partition required."
30736 #: ../src/guestfs-actions.pod:5909
30737 msgid "guestfs_part_list"
30741 #: ../src/guestfs-actions.pod:5911
30744 " struct guestfs_partition_list *\n"
30745 " guestfs_part_list (guestfs_h *g,\n"
30746 " const char *device);\n"
30751 #: ../src/guestfs-actions.pod:5928
30753 "Start of the partition I<in bytes>. To get sectors you have to divide by "
30754 "the device's sector size, see C<guestfs_blockdev_getss>."
30758 #: ../src/guestfs-actions.pod:5941
30760 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
30761 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
30766 #: ../src/guestfs-actions.pod:5947
30767 msgid "guestfs_part_set_bootable"
30771 #: ../src/guestfs-actions.pod:5949
30775 " guestfs_part_set_bootable (guestfs_h *g,\n"
30776 " const char *device,\n"
30778 " int bootable);\n"
30783 #: ../src/guestfs-actions.pod:5966
30784 msgid "guestfs_part_set_mbr_id"
30788 #: ../src/guestfs-actions.pod:5968
30792 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
30793 " const char *device,\n"
30800 #: ../src/guestfs-actions.pod:5988
30801 msgid "guestfs_part_set_name"
30805 #: ../src/guestfs-actions.pod:5990
30809 " guestfs_part_set_name (guestfs_h *g,\n"
30810 " const char *device,\n"
30812 " const char *name);\n"
30817 #: ../src/guestfs-actions.pod:6006
30818 msgid "guestfs_part_to_dev"
30822 #: ../src/guestfs-actions.pod:6008
30826 " guestfs_part_to_dev (guestfs_h *g,\n"
30827 " const char *partition);\n"
30832 #: ../src/guestfs-actions.pod:6016 ../src/guestfs-actions.pod:6035
30834 "The named partition must exist, for example as a string returned from "
30835 "C<guestfs_list_partitions>."
30839 #: ../src/guestfs-actions.pod:6019
30840 msgid "See also C<guestfs_part_to_partnum>."
30844 #: ../src/guestfs-actions.pod:6026
30845 msgid "guestfs_part_to_partnum"
30849 #: ../src/guestfs-actions.pod:6028
30853 " guestfs_part_to_partnum (guestfs_h *g,\n"
30854 " const char *partition);\n"
30859 #: ../src/guestfs-actions.pod:6038
30860 msgid "See also C<guestfs_part_to_dev>."
30864 #: ../src/guestfs-actions.pod:6044
30865 msgid "guestfs_ping_daemon"
30869 #: ../src/guestfs-actions.pod:6046
30873 " guestfs_ping_daemon (guestfs_h *g);\n"
30878 #: ../src/guestfs-actions.pod:6058
30879 msgid "guestfs_pread"
30883 #: ../src/guestfs-actions.pod:6060
30887 " guestfs_pread (guestfs_h *g,\n"
30888 " const char *path,\n"
30890 " int64_t offset,\n"
30891 " size_t *size_r);\n"
30896 #: ../src/guestfs-actions.pod:6073
30897 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
30901 #: ../src/guestfs-actions.pod:6084
30902 msgid "guestfs_pread_device"
30906 #: ../src/guestfs-actions.pod:6086
30910 " guestfs_pread_device (guestfs_h *g,\n"
30911 " const char *device,\n"
30913 " int64_t offset,\n"
30914 " size_t *size_r);\n"
30919 #: ../src/guestfs-actions.pod:6099
30920 msgid "See also C<guestfs_pread>."
30924 #: ../src/guestfs-actions.pod:6108
30925 msgid "(Added in 1.5.21)"
30929 #: ../src/guestfs-actions.pod:6110
30930 msgid "guestfs_pvcreate"
30934 #: ../src/guestfs-actions.pod:6112
30938 " guestfs_pvcreate (guestfs_h *g,\n"
30939 " const char *device);\n"
30944 #: ../src/guestfs-actions.pod:6124
30945 msgid "guestfs_pvremove"
30949 #: ../src/guestfs-actions.pod:6126
30953 " guestfs_pvremove (guestfs_h *g,\n"
30954 " const char *device);\n"
30959 #: ../src/guestfs-actions.pod:6141
30960 msgid "guestfs_pvresize"
30964 #: ../src/guestfs-actions.pod:6143
30968 " guestfs_pvresize (guestfs_h *g,\n"
30969 " const char *device);\n"
30974 #: ../src/guestfs-actions.pod:6154
30975 msgid "guestfs_pvresize_size"
30979 #: ../src/guestfs-actions.pod:6156
30983 " guestfs_pvresize_size (guestfs_h *g,\n"
30984 " const char *device,\n"
30985 " int64_t size);\n"
30990 #: ../src/guestfs-actions.pod:6161
30992 "This command is the same as C<guestfs_pvresize> except that it allows you to "
30993 "specify the new size (in bytes) explicitly."
30997 #: ../src/guestfs-actions.pod:6168
30998 msgid "guestfs_pvs"
31002 #: ../src/guestfs-actions.pod:6170
31006 " guestfs_pvs (guestfs_h *g);\n"
31011 #: ../src/guestfs-actions.pod:6179
31012 msgid "See also C<guestfs_pvs_full>."
31016 #: ../src/guestfs-actions.pod:6187
31017 msgid "guestfs_pvs_full"
31021 #: ../src/guestfs-actions.pod:6189
31024 " struct guestfs_lvm_pv_list *\n"
31025 " guestfs_pvs_full (guestfs_h *g);\n"
31030 #: ../src/guestfs-actions.pod:6195
31032 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31033 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
31038 #: ../src/guestfs-actions.pod:6201
31039 msgid "guestfs_pvuuid"
31043 #: ../src/guestfs-actions.pod:6203
31047 " guestfs_pvuuid (guestfs_h *g,\n"
31048 " const char *device);\n"
31053 #: ../src/guestfs-actions.pod:6214
31054 msgid "guestfs_pwrite"
31058 #: ../src/guestfs-actions.pod:6216
31062 " guestfs_pwrite (guestfs_h *g,\n"
31063 " const char *path,\n"
31064 " const char *content,\n"
31065 " size_t content_size,\n"
31066 " int64_t offset);\n"
31071 #: ../src/guestfs-actions.pod:6232
31072 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31076 #: ../src/guestfs-actions.pod:6241
31077 msgid "guestfs_pwrite_device"
31081 #: ../src/guestfs-actions.pod:6243
31085 " guestfs_pwrite_device (guestfs_h *g,\n"
31086 " const char *device,\n"
31087 " const char *content,\n"
31088 " size_t content_size,\n"
31089 " int64_t offset);\n"
31094 #: ../src/guestfs-actions.pod:6258
31095 msgid "See also C<guestfs_pwrite>."
31099 #: ../src/guestfs-actions.pod:6265
31100 msgid "(Added in 1.5.20)"
31104 #: ../src/guestfs-actions.pod:6267
31105 msgid "guestfs_read_file"
31109 #: ../src/guestfs-actions.pod:6269
31113 " guestfs_read_file (guestfs_h *g,\n"
31114 " const char *path,\n"
31115 " size_t *size_r);\n"
31120 #: ../src/guestfs-actions.pod:6277
31122 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
31123 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31124 "function is limited in the total size of file that can be handled."
31128 #: ../src/guestfs-actions.pod:6289
31129 msgid "(Added in 1.0.63)"
31133 #: ../src/guestfs-actions.pod:6291
31134 msgid "guestfs_read_lines"
31138 #: ../src/guestfs-actions.pod:6293
31142 " guestfs_read_lines (guestfs_h *g,\n"
31143 " const char *path);\n"
31148 #: ../src/guestfs-actions.pod:6302
31150 "Note that this function cannot correctly handle binary files (specifically, "
31151 "files containing C<\\0> character which is treated as end of line). For "
31152 "those you need to use the C<guestfs_read_file> function which has a more "
31153 "complex interface."
31157 #: ../src/guestfs-actions.pod:6313
31158 msgid "guestfs_readdir"
31162 #: ../src/guestfs-actions.pod:6315
31165 " struct guestfs_dirent_list *\n"
31166 " guestfs_readdir (guestfs_h *g,\n"
31167 " const char *dir);\n"
31172 #: ../src/guestfs-actions.pod:6369
31174 "This function is primarily intended for use by programs. To get a simple "
31175 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31176 "consumption, use C<guestfs_ll>."
31180 #: ../src/guestfs-actions.pod:6373
31182 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31183 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
31188 #: ../src/guestfs-actions.pod:6379
31189 msgid "guestfs_readlink"
31193 #: ../src/guestfs-actions.pod:6381
31197 " guestfs_readlink (guestfs_h *g,\n"
31198 " const char *path);\n"
31203 #: ../src/guestfs-actions.pod:6392
31204 msgid "guestfs_readlinklist"
31208 #: ../src/guestfs-actions.pod:6394
31212 " guestfs_readlinklist (guestfs_h *g,\n"
31213 " const char *path,\n"
31214 " char *const *names);\n"
31219 #: ../src/guestfs-actions.pod:6427
31220 msgid "guestfs_realpath"
31224 #: ../src/guestfs-actions.pod:6429
31228 " guestfs_realpath (guestfs_h *g,\n"
31229 " const char *path);\n"
31234 #: ../src/guestfs-actions.pod:6441
31235 msgid "guestfs_removexattr"
31239 #: ../src/guestfs-actions.pod:6443
31243 " guestfs_removexattr (guestfs_h *g,\n"
31244 " const char *xattr,\n"
31245 " const char *path);\n"
31250 #: ../src/guestfs-actions.pod:6451
31251 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31255 #: ../src/guestfs-actions.pod:6457
31256 msgid "guestfs_resize2fs"
31260 #: ../src/guestfs-actions.pod:6459
31264 " guestfs_resize2fs (guestfs_h *g,\n"
31265 " const char *device);\n"
31270 #: ../src/guestfs-actions.pod:6466
31272 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31273 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31274 "sometimes gives an error about this and sometimes not. In any case, it is "
31275 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31279 #: ../src/guestfs-actions.pod:6476
31280 msgid "guestfs_resize2fs_M"
31284 #: ../src/guestfs-actions.pod:6478
31288 " guestfs_resize2fs_M (guestfs_h *g,\n"
31289 " const char *device);\n"
31294 #: ../src/guestfs-actions.pod:6482
31296 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31297 "resized to its minimum size. This works like the I<-M> option to the "
31298 "C<resize2fs> command."
31302 #: ../src/guestfs-actions.pod:6486
31304 "To get the resulting size of the filesystem you should call "
31305 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31306 "These two numbers, multiplied together, give the resulting size of the "
31307 "minimal filesystem in bytes."
31311 #: ../src/guestfs-actions.pod:6495
31312 msgid "guestfs_resize2fs_size"
31316 #: ../src/guestfs-actions.pod:6497
31320 " guestfs_resize2fs_size (guestfs_h *g,\n"
31321 " const char *device,\n"
31322 " int64_t size);\n"
31327 #: ../src/guestfs-actions.pod:6502
31329 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31330 "to specify the new size (in bytes) explicitly."
31334 #: ../src/guestfs-actions.pod:6509
31339 #: ../src/guestfs-actions.pod:6511
31343 " guestfs_rm (guestfs_h *g,\n"
31344 " const char *path);\n"
31349 #: ../src/guestfs-actions.pod:6521
31350 msgid "guestfs_rm_rf"
31354 #: ../src/guestfs-actions.pod:6523
31358 " guestfs_rm_rf (guestfs_h *g,\n"
31359 " const char *path);\n"
31364 #: ../src/guestfs-actions.pod:6535
31365 msgid "guestfs_rmdir"
31369 #: ../src/guestfs-actions.pod:6537
31373 " guestfs_rmdir (guestfs_h *g,\n"
31374 " const char *path);\n"
31379 #: ../src/guestfs-actions.pod:6547
31380 msgid "guestfs_rmmountpoint"
31384 #: ../src/guestfs-actions.pod:6549
31388 " guestfs_rmmountpoint (guestfs_h *g,\n"
31389 " const char *exemptpath);\n"
31394 #: ../src/guestfs-actions.pod:6553
31396 "This calls removes a mountpoint that was previously created with "
31397 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
31401 #: ../src/guestfs-actions.pod:6561
31402 msgid "guestfs_scrub_device"
31406 #: ../src/guestfs-actions.pod:6563
31410 " guestfs_scrub_device (guestfs_h *g,\n"
31411 " const char *device);\n"
31416 #: ../src/guestfs-actions.pod:6575 ../src/guestfs-actions.pod:6593 ../src/guestfs-actions.pod:6612
31417 msgid "(Added in 1.0.52)"
31421 #: ../src/guestfs-actions.pod:6577
31422 msgid "guestfs_scrub_file"
31426 #: ../src/guestfs-actions.pod:6579
31430 " guestfs_scrub_file (guestfs_h *g,\n"
31431 " const char *file);\n"
31436 #: ../src/guestfs-actions.pod:6595
31437 msgid "guestfs_scrub_freespace"
31441 #: ../src/guestfs-actions.pod:6597
31445 " guestfs_scrub_freespace (guestfs_h *g,\n"
31446 " const char *dir);\n"
31451 #: ../src/guestfs-actions.pod:6601
31453 "This command creates the directory C<dir> and then fills it with files until "
31454 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
31455 "and deletes them. The intention is to scrub any free space on the partition "
31456 "containing C<dir>."
31460 #: ../src/guestfs-actions.pod:6614
31461 msgid "guestfs_set_append"
31465 #: ../src/guestfs-actions.pod:6616
31469 " guestfs_set_append (guestfs_h *g,\n"
31470 " const char *append);\n"
31475 #: ../src/guestfs-actions.pod:6633
31476 msgid "guestfs_set_attach_method"
31480 #: ../src/guestfs-actions.pod:6635
31484 " guestfs_set_attach_method (guestfs_h *g,\n"
31485 " const char *attachmethod);\n"
31490 #: ../src/guestfs-actions.pod:6663
31491 msgid "guestfs_set_autosync"
31495 #: ../src/guestfs-actions.pod:6665
31499 " guestfs_set_autosync (guestfs_h *g,\n"
31500 " int autosync);\n"
31505 #: ../src/guestfs-actions.pod:6681
31506 msgid "guestfs_set_direct"
31510 #: ../src/guestfs-actions.pod:6683
31514 " guestfs_set_direct (guestfs_h *g,\n"
31520 #: ../src/guestfs-actions.pod:6691
31522 "One consequence of this is that log messages aren't caught by the library "
31523 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
31528 #: ../src/guestfs-actions.pod:6704
31529 msgid "guestfs_set_e2label"
31533 #: ../src/guestfs-actions.pod:6706
31537 " guestfs_set_e2label (guestfs_h *g,\n"
31538 " const char *device,\n"
31539 " const char *label);\n"
31544 #: ../src/guestfs-actions.pod:6715
31546 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
31547 "the existing label on a filesystem."
31551 #: ../src/guestfs-actions.pod:6722
31552 msgid "guestfs_set_e2uuid"
31556 #: ../src/guestfs-actions.pod:6724
31560 " guestfs_set_e2uuid (guestfs_h *g,\n"
31561 " const char *device,\n"
31562 " const char *uuid);\n"
31567 #: ../src/guestfs-actions.pod:6734
31569 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
31570 "the existing UUID of a filesystem."
31574 #: ../src/guestfs-actions.pod:6741
31575 msgid "guestfs_set_memsize"
31579 #: ../src/guestfs-actions.pod:6743
31583 " guestfs_set_memsize (guestfs_h *g,\n"
31589 #: ../src/guestfs-actions.pod:6747
31591 "This sets the memory size in megabytes allocated to the qemu subprocess. "
31592 "This only has any effect if called before C<guestfs_launch>."
31596 #: ../src/guestfs-actions.pod:6762
31597 msgid "guestfs_set_network"
31601 #: ../src/guestfs-actions.pod:6764
31605 " guestfs_set_network (guestfs_h *g,\n"
31611 #: ../src/guestfs-actions.pod:6774
31613 "You must call this before calling C<guestfs_launch>, otherwise it has no "
31618 #: ../src/guestfs-actions.pod:6781
31619 msgid "guestfs_set_path"
31623 #: ../src/guestfs-actions.pod:6783
31627 " guestfs_set_path (guestfs_h *g,\n"
31628 " const char *searchpath);\n"
31633 #: ../src/guestfs-actions.pod:6798
31634 msgid "guestfs_set_pgroup"
31638 #: ../src/guestfs-actions.pod:6800
31642 " guestfs_set_pgroup (guestfs_h *g,\n"
31648 #: ../src/guestfs-actions.pod:6817
31649 msgid "guestfs_set_qemu"
31653 #: ../src/guestfs-actions.pod:6819
31657 " guestfs_set_qemu (guestfs_h *g,\n"
31658 " const char *qemu);\n"
31663 #: ../src/guestfs-actions.pod:6845
31664 msgid "guestfs_set_recovery_proc"
31668 #: ../src/guestfs-actions.pod:6847
31672 " guestfs_set_recovery_proc (guestfs_h *g,\n"
31673 " int recoveryproc);\n"
31678 #: ../src/guestfs-actions.pod:6851
31680 "If this is called with the parameter C<false> then C<guestfs_launch> does "
31681 "not create a recovery process. The purpose of the recovery process is to "
31682 "stop runaway qemu processes in the case where the main program aborts "
31687 #: ../src/guestfs-actions.pod:6856
31689 "This only has any effect if called before C<guestfs_launch>, and the default "
31694 #: ../src/guestfs-actions.pod:6869
31695 msgid "guestfs_set_selinux"
31699 #: ../src/guestfs-actions.pod:6871
31703 " guestfs_set_selinux (guestfs_h *g,\n"
31709 #: ../src/guestfs-actions.pod:6888
31710 msgid "guestfs_set_smp"
31714 #: ../src/guestfs-actions.pod:6890
31718 " guestfs_set_smp (guestfs_h *g,\n"
31724 #: ../src/guestfs-actions.pod:6898
31725 msgid "This function must be called before C<guestfs_launch>."
31729 #: ../src/guestfs-actions.pod:6904
31730 msgid "guestfs_set_trace"
31734 #: ../src/guestfs-actions.pod:6906
31738 " guestfs_set_trace (guestfs_h *g,\n"
31744 #: ../src/guestfs-actions.pod:6920
31746 "Trace messages are normally sent to C<stderr>, unless you register a "
31747 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31751 #: ../src/guestfs-actions.pod:6928
31752 msgid "guestfs_set_verbose"
31756 #: ../src/guestfs-actions.pod:6930
31760 " guestfs_set_verbose (guestfs_h *g,\n"
31766 #: ../src/guestfs-actions.pod:6939
31768 "Verbose messages are normally sent to C<stderr>, unless you register a "
31769 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31773 #: ../src/guestfs-actions.pod:6947
31774 msgid "guestfs_setcon"
31778 #: ../src/guestfs-actions.pod:6949
31782 " guestfs_setcon (guestfs_h *g,\n"
31783 " const char *context);\n"
31788 #: ../src/guestfs-actions.pod:6962
31789 msgid "guestfs_setxattr"
31793 #: ../src/guestfs-actions.pod:6964
31797 " guestfs_setxattr (guestfs_h *g,\n"
31798 " const char *xattr,\n"
31799 " const char *val,\n"
31801 " const char *path);\n"
31806 #: ../src/guestfs-actions.pod:6975
31807 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
31811 #: ../src/guestfs-actions.pod:6981
31812 msgid "guestfs_sfdisk"
31816 #: ../src/guestfs-actions.pod:6983
31820 " guestfs_sfdisk (guestfs_h *g,\n"
31821 " const char *device,\n"
31825 " char *const *lines);\n"
31830 #: ../src/guestfs-actions.pod:6991 ../src/guestfs-actions.pod:7032 ../src/guestfs-actions.pod:7063
31832 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
31837 #: ../src/guestfs-actions.pod:7018
31838 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
31842 #: ../src/guestfs-actions.pod:7025
31843 msgid "guestfs_sfdiskM"
31847 #: ../src/guestfs-actions.pod:7027
31851 " guestfs_sfdiskM (guestfs_h *g,\n"
31852 " const char *device,\n"
31853 " char *const *lines);\n"
31858 #: ../src/guestfs-actions.pod:7039
31860 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
31861 "partition sizes are specified in megabytes only (rounded to the nearest "
31862 "cylinder) and you don't need to specify the cyls, heads and sectors "
31863 "parameters which were rarely if ever used anyway."
31867 #: ../src/guestfs-actions.pod:7045
31869 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
31870 "C<guestfs_part_disk>"
31874 #: ../src/guestfs-actions.pod:7052
31875 msgid "guestfs_sfdisk_N"
31879 #: ../src/guestfs-actions.pod:7054
31883 " guestfs_sfdisk_N (guestfs_h *g,\n"
31884 " const char *device,\n"
31889 " const char *line);\n"
31894 #: ../src/guestfs-actions.pod:7073
31896 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
31897 "for the cyls/heads/sectors parameters."
31901 #: ../src/guestfs-actions.pod:7076
31902 msgid "See also: C<guestfs_part_add>"
31906 #: ../src/guestfs-actions.pod:7082
31907 msgid "guestfs_sfdisk_disk_geometry"
31911 #: ../src/guestfs-actions.pod:7084
31915 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
31916 " const char *device);\n"
31921 #: ../src/guestfs-actions.pod:7088
31923 "This displays the disk geometry of C<device> read from the partition table. "
31924 "Especially in the case where the underlying block device has been resized, "
31925 "this can be different from the kernel's idea of the geometry (see "
31926 "C<guestfs_sfdisk_kernel_geometry>)."
31930 #: ../src/guestfs-actions.pod:7101
31931 msgid "guestfs_sfdisk_kernel_geometry"
31935 #: ../src/guestfs-actions.pod:7103
31939 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
31940 " const char *device);\n"
31945 #: ../src/guestfs-actions.pod:7117
31946 msgid "guestfs_sfdisk_l"
31950 #: ../src/guestfs-actions.pod:7119
31954 " guestfs_sfdisk_l (guestfs_h *g,\n"
31955 " const char *device);\n"
31960 #: ../src/guestfs-actions.pod:7123
31962 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
31967 #: ../src/guestfs-actions.pod:7134
31968 msgid "See also: C<guestfs_part_list>"
31972 #: ../src/guestfs-actions.pod:7141
31977 #: ../src/guestfs-actions.pod:7143
31981 " guestfs_sh (guestfs_h *g,\n"
31982 " const char *command);\n"
31987 #: ../src/guestfs-actions.pod:7150
31988 msgid "This is like C<guestfs_command>, but passes the command to:"
31992 #: ../src/guestfs-actions.pod:7158
31993 msgid "All the provisos about C<guestfs_command> apply to this call."
31997 #: ../src/guestfs-actions.pod:7165
31998 msgid "guestfs_sh_lines"
32002 #: ../src/guestfs-actions.pod:7167
32006 " guestfs_sh_lines (guestfs_h *g,\n"
32007 " const char *command);\n"
32012 #: ../src/guestfs-actions.pod:7171
32014 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32019 #: ../src/guestfs-actions.pod:7174
32020 msgid "See also: C<guestfs_command_lines>"
32024 #: ../src/guestfs-actions.pod:7182
32025 msgid "guestfs_sleep"
32029 #: ../src/guestfs-actions.pod:7184
32033 " guestfs_sleep (guestfs_h *g,\n"
32039 #: ../src/guestfs-actions.pod:7192
32040 msgid "(Added in 1.0.41)"
32044 #: ../src/guestfs-actions.pod:7194 ../src/guestfs-structs.pod:109
32045 msgid "guestfs_stat"
32049 #: ../src/guestfs-actions.pod:7196
32052 " struct guestfs_stat *\n"
32053 " guestfs_stat (guestfs_h *g,\n"
32054 " const char *path);\n"
32059 #: ../src/guestfs-actions.pod:7210 ../src/guestfs-structs.pod:135
32060 msgid "guestfs_statvfs"
32064 #: ../src/guestfs-actions.pod:7212
32067 " struct guestfs_statvfs *\n"
32068 " guestfs_statvfs (guestfs_h *g,\n"
32069 " const char *path);\n"
32074 #: ../src/guestfs-actions.pod:7222
32076 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
32077 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
32081 #: ../src/guestfs-actions.pod:7228
32082 msgid "guestfs_strings"
32086 #: ../src/guestfs-actions.pod:7230
32090 " guestfs_strings (guestfs_h *g,\n"
32091 " const char *path);\n"
32096 #: ../src/guestfs-actions.pod:7246
32097 msgid "guestfs_strings_e"
32101 #: ../src/guestfs-actions.pod:7248
32105 " guestfs_strings_e (guestfs_h *g,\n"
32106 " const char *encoding,\n"
32107 " const char *path);\n"
32112 #: ../src/guestfs-actions.pod:7253
32114 "This is like the C<guestfs_strings> command, but allows you to specify the "
32115 "encoding of strings that are looked for in the source file C<path>."
32119 #: ../src/guestfs-actions.pod:7263
32121 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32122 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32126 #: ../src/guestfs-actions.pod:7301
32127 msgid "guestfs_swapoff_device"
32131 #: ../src/guestfs-actions.pod:7303
32135 " guestfs_swapoff_device (guestfs_h *g,\n"
32136 " const char *device);\n"
32141 #: ../src/guestfs-actions.pod:7307
32143 "This command disables the libguestfs appliance swap device or partition "
32144 "named C<device>. See C<guestfs_swapon_device>."
32148 #: ../src/guestfs-actions.pod:7315
32149 msgid "guestfs_swapoff_file"
32153 #: ../src/guestfs-actions.pod:7317
32157 " guestfs_swapoff_file (guestfs_h *g,\n"
32158 " const char *file);\n"
32163 #: ../src/guestfs-actions.pod:7327
32164 msgid "guestfs_swapoff_label"
32168 #: ../src/guestfs-actions.pod:7329
32172 " guestfs_swapoff_label (guestfs_h *g,\n"
32173 " const char *label);\n"
32178 #: ../src/guestfs-actions.pod:7340
32179 msgid "guestfs_swapoff_uuid"
32183 #: ../src/guestfs-actions.pod:7342
32187 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32188 " const char *uuid);\n"
32193 #: ../src/guestfs-actions.pod:7353
32194 msgid "guestfs_swapon_device"
32198 #: ../src/guestfs-actions.pod:7355
32202 " guestfs_swapon_device (guestfs_h *g,\n"
32203 " const char *device);\n"
32208 #: ../src/guestfs-actions.pod:7359
32210 "This command enables the libguestfs appliance to use the swap device or "
32211 "partition named C<device>. The increased memory is made available for all "
32212 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32216 #: ../src/guestfs-actions.pod:7375
32217 msgid "guestfs_swapon_file"
32221 #: ../src/guestfs-actions.pod:7377
32225 " guestfs_swapon_file (guestfs_h *g,\n"
32226 " const char *file);\n"
32231 #: ../src/guestfs-actions.pod:7381
32233 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32238 #: ../src/guestfs-actions.pod:7388
32239 msgid "guestfs_swapon_label"
32243 #: ../src/guestfs-actions.pod:7390
32247 " guestfs_swapon_label (guestfs_h *g,\n"
32248 " const char *label);\n"
32253 #: ../src/guestfs-actions.pod:7394
32255 "This command enables swap to a labeled swap partition. See "
32256 "C<guestfs_swapon_device> for other notes."
32260 #: ../src/guestfs-actions.pod:7401
32261 msgid "guestfs_swapon_uuid"
32265 #: ../src/guestfs-actions.pod:7403
32269 " guestfs_swapon_uuid (guestfs_h *g,\n"
32270 " const char *uuid);\n"
32275 #: ../src/guestfs-actions.pod:7407
32277 "This command enables swap to a swap partition with the given UUID. See "
32278 "C<guestfs_swapon_device> for other notes."
32282 #: ../src/guestfs-actions.pod:7414
32283 msgid "guestfs_sync"
32287 #: ../src/guestfs-actions.pod:7416
32291 " guestfs_sync (guestfs_h *g);\n"
32296 #: ../src/guestfs-actions.pod:7429
32297 msgid "guestfs_tail"
32301 #: ../src/guestfs-actions.pod:7431
32305 " guestfs_tail (guestfs_h *g,\n"
32306 " const char *path);\n"
32311 #: ../src/guestfs-actions.pod:7447
32312 msgid "guestfs_tail_n"
32316 #: ../src/guestfs-actions.pod:7449
32320 " guestfs_tail_n (guestfs_h *g,\n"
32322 " const char *path);\n"
32327 #: ../src/guestfs-actions.pod:7471
32328 msgid "guestfs_tar_in"
32332 #: ../src/guestfs-actions.pod:7473
32336 " guestfs_tar_in (guestfs_h *g,\n"
32337 " const char *tarfile,\n"
32338 " const char *directory);\n"
32343 #: ../src/guestfs-actions.pod:7481
32344 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32348 #: ../src/guestfs-actions.pod:7486 ../src/guestfs-actions.pod:7503 ../src/guestfs-actions.pod:7519 ../src/guestfs-actions.pod:7535
32349 msgid "(Added in 1.0.3)"
32353 #: ../src/guestfs-actions.pod:7488
32354 msgid "guestfs_tar_out"
32358 #: ../src/guestfs-actions.pod:7490
32362 " guestfs_tar_out (guestfs_h *g,\n"
32363 " const char *directory,\n"
32364 " const char *tarfile);\n"
32369 #: ../src/guestfs-actions.pod:7498
32371 "To download a compressed tarball, use C<guestfs_tgz_out> or "
32372 "C<guestfs_txz_out>."
32376 #: ../src/guestfs-actions.pod:7505
32377 msgid "guestfs_tgz_in"
32381 #: ../src/guestfs-actions.pod:7507
32385 " guestfs_tgz_in (guestfs_h *g,\n"
32386 " const char *tarball,\n"
32387 " const char *directory);\n"
32392 #: ../src/guestfs-actions.pod:7515
32393 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
32397 #: ../src/guestfs-actions.pod:7521
32398 msgid "guestfs_tgz_out"
32402 #: ../src/guestfs-actions.pod:7523
32406 " guestfs_tgz_out (guestfs_h *g,\n"
32407 " const char *directory,\n"
32408 " const char *tarball);\n"
32413 #: ../src/guestfs-actions.pod:7531
32414 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
32418 #: ../src/guestfs-actions.pod:7537
32419 msgid "guestfs_touch"
32423 #: ../src/guestfs-actions.pod:7539
32427 " guestfs_touch (guestfs_h *g,\n"
32428 " const char *path);\n"
32433 #: ../src/guestfs-actions.pod:7554
32434 msgid "guestfs_truncate"
32438 #: ../src/guestfs-actions.pod:7556
32442 " guestfs_truncate (guestfs_h *g,\n"
32443 " const char *path);\n"
32448 #: ../src/guestfs-actions.pod:7567
32449 msgid "guestfs_truncate_size"
32453 #: ../src/guestfs-actions.pod:7569
32457 " guestfs_truncate_size (guestfs_h *g,\n"
32458 " const char *path,\n"
32459 " int64_t size);\n"
32464 #: ../src/guestfs-actions.pod:7577
32466 "If the current file size is less than C<size> then the file is extended to "
32467 "the required size with zero bytes. This creates a sparse file (ie. disk "
32468 "blocks are not allocated for the file until you write to it). To create a "
32469 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
32473 #: ../src/guestfs-actions.pod:7587
32474 msgid "guestfs_tune2fs_l"
32478 #: ../src/guestfs-actions.pod:7589
32482 " guestfs_tune2fs_l (guestfs_h *g,\n"
32483 " const char *device);\n"
32488 #: ../src/guestfs-actions.pod:7609
32489 msgid "guestfs_txz_in"
32493 #: ../src/guestfs-actions.pod:7611
32497 " guestfs_txz_in (guestfs_h *g,\n"
32498 " const char *tarball,\n"
32499 " const char *directory);\n"
32504 #: ../src/guestfs-actions.pod:7623
32505 msgid "guestfs_txz_out"
32509 #: ../src/guestfs-actions.pod:7625
32513 " guestfs_txz_out (guestfs_h *g,\n"
32514 " const char *directory,\n"
32515 " const char *tarball);\n"
32520 #: ../src/guestfs-actions.pod:7637
32521 msgid "guestfs_umask"
32525 #: ../src/guestfs-actions.pod:7639
32529 " guestfs_umask (guestfs_h *g,\n"
32535 #: ../src/guestfs-actions.pod:7655
32537 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
32538 "C<guestfs_mkdir>."
32542 #: ../src/guestfs-actions.pod:7664
32543 msgid "guestfs_umount"
32547 #: ../src/guestfs-actions.pod:7666
32551 " guestfs_umount (guestfs_h *g,\n"
32552 " const char *pathordevice);\n"
32557 #: ../src/guestfs-actions.pod:7678
32558 msgid "guestfs_umount_all"
32562 #: ../src/guestfs-actions.pod:7680
32566 " guestfs_umount_all (guestfs_h *g);\n"
32571 #: ../src/guestfs-actions.pod:7691
32572 msgid "guestfs_upload"
32576 #: ../src/guestfs-actions.pod:7693
32580 " guestfs_upload (guestfs_h *g,\n"
32581 " const char *filename,\n"
32582 " const char *remotefilename);\n"
32587 #: ../src/guestfs-actions.pod:7703
32588 msgid "See also C<guestfs_download>."
32592 #: ../src/guestfs-actions.pod:7714
32593 msgid "guestfs_upload_offset"
32597 #: ../src/guestfs-actions.pod:7716
32601 " guestfs_upload_offset (guestfs_h *g,\n"
32602 " const char *filename,\n"
32603 " const char *remotefilename,\n"
32604 " int64_t offset);\n"
32609 #: ../src/guestfs-actions.pod:7732
32611 "Note that there is no limit on the amount of data that can be uploaded with "
32612 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
32613 "full amount unless an error occurs."
32617 #: ../src/guestfs-actions.pod:7737
32618 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
32622 #: ../src/guestfs-actions.pod:7748
32623 msgid "guestfs_utimens"
32627 #: ../src/guestfs-actions.pod:7750
32631 " guestfs_utimens (guestfs_h *g,\n"
32632 " const char *path,\n"
32633 " int64_t atsecs,\n"
32634 " int64_t atnsecs,\n"
32635 " int64_t mtsecs,\n"
32636 " int64_t mtnsecs);\n"
32641 #: ../src/guestfs-actions.pod:7779 ../src/guestfs-structs.pod:175
32642 msgid "guestfs_version"
32646 #: ../src/guestfs-actions.pod:7781
32649 " struct guestfs_version *\n"
32650 " guestfs_version (guestfs_h *g);\n"
32655 #: ../src/guestfs-actions.pod:7809
32657 "I<Note:> Don't use this call to test for availability of features. In "
32658 "enterprise distributions we backport features from later versions into "
32659 "earlier versions, making this an unreliable way to test for features. Use "
32660 "C<guestfs_available> instead."
32664 #: ../src/guestfs-actions.pod:7815
32666 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
32667 "error. I<The caller must call C<guestfs_free_version> after use>."
32671 #: ../src/guestfs-actions.pod:7819
32672 msgid "(Added in 1.0.58)"
32676 #: ../src/guestfs-actions.pod:7821
32677 msgid "guestfs_vfs_label"
32681 #: ../src/guestfs-actions.pod:7823
32685 " guestfs_vfs_label (guestfs_h *g,\n"
32686 " const char *device);\n"
32691 #: ../src/guestfs-actions.pod:7832
32692 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
32696 #: ../src/guestfs-actions.pod:7837 ../src/guestfs-actions.pod:7874
32697 msgid "(Added in 1.3.18)"
32701 #: ../src/guestfs-actions.pod:7839
32702 msgid "guestfs_vfs_type"
32706 #: ../src/guestfs-actions.pod:7841
32710 " guestfs_vfs_type (guestfs_h *g,\n"
32711 " const char *device);\n"
32716 #: ../src/guestfs-actions.pod:7858
32717 msgid "guestfs_vfs_uuid"
32721 #: ../src/guestfs-actions.pod:7860
32725 " guestfs_vfs_uuid (guestfs_h *g,\n"
32726 " const char *device);\n"
32731 #: ../src/guestfs-actions.pod:7869
32732 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
32736 #: ../src/guestfs-actions.pod:7876
32737 msgid "guestfs_vg_activate"
32741 #: ../src/guestfs-actions.pod:7878
32745 " guestfs_vg_activate (guestfs_h *g,\n"
32747 " char *const *volgroups);\n"
32752 #: ../src/guestfs-actions.pod:7895
32753 msgid "guestfs_vg_activate_all"
32757 #: ../src/guestfs-actions.pod:7897
32761 " guestfs_vg_activate_all (guestfs_h *g,\n"
32762 " int activate);\n"
32767 #: ../src/guestfs-actions.pod:7910
32768 msgid "guestfs_vgcreate"
32772 #: ../src/guestfs-actions.pod:7912
32776 " guestfs_vgcreate (guestfs_h *g,\n"
32777 " const char *volgroup,\n"
32778 " char *const *physvols);\n"
32783 #: ../src/guestfs-actions.pod:7924
32784 msgid "guestfs_vglvuuids"
32788 #: ../src/guestfs-actions.pod:7926
32792 " guestfs_vglvuuids (guestfs_h *g,\n"
32793 " const char *vgname);\n"
32798 #: ../src/guestfs-actions.pod:7933
32800 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
32801 "associate logical volumes and volume groups."
32805 #: ../src/guestfs-actions.pod:7936
32806 msgid "See also C<guestfs_vgpvuuids>."
32810 #: ../src/guestfs-actions.pod:7944
32811 msgid "guestfs_vgpvuuids"
32815 #: ../src/guestfs-actions.pod:7946
32819 " guestfs_vgpvuuids (guestfs_h *g,\n"
32820 " const char *vgname);\n"
32825 #: ../src/guestfs-actions.pod:7953
32827 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
32828 "associate physical volumes and volume groups."
32832 #: ../src/guestfs-actions.pod:7956
32833 msgid "See also C<guestfs_vglvuuids>."
32837 #: ../src/guestfs-actions.pod:7964
32838 msgid "guestfs_vgremove"
32842 #: ../src/guestfs-actions.pod:7966
32846 " guestfs_vgremove (guestfs_h *g,\n"
32847 " const char *vgname);\n"
32852 #: ../src/guestfs-actions.pod:7979
32853 msgid "guestfs_vgrename"
32857 #: ../src/guestfs-actions.pod:7981
32861 " guestfs_vgrename (guestfs_h *g,\n"
32862 " const char *volgroup,\n"
32863 " const char *newvolgroup);\n"
32868 #: ../src/guestfs-actions.pod:7992
32869 msgid "guestfs_vgs"
32873 #: ../src/guestfs-actions.pod:7994
32877 " guestfs_vgs (guestfs_h *g);\n"
32882 #: ../src/guestfs-actions.pod:8003
32883 msgid "See also C<guestfs_vgs_full>."
32887 #: ../src/guestfs-actions.pod:8011
32888 msgid "guestfs_vgs_full"
32892 #: ../src/guestfs-actions.pod:8013
32895 " struct guestfs_lvm_vg_list *\n"
32896 " guestfs_vgs_full (guestfs_h *g);\n"
32901 #: ../src/guestfs-actions.pod:8019
32903 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
32904 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
32909 #: ../src/guestfs-actions.pod:8025
32910 msgid "guestfs_vgscan"
32914 #: ../src/guestfs-actions.pod:8027
32918 " guestfs_vgscan (guestfs_h *g);\n"
32923 #: ../src/guestfs-actions.pod:8037
32924 msgid "guestfs_vguuid"
32928 #: ../src/guestfs-actions.pod:8039
32932 " guestfs_vguuid (guestfs_h *g,\n"
32933 " const char *vgname);\n"
32938 #: ../src/guestfs-actions.pod:8050
32939 msgid "guestfs_wait_ready"
32943 #: ../src/guestfs-actions.pod:8052
32947 " guestfs_wait_ready (guestfs_h *g);\n"
32952 #: ../src/guestfs-actions.pod:8055
32954 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
32959 #: ../src/guestfs-actions.pod:8062
32960 msgid "This function is a no op."
32964 #: ../src/guestfs-actions.pod:8064
32966 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
32967 "calling C<guestfs_launch> to wait for the launch to complete. However this "
32968 "is no longer necessary because C<guestfs_launch> now does the waiting."
32972 #: ../src/guestfs-actions.pod:8069
32974 "If you see any calls to this function in code then you can just remove them, "
32975 "unless you want to retain compatibility with older versions of the API."
32979 #: ../src/guestfs-actions.pod:8077
32980 msgid "guestfs_wc_c"
32984 #: ../src/guestfs-actions.pod:8079
32988 " guestfs_wc_c (guestfs_h *g,\n"
32989 " const char *path);\n"
32994 #: ../src/guestfs-actions.pod:8090
32995 msgid "guestfs_wc_l"
32999 #: ../src/guestfs-actions.pod:8092
33003 " guestfs_wc_l (guestfs_h *g,\n"
33004 " const char *path);\n"
33009 #: ../src/guestfs-actions.pod:8103
33010 msgid "guestfs_wc_w"
33014 #: ../src/guestfs-actions.pod:8105
33018 " guestfs_wc_w (guestfs_h *g,\n"
33019 " const char *path);\n"
33024 #: ../src/guestfs-actions.pod:8116
33025 msgid "guestfs_write"
33029 #: ../src/guestfs-actions.pod:8118
33033 " guestfs_write (guestfs_h *g,\n"
33034 " const char *path,\n"
33035 " const char *content,\n"
33036 " size_t content_size);\n"
33041 #: ../src/guestfs-actions.pod:8127
33042 msgid "See also C<guestfs_write_append>."
33046 #: ../src/guestfs-actions.pod:8136
33047 msgid "guestfs_write_append"
33051 #: ../src/guestfs-actions.pod:8138
33055 " guestfs_write_append (guestfs_h *g,\n"
33056 " const char *path,\n"
33057 " const char *content,\n"
33058 " size_t content_size);\n"
33063 #: ../src/guestfs-actions.pod:8147
33064 msgid "See also C<guestfs_write>."
33068 #: ../src/guestfs-actions.pod:8156
33069 msgid "guestfs_write_file"
33073 #: ../src/guestfs-actions.pod:8158
33077 " guestfs_write_file (guestfs_h *g,\n"
33078 " const char *path,\n"
33079 " const char *content,\n"
33085 #: ../src/guestfs-actions.pod:8164
33087 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33092 #: ../src/guestfs-actions.pod:8189
33093 msgid "guestfs_zegrep"
33097 #: ../src/guestfs-actions.pod:8191
33101 " guestfs_zegrep (guestfs_h *g,\n"
33102 " const char *regex,\n"
33103 " const char *path);\n"
33108 #: ../src/guestfs-actions.pod:8208
33109 msgid "guestfs_zegrepi"
33113 #: ../src/guestfs-actions.pod:8210
33117 " guestfs_zegrepi (guestfs_h *g,\n"
33118 " const char *regex,\n"
33119 " const char *path);\n"
33124 #: ../src/guestfs-actions.pod:8227
33125 msgid "guestfs_zero"
33129 #: ../src/guestfs-actions.pod:8229
33133 " guestfs_zero (guestfs_h *g,\n"
33134 " const char *device);\n"
33139 #: ../src/guestfs-actions.pod:8243
33141 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33142 "C<guestfs_is_zero_device>"
33146 #: ../src/guestfs-actions.pod:8255
33147 msgid "guestfs_zero_device"
33151 #: ../src/guestfs-actions.pod:8257
33155 " guestfs_zero_device (guestfs_h *g,\n"
33156 " const char *device);\n"
33161 #: ../src/guestfs-actions.pod:8261
33163 "This command writes zeroes over the entire C<device>. Compare with "
33164 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33168 #: ../src/guestfs-actions.pod:8276
33169 msgid "(Added in 1.3.1)"
33173 #: ../src/guestfs-actions.pod:8278
33174 msgid "guestfs_zerofree"
33178 #: ../src/guestfs-actions.pod:8280
33182 " guestfs_zerofree (guestfs_h *g,\n"
33183 " const char *device);\n"
33188 #: ../src/guestfs-actions.pod:8299
33189 msgid "guestfs_zfgrep"
33193 #: ../src/guestfs-actions.pod:8301
33197 " guestfs_zfgrep (guestfs_h *g,\n"
33198 " const char *pattern,\n"
33199 " const char *path);\n"
33204 #: ../src/guestfs-actions.pod:8318
33205 msgid "guestfs_zfgrepi"
33209 #: ../src/guestfs-actions.pod:8320
33213 " guestfs_zfgrepi (guestfs_h *g,\n"
33214 " const char *pattern,\n"
33215 " const char *path);\n"
33220 #: ../src/guestfs-actions.pod:8337
33221 msgid "guestfs_zfile"
33225 #: ../src/guestfs-actions.pod:8339
33229 " guestfs_zfile (guestfs_h *g,\n"
33230 " const char *meth,\n"
33231 " const char *path);\n"
33236 #: ../src/guestfs-actions.pod:8344
33238 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33243 #: ../src/guestfs-actions.pod:8356
33245 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33250 #: ../src/guestfs-actions.pod:8364
33251 msgid "guestfs_zgrep"
33255 #: ../src/guestfs-actions.pod:8366
33259 " guestfs_zgrep (guestfs_h *g,\n"
33260 " const char *regex,\n"
33261 " const char *path);\n"
33266 #: ../src/guestfs-actions.pod:8383
33267 msgid "guestfs_zgrepi"
33271 #: ../src/guestfs-actions.pod:8385
33275 " guestfs_zgrepi (guestfs_h *g,\n"
33276 " const char *regex,\n"
33277 " const char *path);\n"
33282 #: ../src/guestfs-availability.pod:3
33287 #: ../src/guestfs-availability.pod:5
33289 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
33290 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
33291 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
33292 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
33293 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
33297 #: ../src/guestfs-availability.pod:21
33302 #: ../src/guestfs-availability.pod:23
33303 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
33307 #: ../src/guestfs-availability.pod:26
33312 #: ../src/guestfs-availability.pod:28
33313 msgid "The following functions: L</guestfs_grub_install>"
33317 #: ../src/guestfs-availability.pod:31
33322 #: ../src/guestfs-availability.pod:33
33324 "The following functions: L</guestfs_inotify_add_watch> "
33325 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
33326 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
33330 #: ../src/guestfs-availability.pod:41
33331 msgid "B<linuxfsuuid>"
33335 #: ../src/guestfs-availability.pod:43
33337 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
33338 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
33342 #: ../src/guestfs-availability.pod:50
33343 msgid "B<linuxmodules>"
33347 #: ../src/guestfs-availability.pod:52
33348 msgid "The following functions: L</guestfs_modprobe>"
33352 #: ../src/guestfs-availability.pod:55
33353 msgid "B<linuxxattrs>"
33357 #: ../src/guestfs-availability.pod:57
33359 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
33360 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
33361 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
33362 "L</guestfs_setxattr>"
33366 #: ../src/guestfs-availability.pod:68
33371 #: ../src/guestfs-availability.pod:70
33373 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
33374 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
33375 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
33379 #: ../src/guestfs-availability.pod:79
33384 #: ../src/guestfs-availability.pod:81
33386 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
33387 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
33388 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
33389 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
33390 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
33391 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
33392 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
33393 "L</guestfs_vgs_full>"
33397 #: ../src/guestfs-availability.pod:104
33402 #: ../src/guestfs-availability.pod:106
33404 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
33405 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
33409 #: ../src/guestfs-availability.pod:112
33414 #: ../src/guestfs-availability.pod:114
33415 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
33419 #: ../src/guestfs-availability.pod:117
33420 msgid "B<ntfsprogs>"
33424 #: ../src/guestfs-availability.pod:119
33426 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
33427 "L</guestfs_ntfsresize_size>"
33431 #: ../src/guestfs-availability.pod:124
33432 msgid "B<realpath>"
33436 #: ../src/guestfs-availability.pod:126
33437 msgid "The following functions: L</guestfs_realpath>"
33441 #: ../src/guestfs-availability.pod:129
33446 #: ../src/guestfs-availability.pod:131
33448 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
33449 "L</guestfs_scrub_freespace>"
33453 #: ../src/guestfs-availability.pod:136
33458 #: ../src/guestfs-availability.pod:138
33459 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
33463 #: ../src/guestfs-availability.pod:142
33468 #: ../src/guestfs-availability.pod:144
33469 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
33473 #: ../src/guestfs-availability.pod:148
33474 msgid "B<zerofree>"
33478 #: ../src/guestfs-availability.pod:150
33479 msgid "The following functions: L</guestfs_zerofree>"
33483 #: ../src/guestfs-structs.pod:1
33484 msgid "guestfs_int_bool"
33488 #: ../src/guestfs-structs.pod:3
33491 " struct guestfs_int_bool {\n"
33499 #: ../src/guestfs-structs.pod:8
33502 " struct guestfs_int_bool_list {\n"
33503 " uint32_t len; /* Number of elements in list. */\n"
33504 " struct guestfs_int_bool *val; /* Elements. */\n"
33510 #: ../src/guestfs-structs.pod:13
33513 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
33514 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
33519 #: ../src/guestfs-structs.pod:16
33520 msgid "guestfs_lvm_pv"
33524 #: ../src/guestfs-structs.pod:18
33527 " struct guestfs_lvm_pv {\n"
33528 " char *pv_name;\n"
33529 " /* The next field is NOT nul-terminated, be careful when printing it: "
33531 " char pv_uuid[32];\n"
33533 " uint64_t pv_size;\n"
33534 " uint64_t dev_size;\n"
33535 " uint64_t pv_free;\n"
33536 " uint64_t pv_used;\n"
33537 " char *pv_attr;\n"
33538 " int64_t pv_pe_count;\n"
33539 " int64_t pv_pe_alloc_count;\n"
33540 " char *pv_tags;\n"
33541 " uint64_t pe_start;\n"
33542 " int64_t pv_mda_count;\n"
33543 " uint64_t pv_mda_free;\n"
33549 #: ../src/guestfs-structs.pod:36
33552 " struct guestfs_lvm_pv_list {\n"
33553 " uint32_t len; /* Number of elements in list. */\n"
33554 " struct guestfs_lvm_pv *val; /* Elements. */\n"
33560 #: ../src/guestfs-structs.pod:41
33563 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
33564 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
33569 #: ../src/guestfs-structs.pod:44
33570 msgid "guestfs_lvm_vg"
33574 #: ../src/guestfs-structs.pod:46
33577 " struct guestfs_lvm_vg {\n"
33578 " char *vg_name;\n"
33579 " /* The next field is NOT nul-terminated, be careful when printing it: "
33581 " char vg_uuid[32];\n"
33583 " char *vg_attr;\n"
33584 " uint64_t vg_size;\n"
33585 " uint64_t vg_free;\n"
33586 " char *vg_sysid;\n"
33587 " uint64_t vg_extent_size;\n"
33588 " int64_t vg_extent_count;\n"
33589 " int64_t vg_free_count;\n"
33590 " int64_t max_lv;\n"
33591 " int64_t max_pv;\n"
33592 " int64_t pv_count;\n"
33593 " int64_t lv_count;\n"
33594 " int64_t snap_count;\n"
33595 " int64_t vg_seqno;\n"
33596 " char *vg_tags;\n"
33597 " int64_t vg_mda_count;\n"
33598 " uint64_t vg_mda_free;\n"
33604 #: ../src/guestfs-structs.pod:69
33607 " struct guestfs_lvm_vg_list {\n"
33608 " uint32_t len; /* Number of elements in list. */\n"
33609 " struct guestfs_lvm_vg *val; /* Elements. */\n"
33615 #: ../src/guestfs-structs.pod:74
33618 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
33619 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
33624 #: ../src/guestfs-structs.pod:77
33625 msgid "guestfs_lvm_lv"
33629 #: ../src/guestfs-structs.pod:79
33632 " struct guestfs_lvm_lv {\n"
33633 " char *lv_name;\n"
33634 " /* The next field is NOT nul-terminated, be careful when printing it: "
33636 " char lv_uuid[32];\n"
33637 " char *lv_attr;\n"
33638 " int64_t lv_major;\n"
33639 " int64_t lv_minor;\n"
33640 " int64_t lv_kernel_major;\n"
33641 " int64_t lv_kernel_minor;\n"
33642 " uint64_t lv_size;\n"
33643 " int64_t seg_count;\n"
33645 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33646 " float snap_percent;\n"
33647 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33648 " float copy_percent;\n"
33649 " char *move_pv;\n"
33650 " char *lv_tags;\n"
33651 " char *mirror_log;\n"
33652 " char *modules;\n"
33658 #: ../src/guestfs-structs.pod:101
33661 " struct guestfs_lvm_lv_list {\n"
33662 " uint32_t len; /* Number of elements in list. */\n"
33663 " struct guestfs_lvm_lv *val; /* Elements. */\n"
33669 #: ../src/guestfs-structs.pod:106
33672 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
33673 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
33678 #: ../src/guestfs-structs.pod:111
33681 " struct guestfs_stat {\n"
33685 " int64_t nlink;\n"
33690 " int64_t blksize;\n"
33691 " int64_t blocks;\n"
33692 " int64_t atime;\n"
33693 " int64_t mtime;\n"
33694 " int64_t ctime;\n"
33700 #: ../src/guestfs-structs.pod:127
33703 " struct guestfs_stat_list {\n"
33704 " uint32_t len; /* Number of elements in list. */\n"
33705 " struct guestfs_stat *val; /* Elements. */\n"
33711 #: ../src/guestfs-structs.pod:132
33714 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
33715 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
33720 #: ../src/guestfs-structs.pod:137
33723 " struct guestfs_statvfs {\n"
33724 " int64_t bsize;\n"
33725 " int64_t frsize;\n"
33726 " int64_t blocks;\n"
33727 " int64_t bfree;\n"
33728 " int64_t bavail;\n"
33729 " int64_t files;\n"
33730 " int64_t ffree;\n"
33731 " int64_t favail;\n"
33734 " int64_t namemax;\n"
33740 #: ../src/guestfs-structs.pod:151
33743 " struct guestfs_statvfs_list {\n"
33744 " uint32_t len; /* Number of elements in list. */\n"
33745 " struct guestfs_statvfs *val; /* Elements. */\n"
33751 #: ../src/guestfs-structs.pod:156
33754 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
33755 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
33760 #: ../src/guestfs-structs.pod:159
33761 msgid "guestfs_dirent"
33765 #: ../src/guestfs-structs.pod:161
33768 " struct guestfs_dirent {\n"
33777 #: ../src/guestfs-structs.pod:167
33780 " struct guestfs_dirent_list {\n"
33781 " uint32_t len; /* Number of elements in list. */\n"
33782 " struct guestfs_dirent *val; /* Elements. */\n"
33788 #: ../src/guestfs-structs.pod:172
33791 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
33792 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
33797 #: ../src/guestfs-structs.pod:177
33800 " struct guestfs_version {\n"
33801 " int64_t major;\n"
33802 " int64_t minor;\n"
33803 " int64_t release;\n"
33810 #: ../src/guestfs-structs.pod:184
33813 " struct guestfs_version_list {\n"
33814 " uint32_t len; /* Number of elements in list. */\n"
33815 " struct guestfs_version *val; /* Elements. */\n"
33821 #: ../src/guestfs-structs.pod:189
33824 " void guestfs_free_version (struct guestfs_free_version *);\n"
33825 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
33830 #: ../src/guestfs-structs.pod:192
33831 msgid "guestfs_xattr"
33835 #: ../src/guestfs-structs.pod:194
33838 " struct guestfs_xattr {\n"
33839 " char *attrname;\n"
33840 " /* The next two fields describe a byte array. */\n"
33841 " uint32_t attrval_len;\n"
33842 " char *attrval;\n"
33848 #: ../src/guestfs-structs.pod:201
33851 " struct guestfs_xattr_list {\n"
33852 " uint32_t len; /* Number of elements in list. */\n"
33853 " struct guestfs_xattr *val; /* Elements. */\n"
33859 #: ../src/guestfs-structs.pod:206
33862 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
33863 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
33868 #: ../src/guestfs-structs.pod:209
33869 msgid "guestfs_inotify_event"
33873 #: ../src/guestfs-structs.pod:211
33876 " struct guestfs_inotify_event {\n"
33877 " int64_t in_wd;\n"
33878 " uint32_t in_mask;\n"
33879 " uint32_t in_cookie;\n"
33880 " char *in_name;\n"
33886 #: ../src/guestfs-structs.pod:218
33889 " struct guestfs_inotify_event_list {\n"
33890 " uint32_t len; /* Number of elements in list. */\n"
33891 " struct guestfs_inotify_event *val; /* Elements. */\n"
33897 #: ../src/guestfs-structs.pod:223
33900 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
33901 " void guestfs_free_inotify_event_list (struct "
33902 "guestfs_free_inotify_event_list *);\n"
33907 #: ../src/guestfs-structs.pod:226
33908 msgid "guestfs_partition"
33912 #: ../src/guestfs-structs.pod:228
33915 " struct guestfs_partition {\n"
33916 " int32_t part_num;\n"
33917 " uint64_t part_start;\n"
33918 " uint64_t part_end;\n"
33919 " uint64_t part_size;\n"
33925 #: ../src/guestfs-structs.pod:235
33928 " struct guestfs_partition_list {\n"
33929 " uint32_t len; /* Number of elements in list. */\n"
33930 " struct guestfs_partition *val; /* Elements. */\n"
33936 #: ../src/guestfs-structs.pod:240
33939 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
33940 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
33945 #: ../src/guestfs-structs.pod:243
33946 msgid "guestfs_application"
33950 #: ../src/guestfs-structs.pod:245
33953 " struct guestfs_application {\n"
33954 " char *app_name;\n"
33955 " char *app_display_name;\n"
33956 " int32_t app_epoch;\n"
33957 " char *app_version;\n"
33958 " char *app_release;\n"
33959 " char *app_install_path;\n"
33960 " char *app_trans_path;\n"
33961 " char *app_publisher;\n"
33962 " char *app_url;\n"
33963 " char *app_source_package;\n"
33964 " char *app_summary;\n"
33965 " char *app_description;\n"
33971 #: ../src/guestfs-structs.pod:260
33974 " struct guestfs_application_list {\n"
33975 " uint32_t len; /* Number of elements in list. */\n"
33976 " struct guestfs_application *val; /* Elements. */\n"
33982 #: ../src/guestfs-structs.pod:265
33985 " void guestfs_free_application (struct guestfs_free_application *);\n"
33986 " void guestfs_free_application_list (struct guestfs_free_application_list "
33992 #: ../src/guestfs.pod:5
33993 msgid "guestfs - Library for accessing and modifying virtual machine images"
33997 #: ../src/guestfs.pod:11
34000 " guestfs_h *g = guestfs_create ();\n"
34001 " guestfs_add_drive (g, \"guest.img\");\n"
34002 " guestfs_launch (g);\n"
34003 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34004 " guestfs_touch (g, \"/hello\");\n"
34005 " guestfs_umount (g, \"/\");\n"
34006 " guestfs_close (g);\n"
34011 #: ../src/guestfs.pod:25
34013 "Libguestfs is a library for accessing and modifying guest disk images. "
34014 "Amongst the things this is good for: making batch configuration changes to "
34015 "guests, getting disk used/free statistics (see also: virt-df), migrating "
34016 "between virtualization systems (see also: virt-p2v), performing partial "
34017 "backups, performing partial guest clones, cloning guests and changing "
34018 "registry/UUID/hostname info, and much else besides."
34022 #: ../src/guestfs.pod:33
34024 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
34025 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
34026 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34031 #: ../src/guestfs.pod:38
34033 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34034 "what filesystem is in each LV, etc.). It can also run commands in the "
34035 "context of the guest. Also you can access filesystems over FUSE."
34039 #: ../src/guestfs.pod:43
34041 "Libguestfs is a library that can be linked with C and C++ management "
34042 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
34043 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
34048 #: ../src/guestfs.pod:48
34050 "You don't need to be root to use libguestfs, although obviously you do need "
34051 "enough permissions to access the disk images."
34055 #: ../src/guestfs.pod:51
34057 "Libguestfs is a large API because it can do many things. For a gentle "
34058 "introduction, please read the L</API OVERVIEW> section next."
34062 #: ../src/guestfs.pod:54
34064 "There are also some example programs in the L<guestfs-examples(3)> manual "
34069 #: ../src/guestfs.pod:57
34070 msgid "API OVERVIEW"
34074 #: ../src/guestfs.pod:59
34076 "This section provides a gentler overview of the libguestfs API. We also try "
34077 "to group API calls together, where that may not be obvious from reading "
34078 "about the individual calls in the main section of this manual."
34082 #: ../src/guestfs.pod:64
34087 #: ../src/guestfs.pod:66
34089 "Before you can use libguestfs calls, you have to create a handle. Then you "
34090 "must add at least one disk image to the handle, followed by launching the "
34091 "handle, then performing whatever operations you want, and finally closing "
34092 "the handle. By convention we use the single letter C<g> for the name of the "
34093 "handle variable, although of course you can use any name you want."
34097 #: ../src/guestfs.pod:73
34098 msgid "The general structure of all libguestfs-using programs looks like this:"
34102 #: ../src/guestfs.pod:76
34105 " guestfs_h *g = guestfs_create ();\n"
34110 #: ../src/guestfs.pod:78
34113 " /* Call guestfs_add_drive additional times if there are\n"
34114 " * multiple disk images.\n"
34116 " guestfs_add_drive (g, \"guest.img\");\n"
34121 #: ../src/guestfs.pod:83
34124 " /* Most manipulation calls won't work until you've launched\n"
34125 " * the handle 'g'. You have to do this _after_ adding drives\n"
34126 " * and _before_ other commands.\n"
34128 " guestfs_launch (g);\n"
34133 #: ../src/guestfs.pod:89
34136 " /* Now you can examine what partitions, LVs etc are available.\n"
34138 " char **partitions = guestfs_list_partitions (g);\n"
34139 " char **logvols = guestfs_lvs (g);\n"
34144 #: ../src/guestfs.pod:94
34147 " /* To access a filesystem in the image, you must mount it.\n"
34149 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34154 #: ../src/guestfs.pod:98
34157 " /* Now you can perform filesystem actions on the guest\n"
34160 " guestfs_touch (g, \"/hello\");\n"
34165 #: ../src/guestfs.pod:103
34168 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34169 " * it is done automatically when you close the handle. See\n"
34170 " * discussion of autosync in this page.\n"
34172 " guestfs_sync (g);\n"
34177 #: ../src/guestfs.pod:109
34180 " /* Close the handle 'g'. */\n"
34181 " guestfs_close (g);\n"
34186 #: ../src/guestfs.pod:112
34188 "The code above doesn't include any error checking. In real code you should "
34189 "check return values carefully for errors. In general all functions that "
34190 "return integers return C<-1> on error, and all functions that return "
34191 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34192 "how to handle errors, and consult the documentation for each function call "
34193 "below to see precisely how they return error indications. See "
34194 "L<guestfs-examples(3)> for fully worked examples."
34198 #: ../src/guestfs.pod:121
34199 msgid "DISK IMAGES"
34203 #: ../src/guestfs.pod:123
34205 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34206 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34207 "actual block device, or simply an empty file of zeroes that you have created "
34208 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
34213 #: ../src/guestfs.pod:129
34215 "The call you should use in modern code for adding drives is "
34216 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34217 "specifying that the format is raw, do:"
34221 #: ../src/guestfs.pod:133
34224 " guestfs_add_drive_opts (g, filename,\n"
34225 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34231 #: ../src/guestfs.pod:137
34232 msgid "You can add a disk read-only using:"
34236 #: ../src/guestfs.pod:139
34239 " guestfs_add_drive_opts (g, filename,\n"
34240 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34241 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34247 #: ../src/guestfs.pod:144
34249 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34250 "libguestfs won't modify the file."
34254 #: ../src/guestfs.pod:147
34256 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34257 "by a virtual machine. Adding it read-write will almost certainly cause disk "
34258 "corruption, but adding it read-only is safe."
34262 #: ../src/guestfs.pod:151
34264 "You must add at least one disk image, and you may add multiple disk images. "
34265 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
34266 "first one you added), C</dev/sdb> (for the second one you added), etc."
34270 #: ../src/guestfs.pod:156
34272 "Once L</guestfs_launch> has been called you cannot add any more images. You "
34273 "can call L</guestfs_list_devices> to get a list of the device names, in the "
34274 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
34278 #: ../src/guestfs.pod:161
34283 #: ../src/guestfs.pod:163
34285 "Before you can read or write files, create directories and so on in a disk "
34286 "image that contains filesystems, you have to mount those filesystems using "
34287 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
34288 "a disk image contains (for example) one partition with a filesystem on that "
34289 "partition, then you can mount it directly:"
34293 #: ../src/guestfs.pod:170
34296 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
34301 #: ../src/guestfs.pod:172
34303 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
34304 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
34305 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
34306 "that these are libguestfs virtual devices, and are nothing to do with host "
34311 #: ../src/guestfs.pod:178
34313 "If you are given a disk image and you don't know what it contains then you "
34314 "have to find out. Libguestfs can do that too: use "
34315 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
34316 "and LVs, and either try mounting each to see what is mountable, or else "
34317 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
34318 "filesystems, use L</guestfs_list_filesystems>."
34322 #: ../src/guestfs.pod:186
34324 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
34325 "L</INSPECTION> below). But you might find it easier to look at higher level "
34326 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
34330 #: ../src/guestfs.pod:191
34332 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
34333 "several other variations of the C<guestfs_mount_*> call."
34337 #: ../src/guestfs.pod:194
34338 msgid "FILESYSTEM ACCESS AND MODIFICATION"
34342 #: ../src/guestfs.pod:196
34344 "The majority of the libguestfs API consists of fairly low-level calls for "
34345 "accessing and modifying the files, directories, symlinks etc on mounted "
34346 "filesystems. There are over a hundred such calls which you can find listed "
34347 "in detail below in this man page, and we don't even pretend to cover them "
34348 "all in this overview."
34352 #: ../src/guestfs.pod:202
34354 "Specify filenames as full paths, starting with C<\"/\"> and including the "
34359 #: ../src/guestfs.pod:205
34361 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
34362 "the file called C<\"etc/passwd\"> then you could do:"
34366 #: ../src/guestfs.pod:208
34369 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
34374 #: ../src/guestfs.pod:210
34376 "This would return C<data> as a newly allocated buffer containing the full "
34377 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
34378 "or C<NULL> if there was an error."
34382 #: ../src/guestfs.pod:214
34384 "As another example, to create a top-level directory on that filesystem "
34385 "called C<\"var\"> you would do:"
34389 #: ../src/guestfs.pod:217
34392 " guestfs_mkdir (g, \"/var\");\n"
34397 #: ../src/guestfs.pod:219
34398 msgid "To create a symlink you could do:"
34402 #: ../src/guestfs.pod:221
34405 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
34406 " \"/etc/rc3.d/S30portmap\");\n"
34411 #: ../src/guestfs.pod:224
34413 "Libguestfs will reject attempts to use relative paths and there is no "
34414 "concept of a current working directory."
34418 #: ../src/guestfs.pod:227
34420 "Libguestfs can return errors in many situations: for example if the "
34421 "filesystem isn't writable, or if a file or directory that you requested "
34422 "doesn't exist. If you are using the C API (documented here) you have to "
34423 "check for those error conditions after each call. (Other language bindings "
34424 "turn these errors into exceptions)."
34428 #: ../src/guestfs.pod:233
34430 "File writes are affected by the per-handle umask, set by calling "
34431 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
34435 #: ../src/guestfs.pod:236
34436 msgid "PARTITIONING"
34440 #: ../src/guestfs.pod:238
34442 "Libguestfs contains API calls to read, create and modify partition tables on "
34447 #: ../src/guestfs.pod:241
34449 "In the common case where you want to create a single partition covering the "
34450 "whole disk, you should use the L</guestfs_part_disk> call:"
34454 #: ../src/guestfs.pod:245
34457 " const char *parttype = \"mbr\";\n"
34458 " if (disk_is_larger_than_2TB)\n"
34459 " parttype = \"gpt\";\n"
34460 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
34465 #: ../src/guestfs.pod:250
34467 "Obviously this effectively wipes anything that was on that disk image "
34472 #: ../src/guestfs.pod:253
34477 #: ../src/guestfs.pod:255
34479 "Libguestfs provides access to a large part of the LVM2 API, such as "
34480 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
34481 "unless you familiarize yourself with the concepts of physical volumes, "
34482 "volume groups and logical volumes."
34486 #: ../src/guestfs.pod:260
34488 "This author strongly recommends reading the LVM HOWTO, online at "
34489 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
34493 #: ../src/guestfs.pod:263
34494 msgid "DOWNLOADING"
34498 #: ../src/guestfs.pod:265
34500 "Use L</guestfs_cat> to download small, text only files. This call is "
34501 "limited to files which are less than 2 MB and which cannot contain any ASCII "
34502 "NUL (C<\\0>) characters. However the API is very simple to use."
34506 #: ../src/guestfs.pod:269
34508 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
34509 "bit data, since it returns a (pointer, size) pair. However it is still "
34510 "limited to \"small\" files, less than 2 MB."
34514 #: ../src/guestfs.pod:273
34516 "L</guestfs_download> can be used to download any file, with no limits on "
34517 "content or size (even files larger than 4 GB)."
34521 #: ../src/guestfs.pod:276
34522 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
34526 #: ../src/guestfs.pod:279
34531 #: ../src/guestfs.pod:281
34533 "It's often the case that you want to write a file or files to the disk "
34538 #: ../src/guestfs.pod:284
34540 "To write a small file with fixed content, use L</guestfs_write>. To create "
34541 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
34542 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
34543 "variety of other functions for creating test files, for example "
34544 "L</guestfs_fill> and L</guestfs_fill_pattern>."
34548 #: ../src/guestfs.pod:290
34550 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
34551 "file content or size (even files larger than 4 GB)."
34555 #: ../src/guestfs.pod:293
34556 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
34560 #: ../src/guestfs.pod:295
34562 "However the fastest way to upload I<large numbers of arbitrary files> is to "
34563 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
34564 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
34565 "the drive in a predictable way (eg. adding it last after all other drives) "
34566 "then you can get the device name from L</guestfs_list_devices> and mount it "
34567 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
34568 "sometimes non-portable between kernel versions, and they don't support "
34569 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
34570 "using a label or UUID, use an ISO image instead."
34574 #: ../src/guestfs.pod:306
34579 #: ../src/guestfs.pod:308
34581 "There are various different commands for copying between files and devices "
34582 "and in and out of the guest filesystem. These are summarised in the table "
34587 #: ../src/guestfs.pod:314
34588 msgid "B<file> to B<file>"
34592 #: ../src/guestfs.pod:316
34594 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
34595 "directories recursively."
34599 #: ../src/guestfs.pod:319
34600 msgid "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
34604 #: ../src/guestfs.pod:322
34605 msgid "B<file> to B<device>"
34609 #: ../src/guestfs.pod:324
34610 msgid "B<device> to B<file>"
34614 #: ../src/guestfs.pod:326
34615 msgid "B<device> to B<device>"
34619 #: ../src/guestfs.pod:328
34621 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or "
34622 "L</guestfs_copy_device_to_device>."
34626 #: ../src/guestfs.pod:331
34627 msgid "Example: duplicate the contents of an LV:"
34631 #: ../src/guestfs.pod:333
34634 " guestfs_copy_device_to_device (g,\n"
34635 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34636 " /* -1 marks the end of the list of optional parameters */\n"
34642 #: ../src/guestfs.pod:338
34644 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
34645 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
34646 "optional C<size> parameter:"
34650 #: ../src/guestfs.pod:342
34653 " guestfs_copy_device_to_device (g,\n"
34654 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
34655 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
34661 #: ../src/guestfs.pod:347
34662 msgid "B<file on the host> to B<file or device>"
34666 #: ../src/guestfs.pod:349
34667 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
34671 #: ../src/guestfs.pod:351
34672 msgid "B<file or device> to B<file on the host>"
34676 #: ../src/guestfs.pod:353
34677 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
34681 #: ../src/guestfs.pod:357
34682 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
34686 #: ../src/guestfs.pod:359
34688 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
34689 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
34690 "appears you can only upload and download to files. However many Un*x-like "
34691 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
34692 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
34693 "stderr, and arbitrary file descriptor N."
34697 #: ../src/guestfs.pod:367
34698 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
34702 #: ../src/guestfs.pod:370
34705 " guestfs_download (g, filename, \"/dev/stdout\");\n"
34710 #: ../src/guestfs.pod:372
34711 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
34715 #: ../src/guestfs.pod:374
34718 " char devfd[64];\n"
34719 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
34720 " guestfs_tar_out (g, \"/\", devfd);\n"
34725 #: ../src/guestfs.pod:378
34726 msgid "LISTING FILES"
34730 #: ../src/guestfs.pod:380
34732 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
34733 "L<guestfish(1)>-equivalent command C<ll>)."
34737 #: ../src/guestfs.pod:383
34739 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
34740 "programs, as a flat list of strings."
34744 #: ../src/guestfs.pod:386
34746 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
34747 "directory, plus additional information about each one. It is more "
34748 "equivalent to using the L<readdir(3)> call on a local filesystem."
34752 #: ../src/guestfs.pod:390
34754 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
34759 #: ../src/guestfs.pod:393
34760 msgid "RUNNING COMMANDS"
34764 #: ../src/guestfs.pod:395
34766 "Although libguestfs is primarily an API for manipulating files inside guest "
34767 "images, we also provide some limited facilities for running commands inside "
34772 #: ../src/guestfs.pod:399
34773 msgid "There are many limitations to this:"
34777 #: ../src/guestfs.pod:405
34779 "The kernel version that the command runs under will be different from what "
34784 #: ../src/guestfs.pod:410
34786 "If the command needs to communicate with daemons, then most likely they "
34787 "won't be running."
34791 #: ../src/guestfs.pod:415
34792 msgid "The command will be running in limited memory."
34796 #: ../src/guestfs.pod:419
34798 "The network may not be available unless you enable it (see "
34799 "L</guestfs_set_network>)."
34803 #: ../src/guestfs.pod:424
34804 msgid "Only supports Linux guests (not Windows, BSD, etc)."
34808 #: ../src/guestfs.pod:428
34809 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
34813 #: ../src/guestfs.pod:433
34815 "For SELinux guests, you may need to enable SELinux and load policy first. "
34816 "See L</SELINUX> in this manpage."
34820 #: ../src/guestfs.pod:438
34822 "I<Security:> It is not safe to run commands from untrusted, possibly "
34823 "malicious guests. These commands may attempt to exploit your program by "
34824 "sending unexpected output. They could also try to exploit the Linux kernel "
34825 "or qemu provided by the libguestfs appliance. They could use the network "
34826 "provided by the libguestfs appliance to bypass ordinary network partitions "
34827 "and firewalls. They could use the elevated privileges or different SELinux "
34828 "context of your program to their advantage."
34832 #: ../src/guestfs.pod:447
34834 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
34835 "(a script which runs when the guest next boots normally), and to have this "
34836 "script run the commands you want in the normal context of the running guest, "
34837 "network security and so on. For information about other security issues, "
34838 "see L</SECURITY>."
34842 #: ../src/guestfs.pod:455
34844 "The two main API calls to run commands are L</guestfs_command> and "
34845 "L</guestfs_sh> (there are also variations)."
34849 #: ../src/guestfs.pod:458
34851 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
34852 "shell globs, redirections, etc will work."
34856 #: ../src/guestfs.pod:461
34857 msgid "CONFIGURATION FILES"
34861 #: ../src/guestfs.pod:463
34863 "To read and write configuration files in Linux guest filesystems, we "
34864 "strongly recommend using Augeas. For example, Augeas understands how to "
34865 "read and write, say, a Linux shadow password file or X.org configuration "
34866 "file, and so avoids you having to write that code."
34870 #: ../src/guestfs.pod:468
34872 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
34873 "document Augeas itself here because there is excellent documentation on the "
34874 "L<http://augeas.net/> website."
34878 #: ../src/guestfs.pod:472
34880 "If you don't want to use Augeas (you fool!) then try calling "
34881 "L</guestfs_read_lines> to get the file as a list of lines which you can "
34886 #: ../src/guestfs.pod:476
34891 #: ../src/guestfs.pod:478
34893 "We support SELinux guests. To ensure that labeling happens correctly in "
34894 "SELinux guests, you need to enable SELinux and load the guest's policy:"
34898 #: ../src/guestfs.pod:486
34899 msgid "Before launching, do:"
34903 #: ../src/guestfs.pod:488
34906 " guestfs_set_selinux (g, 1);\n"
34911 #: ../src/guestfs.pod:492
34913 "After mounting the guest's filesystem(s), load the policy. This is best "
34914 "done by running the L<load_policy(8)> command in the guest itself:"
34918 #: ../src/guestfs.pod:496
34921 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
34926 #: ../src/guestfs.pod:498
34928 "(Older versions of C<load_policy> require you to specify the name of the "
34933 #: ../src/guestfs.pod:503
34935 "Optionally, set the security context for the API. The correct security "
34936 "context to use can only be known by inspecting the guest. As an example:"
34940 #: ../src/guestfs.pod:507
34943 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
34948 #: ../src/guestfs.pod:511
34949 msgid "This will work for running commands and editing existing files."
34953 #: ../src/guestfs.pod:513
34955 "When new files are created, you may need to label them explicitly, for "
34956 "example by running the external command C<restorecon pathname>."
34960 #: ../src/guestfs.pod:517
34965 #: ../src/guestfs.pod:519
34967 "Certain calls are affected by the current file mode creation mask (the "
34968 "\"umask\"). In particular ones which create files or directories, such as "
34969 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
34970 "either the default mode that the file is created with or modifies the mode "
34975 #: ../src/guestfs.pod:525
34977 "The default umask is C<022>, so files are created with modes such as C<0644> "
34978 "and directories with C<0755>."
34982 #: ../src/guestfs.pod:528
34984 "There are two ways to avoid being affected by umask. Either set umask to 0 "
34985 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
34986 "L</guestfs_chmod> after creating each file or directory."
34990 #: ../src/guestfs.pod:532
34991 msgid "For more information about umask, see L<umask(2)>."
34995 #: ../src/guestfs.pod:536
34997 "Libguestfs allows you to access Linux guests which have been encrypted using "
34998 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
34999 "standard. This includes nearly all whole disk encryption systems used by "
35000 "modern Linux guests."
35004 #: ../src/guestfs.pod:542
35006 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
35007 "returns the string C<crypto_LUKS>)."
35011 #: ../src/guestfs.pod:545
35013 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
35014 "will require the passphrase!"
35018 #: ../src/guestfs.pod:548
35020 "Opening a LUKS device creates a new device mapper device called "
35021 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
35022 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
35023 "decrypted from and encrypted to the underlying block device respectively."
35027 #: ../src/guestfs.pod:554
35029 "LVM volume groups on the device can be made visible by calling "
35030 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
35031 "volume(s) can now be mounted in the usual way."
35035 #: ../src/guestfs.pod:558
35037 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
35038 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35039 "[\"/dev/VG\"])>. Then close the mapper device by calling "
35040 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35041 "underlying encrypted block device)."
35045 #: ../src/guestfs.pod:565
35050 #: ../src/guestfs.pod:567
35052 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35053 "contains operating systems, an install CD or a live CD. (These APIs used to "
35054 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
35055 "version 1.5.3 the most frequently used part of this library has been "
35056 "rewritten in C and moved into the core code)."
35060 #: ../src/guestfs.pod:574
35062 "Add all disks belonging to the unknown virtual machine and call "
35063 "L</guestfs_launch> in the usual way."
35067 #: ../src/guestfs.pod:577
35069 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
35070 "and certain heuristics, and returns a list of operating systems that were "
35071 "found. An empty list means none were found. A single element is the root "
35072 "filesystem of the operating system. For dual- or multi-boot guests, "
35073 "multiple roots can be returned, each one corresponding to a separate "
35074 "operating system. (Multi-boot virtual machines are extremely rare in the "
35075 "world of virtualization, but since this scenario can happen, we have built "
35076 "libguestfs to deal with it.)"
35080 #: ../src/guestfs.pod:586
35082 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35083 "to get additional details about that operating system. For example, call "
35084 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
35085 "Windows and Linux-based operating systems respectively."
35089 #: ../src/guestfs.pod:592
35091 "Un*x-like and Linux-based operating systems usually consist of several "
35092 "filesystems which are mounted at boot time (for example, a separate boot "
35093 "partition mounted on C</boot>). The inspection rules are able to detect how "
35094 "filesystems correspond to mount points. Call "
35095 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35096 "hash table like this example:"
35100 #: ../src/guestfs.pod:599
35103 " /boot => /dev/sda1\n"
35104 " / => /dev/vg_guest/lv_root\n"
35105 " /usr => /dev/vg_guest/lv_usr\n"
35110 #: ../src/guestfs.pod:603
35112 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35113 "filesystems as suggested."
35117 #: ../src/guestfs.pod:606
35119 "Be careful to mount filesystems in the right order (eg. C</> before "
35120 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
35125 #: ../src/guestfs.pod:610
35127 "Inspection currently only works for some common operating systems. "
35128 "Contributors are welcome to send patches for other operating systems that we "
35129 "currently cannot detect."
35133 #: ../src/guestfs.pod:614
35135 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35136 "for more details. The L</guestfs_inspect_os> function just ignores any "
35137 "encrypted devices."
35141 #: ../src/guestfs.pod:618
35143 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35144 "inspection and caches the results in the guest handle. Subsequent calls to "
35145 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
35146 "re-read the disks. If you change the content of the guest disks, you can "
35147 "redo inspection by calling L</guestfs_inspect_os> again. "
35148 "(L</guestfs_inspect_list_applications> works a little differently from the "
35149 "other calls and does read the disks. See documentation for that function "
35154 #: ../src/guestfs.pod:627
35155 msgid "INSPECTING INSTALL DISKS"
35159 #: ../src/guestfs.pod:629
35161 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35166 #: ../src/guestfs.pod:632
35168 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35169 "system, which currently can be C<installed> (a regular operating system) or "
35170 "C<installer> (some sort of install disk)."
35174 #: ../src/guestfs.pod:636
35176 "Further information is available about the operating system that can be "
35177 "installed using the regular inspection APIs like "
35178 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
35183 #: ../src/guestfs.pod:641
35185 "Some additional information specific to installer disks is also available "
35186 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
35187 "L</guestfs_inspect_is_multipart> calls."
35191 #: ../src/guestfs.pod:646
35192 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35196 #: ../src/guestfs.pod:648
35198 "Libguestfs can mount NTFS partitions. It does this using the "
35199 "L<http://www.ntfs-3g.org/> driver."
35203 #: ../src/guestfs.pod:651
35204 msgid "DRIVE LETTERS AND PATHS"
35208 #: ../src/guestfs.pod:653
35210 "DOS and Windows still use drive letters, and the filesystems are always "
35211 "treated as case insensitive by Windows itself, and therefore you might find "
35212 "a Windows configuration file referring to a path like "
35213 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
35214 "that directory might be referred to as C</WINDOWS/System32>."
35218 #: ../src/guestfs.pod:659
35220 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35221 "L</guestfs_inspect_get_drive_mappings>)"
35225 #: ../src/guestfs.pod:662
35227 "Dealing with separator characters (backslash vs forward slash) is outside "
35228 "the scope of libguestfs, but usually a simple character replacement will "
35233 #: ../src/guestfs.pod:666
35235 "To resolve the case insensitivity of paths, call "
35236 "L</guestfs_case_sensitive_path>."
35240 #: ../src/guestfs.pod:669
35241 msgid "ACCESSING THE WINDOWS REGISTRY"
35245 #: ../src/guestfs.pod:671
35247 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35248 "files, through the library C<hivex> which is part of the libguestfs project "
35249 "although ships as a separate tarball. You have to locate and download the "
35250 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35251 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
35252 "L<virt-win-reg(1)> for more help on this issue."
35256 #: ../src/guestfs.pod:679
35257 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
35261 #: ../src/guestfs.pod:681
35263 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
35264 "provide something which looks like a Linux symlink. The way it tries to do "
35265 "the rewriting is described here:"
35269 #: ../src/guestfs.pod:685
35270 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
35274 #: ../src/guestfs.pod:687
35276 "The essential problem is that ntfs-3g simply does not have enough "
35277 "information to do a correct job. NTFS links can contain drive letters and "
35278 "references to external device GUIDs that ntfs-3g has no way of resolving. "
35279 "It is almost certainly the case that libguestfs callers should ignore what "
35280 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
35284 #: ../src/guestfs.pod:694
35286 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
35287 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
35288 "attribute, and read the raw reparse data from that (you can find the format "
35289 "documented in various places around the web)."
35293 #: ../src/guestfs.pod:699
35294 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
35298 #: ../src/guestfs.pod:701
35300 "There are other useful extended attributes that can be read from ntfs-3g "
35301 "filesystems (using L</guestfs_getxattr>). See:"
35305 #: ../src/guestfs.pod:704
35306 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
35310 #: ../src/guestfs.pod:706
35311 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
35315 #: ../src/guestfs.pod:708
35317 "Although we don't want to discourage you from using the C API, we will "
35318 "mention here that the same API is also available in other languages."
35322 #: ../src/guestfs.pod:711
35324 "The API is broadly identical in all supported languages. This means that "
35325 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
35326 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
35327 "OCaml. In other words, a straightforward, predictable isomorphism between "
35332 #: ../src/guestfs.pod:717
35334 "Error messages are automatically transformed into exceptions if the language "
35339 #: ../src/guestfs.pod:720
35341 "We don't try to \"object orientify\" parts of the API in OO languages, "
35342 "although contributors are welcome to write higher level APIs above what we "
35343 "provide in their favourite languages if they wish."
35347 #: ../src/guestfs.pod:726
35352 #: ../src/guestfs.pod:728
35354 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
35355 "identical to the C API. C++ classes and exceptions are not used."
35359 #: ../src/guestfs.pod:732
35364 #: ../src/guestfs.pod:734
35366 "The C# bindings are highly experimental. Please read the warnings at the "
35367 "top of C<csharp/Libguestfs.cs>."
35371 #: ../src/guestfs.pod:737
35376 #: ../src/guestfs.pod:739
35377 msgid "See L<guestfs-erlang(3)>."
35381 #: ../src/guestfs.pod:741
35386 #: ../src/guestfs.pod:743
35388 "This is the only language binding that is working but incomplete. Only "
35389 "calls which return simple integers have been bound in Haskell, and we are "
35390 "looking for help to complete this binding."
35394 #: ../src/guestfs.pod:747
35399 #: ../src/guestfs.pod:749
35401 "Full documentation is contained in the Javadoc which is distributed with "
35402 "libguestfs. For examples, see L<guestfs-java(3)>."
35406 #: ../src/guestfs.pod:752
35411 #: ../src/guestfs.pod:754
35412 msgid "See L<guestfs-ocaml(3)>."
35416 #: ../src/guestfs.pod:756
35421 #: ../src/guestfs.pod:758
35422 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
35426 #: ../src/guestfs.pod:760
35431 #: ../src/guestfs.pod:762
35433 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
35434 "the php-libguestfs package for your distribution."
35438 #: ../src/guestfs.pod:765
35439 msgid "The PHP binding only works correctly on 64 bit machines."
35443 #: ../src/guestfs.pod:767
35448 #: ../src/guestfs.pod:769
35449 msgid "See L<guestfs-python(3)>."
35453 #: ../src/guestfs.pod:771
35458 #: ../src/guestfs.pod:773
35459 msgid "See L<guestfs-ruby(3)>."
35463 #: ../src/guestfs.pod:775
35464 msgid "B<shell scripts>"
35468 #: ../src/guestfs.pod:777
35469 msgid "See L<guestfish(1)>."
35473 #: ../src/guestfs.pod:781
35474 msgid "LIBGUESTFS GOTCHAS"
35478 #: ../src/guestfs.pod:783
35480 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
35481 "system [...] that works in the way it is documented but is counterintuitive "
35482 "and almost invites mistakes.\""
35486 #: ../src/guestfs.pod:787
35488 "Since we developed libguestfs and the associated tools, there are several "
35489 "things we would have designed differently, but are now stuck with for "
35490 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
35491 "release, you can expect these to change. Beware of them."
35495 #: ../src/guestfs.pod:795
35496 msgid "Autosync / forgetting to sync."
35500 #: ../src/guestfs.pod:797
35502 "I<Update:> Autosync is enabled by default for all API users starting from "
35503 "libguestfs 1.5.24. This section only applies to older versions."
35507 #: ../src/guestfs.pod:800
35509 "When modifying a filesystem from C or another language, you B<must> unmount "
35510 "all filesystems and call L</guestfs_sync> explicitly before you close the "
35511 "libguestfs handle. You can also call:"
35515 #: ../src/guestfs.pod:804
35518 " guestfs_set_autosync (g, 1);\n"
35523 #: ../src/guestfs.pod:806
35525 "to have the unmount/sync done automatically for you when the handle 'g' is "
35526 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
35531 #: ../src/guestfs.pod:810
35533 "If you forget to do this, then it is entirely possible that your changes "
35534 "won't be written out, or will be partially written, or (very rarely) that "
35535 "you'll get disk corruption."
35539 #: ../src/guestfs.pod:814
35541 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
35542 "guestfish scripts that forget to sync will work just fine, which can make "
35543 "this very puzzling if you are trying to debug a problem."
35547 #: ../src/guestfs.pod:818
35548 msgid "Mount option C<-o sync> should not be the default."
35552 #: ../src/guestfs.pod:820
35554 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
35555 "libguestfs 1.13.16. This section only applies to older versions."
35559 #: ../src/guestfs.pod:823
35561 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
35562 "However C<-o sync> does not add any reliability benefit, but does have a "
35563 "very large performance impact."
35567 #: ../src/guestfs.pod:827
35569 "The work around is to use L</guestfs_mount_options> and set the mount "
35570 "options that you actually want to use."
35574 #: ../src/guestfs.pod:830
35575 msgid "Read-only should be the default."
35579 #: ../src/guestfs.pod:832
35581 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
35582 "specify I<--rw> if you want to make changes to the image."
35586 #: ../src/guestfs.pod:835
35587 msgid "This would reduce the potential to corrupt live VM images."
35591 #: ../src/guestfs.pod:837
35593 "Note that many filesystems change the disk when you just mount and unmount, "
35594 "even if you didn't perform any writes. You need to use "
35595 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
35599 #: ../src/guestfs.pod:841
35600 msgid "guestfish command line is hard to use."
35604 #: ../src/guestfs.pod:843
35606 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
35607 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
35608 "exist, so it fails. In earlier versions of guestfish the error message was "
35609 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
35610 "we should have used C<guestfish -c command> to run commands."
35614 #: ../src/guestfs.pod:850
35615 msgid "guestfish megabyte modifiers don't work right on all commands"
35619 #: ../src/guestfs.pod:852
35621 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
35622 "other modifiers). What guestfish actually does is to multiply the number "
35623 "part by the modifier part and pass the result to the C API. However this "
35624 "doesn't work for a few APIs which aren't expecting bytes, but are already "
35625 "expecting some other unit (eg. megabytes)."
35629 #: ../src/guestfs.pod:859
35630 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
35634 #: ../src/guestfs.pod:861
35637 " lvcreate LV VG 100M\n"
35642 #: ../src/guestfs.pod:863
35644 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
35645 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
35646 "megabytes * megabytes) logical volume. The error message you get from this "
35647 "is also a little obscure."
35651 #: ../src/guestfs.pod:868
35653 "This could be fixed in the generator by specially marking parameters and "
35654 "return values which take bytes or other units."
35658 #: ../src/guestfs.pod:871
35659 msgid "Ambiguity between devices and paths"
35663 #: ../src/guestfs.pod:873
35665 "There is a subtle ambiguity in the API between a device name "
35666 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
35667 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
35671 #: ../src/guestfs.pod:878
35673 "In the current API we usually resolve this ambiguity by having two separate "
35674 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
35675 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
35676 "detecting if the path supplied begins with C</dev/>."
35680 #: ../src/guestfs.pod:884
35682 "To avoid both the ambiguity and the need to duplicate some calls, we could "
35683 "make paths/devices into structured names. One way to do this would be to "
35684 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
35685 "aspect of grub. Another way would be to use a structured type, equivalent "
35686 "to this OCaml type:"
35690 #: ../src/guestfs.pod:890
35693 " type path = Path of string | Device of int | Partition of int * int\n"
35698 #: ../src/guestfs.pod:892
35699 msgid "which would allow you to pass arguments like:"
35703 #: ../src/guestfs.pod:894
35706 " Path \"/foo/bar\"\n"
35707 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
35708 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
35709 " Path \"/dev/sdb2\" (* not a device *)\n"
35714 #: ../src/guestfs.pod:899
35716 "As you can see there are still problems to resolve even with this "
35717 "representation. Also consider how it might work in guestfish."
35721 #: ../src/guestfs.pod:904
35722 msgid "KEYS AND PASSPHRASES"
35726 #: ../src/guestfs.pod:906
35728 "Certain libguestfs calls take a parameter that contains sensitive key "
35729 "material, passed in as a C string."
35733 #: ../src/guestfs.pod:909
35735 "In the future we would hope to change the libguestfs implementation so that "
35736 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
35737 "swap. However this is I<not> done at the moment, because of the complexity "
35738 "of such an implementation."
35742 #: ../src/guestfs.pod:914
35744 "Therefore you should be aware that any key parameter you pass to libguestfs "
35745 "might end up being written out to the swap partition. If this is a concern, "
35746 "scrub the swap partition or don't use libguestfs on encrypted devices."
35750 #: ../src/guestfs.pod:919
35751 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
35755 #: ../src/guestfs.pod:921
35757 "All high-level libguestfs actions are synchronous. If you want to use "
35758 "libguestfs asynchronously then you must create a thread."
35762 #: ../src/guestfs.pod:924
35764 "Only use the handle from a single thread. Either use the handle exclusively "
35765 "from one thread, or provide your own mutex so that two threads cannot issue "
35766 "calls on the same handle at the same time."
35770 #: ../src/guestfs.pod:928
35772 "See the graphical program guestfs-browser for one possible architecture for "
35773 "multithreaded programs using libvirt and libguestfs."
35777 #: ../src/guestfs.pod:931
35782 #: ../src/guestfs.pod:933
35784 "Libguestfs needs a supermin appliance, which it finds by looking along an "
35789 #: ../src/guestfs.pod:936
35791 "By default it looks for these in the directory C<$libdir/guestfs> "
35792 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
35796 #: ../src/guestfs.pod:939
35798 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
35799 "to change the directories that libguestfs will search in. The value is a "
35800 "colon-separated list of paths. The current directory is I<not> searched "
35801 "unless the path contains an empty element or C<.>. For example "
35802 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
35803 "then C</usr/lib/guestfs>."
35807 #: ../src/guestfs.pod:946
35808 msgid "QEMU WRAPPERS"
35812 #: ../src/guestfs.pod:948
35814 "If you want to compile your own qemu, run qemu from a non-standard location, "
35815 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
35820 #: ../src/guestfs.pod:952
35822 "There is one important rule to remember: you I<must C<exec qemu>> as the "
35823 "last command in the shell script (so that qemu replaces the shell and "
35824 "becomes the direct child of the libguestfs-using program). If you don't do "
35825 "this, then the qemu process won't be cleaned up correctly."
35829 #: ../src/guestfs.pod:957
35831 "Here is an example of a wrapper, where I have built my own copy of qemu from "
35836 #: ../src/guestfs.pod:960
35840 " qemudir=/home/rjones/d/qemu\n"
35841 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
35847 #: ../src/guestfs.pod:964
35849 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
35850 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
35855 #: ../src/guestfs.pod:968
35858 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
35863 #: ../src/guestfs.pod:970
35865 "Note that libguestfs also calls qemu with the -help and -version options in "
35866 "order to determine features."
35870 #: ../src/guestfs.pod:973
35872 "Wrappers can also be used to edit the options passed to qemu. In the "
35873 "following example, the C<-machine ...> option (C<-machine> and the following "
35874 "argument) are removed from the command line and replaced with C<-machine "
35875 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
35876 "right one to remove, putting the remaining options into the C<args> array."
35880 #: ../src/guestfs.pod:982
35884 " while [ $# -gt 0 ]; do\n"
35885 " case \"$1\" in\n"
35889 " args[i]=\"$1\"\n"
35898 #: ../src/guestfs.pod:994
35901 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
35906 #: ../src/guestfs.pod:996
35907 msgid "ATTACHING TO RUNNING DAEMONS"
35911 #: ../src/guestfs.pod:998
35913 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
35914 "babies. Use with caution."
35918 #: ../src/guestfs.pod:1001
35920 "I<Note (2):> This section explains how to attach to a running daemon from a "
35921 "low level perspective. For most users, simply using virt tools such as "
35922 "L<guestfish(1)> with the I<--live> option will \"just work\"."
35926 #: ../src/guestfs.pod:1005
35927 msgid "Using guestfs_set_attach_method"
35931 #: ../src/guestfs.pod:1007
35933 "By calling L</guestfs_set_attach_method> you can change how the library "
35934 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
35935 "L</ARCHITECTURE> for some background)."
35939 #: ../src/guestfs.pod:1011
35941 "The normal attach method is C<appliance>, where a small appliance is created "
35942 "containing the daemon, and then the library connects to this."
35946 #: ../src/guestfs.pod:1014
35948 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
35949 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
35950 "daemon over the Unix domain socket."
35954 #: ../src/guestfs.pod:1018
35956 "The normal use for this is to connect to a running virtual machine that "
35957 "contains a C<guestfsd> daemon, and send commands so you can read and write "
35958 "files inside the live virtual machine."
35962 #: ../src/guestfs.pod:1022
35963 msgid "Using guestfs_add_domain with live flag"
35967 #: ../src/guestfs.pod:1024
35969 "L</guestfs_add_domain> provides some help for getting the correct attach "
35970 "method. If you pass the C<live> option to this function, then (if the "
35971 "virtual machine is running) it will examine the libvirt XML looking for a "
35972 "virtio-serial channel to connect to:"
35976 #: ../src/guestfs.pod:1030
35983 " <channel type='unix'>\n"
35984 " <source mode='bind' path='/path/to/socket'/>\n"
35985 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
35994 #: ../src/guestfs.pod:1042
35996 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
35997 "method to C<unix:/path/to/socket>."
36001 #: ../src/guestfs.pod:1045
36003 "Some of the libguestfs tools (including guestfish) support a I<--live> "
36004 "option which is passed through to L</guestfs_add_domain> thus allowing you "
36005 "to attach to and modify live virtual machines."
36009 #: ../src/guestfs.pod:1049
36011 "The virtual machine needs to have been set up beforehand so that it has the "
36012 "virtio-serial channel and so that guestfsd is running inside it."
36016 #: ../src/guestfs.pod:1053
36017 msgid "ABI GUARANTEE"
36021 #: ../src/guestfs.pod:1055
36023 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36024 "actions as outlined in this section. Although we will deprecate some "
36025 "actions, for example if they get replaced by newer calls, we will keep the "
36026 "old actions forever. This allows you the developer to program in confidence "
36027 "against the libguestfs API."
36031 #: ../src/guestfs.pod:1061
36032 msgid "BLOCK DEVICE NAMING"
36036 #: ../src/guestfs.pod:1063
36038 "In the kernel there is now quite a profusion of schemata for naming block "
36039 "devices (in this context, by I<block device> I mean a physical or virtual "
36040 "hard drive). The original Linux IDE driver used names starting with "
36041 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
36042 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
36043 "replacement for the old IDE driver (particularly for SATA devices) those "
36044 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
36045 "machines with paravirtualized drivers. This has created several different "
36046 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
36051 #: ../src/guestfs.pod:1075
36053 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36054 "Linux kernel to access block devices. We can run a variety of appliances "
36055 "based on a variety of Linux kernels."
36059 #: ../src/guestfs.pod:1079
36061 "This causes a problem for libguestfs because many API calls use device or "
36062 "partition names. Working scripts and the recipe (example) scripts that we "
36063 "make available over the internet could fail if the naming scheme changes."
36067 #: ../src/guestfs.pod:1084
36069 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36070 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
36071 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
36072 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36076 #: ../src/guestfs.pod:1090
36078 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
36079 "L</guestfs_list_partitions> and similar calls return the true names of the "
36080 "devices and partitions as known to the appliance."
36084 #: ../src/guestfs.pod:1095
36085 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36089 #: ../src/guestfs.pod:1097
36091 "Usually this translation is transparent. However in some (very rare) cases "
36092 "you may need to know the exact algorithm. Such cases include where you use "
36093 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
36094 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
36099 #: ../src/guestfs.pod:1103
36101 "The algorithm is applied only to I<parameters> which are known to be either "
36102 "device or partition names. Return values from functions such as "
36103 "L</guestfs_list_devices> are never changed."
36107 #: ../src/guestfs.pod:1111
36108 msgid "Is the string a parameter which is a device or partition name?"
36112 #: ../src/guestfs.pod:1115
36113 msgid "Does the string begin with C</dev/sd>?"
36117 #: ../src/guestfs.pod:1119
36119 "Does the named device exist? If so, we use that device. However if I<not> "
36120 "then we continue with this algorithm."
36124 #: ../src/guestfs.pod:1124
36125 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36129 #: ../src/guestfs.pod:1126
36130 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36134 #: ../src/guestfs.pod:1128
36135 msgid "If that named device exists, use it. If not, continue."
36139 #: ../src/guestfs.pod:1132
36140 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36144 #: ../src/guestfs.pod:1134
36145 msgid "If that named device exists, use it. If not, return an error."
36149 #: ../src/guestfs.pod:1138
36150 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36154 #: ../src/guestfs.pod:1140
36156 "Although the standard naming scheme and automatic translation is useful for "
36157 "simple programs and guestfish scripts, for larger programs it is best not to "
36158 "rely on this mechanism."
36162 #: ../src/guestfs.pod:1144
36164 "Where possible for maximum future portability programs using libguestfs "
36165 "should use these future-proof techniques:"
36169 #: ../src/guestfs.pod:1151
36171 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36172 "device names, and then use those names directly."
36176 #: ../src/guestfs.pod:1154
36177 msgid "Since those device names exist by definition, they will never be translated."
36181 #: ../src/guestfs.pod:1159
36183 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36184 "filesystem labels."
36188 #: ../src/guestfs.pod:1166
36190 "This section discusses security implications of using libguestfs, "
36191 "particularly with untrusted or malicious guests or disk images."
36195 #: ../src/guestfs.pod:1169
36196 msgid "GENERAL SECURITY CONSIDERATIONS"
36200 #: ../src/guestfs.pod:1171
36202 "Be careful with any files or data that you download from a guest (by "
36203 "\"download\" we mean not just the L</guestfs_download> command but any "
36204 "command that reads files, filenames, directories or anything else from a "
36205 "disk image). An attacker could manipulate the data to fool your program "
36206 "into doing the wrong thing. Consider cases such as:"
36210 #: ../src/guestfs.pod:1181
36211 msgid "the data (file etc) not being present"
36215 #: ../src/guestfs.pod:1185
36216 msgid "being present but empty"
36220 #: ../src/guestfs.pod:1189
36221 msgid "being much larger than normal"
36225 #: ../src/guestfs.pod:1193
36226 msgid "containing arbitrary 8 bit data"
36230 #: ../src/guestfs.pod:1197
36231 msgid "being in an unexpected character encoding"
36235 #: ../src/guestfs.pod:1201
36236 msgid "containing homoglyphs."
36240 #: ../src/guestfs.pod:1205
36241 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36245 #: ../src/guestfs.pod:1207
36247 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36248 "(VFS) module can sometimes be escalated into exploits by deliberately "
36249 "creating a malicious, malformed filesystem. These exploits are very severe "
36250 "for two reasons. Firstly there are very many filesystem drivers in the "
36251 "kernel, and many of them are infrequently used and not much developer "
36252 "attention has been paid to the code. Linux userspace helps potential "
36253 "crackers by detecting the filesystem type and automatically choosing the "
36254 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36255 "the administrator. Secondly, a kernel-level exploit is like a local root "
36256 "exploit (worse in some ways), giving immediate and total access to the "
36257 "system right down to the hardware level."
36261 #: ../src/guestfs.pod:1220
36263 "That explains why you should never mount a filesystem from an untrusted "
36264 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
36265 "inside a qemu virtual machine, usually running as a non-root user. The "
36266 "attacker would need to write a filesystem which first exploited the kernel, "
36267 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
36268 "the libguestfs protocol, and finally to be as serious as the host kernel "
36269 "exploit it would need to escalate its privileges to root. This multi-step "
36270 "escalation, performed by a static piece of data, is thought to be extremely "
36271 "hard to do, although we never say 'never' about security issues."
36275 #: ../src/guestfs.pod:1231
36277 "In any case callers can reduce the attack surface by forcing the filesystem "
36278 "type when mounting (use L</guestfs_mount_vfs>)."
36282 #: ../src/guestfs.pod:1234
36283 msgid "PROTOCOL SECURITY"
36287 #: ../src/guestfs.pod:1236
36289 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
36290 "defined upper message size. However a program that uses libguestfs must "
36291 "also take care - for example you can write a program that downloads a binary "
36292 "from a disk image and executes it locally, and no amount of protocol "
36293 "security will save you from the consequences."
36297 #: ../src/guestfs.pod:1242
36298 msgid "INSPECTION SECURITY"
36302 #: ../src/guestfs.pod:1244
36304 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
36305 "directly from the guest, and these could contain any 8 bit data. Callers "
36306 "should be careful to escape these before printing them to a structured file "
36307 "(for example, use HTML escaping if creating a web page)."
36311 #: ../src/guestfs.pod:1250
36313 "Guest configuration may be altered in unusual ways by the administrator of "
36314 "the virtual machine, and may not reflect reality (particularly for untrusted "
36315 "or actively malicious guests). For example we parse the hostname from "
36316 "configuration files like C</etc/sysconfig/network> that we find in the "
36317 "guest, but the guest administrator can easily manipulate these files to "
36318 "provide the wrong hostname."
36322 #: ../src/guestfs.pod:1258
36324 "The inspection API parses guest configuration using two external libraries: "
36325 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
36326 "designed to be robust in the face of malicious data, although denial of "
36327 "service attacks are still possible, for example with oversized configuration "
36332 #: ../src/guestfs.pod:1264
36333 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
36337 #: ../src/guestfs.pod:1266
36339 "Be very cautious about running commands from the guest. By running a "
36340 "command in the guest, you are giving CPU time to a binary that you do not "
36341 "control, under the same user account as the library, albeit wrapped in qemu "
36342 "virtualization. More information and alternatives can be found in the "
36343 "section L</RUNNING COMMANDS>."
36347 #: ../src/guestfs.pod:1272
36348 msgid "CVE-2010-3851"
36352 #: ../src/guestfs.pod:1274
36353 msgid "https://bugzilla.redhat.com/642934"
36357 #: ../src/guestfs.pod:1276
36359 "This security bug concerns the automatic disk format detection that qemu "
36360 "does on disk images."
36364 #: ../src/guestfs.pod:1279
36366 "A raw disk image is just the raw bytes, there is no header. Other disk "
36367 "images like qcow2 contain a special header. Qemu deals with this by looking "
36368 "for one of the known headers, and if none is found then assuming the disk "
36369 "image must be raw."
36373 #: ../src/guestfs.pod:1284
36375 "This allows a guest which has been given a raw disk image to write some "
36376 "other header. At next boot (or when the disk image is accessed by "
36377 "libguestfs) qemu would do autodetection and think the disk image format was, "
36378 "say, qcow2 based on the header written by the guest."
36382 #: ../src/guestfs.pod:1289
36384 "This in itself would not be a problem, but qcow2 offers many features, one "
36385 "of which is to allow a disk image to refer to another image (called the "
36386 "\"backing disk\"). It does this by placing the path to the backing disk "
36387 "into the qcow2 header. This path is not validated and could point to any "
36388 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
36389 "\"holes\" in the qcow2 disk image, which of course is completely under the "
36390 "control of the attacker."
36394 #: ../src/guestfs.pod:1297
36395 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
36399 #: ../src/guestfs.pod:1304
36400 msgid "You have enabled the network or have opened the disk in write mode."
36404 #: ../src/guestfs.pod:1308
36406 "You are also running untrusted code from the guest (see L</RUNNING "
36411 #: ../src/guestfs.pod:1313
36413 "The way to avoid this is to specify the expected disk format when adding "
36414 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
36415 "should always do this if the disk is raw format, and it's a good idea for "
36420 #: ../src/guestfs.pod:1318
36422 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
36423 "format is fetched from libvirt and passed through."
36427 #: ../src/guestfs.pod:1321
36429 "For libguestfs tools, use the I<--format> command line parameter as "
36434 #: ../src/guestfs.pod:1324
36435 msgid "CONNECTION MANAGEMENT"
36439 #: ../src/guestfs.pod:1326
36440 msgid "guestfs_h *"
36444 #: ../src/guestfs.pod:1328
36446 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
36447 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
36448 "handle and release all resources used."
36452 #: ../src/guestfs.pod:1332
36454 "For information on using multiple handles and threads, see the section "
36455 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
36459 #: ../src/guestfs.pod:1335
36460 msgid "guestfs_create"
36464 #: ../src/guestfs.pod:1337
36467 " guestfs_h *guestfs_create (void);\n"
36472 #: ../src/guestfs.pod:1339
36473 msgid "Create a connection handle."
36477 #: ../src/guestfs.pod:1341
36479 "On success this returns a non-NULL pointer to a handle. On error it returns "
36484 #: ../src/guestfs.pod:1344
36486 "You have to \"configure\" the handle after creating it. This includes "
36487 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
36488 "handle at least once."
36492 #: ../src/guestfs.pod:1348
36493 msgid "After configuring the handle, you have to call L</guestfs_launch>."
36497 #: ../src/guestfs.pod:1350
36499 "You may also want to configure error handling for the handle. See the "
36500 "L</ERROR HANDLING> section below."
36504 #: ../src/guestfs.pod:1353
36505 msgid "guestfs_close"
36509 #: ../src/guestfs.pod:1355
36512 " void guestfs_close (guestfs_h *g);\n"
36517 #: ../src/guestfs.pod:1357
36518 msgid "This closes the connection handle and frees up all resources used."
36522 #: ../src/guestfs.pod:1359
36524 "If autosync was set on the handle and the handle was launched, then this "
36525 "implicitly calls various functions to unmount filesystems and sync the "
36526 "disk. See L</guestfs_set_autosync> for more details."
36530 #: ../src/guestfs.pod:1363
36531 msgid "If a close callback was set on the handle, then it is called."
36535 #: ../src/guestfs.pod:1365
36536 msgid "ERROR HANDLING"
36540 #: ../src/guestfs.pod:1367
36542 "API functions can return errors. For example, almost all functions that "
36543 "return C<int> will return C<-1> to indicate an error."
36547 #: ../src/guestfs.pod:1370
36549 "Additional information is available for errors: an error message string and "
36550 "optionally an error number (errno) if the thing that failed was a system "
36555 #: ../src/guestfs.pod:1374
36557 "You can get at the additional information about the last error on the handle "
36558 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
36559 "up an error handler with L</guestfs_set_error_handler>."
36563 #: ../src/guestfs.pod:1379
36565 "When the handle is created, a default error handler is installed which "
36566 "prints the error message string to C<stderr>. For small short-running "
36567 "command line programs it is sufficient to do:"
36571 #: ../src/guestfs.pod:1383
36574 " if (guestfs_launch (g) == -1)\n"
36575 " exit (EXIT_FAILURE);\n"
36580 #: ../src/guestfs.pod:1386
36582 "since the default error handler will ensure that an error message has been "
36583 "printed to C<stderr> before the program exits."
36587 #: ../src/guestfs.pod:1389
36589 "For other programs the caller will almost certainly want to install an "
36590 "alternate error handler or do error handling in-line like this:"
36594 #: ../src/guestfs.pod:1392
36597 " /* This disables the default behaviour of printing errors\n"
36599 " guestfs_set_error_handler (g, NULL, NULL);\n"
36604 #: ../src/guestfs.pod:1396
36607 " if (guestfs_launch (g) == -1) {\n"
36608 " /* Examine the error message and print it etc. */\n"
36609 " char *msg = guestfs_last_error (g);\n"
36610 " int errnum = guestfs_last_errno (g);\n"
36611 " fprintf (stderr, \"%s\", msg);\n"
36612 " if (errnum != 0)\n"
36613 " fprintf (stderr, \": %s\", strerror (errnum));\n"
36614 " fprintf (stderr, \"\\n\");\n"
36621 #: ../src/guestfs.pod:1407
36623 "Out of memory errors are handled differently. The default action is to call "
36624 "L<abort(3)>. If this is undesirable, then you can set a handler using "
36625 "L</guestfs_set_out_of_memory_handler>."
36629 #: ../src/guestfs.pod:1411
36631 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
36632 "because there is no handle if this happens there is no way to get additional "
36633 "error information. However L</guestfs_create> is supposed to be a "
36634 "lightweight operation which can only fail because of insufficient memory (it "
36635 "returns NULL in this case)."
36639 #: ../src/guestfs.pod:1417
36640 msgid "guestfs_last_error"
36644 #: ../src/guestfs.pod:1419
36647 " const char *guestfs_last_error (guestfs_h *g);\n"
36652 #: ../src/guestfs.pod:1421
36654 "This returns the last error message that happened on C<g>. If there has not "
36655 "been an error since the handle was created, then this returns C<NULL>."
36659 #: ../src/guestfs.pod:1425
36661 "The lifetime of the returned string is until the next error occurs, or "
36662 "L</guestfs_close> is called."
36666 #: ../src/guestfs.pod:1428
36667 msgid "guestfs_last_errno"
36671 #: ../src/guestfs.pod:1430
36674 " int guestfs_last_errno (guestfs_h *g);\n"
36679 #: ../src/guestfs.pod:1432
36680 msgid "This returns the last error number (errno) that happened on C<g>."
36684 #: ../src/guestfs.pod:1434
36685 msgid "If successful, an errno integer not equal to zero is returned."
36689 #: ../src/guestfs.pod:1436
36690 msgid "If no error, this returns 0. This call can return 0 in three situations:"
36694 #: ../src/guestfs.pod:1443
36695 msgid "There has not been any error on the handle."
36699 #: ../src/guestfs.pod:1447
36701 "There has been an error but the errno was meaningless. This corresponds to "
36702 "the case where the error did not come from a failed system call, but for "
36703 "some other reason."
36707 #: ../src/guestfs.pod:1453
36709 "There was an error from a failed system call, but for some reason the errno "
36710 "was not captured and returned. This usually indicates a bug in libguestfs."
36714 #: ../src/guestfs.pod:1459
36716 "Libguestfs tries to convert the errno from inside the applicance into a "
36717 "corresponding errno for the caller (not entirely trivial: the appliance "
36718 "might be running a completely different operating system from the library "
36719 "and error numbers are not standardized across Un*xen). If this could not be "
36720 "done, then the error is translated to C<EINVAL>. In practice this should "
36721 "only happen in very rare circumstances."
36725 #: ../src/guestfs.pod:1467
36726 msgid "guestfs_set_error_handler"
36730 #: ../src/guestfs.pod:1469
36733 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
36735 " const char *msg);\n"
36736 " void guestfs_set_error_handler (guestfs_h *g,\n"
36737 " guestfs_error_handler_cb cb,\n"
36738 " void *opaque);\n"
36743 #: ../src/guestfs.pod:1476
36745 "The callback C<cb> will be called if there is an error. The parameters "
36746 "passed to the callback are an opaque data pointer and the error message "
36751 #: ../src/guestfs.pod:1480
36753 "C<errno> is not passed to the callback. To get that the callback must call "
36754 "L</guestfs_last_errno>."
36758 #: ../src/guestfs.pod:1483
36760 "Note that the message string C<msg> is freed as soon as the callback "
36761 "function returns, so if you want to stash it somewhere you must make your "
36766 #: ../src/guestfs.pod:1487
36767 msgid "The default handler prints messages on C<stderr>."
36771 #: ../src/guestfs.pod:1489
36772 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
36776 #: ../src/guestfs.pod:1491
36777 msgid "guestfs_get_error_handler"
36781 #: ../src/guestfs.pod:1493
36784 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
36785 " void **opaque_rtn);\n"
36790 #: ../src/guestfs.pod:1496
36791 msgid "Returns the current error handler callback."
36795 #: ../src/guestfs.pod:1498
36796 msgid "guestfs_set_out_of_memory_handler"
36800 #: ../src/guestfs.pod:1500
36803 " typedef void (*guestfs_abort_cb) (void);\n"
36804 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
36805 " guestfs_abort_cb);\n"
36810 #: ../src/guestfs.pod:1504
36812 "The callback C<cb> will be called if there is an out of memory situation. "
36813 "I<Note this callback must not return>."
36817 #: ../src/guestfs.pod:1507
36818 msgid "The default is to call L<abort(3)>."
36822 #: ../src/guestfs.pod:1509
36823 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
36827 #: ../src/guestfs.pod:1512
36828 msgid "guestfs_get_out_of_memory_handler"
36832 #: ../src/guestfs.pod:1514
36835 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
36840 #: ../src/guestfs.pod:1516
36841 msgid "This returns the current out of memory handler."
36845 #: ../src/guestfs.pod:1518
36850 #: ../src/guestfs.pod:1522
36855 #: ../src/guestfs.pod:1524
36860 #: ../src/guestfs.pod:1526
36861 msgid "AVAILABILITY"
36865 #: ../src/guestfs.pod:1528
36866 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
36870 #: ../src/guestfs.pod:1530
36872 "Using L</guestfs_available> you can test availability of the following "
36873 "groups of functions. This test queries the appliance to see if the "
36874 "appliance you are currently using supports the functionality."
36878 #: ../src/guestfs.pod:1535
36879 msgid "@AVAILABILITY@"
36883 #: ../src/guestfs.pod:1537
36884 msgid "GUESTFISH supported COMMAND"
36888 #: ../src/guestfs.pod:1539
36890 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
36891 "prints out the available groups and whether they are supported by this build "
36892 "of libguestfs. Note however that you have to do C<run> first."
36896 #: ../src/guestfs.pod:1544
36897 msgid "SINGLE CALLS AT COMPILE TIME"
36901 #: ../src/guestfs.pod:1546
36903 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
36904 "function, such as:"
36908 #: ../src/guestfs.pod:1549
36911 " #define LIBGUESTFS_HAVE_DD 1\n"
36916 #: ../src/guestfs.pod:1551
36917 msgid "if L</guestfs_dd> is available."
36921 #: ../src/guestfs.pod:1553
36923 "Before version 1.5.8, if you needed to test whether a single libguestfs "
36924 "function is available at compile time, we recommended using build tools such "
36925 "as autoconf or cmake. For example in autotools you could use:"
36929 #: ../src/guestfs.pod:1558
36932 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
36933 " AC_CHECK_FUNCS([guestfs_dd])\n"
36938 #: ../src/guestfs.pod:1561
36940 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
36945 #: ../src/guestfs.pod:1564
36946 msgid "SINGLE CALLS AT RUN TIME"
36950 #: ../src/guestfs.pod:1566
36952 "Testing at compile time doesn't guarantee that a function really exists in "
36953 "the library. The reason is that you might be dynamically linked against a "
36954 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
36955 "This situation unfortunately results in a segmentation fault, which is a "
36956 "shortcoming of the C dynamic linking system itself."
36960 #: ../src/guestfs.pod:1573
36962 "You can use L<dlopen(3)> to test if a function is available at run time, as "
36963 "in this example program (note that you still need the compile time check as "
36968 #: ../src/guestfs.pod:1577
36971 " #include <stdio.h>\n"
36972 " #include <stdlib.h>\n"
36973 " #include <unistd.h>\n"
36974 " #include <dlfcn.h>\n"
36975 " #include <guestfs.h>\n"
36980 #: ../src/guestfs.pod:1583
36985 " #ifdef LIBGUESTFS_HAVE_DD\n"
36987 " int has_function;\n"
36992 #: ../src/guestfs.pod:1589
36995 " /* Test if the function guestfs_dd is really available. */\n"
36996 " dl = dlopen (NULL, RTLD_LAZY);\n"
36998 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
36999 " exit (EXIT_FAILURE);\n"
37001 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
37007 #: ../src/guestfs.pod:1598
37010 " if (!has_function)\n"
37011 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
37013 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
37014 " /* Now it's safe to call\n"
37015 " guestfs_dd (g, \"foo\", \"bar\");\n"
37019 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37026 #: ../src/guestfs.pod:1611
37028 "You may think the above is an awful lot of hassle, and it is. There are "
37029 "other ways outside of the C linking system to ensure that this kind of "
37030 "incompatibility never arises, such as using package versioning:"
37034 #: ../src/guestfs.pod:1616
37037 " Requires: libguestfs >= 1.0.80\n"
37042 #: ../src/guestfs.pod:1618
37043 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37047 #: ../src/guestfs.pod:1620
37049 "A recent feature of the API is the introduction of calls which take optional "
37050 "arguments. In C these are declared 3 ways. The main way is as a call which "
37051 "takes variable arguments (ie. C<...>), as in this example:"
37055 #: ../src/guestfs.pod:1625
37058 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37063 #: ../src/guestfs.pod:1627
37065 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37066 "call with no optional arguments specified:"
37070 #: ../src/guestfs.pod:1630
37073 " guestfs_add_drive_opts (g, filename, -1);\n"
37078 #: ../src/guestfs.pod:1632
37079 msgid "With a single optional argument:"
37083 #: ../src/guestfs.pod:1634
37086 " guestfs_add_drive_opts (g, filename,\n"
37087 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37093 #: ../src/guestfs.pod:1638
37098 #: ../src/guestfs.pod:1640
37101 " guestfs_add_drive_opts (g, filename,\n"
37102 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37103 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37109 #: ../src/guestfs.pod:1645
37111 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37116 #: ../src/guestfs.pod:1648
37117 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37121 #: ../src/guestfs.pod:1650
37123 "The second variant has the same name with the suffix C<_va>, which works the "
37124 "same way but takes a C<va_list>. See the C manual for details. For the "
37125 "example function, this is declared:"
37129 #: ../src/guestfs.pod:1654
37132 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37133 " va_list args);\n"
37138 #: ../src/guestfs.pod:1657
37139 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37143 #: ../src/guestfs.pod:1659
37145 "The third variant is useful where you need to construct these calls. You "
37146 "pass in a structure where you fill in the optional fields. The structure "
37147 "has a bitmask as the first element which you must set to indicate which "
37148 "fields you have filled in. For our example function the structure and call "
37153 #: ../src/guestfs.pod:1665
37156 " struct guestfs_add_drive_opts_argv {\n"
37157 " uint64_t bitmask;\n"
37159 " const char *format;\n"
37162 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37163 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37168 #: ../src/guestfs.pod:1674
37169 msgid "You could call it like this:"
37173 #: ../src/guestfs.pod:1676
37176 " struct guestfs_add_drive_opts_argv optargs = {\n"
37177 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37178 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37179 " .readonly = 1,\n"
37180 " .format = \"qcow2\"\n"
37186 #: ../src/guestfs.pod:1683
37189 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37194 #: ../src/guestfs.pod:1691
37195 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37199 #: ../src/guestfs.pod:1696
37200 msgid "You do not need to fill in all fields of the structure."
37204 #: ../src/guestfs.pod:1700
37206 "There must be a one-to-one correspondence between fields of the structure "
37207 "that are filled in, and bits set in the bitmask."
37211 #: ../src/guestfs.pod:1705
37212 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37216 #: ../src/guestfs.pod:1707
37218 "In other languages, optional arguments are expressed in the way that is "
37219 "natural for that language. We refer you to the language-specific "
37220 "documentation for more details on that."
37224 #: ../src/guestfs.pod:1711
37225 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37229 #: ../src/guestfs.pod:1713
37230 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37234 #: ../src/guestfs.pod:1715
37236 "B<Note:> This section documents the generic event mechanism introduced in "
37237 "libguestfs 1.10, which you should use in new code if possible. The old "
37238 "functions C<guestfs_set_log_message_callback>, "
37239 "C<guestfs_set_subprocess_quit_callback>, "
37240 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37241 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37242 "page. Because of the ABI guarantee, the old functions continue to work."
37246 #: ../src/guestfs.pod:1724
37248 "Handles generate events when certain things happen, such as log messages "
37249 "being generated, progress messages during long-running operations, or the "
37250 "handle being closed. The API calls described below let you register a "
37251 "callback to be called when events happen. You can register multiple "
37252 "callbacks (for the same, different or overlapping sets of events), and "
37253 "individually remove callbacks. If callbacks are not removed, then they "
37254 "remain in force until the handle is closed."
37258 #: ../src/guestfs.pod:1732
37260 "In the current implementation, events are only generated synchronously: that "
37261 "means that events (and hence callbacks) can only happen while you are in the "
37262 "middle of making another libguestfs call. The callback is called in the "
37267 #: ../src/guestfs.pod:1737
37269 "Events may contain a payload, usually nothing (void), an array of 64 bit "
37270 "unsigned integers, or a message buffer. Payloads are discussed later on."
37274 #: ../src/guestfs.pod:1741
37275 msgid "CLASSES OF EVENTS"
37279 #: ../src/guestfs.pod:1745
37280 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
37284 #: ../src/guestfs.pod:1748
37286 "The callback function will be called while the handle is being closed "
37287 "(synchronously from L</guestfs_close>)."
37291 #: ../src/guestfs.pod:1751
37293 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
37294 "handles that are open when the program exits. This means that this callback "
37295 "might be called indirectly from L<exit(3)>, which can cause unexpected "
37296 "problems in higher-level languages (eg. if your HLL interpreter has already "
37297 "been cleaned up by the time this is called, and if your callback then jumps "
37298 "into some HLL function)."
37302 #: ../src/guestfs.pod:1758
37304 "If no callback is registered: the handle is closed without any callback "
37309 #: ../src/guestfs.pod:1761
37310 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
37314 #: ../src/guestfs.pod:1764
37316 "The callback function will be called when the child process quits, either "
37317 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
37318 "corresponds to a transition from any state to the CONFIG state)."
37322 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
37323 msgid "If no callback is registered: the event is ignored."
37327 #: ../src/guestfs.pod:1770
37328 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
37332 #: ../src/guestfs.pod:1773
37334 "The callback function will be called when the child process becomes ready "
37335 "first time after it has been launched. (This corresponds to a transition "
37336 "from LAUNCHING to the READY state)."
37340 #: ../src/guestfs.pod:1779
37341 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
37345 #: ../src/guestfs.pod:1782
37347 "Some long-running operations can generate progress messages. If this "
37348 "callback is registered, then it will be called each time a progress message "
37349 "is generated (usually two seconds after the operation started, and three "
37350 "times per second thereafter until it completes, although the frequency may "
37351 "change in future versions)."
37355 #: ../src/guestfs.pod:1788
37357 "The callback receives in the payload four unsigned 64 bit numbers which are "
37358 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
37362 #: ../src/guestfs.pod:1791
37364 "The units of C<total> are not defined, although for some operations C<total> "
37365 "may relate in some way to the amount of data to be transferred (eg. in bytes "
37366 "or megabytes), and C<position> may be the portion which has been "
37371 #: ../src/guestfs.pod:1796
37372 msgid "The only defined and stable parts of the API are:"
37376 #: ../src/guestfs.pod:1802
37378 "The callback can display to the user some type of progress bar or indicator "
37379 "which shows the ratio of C<position>:C<total>."
37383 #: ../src/guestfs.pod:1807
37384 msgid "0 E<lt>= C<position> E<lt>= C<total>"
37388 #: ../src/guestfs.pod:1811
37390 "If any progress notification is sent during a call, then a final progress "
37391 "notification is always sent when C<position> = C<total> (I<unless> the call "
37392 "fails with an error)."
37396 #: ../src/guestfs.pod:1815
37398 "This is to simplify caller code, so callers can easily set the progress "
37399 "indicator to \"100%\" at the end of the operation, without requiring special "
37400 "code to detect this case."
37404 #: ../src/guestfs.pod:1821
37406 "For some calls we are unable to estimate the progress of the call, but we "
37407 "can still generate progress messages to indicate activity. This is known as "
37408 "\"pulse mode\", and is directly supported by certain progress bar "
37409 "implementations (eg. GtkProgressBar)."
37413 #: ../src/guestfs.pod:1826
37415 "For these calls, zero or more progress messages are generated with "
37416 "C<position = 0> and C<total = 1>, followed by a final message with "
37417 "C<position = total = 1>."
37421 #: ../src/guestfs.pod:1830
37423 "As noted above, if the call fails with an error then the final message may "
37424 "not be generated."
37428 #: ../src/guestfs.pod:1835
37430 "The callback also receives the procedure number (C<proc_nr>) and serial "
37431 "number (C<serial>) of the call. These are only useful for debugging "
37432 "protocol issues, and the callback can normally ignore them. The callback "
37433 "may want to print these numbers in error messages or debugging messages."
37437 #: ../src/guestfs.pod:1841
37438 msgid "If no callback is registered: progress messages are discarded."
37442 #: ../src/guestfs.pod:1843
37443 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
37447 #: ../src/guestfs.pod:1846
37449 "The callback function is called whenever a log message is generated by qemu, "
37450 "the appliance kernel, guestfsd (daemon), or utility programs."
37454 #: ../src/guestfs.pod:1849
37456 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
37457 "(L</guestfs_launch>) then additional debug messages are generated."
37461 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
37463 "If no callback is registered: the messages are discarded unless the verbose "
37464 "flag is set in which case they are sent to stderr. You can override the "
37465 "printing of verbose messages to stderr by setting up a callback."
37469 #: ../src/guestfs.pod:1857
37470 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
37474 #: ../src/guestfs.pod:1860
37476 "The callback function is called whenever a log message is generated by the "
37477 "library part of libguestfs."
37481 #: ../src/guestfs.pod:1863
37483 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
37484 "messages are generated."
37488 #: ../src/guestfs.pod:1871
37489 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
37493 #: ../src/guestfs.pod:1874
37495 "The callback function is called whenever a trace message is generated. This "
37496 "only applies if the trace flag (L</guestfs_set_trace>) is set."
37500 #: ../src/guestfs.pod:1877
37502 "If no callback is registered: the messages are sent to stderr. You can "
37503 "override the printing of trace messages to stderr by setting up a callback."
37507 #: ../src/guestfs.pod:1881
37508 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
37512 #: ../src/guestfs.pod:1884
37513 msgid "The callback function is called whenever a libguestfs function is entered."
37517 #: ../src/guestfs.pod:1887
37519 "The payload is a string which contains the name of the function that we are "
37520 "entering (not including C<guestfs_> prefix)."
37524 #: ../src/guestfs.pod:1890
37526 "Note that libguestfs functions can call themselves, so you may see many "
37527 "events from a single call. A few libguestfs functions do not generate this "
37532 #: ../src/guestfs.pod:1898
37533 msgid "guestfs_set_event_callback"
37537 #: ../src/guestfs.pod:1900
37540 " int guestfs_set_event_callback (guestfs_h *g,\n"
37541 " guestfs_event_callback cb,\n"
37542 " uint64_t event_bitmask,\n"
37544 " void *opaque);\n"
37549 #: ../src/guestfs.pod:1906
37551 "This function registers a callback (C<cb>) for all event classes in the "
37552 "C<event_bitmask>."
37556 #: ../src/guestfs.pod:1909
37558 "For example, to register for all log message events, you could call this "
37559 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
37560 "To register a single callback for all possible classes of events, use "
37561 "C<GUESTFS_EVENT_ALL>."
37565 #: ../src/guestfs.pod:1915
37566 msgid "C<flags> should always be passed as 0."
37570 #: ../src/guestfs.pod:1917
37572 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
37573 "it for any purpose."
37577 #: ../src/guestfs.pod:1920
37579 "The return value is the event handle (an integer) which you can use to "
37580 "delete the callback (see below)."
37584 #: ../src/guestfs.pod:1923
37586 "If there is an error, this function returns C<-1>, and sets the error in the "
37587 "handle in the usual way (see L</guestfs_last_error> etc.)"
37591 #: ../src/guestfs.pod:1926
37593 "Callbacks remain in effect until they are deleted, or until the handle is "
37598 #: ../src/guestfs.pod:1929
37600 "In the case where multiple callbacks are registered for a particular event "
37601 "class, all of the callbacks are called. The order in which multiple "
37602 "callbacks are called is not defined."
37606 #: ../src/guestfs.pod:1933
37607 msgid "guestfs_delete_event_callback"
37611 #: ../src/guestfs.pod:1935
37614 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
37619 #: ../src/guestfs.pod:1937
37621 "Delete a callback that was previously registered. C<event_handle> should be "
37622 "the integer that was returned by a previous call to "
37623 "C<guestfs_set_event_callback> on the same handle."
37627 #: ../src/guestfs.pod:1941
37628 msgid "guestfs_event_callback"
37632 #: ../src/guestfs.pod:1943
37635 " typedef void (*guestfs_event_callback) (\n"
37638 " uint64_t event,\n"
37639 " int event_handle,\n"
37641 " const char *buf, size_t buf_len,\n"
37642 " const uint64_t *array, size_t array_len);\n"
37647 #: ../src/guestfs.pod:1952
37648 msgid "This is the type of the event callback function that you have to provide."
37652 #: ../src/guestfs.pod:1955
37654 "The basic parameters are: the handle (C<g>), the opaque user pointer "
37655 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
37656 "handle, and C<flags> which in the current API you should ignore."
37660 #: ../src/guestfs.pod:1959
37662 "The remaining parameters contain the event payload (if any). Each event may "
37663 "contain a payload, which usually relates to the event class, but for future "
37664 "proofing your code should be written to handle any payload for any event "
37669 #: ../src/guestfs.pod:1964
37671 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
37672 "there is no message buffer). Note that this message buffer can contain "
37673 "arbitrary 8 bit data, including NUL bytes."
37677 #: ../src/guestfs.pod:1968
37679 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
37680 "moment this is only used for progress messages."
37684 #: ../src/guestfs.pod:1971
37685 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
37689 #: ../src/guestfs.pod:1973
37691 "One motivation for the generic event API was to allow GUI programs to "
37692 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
37693 "unconditionally to C<stderr>."
37697 #: ../src/guestfs.pod:1977
37699 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
37700 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
37701 "messages are not events; you must capture error messages separately)."
37705 #: ../src/guestfs.pod:1982
37707 "Programs have to set up a callback to capture the classes of events of "
37712 #: ../src/guestfs.pod:1985
37716 " guestfs_set_event_callback\n"
37717 " (g, message_callback,\n"
37718 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
37719 " GUESTFS_EVENT_TRACE,\n"
37720 " 0, NULL) == -1)\n"
37721 " if (eh == -1) {\n"
37722 " // handle error in the usual way\n"
37728 #: ../src/guestfs.pod:1995
37730 "The callback can then direct messages to the appropriate place. In this "
37731 "example, messages are directed to syslog:"
37735 #: ../src/guestfs.pod:1998
37739 " message_callback (\n"
37742 " uint64_t event,\n"
37743 " int event_handle,\n"
37745 " const char *buf, size_t buf_len,\n"
37746 " const uint64_t *array, size_t array_len)\n"
37748 " const int priority = LOG_USER|LOG_INFO;\n"
37749 " if (buf_len > 0)\n"
37750 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
37756 #: ../src/guestfs.pod:2013
37757 msgid "CANCELLING LONG TRANSFERS"
37761 #: ../src/guestfs.pod:2015
37763 "Some operations can be cancelled by the caller while they are in progress. "
37764 "Currently only operations that involve uploading or downloading data can be "
37765 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
37766 "parameters in the generator)."
37770 #: ../src/guestfs.pod:2020
37771 msgid "guestfs_user_cancel"
37775 #: ../src/guestfs.pod:2022
37778 " void guestfs_user_cancel (guestfs_h *g);\n"
37783 #: ../src/guestfs.pod:2024
37784 msgid "C<guestfs_user_cancel> cancels the current upload or download operation."
37788 #: ../src/guestfs.pod:2027
37790 "Unlike most other libguestfs calls, this function is signal safe and thread "
37791 "safe. You can call it from a signal handler or from another thread, without "
37792 "needing to do any locking."
37796 #: ../src/guestfs.pod:2031
37798 "The transfer that was in progress (if there is one) will stop shortly "
37799 "afterwards, and will return an error. The errno (see "
37800 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
37801 "out if the operation was cancelled or failed because of another error."
37805 #: ../src/guestfs.pod:2037
37807 "No cleanup is performed: for example, if a file was being uploaded then "
37808 "after cancellation there may be a partially uploaded file. It is the "
37809 "caller's responsibility to clean up if necessary."
37813 #: ../src/guestfs.pod:2041
37814 msgid "There are two common places that you might call C<guestfs_user_cancel>."
37818 #: ../src/guestfs.pod:2043
37820 "In an interactive text-based program, you might call it from a C<SIGINT> "
37821 "signal handler so that pressing C<^C> cancels the current operation. (You "
37822 "also need to call L</guestfs_set_pgroup> so that child processes don't "
37823 "receive the C<^C> signal)."
37827 #: ../src/guestfs.pod:2048
37829 "In a graphical program, when the main thread is displaying a progress bar "
37830 "with a cancel button, wire up the cancel button to call this function."
37834 #: ../src/guestfs.pod:2052
37835 msgid "PRIVATE DATA AREA"
37839 #: ../src/guestfs.pod:2054
37841 "You can attach named pieces of private data to the libguestfs handle, fetch "
37842 "them by name, and walk over them, for the lifetime of the handle. This is "
37843 "called the private data area and is only available from the C API."
37847 #: ../src/guestfs.pod:2059
37848 msgid "To attach a named piece of data, use the following call:"
37852 #: ../src/guestfs.pod:2061
37855 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
37860 #: ../src/guestfs.pod:2063
37862 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
37863 "pointer (which can be C<NULL>). Any previous item with the same key is "
37868 #: ../src/guestfs.pod:2067
37870 "You can use any C<key> you want, but your key should I<not> start with an "
37871 "underscore character. Keys beginning with an underscore character are "
37872 "reserved for internal libguestfs purposes (eg. for implementing language "
37873 "bindings). It is recommended that you prefix the key with some unique "
37874 "string to avoid collisions with other users."
37878 #: ../src/guestfs.pod:2073
37879 msgid "To retrieve the pointer, use:"
37883 #: ../src/guestfs.pod:2075
37886 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
37891 #: ../src/guestfs.pod:2077
37893 "This function returns C<NULL> if either no data is found associated with "
37894 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
37899 #: ../src/guestfs.pod:2081
37901 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
37902 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
37903 "all. In particular, libguestfs does I<not> try to free the data when the "
37904 "handle is closed. If the data must be freed, then the caller must either "
37905 "free it before calling L</guestfs_close> or must set up a close callback to "
37906 "do it (see L</GUESTFS_EVENT_CLOSE>)."
37910 #: ../src/guestfs.pod:2088
37911 msgid "To walk over all entries, use these two functions:"
37915 #: ../src/guestfs.pod:2090
37918 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
37923 #: ../src/guestfs.pod:2092
37926 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
37931 #: ../src/guestfs.pod:2094
37933 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
37934 "not have any particular meaning -- keys are not returned in any defined "
37935 "order). A pointer to the key is returned in C<*key_rtn> and the "
37936 "corresponding data pointer is returned from the function. C<NULL> is "
37937 "returned if there are no keys stored in the handle."
37941 #: ../src/guestfs.pod:2100
37943 "C<guestfs_next_private> returns the next key, pointer pair. The return "
37944 "value of this function is also C<NULL> is there are no further entries to "
37949 #: ../src/guestfs.pod:2104
37950 msgid "Notes about walking over entries:"
37954 #: ../src/guestfs.pod:2110
37955 msgid "You must not call C<guestfs_set_private> while walking over the entries."
37959 #: ../src/guestfs.pod:2115
37961 "The handle maintains an internal iterator which is reset when you call "
37962 "C<guestfs_first_private>. This internal iterator is invalidated when you "
37963 "call C<guestfs_set_private>."
37967 #: ../src/guestfs.pod:2121
37968 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
37972 #: ../src/guestfs.pod:2123
37975 " guestfs_set_private (g, key, NULL);\n"
37980 #: ../src/guestfs.pod:2125
37981 msgid "then that C<key> is not returned when walking."
37985 #: ../src/guestfs.pod:2129
37987 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
37988 "C<guestfs_next_private> or C<guestfs_set_private>."
37992 #: ../src/guestfs.pod:2135
37994 "The following example code shows how to print all keys and data pointers "
37995 "that are associated with the handle C<g>:"
37999 #: ../src/guestfs.pod:2138
38002 " const char *key;\n"
38003 " void *data = guestfs_first_private (g, &key);\n"
38004 " while (data != NULL)\n"
38006 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38007 " data = guestfs_next_private (g, &key);\n"
38013 #: ../src/guestfs.pod:2146
38015 "More commonly you are only interested in keys that begin with an "
38016 "application-specific prefix C<foo_>. Modify the loop like so:"
38020 #: ../src/guestfs.pod:2149
38023 " const char *key;\n"
38024 " void *data = guestfs_first_private (g, &key);\n"
38025 " while (data != NULL)\n"
38027 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38028 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38029 " data = guestfs_next_private (g, &key);\n"
38035 #: ../src/guestfs.pod:2158
38037 "If you need to modify keys while walking, then you have to jump back to the "
38038 "beginning of the loop. For example, to delete all keys prefixed with "
38043 #: ../src/guestfs.pod:2162
38046 " const char *key;\n"
38049 " data = guestfs_first_private (g, &key);\n"
38050 " while (data != NULL)\n"
38052 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38054 " guestfs_set_private (g, key, NULL);\n"
38055 " /* note that 'key' pointer is now invalid, and so is\n"
38056 " the internal iterator */\n"
38059 " data = guestfs_next_private (g, &key);\n"
38065 #: ../src/guestfs.pod:2178
38067 "Note that the above loop is guaranteed to terminate because the keys are "
38068 "being deleted, but other manipulations of keys within the loop might not "
38069 "terminate unless you also maintain an indication of which keys have been "
38074 #: ../src/guestfs.pod:2183
38079 #: ../src/guestfs.pod:2185
38081 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38082 "true of any library, not just libguestfs. However libguestfs also contains "
38083 "static markers to help in probing internal operations."
38087 #: ../src/guestfs.pod:2189
38088 msgid "You can list all the static markers by doing:"
38092 #: ../src/guestfs.pod:2191
38095 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38096 " .provider(\"guestfs\").mark(\"*\")'\n"
38101 #: ../src/guestfs.pod:2194
38103 "B<Note:> These static markers are I<not> part of the stable API and may "
38104 "change in future versions."
38108 #: ../src/guestfs.pod:2197
38109 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38113 #: ../src/guestfs.pod:2199
38115 "This script contains examples of displaying both the static markers and some "
38116 "ordinary C entry points:"
38120 #: ../src/guestfs.pod:2202
38128 #: ../src/guestfs.pod:2204
38131 " function display_time () {\n"
38132 " now = gettimeofday_us ();\n"
38135 " delta = now - last;\n"
38141 #: ../src/guestfs.pod:2211
38144 " printf (\"%d (+%d):\", now, delta);\n"
38150 #: ../src/guestfs.pod:2214
38155 " printf (\"ready\\n\");\n"
38161 #: ../src/guestfs.pod:2219
38164 " /* Display all calls to static markers. */\n"
38165 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38166 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38167 " display_time();\n"
38168 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38174 #: ../src/guestfs.pod:2226
38177 " /* Display all calls to guestfs_mkfs* functions. */\n"
38178 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38179 " .function(\"guestfs_mkfs*\") ? {\n"
38180 " display_time();\n"
38181 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38187 #: ../src/guestfs.pod:2233
38189 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38190 "program. Note that you either have to be root, or you have to add yourself "
38191 "to several special stap groups. Consult the systemtap documentation for "
38192 "more information."
38196 #: ../src/guestfs.pod:2238
38199 " # stap /tmp/test.stap\n"
38205 #: ../src/guestfs.pod:2241
38206 msgid "In another terminal, run a guestfish command such as this:"
38210 #: ../src/guestfs.pod:2245
38211 msgid "In the first terminal, stap trace output similar to this is shown:"
38215 #: ../src/guestfs.pod:2247
38218 " 1318248056692655 (+0):\tlaunch_start\n"
38219 " 1318248056692850 (+195): launch_build_appliance_start\n"
38220 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38221 " 1318248056838059 (+19774): launch_run_qemu\n"
38222 " 1318248061071167 (+4233108): launch_end\n"
38223 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f "
38224 "device=0x1024e60\n"
38229 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38234 #: ../src/guestfs.pod:2256
38236 "<!-- old anchor for the next section --> <a "
38237 "name=\"state_machine_and_low_level_event_api\"/>"
38241 #: ../src/guestfs.pod:2261
38242 msgid "ARCHITECTURE"
38246 #: ../src/guestfs.pod:2263
38248 "Internally, libguestfs is implemented by running an appliance (a special "
38249 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38250 "process of the main program."
38254 #: ../src/guestfs.pod:2267
38257 " ___________________\n"
38259 " | main program |\n"
38261 " | | child process / appliance\n"
38262 " | | __________________________\n"
38264 " +-------------------+ RPC | +-----------------+ |\n"
38265 " | libguestfs <--------------------> guestfsd | |\n"
38266 " | | | +-----------------+ |\n"
38267 " \\___________________/ | | Linux kernel | |\n"
38268 " | +--^--------------+ |\n"
38269 " \\_________|________________/\n"
38271 " _______v______\n"
38274 " | disk image |\n"
38275 " \\______________/\n"
38280 #: ../src/guestfs.pod:2287
38282 "The library, linked to the main program, creates the child process and hence "
38283 "the appliance in the L</guestfs_launch> function."
38287 #: ../src/guestfs.pod:2290
38289 "Inside the appliance is a Linux kernel and a complete stack of userspace "
38290 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
38291 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
38292 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
38293 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
38294 "attached to the qemu process which translates device access by the "
38295 "appliance's Linux kernel into accesses to the image."
38299 #: ../src/guestfs.pod:2299
38301 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
38302 "Although the disk image you are attached to might also be used by some "
38303 "virtual machine, libguestfs doesn't know or care about this. (But you will "
38304 "care if both libguestfs's qemu process and your virtual machine are trying "
38305 "to update the disk image at the same time, since these usually results in "
38306 "massive disk corruption)."
38310 #: ../src/guestfs.pod:2306
38311 msgid "STATE MACHINE"
38315 #: ../src/guestfs.pod:2308
38316 msgid "libguestfs uses a state machine to model the child process:"
38320 #: ../src/guestfs.pod:2310
38324 " guestfs_create\n"
38332 " / | \\ \\ guestfs_launch\n"
38333 " / | _\\__V______\n"
38335 " / | | LAUNCHING |\n"
38336 " / | \\___________/\n"
38338 " / | guestfs_launch\n"
38340 " ______ / __|____V\n"
38341 " / \\ ------> / \\\n"
38342 " | BUSY | | READY |\n"
38343 " \\______/ <------ \\________/\n"
38348 #: ../src/guestfs.pod:2332
38350 "The normal transitions are (1) CONFIG (when the handle is created, but there "
38351 "is no child process), (2) LAUNCHING (when the child process is booting up), "
38352 "(3) alternating between READY and BUSY as commands are issued to, and "
38353 "carried out by, the child process."
38357 #: ../src/guestfs.pod:2337
38359 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
38360 "asynchronously at any time (eg. due to some internal error), and that causes "
38361 "the state to transition back to CONFIG."
38365 #: ../src/guestfs.pod:2341
38367 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
38368 "issued when in the CONFIG state."
38372 #: ../src/guestfs.pod:2344
38374 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
38375 "L</guestfs_launch> blocks until the child process is READY to accept "
38376 "commands (or until some failure or timeout). L</guestfs_launch> internally "
38377 "moves the state from CONFIG to LAUNCHING while it is running."
38381 #: ../src/guestfs.pod:2350
38383 "API actions such as L</guestfs_mount> can only be issued when in the READY "
38384 "state. These API calls block waiting for the command to be carried out "
38385 "(ie. the state to transition to BUSY and then back to READY). There are no "
38386 "non-blocking versions, and no way to issue more than one command per handle "
38387 "at the same time."
38391 #: ../src/guestfs.pod:2356
38393 "Finally, the child process sends asynchronous messages back to the main "
38394 "program, such as kernel log messages. You can register a callback to "
38395 "receive these messages."
38399 #: ../src/guestfs.pod:2360
38404 #: ../src/guestfs.pod:2362
38405 msgid "APPLIANCE BOOT PROCESS"
38409 #: ../src/guestfs.pod:2364
38411 "This process has evolved and continues to evolve. The description here "
38412 "corresponds only to the current version of libguestfs and is provided for "
38413 "information only."
38417 #: ../src/guestfs.pod:2368
38419 "In order to follow the stages involved below, enable libguestfs debugging "
38420 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
38424 #: ../src/guestfs.pod:2373
38425 msgid "Create the appliance"
38429 #: ../src/guestfs.pod:2375
38431 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
38432 "initrd and the appliance."
38436 #: ../src/guestfs.pod:2378
38438 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
38439 "directory if C<TMPDIR> is set)."
38443 #: ../src/guestfs.pod:2381
38445 "For a complete description of how the appliance is created and cached, read "
38446 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
38450 #: ../src/guestfs.pod:2385
38451 msgid "Start qemu and boot the kernel"
38455 #: ../src/guestfs.pod:2387
38456 msgid "qemu is invoked to boot the kernel."
38460 #: ../src/guestfs.pod:2389
38461 msgid "Run the initrd"
38465 #: ../src/guestfs.pod:2391
38467 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
38468 "appliance. The purpose of the initrd is to load enough kernel modules in "
38469 "order that the appliance itself can be mounted and started."
38473 #: ../src/guestfs.pod:2395
38475 "The initrd is a cpio archive called "
38476 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
38480 #: ../src/guestfs.pod:2398
38482 "When the initrd has started you will see messages showing that kernel "
38483 "modules are being loaded, similar to this:"
38487 #: ../src/guestfs.pod:2401
38490 " febootstrap: ext2 mini initrd starting up\n"
38491 " febootstrap: mounting /sys\n"
38492 " febootstrap: internal insmod libcrc32c.ko\n"
38493 " febootstrap: internal insmod crc32c-intel.ko\n"
38498 #: ../src/guestfs.pod:2406
38499 msgid "Find and mount the appliance device"
38503 #: ../src/guestfs.pod:2408
38505 "The appliance is a sparse file containing an ext2 filesystem which contains "
38506 "a familiar (although reduced in size) Linux operating system. It would "
38507 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
38511 #: ../src/guestfs.pod:2412
38513 "The regular disks being inspected by libguestfs are the first devices "
38514 "exposed by qemu (eg. as C</dev/vda>)."
38518 #: ../src/guestfs.pod:2415
38520 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
38521 "there was only one regular disk)."
38525 #: ../src/guestfs.pod:2418
38527 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
38528 "and switch root into the appliance, and run C</init> from the appliance."
38532 #: ../src/guestfs.pod:2422
38533 msgid "If this works successfully you will see messages such as:"
38537 #: ../src/guestfs.pod:2424
38540 " febootstrap: picked /sys/block/vdb/dev as root device\n"
38541 " febootstrap: creating /dev/root as block special 252:16\n"
38542 " febootstrap: mounting new root on /root\n"
38543 " febootstrap: chroot\n"
38544 " Starting /init script ...\n"
38549 #: ../src/guestfs.pod:2430
38551 "Note that C<Starting /init script ...> indicates that the appliance's init "
38552 "script is now running."
38556 #: ../src/guestfs.pod:2433
38557 msgid "Initialize the appliance"
38561 #: ../src/guestfs.pod:2435
38563 "The appliance itself now initializes itself. This involves starting certain "
38564 "processes like C<udev>, possibly printing some debug information, and "
38565 "finally running the daemon (C<guestfsd>)."
38569 #: ../src/guestfs.pod:2439
38574 #: ../src/guestfs.pod:2441
38576 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
38581 #: ../src/guestfs.pod:2444
38584 " verbose daemon enabled\n"
38589 #: ../src/guestfs.pod:2446
38591 "The daemon expects to see a named virtio-serial port exposed by qemu and "
38592 "connected on the other end to the library."
38596 #: ../src/guestfs.pod:2449
38598 "The daemon connects to this port (and hence to the library) and sends a four "
38599 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
38600 "protocol (see below)."
38604 #: ../src/guestfs.pod:2455
38605 msgid "COMMUNICATION PROTOCOL"
38609 #: ../src/guestfs.pod:2457
38611 "Don't rely on using this protocol directly. This section documents how it "
38612 "currently works, but it may change at any time."
38616 #: ../src/guestfs.pod:2460
38618 "The protocol used to talk between the library and the daemon running inside "
38619 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
38620 "1014, RFC 1832, RFC 4506)."
38624 #: ../src/guestfs.pod:2464
38626 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
38627 "this file is automatically generated)."
38631 #: ../src/guestfs.pod:2467
38633 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
38634 "and C<FileOut> parameters, which are handled with very simple request/reply "
38635 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
38636 "parameters, which use the same request and reply messages, but they may also "
38637 "be followed by files sent using a chunked encoding."
38641 #: ../src/guestfs.pod:2474
38642 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
38646 #: ../src/guestfs.pod:2476
38647 msgid "For ordinary functions, the request message is:"
38651 #: ../src/guestfs.pod:2478
38654 " total length (header + arguments,\n"
38655 " but not including the length word itself)\n"
38656 " struct guestfs_message_header (encoded as XDR)\n"
38657 " struct guestfs_<foo>_args (encoded as XDR)\n"
38662 #: ../src/guestfs.pod:2483
38664 "The total length field allows the daemon to allocate a fixed size buffer "
38665 "into which it slurps the rest of the message. As a result, the total length "
38666 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
38667 "effective size of any request is limited to somewhere under this size."
38671 #: ../src/guestfs.pod:2489
38673 "Note also that many functions don't take any arguments, in which case the "
38674 "C<guestfs_I<foo>_args> is completely omitted."
38678 #: ../src/guestfs.pod:2492
38680 "The header contains the procedure number (C<guestfs_proc>) which is how the "
38681 "receiver knows what type of args structure to expect, or none at all."
38685 #: ../src/guestfs.pod:2496
38687 "For functions that take optional arguments, the optional arguments are "
38688 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
38689 "arguments. A bitmask in the header indicates which optional arguments are "
38690 "meaningful. The bitmask is also checked to see if it contains bits set "
38691 "which the daemon does not know about (eg. if more optional arguments were "
38692 "added in a later version of the library), and this causes the call to be "
38697 #: ../src/guestfs.pod:2504
38698 msgid "The reply message for ordinary functions is:"
38702 #: ../src/guestfs.pod:2506
38705 " total length (header + ret,\n"
38706 " but not including the length word itself)\n"
38707 " struct guestfs_message_header (encoded as XDR)\n"
38708 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38713 #: ../src/guestfs.pod:2511
38715 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
38716 "functions that return no formal return values."
38720 #: ../src/guestfs.pod:2514
38721 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
38725 #: ../src/guestfs.pod:2517
38727 "In the case of an error, a flag is set in the header, and the reply message "
38728 "is slightly changed:"
38732 #: ../src/guestfs.pod:2520
38735 " total length (header + error,\n"
38736 " but not including the length word itself)\n"
38737 " struct guestfs_message_header (encoded as XDR)\n"
38738 " struct guestfs_message_error (encoded as XDR)\n"
38743 #: ../src/guestfs.pod:2525
38745 "The C<guestfs_message_error> structure contains the error message as a "
38750 #: ../src/guestfs.pod:2528
38751 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
38755 #: ../src/guestfs.pod:2530
38757 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
38758 "The normal request message is sent (see above). However this is followed by "
38759 "a sequence of file chunks."
38763 #: ../src/guestfs.pod:2534
38766 " total length (header + arguments,\n"
38767 " but not including the length word itself,\n"
38768 " and not including the chunks)\n"
38769 " struct guestfs_message_header (encoded as XDR)\n"
38770 " struct guestfs_<foo>_args (encoded as XDR)\n"
38771 " sequence of chunks for FileIn param #0\n"
38772 " sequence of chunks for FileIn param #1 etc.\n"
38777 #: ../src/guestfs.pod:2542
38778 msgid "The \"sequence of chunks\" is:"
38782 #: ../src/guestfs.pod:2544
38785 " length of chunk (not including length word itself)\n"
38786 " struct guestfs_chunk (encoded as XDR)\n"
38787 " length of chunk\n"
38788 " struct guestfs_chunk (encoded as XDR)\n"
38790 " length of chunk\n"
38791 " struct guestfs_chunk (with data.data_len == 0)\n"
38796 #: ../src/guestfs.pod:2552
38798 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
38799 "is set in the final chunk to indicate either successful completion or early "
38804 #: ../src/guestfs.pod:2556
38806 "At time of writing there are no functions that have more than one FileIn "
38807 "parameter. However this is (theoretically) supported, by sending the "
38808 "sequence of chunks for each FileIn parameter one after another (from left to "
38813 #: ../src/guestfs.pod:2561
38815 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
38816 "transfer. The library does this by sending a chunk with a special flag set "
38817 "to indicate cancellation. When the daemon sees this, it cancels the whole "
38818 "RPC, does I<not> send any reply, and goes back to reading the next request."
38822 #: ../src/guestfs.pod:2567
38824 "The daemon may also cancel. It does this by writing a special word "
38825 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
38826 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
38827 "cancel chunk). The special word is chosen so that even if cancellation "
38828 "happens right at the end of the transfer (after the library has finished "
38829 "writing and has started listening for the reply), the \"spurious\" cancel "
38830 "flag will not be confused with the reply message."
38834 #: ../src/guestfs.pod:2576
38836 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
38837 "limit), and also files where the size is not known in advance (eg. from "
38838 "pipes or sockets). However the chunks are rather small "
38839 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
38840 "to keep much in memory."
38844 #: ../src/guestfs.pod:2582
38845 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
38849 #: ../src/guestfs.pod:2584
38851 "The protocol for FileOut parameters is exactly the same as for FileIn "
38852 "parameters, but with the roles of daemon and library reversed."
38856 #: ../src/guestfs.pod:2587
38859 " total length (header + ret,\n"
38860 " but not including the length word itself,\n"
38861 " and not including the chunks)\n"
38862 " struct guestfs_message_header (encoded as XDR)\n"
38863 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38864 " sequence of chunks for FileOut param #0\n"
38865 " sequence of chunks for FileOut param #1 etc.\n"
38870 #: ../src/guestfs.pod:2595
38871 msgid "INITIAL MESSAGE"
38875 #: ../src/guestfs.pod:2597
38877 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
38878 "which indicates that the guest and daemon is alive. This is what "
38879 "L</guestfs_launch> waits for."
38883 #: ../src/guestfs.pod:2601
38884 msgid "PROGRESS NOTIFICATION MESSAGES"
38888 #: ../src/guestfs.pod:2603
38890 "The daemon may send progress notification messages at any time. These are "
38891 "distinguished by the normal length word being replaced by "
38892 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
38896 #: ../src/guestfs.pod:2607
38898 "The library turns them into progress callbacks (see "
38899 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
38904 #: ../src/guestfs.pod:2611
38906 "The daemon self-limits the frequency of progress messages it sends (see "
38907 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
38912 #: ../src/guestfs.pod:2615
38913 msgid "LIBGUESTFS VERSION NUMBERS"
38917 #: ../src/guestfs.pod:2617
38919 "Since April 2010, libguestfs has started to make separate development and "
38920 "stable releases, along with corresponding branches in our git repository. "
38921 "These separate releases can be identified by version number:"
38925 #: ../src/guestfs.pod:2622
38928 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
38929 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
38935 " | `-------- sub-version\n"
38937 " `------ always '1' because we don't change the ABI\n"
38942 #: ../src/guestfs.pod:2633
38943 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
38947 #: ../src/guestfs.pod:2635
38949 "As time passes we cherry pick fixes from the development branch and backport "
38950 "those into the stable branch, the effect being that the stable branch should "
38951 "get more stable and less buggy over time. So the stable releases are ideal "
38952 "for people who don't need new features but would just like the software to "
38957 #: ../src/guestfs.pod:2641
38958 msgid "Our criteria for backporting changes are:"
38962 #: ../src/guestfs.pod:2647
38964 "Documentation changes which don't affect any code are backported unless the "
38965 "documentation refers to a future feature which is not in stable."
38969 #: ../src/guestfs.pod:2653
38971 "Bug fixes which are not controversial, fix obvious problems, and have been "
38972 "well tested are backported."
38976 #: ../src/guestfs.pod:2658
38978 "Simple rearrangements of code which shouldn't affect how it works get "
38979 "backported. This is so that the code in the two branches doesn't get too "
38980 "far out of step, allowing us to backport future fixes more easily."
38984 #: ../src/guestfs.pod:2664
38986 "We I<don't> backport new features, new APIs, new tools etc, except in one "
38987 "exceptional case: the new feature is required in order to implement an "
38988 "important bug fix."
38992 #: ../src/guestfs.pod:2670
38994 "A new stable branch starts when we think the new features in development are "
38995 "substantial and compelling enough over the current stable branch to warrant "
38996 "it. When that happens we create new stable and development versions 1.N.0 "
38997 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
38998 "stable at this point, but by backporting fixes from development, that branch "
38999 "will stabilize over time."
39003 #: ../src/guestfs.pod:2678
39004 msgid "EXTENDING LIBGUESTFS"
39008 #: ../src/guestfs.pod:2680
39009 msgid "ADDING A NEW API ACTION"
39013 #: ../src/guestfs.pod:2682
39015 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
39016 "documentation) are generated, and this makes it easy to extend the "
39021 #: ../src/guestfs.pod:2686
39022 msgid "To add a new API action there are two changes:"
39026 #: ../src/guestfs.pod:2692
39028 "You need to add a description of the call (name, parameters, return type, "
39029 "tests, documentation) to C<generator/generator_actions.ml>."
39033 #: ../src/guestfs.pod:2695
39035 "There are two sorts of API action, depending on whether the call goes "
39036 "through to the daemon in the appliance, or is serviced entirely by the "
39037 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
39038 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39039 "an example of the latter, since a trace flag is maintained in the handle and "
39040 "all tracing is done on the library side."
39044 #: ../src/guestfs.pod:2703
39046 "Most new actions are of the first type, and get added to the "
39047 "C<daemon_functions> list. Each function has a unique procedure number used "
39048 "in the RPC protocol which is assigned to that action when we publish "
39049 "libguestfs and cannot be reused. Take the latest procedure number and "
39054 #: ../src/guestfs.pod:2709
39056 "For library-only actions of the second type, add to the "
39057 "C<non_daemon_functions> list. Since these functions are serviced by the "
39058 "library and do not travel over the RPC mechanism to the daemon, these "
39059 "functions do not need a procedure number, and so the procedure number is set "
39064 #: ../src/guestfs.pod:2717
39065 msgid "Implement the action (in C):"
39069 #: ../src/guestfs.pod:2719
39071 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39072 "C<daemon/> directory."
39076 #: ../src/guestfs.pod:2722
39078 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39079 "(note: double underscore) in the C<src/> directory."
39083 #: ../src/guestfs.pod:2725
39084 msgid "In either case, use another function as an example of what to do."
39088 #: ../src/guestfs.pod:2729
39089 msgid "After making these changes, use C<make> to compile."
39093 #: ../src/guestfs.pod:2731
39095 "Note that you don't need to implement the RPC, language bindings, manual "
39096 "pages or anything else. It's all automatically generated from the OCaml "
39101 #: ../src/guestfs.pod:2735
39102 msgid "ADDING TESTS FOR AN API ACTION"
39106 #: ../src/guestfs.pod:2737
39108 "You can supply zero or as many tests as you want per API call. The tests "
39109 "can either be added as part of the API description "
39110 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
39111 "drop a script into C<regressions/>. Note that adding a script to "
39112 "C<regressions/> is slower, so if possible use the first method."
39116 #: ../src/guestfs.pod:2743
39118 "The following describes the test environment used when you add an API test "
39119 "in C<generator_actions.ml>."
39123 #: ../src/guestfs.pod:2746
39124 msgid "The test environment has 4 block devices:"
39128 #: ../src/guestfs.pod:2750
39129 msgid "C</dev/sda> 500MB"
39133 #: ../src/guestfs.pod:2752
39134 msgid "General block device for testing."
39138 #: ../src/guestfs.pod:2754
39139 msgid "C</dev/sdb> 50MB"
39143 #: ../src/guestfs.pod:2756
39145 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39150 #: ../src/guestfs.pod:2759
39151 msgid "C</dev/sdc> 10MB"
39155 #: ../src/guestfs.pod:2761
39156 msgid "Used in a few tests where two block devices are needed."
39160 #: ../src/guestfs.pod:2763
39161 msgid "C</dev/sdd>"
39165 #: ../src/guestfs.pod:2765
39166 msgid "ISO with fixed content (see C<images/test.iso>)."
39170 #: ../src/guestfs.pod:2769
39172 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39173 "appliance and block devices are reused between tests. So don't try testing "
39174 "L</guestfs_kill_subprocess> :-x"
39178 #: ../src/guestfs.pod:2773
39180 "Each test starts with an initial scenario, selected using one of the "
39181 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39182 "initialize the disks mentioned above in a particular way as documented in "
39183 "C<generator_types.ml>. You should not assume anything about the previous "
39184 "contents of other disks that are not initialized."
39188 #: ../src/guestfs.pod:2779
39190 "You can add a prerequisite clause to any individual test. This is a "
39191 "run-time check, which, if it fails, causes the test to be skipped. Useful "
39192 "if testing a command which might not work on all variations of libguestfs "
39193 "builds. A test that has prerequisite of C<Always> means to run "
39198 #: ../src/guestfs.pod:2785
39200 "In addition, packagers can skip individual tests by setting environment "
39201 "variables before running C<make check>."
39205 #: ../src/guestfs.pod:2788
39208 " SKIP_TEST_<CMD>_<NUM>=1\n"
39213 #: ../src/guestfs.pod:2790
39214 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39218 #: ../src/guestfs.pod:2794
39221 " SKIP_TEST_<CMD>=1\n"
39226 #: ../src/guestfs.pod:2796
39227 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39231 #: ../src/guestfs.pod:2798
39232 msgid "Packagers can run only certain tests by setting for example:"
39236 #: ../src/guestfs.pod:2800
39239 " TEST_ONLY=\"vfs_type zerofree\"\n"
39244 #: ../src/guestfs.pod:2802
39246 "See C<capitests/tests.c> for more details of how these environment variables "
39251 #: ../src/guestfs.pod:2805
39252 msgid "DEBUGGING NEW API ACTIONS"
39256 #: ../src/guestfs.pod:2807
39257 msgid "Test new actions work before submitting them."
39261 #: ../src/guestfs.pod:2809
39262 msgid "You can use guestfish to try out new commands."
39266 #: ../src/guestfs.pod:2811
39268 "Debugging the daemon is a problem because it runs inside a minimal "
39269 "environment. However you can fprintf messages in the daemon to stderr, and "
39270 "they will show up if you use C<guestfish -v>."
39274 #: ../src/guestfs.pod:2815
39275 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
39279 #: ../src/guestfs.pod:2817
39281 "Our C source code generally adheres to some basic code-formatting "
39282 "conventions. The existing code base is not totally consistent on this "
39283 "front, but we do prefer that contributed code be formatted similarly. In "
39284 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
39285 "indentation level, and other than that, follow the K&R style."
39289 #: ../src/guestfs.pod:2823
39291 "If you use Emacs, add the following to one of one of your start-up files "
39292 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
39296 #: ../src/guestfs.pod:2826
39299 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
39300 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
39301 " (add-hook 'find-file-hook\n"
39302 " '(lambda () (if (and buffer-file-name\n"
39303 " (string-match \"/libguestfs\\\\>\"\n"
39304 " (buffer-file-name))\n"
39305 " (not (string-equal mode-name \"Change Log\"))\n"
39306 " (not (string-equal mode-name \"Makefile\")))\n"
39307 " (setq indent-tabs-mode nil))))\n"
39312 #: ../src/guestfs.pod:2836
39315 " ;;; When editing C sources in libguestfs, use this style.\n"
39316 " (defun libguestfs-c-mode ()\n"
39317 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
39319 " (c-set-style \"K&R\")\n"
39320 " (setq c-indent-level 2)\n"
39321 " (setq c-basic-offset 2))\n"
39322 " (add-hook 'c-mode-hook\n"
39323 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
39324 " (buffer-file-name))\n"
39325 " (libguestfs-c-mode))))\n"
39330 #: ../src/guestfs.pod:2848
39331 msgid "Enable warnings when compiling (and fix any problems this finds):"
39335 #: ../src/guestfs.pod:2851
39338 " ./configure --enable-gcc-warnings\n"
39343 #: ../src/guestfs.pod:2853
39344 msgid "Useful targets are:"
39348 #: ../src/guestfs.pod:2855
39351 " make syntax-check # checks the syntax of the C code\n"
39352 " make check # runs the test suite\n"
39357 #: ../src/guestfs.pod:2858
39358 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
39362 #: ../src/guestfs.pod:2860
39364 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
39365 "which are used to do shell quoting."
39369 #: ../src/guestfs.pod:2865
39374 #: ../src/guestfs.pod:2867
39376 "Simple shell quoted string. Any spaces or other shell characters are "
39381 #: ../src/guestfs.pod:2870
39386 #: ../src/guestfs.pod:2872
39388 "Same as C<%Q> except the string is treated as a path which is prefixed by "
39393 #: ../src/guestfs.pod:2879
39396 " asprintf (&cmd, \"cat %R\", path);\n"
39401 #: ../src/guestfs.pod:2881
39402 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
39406 #: ../src/guestfs.pod:2883
39408 "I<Note:> Do I<not> use these when you are passing parameters to the "
39409 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
39410 "because they are not passed via the shell (instead, straight to exec). You "
39411 "probably want to use the C<sysroot_path()> function however."
39415 #: ../src/guestfs.pod:2889
39416 msgid "SUBMITTING YOUR NEW API ACTIONS"
39420 #: ../src/guestfs.pod:2891
39422 "Submit patches to the mailing list: "
39423 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
39424 "L<rjones@redhat.com>."
39428 #: ../src/guestfs.pod:2895
39429 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
39433 #: ../src/guestfs.pod:2897
39434 msgid "We support i18n (gettext anyhow) in the library."
39438 #: ../src/guestfs.pod:2899
39440 "However many messages come from the daemon, and we don't translate those at "
39441 "the moment. One reason is that the appliance generally has all locale files "
39442 "removed from it, because they take up a lot of space. So we'd have to readd "
39443 "some of those, as well as copying our PO files into the appliance."
39447 #: ../src/guestfs.pod:2905
39449 "Debugging messages are never translated, since they are intended for the "
39454 #: ../src/guestfs.pod:2908
39455 msgid "SOURCE CODE SUBDIRECTORIES"
39459 #: ../src/guestfs.pod:2912
39464 #: ../src/guestfs.pod:2914
39465 msgid "L<virt-alignment-scan(1)> command and documentation."
39469 #: ../src/guestfs.pod:2918
39470 msgid "The libguestfs appliance, build scripts and so on."
39474 #: ../src/guestfs.pod:2920
39475 msgid "C<capitests>"
39479 #: ../src/guestfs.pod:2922
39480 msgid "Automated tests of the C API."
39484 #: ../src/guestfs.pod:2924
39489 #: ../src/guestfs.pod:2926
39491 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
39496 #: ../src/guestfs.pod:2929
39501 #: ../src/guestfs.pod:2931
39503 "Safety and liveness tests of components that libguestfs depends upon (not of "
39504 "libguestfs itself). Mainly this is for qemu and the kernel."
39508 #: ../src/guestfs.pod:2934
39513 #: ../src/guestfs.pod:2936
39515 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
39516 "command and documentation."
39520 #: ../src/guestfs.pod:2939
39525 #: ../src/guestfs.pod:2941
39526 msgid "Outside contributions, experimental parts."
39530 #: ../src/guestfs.pod:2943
39535 #: ../src/guestfs.pod:2945
39537 "The daemon that runs inside the libguestfs appliance and carries out "
39542 #: ../src/guestfs.pod:2948
39547 #: ../src/guestfs.pod:2950
39548 msgid "L<virt-df(1)> command and documentation."
39552 #: ../src/guestfs.pod:2952
39557 #: ../src/guestfs.pod:2954
39558 msgid "L<virt-edit(1)> command and documentation."
39562 #: ../src/guestfs.pod:2956
39563 msgid "C<examples>"
39567 #: ../src/guestfs.pod:2958
39568 msgid "C API example code."
39572 #: ../src/guestfs.pod:2960
39573 msgid "C<extratests>"
39577 #: ../src/guestfs.pod:2962
39579 "Extra tests. These are not run by default because they require special "
39580 "tools or configuration."
39584 #: ../src/guestfs.pod:2965
39589 #: ../src/guestfs.pod:2967
39591 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
39592 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
39593 "L<virt-tar-out(1)>."
39597 #: ../src/guestfs.pod:2971
39602 #: ../src/guestfs.pod:2973
39603 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
39607 #: ../src/guestfs.pod:2975
39608 msgid "C<generator>"
39612 #: ../src/guestfs.pod:2977
39614 "The crucially important generator, used to automatically generate large "
39615 "amounts of boilerplate C code for things like RPC and bindings."
39619 #: ../src/guestfs.pod:2980
39624 #: ../src/guestfs.pod:2982
39625 msgid "Files used by the test suite."
39629 #: ../src/guestfs.pod:2984
39630 msgid "Some \"phony\" guest images which we test against."
39634 #: ../src/guestfs.pod:2986
39635 msgid "C<inspector>"
39639 #: ../src/guestfs.pod:2988
39640 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
39644 #: ../src/guestfs.pod:2990
39649 #: ../src/guestfs.pod:2992
39650 msgid "Logo used on the website. The fish is called Arthur by the way."
39654 #: ../src/guestfs.pod:2994
39659 #: ../src/guestfs.pod:2996
39660 msgid "M4 macros used by autoconf."
39664 #: ../src/guestfs.pod:2998
39669 #: ../src/guestfs.pod:3000
39670 msgid "Translations of simple gettext strings."
39674 #: ../src/guestfs.pod:3002
39679 #: ../src/guestfs.pod:3004
39681 "The build infrastructure and PO files for translations of manpages and POD "
39682 "files. Eventually this will be combined with the C<po> directory, but that "
39683 "is rather complicated."
39687 #: ../src/guestfs.pod:3008
39688 msgid "C<regressions>"
39692 #: ../src/guestfs.pod:3010
39693 msgid "Regression tests."
39697 #: ../src/guestfs.pod:3012
39702 #: ../src/guestfs.pod:3014
39703 msgid "L<virt-rescue(1)> command and documentation."
39707 #: ../src/guestfs.pod:3016
39712 #: ../src/guestfs.pod:3018
39713 msgid "L<virt-resize(1)> command and documentation."
39717 #: ../src/guestfs.pod:3020
39718 msgid "C<sparsify>"
39722 #: ../src/guestfs.pod:3022
39723 msgid "L<virt-sparsify(1)> command and documentation."
39727 #: ../src/guestfs.pod:3024
39732 #: ../src/guestfs.pod:3026
39733 msgid "Source code to the C library."
39737 #: ../src/guestfs.pod:3028
39742 #: ../src/guestfs.pod:3030
39743 msgid "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
39747 #: ../src/guestfs.pod:3032
39748 msgid "C<test-tool>"
39752 #: ../src/guestfs.pod:3034
39754 "Test tool for end users to test if their qemu/kernel combination will work "
39759 #: ../src/guestfs.pod:3037
39764 #: ../src/guestfs.pod:3039
39769 #: ../src/guestfs.pod:3041
39774 #: ../src/guestfs.pod:3043
39779 #: ../src/guestfs.pod:3045
39784 #: ../src/guestfs.pod:3047
39789 #: ../src/guestfs.pod:3049
39794 #: ../src/guestfs.pod:3051
39799 #: ../src/guestfs.pod:3053
39804 #: ../src/guestfs.pod:3055
39805 msgid "Language bindings."
39809 #: ../src/guestfs.pod:3059
39810 msgid "MAKING A STABLE RELEASE"
39814 #: ../src/guestfs.pod:3061
39816 "When we make a stable release, there are several steps documented here. See "
39817 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
39822 #: ../src/guestfs.pod:3069
39823 msgid "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
39827 #: ../src/guestfs.pod:3074
39828 msgid "Finalize RELEASE-NOTES."
39832 #: ../src/guestfs.pod:3078
39833 msgid "Update ROADMAP."
39837 #: ../src/guestfs.pod:3082
39838 msgid "Run C<src/api-support/update-from-tarballs.sh>."
39842 #: ../src/guestfs.pod:3086
39843 msgid "Push and pull from Transifex."
39847 #: ../src/guestfs.pod:3090
39855 #: ../src/guestfs.pod:3092
39856 msgid "to push the latest POT files to Transifex. Then run:"
39860 #: ../src/guestfs.pod:3094
39868 #: ../src/guestfs.pod:3096
39869 msgid "which is a wrapper to pull the latest translated C<*.po> files."
39873 #: ../src/guestfs.pod:3100
39875 "Create new stable and development directories under "
39876 "L<http://libguestfs.org/download>."
39880 #: ../src/guestfs.pod:3105
39881 msgid "Create the branch in git:"
39885 #: ../src/guestfs.pod:3107
39888 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
39889 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
39890 " git branch stable-1.XX\n"
39891 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
39896 #: ../src/guestfs.pod:3114
39901 #: ../src/guestfs.pod:3116
39902 msgid "PROTOCOL LIMITS"
39906 #: ../src/guestfs.pod:3118
39908 "Internally libguestfs uses a message-based protocol to pass API calls and "
39909 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
39910 "plenty more detail about this). The maximum message size used by the "
39911 "protocol is slightly less than 4 MB. For some API calls you may need to be "
39912 "aware of this limit. The API calls which may be affected are individually "
39913 "documented, with a link back to this section of the documentation."
39917 #: ../src/guestfs.pod:3126
39919 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
39920 "a simple string. Because this string is at some point internally encoded as "
39921 "a message, the maximum size that it can return is slightly under 4 MB. If "
39922 "the requested file is larger than this then you will get an error."
39926 #: ../src/guestfs.pod:3132
39928 "In order to transfer large files into and out of the guest filesystem, you "
39929 "need to use particular calls that support this. The sections L</UPLOADING> "
39930 "and L</DOWNLOADING> document how to do this."
39934 #: ../src/guestfs.pod:3136
39936 "You might also consider mounting the disk image using our FUSE filesystem "
39937 "support (L<guestmount(1)>)."
39941 #: ../src/guestfs.pod:3139
39942 msgid "MAXIMUM NUMBER OF DISKS"
39946 #: ../src/guestfs.pod:3141
39947 msgid "When using virtio disks (the default) the current limit is B<25> disks."
39951 #: ../src/guestfs.pod:3144
39953 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
39954 "slots. However febootstrap only understands disks with names C</dev/vda> "
39955 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
39960 #: ../src/guestfs.pod:3149
39962 "We are working to substantially raise this limit in future versions but it "
39963 "requires complex changes to qemu."
39967 #: ../src/guestfs.pod:3152
39969 "In future versions of libguestfs it should also be possible to \"hot plug\" "
39970 "disks (add and remove disks after calling L</guestfs_launch>). This also "
39971 "requires changes to qemu."
39975 #: ../src/guestfs.pod:3156
39976 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
39980 #: ../src/guestfs.pod:3158
39981 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
39985 #: ../src/guestfs.pod:3160
39987 "This is because it reserves 4 bits for the minor device number (thus "
39988 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
39992 #: ../src/guestfs.pod:3163
39994 "If you attach a disk with more than 15 partitions, the extra partitions are "
39995 "ignored by libguestfs."
39999 #: ../src/guestfs.pod:3166
40000 msgid "MAXIMUM SIZE OF A DISK"
40004 #: ../src/guestfs.pod:3168
40005 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
40009 #: ../src/guestfs.pod:3170
40011 "We have tested block devices up to 1 exabyte (2**60 or "
40012 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
40017 #: ../src/guestfs.pod:3174
40019 "Although libguestfs probably does not impose any limit, the underlying host "
40020 "storage will. If you store disk images on a host ext4 filesystem, then the "
40021 "maximum size will be limited by the maximum ext4 file size (currently 16 "
40022 "TB). If you store disk images as host logical volumes then you are limited "
40023 "by the maximum size of an LV."
40027 #: ../src/guestfs.pod:3180
40029 "For the hugest disk image files, we recommend using XFS on the host for "
40034 #: ../src/guestfs.pod:3183
40035 msgid "MAXIMUM SIZE OF A PARTITION"
40039 #: ../src/guestfs.pod:3185
40041 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
40042 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
40043 "address a partition located beyond 2 TB on the disk."
40047 #: ../src/guestfs.pod:3189
40049 "It is recommended that you use GPT partitions on disks which are larger than "
40050 "this size. GPT uses 64 bit sector numbers and so can address partitions "
40051 "which are theoretically larger than the largest disk we could support."
40055 #: ../src/guestfs.pod:3194
40056 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40060 #: ../src/guestfs.pod:3196
40062 "This depends on the filesystem type. libguestfs itself does not impose any "
40063 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40064 "what these limits are."
40068 #: ../src/guestfs.pod:3200
40069 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40073 #: ../src/guestfs.pod:3202
40075 "The API functions L</guestfs_upload>, L</guestfs_download>, "
40076 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40077 "uploads and downloads."
40081 #: ../src/guestfs.pod:3206
40082 msgid "INSPECTION LIMITS"
40086 #: ../src/guestfs.pod:3208
40088 "The inspection code has several arbitrary limits on things like the size of "
40089 "Windows Registry hive it will read, and the length of product name. These "
40090 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40091 "memory and disk space on the host, and should not be reached in practice. "
40092 "See the source code for more information."
40096 #: ../src/guestfs.pod:3234
40098 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40099 "effect as calling C<guestfs_set_verbose (g, 1)>."
40103 #: ../src/guestfs.pod:3246
40105 "Set the path that libguestfs uses to search for a supermin appliance. See "
40106 "the discussion of paths in section L</PATH> above."
40110 #: ../src/guestfs.pod:3255
40111 msgid "See also L</QEMU WRAPPERS> above."
40115 #: ../src/guestfs.pod:3259
40117 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40118 "effect as calling C<guestfs_set_trace (g, 1)>."
40122 #: ../src/guestfs.pod:3277
40124 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
40125 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
40126 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, "
40127 "L<virt-alignment-scan(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
40128 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
40129 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40130 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
40131 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, "
40132 "L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
40133 "L<virt-win-reg(1)>, L<guestfs-testing(1)>, L<qemu(1)>, L<febootstrap(1)>, "
40134 "L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)>, "
40135 "L<http://libguestfs.org/>."
40139 #: ../src/guestfs.pod:3314
40141 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
40142 "L<lvm(8)>, L<disktype(1)>."
40146 #: ../src/guestfs.pod:3321 ../tools/virt-make-fs.pl:571 ../tools/virt-win-reg.pl:772
40151 #: ../src/guestfs.pod:3323
40152 msgid "To get a list of bugs against libguestfs use this link:"
40156 #: ../src/guestfs.pod:3325
40157 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
40161 #: ../src/guestfs.pod:3327
40162 msgid "To report a new bug against libguestfs use this link:"
40166 #: ../src/guestfs.pod:3329
40167 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
40171 #: ../src/guestfs.pod:3331
40172 msgid "When reporting a bug, please check:"
40176 #: ../src/guestfs.pod:3337
40177 msgid "That the bug hasn't been reported already."
40181 #: ../src/guestfs.pod:3341
40182 msgid "That you are testing a recent version."
40186 #: ../src/guestfs.pod:3345
40187 msgid "Describe the bug accurately, and give a way to reproduce it."
40191 #: ../src/guestfs.pod:3349
40193 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
40198 #: ../test-tool/libguestfs-test-tool.pod:5
40199 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40203 #: ../test-tool/libguestfs-test-tool.pod:9
40206 " libguestfs-test-tool [--options]\n"
40211 #: ../test-tool/libguestfs-test-tool.pod:13
40213 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40214 "to check basic libguestfs functionality is working. This is needed because "
40215 "libguestfs occasionally breaks for reasons beyond our control: usually "
40216 "because of changes in the underlying qemu or kernel packages, or the host "
40221 #: ../test-tool/libguestfs-test-tool.pod:19
40222 msgid "If you suspect a problem in libguestfs, then just run:"
40226 #: ../test-tool/libguestfs-test-tool.pod:21
40229 " libguestfs-test-tool\n"
40234 #: ../test-tool/libguestfs-test-tool.pod:23
40235 msgid "It will print lots of diagnostic messages."
40239 #: ../test-tool/libguestfs-test-tool.pod:25
40240 msgid "If it runs to completion successfully, you will see this near the end:"
40244 #: ../test-tool/libguestfs-test-tool.pod:27
40247 " ===== TEST FINISHED OK =====\n"
40252 #: ../test-tool/libguestfs-test-tool.pod:29
40253 msgid "and the test tool will exit with code 0."
40257 #: ../test-tool/libguestfs-test-tool.pod:31
40259 "If it fails (and/or exits with non-zero error code), please paste the "
40260 "I<complete, unedited> output of the test tool into a bug report. More "
40261 "information about reporting bugs can be found on the "
40262 "L<http://libguestfs.org/> website."
40266 #: ../test-tool/libguestfs-test-tool.pod:42
40267 msgid "Display short usage information and exit."
40271 #: ../test-tool/libguestfs-test-tool.pod:44
40272 msgid "B<--qemu qemu_binary>"
40276 #: ../test-tool/libguestfs-test-tool.pod:46
40278 "If you have downloaded another qemu binary, point this option at the full "
40279 "path of the binary to try it."
40283 #: ../test-tool/libguestfs-test-tool.pod:49
40284 msgid "B<--qemudir qemu_source_dir>"
40288 #: ../test-tool/libguestfs-test-tool.pod:51
40290 "If you have compiled qemu from source, point this option at the source "
40291 "directory to try it."
40295 #: ../test-tool/libguestfs-test-tool.pod:54
40300 #: ../test-tool/libguestfs-test-tool.pod:56
40301 msgid "B<--timeout N>"
40305 #: ../test-tool/libguestfs-test-tool.pod:58
40307 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
40308 "minutes) which does not usually need to be adjusted."
40312 #: ../test-tool/libguestfs-test-tool.pod:63
40313 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
40317 #: ../test-tool/libguestfs-test-tool.pod:65
40319 "If you have compiled another version of qemu from source and would like to "
40320 "try that, then you can use the I<--qemudir> option to point to the qemu "
40321 "source directory."
40325 #: ../test-tool/libguestfs-test-tool.pod:69
40327 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
40328 "option to point to the binary."
40332 #: ../test-tool/libguestfs-test-tool.pod:72
40334 "Note when using these options, you can ignore the business of qemu wrapper "
40335 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
40336 "wrapper script for you if one is needed."
40340 #: ../test-tool/libguestfs-test-tool.pod:76
40341 msgid "TRYING OUT A DIFFERENT KERNEL"
40345 #: ../test-tool/libguestfs-test-tool.pod:78
40347 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
40348 "libguestfs tries. You do this by setting the environment variables "
40349 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
40353 #: ../test-tool/libguestfs-test-tool.pod:82
40355 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
40360 #: ../test-tool/libguestfs-test-tool.pod:85
40361 msgid "SELF-DIAGNOSIS"
40365 #: ../test-tool/libguestfs-test-tool.pod:87
40367 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
40368 "produced by libguestfs-test-tool and/or possible errors."
40372 #: ../test-tool/libguestfs-test-tool.pod:92
40374 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
40375 "I<1> if there was an error."
40379 #: ../test-tool/libguestfs-test-tool.pod:97
40381 "For the full list of environment variables which may affect libguestfs, "
40382 "please see the L<guestfs(3)> manual page."
40386 #: ../test-tool/libguestfs-test-tool.pod:102
40387 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
40391 #: ../tools/virt-list-filesystems.pl:32
40392 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
40396 #: ../tools/virt-list-filesystems.pl:36
40399 " virt-list-filesystems [--options] domname\n"
40404 #: ../tools/virt-list-filesystems.pl:38
40407 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
40412 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
40414 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
40419 #: ../tools/virt-list-filesystems.pl:45
40421 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
40422 "are contained in a virtual machine or disk image."
40426 #: ../tools/virt-list-filesystems.pl:49
40428 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
40429 "functionality. For more complex cases you should look at the "
40430 "L<guestfish(1)> tool."
40434 #: ../tools/virt-list-filesystems.pl:112
40436 "With this option, C<virt-list-filesystems> displays the type of each "
40437 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
40441 #: ../tools/virt-list-filesystems.pl:119
40446 #: ../tools/virt-list-filesystems.pl:123
40448 "Normally we only show mountable filesystems. If this option is given then "
40449 "swap devices are shown too."
40453 #: ../tools/virt-list-filesystems.pl:197
40455 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
40456 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
40457 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40461 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
40462 msgid "Copyright (C) 2009 Red Hat Inc."
40466 #: ../tools/virt-list-partitions.pl:32
40467 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
40471 #: ../tools/virt-list-partitions.pl:36
40474 " virt-list-partitions [--options] domname\n"
40479 #: ../tools/virt-list-partitions.pl:38
40482 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
40487 #: ../tools/virt-list-partitions.pl:45
40489 "C<virt-list-partitions> is a command line tool to list the partitions that "
40490 "are contained in a virtual machine or disk image. It is mainly useful as a "
40491 "first step to using L<virt-resize(1)>."
40495 #: ../tools/virt-list-partitions.pl:50
40497 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
40498 "functionality. For more complex cases you should look at the "
40499 "L<guestfish(1)> tool."
40503 #: ../tools/virt-list-partitions.pl:113
40504 msgid "Show sizes in human-readable form (eg. \"1G\")."
40508 #: ../tools/virt-list-partitions.pl:123
40510 "With this option, C<virt-list-partitions> displays the type and size of each "
40511 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
40515 #: ../tools/virt-list-partitions.pl:130
40520 #: ../tools/virt-list-partitions.pl:132
40525 #: ../tools/virt-list-partitions.pl:134
40526 msgid "Display the total size of each block device (as a separate row or rows)."
40530 #: ../tools/virt-list-partitions.pl:267
40532 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
40533 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
40534 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40538 #: ../tools/virt-list-partitions.pl:283
40539 msgid "Copyright (C) 2009-2010 Red Hat Inc."
40543 #: ../tools/virt-make-fs.pl:37
40544 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
40548 #: ../tools/virt-make-fs.pl:41
40551 " virt-make-fs [--options] input.tar output.img\n"
40556 #: ../tools/virt-make-fs.pl:43
40559 " virt-make-fs [--options] input.tar.gz output.img\n"
40564 #: ../tools/virt-make-fs.pl:45
40567 " virt-make-fs [--options] directory output.img\n"
40572 #: ../tools/virt-make-fs.pl:49
40574 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
40575 "archive or some files in a directory. It is similar to tools like "
40576 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
40577 "it can create common filesystem types like ext2/3 or NTFS, which can be "
40578 "useful if you want to attach these filesystems to existing virtual machines "
40579 "(eg. to import large amounts of read-only data to a VM)."
40583 #: ../tools/virt-make-fs.pl:57
40584 msgid "Basic usage is:"
40588 #: ../tools/virt-make-fs.pl:59
40591 " virt-make-fs input output.img\n"
40596 #: ../tools/virt-make-fs.pl:61
40598 "where C<input> is either a directory containing files that you want to add, "
40599 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
40600 "C<output.img> is a disk image. The input type is detected automatically. "
40601 "The output disk image defaults to a raw ext2 sparse image unless you specify "
40602 "extra flags (see L</OPTIONS> below)."
40606 #: ../tools/virt-make-fs.pl:67
40607 msgid "FILESYSTEM TYPE"
40611 #: ../tools/virt-make-fs.pl:69
40613 "The default filesystem type is C<ext2>. Just about any filesystem type that "
40614 "libguestfs supports can be used (but I<not> read-only formats like "
40615 "ISO9660). Here are some of the more common choices:"
40619 #: ../tools/virt-make-fs.pl:75
40624 #: ../tools/virt-make-fs.pl:77
40626 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
40627 "you are not going to use the filesystem in a way that requires the journal, "
40628 "then this is just wasted overhead."
40632 #: ../tools/virt-make-fs.pl:81
40633 msgid "I<ntfs> or I<vfat>"
40637 #: ../tools/virt-make-fs.pl:83
40638 msgid "Useful if exporting data to a Windows guest."
40642 #: ../tools/virt-make-fs.pl:85
40644 "I<Note for vfat>: The tar archive or local directory must only contain files "
40645 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
40646 "program running within libguestfs is unable to change the ownership of "
40647 "non-root files, since vfat itself does not support this."
40651 #: ../tools/virt-make-fs.pl:90
40656 #: ../tools/virt-make-fs.pl:92
40658 "Lower overhead than C<ext2>, but certain limitations on filename length and "
40659 "total filesystem size."
40663 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116 ../tools/virt-make-fs.pl:149
40668 #: ../tools/virt-make-fs.pl:99
40671 " virt-make-fs --type=minix input minixfs.img\n"
40676 #: ../tools/virt-make-fs.pl:101
40677 msgid "TO PARTITION OR NOT TO PARTITION"
40681 #: ../tools/virt-make-fs.pl:103
40682 msgid "Optionally virt-make-fs can add a partition table to the output disk."
40686 #: ../tools/virt-make-fs.pl:105
40688 "Adding a partition can make the disk image more compatible with certain "
40689 "virtualized operating systems which don't expect to see a filesystem "
40690 "directly located on a block device (Linux doesn't care and will happily "
40691 "handle both types)."
40695 #: ../tools/virt-make-fs.pl:110
40697 "On the other hand, if you have a partition table then the output image is no "
40698 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
40699 "directly on a partitioned disk image. (However libguestfs tools such as "
40700 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
40704 #: ../tools/virt-make-fs.pl:118
40705 msgid "Add an MBR partition:"
40709 #: ../tools/virt-make-fs.pl:120
40712 " virt-make-fs --partition -- input disk.img\n"
40717 #: ../tools/virt-make-fs.pl:122
40719 "If the output disk image could be terabyte-sized or larger, it's better to "
40720 "use an EFI/GPT-compatible partition table:"
40724 #: ../tools/virt-make-fs.pl:125
40727 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
40732 #: ../tools/virt-make-fs.pl:127
40733 msgid "EXTRA SPACE"
40737 #: ../tools/virt-make-fs.pl:129
40739 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
40740 "the files that it contains, but might have extra space. Depending on how "
40741 "you are going to use the output, you might think this extra space is wasted "
40742 "and want to minimize it, or you might want to leave space so that more files "
40743 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
40744 "but you can use the I<--size> flag to leave space in the filesystem if you "
40749 #: ../tools/virt-make-fs.pl:137
40751 "An alternative way to leave extra space but not make the output image any "
40752 "bigger is to use an alternative disk image format (instead of the default "
40753 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
40754 "image format (check your hypervisor supports this before using it). This "
40755 "allows you to choose a large I<--size> but the extra space won't actually be "
40756 "allocated in the image until you try to store something in it."
40760 #: ../tools/virt-make-fs.pl:145
40762 "Don't forget that you can also use local commands including L<resize2fs(8)> "
40763 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
40764 "to build another image from scratch."
40768 #: ../tools/virt-make-fs.pl:151
40771 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
40776 #: ../tools/virt-make-fs.pl:179
40777 msgid "Enable debugging information."
40781 #: ../tools/virt-make-fs.pl:185
40782 msgid "B<--size=E<lt>NE<gt>>"
40786 #: ../tools/virt-make-fs.pl:187
40787 msgid "B<--size=+E<lt>NE<gt>>"
40791 #: ../tools/virt-make-fs.pl:189
40792 msgid "B<-s E<lt>NE<gt>>"
40796 #: ../tools/virt-make-fs.pl:191
40797 msgid "B<-s +E<lt>NE<gt>>"
40801 #: ../tools/virt-make-fs.pl:193
40802 msgid "Use the I<--size> (or I<-s>) option to choose the size of the output image."
40806 #: ../tools/virt-make-fs.pl:196
40808 "If this option is I<not> given, then the output image will be just large "
40809 "enough to contain all the files, with not much wasted space."
40813 #: ../tools/virt-make-fs.pl:199
40815 "To choose a fixed size output disk, specify an absolute number followed by "
40816 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40817 "Petabytes or Exabytes. This must be large enough to contain all the input "
40818 "files, else you will get an error."
40822 #: ../tools/virt-make-fs.pl:204
40824 "To leave extra space, specify C<+> (plus sign) and a number followed by "
40825 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40826 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
40827 "the input files, and (approximately) an extra 200 MB free space."
40831 #: ../tools/virt-make-fs.pl:210
40833 "Note that virt-make-fs estimates free space, and therefore will not produce "
40834 "filesystems containing precisely the free space requested. (It is much more "
40835 "expensive and time-consuming to produce a filesystem which has precisely the "
40836 "desired free space)."
40840 #: ../tools/virt-make-fs.pl:219
40841 msgid "B<--format=E<lt>fmtE<gt>>"
40845 #: ../tools/virt-make-fs.pl:221
40846 msgid "B<-F E<lt>fmtE<gt>>"
40850 #: ../tools/virt-make-fs.pl:223
40851 msgid "Choose the output disk image format."
40855 #: ../tools/virt-make-fs.pl:225
40856 msgid "The default is C<raw> (raw sparse disk image)."
40860 #: ../tools/virt-make-fs.pl:227
40862 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
40863 "that would really make sense here is C<qcow2>."
40867 #: ../tools/virt-make-fs.pl:234
40868 msgid "B<--type=E<lt>fsE<gt>>"
40872 #: ../tools/virt-make-fs.pl:236
40873 msgid "B<-t E<lt>fsE<gt>>"
40877 #: ../tools/virt-make-fs.pl:238
40878 msgid "Choose the output filesystem type."
40882 #: ../tools/virt-make-fs.pl:240
40883 msgid "The default is C<ext2>."
40887 #: ../tools/virt-make-fs.pl:242
40888 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
40892 #: ../tools/virt-make-fs.pl:249
40893 msgid "B<--partition>"
40897 #: ../tools/virt-make-fs.pl:251
40898 msgid "B<--partition=E<lt>parttypeE<gt>>"
40902 #: ../tools/virt-make-fs.pl:253
40904 "If specified, this flag adds an MBR partition table to the output disk "
40909 #: ../tools/virt-make-fs.pl:256
40911 "You can change the partition table type, eg. I<--partition=gpt> for large "
40916 #: ../tools/virt-make-fs.pl:259
40918 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
40919 "might consider the next parameter to be the partition type. For example:"
40923 #: ../tools/virt-make-fs.pl:263
40926 " virt-make-fs --partition input.tar output.img\n"
40931 #: ../tools/virt-make-fs.pl:265
40933 "would cause virt-make-fs to think you wanted to use a partition type of "
40934 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
40935 "dash) between options and the input and output arguments:"
40939 #: ../tools/virt-make-fs.pl:269
40942 " virt-make-fs --partition -- input.tar output.img\n"
40947 #: ../tools/virt-make-fs.pl:271
40948 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
40952 #: ../tools/virt-make-fs.pl:559
40954 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
40955 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
40956 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
40960 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
40962 "When reporting bugs, please enable debugging and capture the I<complete> "
40967 #: ../tools/virt-make-fs.pl:576
40970 " export LIBGUESTFS_DEBUG=1\n"
40971 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
40976 #: ../tools/virt-make-fs.pl:579
40978 "Attach /tmp/virt-make-fs.log to a new bug report at "
40979 "L<https://bugzilla.redhat.com/>"
40983 #: ../tools/virt-tar.pl:33
40984 msgid "virt-tar - Extract or upload files to a virtual machine"
40988 #: ../tools/virt-tar.pl:37
40991 " virt-tar [--options] -x domname directory tarball\n"
40996 #: ../tools/virt-tar.pl:39
40999 " virt-tar [--options] -u domname tarball directory\n"
41004 #: ../tools/virt-tar.pl:41
41007 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
41012 #: ../tools/virt-tar.pl:43
41015 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
41020 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
41025 #: ../tools/virt-tar.pl:47
41027 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
41028 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
41032 #: ../tools/virt-tar.pl:52
41033 msgid "Download C</home> from the VM into a local tarball:"
41037 #: ../tools/virt-tar.pl:54
41040 " virt-tar -x domname /home home.tar\n"
41045 #: ../tools/virt-tar.pl:56
41048 " virt-tar -zx domname /home home.tar.gz\n"
41053 #: ../tools/virt-tar.pl:58
41054 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41058 #: ../tools/virt-tar.pl:60
41061 " virt-tar -u domname uploadstuff.tar /tmp\n"
41066 #: ../tools/virt-tar.pl:62
41069 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41074 #: ../tools/virt-tar.pl:66
41076 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41077 "virtual machines. If you do this, you risk disk corruption in the VM. "
41078 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41082 #: ../tools/virt-tar.pl:71
41084 "You can use I<-x> (extract) on live virtual machines, but you might get "
41085 "inconsistent results or errors if there is filesystem activity inside the "
41086 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41087 "work, but the only way to guarantee consistent results is if the virtual "
41088 "machine is shut down."
41092 #: ../tools/virt-tar.pl:79
41094 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41095 "parts of a guest filesystem. There are many possibilities: making backups, "
41096 "uploading data files, snooping on guest activity, fixing or customizing "
41101 #: ../tools/virt-tar.pl:84
41103 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41104 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
41105 "should look at the L<guestfish(1)> tool."
41109 #: ../tools/virt-tar.pl:88
41111 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41112 "its contents (recursively) from the virtual machine into a local tarball. "
41113 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
41114 "virtual machine. You cannot use these two options together."
41118 #: ../tools/virt-tar.pl:94
41120 "In addition, you may need to use the I<-z> (gZip) option to enable "
41121 "compression. When uploading, you have to specify I<-z> if the upload file "
41122 "is compressed because virt-tar won't detect this on its own."
41126 #: ../tools/virt-tar.pl:98
41128 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41129 "example it cannot do PKZip files or bzip2 compression. If you want that "
41130 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41131 "the L<libguestfs(3)> API)."
41135 #: ../tools/virt-tar.pl:160
41136 msgid "B<--extract>"
41140 #: ../tools/virt-tar.pl:162
41141 msgid "B<--download>"
41145 #: ../tools/virt-tar.pl:164
41150 #: ../tools/virt-tar.pl:166
41151 msgid "B<--upload>"
41155 #: ../tools/virt-tar.pl:168
41157 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41162 #: ../tools/virt-tar.pl:171
41164 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41165 "Please read the L</WARNING> section above before using this option."
41169 #: ../tools/virt-tar.pl:175
41170 msgid "You must specify exactly one of these options."
41174 #: ../tools/virt-tar.pl:181
41179 #: ../tools/virt-tar.pl:183
41184 #: ../tools/virt-tar.pl:185
41185 msgid "Specify that the input or output tarball is gzip-compressed."
41189 #: ../tools/virt-tar.pl:298
41191 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
41192 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
41193 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
41194 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41198 #: ../tools/virt-win-reg.pl:37
41200 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
41205 #: ../tools/virt-win-reg.pl:41
41208 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41213 #: ../tools/virt-win-reg.pl:43
41216 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41221 #: ../tools/virt-win-reg.pl:45
41224 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41229 #: ../tools/virt-win-reg.pl:47
41232 " virt-win-reg --merge domname [input.reg ...]\n"
41237 #: ../tools/virt-win-reg.pl:49
41240 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41245 #: ../tools/virt-win-reg.pl:53
41247 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41248 "virtual machines. If you do this, you I<will> get irreversible disk "
41249 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41250 "but doesn't catch all cases."
41254 #: ../tools/virt-win-reg.pl:58
41256 "Modifying the Windows Registry is an inherently risky operation. The format "
41257 "is deliberately obscure and undocumented, and Registry changes can leave the "
41258 "system unbootable. Therefore when using the I<--merge> option, make sure "
41259 "you have a reliable backup first."
41263 #: ../tools/virt-win-reg.pl:65
41265 "This program can export and merge Windows Registry entries from a Windows "
41270 #: ../tools/virt-win-reg.pl:68
41272 "The first parameter is the libvirt guest name or the raw disk image of a "
41277 #: ../tools/virt-win-reg.pl:71
41279 "If I<--merge> is I<not> specified, then the chosen registry key is "
41280 "displayed/exported (recursively). For example:"
41284 #: ../tools/virt-win-reg.pl:74
41287 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
41292 #: ../tools/virt-win-reg.pl:76
41293 msgid "You can also display single values from within registry keys, for example:"
41297 #: ../tools/virt-win-reg.pl:79
41300 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
41301 " $ virt-win-reg Windows7 $cvkey ProductName\n"
41302 " Windows 7 Enterprise\n"
41307 #: ../tools/virt-win-reg.pl:83
41309 "With I<--merge>, you can merge a textual regedit file into the Windows "
41314 #: ../tools/virt-win-reg.pl:86
41317 " $ virt-win-reg --merge Windows7 changes.reg\n"
41322 #: ../tools/virt-win-reg.pl:90
41324 "This program is only meant for simple access to the registry. If you want "
41325 "to do complicated things with the registry, we suggest you download the "
41326 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
41327 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
41328 "L<hivexregedit(1)>."
41332 #: ../tools/virt-win-reg.pl:159
41337 #: ../tools/virt-win-reg.pl:161
41339 "In merge mode, this merges a textual regedit file into the Windows Registry "
41340 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
41341 "displays or exports Registry entries instead."
41345 #: ../tools/virt-win-reg.pl:165
41347 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
41348 "result in disk corruption. However exporting (without this flag) is always "
41353 #: ../tools/virt-win-reg.pl:173
41354 msgid "B<--encoding> UTF-16LE|ASCII"
41358 #: ../tools/virt-win-reg.pl:175
41360 "When merging (only), you may need to specify the encoding for strings to be "
41361 "used in the hive file. This is explained in detail in "
41362 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
41366 #: ../tools/virt-win-reg.pl:179
41368 "The default is to use UTF-16LE, which should work with recent versions of "
41373 #: ../tools/virt-win-reg.pl:186
41374 msgid "B<--unsafe-printable-strings>"
41378 #: ../tools/virt-win-reg.pl:188
41380 "When exporting (only), assume strings are UTF-16LE and print them as strings "
41381 "instead of hex sequences. Remove the final zero codepoint from strings if "
41386 #: ../tools/virt-win-reg.pl:192
41388 "This is unsafe and does not preserve the fidelity of strings in the original "
41389 "Registry for various reasons:"
41393 #: ../tools/virt-win-reg.pl:199
41395 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
41396 "other encodings will be corrupted by this transformation."
41400 #: ../tools/virt-win-reg.pl:204
41402 "Assumes that everything which has type 1 or 2 is really a string and that "
41403 "everything else is not a string, but the type field in real Registries is "
41408 #: ../tools/virt-win-reg.pl:210
41410 "Loses information about whether a zero codepoint followed the string in the "
41415 #: ../tools/virt-win-reg.pl:215
41417 "This all happens because the Registry itself contains no information about "
41418 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
41422 #: ../tools/virt-win-reg.pl:219
41424 "You should only use this option for quick hacking and debugging of the "
41425 "Registry contents, and I<never> use it if the output is going to be passed "
41426 "into another program or stored in another Registry."
41430 #: ../tools/virt-win-reg.pl:556
41431 msgid "SUPPORTED SYSTEMS"
41435 #: ../tools/virt-win-reg.pl:558
41437 "The program currently supports Windows NT-derived guests starting with "
41438 "Windows XP through to at least Windows 7."
41442 #: ../tools/virt-win-reg.pl:561
41443 msgid "The following Registry keys are supported:"
41447 #: ../tools/virt-win-reg.pl:565
41448 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
41452 #: ../tools/virt-win-reg.pl:567
41453 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
41457 #: ../tools/virt-win-reg.pl:569
41458 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
41462 #: ../tools/virt-win-reg.pl:571
41463 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
41467 #: ../tools/virt-win-reg.pl:573
41468 msgid "C<HKEY_USERS\\.DEFAULT>"
41472 #: ../tools/virt-win-reg.pl:575
41473 msgid "C<HKEY_USERS\\I<SID>>"
41477 #: ../tools/virt-win-reg.pl:577
41478 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
41482 #: ../tools/virt-win-reg.pl:579
41483 msgid "C<HKEY_USERS\\I<username>>"
41487 #: ../tools/virt-win-reg.pl:581
41488 msgid "where I<username> is a local user name (this is a libguestfs extension)."
41492 #: ../tools/virt-win-reg.pl:585
41494 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
41499 #: ../tools/virt-win-reg.pl:588
41501 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
41502 "supported (there is no \"current user\")."
41506 #: ../tools/virt-win-reg.pl:591
41511 #: ../tools/virt-win-reg.pl:593
41513 "C<virt-win-reg> expects that regedit files have already been reencoded in "
41514 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
41515 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
41516 "with Windows-style line endings, you may need to reencode the whole file "
41517 "before or after processing."
41521 #: ../tools/virt-win-reg.pl:599
41523 "To reencode a file from Windows format to Linux (before processing it with "
41524 "the I<--merge> option), you would do something like this:"
41528 #: ../tools/virt-win-reg.pl:602
41531 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
41536 #: ../tools/virt-win-reg.pl:604
41538 "To go in the opposite direction, after exporting and before sending the file "
41539 "to a Windows user, do something like this:"
41543 #: ../tools/virt-win-reg.pl:607
41546 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
41551 #: ../tools/virt-win-reg.pl:609
41552 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
41556 #: ../tools/virt-win-reg.pl:611
41558 "If you are unsure about the current encoding, use the L<file(1)> command. "
41559 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
41560 "Windows-style (CRLF) line endings, like this:"
41564 #: ../tools/virt-win-reg.pl:615
41567 " $ file software.reg\n"
41568 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
41569 " with CRLF line terminators\n"
41574 #: ../tools/virt-win-reg.pl:619
41575 msgid "This file would need conversion before you could I<--merge> it."
41579 #: ../tools/virt-win-reg.pl:621
41580 msgid "CurrentControlSet etc."
41584 #: ../tools/virt-win-reg.pl:623
41586 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
41587 "Registry at the level of the hive file, and therefore you cannot modify "
41592 #: ../tools/virt-win-reg.pl:627
41594 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
41595 "circumstances it might refer to another control set. The way to find out is "
41596 "to look at the C<HKLM\\SYSTEM\\Select> key:"
41600 #: ../tools/virt-win-reg.pl:631
41603 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
41604 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
41605 " \"Current\"=dword:00000001\n"
41606 " \"Default\"=dword:00000001\n"
41607 " \"Failed\"=dword:00000000\n"
41608 " \"LastKnownGood\"=dword:00000002\n"
41613 #: ../tools/virt-win-reg.pl:638
41614 msgid "\"Current\" is the one which Windows will choose when it boots."
41618 #: ../tools/virt-win-reg.pl:640
41619 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
41623 #: ../tools/virt-win-reg.pl:643
41624 msgid "DELETING REGISTRY KEYS AND VALUES"
41628 #: ../tools/virt-win-reg.pl:645
41629 msgid "To delete a whole registry key, use the syntax:"
41633 #: ../tools/virt-win-reg.pl:647
41636 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
41641 #: ../tools/virt-win-reg.pl:649
41642 msgid "To delete a single value within a key, use the syntax:"
41646 #: ../tools/virt-win-reg.pl:651
41649 " [HKEY_LOCAL_MACHINE\\Foo]\n"
41655 #: ../tools/virt-win-reg.pl:654
41656 msgid "WINDOWS TIPS"
41660 #: ../tools/virt-win-reg.pl:656
41662 "Note that some of these tips modify the guest disk image. The guest I<must> "
41663 "be shut off, else you will get disk corruption."
41667 #: ../tools/virt-win-reg.pl:659
41668 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
41672 #: ../tools/virt-win-reg.pl:661
41674 "Prepare a DOS batch script, VBScript or executable. Upload this using "
41675 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
41676 "is uploaded into C<C:\\>:"
41680 #: ../tools/virt-win-reg.pl:665
41683 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
41688 #: ../tools/virt-win-reg.pl:667
41689 msgid "Prepare a regedit file containing the registry change:"
41693 #: ../tools/virt-win-reg.pl:669
41696 " cat > test.reg <<'EOF'\n"
41697 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
41698 " \"Test\"=\"c:\\\\test.bat\"\n"
41704 #: ../tools/virt-win-reg.pl:674
41706 "In this example we use the key C<RunOnce> which means that the script will "
41707 "run precisely once when the first user logs in. If you want it to run every "
41708 "time a user logs in, replace C<RunOnce> with C<Run>."
41712 #: ../tools/virt-win-reg.pl:678
41713 msgid "Now update the registry:"
41717 #: ../tools/virt-win-reg.pl:680
41720 " virt-win-reg --merge WindowsGuest test.reg\n"
41725 #: ../tools/virt-win-reg.pl:682
41726 msgid "INSTALLING A SERVICE"
41730 #: ../tools/virt-win-reg.pl:684
41732 "This section assumes you are familiar with Windows services, and you either "
41733 "have a program which handles the Windows Service Control Protocol directly "
41734 "or you want to run any program using a service wrapper like SrvAny or the "
41739 #: ../tools/virt-win-reg.pl:689
41741 "First upload the program and optionally the service wrapper. In this case "
41742 "the test program is called C<test.exe> and we are using the RHSrvAny "
41747 #: ../tools/virt-win-reg.pl:693
41750 " guestfish -i -d WindowsGuest <<EOF\n"
41751 " upload rhsrvany.exe /rhsrvany.exe\n"
41752 " upload test.exe /test.exe\n"
41758 #: ../tools/virt-win-reg.pl:698
41760 "Prepare a regedit file containing the registry changes. In this example, "
41761 "the first registry change is needed for the service itself or the service "
41762 "wrapper (if used). The second registry change is only needed because I am "
41763 "using the RHSrvAny service wrapper."
41767 #: ../tools/virt-win-reg.pl:703
41770 " cat > service.reg <<'EOF'\n"
41771 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
41772 " \"Type\"=dword:00000010\n"
41773 " \"Start\"=dword:00000002\n"
41774 " \"ErrorControl\"=dword:00000001\n"
41775 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
41776 " \"DisplayName\"=\"RHSrvAny\"\n"
41777 " \"ObjectName\"=\"NetworkService\"\n"
41782 #: ../tools/virt-win-reg.pl:712
41785 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
41786 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
41787 " \"PWD\"=\"c:\\\\Temp\"\n"
41793 #: ../tools/virt-win-reg.pl:723
41795 "For use of C<ControlSet001> see the section above in this manual page. You "
41796 "may need to adjust this according to the control set that is in use by the "
41801 #: ../tools/virt-win-reg.pl:729
41803 "C<\"ObjectName\"> controls the privileges that the service will have. An "
41804 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
41805 "privileged account."
41809 #: ../tools/virt-win-reg.pl:735
41811 "For the meaning of the magic numbers, see this Microsoft KB article: "
41812 "L<http://support.microsoft.com/kb/103000>."
41816 #: ../tools/virt-win-reg.pl:740
41817 msgid "Update the registry:"
41821 #: ../tools/virt-win-reg.pl:742
41824 " virt-win-reg --merge WindowsGuest service.reg\n"
41829 #: ../tools/virt-win-reg.pl:746
41831 "Be careful when passing parameters containing C<\\> (backslash) in the "
41832 "shell. Usually you will have to use 'single quotes' or double backslashes "
41833 "(but not both) to protect them from the shell."
41837 #: ../tools/virt-win-reg.pl:750
41838 msgid "Paths and value names are case-insensitive."
41842 #: ../tools/virt-win-reg.pl:759
41844 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
41845 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
41846 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
41847 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41851 #: ../tools/virt-win-reg.pl:777
41854 " export LIBGUESTFS_DEBUG=1\n"
41855 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
41860 #: ../tools/virt-win-reg.pl:780
41862 "Attach /tmp/virt-win-reg.log to a new bug report at "
41863 "L<https://bugzilla.redhat.com/>"