1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.15.11\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-12-09 17:33+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
21 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3 ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3 ../clone/virt-sysprep.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3 ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3 ../examples/guestfs-recipes.pod:14 ../examples/guestfs-testing.pod:3 ../fish/guestfish.pod:3 ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3 ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3 ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3 ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3 ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3 ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3 ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30 ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31 ../tools/virt-win-reg.pl:35
26 #: ../align/virt-alignment-scan.pod:5
27 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
31 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7 ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7 ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7 ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7 ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7 ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7 ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7 ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7 ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7 ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7 ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34 ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35 ../tools/virt-win-reg.pl:39
36 #: ../align/virt-alignment-scan.pod:9
39 " virt-alignment-scan [--options] -d domname\n"
44 #: ../align/virt-alignment-scan.pod:11
47 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
52 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19 ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27 ../erlang/examples/guestfs-erlang.pod:16 ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18 ../examples/guestfs-testing.pod:7 ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18 ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:31 ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15 ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77 ../tools/virt-win-reg.pl:63
57 #: ../align/virt-alignment-scan.pod:15
59 "When older operating systems install themselves, the partitioning tools "
60 "place partitions at a sector misaligned with the underlying storage "
61 "(commonly the first partition starts on sector C<63>). Misaligned "
62 "partitions can result in an operating system issuing more I/O than should be "
67 #: ../align/virt-alignment-scan.pod:21
69 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
70 "machines and disk images and warns you if there are alignment problems."
74 #: ../align/virt-alignment-scan.pod:25
76 "Currently there is no virt tool for fixing alignment problems. You can only "
77 "reinstall the guest operating system. The following NetApp document "
78 "summarises the problem and possible solutions: "
79 "L<http://media.netapp.com/documents/tr-3747.pdf>"
83 #: ../align/virt-alignment-scan.pod:30
88 #: ../align/virt-alignment-scan.pod:32
89 msgid "To run this tool on a disk image directly, use the I<-a> option:"
93 #: ../align/virt-alignment-scan.pod:34
96 " $ virt-alignment-scan -a winxp.img\n"
97 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
102 #: ../align/virt-alignment-scan.pod:37
105 " $ virt-alignment-scan -a fedora16.img\n"
106 " /dev/sda1 1048576 1024K ok\n"
107 " /dev/sda2 2097152 2048K ok\n"
108 " /dev/sda3 526385152 2048K ok\n"
113 #: ../align/virt-alignment-scan.pod:42
115 "To run the tool on a guest known to libvirt, use the I<-d> option and "
116 "possibly the I<-c> option:"
120 #: ../align/virt-alignment-scan.pod:45
123 " # virt-alignment-scan -d RHEL5\n"
124 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
125 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
130 #: ../align/virt-alignment-scan.pod:49
133 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
134 " /dev/sda1 1048576 1024K ok\n"
135 " /dev/sda2 105906176 1024K ok\n"
136 " /dev/sdb1 65536 64K ok\n"
141 #: ../align/virt-alignment-scan.pod:54
143 "The output consists of 4 or more whitespace-separated columns. Only the "
144 "first 4 columns are signficant if you want to parse this from a program. "
149 #: ../align/virt-alignment-scan.pod:60
154 #: ../align/virt-alignment-scan.pod:62
156 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
157 "on the first block device)"
161 #: ../align/virt-alignment-scan.pod:65
166 #: ../align/virt-alignment-scan.pod:67
167 msgid "the start of the partition in bytes"
171 #: ../align/virt-alignment-scan.pod:69
176 #: ../align/virt-alignment-scan.pod:71
177 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
181 #: ../align/virt-alignment-scan.pod:73
186 #: ../align/virt-alignment-scan.pod:75
188 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
189 "can cause performance problems"
193 #: ../align/virt-alignment-scan.pod:78
198 #: ../align/virt-alignment-scan.pod:80
199 msgid "optional free-text explanation."
203 #: ../align/virt-alignment-scan.pod:84
205 "The exit code from the program changes depending on whether poorly aligned "
206 "partitions were found. See L</EXIT STATUS> below."
210 #: ../align/virt-alignment-scan.pod:87
211 msgid "If you just want the exit code with no output, use the I<-q> option."
215 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261 ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62 ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45 ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42 ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92 ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:112 ../resize/virt-resize.pod:262 ../sparsify/virt-sparsify.pod:99 ../test-tool/libguestfs-test-tool.pod:36 ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54 ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103 ../tools/virt-win-reg.pl:96
220 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265 ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66 ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160 ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:116 ../resize/virt-resize.pod:266 ../sparsify/virt-sparsify.pod:103 ../test-tool/libguestfs-test-tool.pod:40 ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62 ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111 ../tools/virt-win-reg.pl:104
225 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267 ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68 ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:118 ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64 ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113 ../tools/virt-win-reg.pl:106
226 msgid "Display brief help."
230 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269 ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70 ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:120
235 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271 ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72 ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:122
236 msgid "B<--add> file"
240 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
241 msgid "Add I<file> which should be a disk image from a virtual machine."
245 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277 ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78 ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102 ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:128
247 "The format of the disk image is auto-detected. To override this and force a "
248 "particular format use the I<--format=..> option."
252 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291 ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:135
257 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293 ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:137
258 msgid "B<--connect> URI"
262 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295 ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99 ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:139 ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82 ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
264 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
265 "to the default libvirt hypervisor."
269 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298 ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:142
271 "If you specify guest block devices directly (I<-a>), then libvirt is not "
276 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307 ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105 ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:145
281 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309 ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107 ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:147
282 msgid "B<--domain> guest"
286 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311 ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109 ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:149
288 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
293 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328 ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101 ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142 ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:152
294 msgid "B<--format=raw|qcow2|..>"
298 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330 ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235 ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:154
303 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332 ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237 ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:156
305 "The default for the I<-a> option is to auto-detect the format of the disk "
306 "image. Using this forces the disk format for I<-a> options which follow on "
307 "the command line. Using I<--format> with no argument switches back to "
308 "auto-detection for subsequent I<-a> options."
312 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337 ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242 ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351 ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2877
317 #: ../align/virt-alignment-scan.pod:134
320 " virt-alignment-scan --format=raw -a disk.img\n"
325 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341 ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:165
326 msgid "forces raw format (no auto-detection) for C<disk.img>."
330 #: ../align/virt-alignment-scan.pod:138
333 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
338 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345 ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:169
340 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
341 "auto-detection for C<another.img>."
345 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348 ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:172
347 "If you have untrusted raw-format guest disk images, you should use this "
348 "option to specify the disk format. This avoids a possible security problem "
349 "with malicious guests (CVE-2010-3851)."
353 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:497 ../sparsify/virt-sparsify.pod:177
358 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:499 ../sparsify/virt-sparsify.pod:179
363 #: ../align/virt-alignment-scan.pod:151
365 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
370 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425 ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173 ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390 ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:219 ../sparsify/virt-sparsify.pod:183
375 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427 ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175 ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392 ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:221 ../sparsify/virt-sparsify.pod:185
380 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429 ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177 ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:223 ../sparsify/virt-sparsify.pod:187
381 msgid "Enable verbose messages for debugging."
385 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431 ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179 ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397 ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:225 ../resize/virt-resize.pod:567 ../sparsify/virt-sparsify.pod:189
390 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433 ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181 ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399 ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:227 ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:191 ../tools/virt-list-filesystems.pl:69 ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169 ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
395 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435 ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183 ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:229 ../resize/virt-resize.pod:571 ../sparsify/virt-sparsify.pod:193 ../tools/virt-list-filesystems.pl:71 ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171 ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
396 msgid "Display version number and exit."
400 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437 ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185 ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412 ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:240 ../sparsify/virt-sparsify.pod:195 ../tools/virt-tar.pl:158
405 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439 ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187 ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:242 ../sparsify/virt-sparsify.pod:197
406 msgid "Enable tracing of libguestfs API calls."
410 #: ../align/virt-alignment-scan.pod:172
411 msgid "RECOMMENDED ALIGNMENT"
415 #: ../align/virt-alignment-scan.pod:174
417 "Operating systems older than Windows 2008 and Linux before ca.2010 place the "
418 "first sector of the first partition at sector 63, with a 512 byte sector "
419 "size. This happens because of a historical accident. Drives have to report "
420 "a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
421 "completely meaningless on modern drives, but it happens that the geometry "
422 "reported always has 63 sectors per track. The operating system therefore "
423 "places the first partition at the start of the second \"track\", at sector "
428 #: ../align/virt-alignment-scan.pod:183
430 "When the guest OS is virtualized, the host operating system and hypervisor "
431 "may prefer accesses aligned to one of:"
435 #: ../align/virt-alignment-scan.pod:188
440 #: ../align/virt-alignment-scan.pod:190
442 "if the host OS uses local storage directly on hard drive partitions, and the "
443 "hard drive has 512 byte physical sectors."
447 #: ../align/virt-alignment-scan.pod:193
452 #: ../align/virt-alignment-scan.pod:195
454 "for local storage on new hard drives with 4Kbyte physical sectors; for "
455 "file-backed storage on filesystems with 4Kbyte block size; or for some types "
456 "of network-attached storage."
460 #: ../align/virt-alignment-scan.pod:199
465 #: ../align/virt-alignment-scan.pod:201
467 "for high-end network-attached storage. This is the optimal block size for "
468 "some NetApp hardware."
472 #: ../align/virt-alignment-scan.pod:204
477 #: ../align/virt-alignment-scan.pod:206
478 msgid "see L</1 MB PARTITION ALIGNMENT> below."
482 #: ../align/virt-alignment-scan.pod:210
484 "Partitions which are not aligned correctly to the underlying storage cause "
485 "extra I/O. For example:"
489 #: ../align/virt-alignment-scan.pod:213
493 " +--------------------------+------\n"
495 " | filesystem block |\n"
496 " ---+------------------+------+-------------------+-----+---\n"
497 " | host block | host block |\n"
499 " ---+-------------------------+-------------------------+---\n"
504 #: ../align/virt-alignment-scan.pod:222
506 "In this example, each time a 4K guest block is read, two blocks on the host "
507 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
508 "written, two host blocks must first be read, the old and new data combined, "
509 "and the two blocks written back (4x I/O)."
513 #: ../align/virt-alignment-scan.pod:227
514 msgid "LINUX HOST BLOCK AND I/O SIZE"
518 #: ../align/virt-alignment-scan.pod:229
520 "New versions of the Linux kernel expose the physical and logical block size, "
521 "and minimum and recommended I/O size."
525 #: ../align/virt-alignment-scan.pod:232
526 msgid "For a typical consumer hard drive with 512 byte sectors:"
530 #: ../align/virt-alignment-scan.pod:234
533 " $ cat /sys/block/sda/queue/hw_sector_size\n"
535 " $ cat /sys/block/sda/queue/physical_block_size\n"
537 " $ cat /sys/block/sda/queue/logical_block_size\n"
539 " $ cat /sys/block/sda/queue/minimum_io_size\n"
541 " $ cat /sys/block/sda/queue/optimal_io_size\n"
547 #: ../align/virt-alignment-scan.pod:245
548 msgid "For a new consumer hard drive with 4Kbyte sectors:"
552 #: ../align/virt-alignment-scan.pod:247
555 " $ cat /sys/block/sda/queue/hw_sector_size\n"
557 " $ cat /sys/block/sda/queue/physical_block_size\n"
559 " $ cat /sys/block/sda/queue/logical_block_size\n"
561 " $ cat /sys/block/sda/queue/minimum_io_size\n"
563 " $ cat /sys/block/sda/queue/optimal_io_size\n"
569 #: ../align/virt-alignment-scan.pod:258
570 msgid "For a NetApp LUN:"
574 #: ../align/virt-alignment-scan.pod:260
577 " $ cat /sys/block/sdc/queue/logical_block_size\n"
579 " $ cat /sys/block/sdc/queue/physical_block_size\n"
581 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
583 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
589 #: ../align/virt-alignment-scan.pod:269
591 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
592 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
596 #: ../align/virt-alignment-scan.pod:273
598 "For detailed information about what these numbers mean, see "
599 "L<http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newstorage-iolimits.html>"
603 #: ../align/virt-alignment-scan.pod:276
605 "[Thanks to Matt Booth for providing 4K drive data. Thanks to Mike Snitzer "
606 "for providing NetApp data and additional information.]"
610 #: ../align/virt-alignment-scan.pod:279
611 msgid "1 MB PARTITION ALIGNMENT"
615 #: ../align/virt-alignment-scan.pod:281
617 "Microsoft picked 1 MB as the default alignment for all partitions starting "
618 "with Windows 2008 Server, and Linux has followed this."
622 #: ../align/virt-alignment-scan.pod:284
624 "Assuming 512 byte sectors in the guest, you will now see the first partition "
625 "starting at sector 2048, and subsequent partitions (if any) will start at a "
626 "multiple of 2048 sectors."
630 #: ../align/virt-alignment-scan.pod:288
632 "1 MB alignment is compatible with all current alignment requirements (4K, "
633 "64K) and provides room for future growth in physical block sizes."
637 #: ../align/virt-alignment-scan.pod:291
638 msgid "SETTING ALIGNMENT"
642 #: ../align/virt-alignment-scan.pod:293
644 "L<virt-resize(1)> can change the alignment of the partitions of some "
645 "guests. Currently it can fully align all the partitions of all Windows "
646 "guests, and it will fix the bootloader where necessary. For Linux guests, "
647 "it can align the second and subsequent partitions, so the majority of OS "
648 "accesses except at boot will be aligned."
652 #: ../align/virt-alignment-scan.pod:299
654 "Another way to correct partition alignment problems is to reinstall your "
655 "guest operating systems. If you install operating systems from templates, "
656 "ensure these have correct partition alignment too."
660 #: ../align/virt-alignment-scan.pod:303
662 "For older versions of Windows, the following NetApp document contains useful "
663 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
667 #: ../align/virt-alignment-scan.pod:306
669 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
670 "an explicit C<%pre> section that creates aligned partitions using "
671 "L<parted(8)>. Do not use the Kickstart C<part> command. The NetApp "
672 "document above contains an example."
676 #: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231 ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483 ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:241 ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367 ../rescue/virt-rescue.pod:303 ../resize/virt-resize.pod:682 ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:744
677 msgid "SHELL QUOTING"
681 #: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233 ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485 ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:243 ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:369 ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:684 ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:752
683 "Libvirt guest names can contain arbitrary characters, some of which have "
684 "meaning to the shell such as C<#> and space. You may need to quote or "
685 "escape these characters on the command line. See the shell manual page "
686 "L<sh(1)> for details."
690 #: ../align/virt-alignment-scan.pod:318 ../cat/virt-cat.pod:238 ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490 ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:248 ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114 ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:390 ../resize/virt-resize.pod:689 ../sparsify/virt-sparsify.pod:251 ../test-tool/libguestfs-test-tool.pod:90
695 #: ../align/virt-alignment-scan.pod:320
696 msgid "This program returns:"
700 #: ../align/virt-alignment-scan.pod:324 ../align/virt-alignment-scan.pod:330 ../align/virt-alignment-scan.pod:336 ../align/virt-alignment-scan.pod:343 ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187 ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202 ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287 ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295 ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314 ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322 ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362 ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388 ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266 ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276 ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291 ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102 ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132 ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227 ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235 ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243 ../examples/guestfs-testing.pod:110 ../examples/guestfs-testing.pod:114 ../examples/guestfs-testing.pod:118 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:441 ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:456 ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:1293 ../fish/guestfish-actions.pod:1297 ../fish/guestfish-actions.pod:1301 ../fish/guestfish-actions.pod:1305 ../fish/guestfish-actions.pod:1313 ../fish/guestfish-actions.pod:1317 ../fish/guestfish-actions.pod:1321 ../fish/guestfish-actions.pod:1331 ../fish/guestfish-actions.pod:1335 ../fish/guestfish-actions.pod:1339 ../fish/guestfish-actions.pod:1429 ../fish/guestfish-actions.pod:1433 ../fish/guestfish-actions.pod:1438 ../fish/guestfish-actions.pod:1443 ../fish/guestfish-actions.pod:1485 ../fish/guestfish-actions.pod:1489 ../fish/guestfish-actions.pod:1494 ../fish/guestfish-actions.pod:1750 ../fish/guestfish-actions.pod:1757 ../fish/guestfish-actions.pod:1764 ../fish/guestfish-actions.pod:2167 ../fish/guestfish-actions.pod:2173 ../fish/guestfish-actions.pod:2181 ../fish/guestfish-actions.pod:2188 ../fish/guestfish-actions.pod:2195 ../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:2118 ../src/guestfs-actions.pod:2122 ../src/guestfs-actions.pod:2126 ../src/guestfs-actions.pod:2130 ../src/guestfs-actions.pod:2138 ../src/guestfs-actions.pod:2142 ../src/guestfs-actions.pod:2146 ../src/guestfs-actions.pod:2156 ../src/guestfs-actions.pod:2160 ../src/guestfs-actions.pod:2164 ../src/guestfs-actions.pod:2302 ../src/guestfs-actions.pod:2306 ../src/guestfs-actions.pod:2311 ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2377 ../src/guestfs-actions.pod:2381 ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:2801 ../src/guestfs-actions.pod:2808 ../src/guestfs-actions.pod:2815 ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:3366 ../src/guestfs-actions.pod:3374 ../src/guestfs-actions.pod:3381 ../src/guestfs-actions.pod:3388 ../src/guestfs.pod:403 ../src/guestfs.pod:408 ../src/guestfs.pod:413 ../src/guestfs.pod:417 ../src/guestfs.pod:422 ../src/guestfs.pod:426 ../src/guestfs.pod:431 ../src/guestfs.pod:436 ../src/guestfs.pod:1109 ../src/guestfs.pod:1113 ../src/guestfs.pod:1117 ../src/guestfs.pod:1122 ../src/guestfs.pod:1130 ../src/guestfs.pod:1149 ../src/guestfs.pod:1157 ../src/guestfs.pod:1179 ../src/guestfs.pod:1183 ../src/guestfs.pod:1187 ../src/guestfs.pod:1191 ../src/guestfs.pod:1195 ../src/guestfs.pod:1199 ../src/guestfs.pod:1689 ../src/guestfs.pod:1694 ../src/guestfs.pod:1698 ../src/guestfs.pod:1800 ../src/guestfs.pod:1805 ../src/guestfs.pod:1809 ../src/guestfs.pod:1819 ../src/guestfs.pod:2108 ../src/guestfs.pod:2113 ../src/guestfs.pod:2119 ../src/guestfs.pod:2127 ../src/guestfs.pod:2645 ../src/guestfs.pod:2651 ../src/guestfs.pod:2656 ../src/guestfs.pod:2662 ../src/guestfs.pod:3067 ../src/guestfs.pod:3072 ../src/guestfs.pod:3076 ../src/guestfs.pod:3080 ../src/guestfs.pod:3084 ../src/guestfs.pod:3098 ../src/guestfs.pod:3103 ../src/guestfs.pod:3335 ../src/guestfs.pod:3339 ../src/guestfs.pod:3343 ../src/guestfs.pod:3347 ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:721 ../tools/virt-win-reg.pl:727 ../tools/virt-win-reg.pl:733
705 #: ../align/virt-alignment-scan.pod:326
710 #: ../align/virt-alignment-scan.pod:328
711 msgid "successful exit, all partitions are aligned E<ge> 64K for best performance"
715 #: ../align/virt-alignment-scan.pod:332
720 #: ../align/virt-alignment-scan.pod:334
721 msgid "an error scanning the disk image or guest"
725 #: ../align/virt-alignment-scan.pod:338
730 #: ../align/virt-alignment-scan.pod:340
732 "successful exit, some partitions have alignment E<lt> 64K which can result "
733 "in poor performance on high end network storage"
737 #: ../align/virt-alignment-scan.pod:345
742 #: ../align/virt-alignment-scan.pod:347
744 "successful exit, some partitions have alignment E<lt> 4K which can result in "
745 "poor performance on most hypervisors"
749 #: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243 ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495 ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:253 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../examples/guestfs-testing.pod:291 ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317 ../inspector/virt-inspector.pod:395 ../java/examples/guestfs-java.pod:45 ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39 ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:325 ../resize/virt-resize.pod:694 ../ruby/examples/guestfs-ruby.pod:36 ../sparsify/virt-sparsify.pod:275 ../src/guestfs.pod:3275 ../test-tool/libguestfs-test-tool.pod:100 ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265 ../tools/virt-make-fs.pl:557 ../tools/virt-tar.pl:296 ../tools/virt-win-reg.pl:757
754 #: ../align/virt-alignment-scan.pod:354
756 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
757 "L<virt-resize(1)>, L<http://libguestfs.org/>."
761 #: ../align/virt-alignment-scan.pod:361 ../cat/virt-cat.pod:252 ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:507 ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:261 ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:334 ../resize/virt-resize.pod:717 ../sparsify/virt-sparsify.pod:288 ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277 ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:311 ../tools/virt-win-reg.pl:783
766 #: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254 ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509 ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:263 ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410 ../rescue/virt-rescue.pod:336 ../resize/virt-resize.pod:719 ../sparsify/virt-sparsify.pod:290 ../tools/virt-list-filesystems.pl:210 ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584 ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
767 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
771 #: ../align/virt-alignment-scan.pod:365 ../cat/virt-cat.pod:256 ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511 ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:265 ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114 ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401 ../examples/guestfs-testing.pod:302 ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64 ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62 ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332 ../inspector/virt-inspector.pod:418 ../java/examples/guestfs-java.pod:62 ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56 ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:338 ../resize/virt-resize.pod:721 ../ruby/examples/guestfs-ruby.pod:52 ../sparsify/virt-sparsify.pod:292 ../src/guestfs.pod:3358 ../test-tool/libguestfs-test-tool.pod:110 ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281 ../tools/virt-make-fs.pl:586 ../tools/virt-tar.pl:315 ../tools/virt-win-reg.pl:787
776 #: ../align/virt-alignment-scan.pod:367 ../clone/virt-sysprep.pod:507 ../sparsify/virt-sparsify.pod:294
777 msgid "Copyright (C) 2011 Red Hat Inc."
781 #: ../align/virt-alignment-scan.pod:369 ../cat/virt-cat.pod:260 ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515 ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:269 ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305 ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58 ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60 ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:422 ../rescue/virt-rescue.pod:342 ../resize/virt-resize.pod:725 ../sparsify/virt-sparsify.pod:296 ../test-tool/libguestfs-test-tool.pod:115 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285 ../tools/virt-make-fs.pl:590 ../tools/virt-tar.pl:319 ../tools/virt-win-reg.pl:791
783 "This program is free software; you can redistribute it and/or modify it "
784 "under the terms of the GNU General Public License as published by the Free "
785 "Software Foundation; either version 2 of the License, or (at your option) "
790 #: ../align/virt-alignment-scan.pod:374 ../cat/virt-cat.pod:265 ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520 ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:274 ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310 ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63 ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65 ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:427 ../rescue/virt-rescue.pod:347 ../resize/virt-resize.pod:730 ../sparsify/virt-sparsify.pod:301 ../test-tool/libguestfs-test-tool.pod:120 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290 ../tools/virt-make-fs.pl:595 ../tools/virt-tar.pl:324 ../tools/virt-win-reg.pl:796
792 "This program is distributed in the hope that it will be useful, but WITHOUT "
793 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
794 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
799 #: ../align/virt-alignment-scan.pod:379 ../cat/virt-cat.pod:270 ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525 ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:279 ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315 ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68 ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70 ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:432 ../rescue/virt-rescue.pod:352 ../resize/virt-resize.pod:735 ../sparsify/virt-sparsify.pod:306 ../test-tool/libguestfs-test-tool.pod:125 ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295 ../tools/virt-make-fs.pl:600 ../tools/virt-tar.pl:329 ../tools/virt-win-reg.pl:801
801 "You should have received a copy of the GNU General Public License along with "
802 "this program; if not, write to the Free Software Foundation, Inc., 51 "
803 "Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
807 #: ../cat/virt-cat.pod:5
808 msgid "virt-cat - Display files in a virtual machine"
812 #: ../cat/virt-cat.pod:9
815 " virt-cat [--options] -d domname file [file ...]\n"
820 #: ../cat/virt-cat.pod:11
823 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
828 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15 ../inspector/virt-inspector.pod:13
833 #: ../cat/virt-cat.pod:15
836 " virt-cat domname file\n"
841 #: ../cat/virt-cat.pod:17
844 " virt-cat disk.img file\n"
849 #: ../cat/virt-cat.pod:21
851 "C<virt-cat> is a command line tool to display the contents of C<file> where "
852 "C<file> exists in the named virtual machine (or disk image)."
856 #: ../cat/virt-cat.pod:24
858 "Multiple filenames can be given, in which case they are concatenated "
859 "together. Each filename must be a full path, starting at the root directory "
860 "(starting with '/')."
864 #: ../cat/virt-cat.pod:28
866 "C<virt-cat> can be used to quickly view a file. To edit a file, use "
867 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
868 "tool (see L</USING GUESTFISH> below)."
872 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43 ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41 ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29 ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30 ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39 ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75 ../tools/virt-tar.pl:50
877 #: ../cat/virt-cat.pod:34
878 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
882 #: ../cat/virt-cat.pod:37
885 " virt-cat -d mydomain /etc/fstab\n"
890 #: ../cat/virt-cat.pod:39
891 msgid "List syslog messages from a VM disk image file:"
895 #: ../cat/virt-cat.pod:41
898 " virt-cat -a disk.img /var/log/messages | tail\n"
903 #: ../cat/virt-cat.pod:43
904 msgid "Find out what DHCP IP address a VM acquired:"
908 #: ../cat/virt-cat.pod:45
911 " virt-cat -d mydomain /var/log/messages | \\\n"
912 " grep 'dhclient: bound to' | tail\n"
917 #: ../cat/virt-cat.pod:48
918 msgid "Find out what packages were recently installed:"
922 #: ../cat/virt-cat.pod:50
925 " virt-cat -d mydomain /var/log/yum.log | tail\n"
930 #: ../cat/virt-cat.pod:52
931 msgid "Find out who is logged on inside a virtual machine:"
935 #: ../cat/virt-cat.pod:54
938 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
944 #: ../cat/virt-cat.pod:57
945 msgid "or who was logged on:"
949 #: ../cat/virt-cat.pod:59
952 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
953 " last -f /tmp/wtmp\n"
958 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103 ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74 ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:124
960 "Add I<file> which should be a disk image from a virtual machine. If the "
961 "virtual machine has multiple block devices, you must supply all of them with "
962 "separate I<-a> options."
966 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148 ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217 ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
967 msgid "B<--echo-keys>"
971 #: ../cat/virt-cat.pod:100
973 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
974 "so you cannot see what you are typing. If you are not worried about Tempest "
975 "attacks and there is no one else in the room you can specify this flag to "
976 "see what you are typing."
980 #: ../cat/virt-cat.pod:116
983 " virt-cat --format=raw -a disk.img file\n"
988 #: ../cat/virt-cat.pod:120
991 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
996 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200 ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289 ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
997 msgid "B<--keys-from-stdin>"
1001 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202 ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291 ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1003 "Read key or passphrase parameters from stdin. The default is to try to read "
1004 "passphrases from the user by opening C</dev/tty>."
1008 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179 ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:246
1009 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1013 #: ../cat/virt-cat.pod:154
1014 msgid "Previous versions of virt-cat allowed you to write either:"
1018 #: ../cat/virt-cat.pod:156
1021 " virt-cat disk.img [disk.img ...] file\n"
1026 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185 ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:252
1031 #: ../cat/virt-cat.pod:160
1034 " virt-cat guestname file\n"
1039 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189 ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:256
1041 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1042 "the confusing case where a disk image might have the same name as a guest."
1046 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193 ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:260
1047 msgid "For compatibility the old style is still supported."
1051 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
1052 msgid "WINDOWS PATHS"
1056 #: ../cat/virt-cat.pod:170
1058 "C<virt-cat> has a limited ability to understand Windows drive letters and "
1059 "paths (eg. C<E:\\foo\\bar.txt>)."
1063 #: ../cat/virt-cat.pod:173 ../edit/virt-edit.pod:262
1064 msgid "If and only if the guest is running Windows then:"
1068 #: ../cat/virt-cat.pod:179 ../edit/virt-edit.pod:268
1070 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
1071 "to the correct filesystem."
1075 #: ../cat/virt-cat.pod:184 ../edit/virt-edit.pod:273
1077 "Any backslash (C<\\>) characters in the path are replaced with forward "
1078 "slashes so that libguestfs can process it."
1082 #: ../cat/virt-cat.pod:189
1084 "The path is resolved case insensitively to locate the file that should be "
1089 #: ../cat/virt-cat.pod:194 ../edit/virt-edit.pod:283
1090 msgid "There are some known shortcomings:"
1094 #: ../cat/virt-cat.pod:200 ../edit/virt-edit.pod:289
1095 msgid "Some NTFS symbolic links may not be followed correctly."
1099 #: ../cat/virt-cat.pod:204 ../edit/virt-edit.pod:293
1100 msgid "NTFS junction points that cross filesystems are not followed."
1104 #: ../cat/virt-cat.pod:208 ../edit/virt-edit.pod:297
1105 msgid "USING GUESTFISH"
1109 #: ../cat/virt-cat.pod:210
1111 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1112 "C<virt-cat> doesn't work."
1116 #: ../cat/virt-cat.pod:213
1117 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1121 #: ../cat/virt-cat.pod:215
1124 " guestfish --ro -i -d domname download file -\n"
1129 #: ../cat/virt-cat.pod:217
1131 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1132 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1136 #: ../cat/virt-cat.pod:221
1138 "The command above uses libguestfs's guest inspection feature and so does not "
1139 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1140 "disk images that don't contain guests. To display a file from a disk image "
1145 #: ../cat/virt-cat.pod:226
1148 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1153 #: ../cat/virt-cat.pod:228
1155 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1156 "the disk image, and C<file> is the full path to the file."
1160 #: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382 ../cat/virt-ls.pod:492 ../df/virt-df.pod:250 ../edit/virt-edit.pod:351 ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392 ../resize/virt-resize.pod:691 ../sparsify/virt-sparsify.pod:253
1161 msgid "This program returns 0 if successful, or non-zero if there was an error."
1165 #: ../cat/virt-cat.pod:245
1167 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
1168 "L<virt-tar-out(1)>, L<http://libguestfs.org/>."
1172 #: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:420 ../resize/virt-resize.pod:723 ../tools/virt-make-fs.pl:588
1173 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1177 #: ../cat/virt-filesystems.pod:5
1179 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1180 "virtual machine or disk image"
1184 #: ../cat/virt-filesystems.pod:9
1187 " virt-filesystems [--options] -d domname\n"
1192 #: ../cat/virt-filesystems.pod:11
1195 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1200 #: ../cat/virt-filesystems.pod:15
1202 "This tool allows you to discover filesystems, partitions, logical volumes, "
1203 "and their sizes in a disk image or virtual machine. It is a replacement for "
1204 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1208 #: ../cat/virt-filesystems.pod:20
1210 "One use for this tool is from shell scripts to iterate over all filesystems "
1211 "from a disk image:"
1215 #: ../cat/virt-filesystems.pod:23
1218 " for fs in $(virt-filesystems -a disk.img); do\n"
1225 #: ../cat/virt-filesystems.pod:27
1227 "Another use is to list partitions before using another tool to modify those "
1228 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1229 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1233 #: ../cat/virt-filesystems.pod:32
1235 "Various command line options control what this program displays. You need "
1236 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1237 "guest respectively. If you just specify that then the program shows "
1238 "filesystems found, one per line, like this:"
1242 #: ../cat/virt-filesystems.pod:37
1245 " $ virt-filesystems -a disk.img\n"
1247 " /dev/vg_guest/lv_root\n"
1252 #: ../cat/virt-filesystems.pod:41
1253 msgid "If you add I<-l> or I<--long> then the output includes extra information:"
1257 #: ../cat/virt-filesystems.pod:44
1260 " $ virt-filesystems -a disk.img -l\n"
1261 " Name Type VFS Label Size\n"
1262 " /dev/sda1 filesystem ext4 boot 524288000\n"
1263 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1268 #: ../cat/virt-filesystems.pod:49
1270 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1275 #: ../cat/virt-filesystems.pod:52
1278 " $ virt-filesystems -a disk.img --extra\n"
1280 " /dev/vg_guest/lv_root\n"
1281 " /dev/vg_guest/lv_swap\n"
1282 " /dev/vg_guest/lv_data\n"
1287 #: ../cat/virt-filesystems.pod:58
1288 msgid "If you add I<--partitions> then partitions are shown instead of filesystems:"
1292 #: ../cat/virt-filesystems.pod:60
1295 " $ virt-filesystems -a disk.img --partitions\n"
1302 #: ../cat/virt-filesystems.pod:64
1304 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, "
1305 "I<--physical-volumes>, I<--block-devices> to list those items."
1309 #: ../cat/virt-filesystems.pod:67
1311 "You can use these options in combination as well (if you want a combination "
1312 "including filesystems, you have to add I<--filesystems>). Notice that some "
1313 "items fall into several categories (eg. C</dev/sda1> might be both a "
1314 "partition and a filesystem). These items are listed several times. To get "
1315 "a list which includes absolutely everything that virt-filesystems knows "
1316 "about, use the I<--all> option."
1320 #: ../cat/virt-filesystems.pod:74
1322 "UUIDs (because they are quite long) are not shown by default. Add the "
1323 "I<--uuid> option to display device and filesystem UUIDs in the long output."
1327 #: ../cat/virt-filesystems.pod:78
1329 "I<--all --long --uuid> is a useful combination to display all possible "
1330 "information about everything."
1334 #: ../cat/virt-filesystems.pod:81
1337 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1338 " Name Type VFS Label Size Parent UUID\n"
1339 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1340 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1341 " /dev/sda1 partition - - 100M /dev/sda -\n"
1342 " /dev/sda2 partition - - 20G /dev/sda -\n"
1343 " /dev/sda device - - 20G - -\n"
1348 #: ../cat/virt-filesystems.pod:89
1349 msgid "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1353 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1358 #: ../cat/virt-filesystems.pod:112
1360 "Display everything. This is currently the same as specifying these options: "
1361 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, "
1362 "I<--logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may "
1363 "be added to this list in future)."
1367 #: ../cat/virt-filesystems.pod:117
1368 msgid "See also I<--long>."
1372 #: ../cat/virt-filesystems.pod:119
1373 msgid "B<--blkdevs>"
1377 #: ../cat/virt-filesystems.pod:121
1378 msgid "B<--block-devices>"
1382 #: ../cat/virt-filesystems.pod:123
1383 msgid "Display block devices."
1387 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1392 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1394 "Write out the results in CSV format (comma-separated values). This format "
1395 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1396 "ABOUT CSV FORMAT> below."
1400 #: ../cat/virt-filesystems.pod:150
1402 "When prompting for keys and passphrases, virt-filesystems normally turns "
1403 "echoing off so you cannot see what you are typing. If you are not worried "
1404 "about Tempest attacks and there is no one else in the room you can specify "
1405 "this flag to see what you are typing."
1409 #: ../cat/virt-filesystems.pod:155
1414 #: ../cat/virt-filesystems.pod:157
1416 "This causes filesystems that are not ordinary, mountable filesystems to be "
1417 "displayed. This category includes swapspace, and filesystems that are empty "
1418 "or contain unknown data."
1422 #: ../cat/virt-filesystems.pod:161
1423 msgid "This option implies I<--filesystems>."
1427 #: ../cat/virt-filesystems.pod:163
1428 msgid "B<--filesystems>"
1432 #: ../cat/virt-filesystems.pod:165
1434 "Display mountable filesystems. If no display option was selected then this "
1435 "option is implied."
1439 #: ../cat/virt-filesystems.pod:168
1440 msgid "With I<--extra>, non-mountable filesystems are shown too."
1444 #: ../cat/virt-filesystems.pod:181
1447 " virt-filesystems --format=raw -a disk.img\n"
1452 #: ../cat/virt-filesystems.pod:185
1455 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1460 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352 ../df/virt-df.pod:125 ../fish/guestfish.pod:156 ../tools/virt-list-partitions.pl:109
1465 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354 ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1466 msgid "B<--human-readable>"
1470 #: ../cat/virt-filesystems.pod:198
1471 msgid "In I<--long> mode, display sizes in human-readable format."
1475 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366 ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1480 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368 ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1485 #: ../cat/virt-filesystems.pod:209
1486 msgid "Display extra columns of data (\"long format\")."
1490 #: ../cat/virt-filesystems.pod:211
1491 msgid "A title row is added unless you also specify I<--no-title>."
1495 #: ../cat/virt-filesystems.pod:213
1497 "The extra columns displayed depend on what output you select, and the "
1498 "ordering of columns may change in future versions. Use the title row, "
1499 "I<--csv> output and/or L<csvtool(1)> to match columns to data in external "
1504 #: ../cat/virt-filesystems.pod:218
1506 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1507 "default is to show raw numbers of I<bytes>."
1511 #: ../cat/virt-filesystems.pod:221
1512 msgid "Use I<--uuid> to display UUIDs too."
1516 #: ../cat/virt-filesystems.pod:223
1521 #: ../cat/virt-filesystems.pod:225
1522 msgid "B<--logvols>"
1526 #: ../cat/virt-filesystems.pod:227
1527 msgid "B<--logical-volumes>"
1531 #: ../cat/virt-filesystems.pod:229
1533 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1534 "of whether the LVs contain filesystems."
1538 #: ../cat/virt-filesystems.pod:232
1539 msgid "B<--no-title>"
1543 #: ../cat/virt-filesystems.pod:234
1544 msgid "In I<--long> mode, don't add a title row."
1548 #: ../cat/virt-filesystems.pod:236
1550 "Note that the order of the columns is not fixed, and may change in future "
1551 "versions of virt-filesystems, so using this option may give you unexpected "
1556 #: ../cat/virt-filesystems.pod:240
1561 #: ../cat/virt-filesystems.pod:242
1562 msgid "B<--partitions>"
1566 #: ../cat/virt-filesystems.pod:244
1568 "Display partitions. In this mode, these are displayed irrespective of "
1569 "whether the partitions contain filesystems."
1573 #: ../cat/virt-filesystems.pod:247
1578 #: ../cat/virt-filesystems.pod:249
1579 msgid "B<--physvols>"
1583 #: ../cat/virt-filesystems.pod:251
1584 msgid "B<--physical-volumes>"
1588 #: ../cat/virt-filesystems.pod:253
1589 msgid "Display LVM physical volumes."
1593 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1598 #: ../cat/virt-filesystems.pod:257
1603 #: ../cat/virt-filesystems.pod:259
1604 msgid "In I<--long> mode, display UUIDs as well."
1608 #: ../cat/virt-filesystems.pod:273
1613 #: ../cat/virt-filesystems.pod:275
1614 msgid "B<--volgroups>"
1618 #: ../cat/virt-filesystems.pod:277
1619 msgid "B<--volume-groups>"
1623 #: ../cat/virt-filesystems.pod:279
1624 msgid "Display LVM volume groups."
1628 #: ../cat/virt-filesystems.pod:287
1633 #: ../cat/virt-filesystems.pod:289
1635 "Note that columns in the output are subject to reordering and change in "
1636 "future versions of this tool."
1640 #: ../cat/virt-filesystems.pod:294
1645 #: ../cat/virt-filesystems.pod:296
1646 msgid "The filesystem, partition, block device or LVM name."
1650 #: ../cat/virt-filesystems.pod:298
1652 "For device and partition names these are displayed as canonical libguestfs "
1653 "names, so that for example C</dev/sda2> is the second partition on the first "
1658 #: ../cat/virt-filesystems.pod:302
1660 "If the I<--long> option is B<not> specified, then only the name column is "
1661 "shown in the output."
1665 #: ../cat/virt-filesystems.pod:305
1670 #: ../cat/virt-filesystems.pod:307
1671 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1675 #: ../cat/virt-filesystems.pod:309
1680 #: ../cat/virt-filesystems.pod:311
1682 "If there is a filesystem, then this column displays the filesystem type if "
1683 "one could be detected, eg. C<ext4>."
1687 #: ../cat/virt-filesystems.pod:314
1692 #: ../cat/virt-filesystems.pod:316
1694 "If the object has a label (used for identifying and mounting filesystems) "
1695 "then this column contains the label."
1699 #: ../cat/virt-filesystems.pod:319
1704 #: ../cat/virt-filesystems.pod:321
1706 "The partition type byte, displayed as a two digit hexadecimal number. A "
1707 "comprehensive list of partition types can be found here: "
1708 "L<http://www.win.tue.nl/~aeb/partitions/partition_types-1.html>"
1712 #: ../cat/virt-filesystems.pod:325
1713 msgid "This is only applicable for DOS (MBR) partitions."
1717 #: ../cat/virt-filesystems.pod:327
1722 #: ../cat/virt-filesystems.pod:329
1724 "The size of the object in bytes. If the I<--human> option is used then the "
1725 "size is displayed in a human-readable form."
1729 #: ../cat/virt-filesystems.pod:332
1734 #: ../cat/virt-filesystems.pod:334
1736 "The parent column records the parent relationship between objects. For "
1737 "example, if the object is a partition, then this column contains the name of "
1738 "the containing device. If the object is a logical volume, then this column "
1739 "is the name of the volume group."
1743 #: ../cat/virt-filesystems.pod:339
1748 #: ../cat/virt-filesystems.pod:341
1750 "If the object has a UUID (used for identifying and mounting filesystems and "
1751 "block devices) then this column contains the UUID as a string."
1755 #: ../cat/virt-filesystems.pod:345
1756 msgid "The UUID is only displayed if the I<--uuid> option is given."
1760 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:459 ../df/virt-df.pod:217
1761 msgid "NOTE ABOUT CSV FORMAT"
1765 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:461 ../df/virt-df.pod:219
1767 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
1768 "should be easy to parse, but it is definitely not easy to parse."
1772 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:464 ../df/virt-df.pod:222
1774 "Myth: Just split fields at commas. Reality: This does I<not> work "
1775 "reliably. This example has two columns:"
1779 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:467 ../df/virt-df.pod:225
1782 " \"foo,bar\",baz\n"
1787 #: ../cat/virt-filesystems.pod:359 ../cat/virt-ls.pod:469 ../df/virt-df.pod:227
1789 "Myth: Read the file one line at a time. Reality: This does I<not> work "
1790 "reliably. This example has one row:"
1794 #: ../cat/virt-filesystems.pod:362 ../cat/virt-ls.pod:472 ../df/virt-df.pod:230
1803 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:475 ../df/virt-df.pod:233
1805 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
1806 "packaged in major Linux distributions)."
1810 #: ../cat/virt-filesystems.pod:368 ../cat/virt-ls.pod:478 ../df/virt-df.pod:236
1812 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
1813 "or Python's built-in csv library)."
1817 #: ../cat/virt-filesystems.pod:371 ../cat/virt-ls.pod:481 ../df/virt-df.pod:239
1818 msgid "Most spreadsheets and databases can import CSV directly."
1822 #: ../cat/virt-filesystems.pod:387
1824 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
1825 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, "
1826 "L<http://libguestfs.org/>."
1830 #: ../cat/virt-filesystems.pod:402 ../tools/virt-win-reg.pl:789
1831 msgid "Copyright (C) 2010 Red Hat Inc."
1835 #: ../cat/virt-ls.pod:5
1836 msgid "virt-ls - List files in a virtual machine"
1840 #: ../cat/virt-ls.pod:9
1843 " virt-ls [--options] -d domname directory [directory ...]\n"
1848 #: ../cat/virt-ls.pod:11
1851 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory "
1857 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:15
1862 #: ../cat/virt-ls.pod:15
1865 " virt-ls [--options] domname directory\n"
1870 #: ../cat/virt-ls.pod:17
1873 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1878 #: ../cat/virt-ls.pod:21
1880 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1881 "more from a virtual machine or disk image."
1885 #: ../cat/virt-ls.pod:24
1887 "Multiple directory names can be given, in which case the output from each is "
1892 #: ../cat/virt-ls.pod:27
1894 "To list directories from a libvirt guest use the I<-d> option to specify the "
1895 "name of the guest. For a disk image, use the I<-a> option."
1899 #: ../cat/virt-ls.pod:31
1901 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1902 "may need to use L<guestfish(1)>, or write a program directly to the "
1903 "L<guestfs(3)> API."
1907 #: ../cat/virt-ls.pod:37
1908 msgid "Get a list of all files and directories in a virtual machine:"
1912 #: ../cat/virt-ls.pod:39
1915 " virt-ls -R -d guest /\n"
1920 #: ../cat/virt-ls.pod:41 ../examples/guestfs-testing.pod:182
1921 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1925 #: ../cat/virt-ls.pod:43
1928 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1933 #: ../cat/virt-ls.pod:45 ../examples/guestfs-testing.pod:186
1934 msgid "List all public-writable directories in a Linux virtual machine:"
1938 #: ../cat/virt-ls.pod:47
1941 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1946 #: ../cat/virt-ls.pod:49 ../examples/guestfs-testing.pod:190
1947 msgid "List all Unix domain sockets in a Linux virtual machine:"
1951 #: ../cat/virt-ls.pod:51
1954 " virt-ls -lR -d guest / | grep '^s'\n"
1959 #: ../cat/virt-ls.pod:53 ../examples/guestfs-testing.pod:194
1960 msgid "List all regular files with filenames ending in '.png':"
1964 #: ../cat/virt-ls.pod:55
1967 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1972 #: ../cat/virt-ls.pod:57
1973 msgid "To display files larger than 10MB in home directories:"
1977 #: ../cat/virt-ls.pod:59
1980 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1985 #: ../cat/virt-ls.pod:61 ../examples/guestfs-testing.pod:202
1986 msgid "Find everything modified in the last 7 days:"
1990 #: ../cat/virt-ls.pod:63
1993 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1998 #: ../cat/virt-ls.pod:65 ../examples/guestfs-testing.pod:206
1999 msgid "Find regular files modified in the last 24 hours:"
2003 #: ../cat/virt-ls.pod:67
2006 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2011 #: ../cat/virt-ls.pod:69
2012 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2016 #: ../cat/virt-ls.pod:71
2018 "Find the differences between files in a guest and an earlier snapshot of the "
2023 #: ../cat/virt-ls.pod:74
2026 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2027 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2028 " diff -u old new | less\n"
2033 #: ../cat/virt-ls.pod:78
2035 "The commands above won't find files where the content has changed but the "
2036 "metadata (eg. file size and modification date) is the same. To do that, you "
2037 "need to add the I<--checksum> parameter to both C<virt-ls> commands. "
2038 "I<--checksum> can be quite slow since it has to read and compute a checksum "
2039 "of every regular file in the virtual machine."
2043 #: ../cat/virt-ls.pod:84
2044 msgid "OUTPUT MODES"
2048 #: ../cat/virt-ls.pod:86
2050 "C<virt-ls> has four output modes, controlled by different combinations of "
2051 "the I<-l> and I<-R> options."
2055 #: ../cat/virt-ls.pod:89
2056 msgid "SIMPLE LISTING"
2060 #: ../cat/virt-ls.pod:91
2061 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2065 #: ../cat/virt-ls.pod:93
2068 " $ virt-ls -d guest /\n"
2076 #: ../cat/virt-ls.pod:98
2077 msgid "LONG LISTING"
2081 #: ../cat/virt-ls.pod:100
2083 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2084 "(more specifically, like the C<guestfs_ll> function)."
2088 #: ../cat/virt-ls.pod:103
2091 " $ virt-ls -l -d guest /\n"
2093 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2094 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2100 #: ../cat/virt-ls.pod:109
2102 "Note that while this is useful for displaying a directory, do not try "
2103 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2108 #: ../cat/virt-ls.pod:113
2109 msgid "RECURSIVE LISTING"
2113 #: ../cat/virt-ls.pod:115
2115 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2116 "and directories recursively:"
2120 #: ../cat/virt-ls.pod:118
2123 " $ virt-ls -R -d guest /tmp\n"
2131 #: ../cat/virt-ls.pod:123
2133 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2134 "converts C<\\0> characters to C<\\n>."
2138 #: ../cat/virt-ls.pod:126
2139 msgid "RECURSIVE LONG LISTING"
2143 #: ../cat/virt-ls.pod:128
2145 "Using I<-lR> options together changes the output to display directories "
2146 "recursively, with file stats, and optionally other features such as "
2147 "checksums and extended attributes."
2151 #: ../cat/virt-ls.pod:132
2153 "Most of the interesting features of C<virt-ls> are only available when using "
2158 #: ../cat/virt-ls.pod:135
2160 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2161 "you cannot use the output in another program (because filenames can contain "
2162 "spaces and other unsafe characters). If the guest was untrusted and someone "
2163 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2164 "on you by creating filenames with embedded newline characters. To B<safely> "
2165 "parse the output in another program, use the I<--csv> (Comma-Separated "
2170 #: ../cat/virt-ls.pod:143
2172 "Note that this output format is completely unrelated to the C<ls -lR> "
2177 #: ../cat/virt-ls.pod:146
2180 " $ virt-ls -lR -d guest /bin\n"
2181 " d 0555 4096 /bin\n"
2182 " - 0755 123 /bin/alsaunmute\n"
2183 " - 0755 28328 /bin/arch\n"
2184 " l 0777 4 /bin/awk -> gawk\n"
2185 " - 0755 27216 /bin/basename\n"
2186 " - 0755 943360 /bin/bash\n"
2192 #: ../cat/virt-ls.pod:155
2193 msgid "These basic fields are always shown:"
2197 #: ../cat/virt-ls.pod:159
2202 #: ../cat/virt-ls.pod:161
2204 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2205 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2206 "link), C<s> (socket) or C<u> (unknown)."
2210 #: ../cat/virt-ls.pod:171
2215 #: ../cat/virt-ls.pod:173
2216 msgid "The Unix permissions, displayed as a 4 digit octal number."
2220 #: ../cat/virt-ls.pod:175
2225 #: ../cat/virt-ls.pod:177
2227 "The size of the file. This is shown in bytes unless I<-h> or "
2228 "I<--human-readable> option is given, in which case this is shown as a "
2229 "human-readable number."
2233 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4519
2238 #: ../cat/virt-ls.pod:183
2239 msgid "The full path of the file or directory."
2243 #: ../cat/virt-ls.pod:185
2248 #: ../cat/virt-ls.pod:187
2249 msgid "For symbolic links only, the link target."
2253 #: ../cat/virt-ls.pod:191
2255 "In I<-lR> mode, additional command line options enable the display of more "
2260 #: ../cat/virt-ls.pod:194
2262 "With the I<--uids> flag, these additional fields are displayed before the "
2267 #: ../cat/virt-ls.pod:199
2272 #: ../cat/virt-ls.pod:201
2277 #: ../cat/virt-ls.pod:203
2279 "The UID and GID of the owner of the file (displayed numerically). Note "
2280 "these only make sense in the context of a Unix-like guest."
2284 #: ../cat/virt-ls.pod:208
2285 msgid "With the I<--times> flag, these additional fields are displayed:"
2289 #: ../cat/virt-ls.pod:212
2294 #: ../cat/virt-ls.pod:214
2295 msgid "The time of last access."
2299 #: ../cat/virt-ls.pod:216
2304 #: ../cat/virt-ls.pod:218
2305 msgid "The time of last modification."
2309 #: ../cat/virt-ls.pod:220
2314 #: ../cat/virt-ls.pod:222
2315 msgid "The time of last status change."
2319 #: ../cat/virt-ls.pod:226
2321 "The time fields are displayed as string dates and times, unless one of the "
2322 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2326 #: ../cat/virt-ls.pod:229
2327 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2331 #: ../cat/virt-ls.pod:233
2336 #: ../cat/virt-ls.pod:235
2338 "The device containing the file (displayed as major:minor). This may not "
2339 "match devices as known to the guest."
2343 #: ../cat/virt-ls.pod:238
2348 #: ../cat/virt-ls.pod:240
2349 msgid "The inode number."
2353 #: ../cat/virt-ls.pod:242
2358 #: ../cat/virt-ls.pod:244
2359 msgid "The number of hard links."
2363 #: ../cat/virt-ls.pod:246
2368 #: ../cat/virt-ls.pod:248
2369 msgid "For block and char special files, the device (displayed as major:minor)."
2373 #: ../cat/virt-ls.pod:251
2378 #: ../cat/virt-ls.pod:253
2379 msgid "The number of 512 byte blocks allocated to the file."
2383 #: ../cat/virt-ls.pod:257
2385 "With the I<--checksum> flag, the checksum of the file contents is shown "
2386 "(only for regular files). Computing file checksums can take a considerable "
2391 #: ../cat/virt-ls.pod:280
2392 msgid "B<--checksum>"
2396 #: ../cat/virt-ls.pod:282
2397 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2401 #: ../cat/virt-ls.pod:284
2403 "Display checksum over file contents for regular files. With no argument, "
2404 "this defaults to using I<md5>. Using an argument, you can select the "
2405 "checksum type to use."
2409 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358 ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408 ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2411 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2416 #: ../cat/virt-ls.pod:316
2418 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2419 "so you cannot see what you are typing. If you are not worried about Tempest "
2420 "attacks and there is no one else in the room you can specify this flag to "
2421 "see what you are typing."
2425 #: ../cat/virt-ls.pod:321
2426 msgid "B<--extra-stats>"
2430 #: ../cat/virt-ls.pod:323
2431 msgid "Display extra stats."
2435 #: ../cat/virt-ls.pod:339
2438 " virt-ls --format=raw -a disk.img /dir\n"
2443 #: ../cat/virt-ls.pod:343
2446 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2451 #: ../cat/virt-ls.pod:356
2452 msgid "Display file sizes in human-readable format."
2456 #: ../cat/virt-ls.pod:370
2461 #: ../cat/virt-ls.pod:372
2462 msgid "B<--recursive>"
2466 #: ../cat/virt-ls.pod:374
2468 "Select the mode. With neither of these options, C<virt-ls> produces a "
2469 "simple, flat list of the files in the named directory. See L</SIMPLE "
2474 #: ../cat/virt-ls.pod:378
2476 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See "
2481 #: ../cat/virt-ls.pod:381
2483 "C<virt-ls -R> produces a recursive list of files starting at the named "
2484 "directory. See L</RECURSIVE LISTING>."
2488 #: ../cat/virt-ls.pod:384
2490 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2491 "parsed. See L</RECURSIVE LONG LISTING>."
2495 #: ../cat/virt-ls.pod:387
2500 #: ../cat/virt-ls.pod:389
2501 msgid "Display time fields."
2505 #: ../cat/virt-ls.pod:394
2506 msgid "B<--time-days>"
2510 #: ../cat/virt-ls.pod:396
2511 msgid "Display time fields as days before now (negative if in the future)."
2515 #: ../cat/virt-ls.pod:398
2517 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2518 "of the file is between 0 and 86399 seconds."
2522 #: ../cat/virt-ls.pod:404
2523 msgid "B<--time-relative>"
2527 #: ../cat/virt-ls.pod:406
2528 msgid "Display time fields as seconds before now (negative if in the future)."
2532 #: ../cat/virt-ls.pod:411
2537 #: ../cat/virt-ls.pod:413
2538 msgid "Display time fields as seconds since the Unix epoch."
2542 #: ../cat/virt-ls.pod:418
2547 #: ../cat/virt-ls.pod:420
2548 msgid "Display UID and GID fields."
2552 #: ../cat/virt-ls.pod:445
2553 msgid "Previous versions of virt-ls allowed you to write either:"
2557 #: ../cat/virt-ls.pod:447
2560 " virt-ls disk.img [disk.img ...] /dir\n"
2565 #: ../cat/virt-ls.pod:451
2568 " virt-ls guestname /dir\n"
2573 #: ../cat/virt-ls.pod:497
2575 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, "
2576 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
2577 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
2581 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:267 ../edit/virt-edit.pod:374 ../rescue/virt-rescue.pod:340
2582 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2586 #: ../clone/virt-sysprep.pod:5
2587 msgid "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2591 #: ../clone/virt-sysprep.pod:9
2594 " virt-sysprep [--options] -d domname\n"
2599 #: ../clone/virt-sysprep.pod:11
2602 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2607 #: ../clone/virt-sysprep.pod:15
2609 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2610 "can be made from it. Steps in this process include removing SSH host keys, "
2611 "removing persistent network MAC configuration, and removing user accounts. "
2612 "Each step can be enabled or disabled as required."
2616 #: ../clone/virt-sysprep.pod:21
2618 "Virt-sysprep is a simple shell script, allowing easy inspection or "
2619 "customization by the system administrator."
2623 #: ../clone/virt-sysprep.pod:24
2625 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
2626 "be shut down. If you want to preserve the existing contents of the guest, "
2627 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> "
2632 #: ../clone/virt-sysprep.pod:29
2634 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
2635 "recommend that you don't. The time you might want to run it as root is when "
2636 "you need root in order to access the disk image, but even in this case it "
2637 "would be better to change the permissions on the disk image to be writable "
2638 "as the non-root user running virt-sysprep."
2642 #: ../clone/virt-sysprep.pod:35
2644 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
2645 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
2646 "machines in preparation for cloning them. Having said that, virt-sysprep "
2647 "does I<not> currently work on Microsoft Windows guests. We plan to support "
2648 "Windows sysprepping in a future version, and we already have code to do it."
2652 #: ../clone/virt-sysprep.pod:76
2653 msgid "B<--enable=...>"
2657 #: ../clone/virt-sysprep.pod:78
2659 "Choose which sysprep operations to perform. Give a comma-separated list of "
2660 "operations, for example:"
2664 #: ../clone/virt-sysprep.pod:81
2667 " --enable=ssh-hostkeys,udev-persistent-net\n"
2672 #: ../clone/virt-sysprep.pod:83
2673 msgid "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
2677 #: ../clone/virt-sysprep.pod:85
2679 "If the I<--enable> option is not given, then we default to trying all "
2680 "possible sysprep operations. But some sysprep operations are skipped for "
2685 #: ../clone/virt-sysprep.pod:89
2687 "Use I<--list-operations> to list operations supported by a particular "
2688 "version of virt-sysprep."
2692 #: ../clone/virt-sysprep.pod:92
2693 msgid "See L</OPERATIONS> below for a list and an explanation of each operation."
2697 #: ../clone/virt-sysprep.pod:106
2700 " virt-sysprep --format=raw -a disk.img\n"
2705 #: ../clone/virt-sysprep.pod:110
2708 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
2713 #: ../clone/virt-sysprep.pod:119
2714 msgid "B<--hostname> newhostname"
2718 #: ../clone/virt-sysprep.pod:121
2720 "Change the hostname. See the L</hostname> operation below. If not given, "
2721 "defaults to C<localhost.localdomain>."
2725 #: ../clone/virt-sysprep.pod:124
2726 msgid "B<--list-operations>"
2730 #: ../clone/virt-sysprep.pod:126
2731 msgid "List the operations supported by the virt-sysprep program."
2735 #: ../clone/virt-sysprep.pod:128
2736 msgid "B<--selinux-relabel>"
2740 #: ../clone/virt-sysprep.pod:130
2741 msgid "B<--no-selinux-relabel>"
2745 #: ../clone/virt-sysprep.pod:132
2747 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
2748 "I<--no-selinux-relabel> disables relabelling."
2752 #: ../clone/virt-sysprep.pod:135
2754 "The default is to try to detect if SELinux relabelling is required. See "
2755 "L</SELINUX RELABELLING> below for more details."
2759 #: ../clone/virt-sysprep.pod:156
2764 #: ../clone/virt-sysprep.pod:158
2766 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
2767 "enabled>, although some are skipped depending on the type of guest."
2771 #: ../clone/virt-sysprep.pod:162
2773 "Operations can be individually enabled using the I<--enable> option. Use a "
2774 "comma-separated list, for example:"
2778 #: ../clone/virt-sysprep.pod:165
2781 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
2786 #: ../clone/virt-sysprep.pod:167
2788 "To list the operations supported by the current version of virt-sysprep, use "
2789 "I<--list-operations>."
2793 #: ../clone/virt-sysprep.pod:170
2795 "Future versions of virt-sysprep may add more operations. If you are using "
2796 "virt-sysprep and want predictable behaviour, specify only the operations "
2797 "that you want to have enabled."
2801 #: ../clone/virt-sysprep.pod:174
2806 #: ../clone/virt-sysprep.pod:176
2807 msgid "Remove user at-jobs and cron-jobs."
2811 #: ../clone/virt-sysprep.pod:178
2812 msgid "dhcp-client-state"
2816 #: ../clone/virt-sysprep.pod:180
2817 msgid "Remove DHCP client leases."
2821 #: ../clone/virt-sysprep.pod:182
2822 msgid "dhcp-server-state"
2826 #: ../clone/virt-sysprep.pod:184
2827 msgid "Remove DHCP server leases."
2831 #: ../clone/virt-sysprep.pod:186
2836 #: ../clone/virt-sysprep.pod:188
2838 "Changes the hostname of the guest to the value given in the I<--hostname> "
2843 #: ../clone/virt-sysprep.pod:191
2845 "If the I<--hostname> parameter is not given, then the hostname is changed to "
2846 "C<localhost.localdomain>."
2850 #: ../clone/virt-sysprep.pod:194
2855 #: ../clone/virt-sysprep.pod:196
2856 msgid "Remove many log files."
2860 #: ../clone/virt-sysprep.pod:198
2865 #: ../clone/virt-sysprep.pod:200
2866 msgid "Remove email from the local mail spool directory."
2870 #: ../clone/virt-sysprep.pod:202
2875 #: ../clone/virt-sysprep.pod:204
2877 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
2878 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
2882 #: ../clone/virt-sysprep.pod:207
2887 #: ../clone/virt-sysprep.pod:209
2889 "Write some random bytes from the host into the random seed file of the "
2894 #: ../clone/virt-sysprep.pod:212
2895 msgid "See L</RANDOM SEED> below."
2899 #: ../clone/virt-sysprep.pod:214
2900 msgid "rhn-systemid"
2904 #: ../clone/virt-sysprep.pod:216
2905 msgid "Remove the RHN system ID."
2909 #: ../clone/virt-sysprep.pod:218
2914 #: ../clone/virt-sysprep.pod:220
2915 msgid "Remove the Smolt hardware UUID."
2919 #: ../clone/virt-sysprep.pod:222
2920 msgid "ssh-hostkeys"
2924 #: ../clone/virt-sysprep.pod:224
2925 msgid "Remove the SSH host keys in the guest."
2929 #: ../clone/virt-sysprep.pod:226
2931 "The SSH host keys are regenerated (differently) next time the guest is "
2936 #: ../clone/virt-sysprep.pod:229
2938 "If, after cloning, the guest gets the same IP address, ssh will give you a "
2939 "stark warning about the host key changing:"
2943 #: ../clone/virt-sysprep.pod:232
2946 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2947 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
2948 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2949 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
2954 #: ../clone/virt-sysprep.pod:237
2955 msgid "udev-persistent-net"
2959 #: ../clone/virt-sysprep.pod:239
2961 "Remove udev persistent net rules which map the guest's existing MAC address "
2962 "to a fixed ethernet device (eg. eth0)."
2966 #: ../clone/virt-sysprep.pod:242
2968 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
2969 "address occupies the old name (eg. eth0), this means the fresh MAC address "
2970 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
2971 "Erasing the udev persistent net rules avoids this."
2975 #: ../clone/virt-sysprep.pod:247
2980 #: ../clone/virt-sysprep.pod:249
2981 msgid "Remove the utmp file."
2985 #: ../clone/virt-sysprep.pod:251
2987 "This records who is currently logged in on a machine. In modern Linux "
2988 "distros it is stored in a ramdisk and hence not part of the virtual "
2989 "machine's disk, but it was stored on disk in older distros."
2993 #: ../clone/virt-sysprep.pod:255
2998 #: ../clone/virt-sysprep.pod:257
2999 msgid "Remove the yum UUID."
3003 #: ../clone/virt-sysprep.pod:259
3005 "Yum creates a fresh UUID the next time it runs when it notices that the "
3006 "original UUID has been erased."
3010 #: ../clone/virt-sysprep.pod:262
3011 msgid "COPYING AND CLONING"
3015 #: ../clone/virt-sysprep.pod:264
3017 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3018 "prepare a template from which guests can be cloned. There are many "
3019 "different ways to achieve this using the virt tools, and this section is "
3020 "just an introduction."
3024 #: ../clone/virt-sysprep.pod:269
3025 msgid "A virtual machine (when switched off) consists of two parts:"
3029 #: ../clone/virt-sysprep.pod:273
3030 msgid "I<configuration>"
3034 #: ../clone/virt-sysprep.pod:275
3036 "The configuration or description of the guest. eg. The libvirt XML (see "
3037 "C<virsh dumpxml>), the running configuration of the guest, or another "
3038 "external format like OVF."
3042 #: ../clone/virt-sysprep.pod:279
3043 msgid "Some configuration items that might need to be changed:"
3047 #: ../clone/virt-sysprep.pod:285
3052 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3057 #: ../clone/virt-sysprep.pod:293
3058 msgid "path to block device(s)"
3062 #: ../clone/virt-sysprep.pod:297
3063 msgid "network card MAC address"
3067 #: ../clone/virt-sysprep.pod:301
3068 msgid "I<block device(s)>"
3072 #: ../clone/virt-sysprep.pod:303
3074 "One or more hard disk images, themselves containing files, directories, "
3075 "applications, kernels, configuration, etc."
3079 #: ../clone/virt-sysprep.pod:306
3080 msgid "Some things inside the block devices that might need to be changed:"
3084 #: ../clone/virt-sysprep.pod:312
3085 msgid "hostname and other net configuration"
3089 #: ../clone/virt-sysprep.pod:320
3090 msgid "SSH host keys"
3094 #: ../clone/virt-sysprep.pod:324
3095 msgid "Windows unique security ID (SID)"
3099 #: ../clone/virt-sysprep.pod:328
3100 msgid "Puppet registration"
3104 #: ../clone/virt-sysprep.pod:334
3105 msgid "COPYING THE BLOCK DEVICE"
3109 #: ../clone/virt-sysprep.pod:336
3111 "Starting with an original guest, you probably wish to copy the guest block "
3112 "device and its configuration to make a template. Then once you are happy "
3113 "with the template, you will want to make many clones from it."
3117 #: ../clone/virt-sysprep.pod:341
3123 " original guest --------> template ---------->\n"
3124 " \\------> cloned\n"
3125 " \\-----> guests\n"
3131 #: ../clone/virt-sysprep.pod:349
3133 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3138 #: ../clone/virt-sysprep.pod:352
3142 " original guest --------> template ---------->\n"
3143 " \\------> cloned\n"
3144 " \\-----> guests\n"
3150 #: ../clone/virt-sysprep.pod:358
3151 msgid "There are some smarter (and faster) ways too:"
3155 #: ../clone/virt-sysprep.pod:364
3159 " template ---------->\n"
3160 " \\------> cloned\n"
3161 " \\-----> guests\n"
3167 #: ../clone/virt-sysprep.pod:370
3169 "Use the block device as a backing file and create a snapshot on top for each "
3170 "guest. The advantage is that you don't need to copy the block device (very "
3171 "fast) and only changes are stored (less storage required)."
3175 #: ../clone/virt-sysprep.pod:375
3177 "Note that writing to the backing file once you have created guests on top of "
3178 "it is not possible: you will corrupt the guests."
3182 #: ../clone/virt-sysprep.pod:378
3184 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 "
3185 "-o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3186 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3187 "also create cheap snapshots from files or LUNs."
3191 #: ../clone/virt-sysprep.pod:386
3192 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3196 #: ../clone/virt-sysprep.pod:390
3197 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3201 #: ../clone/virt-sysprep.pod:394
3206 #: ../clone/virt-sysprep.pod:396
3208 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3209 "and/or modify the external libvirt configuration of a guest. It will reset "
3210 "the name, UUID and MAC address of the guest in the libvirt XML."
3214 #: ../clone/virt-sysprep.pod:401
3216 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3217 "image. This was the original motivation to write virt-sysprep."
3221 #: ../clone/virt-sysprep.pod:404
3226 #: ../clone/virt-sysprep.pod:406
3230 " original guest --------> template\n"
3235 #: ../clone/virt-sysprep.pod:409
3237 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3238 "it easier to compress and/or faster to copy."
3242 #: ../clone/virt-sysprep.pod:412
3244 "Notice that since virt-sparsify also copies the image, you can use it to "
3245 "make the initial copy (instead of C<dd>)."
3249 #: ../clone/virt-sysprep.pod:415
3254 #: ../clone/virt-sysprep.pod:417
3258 " template ---------->\n"
3259 " \\------> cloned\n"
3260 " \\-----> guests\n"
3266 #: ../clone/virt-sysprep.pod:423
3268 "If you want to give people cloned guests, but let them pick the size of the "
3269 "guest themselves (eg. depending on how much they are prepared to pay for "
3270 "disk space), then instead of copying the template, you can run "
3271 "L<virt-resize(1)>. Virt-resize performs a copy and resize, and thus is "
3272 "ideal for cloning guests from a template."
3276 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3281 #: ../clone/virt-sysprep.pod:431
3283 "Although virt-sysprep removes some sensitive information from the guest, it "
3284 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3285 "above, and the implementation of the operations in the shell script. You "
3286 "should also examine the guest afterwards."
3290 #: ../clone/virt-sysprep.pod:436
3292 "Sensitive files are simply removed. The data they contained may still exist "
3293 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3294 "L<virt-sparsify(1)> as one way to remove this content. See also the "
3295 "L<scrub(1)> command to get rid of deleted content in directory entries and "
3300 #: ../clone/virt-sysprep.pod:442
3305 #: ../clone/virt-sysprep.pod:444
3306 msgid "I<(This section applies to Linux guests only)>"
3310 #: ../clone/virt-sysprep.pod:446
3312 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3313 "from the host into the guest's random seed file."
3317 #: ../clone/virt-sysprep.pod:449
3319 "If this is just done once and the guest is cloned from the same template, "
3320 "then each guest will start with the same entropy, and things like SSH host "
3321 "keys and TCP sequence numbers may be predictable."
3325 #: ../clone/virt-sysprep.pod:453
3327 "Therefore you should arrange to add more randomness I<after> cloning from a "
3328 "template too, which can be done by just enabling the C<random-seed> "
3333 #: ../clone/virt-sysprep.pod:457
3336 " cp template.img newguest.img\n"
3337 " virt-sysprep --enable=random-seed -a newguest.img\n"
3342 #: ../clone/virt-sysprep.pod:460
3343 msgid "SELINUX RELABELLING"
3347 #: ../clone/virt-sysprep.pod:462
3348 msgid "I<(This section applies to Linux guests using SELinux only)>"
3352 #: ../clone/virt-sysprep.pod:464
3354 "If any new files are created by virt-sysprep, then virt-sysprep touches "
3355 "C</.autorelabel> so that these will be correctly labelled by SELinux the "
3356 "next time the guest is booted. This process interrupts boot and can take "
3361 #: ../clone/virt-sysprep.pod:469
3363 "You can force relabelling for all guests by supplying the "
3364 "I<--selinux-relabel> option."
3368 #: ../clone/virt-sysprep.pod:472
3370 "You can disable relabelling entirely by supplying the "
3371 "I<--no-selinux-relabel> option."
3375 #: ../clone/virt-sysprep.pod:484
3376 msgid "This program returns 0 on success, or 1 if there was an error."
3380 #: ../clone/virt-sysprep.pod:488
3382 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, "
3383 "L<virt-resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, "
3384 "L<qemu-img(1)>, L<scrub(1)>, L<http://libguestfs.org/>, "
3385 "L<http://libvirt.org/>."
3389 #: ../df/virt-df.pod:5
3390 msgid "virt-df - Display free space on virtual filesystems"
3394 #: ../df/virt-df.pod:9
3397 " virt-df [--options]\n"
3402 #: ../df/virt-df.pod:11
3405 " virt-df [--options] -d domname\n"
3410 #: ../df/virt-df.pod:13
3413 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3418 #: ../df/virt-df.pod:17
3421 " virt-df [--options] domname\n"
3426 #: ../df/virt-df.pod:19
3429 " virt-df [--options] disk.img [disk.img ...]\n"
3434 #: ../df/virt-df.pod:23
3436 "C<virt-df> is a command line tool to display free space on virtual machine "
3437 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3438 "allocated to a virtual machine, but can look inside disk images to see how "
3439 "much space is really being used."
3443 #: ../df/virt-df.pod:28
3445 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3446 "to get a list of all active and inactive guests, and performs a C<df>-type "
3447 "operation on each one in turn, printing out the results."
3451 #: ../df/virt-df.pod:32
3453 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
3454 "C<df>-type operation on either the single named libvirt domain, or on the "
3455 "disk image(s) listed on the command line (which must all belong to a single "
3456 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
3457 "single guest>. If you want to run on multiple guests, then you have to "
3458 "invoke C<virt-df> multiple times."
3462 #: ../df/virt-df.pod:39
3464 "Use the I<--csv> option to get a format which can be easily parsed by other "
3465 "programs. Other options are similar to the standard L<df(1)> command."
3469 #: ../df/virt-df.pod:45
3471 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3472 "output human-readable:"
3476 #: ../df/virt-df.pod:48
3479 " # virt-df -d F14x64 -h\n"
3480 " Filesystem Size Used Available Use%\n"
3481 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3482 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3487 #: ../df/virt-df.pod:53
3488 msgid "Show disk usage for a disk image file called C<test.img>:"
3492 #: ../df/virt-df.pod:55
3495 " $ virt-df -a test1.img\n"
3496 " Filesystem 1K-blocks Used Available Use%\n"
3497 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3502 #: ../df/virt-df.pod:112
3505 " virt-df --format=raw -a disk.img\n"
3510 #: ../df/virt-df.pod:116
3513 " virt-df --format=raw -a disk.img --format -a another.img\n"
3518 #: ../df/virt-df.pod:129
3519 msgid "Print sizes in human-readable format."
3523 #: ../df/virt-df.pod:131
3524 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3528 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3533 #: ../df/virt-df.pod:135
3538 #: ../df/virt-df.pod:137
3539 msgid "Print inodes instead of blocks."
3543 #: ../df/virt-df.pod:139
3544 msgid "B<--one-per-guest>"
3548 #: ../df/virt-df.pod:141
3550 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3551 "disks from several guests to a single libguestfs appliance."
3555 #: ../df/virt-df.pod:144
3556 msgid "You might use this option in the following circumstances:"
3560 #: ../df/virt-df.pod:150
3562 "If you think an untrusted guest might actively try to exploit the libguestfs "
3563 "appliance kernel, then this prevents one guest from interfering with the "
3564 "stats printed for another guest."
3568 #: ../df/virt-df.pod:156
3570 "If the kernel has a bug which stops it from accessing a filesystem in one "
3571 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3572 "and report stats for further guests."
3576 #: ../df/virt-df.pod:165
3578 "Print UUIDs instead of names. This is useful for following a guest even "
3579 "when the guest is migrated or renamed, or when two guests happen to have the "
3584 #: ../df/virt-df.pod:169
3586 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3587 "images, we still print the disk image name even when this option is "
3592 #: ../df/virt-df.pod:191
3593 msgid "STATVFS NUMBERS"
3597 #: ../df/virt-df.pod:193
3599 "C<virt-df> (and L<df(1)>) get information by issuing a L<statvfs(3)> system "
3600 "call. You can get the same information directly, either from the host "
3601 "(using libguestfs) or inside the guest:"
3605 #: ../df/virt-df.pod:199
3606 msgid "From the host"
3610 #: ../df/virt-df.pod:201 ../df/virt-df.pod:209
3611 msgid "Run this command:"
3615 #: ../df/virt-df.pod:203
3618 " guestfish --ro -d GuestName -i statvfs /\n"
3623 #: ../df/virt-df.pod:205 ../df/virt-df.pod:213
3624 msgid "(change C</> to see stats for other filesystems)."
3628 #: ../df/virt-df.pod:207
3629 msgid "From inside the guest"
3633 #: ../df/virt-df.pod:211
3636 " python -c 'import os; s = os.statvfs (\"/\"); print s'\n"
3641 #: ../df/virt-df.pod:255
3643 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
3644 "L<http://libguestfs.org/>."
3648 #: ../edit/virt-edit.pod:5
3649 msgid "virt-edit - Edit a file in a virtual machine"
3653 #: ../edit/virt-edit.pod:9
3656 " virt-edit [--options] -d domname file [file ...]\n"
3661 #: ../edit/virt-edit.pod:11
3664 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
3669 #: ../edit/virt-edit.pod:13
3672 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
3677 #: ../edit/virt-edit.pod:17
3680 " virt-edit domname file\n"
3685 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
3688 " virt-edit disk.img [disk.img ...] file\n"
3693 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23 ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15 ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:21 ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
3698 #: ../edit/virt-edit.pod:23
3700 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
3701 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
3702 "doing this, but doesn't catch all cases."
3706 #: ../edit/virt-edit.pod:29
3708 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
3709 "exists in the named virtual machine (or disk image)."
3713 #: ../edit/virt-edit.pod:32
3715 "Multiple filenames can be given, in which case they are each edited in "
3716 "turn. Each filename must be a full path, starting at the root directory "
3717 "(starting with '/')."
3721 #: ../edit/virt-edit.pod:36
3722 msgid "If you want to just view a file, use L<virt-cat(1)>."
3726 #: ../edit/virt-edit.pod:38
3728 "For more complex cases you should look at the L<guestfish(1)> tool (see "
3729 "L</USING GUESTFISH> below)."
3733 #: ../edit/virt-edit.pod:41
3735 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
3736 "that and much more."
3740 #: ../edit/virt-edit.pod:46
3741 msgid "Edit the named files interactively:"
3745 #: ../edit/virt-edit.pod:48
3748 " virt-edit -d mydomain /boot/grub/grub.conf\n"
3753 #: ../edit/virt-edit.pod:50
3756 " virt-edit -d mydomain /etc/passwd\n"
3761 #: ../edit/virt-edit.pod:52
3762 msgid "For Windows guests, some Windows paths are understood:"
3766 #: ../edit/virt-edit.pod:54
3769 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
3774 #: ../edit/virt-edit.pod:56
3776 "If Perl is installed, you can also edit files non-interactively (see "
3777 "L</NON-INTERACTIVE EDITING> below). To change the init default level to 5:"
3781 #: ../edit/virt-edit.pod:60
3784 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
3789 #: ../edit/virt-edit.pod:81
3790 msgid "B<-b> extension"
3794 #: ../edit/virt-edit.pod:83
3795 msgid "B<--backup> extension"
3799 #: ../edit/virt-edit.pod:85
3801 "Create a backup of the original file I<in the guest disk image>. The backup "
3802 "has the original filename with C<extension> added."
3806 #: ../edit/virt-edit.pod:88
3808 "Usually the first character of C<extension> would be a dot C<.> so you would "
3813 #: ../edit/virt-edit.pod:91
3816 " virt-edit -b .orig [etc]\n"
3821 #: ../edit/virt-edit.pod:93
3822 msgid "By default, no backup file is made."
3826 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181 ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74 ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78 ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
3831 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183 ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76 ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80 ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
3832 msgid "B<--connect URI>"
3836 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84 ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134 ../tools/virt-win-reg.pl:135
3838 "If you specify guest block devices directly, then libvirt is not used at "
3843 #: ../edit/virt-edit.pod:114
3845 "When prompting for keys and passphrases, virt-edit normally turns echoing "
3846 "off so you cannot see what you are typing. If you are not worried about "
3847 "Tempest attacks and there is no one else in the room you can specify this "
3848 "flag to see what you are typing."
3852 #: ../edit/virt-edit.pod:119
3857 #: ../edit/virt-edit.pod:121
3858 msgid "B<--expr> EXPR"
3862 #: ../edit/virt-edit.pod:123
3864 "Instead of launching the external editor, non-interactively apply the Perl "
3865 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
3870 #: ../edit/virt-edit.pod:127
3872 "Be careful to properly quote the expression to prevent it from being altered "
3877 #: ../edit/virt-edit.pod:130
3878 msgid "Note that this option is only available when Perl 5 is installed."
3882 #: ../edit/virt-edit.pod:132
3883 msgid "B<--format> raw|qcow2|..."
3887 #: ../edit/virt-edit.pod:143
3890 " virt-edit --format=raw -a disk.img file\n"
3895 #: ../edit/virt-edit.pod:147
3898 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
3903 #: ../edit/virt-edit.pod:181
3904 msgid "Previous versions of virt-edit allowed you to write either:"
3908 #: ../edit/virt-edit.pod:187
3911 " virt-edit guestname file\n"
3916 #: ../edit/virt-edit.pod:195
3917 msgid "NON-INTERACTIVE EDITING"
3921 #: ../edit/virt-edit.pod:197
3923 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
3924 "administrator can interactively edit the file."
3928 #: ../edit/virt-edit.pod:200
3930 "There are two ways also to use C<virt-edit> from scripts in order to make "
3931 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
3932 "like this, it's less error-prone to write scripts directly using the "
3933 "libguestfs API and Augeas for configuration file editing.)"
3937 #: ../edit/virt-edit.pod:206
3939 "The first method is to temporarily set C<$EDITOR> to any script or program "
3940 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
3941 "update C<tmpfile> in place however it likes."
3945 #: ../edit/virt-edit.pod:210
3947 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
3948 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
3949 "instances of C<foo> with C<bar> in a file:"
3953 #: ../edit/virt-edit.pod:214
3956 " virt-edit -d domname filename -e 's/foo/bar/'\n"
3961 #: ../edit/virt-edit.pod:216
3963 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
3964 "For example to delete root's password you could do:"
3968 #: ../edit/virt-edit.pod:219
3971 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
3976 #: ../edit/virt-edit.pod:221
3978 "What really happens is that the snippet is evaluated as a Perl expression "
3979 "for each line of the file. The line, including the final C<\\n>, is passed "
3980 "in C<$_> and the expression should update C<$_> or leave it unchanged."
3984 #: ../edit/virt-edit.pod:226
3986 "To delete a line, set C<$_> to the empty string. For example, to delete the "
3987 "C<apache> user account from the password file you can do:"
3991 #: ../edit/virt-edit.pod:229
3994 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
3999 #: ../edit/virt-edit.pod:231
4001 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4002 "the end of the file is rather difficult this way since there is no concept "
4003 "of \"last line of the file\" - your expression just doesn't get called "
4004 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4009 #: ../edit/virt-edit.pod:237
4011 "The variable C<$lineno> contains the current line number. As is "
4012 "traditional, the first line in the file is number C<1>."
4016 #: ../edit/virt-edit.pod:240
4018 "The return value from the expression is ignored, but the expression may call "
4019 "C<die> in order to abort the whole program, leaving the original file "
4024 #: ../edit/virt-edit.pod:244
4026 "Remember when matching the end of a line that C<$_> may contain the final "
4027 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4028 "newline then neither of these. Thus to match or substitute some text at the "
4029 "end of a line, use this regular expression:"
4033 #: ../edit/virt-edit.pod:249
4036 " /some text(\\r?\\n)?$/\n"
4041 #: ../edit/virt-edit.pod:251
4043 "Alternately, use the perl C<chomp> function, being careful not to chomp "
4044 "C<$_> itself (since that would remove all newlines from the file):"
4048 #: ../edit/virt-edit.pod:255
4051 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4056 #: ../edit/virt-edit.pod:259
4058 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4059 "paths (eg. C<E:\\foo\\bar.txt>)."
4063 #: ../edit/virt-edit.pod:278
4065 "The path is resolved case insensitively to locate the file that should be "
4070 #: ../edit/virt-edit.pod:299
4072 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4073 "C<virt-edit> doesn't work."
4077 #: ../edit/virt-edit.pod:302
4078 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4082 #: ../edit/virt-edit.pod:304
4085 " guestfish --rw -i -d domname edit /file\n"
4090 #: ../edit/virt-edit.pod:306
4092 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4097 #: ../edit/virt-edit.pod:309
4099 "The command above uses libguestfs's guest inspection feature and so does not "
4100 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4101 "disk images that don't contain guests. To edit a file on a disk image "
4106 #: ../edit/virt-edit.pod:314
4109 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4114 #: ../edit/virt-edit.pod:316
4116 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4117 "the disk image to edit, and C</file> is the full path to the file."
4121 #: ../edit/virt-edit.pod:320
4123 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4124 "C<write> or C<upload> instead:"
4128 #: ../edit/virt-edit.pod:323
4131 " guestfish --rw -i -d domname touch /newfile\n"
4136 #: ../edit/virt-edit.pod:325
4139 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4144 #: ../edit/virt-edit.pod:327
4147 " guestfish --rw -i -d domname upload localfile /newfile\n"
4152 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119 ../rescue/virt-rescue.pod:298 ../sparsify/virt-sparsify.pod:256 ../src/guestfs.pod:3214 ../test-tool/libguestfs-test-tool.pod:95
4153 msgid "ENVIRONMENT VARIABLES"
4157 #: ../edit/virt-edit.pod:333
4162 #: ../edit/virt-edit.pod:335
4164 "If set, this string is used as the editor. It may contain arguments, "
4165 "eg. C<\"emacs -nw\">"
4169 #: ../edit/virt-edit.pod:338
4170 msgid "If not set, C<vi> is used."
4174 #: ../edit/virt-edit.pod:356
4176 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
4177 "L<virt-tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
4178 "L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4182 #: ../erlang/examples/guestfs-erlang.pod:5
4183 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4187 #: ../erlang/examples/guestfs-erlang.pod:9
4190 " {ok, G} = guestfs:create(),\n"
4191 " ok = guestfs:add_drive_opts(G, Disk,\n"
4192 " [{format, \"raw\"}, {readonly, true}]),\n"
4193 " ok = guestfs:launch(G),\n"
4194 " [Device] = guestfs:list_devices(G),\n"
4195 " ok = guestfs:close(G).\n"
4200 #: ../erlang/examples/guestfs-erlang.pod:18
4202 "This manual page documents how to call libguestfs from the Erlang "
4203 "programming language. This page just documents the differences from the C "
4204 "API and gives some examples. If you are not familiar with using libguestfs, "
4205 "you also need to read L<guestfs(3)>."
4209 #: ../erlang/examples/guestfs-erlang.pod:23
4210 msgid "OPENING AND CLOSING THE HANDLE"
4214 #: ../erlang/examples/guestfs-erlang.pod:25
4216 "The Erlang bindings are implemented using an external program called "
4217 "C<erl-guestfs>. This program must be on the current PATH, or else you "
4218 "should specify the full path to the program:"
4222 #: ../erlang/examples/guestfs-erlang.pod:29
4225 " {ok, G} = guestfs:create().\n"
4230 #: ../erlang/examples/guestfs-erlang.pod:31
4233 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4238 #: ../erlang/examples/guestfs-erlang.pod:33
4239 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4243 #: ../erlang/examples/guestfs-erlang.pod:36
4244 msgid "To close the handle:"
4248 #: ../erlang/examples/guestfs-erlang.pod:38
4251 " ok = guestfs:close(G).\n"
4256 #: ../erlang/examples/guestfs-erlang.pod:40
4257 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4261 #: ../erlang/examples/guestfs-erlang.pod:42
4263 "For functions that take optional arguments, the first arguments are the "
4264 "non-optional ones. The last argument is a list of tuples supplying the "
4265 "remaining optional arguments."
4269 #: ../erlang/examples/guestfs-erlang.pod:46
4272 " ok = guestfs:add_drive_opts(G, Disk,\n"
4273 " [{format, \"raw\"}, {readonly, true}]).\n"
4278 #: ../erlang/examples/guestfs-erlang.pod:49
4279 msgid "If the last argument would be an empty list, you can also omit it:"
4283 #: ../erlang/examples/guestfs-erlang.pod:51
4286 " ok = guestfs:add_drive_opts(G, Disk).\n"
4291 #: ../erlang/examples/guestfs-erlang.pod:53
4292 msgid "RETURN VALUES AND ERRORS"
4296 #: ../erlang/examples/guestfs-erlang.pod:55
4298 "On success, most functions return a C<Result> term (which could be a list, "
4299 "string, tuple etc.). If there is nothing for the function to return, then "
4300 "the atom C<ok> is returned."
4304 #: ../erlang/examples/guestfs-erlang.pod:59
4305 msgid "On error, you would see one of the following tuples:"
4309 #: ../erlang/examples/guestfs-erlang.pod:63
4310 msgid "C<{error, Msg, Errno}>"
4314 #: ../erlang/examples/guestfs-erlang.pod:65
4315 msgid "This indicates an ordinary error from the function."
4319 #: ../erlang/examples/guestfs-erlang.pod:67
4321 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4326 #: ../erlang/examples/guestfs-erlang.pod:70
4327 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4331 #: ../erlang/examples/guestfs-erlang.pod:72
4332 msgid "C<{unknown, Function}>"
4336 #: ../erlang/examples/guestfs-erlang.pod:74
4338 "This indicates that the function you called is not known. Generally this "
4339 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4340 "which you should not do."
4344 #: ../erlang/examples/guestfs-erlang.pod:78
4345 msgid "C<Function> is the name of the unknown function."
4349 #: ../erlang/examples/guestfs-erlang.pod:80
4350 msgid "C<{unknownarg, Arg}>"
4354 #: ../erlang/examples/guestfs-erlang.pod:82
4356 "This indicates that you called a function with optional arguments, with an "
4357 "unknown argument name."
4361 #: ../erlang/examples/guestfs-erlang.pod:85
4362 msgid "C<Arg> is the name of the unknown argument."
4366 #: ../erlang/examples/guestfs-erlang.pod:89 ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37 ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31 ../python/examples/guestfs-python.pod:34 ../ruby/examples/guestfs-ruby.pod:28
4367 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4371 #: ../erlang/examples/guestfs-erlang.pod:91 ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39 ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33 ../python/examples/guestfs-python.pod:36 ../ruby/examples/guestfs-ruby.pod:30
4376 #: ../erlang/examples/guestfs-erlang.pod:93 ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41 ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35 ../python/examples/guestfs-python.pod:38 ../ruby/examples/guestfs-ruby.pod:32
4377 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4381 #: ../erlang/examples/guestfs-erlang.pod:95 ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43 ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37 ../python/examples/guestfs-python.pod:40 ../ruby/examples/guestfs-ruby.pod:34
4386 #: ../erlang/examples/guestfs-erlang.pod:99
4388 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, "
4389 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
4390 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://www.erlang.org/>. "
4391 "L<http://libguestfs.org/>."
4395 #: ../erlang/examples/guestfs-erlang.pod:110 ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397 ../examples/guestfs-testing.pod:298 ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60 ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58 ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328 ../inspector/virt-inspector.pod:404 ../java/examples/guestfs-java.pod:58 ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52 ../python/examples/guestfs-python.pod:54 ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3354 ../test-tool/libguestfs-test-tool.pod:106
4400 #: ../erlang/examples/guestfs-erlang.pod:112 ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399 ../examples/guestfs-testing.pod:300 ../fish/guestfish.pod:1298 ../fish/virt-copy-in.pod:62 ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60 ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:330 ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93 ../perl/examples/guestfs-perl.pod:54 ../python/examples/guestfs-python.pod:56 ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3356 ../test-tool/libguestfs-test-tool.pod:108
4401 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4405 #: ../erlang/examples/guestfs-erlang.pod:116 ../examples/guestfs-testing.pod:304 ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4406 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4410 #: ../erlang/examples/guestfs-erlang.pod:118 ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405 ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99 ../perl/examples/guestfs-perl.pod:60 ../python/examples/guestfs-python.pod:62 ../ruby/examples/guestfs-ruby.pod:56
4412 "The examples in this manual page may be freely copied, modified and "
4413 "distributed without any restrictions."
4417 #: ../erlang/examples/guestfs-erlang.pod:121 ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408 ../examples/guestfs-testing.pod:306 ../java/examples/guestfs-java.pod:69 ../ocaml/examples/guestfs-ocaml.pod:102 ../perl/examples/guestfs-perl.pod:63 ../python/examples/guestfs-python.pod:65 ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3363
4419 "This library is free software; you can redistribute it and/or modify it "
4420 "under the terms of the GNU Lesser General Public License as published by the "
4421 "Free Software Foundation; either version 2 of the License, or (at your "
4422 "option) any later version."
4426 #: ../erlang/examples/guestfs-erlang.pod:126 ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413 ../examples/guestfs-testing.pod:311 ../java/examples/guestfs-java.pod:74 ../ocaml/examples/guestfs-ocaml.pod:107 ../perl/examples/guestfs-perl.pod:68 ../python/examples/guestfs-python.pod:70 ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3368
4428 "This library is distributed in the hope that it will be useful, but WITHOUT "
4429 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4430 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4435 #: ../erlang/examples/guestfs-erlang.pod:131 ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418 ../examples/guestfs-testing.pod:316 ../java/examples/guestfs-java.pod:79 ../ocaml/examples/guestfs-ocaml.pod:112 ../perl/examples/guestfs-perl.pod:73 ../python/examples/guestfs-python.pod:75 ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3373
4437 "You should have received a copy of the GNU Lesser General Public License "
4438 "along with this library; if not, write to the Free Software Foundation, "
4439 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4443 #: ../examples/guestfs-examples.pod:5
4444 msgid "guestfs-examples - Examples of using libguestfs from C"
4448 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4451 " #include <guestfs.h>\n"
4456 #: ../examples/guestfs-examples.pod:11
4459 " guestfs_h *g = guestfs_create ();\n"
4460 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4461 " guestfs_launch (g);\n"
4466 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4469 " cc prog.c -o prog -lguestfs\n"
4471 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4476 #: ../examples/guestfs-examples.pod:21
4478 "This manual page contains examples of calling libguestfs from the C "
4479 "programming language. If you are not familiar with using libguestfs, you "
4480 "also need to read L<guestfs(3)>."
4484 #: ../examples/guestfs-examples.pod:35
4486 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
4487 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
4488 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4492 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97 ../python/examples/guestfs-python.pod:60 ../ruby/examples/guestfs-ruby.pod:54
4493 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4497 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4502 #: ../examples/guestfs-recipes.pod:5
4504 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4505 "here. The only way which works for both sorts of output is to just write "
4506 "the URL directly. Do NOT use L<...> for URLs."
4510 #: ../examples/guestfs-recipes.pod:9
4512 "We break with tradition here and don't use ALL CAPS for the section "
4513 "headings, as this makes them much easier to read."
4517 #: ../examples/guestfs-recipes.pod:16
4518 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4522 #: ../examples/guestfs-recipes.pod:20
4524 "This page contains recipes for and links to things you can do using "
4525 "libguestfs, L<guestfish(1)> and the virt tools."
4529 #: ../examples/guestfs-recipes.pod:23
4530 msgid "Audit a virtual machine for setuid files"
4534 #: ../examples/guestfs-recipes.pod:25
4536 "The link below contains a small program which can be used to audit a Linux "
4537 "virtual machine to see what setuid and setgid files it contains."
4541 #: ../examples/guestfs-recipes.pod:28
4542 msgid "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-files/#content"
4546 #: ../examples/guestfs-recipes.pod:30
4547 msgid "Change the background image in a Windows XP VM"
4551 #: ../examples/guestfs-recipes.pod:32
4553 "The links below explain how to use L<guestfish(1)> to change the background "
4554 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
4555 "be substantially different for each version of Windows."
4559 #: ../examples/guestfs-recipes.pod:37
4561 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html "
4562 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4566 #: ../examples/guestfs-recipes.pod:40
4567 msgid "Cloning a virtual machine (Linux)"
4571 #: ../examples/guestfs-recipes.pod:42
4573 "The guestfish technique described in the link below works well for most "
4574 "Linux VMs. Depending on the Linux distro you may need to change the paths "
4579 #: ../examples/guestfs-recipes.pod:46
4580 msgid "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/#content"
4584 #: ../examples/guestfs-recipes.pod:48
4586 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
4591 #: ../examples/guestfs-recipes.pod:51
4592 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4596 #: ../examples/guestfs-recipes.pod:53
4597 msgid "Cloning a virtual machine (Windows)"
4601 #: ../examples/guestfs-recipes.pod:55
4603 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
4604 "straightforward. Currently there is code in the Aeolus Oz project which "
4605 "does this (using libguestfs). As part of our review of the virt-clone tool, "
4606 "we may add sysprepping ability."
4610 #: ../examples/guestfs-recipes.pod:60
4612 "https://github.com/clalancette/oz "
4613 "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4617 #: ../examples/guestfs-recipes.pod:63
4618 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
4622 #: ../examples/guestfs-recipes.pod:65
4623 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
4627 #: ../examples/guestfs-recipes.pod:67
4630 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
4635 #: ../examples/guestfs-recipes.pod:69
4636 msgid "To export just a subdirectory, eg. C</files>, do:"
4640 #: ../examples/guestfs-recipes.pod:71
4643 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
4648 #: ../examples/guestfs-recipes.pod:73
4649 msgid "Create empty disk images"
4653 #: ../examples/guestfs-recipes.pod:75
4655 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
4656 "The useful guide below explains the options available."
4660 #: ../examples/guestfs-recipes.pod:78
4661 msgid "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/#content"
4665 #: ../examples/guestfs-recipes.pod:80
4666 msgid "Dump raw filesystem content from inside a disk image or VM"
4670 #: ../examples/guestfs-recipes.pod:82
4672 "You can use the L<guestfish(1)> C<download> command to extract the raw "
4673 "filesystem content from any filesystem in a disk image or a VM (even one "
4674 "which is encrypted or buried inside an LV):"
4678 #: ../examples/guestfs-recipes.pod:86
4681 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
4686 #: ../examples/guestfs-recipes.pod:88
4689 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
4694 #: ../examples/guestfs-recipes.pod:90
4695 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
4699 #: ../examples/guestfs-recipes.pod:92
4700 msgid "Edit grub configuration in a VM"
4704 #: ../examples/guestfs-recipes.pod:94
4705 msgid "You can use this to:"
4709 #: ../examples/guestfs-recipes.pod:100
4710 msgid "Fix a virtual machine that does not boot."
4714 #: ../examples/guestfs-recipes.pod:104
4715 msgid "Change which kernel is used to boot the VM."
4719 #: ../examples/guestfs-recipes.pod:108
4720 msgid "Change kernel command line options."
4724 #: ../examples/guestfs-recipes.pod:112
4725 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
4729 #: ../examples/guestfs-recipes.pod:114
4732 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
4737 #: ../examples/guestfs-recipes.pod:116
4739 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
4744 #: ../examples/guestfs-recipes.pod:119
4747 " virt-rescue -d BrokenGuest\n"
4752 #: ../examples/guestfs-recipes.pod:121
4753 msgid "Export any directory from a VM"
4757 #: ../examples/guestfs-recipes.pod:123
4758 msgid "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
4762 #: ../examples/guestfs-recipes.pod:126 ../examples/guestfs-testing.pod:93
4765 " virt-copy-out -d Guest /home .\n"
4770 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1481 ../fish/guestfish-actions.pod:1746 ../fish/guestfish-actions.pod:2163 ../src/guestfs-actions.pod:18 ../src/guestfs-actions.pod:2373 ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:3356 ../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:972 ../fish/guestfish-actions.pod:1007 ../fish/guestfish-actions.pod:1180 ../fish/guestfish-actions.pod:1540 ../fish/guestfish-actions.pod:1554 ../fish/guestfish-actions.pod:3423 ../fish/guestfish-actions.pod:3734 ../fish/guestfish-actions.pod:3782 ../fish/guestfish-actions.pod:4700 ../fish/guestfish-actions.pod:4720 ../fish/guestfish-actions.pod:4739 ../fish/guestfish-actions.pod:4777 ../fish/guestfish-actions.pod:5505 ../fish/guestfish-actions.pod:5608 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326 ../src/guestfs-actions.pod:1619 ../src/guestfs-actions.pod:1676 ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2458 ../src/guestfs-actions.pod:2479 ../src/guestfs-actions.pod:5281 ../src/guestfs-actions.pod:5803 ../src/guestfs-actions.pod:5903 ../src/guestfs-actions.pod:7199 ../src/guestfs-actions.pod:7240 ../src/guestfs-actions.pod:7271 ../src/guestfs-actions.pod:7331 ../src/guestfs-actions.pod:8385 ../src/guestfs-actions.pod:8494 ../src/guestfs-actions.pod:8674
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:655 ../fish/guestfish-actions.pod:866 ../fish/guestfish-actions.pod:887 ../fish/guestfish-actions.pod:925 ../fish/guestfish-actions.pod:934 ../fish/guestfish-actions.pod:943 ../fish/guestfish-actions.pod:957 ../fish/guestfish-actions.pod:2202 ../fish/guestfish-actions.pod:3250 ../fish/guestfish-actions.pod:3472 ../fish/guestfish-actions.pod:3635 ../fish/guestfish-actions.pod:3770 ../fish/guestfish-actions.pod:5141
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:3434 ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5318
6300 msgid "The optional arguments are:"
6304 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6309 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6311 "If true then the image is treated as read-only. Writes are still allowed, "
6312 "but they are stored in a temporary snapshot overlay which is discarded at "
6313 "the end. The disk that you add is not modified."
6317 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6322 #: ../fish/guestfish-actions.pod:173
6324 "This forces the image format. If you omit this (or use L</add-drive> or "
6325 "L</add-drive-ro>) then the format is automatically detected. Possible "
6326 "formats include C<raw> and C<qcow2>."
6330 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6332 "Automatic detection of the format opens you up to a potential security hole "
6333 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6334 "RHBZ#642934. Specifying the format closes this security hole."
6338 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6343 #: ../fish/guestfish-actions.pod:184
6345 "This rarely-used option lets you emulate the behaviour of the deprecated "
6346 "L</add-drive-with-if> call (q.v.)"
6350 #: ../fish/guestfish-actions.pod:187 ../fish/guestfish-actions.pod:3277 ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:5039
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:780 ../fish/guestfish-actions.pod:864 ../fish/guestfish-actions.pod:885 ../fish/guestfish-actions.pod:1056 ../fish/guestfish-actions.pod:1075 ../fish/guestfish-actions.pod:1449 ../fish/guestfish-actions.pod:4997 ../fish/guestfish-actions.pod:5009 ../fish/guestfish-actions.pod:5020 ../fish/guestfish-actions.pod:5031 ../fish/guestfish-actions.pod:5162 ../fish/guestfish-actions.pod:5171 ../fish/guestfish-actions.pod:5225 ../fish/guestfish-actions.pod:5248
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
7024 #: ../fish/guestfish-actions.pod:504
7032 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
7034 "This command returns block device attributes for C<device>. The following "
7035 "fields are usually present in the returned hash. Other fields may also be "
7040 #: ../fish/guestfish-actions.pod:511 ../src/guestfs-actions.pod:734
7045 #: ../fish/guestfish-actions.pod:513 ../src/guestfs-actions.pod:736
7046 msgid "The uuid of this device."
7050 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:738
7055 #: ../fish/guestfish-actions.pod:517 ../src/guestfs-actions.pod:740
7056 msgid "The label of this device."
7060 #: ../fish/guestfish-actions.pod:519 ../src/guestfs-actions.pod:742
7065 #: ../fish/guestfish-actions.pod:521 ../src/guestfs-actions.pod:744
7066 msgid "The version of blkid command."
7070 #: ../fish/guestfish-actions.pod:523 ../src/guestfs-actions.pod:746
7075 #: ../fish/guestfish-actions.pod:525 ../src/guestfs-actions.pod:748
7076 msgid "The filesystem type or RAID of this device."
7080 #: ../fish/guestfish-actions.pod:527 ../src/guestfs-actions.pod:750
7085 #: ../fish/guestfish-actions.pod:529 ../src/guestfs-actions.pod:752
7086 msgid "The usage of this device, for example C<filesystem> or C<raid>."
7090 #: ../fish/guestfish-actions.pod:533
7091 msgid "blockdev-flushbufs"
7095 #: ../fish/guestfish-actions.pod:535
7098 " blockdev-flushbufs device\n"
7103 #: ../fish/guestfish-actions.pod:537 ../src/guestfs-actions.pod:768
7104 msgid "This tells the kernel to flush internal buffers associated with C<device>."
7108 #: ../fish/guestfish-actions.pod:540 ../fish/guestfish-actions.pod:551 ../fish/guestfish-actions.pod:560 ../fish/guestfish-actions.pod:570 ../fish/guestfish-actions.pod:582 ../fish/guestfish-actions.pod:595 ../fish/guestfish-actions.pod:603 ../fish/guestfish-actions.pod:614 ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:771 ../src/guestfs-actions.pod:788 ../src/guestfs-actions.pod:803 ../src/guestfs-actions.pod:819 ../src/guestfs-actions.pod:837 ../src/guestfs-actions.pod:856 ../src/guestfs-actions.pod:870 ../src/guestfs-actions.pod:888 ../src/guestfs-actions.pod:902 ../src/guestfs-actions.pod:916
7109 msgid "This uses the L<blockdev(8)> command."
7113 #: ../fish/guestfish-actions.pod:542
7114 msgid "blockdev-getbsz"
7118 #: ../fish/guestfish-actions.pod:544
7121 " blockdev-getbsz device\n"
7126 #: ../fish/guestfish-actions.pod:546 ../src/guestfs-actions.pod:783
7127 msgid "This returns the block size of a device."
7131 #: ../fish/guestfish-actions.pod:548 ../fish/guestfish-actions.pod:611 ../src/guestfs-actions.pod:785 ../src/guestfs-actions.pod:885
7133 "(Note this is different from both I<size in blocks> and I<filesystem block "
7138 #: ../fish/guestfish-actions.pod:553
7139 msgid "blockdev-getro"
7143 #: ../fish/guestfish-actions.pod:555
7146 " blockdev-getro device\n"
7151 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:800
7153 "Returns a boolean indicating if the block device is read-only (true if "
7154 "read-only, false if not)."
7158 #: ../fish/guestfish-actions.pod:562
7159 msgid "blockdev-getsize64"
7163 #: ../fish/guestfish-actions.pod:564
7166 " blockdev-getsize64 device\n"
7171 #: ../fish/guestfish-actions.pod:566 ../src/guestfs-actions.pod:815
7172 msgid "This returns the size of the device in bytes."
7176 #: ../fish/guestfish-actions.pod:568
7177 msgid "See also L</blockdev-getsz>."
7181 #: ../fish/guestfish-actions.pod:572
7182 msgid "blockdev-getss"
7186 #: ../fish/guestfish-actions.pod:574
7189 " blockdev-getss device\n"
7194 #: ../fish/guestfish-actions.pod:576 ../src/guestfs-actions.pod:831
7196 "This returns the size of sectors on a block device. Usually 512, but can be "
7197 "larger for modern devices."
7201 #: ../fish/guestfish-actions.pod:579
7202 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
7206 #: ../fish/guestfish-actions.pod:584
7207 msgid "blockdev-getsz"
7211 #: ../fish/guestfish-actions.pod:586
7214 " blockdev-getsz device\n"
7219 #: ../fish/guestfish-actions.pod:588 ../src/guestfs-actions.pod:849
7221 "This returns the size of the device in units of 512-byte sectors (even if "
7222 "the sectorsize isn't 512 bytes ... weird)."
7226 #: ../fish/guestfish-actions.pod:591
7228 "See also L</blockdev-getss> for the real sector size of the device, and "
7229 "L</blockdev-getsize64> for the more useful I<size in bytes>."
7233 #: ../fish/guestfish-actions.pod:597
7234 msgid "blockdev-rereadpt"
7238 #: ../fish/guestfish-actions.pod:599
7241 " blockdev-rereadpt device\n"
7246 #: ../fish/guestfish-actions.pod:601 ../src/guestfs-actions.pod:868
7247 msgid "Reread the partition table on C<device>."
7251 #: ../fish/guestfish-actions.pod:605
7252 msgid "blockdev-setbsz"
7256 #: ../fish/guestfish-actions.pod:607
7259 " blockdev-setbsz device blocksize\n"
7264 #: ../fish/guestfish-actions.pod:609 ../src/guestfs-actions.pod:883
7265 msgid "This sets the block size of a device."
7269 #: ../fish/guestfish-actions.pod:616
7270 msgid "blockdev-setro"
7274 #: ../fish/guestfish-actions.pod:618
7277 " blockdev-setro device\n"
7282 #: ../fish/guestfish-actions.pod:620 ../src/guestfs-actions.pod:900
7283 msgid "Sets the block device named C<device> to read-only."
7287 #: ../fish/guestfish-actions.pod:624
7288 msgid "blockdev-setrw"
7292 #: ../fish/guestfish-actions.pod:626
7295 " blockdev-setrw device\n"
7300 #: ../fish/guestfish-actions.pod:628 ../src/guestfs-actions.pod:914
7301 msgid "Sets the block device named C<device> to read-write."
7305 #: ../fish/guestfish-actions.pod:632
7306 msgid "btrfs-filesystem-resize"
7310 #: ../fish/guestfish-actions.pod:634
7313 " btrfs-filesystem-resize mountpoint [size:N]\n"
7318 #: ../fish/guestfish-actions.pod:636 ../src/guestfs-actions.pod:936
7319 msgid "This command resizes a btrfs filesystem."
7323 #: ../fish/guestfish-actions.pod:638 ../src/guestfs-actions.pod:938
7325 "Note that unlike other resize calls, the filesystem has to be mounted and "
7326 "the parameter is the mountpoint not the device (this is a requirement of "
7331 #: ../fish/guestfish-actions.pod:642 ../fish/guestfish-actions.pod:3199 ../fish/guestfish-actions.pod:3745 ../fish/guestfish-actions.pod:5071 ../src/guestfs-actions.pod:942 ../src/guestfs-actions.pod:4935 ../src/guestfs-actions.pod:5842 ../src/guestfs-actions.pod:7818
7332 msgid "The optional parameters are:"
7336 #: ../fish/guestfish-actions.pod:646 ../fish/guestfish-actions.pod:3749 ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:5846
7341 #: ../fish/guestfish-actions.pod:648 ../src/guestfs-actions.pod:948
7343 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7344 "resized to the maximum size."
7348 #: ../fish/guestfish-actions.pod:653 ../src/guestfs-actions.pod:953
7349 msgid "See also L<btrfs(8)>."
7353 #: ../fish/guestfish-actions.pod:657
7354 msgid "case-sensitive-path"
7358 #: ../fish/guestfish-actions.pod:659
7361 " case-sensitive-path path\n"
7366 #: ../fish/guestfish-actions.pod:661 ../src/guestfs-actions.pod:987
7368 "This can be used to resolve case insensitive paths on a filesystem which is "
7369 "case sensitive. The use case is to resolve paths which you have read from "
7370 "Windows configuration files or the Windows Registry, to the true path."
7374 #: ../fish/guestfish-actions.pod:666 ../src/guestfs-actions.pod:992
7376 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7377 "(and probably others), which is that although the underlying filesystem is "
7378 "case-insensitive, the driver exports the filesystem to Linux as "
7383 #: ../fish/guestfish-actions.pod:671 ../src/guestfs-actions.pod:997
7385 "One consequence of this is that special directories such as C<c:\\windows> "
7386 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7387 "precise details of how they were created. In Windows itself this would not "
7392 #: ../fish/guestfish-actions.pod:677 ../src/guestfs-actions.pod:1003
7394 "Bug or feature? You decide: "
7395 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
7399 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1006
7401 "This function resolves the true case of each element in the path and returns "
7402 "the case-sensitive path."
7406 #: ../fish/guestfish-actions.pod:683
7408 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
7409 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7410 "how the directories were originally created under Windows)."
7414 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1014
7415 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7419 #: ../fish/guestfish-actions.pod:691
7420 msgid "See also L</realpath>."
7424 #: ../fish/guestfish-actions.pod:693
7429 #: ../fish/guestfish-actions.pod:695
7437 #: ../fish/guestfish-actions.pod:697 ../fish/guestfish-actions.pod:4176 ../src/guestfs-actions.pod:1030 ../src/guestfs-actions.pod:6502
7438 msgid "Return the contents of the file named C<path>."
7442 #: ../fish/guestfish-actions.pod:699
7444 "Note that this function cannot correctly handle binary files (specifically, "
7445 "files containing C<\\0> character which is treated as end of string). For "
7446 "those you need to use the L</read-file> or L</download> functions which have "
7447 "a more complex interface."
7451 #: ../fish/guestfish-actions.pod:704 ../fish/guestfish-actions.pod:839 ../fish/guestfish-actions.pod:851 ../fish/guestfish-actions.pod:1134 ../fish/guestfish-actions.pod:1144 ../fish/guestfish-actions.pod:1211 ../fish/guestfish-actions.pod:1221 ../fish/guestfish-actions.pod:1413 ../fish/guestfish-actions.pod:1726 ../fish/guestfish-actions.pod:1736 ../fish/guestfish-actions.pod:1786 ../fish/guestfish-actions.pod:1801 ../fish/guestfish-actions.pod:1811 ../fish/guestfish-actions.pod:1830 ../fish/guestfish-actions.pod:4046 ../fish/guestfish-actions.pod:4061 ../fish/guestfish-actions.pod:4137 ../fish/guestfish-actions.pod:4154 ../fish/guestfish-actions.pod:4169 ../fish/guestfish-actions.pod:4838 ../fish/guestfish-actions.pod:4884 ../fish/guestfish-actions.pod:4969 ../fish/guestfish-actions.pod:4984 ../fish/guestfish-actions.pod:5469 ../fish/guestfish-actions.pod:5481 ../fish/guestfish-actions.pod:5499 ../fish/guestfish-actions.pod:5516 ../fish/guestfish-actions.pod:5526 ../fish/guestfish-actions.pod:5580 ../fish/guestfish-actions.pod:5590 ../fish/guestfish-actions.pod:5619 ../fish/guestfish-actions.pod:5629 ../src/guestfs-actions.pod:1040 ../src/guestfs-actions.pod:1219 ../src/guestfs-actions.pod:1239 ../src/guestfs-actions.pod:1894 ../src/guestfs-actions.pod:1913 ../src/guestfs-actions.pod:2016 ../src/guestfs-actions.pod:2035 ../src/guestfs-actions.pod:2281 ../src/guestfs-actions.pod:2763 ../src/guestfs-actions.pod:2782 ../src/guestfs-actions.pod:2847 ../src/guestfs-actions.pod:2871 ../src/guestfs-actions.pod:2888 ../src/guestfs-actions.pod:2917 ../src/guestfs-actions.pod:6284 ../src/guestfs-actions.pod:6310 ../src/guestfs-actions.pod:6441 ../src/guestfs-actions.pod:6467 ../src/guestfs-actions.pod:6491 ../src/guestfs-actions.pod:7446 ../src/guestfs-actions.pod:7501 ../src/guestfs-actions.pod:7647 ../src/guestfs-actions.pod:7671 ../src/guestfs-actions.pod:8458 ../src/guestfs-actions.pod:8478 ../src/guestfs-actions.pod:8511 ../src/guestfs-actions.pod:8530 ../src/guestfs-actions.pod:8549 ../src/guestfs-actions.pod:8640 ../src/guestfs-actions.pod:8659 ../src/guestfs-actions.pod:8705 ../src/guestfs-actions.pod:8724
7453 "Because of the message protocol, there is a transfer limit of somewhere "
7454 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7458 #: ../fish/guestfish-actions.pod:707
7463 #: ../fish/guestfish-actions.pod:709
7466 " checksum csumtype path\n"
7471 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1052
7472 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7476 #: ../fish/guestfish-actions.pod:714 ../src/guestfs-actions.pod:1055
7478 "The type of checksum to compute is given by the C<csumtype> parameter which "
7479 "must have one of the following values:"
7483 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1060
7488 #: ../fish/guestfish-actions.pod:721 ../src/guestfs-actions.pod:1062
7490 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7495 #: ../fish/guestfish-actions.pod:724 ../src/guestfs-actions.pod:1065
7500 #: ../fish/guestfish-actions.pod:726 ../src/guestfs-actions.pod:1067
7501 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7505 #: ../fish/guestfish-actions.pod:728 ../src/guestfs-actions.pod:1069
7510 #: ../fish/guestfish-actions.pod:730 ../src/guestfs-actions.pod:1071
7511 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7515 #: ../fish/guestfish-actions.pod:732 ../src/guestfs-actions.pod:1073
7520 #: ../fish/guestfish-actions.pod:734 ../src/guestfs-actions.pod:1075
7521 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7525 #: ../fish/guestfish-actions.pod:736 ../src/guestfs-actions.pod:1077
7530 #: ../fish/guestfish-actions.pod:738 ../src/guestfs-actions.pod:1079
7531 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7535 #: ../fish/guestfish-actions.pod:740 ../src/guestfs-actions.pod:1081
7540 #: ../fish/guestfish-actions.pod:742 ../src/guestfs-actions.pod:1083
7541 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7545 #: ../fish/guestfish-actions.pod:744 ../src/guestfs-actions.pod:1085
7550 #: ../fish/guestfish-actions.pod:746 ../src/guestfs-actions.pod:1087
7551 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7555 #: ../fish/guestfish-actions.pod:750 ../src/guestfs-actions.pod:1091
7556 msgid "The checksum is returned as a printable string."
7560 #: ../fish/guestfish-actions.pod:752
7561 msgid "To get the checksum for a device, use L</checksum-device>."
7565 #: ../fish/guestfish-actions.pod:754
7566 msgid "To get the checksums for many files, use L</checksums-out>."
7570 #: ../fish/guestfish-actions.pod:756
7571 msgid "checksum-device"
7575 #: ../fish/guestfish-actions.pod:758
7578 " checksum-device csumtype device\n"
7583 #: ../fish/guestfish-actions.pod:760
7585 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7586 "device named C<device>. For the types of checksums supported see the "
7587 "L</checksum> command."
7591 #: ../fish/guestfish-actions.pod:764
7592 msgid "checksums-out"
7596 #: ../fish/guestfish-actions.pod:766
7599 " checksums-out csumtype directory (sumsfile|-)\n"
7604 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1126
7606 "This command computes the checksums of all regular files in C<directory> and "
7607 "then emits a list of those checksums to the local output file C<sumsfile>."
7611 #: ../fish/guestfish-actions.pod:772 ../src/guestfs-actions.pod:1130
7613 "This can be used for verifying the integrity of a virtual machine. However "
7614 "to be properly secure you should pay attention to the output of the checksum "
7615 "command (it uses the ones from GNU coreutils). In particular when the "
7616 "filename is not printable, coreutils uses a special backslash syntax. For "
7617 "more information, see the GNU coreutils info file."
7621 #: ../fish/guestfish-actions.pod:782
7626 #: ../fish/guestfish-actions.pod:784
7629 " chmod mode path\n"
7634 #: ../fish/guestfish-actions.pod:786 ../src/guestfs-actions.pod:1149
7636 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7641 #: ../fish/guestfish-actions.pod:789 ../src/guestfs-actions.pod:1152
7643 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7644 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7649 #: ../fish/guestfish-actions.pod:793 ../fish/guestfish-actions.pod:3398 ../fish/guestfish-actions.pod:3537 ../fish/guestfish-actions.pod:3547 ../fish/guestfish-actions.pod:3557 ../src/guestfs-actions.pod:1156 ../src/guestfs-actions.pod:5249 ../src/guestfs-actions.pod:5458 ../src/guestfs-actions.pod:5477 ../src/guestfs-actions.pod:5496
7650 msgid "The mode actually set is affected by the umask."
7654 #: ../fish/guestfish-actions.pod:795
7659 #: ../fish/guestfish-actions.pod:797
7662 " chown owner group path\n"
7667 #: ../fish/guestfish-actions.pod:799 ../src/guestfs-actions.pod:1170
7668 msgid "Change the file owner to C<owner> and group to C<group>."
7672 #: ../fish/guestfish-actions.pod:801 ../fish/guestfish-actions.pod:2738 ../src/guestfs-actions.pod:1172 ../src/guestfs-actions.pod:4167
7674 "Only numeric uid and gid are supported. If you want to use names, you will "
7675 "need to locate and parse the password file yourself (Augeas support makes "
7676 "this relatively easy)."
7680 #: ../fish/guestfish-actions.pod:805
7685 #: ../fish/guestfish-actions.pod:807
7688 " command 'arguments ...'\n"
7693 #: ../fish/guestfish-actions.pod:809 ../src/guestfs-actions.pod:1186
7695 "This call runs a command from the guest filesystem. The filesystem must be "
7696 "mounted, and must contain a compatible operating system (ie. something "
7697 "Linux, with the same or compatible processor architecture)."
7701 #: ../fish/guestfish-actions.pod:814
7703 "The single parameter is an argv-style list of arguments. The first element "
7704 "is the name of the program to run. Subsequent elements are parameters. The "
7705 "list must be non-empty (ie. must contain a program name). Note that the "
7706 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7710 #: ../fish/guestfish-actions.pod:821 ../src/guestfs-actions.pod:1198
7711 msgid "The return value is anything printed to I<stdout> by the command."
7715 #: ../fish/guestfish-actions.pod:824 ../src/guestfs-actions.pod:1201
7717 "If the command returns a non-zero exit status, then this function returns an "
7718 "error message. The error message string is the content of I<stderr> from "
7723 #: ../fish/guestfish-actions.pod:828 ../src/guestfs-actions.pod:1205
7725 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
7726 "C</bin>. If you require a program from another location, you should provide "
7727 "the full path in the first parameter."
7731 #: ../fish/guestfish-actions.pod:833 ../src/guestfs-actions.pod:1210
7733 "Shared libraries and data files required by the program must be available on "
7734 "filesystems which are mounted in the correct places. It is the caller's "
7735 "responsibility to ensure all filesystems that are needed are mounted at the "
7740 #: ../fish/guestfish-actions.pod:842
7741 msgid "command-lines"
7745 #: ../fish/guestfish-actions.pod:844
7748 " command-lines 'arguments ...'\n"
7753 #: ../fish/guestfish-actions.pod:846
7754 msgid "This is the same as L</command>, but splits the result into a list of lines."
7758 #: ../fish/guestfish-actions.pod:849
7759 msgid "See also: L</sh-lines>"
7763 #: ../fish/guestfish-actions.pod:854
7764 msgid "compress-device-out"
7768 #: ../fish/guestfish-actions.pod:856
7771 " compress-device-out ctype device (zdevice|-) [level:N]\n"
7776 #: ../fish/guestfish-actions.pod:858 ../src/guestfs-actions.pod:1260
7778 "This command compresses C<device> and writes it out to the local file "
7783 #: ../fish/guestfish-actions.pod:861
7785 "The C<ctype> and optional C<level> parameters have the same meaning as in "
7790 #: ../fish/guestfish-actions.pod:868
7791 msgid "compress-out"
7795 #: ../fish/guestfish-actions.pod:870
7798 " compress-out ctype file (zfile|-) [level:N]\n"
7803 #: ../fish/guestfish-actions.pod:872 ../src/guestfs-actions.pod:1312
7805 "This command compresses C<file> and writes it out to the local file "
7810 #: ../fish/guestfish-actions.pod:875 ../src/guestfs-actions.pod:1315
7812 "The compression program used is controlled by the C<ctype> parameter. "
7813 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7814 "Some compression types may not be supported by particular builds of "
7815 "libguestfs, in which case you will get an error containing the substring "
7816 "\"not supported\"."
7820 #: ../fish/guestfish-actions.pod:881 ../src/guestfs-actions.pod:1321
7822 "The optional C<level> parameter controls compression level. The meaning and "
7823 "default for this parameter depends on the compression program being used."
7827 #: ../fish/guestfish-actions.pod:889
7832 #: ../fish/guestfish-actions.pod:891
7835 " config qemuparam qemuvalue\n"
7840 #: ../fish/guestfish-actions.pod:893 ../src/guestfs-actions.pod:1362
7842 "This can be used to add arbitrary qemu command line parameters of the form "
7843 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7844 "setting some parameters which would interfere with parameters that we use."
7848 #: ../fish/guestfish-actions.pod:898 ../src/guestfs-actions.pod:1367
7849 msgid "The first character of C<param> string must be a C<-> (dash)."
7853 #: ../fish/guestfish-actions.pod:900 ../src/guestfs-actions.pod:1369
7854 msgid "C<value> can be NULL."
7858 #: ../fish/guestfish-actions.pod:902
7859 msgid "copy-device-to-device"
7863 #: ../fish/guestfish-actions.pod:904
7866 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7871 #: ../fish/guestfish-actions.pod:906
7873 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, "
7874 "L</copy-file-to-device>, and L</copy-file-to-file> let you copy from a "
7875 "source (device|file) to a destination (device|file)."
7879 #: ../fish/guestfish-actions.pod:913 ../src/guestfs-actions.pod:1399
7881 "Partial copies can be made since you can specify optionally the source "
7882 "offset, destination offset and size to copy. These values are all specified "
7883 "in bytes. If not given, the offsets both default to zero, and the size "
7884 "defaults to copying as much as possible until we hit the end of the source."
7888 #: ../fish/guestfish-actions.pod:919 ../src/guestfs-actions.pod:1405
7890 "The source and destination may be the same object. However overlapping "
7891 "regions may not be copied correctly."
7895 #: ../fish/guestfish-actions.pod:922 ../src/guestfs-actions.pod:1408
7897 "If the destination is a file, it is created if required. If the destination "
7898 "file is not large enough, it is extended."
7902 #: ../fish/guestfish-actions.pod:927
7903 msgid "copy-device-to-file"
7907 #: ../fish/guestfish-actions.pod:929
7910 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7915 #: ../fish/guestfish-actions.pod:931 ../fish/guestfish-actions.pod:940 ../fish/guestfish-actions.pod:949
7916 msgid "See L</copy-device-to-device> for a general overview of this call."
7920 #: ../fish/guestfish-actions.pod:936
7921 msgid "copy-file-to-device"
7925 #: ../fish/guestfish-actions.pod:938
7928 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7933 #: ../fish/guestfish-actions.pod:945
7934 msgid "copy-file-to-file"
7938 #: ../fish/guestfish-actions.pod:947
7941 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7946 #: ../fish/guestfish-actions.pod:952
7948 "This is B<not> the function you want for copying files. This is for copying "
7949 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7950 "file copying and moving functions."
7954 #: ../fish/guestfish-actions.pod:959
7959 #: ../fish/guestfish-actions.pod:961
7962 " copy-size src dest size\n"
7967 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1623
7969 "This command copies exactly C<size> bytes from one source device or file "
7970 "C<src> to another destination device or file C<dest>."
7974 #: ../fish/guestfish-actions.pod:966 ../src/guestfs-actions.pod:1626
7976 "Note this will fail if the source is too short or if the destination is not "
7981 #: ../fish/guestfish-actions.pod:969 ../fish/guestfish-actions.pod:1004
7983 "I<This function is deprecated.> In new code, use the "
7984 "L</copy_device_to_device> call instead."
7988 #: ../fish/guestfish-actions.pod:976
7993 #: ../fish/guestfish-actions.pod:978
8001 #: ../fish/guestfish-actions.pod:980 ../src/guestfs-actions.pod:1645
8003 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8004 "destination filename or destination directory."
8008 #: ../fish/guestfish-actions.pod:983
8013 #: ../fish/guestfish-actions.pod:985
8021 #: ../fish/guestfish-actions.pod:987 ../src/guestfs-actions.pod:1659
8023 "This copies a file or directory from C<src> to C<dest> recursively using the "
8028 #: ../fish/guestfish-actions.pod:990
8033 #: ../fish/guestfish-actions.pod:992
8041 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1680
8043 "This command copies from one source device or file C<src> to another "
8044 "destination device or file C<dest>. Normally you would use this to copy to "
8045 "or from a device or partition, for example to duplicate a filesystem."
8049 #: ../fish/guestfish-actions.pod:999
8051 "If the destination is a device, it must be as large or larger than the "
8052 "source file or device, otherwise the copy will fail. This command cannot do "
8053 "partial copies (see L</copy-device-to-device>)."
8057 #: ../fish/guestfish-actions.pod:1011
8062 #: ../fish/guestfish-actions.pod:1013
8070 #: ../fish/guestfish-actions.pod:1015 ../src/guestfs-actions.pod:1699
8071 msgid "This command runs the C<df> command to report disk space used."
8075 #: ../fish/guestfish-actions.pod:1017 ../fish/guestfish-actions.pod:1028
8077 "This command is mostly useful for interactive sessions. It is I<not> "
8078 "intended that you try to parse the output string. Use L</statvfs> from "
8083 #: ../fish/guestfish-actions.pod:1021
8088 #: ../fish/guestfish-actions.pod:1023
8096 #: ../fish/guestfish-actions.pod:1025 ../src/guestfs-actions.pod:1715
8098 "This command runs the C<df -h> command to report disk space used in "
8099 "human-readable format."
8103 #: ../fish/guestfish-actions.pod:1032
8108 #: ../fish/guestfish-actions.pod:1034
8116 #: ../fish/guestfish-actions.pod:1036 ../src/guestfs-actions.pod:1732
8118 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8119 "This is sometimes useful for extended debugging of problems."
8123 #: ../fish/guestfish-actions.pod:1040
8125 "Another way to get the same information is to enable verbose messages with "
8126 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
8127 "before running the program."
8131 #: ../fish/guestfish-actions.pod:1045
8136 #: ../fish/guestfish-actions.pod:1047
8139 " download remotefilename (filename|-)\n"
8144 #: ../fish/guestfish-actions.pod:1049 ../fish/guestfish-actions.pod:1062 ../src/guestfs-actions.pod:1753 ../src/guestfs-actions.pod:1778
8146 "Download file C<remotefilename> and save it as C<filename> on the local "
8151 #: ../fish/guestfish-actions.pod:1052 ../fish/guestfish-actions.pod:5221 ../src/guestfs-actions.pod:1756 ../src/guestfs-actions.pod:8028
8152 msgid "C<filename> can also be a named pipe."
8156 #: ../fish/guestfish-actions.pod:1054
8157 msgid "See also L</upload>, L</cat>."
8161 #: ../fish/guestfish-actions.pod:1058
8162 msgid "download-offset"
8166 #: ../fish/guestfish-actions.pod:1060
8169 " download-offset remotefilename (filename|-) offset size\n"
8174 #: ../fish/guestfish-actions.pod:1065 ../src/guestfs-actions.pod:1781
8176 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8177 "region must be within the file or device)."
8181 #: ../fish/guestfish-actions.pod:1068
8183 "Note that there is no limit on the amount of data that can be downloaded "
8184 "with this call, unlike with L</pread>, and this call always reads the full "
8185 "amount unless an error occurs."
8189 #: ../fish/guestfish-actions.pod:1073
8190 msgid "See also L</download>, L</pread>."
8194 #: ../fish/guestfish-actions.pod:1077
8199 #: ../fish/guestfish-actions.pod:1079
8202 " drop-caches whattodrop\n"
8207 #: ../fish/guestfish-actions.pod:1081 ../src/guestfs-actions.pod:1806
8209 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8210 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8211 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8215 #: ../fish/guestfish-actions.pod:1086 ../src/guestfs-actions.pod:1811
8216 msgid "Setting C<whattodrop> to 3 should drop everything."
8220 #: ../fish/guestfish-actions.pod:1088 ../src/guestfs-actions.pod:1813
8222 "This automatically calls L<sync(2)> before the operation, so that the "
8223 "maximum guest memory is freed."
8227 #: ../fish/guestfish-actions.pod:1091
8232 #: ../fish/guestfish-actions.pod:1093
8240 #: ../fish/guestfish-actions.pod:1095 ../src/guestfs-actions.pod:1826
8242 "This command runs the C<du -s> command to estimate file space usage for "
8247 #: ../fish/guestfish-actions.pod:1098 ../src/guestfs-actions.pod:1829
8249 "C<path> can be a file or a directory. If C<path> is a directory then the "
8250 "estimate includes the contents of the directory and all subdirectories "
8255 #: ../fish/guestfish-actions.pod:1102 ../src/guestfs-actions.pod:1833
8256 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8260 #: ../fish/guestfish-actions.pod:1105
8265 #: ../fish/guestfish-actions.pod:1107
8268 " e2fsck-f device\n"
8273 #: ../fish/guestfish-actions.pod:1109 ../src/guestfs-actions.pod:1851
8275 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8276 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8281 #: ../fish/guestfish-actions.pod:1113
8283 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8284 "should use L</fsck>."
8288 #: ../fish/guestfish-actions.pod:1116
8293 #: ../fish/guestfish-actions.pod:1118
8296 " echo-daemon 'words ...'\n"
8301 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1868
8303 "This command concatenates the list of C<words> passed with single spaces "
8304 "between them and returns the resulting string."
8308 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1871
8309 msgid "You can use this command to test the connection through to the daemon."
8313 #: ../fish/guestfish-actions.pod:1125
8314 msgid "See also L</ping-daemon>."
8318 #: ../fish/guestfish-actions.pod:1127
8323 #: ../fish/guestfish-actions.pod:1129
8326 " egrep regex path\n"
8331 #: ../fish/guestfish-actions.pod:1131 ../src/guestfs-actions.pod:1887
8332 msgid "This calls the external C<egrep> program and returns the matching lines."
8336 #: ../fish/guestfish-actions.pod:1137
8341 #: ../fish/guestfish-actions.pod:1139
8344 " egrepi regex path\n"
8349 #: ../fish/guestfish-actions.pod:1141 ../src/guestfs-actions.pod:1906
8350 msgid "This calls the external C<egrep -i> program and returns the matching lines."
8354 #: ../fish/guestfish-actions.pod:1147
8359 #: ../fish/guestfish-actions.pod:1149
8362 " equal file1 file2\n"
8367 #: ../fish/guestfish-actions.pod:1151 ../src/guestfs-actions.pod:1925
8369 "This compares the two files C<file1> and C<file2> and returns true if their "
8370 "content is exactly equal, or false otherwise."
8374 #: ../fish/guestfish-actions.pod:1154 ../src/guestfs-actions.pod:1928
8375 msgid "The external L<cmp(1)> program is used for the comparison."
8379 #: ../fish/guestfish-actions.pod:1156
8384 #: ../fish/guestfish-actions.pod:1158
8392 #: ../fish/guestfish-actions.pod:1160 ../src/guestfs-actions.pod:1940
8394 "This returns C<true> if and only if there is a file, directory (or anything) "
8395 "with the given C<path> name."
8399 #: ../fish/guestfish-actions.pod:1163
8400 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8404 #: ../fish/guestfish-actions.pod:1165
8409 #: ../fish/guestfish-actions.pod:1167
8412 " fallocate path len\n"
8417 #: ../fish/guestfish-actions.pod:1169 ../fish/guestfish-actions.pod:1188 ../src/guestfs-actions.pod:1963 ../src/guestfs-actions.pod:1982
8419 "This command preallocates a file (containing zero bytes) named C<path> of "
8420 "size C<len> bytes. If the file exists already, it is overwritten."
8424 #: ../fish/guestfish-actions.pod:1173 ../src/guestfs-actions.pod:1967
8426 "Do not confuse this with the guestfish-specific C<alloc> command which "
8427 "allocates a file in the host and attaches it as a device."
8431 #: ../fish/guestfish-actions.pod:1177
8433 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8438 #: ../fish/guestfish-actions.pod:1184
8443 #: ../fish/guestfish-actions.pod:1186
8446 " fallocate64 path len\n"
8451 #: ../fish/guestfish-actions.pod:1192
8453 "Note that this call allocates disk blocks for the file. To create a sparse "
8454 "file use L</truncate-size> instead."
8458 #: ../fish/guestfish-actions.pod:1195
8460 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8461 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8462 "maximum size of files created through that call to 1GB."
8466 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:1994
8468 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8469 "commands which create a file in the host and attach it as a device."
8473 #: ../fish/guestfish-actions.pod:1204
8478 #: ../fish/guestfish-actions.pod:1206
8481 " fgrep pattern path\n"
8486 #: ../fish/guestfish-actions.pod:1208 ../src/guestfs-actions.pod:2009
8487 msgid "This calls the external C<fgrep> program and returns the matching lines."
8491 #: ../fish/guestfish-actions.pod:1214
8496 #: ../fish/guestfish-actions.pod:1216
8499 " fgrepi pattern path\n"
8504 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2028
8505 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
8509 #: ../fish/guestfish-actions.pod:1224
8514 #: ../fish/guestfish-actions.pod:1226
8522 #: ../fish/guestfish-actions.pod:1228 ../src/guestfs-actions.pod:2046
8524 "This call uses the standard L<file(1)> command to determine the type or "
8525 "contents of the file."
8529 #: ../fish/guestfish-actions.pod:1231 ../src/guestfs-actions.pod:2049
8531 "This call will also transparently look inside various types of compressed "
8536 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2052
8538 "The exact command which runs is C<file -zb path>. Note in particular that "
8539 "the filename is not prepended to the output (the I<-b> option)."
8543 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2056
8545 "The output depends on the output of the underlying L<file(1)> command and it "
8546 "can change in future in ways beyond our control. In other words, the output "
8547 "is not guaranteed by the ABI."
8551 #: ../fish/guestfish-actions.pod:1242
8553 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8554 "(etc), L</is-zero>."
8558 #: ../fish/guestfish-actions.pod:1245
8559 msgid "file-architecture"
8563 #: ../fish/guestfish-actions.pod:1247
8566 " file-architecture filename\n"
8571 #: ../fish/guestfish-actions.pod:1249 ../src/guestfs-actions.pod:2074
8573 "This detects the architecture of the binary C<filename>, and returns it if "
8578 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2077
8579 msgid "Currently defined architectures are:"
8583 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2081
8588 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2083
8590 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8591 "irrespective of the precise processor requirements of the binary."
8595 #: ../fish/guestfish-actions.pod:1261 ../src/guestfs-actions.pod:2086
8600 #: ../fish/guestfish-actions.pod:1263 ../src/guestfs-actions.pod:2088
8601 msgid "64 bit x86-64."
8605 #: ../fish/guestfish-actions.pod:1265 ../src/guestfs-actions.pod:2090
8610 #: ../fish/guestfish-actions.pod:1267 ../src/guestfs-actions.pod:2092
8611 msgid "32 bit SPARC."
8615 #: ../fish/guestfish-actions.pod:1269 ../src/guestfs-actions.pod:2094
8620 #: ../fish/guestfish-actions.pod:1271 ../src/guestfs-actions.pod:2096
8621 msgid "64 bit SPARC V9 and above."
8625 #: ../fish/guestfish-actions.pod:1273 ../src/guestfs-actions.pod:2098
8630 #: ../fish/guestfish-actions.pod:1275 ../src/guestfs-actions.pod:2100
8631 msgid "Intel Itanium."
8635 #: ../fish/guestfish-actions.pod:1277 ../src/guestfs-actions.pod:2102
8640 #: ../fish/guestfish-actions.pod:1279 ../src/guestfs-actions.pod:2104
8641 msgid "32 bit Power PC."
8645 #: ../fish/guestfish-actions.pod:1281 ../src/guestfs-actions.pod:2106
8650 #: ../fish/guestfish-actions.pod:1283 ../src/guestfs-actions.pod:2108
8651 msgid "64 bit Power PC."
8655 #: ../fish/guestfish-actions.pod:1287 ../src/guestfs-actions.pod:2112
8656 msgid "Libguestfs may return other architecture strings in future."
8660 #: ../fish/guestfish-actions.pod:1289 ../src/guestfs-actions.pod:2114
8661 msgid "The function works on at least the following types of files:"
8665 #: ../fish/guestfish-actions.pod:1295 ../src/guestfs-actions.pod:2120
8666 msgid "many types of Un*x and Linux binary"
8670 #: ../fish/guestfish-actions.pod:1299 ../src/guestfs-actions.pod:2124
8671 msgid "many types of Un*x and Linux shared library"
8675 #: ../fish/guestfish-actions.pod:1303 ../src/guestfs-actions.pod:2128
8676 msgid "Windows Win32 and Win64 binaries"
8680 #: ../fish/guestfish-actions.pod:1307 ../src/guestfs-actions.pod:2132
8681 msgid "Windows Win32 and Win64 DLLs"
8685 #: ../fish/guestfish-actions.pod:1309 ../src/guestfs-actions.pod:2134
8686 msgid "Win32 binaries and DLLs return C<i386>."
8690 #: ../fish/guestfish-actions.pod:1311 ../src/guestfs-actions.pod:2136
8691 msgid "Win64 binaries and DLLs return C<x86_64>."
8695 #: ../fish/guestfish-actions.pod:1315 ../src/guestfs-actions.pod:2140
8696 msgid "Linux kernel modules"
8700 #: ../fish/guestfish-actions.pod:1319 ../src/guestfs-actions.pod:2144
8701 msgid "Linux new-style initrd images"
8705 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2148
8706 msgid "some non-x86 Linux vmlinuz kernels"
8710 #: ../fish/guestfish-actions.pod:1327 ../src/guestfs-actions.pod:2152
8711 msgid "What it can't do currently:"
8715 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2158
8716 msgid "static libraries (libfoo.a)"
8720 #: ../fish/guestfish-actions.pod:1337 ../src/guestfs-actions.pod:2162
8721 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8725 #: ../fish/guestfish-actions.pod:1341 ../src/guestfs-actions.pod:2166
8726 msgid "x86 Linux vmlinuz kernels"
8730 #: ../fish/guestfish-actions.pod:1343 ../src/guestfs-actions.pod:2168
8732 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8733 "compressed code, and are horribly hard to unpack. If you want to find the "
8734 "architecture of a kernel, use the architecture of the associated initrd or "
8735 "kernel module(s) instead."
8739 #: ../fish/guestfish-actions.pod:1350
8744 #: ../fish/guestfish-actions.pod:1352
8752 #: ../fish/guestfish-actions.pod:1354 ../src/guestfs-actions.pod:2186
8753 msgid "This command returns the size of C<file> in bytes."
8757 #: ../fish/guestfish-actions.pod:1356
8759 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
8760 "L</is-file> etc. To get the size of block devices, use "
8761 "L</blockdev-getsize64>."
8765 #: ../fish/guestfish-actions.pod:1360
8770 #: ../fish/guestfish-actions.pod:1362
8773 " fill c len path\n"
8778 #: ../fish/guestfish-actions.pod:1364 ../src/guestfs-actions.pod:2204
8780 "This command creates a new file called C<path>. The initial content of the "
8781 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
8786 #: ../fish/guestfish-actions.pod:1368
8788 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8789 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8794 #: ../fish/guestfish-actions.pod:1373
8795 msgid "fill-pattern"
8799 #: ../fish/guestfish-actions.pod:1375
8802 " fill-pattern pattern len path\n"
8807 #: ../fish/guestfish-actions.pod:1377
8809 "This function is like L</fill> except that it creates a new file of length "
8810 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8811 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8816 #: ../fish/guestfish-actions.pod:1382
8821 #: ../fish/guestfish-actions.pod:1384
8829 #: ../fish/guestfish-actions.pod:1386 ../src/guestfs-actions.pod:2250
8831 "This command lists out all files and directories, recursively, starting at "
8832 "C<directory>. It is essentially equivalent to running the shell command "
8833 "C<find directory -print> but some post-processing happens on the output, "
8838 #: ../fish/guestfish-actions.pod:1391 ../src/guestfs-actions.pod:2255
8840 "This returns a list of strings I<without any prefix>. Thus if the directory "
8845 #: ../fish/guestfish-actions.pod:1394 ../src/guestfs-actions.pod:2258
8855 #: ../fish/guestfish-actions.pod:1398
8856 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8860 #: ../fish/guestfish-actions.pod:1401 ../src/guestfs-actions.pod:2265
8871 #: ../fish/guestfish-actions.pod:1406 ../src/guestfs-actions.pod:2270
8872 msgid "If C<directory> is not a directory, then this command returns an error."
8876 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2273
8877 msgid "The returned list is sorted."
8881 #: ../fish/guestfish-actions.pod:1411
8882 msgid "See also L</find0>."
8886 #: ../fish/guestfish-actions.pod:1416
8891 #: ../fish/guestfish-actions.pod:1418
8894 " find0 directory (files|-)\n"
8899 #: ../fish/guestfish-actions.pod:1420 ../src/guestfs-actions.pod:2293
8901 "This command lists out all files and directories, recursively, starting at "
8902 "C<directory>, placing the resulting list in the external file called "
8907 #: ../fish/guestfish-actions.pod:1424
8908 msgid "This command works the same way as L</find> with the following exceptions:"
8912 #: ../fish/guestfish-actions.pod:1431 ../src/guestfs-actions.pod:2304
8913 msgid "The resulting list is written to an external file."
8917 #: ../fish/guestfish-actions.pod:1435 ../src/guestfs-actions.pod:2308
8919 "Items (filenames) in the result are separated by C<\\0> characters. See "
8920 "L<find(1)> option I<-print0>."
8924 #: ../fish/guestfish-actions.pod:1440 ../src/guestfs-actions.pod:2313
8925 msgid "This command is not limited in the number of names that it can return."
8929 #: ../fish/guestfish-actions.pod:1445 ../src/guestfs-actions.pod:2318
8930 msgid "The result list is not sorted."
8934 #: ../fish/guestfish-actions.pod:1451
8935 msgid "findfs-label"
8939 #: ../fish/guestfish-actions.pod:1453
8942 " findfs-label label\n"
8947 #: ../fish/guestfish-actions.pod:1455 ../src/guestfs-actions.pod:2332
8949 "This command searches the filesystems and returns the one which has the "
8950 "given label. An error is returned if no such filesystem can be found."
8954 #: ../fish/guestfish-actions.pod:1459
8955 msgid "To find the label of a filesystem, use L</vfs-label>."
8959 #: ../fish/guestfish-actions.pod:1461
8964 #: ../fish/guestfish-actions.pod:1463
8967 " findfs-uuid uuid\n"
8972 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
8974 "This command searches the filesystems and returns the one which has the "
8975 "given UUID. An error is returned if no such filesystem can be found."
8979 #: ../fish/guestfish-actions.pod:1469
8980 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8984 #: ../fish/guestfish-actions.pod:1471
8989 #: ../fish/guestfish-actions.pod:1473
8992 " fsck fstype device\n"
8997 #: ../fish/guestfish-actions.pod:1475 ../src/guestfs-actions.pod:2367
8999 "This runs the filesystem checker (fsck) on C<device> which should have "
9000 "filesystem type C<fstype>."
9004 #: ../fish/guestfish-actions.pod:1478 ../src/guestfs-actions.pod:2370
9006 "The returned integer is the status. See L<fsck(8)> for the list of status "
9007 "codes from C<fsck>."
9011 #: ../fish/guestfish-actions.pod:1487 ../src/guestfs-actions.pod:2379
9012 msgid "Multiple status codes can be summed together."
9016 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2383
9018 "A non-zero return code can mean \"success\", for example if errors have been "
9019 "corrected on the filesystem."
9023 #: ../fish/guestfish-actions.pod:1496 ../src/guestfs-actions.pod:2388
9024 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
9028 #: ../fish/guestfish-actions.pod:1501 ../src/guestfs-actions.pod:2393
9029 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
9033 #: ../fish/guestfish-actions.pod:1503
9038 #: ../fish/guestfish-actions.pod:1505
9046 #: ../fish/guestfish-actions.pod:1507 ../src/guestfs-actions.pod:2404
9048 "Return the additional kernel options which are added to the guest kernel "
9053 #: ../fish/guestfish-actions.pod:1510 ../src/guestfs-actions.pod:2407
9054 msgid "If C<NULL> then no options are added."
9058 #: ../fish/guestfish-actions.pod:1512
9059 msgid "get-attach-method"
9063 #: ../fish/guestfish-actions.pod:1514
9066 " get-attach-method\n"
9071 #: ../fish/guestfish-actions.pod:1516
9072 msgid "Return the current attach method. See L</set-attach-method>."
9076 #: ../fish/guestfish-actions.pod:1518
9077 msgid "get-autosync"
9081 #: ../fish/guestfish-actions.pod:1520
9089 #: ../fish/guestfish-actions.pod:1522 ../src/guestfs-actions.pod:2432
9090 msgid "Get the autosync flag."
9094 #: ../fish/guestfish-actions.pod:1524
9099 #: ../fish/guestfish-actions.pod:1526
9107 #: ../fish/guestfish-actions.pod:1528 ../src/guestfs-actions.pod:2443
9108 msgid "Return the direct appliance mode flag."
9112 #: ../fish/guestfish-actions.pod:1530
9117 #: ../fish/guestfish-actions.pod:1532
9120 " get-e2label device\n"
9125 #: ../fish/guestfish-actions.pod:1534 ../src/guestfs-actions.pod:2462
9126 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9130 #: ../fish/guestfish-actions.pod:1537
9132 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
9137 #: ../fish/guestfish-actions.pod:1544
9142 #: ../fish/guestfish-actions.pod:1546
9145 " get-e2uuid device\n"
9150 #: ../fish/guestfish-actions.pod:1548 ../src/guestfs-actions.pod:2483
9151 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9155 #: ../fish/guestfish-actions.pod:1551
9157 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
9162 #: ../fish/guestfish-actions.pod:1558
9167 #: ../fish/guestfish-actions.pod:1560
9175 #: ../fish/guestfish-actions.pod:1562 ../src/guestfs-actions.pod:2496
9176 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
9180 #: ../fish/guestfish-actions.pod:1565
9182 "If L</set-memsize> was not called on this handle, and if "
9183 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9184 "value for memsize."
9188 #: ../fish/guestfish-actions.pod:1569 ../fish/guestfish-actions.pod:1626 ../fish/guestfish-actions.pod:4499 ../fish/guestfish-actions.pod:4601 ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2595 ../src/guestfs-actions.pod:6960 ../src/guestfs-actions.pod:7086
9189 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9193 #: ../fish/guestfish-actions.pod:1572
9198 #: ../fish/guestfish-actions.pod:1574
9206 #: ../fish/guestfish-actions.pod:1576 ../src/guestfs-actions.pod:2515
9207 msgid "This returns the enable network flag."
9211 #: ../fish/guestfish-actions.pod:1578
9216 #: ../fish/guestfish-actions.pod:1580
9224 #: ../fish/guestfish-actions.pod:1582 ../src/guestfs-actions.pod:2526
9225 msgid "Return the current search path."
9229 #: ../fish/guestfish-actions.pod:1584 ../src/guestfs-actions.pod:2528
9231 "This is always non-NULL. If it wasn't set already, then this will return "
9236 #: ../fish/guestfish-actions.pod:1587
9241 #: ../fish/guestfish-actions.pod:1589
9249 #: ../fish/guestfish-actions.pod:1591 ../src/guestfs-actions.pod:2541
9250 msgid "This returns the process group flag."
9254 #: ../fish/guestfish-actions.pod:1593
9259 #: ../fish/guestfish-actions.pod:1595
9264 #: ../fish/guestfish-actions.pod:1597
9272 #: ../fish/guestfish-actions.pod:1599 ../src/guestfs-actions.pod:2552
9274 "Return the process ID of the qemu subprocess. If there is no qemu "
9275 "subprocess, then this will return an error."
9279 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2555
9280 msgid "This is an internal call used for debugging and testing."
9284 #: ../fish/guestfish-actions.pod:1604
9289 #: ../fish/guestfish-actions.pod:1606
9297 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2566
9298 msgid "Return the current qemu binary."
9302 #: ../fish/guestfish-actions.pod:1610 ../src/guestfs-actions.pod:2568
9304 "This is always non-NULL. If it wasn't set already, then this will return "
9305 "the default qemu binary name."
9309 #: ../fish/guestfish-actions.pod:1613
9310 msgid "get-recovery-proc"
9314 #: ../fish/guestfish-actions.pod:1615
9317 " get-recovery-proc\n"
9322 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2581
9323 msgid "Return the recovery process enabled flag."
9327 #: ../fish/guestfish-actions.pod:1619
9332 #: ../fish/guestfish-actions.pod:1621
9340 #: ../fish/guestfish-actions.pod:1623
9342 "This returns the current setting of the selinux flag which is passed to the "
9343 "appliance at boot time. See L</set-selinux>."
9347 #: ../fish/guestfish-actions.pod:1629
9352 #: ../fish/guestfish-actions.pod:1631
9360 #: ../fish/guestfish-actions.pod:1633 ../src/guestfs-actions.pod:2607
9361 msgid "This returns the number of virtual CPUs assigned to the appliance."
9365 #: ../fish/guestfish-actions.pod:1635
9370 #: ../fish/guestfish-actions.pod:1637
9378 #: ../fish/guestfish-actions.pod:1639 ../src/guestfs-actions.pod:2618
9380 "This returns the current state as an opaque integer. This is only useful "
9381 "for printing debug and internal error messages."
9385 #: ../fish/guestfish-actions.pod:1642 ../fish/guestfish-actions.pod:2605 ../fish/guestfish-actions.pod:2623 ../fish/guestfish-actions.pod:2661 ../fish/guestfish-actions.pod:2677 ../src/guestfs-actions.pod:2621 ../src/guestfs-actions.pod:3944 ../src/guestfs-actions.pod:3973 ../src/guestfs-actions.pod:4034 ../src/guestfs-actions.pod:4061
9386 msgid "For more information on states, see L<guestfs(3)>."
9390 #: ../fish/guestfish-actions.pod:1644
9395 #: ../fish/guestfish-actions.pod:1646
9403 #: ../fish/guestfish-actions.pod:1648 ../src/guestfs-actions.pod:2632
9404 msgid "Return the command trace flag."
9408 #: ../fish/guestfish-actions.pod:1650
9413 #: ../fish/guestfish-actions.pod:1652
9421 #: ../fish/guestfish-actions.pod:1654
9423 "Return the current umask. By default the umask is C<022> unless it has been "
9424 "set by calling L</umask>."
9428 #: ../fish/guestfish-actions.pod:1657
9433 #: ../fish/guestfish-actions.pod:1659
9441 #: ../fish/guestfish-actions.pod:1661 ../src/guestfs-actions.pod:2655
9442 msgid "This returns the verbose messages flag."
9446 #: ../fish/guestfish-actions.pod:1663
9451 #: ../fish/guestfish-actions.pod:1665
9459 #: ../fish/guestfish-actions.pod:1667 ../src/guestfs-actions.pod:2666
9460 msgid "This gets the SELinux security context of the daemon."
9464 #: ../fish/guestfish-actions.pod:1669
9465 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9469 #: ../fish/guestfish-actions.pod:1672
9474 #: ../fish/guestfish-actions.pod:1674
9477 " getxattr path name\n"
9482 #: ../fish/guestfish-actions.pod:1676
9484 "Get a single extended attribute from file C<path> named C<name>. This call "
9485 "follows symlinks. If you want to lookup an extended attribute for the "
9486 "symlink itself, use L</lgetxattr>."
9490 #: ../fish/guestfish-actions.pod:1680 ../fish/guestfish-actions.pod:2750
9492 "Normally it is better to get all extended attributes from a file in one go "
9493 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9494 "buggy and do not provide a way to list out attributes. For these "
9495 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9496 "attributes you want in advance and call this function."
9500 #: ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:2757 ../src/guestfs-actions.pod:2695 ../src/guestfs-actions.pod:4194
9502 "Extended attribute values are blobs of binary data. If there is no extended "
9503 "attribute named C<name>, this returns an error."
9507 #: ../fish/guestfish-actions.pod:1690
9508 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9512 #: ../fish/guestfish-actions.pod:1692
9517 #: ../fish/guestfish-actions.pod:1694
9525 #: ../fish/guestfish-actions.pod:1696 ../src/guestfs-actions.pod:2712
9526 msgid "This call lists the extended attributes of the file or directory C<path>."
9530 #: ../fish/guestfish-actions.pod:1699 ../src/guestfs-actions.pod:2715
9532 "At the system call level, this is a combination of the L<listxattr(2)> and "
9533 "L<getxattr(2)> calls."
9537 #: ../fish/guestfish-actions.pod:1702
9538 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9542 #: ../fish/guestfish-actions.pod:1704
9547 #: ../fish/guestfish-actions.pod:1706
9550 " glob-expand pattern\n"
9555 #: ../fish/guestfish-actions.pod:1708 ../src/guestfs-actions.pod:2732
9557 "This command searches for all the pathnames matching C<pattern> according to "
9558 "the wildcard expansion rules used by the shell."
9562 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2736
9563 msgid "If no paths match, then this returns an empty list (note: not an error)."
9567 #: ../fish/guestfish-actions.pod:1715 ../src/guestfs-actions.pod:2739
9569 "It is just a wrapper around the C L<glob(3)> function with flags "
9570 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
9574 #: ../fish/guestfish-actions.pod:1719
9579 #: ../fish/guestfish-actions.pod:1721
9582 " grep regex path\n"
9587 #: ../fish/guestfish-actions.pod:1723 ../src/guestfs-actions.pod:2756
9588 msgid "This calls the external C<grep> program and returns the matching lines."
9592 #: ../fish/guestfish-actions.pod:1729
9597 #: ../fish/guestfish-actions.pod:1731
9600 " grepi regex path\n"
9605 #: ../fish/guestfish-actions.pod:1733 ../src/guestfs-actions.pod:2775
9606 msgid "This calls the external C<grep -i> program and returns the matching lines."
9610 #: ../fish/guestfish-actions.pod:1739
9611 msgid "grub-install"
9615 #: ../fish/guestfish-actions.pod:1741
9618 " grub-install root device\n"
9623 #: ../fish/guestfish-actions.pod:1743 ../src/guestfs-actions.pod:2794
9625 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9626 "with the root directory being C<root>."
9630 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2803
9632 "There is currently no way in the API to install grub2, which is used by most "
9633 "modern Linux guests. It is possible to run the grub2 command from the "
9634 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9638 #: ../fish/guestfish-actions.pod:1759 ../src/guestfs-actions.pod:2810
9640 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9641 "compatible with itself, so this only works in rather narrow circumstances. "
9642 "Careful testing with each guest version is advisable."
9646 #: ../fish/guestfish-actions.pod:1766 ../src/guestfs-actions.pod:2817
9648 "If grub-install reports the error \"No suitable drive was found in the "
9649 "generated device map.\" it may be that you need to create a "
9650 "C</boot/grub/device.map> file first that contains the mapping between grub "
9651 "device names and Linux device names. It is usually sufficient to create a "
9656 #: ../fish/guestfish-actions.pod:1773 ../src/guestfs-actions.pod:2824
9664 #: ../fish/guestfish-actions.pod:1775 ../src/guestfs-actions.pod:2826
9665 msgid "replacing C</dev/vda> with the name of the installation device."
9669 #: ../fish/guestfish-actions.pod:1779
9674 #: ../fish/guestfish-actions.pod:1781
9682 #: ../fish/guestfish-actions.pod:1783 ../src/guestfs-actions.pod:2840
9684 "This command returns up to the first 10 lines of a file as a list of "
9689 #: ../fish/guestfish-actions.pod:1789
9694 #: ../fish/guestfish-actions.pod:1791
9697 " head-n nrlines path\n"
9702 #: ../fish/guestfish-actions.pod:1793 ../src/guestfs-actions.pod:2859
9704 "If the parameter C<nrlines> is a positive number, this returns the first "
9705 "C<nrlines> lines of the file C<path>."
9709 #: ../fish/guestfish-actions.pod:1796 ../src/guestfs-actions.pod:2862
9711 "If the parameter C<nrlines> is a negative number, this returns lines from "
9712 "the file C<path>, excluding the last C<nrlines> lines."
9716 #: ../fish/guestfish-actions.pod:1799 ../fish/guestfish-actions.pod:4982 ../src/guestfs-actions.pod:2865 ../src/guestfs-actions.pod:7665
9717 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9721 #: ../fish/guestfish-actions.pod:1804
9726 #: ../fish/guestfish-actions.pod:1806
9734 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2882
9736 "This runs C<hexdump -C> on the given C<path>. The result is the "
9737 "human-readable, canonical hex dump of the file."
9741 #: ../fish/guestfish-actions.pod:1814
9746 #: ../fish/guestfish-actions.pod:1816
9749 " initrd-cat initrdpath filename\n"
9754 #: ../fish/guestfish-actions.pod:1818 ../src/guestfs-actions.pod:2901
9756 "This command unpacks the file C<filename> from the initrd file called "
9757 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9762 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2905
9764 "For example, in guestfish you could use the following command to examine the "
9765 "boot script (usually called C</init>) contained in a Linux initrd or "
9770 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2909
9773 " initrd-cat /boot/initrd-<version>.img init\n"
9778 #: ../fish/guestfish-actions.pod:1828
9779 msgid "See also L</initrd-list>."
9783 #: ../fish/guestfish-actions.pod:1833
9788 #: ../fish/guestfish-actions.pod:1835
9791 " initrd-list path\n"
9796 #: ../fish/guestfish-actions.pod:1837 ../src/guestfs-actions.pod:2928
9797 msgid "This command lists out files contained in an initrd."
9801 #: ../fish/guestfish-actions.pod:1839 ../src/guestfs-actions.pod:2930
9803 "The files are listed without any initial C</> character. The files are "
9804 "listed in the order they appear (not necessarily alphabetical). Directory "
9805 "names are listed as separate items."
9809 #: ../fish/guestfish-actions.pod:1843 ../src/guestfs-actions.pod:2934
9811 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9812 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9817 #: ../fish/guestfish-actions.pod:1847
9818 msgid "inotify-add-watch"
9822 #: ../fish/guestfish-actions.pod:1849
9825 " inotify-add-watch path mask\n"
9830 #: ../fish/guestfish-actions.pod:1851 ../src/guestfs-actions.pod:2951
9831 msgid "Watch C<path> for the events listed in C<mask>."
9835 #: ../fish/guestfish-actions.pod:1853 ../src/guestfs-actions.pod:2953
9837 "Note that if C<path> is a directory then events within that directory are "
9838 "watched, but this does I<not> happen recursively (in subdirectories)."
9842 #: ../fish/guestfish-actions.pod:1857 ../src/guestfs-actions.pod:2957
9844 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9845 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9849 #: ../fish/guestfish-actions.pod:1861
9850 msgid "inotify-close"
9854 #: ../fish/guestfish-actions.pod:1863
9862 #: ../fish/guestfish-actions.pod:1865 ../src/guestfs-actions.pod:2970
9864 "This closes the inotify handle which was previously opened by inotify_init. "
9865 "It removes all watches, throws away any pending events, and deallocates all "
9870 #: ../fish/guestfish-actions.pod:1869
9871 msgid "inotify-files"
9875 #: ../fish/guestfish-actions.pod:1871
9883 #: ../fish/guestfish-actions.pod:1873
9885 "This function is a helpful wrapper around L</inotify-read> which just "
9886 "returns a list of pathnames of objects that were touched. The returned "
9887 "pathnames are sorted and deduplicated."
9891 #: ../fish/guestfish-actions.pod:1877
9892 msgid "inotify-init"
9896 #: ../fish/guestfish-actions.pod:1879
9899 " inotify-init maxevents\n"
9904 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2999
9906 "This command creates a new inotify handle. The inotify subsystem can be "
9907 "used to notify events which happen to objects in the guest filesystem."
9911 #: ../fish/guestfish-actions.pod:1885
9913 "C<maxevents> is the maximum number of events which will be queued up between "
9914 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9915 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9916 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9917 "but records the fact that it threw them away by setting a flag "
9918 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9922 #: ../fish/guestfish-actions.pod:1895
9924 "Before any events are generated, you have to add some watches to the "
9925 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9926 "L</inotify-watch-all>."
9930 #: ../fish/guestfish-actions.pod:1901
9932 "Queued up events should be read periodically by calling L</inotify-read> (or "
9933 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9934 "If you don't read the events out often enough then you risk the internal "
9935 "queue overflowing."
9939 #: ../fish/guestfish-actions.pod:1908
9941 "The handle should be closed after use by calling L</inotify-close>. This "
9942 "also removes any watches automatically."
9946 #: ../fish/guestfish-actions.pod:1912 ../src/guestfs-actions.pod:3030
9948 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9949 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9950 "that there is one global inotify handle per libguestfs instance."
9954 #: ../fish/guestfish-actions.pod:1917
9955 msgid "inotify-read"
9959 #: ../fish/guestfish-actions.pod:1919
9967 #: ../fish/guestfish-actions.pod:1921 ../src/guestfs-actions.pod:3044
9969 "Return the complete queue of events that have happened since the previous "
9974 #: ../fish/guestfish-actions.pod:1924 ../src/guestfs-actions.pod:3047
9975 msgid "If no events have happened, this returns an empty list."
9979 #: ../fish/guestfish-actions.pod:1926 ../src/guestfs-actions.pod:3049
9981 "I<Note>: In order to make sure that all events have been read, you must call "
9982 "this function repeatedly until it returns an empty list. The reason is that "
9983 "the call will read events up to the maximum appliance-to-host message size "
9984 "and leave remaining events in the queue."
9988 #: ../fish/guestfish-actions.pod:1932
9989 msgid "inotify-rm-watch"
9993 #: ../fish/guestfish-actions.pod:1934
9996 " inotify-rm-watch wd\n"
10001 #: ../fish/guestfish-actions.pod:1936
10002 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
10006 #: ../fish/guestfish-actions.pod:1939
10007 msgid "inspect-get-arch"
10011 #: ../fish/guestfish-actions.pod:1941
10014 " inspect-get-arch root\n"
10019 #: ../fish/guestfish-actions.pod:1943
10021 "This returns the architecture of the inspected operating system. The "
10022 "possible return values are listed under L</file-architecture>."
10026 #: ../fish/guestfish-actions.pod:1947 ../src/guestfs-actions.pod:3084
10028 "If the architecture could not be determined, then the string C<unknown> is "
10033 #: ../fish/guestfish-actions.pod:1950 ../fish/guestfish-actions.pod:2045 ../fish/guestfish-actions.pod:2124 ../fish/guestfish-actions.pod:2136 ../fish/guestfish-actions.pod:2220 ../fish/guestfish-actions.pod:2282 ../fish/guestfish-actions.pod:2303 ../fish/guestfish-actions.pod:2317 ../fish/guestfish-actions.pod:2357 ../fish/guestfish-actions.pod:2397 ../fish/guestfish-actions.pod:2410 ../fish/guestfish-actions.pod:2423 ../fish/guestfish-actions.pod:2433 ../fish/guestfish-actions.pod:2443 ../fish/guestfish-actions.pod:2455 ../fish/guestfish-actions.pod:2551 ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3087 ../src/guestfs-actions.pod:3189 ../src/guestfs-actions.pod:3293 ../src/guestfs-actions.pod:3312 ../src/guestfs-actions.pod:3443 ../src/guestfs-actions.pod:3527 ../src/guestfs-actions.pod:3555 ../src/guestfs-actions.pod:3576 ../src/guestfs-actions.pod:3629 ../src/guestfs-actions.pod:3677 ../src/guestfs-actions.pod:3697 ../src/guestfs-actions.pod:3717 ../src/guestfs-actions.pod:3734 ../src/guestfs-actions.pod:3750 ../src/guestfs-actions.pod:3768 ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:3911
10034 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
10038 #: ../fish/guestfish-actions.pod:1952
10039 msgid "inspect-get-distro"
10043 #: ../fish/guestfish-actions.pod:1954
10046 " inspect-get-distro root\n"
10051 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3100
10052 msgid "This returns the distro (distribution) of the inspected operating system."
10056 #: ../fish/guestfish-actions.pod:1959 ../src/guestfs-actions.pod:3103
10057 msgid "Currently defined distros are:"
10061 #: ../fish/guestfish-actions.pod:1963 ../src/guestfs-actions.pod:3107
10062 msgid "\"archlinux\""
10066 #: ../fish/guestfish-actions.pod:1965 ../src/guestfs-actions.pod:3109
10067 msgid "Arch Linux."
10071 #: ../fish/guestfish-actions.pod:1967 ../src/guestfs-actions.pod:3111
10076 #: ../fish/guestfish-actions.pod:1969 ../src/guestfs-actions.pod:3113
10081 #: ../fish/guestfish-actions.pod:1971 ../src/guestfs-actions.pod:3115
10086 #: ../fish/guestfish-actions.pod:1973 ../src/guestfs-actions.pod:3117
10091 #: ../fish/guestfish-actions.pod:1975 ../src/guestfs-actions.pod:3119
10096 #: ../fish/guestfish-actions.pod:1977 ../src/guestfs-actions.pod:3121
10101 #: ../fish/guestfish-actions.pod:1979 ../src/guestfs-actions.pod:3123
10106 #: ../fish/guestfish-actions.pod:1981 ../src/guestfs-actions.pod:3125
10111 #: ../fish/guestfish-actions.pod:1983 ../src/guestfs-actions.pod:3127
10112 msgid "\"linuxmint\""
10116 #: ../fish/guestfish-actions.pod:1985 ../src/guestfs-actions.pod:3129
10117 msgid "Linux Mint."
10121 #: ../fish/guestfish-actions.pod:1987 ../src/guestfs-actions.pod:3131
10126 #: ../fish/guestfish-actions.pod:1989 ../src/guestfs-actions.pod:3133
10131 #: ../fish/guestfish-actions.pod:1991 ../src/guestfs-actions.pod:3135
10132 msgid "\"mandriva\""
10136 #: ../fish/guestfish-actions.pod:1993 ../src/guestfs-actions.pod:3137
10141 #: ../fish/guestfish-actions.pod:1995 ../src/guestfs-actions.pod:3139
10146 #: ../fish/guestfish-actions.pod:1997 ../src/guestfs-actions.pod:3141
10151 #: ../fish/guestfish-actions.pod:1999 ../src/guestfs-actions.pod:3143
10152 msgid "\"opensuse\""
10156 #: ../fish/guestfish-actions.pod:2001 ../src/guestfs-actions.pod:3145
10161 #: ../fish/guestfish-actions.pod:2003 ../src/guestfs-actions.pod:3147
10166 #: ../fish/guestfish-actions.pod:2005 ../src/guestfs-actions.pod:3149
10171 #: ../fish/guestfish-actions.pod:2007 ../src/guestfs-actions.pod:3151
10172 msgid "\"redhat-based\""
10176 #: ../fish/guestfish-actions.pod:2009 ../src/guestfs-actions.pod:3153
10177 msgid "Some Red Hat-derived distro."
10181 #: ../fish/guestfish-actions.pod:2011 ../src/guestfs-actions.pod:3155
10186 #: ../fish/guestfish-actions.pod:2013 ../src/guestfs-actions.pod:3157
10187 msgid "Red Hat Enterprise Linux."
10191 #: ../fish/guestfish-actions.pod:2015 ../src/guestfs-actions.pod:3159
10192 msgid "\"scientificlinux\""
10196 #: ../fish/guestfish-actions.pod:2017 ../src/guestfs-actions.pod:3161
10197 msgid "Scientific Linux."
10201 #: ../fish/guestfish-actions.pod:2019 ../src/guestfs-actions.pod:3163
10202 msgid "\"slackware\""
10206 #: ../fish/guestfish-actions.pod:2021 ../src/guestfs-actions.pod:3165
10211 #: ../fish/guestfish-actions.pod:2023 ../src/guestfs-actions.pod:3167
10212 msgid "\"ttylinux\""
10216 #: ../fish/guestfish-actions.pod:2025 ../src/guestfs-actions.pod:3169
10221 #: ../fish/guestfish-actions.pod:2027 ../src/guestfs-actions.pod:3171
10226 #: ../fish/guestfish-actions.pod:2029 ../src/guestfs-actions.pod:3173
10231 #: ../fish/guestfish-actions.pod:2031 ../fish/guestfish-actions.pod:2115 ../fish/guestfish-actions.pod:2388 ../src/guestfs-actions.pod:3175 ../src/guestfs-actions.pod:3284 ../src/guestfs-actions.pod:3668
10232 msgid "\"unknown\""
10236 #: ../fish/guestfish-actions.pod:2033 ../src/guestfs-actions.pod:3177
10237 msgid "The distro could not be determined."
10241 #: ../fish/guestfish-actions.pod:2035 ../fish/guestfish-actions.pod:2372 ../src/guestfs-actions.pod:3179 ../src/guestfs-actions.pod:3652
10242 msgid "\"windows\""
10246 #: ../fish/guestfish-actions.pod:2037 ../src/guestfs-actions.pod:3181
10248 "Windows does not have distributions. This string is returned if the OS type "
10253 #: ../fish/guestfish-actions.pod:2042 ../fish/guestfish-actions.pod:2121 ../fish/guestfish-actions.pod:2394 ../src/guestfs-actions.pod:3186 ../src/guestfs-actions.pod:3290 ../src/guestfs-actions.pod:3674
10255 "Future versions of libguestfs may return other strings here. The caller "
10256 "should be prepared to handle any string."
10260 #: ../fish/guestfish-actions.pod:2047
10261 msgid "inspect-get-drive-mappings"
10265 #: ../fish/guestfish-actions.pod:2049
10268 " inspect-get-drive-mappings root\n"
10273 #: ../fish/guestfish-actions.pod:2051 ../src/guestfs-actions.pod:3202
10275 "This call is useful for Windows which uses a primitive system of assigning "
10276 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10277 "Windows Registry to find out how disks/partitions are mapped to drive "
10278 "letters, and returns a hash table as in the example below:"
10282 #: ../fish/guestfish-actions.pod:2057 ../src/guestfs-actions.pod:3208
10285 " C => /dev/vda2\n"
10286 " E => /dev/vdb1\n"
10287 " F => /dev/vdc1\n"
10292 #: ../fish/guestfish-actions.pod:2061 ../src/guestfs-actions.pod:3212
10294 "Note that keys are drive letters. For Windows, the key is case insensitive "
10295 "and just contains the drive letter, without the customary colon separator "
10300 #: ../fish/guestfish-actions.pod:2065 ../src/guestfs-actions.pod:3216
10302 "In future we may support other operating systems that also used drive "
10303 "letters, but the keys for those might not be case insensitive and might be "
10304 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10309 #: ../fish/guestfish-actions.pod:2070 ../src/guestfs-actions.pod:3221
10311 "For Windows guests, currently only hard drive mappings are returned. "
10312 "Removable disks (eg. DVD-ROMs) are ignored."
10316 #: ../fish/guestfish-actions.pod:2073 ../src/guestfs-actions.pod:3224
10318 "For guests that do not use drive mappings, or if the drive mappings could "
10319 "not be determined, this returns an empty hash table."
10323 #: ../fish/guestfish-actions.pod:2076
10325 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10326 "L</inspect-get-mountpoints>, L</inspect-get-filesystems>."
10330 #: ../fish/guestfish-actions.pod:2080
10331 msgid "inspect-get-filesystems"
10335 #: ../fish/guestfish-actions.pod:2082
10338 " inspect-get-filesystems root\n"
10343 #: ../fish/guestfish-actions.pod:2084 ../src/guestfs-actions.pod:3245
10345 "This returns a list of all the filesystems that we think are associated with "
10346 "this operating system. This includes the root filesystem, other ordinary "
10347 "filesystems, and non-mounted devices like swap partitions."
10351 #: ../fish/guestfish-actions.pod:2089 ../src/guestfs-actions.pod:3250
10353 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10354 "to be shared between operating systems."
10358 #: ../fish/guestfish-actions.pod:2092
10360 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10361 "L</inspect-get-mountpoints>."
10365 #: ../fish/guestfish-actions.pod:2095
10366 msgid "inspect-get-format"
10370 #: ../fish/guestfish-actions.pod:2097
10373 " inspect-get-format root\n"
10378 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3268
10380 "This returns the format of the inspected operating system. You can use it "
10381 "to detect install images, live CDs and similar."
10385 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3271
10386 msgid "Currently defined formats are:"
10390 #: ../fish/guestfish-actions.pod:2106 ../src/guestfs-actions.pod:3275
10391 msgid "\"installed\""
10395 #: ../fish/guestfish-actions.pod:2108 ../src/guestfs-actions.pod:3277
10396 msgid "This is an installed operating system."
10400 #: ../fish/guestfish-actions.pod:2110 ../src/guestfs-actions.pod:3279
10401 msgid "\"installer\""
10405 #: ../fish/guestfish-actions.pod:2112 ../src/guestfs-actions.pod:3281
10407 "The disk image being inspected is not an installed operating system, but a "
10408 "I<bootable> install disk, live CD, or similar."
10412 #: ../fish/guestfish-actions.pod:2117 ../src/guestfs-actions.pod:3286
10413 msgid "The format of this disk image is not known."
10417 #: ../fish/guestfish-actions.pod:2126
10418 msgid "inspect-get-hostname"
10422 #: ../fish/guestfish-actions.pod:2128
10425 " inspect-get-hostname root\n"
10430 #: ../fish/guestfish-actions.pod:2130 ../src/guestfs-actions.pod:3306
10432 "This function returns the hostname of the operating system as found by "
10433 "inspection of the guest's configuration files."
10437 #: ../fish/guestfish-actions.pod:2133 ../src/guestfs-actions.pod:3309
10439 "If the hostname could not be determined, then the string C<unknown> is "
10444 #: ../fish/guestfish-actions.pod:2138
10445 msgid "inspect-get-icon"
10449 #: ../fish/guestfish-actions.pod:2140
10452 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
10457 #: ../fish/guestfish-actions.pod:2142 ../src/guestfs-actions.pod:3335
10459 "This function returns an icon corresponding to the inspected operating "
10460 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10461 "to PNG if necessary)."
10465 #: ../fish/guestfish-actions.pod:2146 ../src/guestfs-actions.pod:3339
10467 "If it was not possible to get an icon this function returns a zero-length "
10468 "(non-NULL) buffer. I<Callers must check for this case>."
10472 #: ../fish/guestfish-actions.pod:2149 ../src/guestfs-actions.pod:3342
10474 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10475 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10476 "this file will be returned. You can disable favicons by passing the "
10477 "optional C<favicon> boolean as false (default is true)."
10481 #: ../fish/guestfish-actions.pod:2155 ../src/guestfs-actions.pod:3348
10483 "If finding the favicon fails, then we look in other places in the guest for "
10488 #: ../fish/guestfish-actions.pod:2158 ../src/guestfs-actions.pod:3351
10490 "If the optional C<highquality> boolean is true then only high quality icons "
10491 "are returned, which means only icons of high resolution with an alpha "
10492 "channel. The default (false) is to return any icon we can, even if it is of "
10493 "substandard quality."
10497 #: ../fish/guestfish-actions.pod:2169 ../src/guestfs-actions.pod:3362
10499 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10500 "before you call this, since it needs to read information from the guest "
10501 "filesystem during the call."
10505 #: ../fish/guestfish-actions.pod:2175 ../src/guestfs-actions.pod:3368
10507 "B<Security:> The icon data comes from the untrusted guest, and should be "
10508 "treated with caution. PNG files have been known to contain exploits. "
10509 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10510 "trying to process or display the icon."
10514 #: ../fish/guestfish-actions.pod:2183 ../src/guestfs-actions.pod:3376
10516 "The PNG image returned can be any size. It might not be square. Libguestfs "
10517 "tries to return the largest, highest quality icon available. The "
10518 "application must scale the icon to the required size."
10522 #: ../fish/guestfish-actions.pod:2190 ../src/guestfs-actions.pod:3383
10524 "Extracting icons from Windows guests requires the external C<wrestool> "
10525 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10526 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10527 "installed separately."
10531 #: ../fish/guestfish-actions.pod:2197 ../src/guestfs-actions.pod:3390
10533 "Operating system icons are usually trademarks. Seek legal advice before "
10534 "using trademarks in applications."
10538 #: ../fish/guestfish-actions.pod:2204
10539 msgid "inspect-get-major-version"
10543 #: ../fish/guestfish-actions.pod:2206
10546 " inspect-get-major-version root\n"
10551 #: ../fish/guestfish-actions.pod:2208 ../src/guestfs-actions.pod:3431
10552 msgid "This returns the major version number of the inspected operating system."
10556 #: ../fish/guestfish-actions.pod:2211 ../src/guestfs-actions.pod:3434
10558 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10559 "popular public names used by the operating system. Notably the operating "
10560 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10561 "1). You can find out the real versions corresponding to releases of Windows "
10562 "by consulting Wikipedia or MSDN."
10566 #: ../fish/guestfish-actions.pod:2218 ../fish/guestfish-actions.pod:2229 ../src/guestfs-actions.pod:3441 ../src/guestfs-actions.pod:3458
10567 msgid "If the version could not be determined, then C<0> is returned."
10571 #: ../fish/guestfish-actions.pod:2222
10572 msgid "inspect-get-minor-version"
10576 #: ../fish/guestfish-actions.pod:2224
10579 " inspect-get-minor-version root\n"
10584 #: ../fish/guestfish-actions.pod:2226 ../src/guestfs-actions.pod:3455
10585 msgid "This returns the minor version number of the inspected operating system."
10589 #: ../fish/guestfish-actions.pod:2231
10591 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10592 "L</inspect-get-major-version>."
10596 #: ../fish/guestfish-actions.pod:2234
10597 msgid "inspect-get-mountpoints"
10601 #: ../fish/guestfish-actions.pod:2236
10604 " inspect-get-mountpoints root\n"
10609 #: ../fish/guestfish-actions.pod:2238 ../src/guestfs-actions.pod:3473
10611 "This returns a hash of where we think the filesystems associated with this "
10612 "operating system should be mounted. Callers should note that this is at "
10613 "best an educated guess made by reading configuration files such as "
10614 "C</etc/fstab>. I<In particular note> that this may return filesystems which "
10615 "are non-existent or not mountable and callers should be prepared to handle "
10616 "or ignore failures if they try to mount them."
10620 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3482
10622 "Each element in the returned hashtable has a key which is the path of the "
10623 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10624 "mounted there (eg. C</dev/sda1>)."
10628 #: ../fish/guestfish-actions.pod:2252 ../src/guestfs-actions.pod:3487
10629 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
10633 #: ../fish/guestfish-actions.pod:2255
10635 "For operating systems like Windows which still use drive letters, this call "
10636 "will only return an entry for the first drive \"mounted on\" C</>. For "
10637 "information about the mapping of drive letters to partitions, see "
10638 "L</inspect-get-drive-mappings>."
10642 #: ../fish/guestfish-actions.pod:2261
10644 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10645 "L</inspect-get-filesystems>."
10649 #: ../fish/guestfish-actions.pod:2264
10650 msgid "inspect-get-package-format"
10654 #: ../fish/guestfish-actions.pod:2266
10657 " inspect-get-package-format root\n"
10662 #: ../fish/guestfish-actions.pod:2268
10664 "This function and L</inspect-get-package-management> return the package "
10665 "format and package management tool used by the inspected operating system. "
10666 "For example for Fedora these functions would return C<rpm> (package format) "
10667 "and C<yum> (package management)."
10671 #: ../fish/guestfish-actions.pod:2274 ../src/guestfs-actions.pod:3519
10673 "This returns the string C<unknown> if we could not determine the package "
10674 "format I<or> if the operating system does not have a real packaging system "
10679 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3523
10681 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10682 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10686 #: ../fish/guestfish-actions.pod:2284
10687 msgid "inspect-get-package-management"
10691 #: ../fish/guestfish-actions.pod:2286
10694 " inspect-get-package-management root\n"
10699 #: ../fish/guestfish-actions.pod:2288
10701 "L</inspect-get-package-format> and this function return the package format "
10702 "and package management tool used by the inspected operating system. For "
10703 "example for Fedora these functions would return C<rpm> (package format) and "
10704 "C<yum> (package management)."
10708 #: ../fish/guestfish-actions.pod:2294 ../src/guestfs-actions.pod:3546
10710 "This returns the string C<unknown> if we could not determine the package "
10711 "management tool I<or> if the operating system does not have a real packaging "
10712 "system (eg. Windows)."
10716 #: ../fish/guestfish-actions.pod:2298 ../src/guestfs-actions.pod:3550
10718 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10719 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10720 "versions of libguestfs may return other strings."
10724 #: ../fish/guestfish-actions.pod:2305
10725 msgid "inspect-get-product-name"
10729 #: ../fish/guestfish-actions.pod:2307
10732 " inspect-get-product-name root\n"
10737 #: ../fish/guestfish-actions.pod:2309 ../src/guestfs-actions.pod:3568
10739 "This returns the product name of the inspected operating system. The "
10740 "product name is generally some freeform string which can be displayed to the "
10741 "user, but should not be parsed by programs."
10745 #: ../fish/guestfish-actions.pod:2314 ../src/guestfs-actions.pod:3573
10747 "If the product name could not be determined, then the string C<unknown> is "
10752 #: ../fish/guestfish-actions.pod:2319
10753 msgid "inspect-get-product-variant"
10757 #: ../fish/guestfish-actions.pod:2321
10760 " inspect-get-product-variant root\n"
10765 #: ../fish/guestfish-actions.pod:2323 ../src/guestfs-actions.pod:3589
10766 msgid "This returns the product variant of the inspected operating system."
10770 #: ../fish/guestfish-actions.pod:2326 ../src/guestfs-actions.pod:3592
10772 "For Windows guests, this returns the contents of the Registry key "
10773 "C<HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> "
10774 "which is usually a string such as C<Client> or C<Server> (other values are "
10775 "possible). This can be used to distinguish consumer and enterprise versions "
10776 "of Windows that have the same version number (for example, Windows 7 and "
10777 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10778 "the latter is C<Server>)."
10782 #: ../fish/guestfish-actions.pod:2335 ../src/guestfs-actions.pod:3601
10784 "For enterprise Linux guests, in future we intend this to return the product "
10785 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10786 "implemented at present."
10790 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3605
10792 "If the product variant could not be determined, then the string C<unknown> "
10797 #: ../fish/guestfish-actions.pod:2342
10799 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10800 "L</inspect-get-product-name>, L</inspect-get-major-version>."
10804 #: ../fish/guestfish-actions.pod:2346
10805 msgid "inspect-get-roots"
10809 #: ../fish/guestfish-actions.pod:2348
10812 " inspect-get-roots\n"
10817 #: ../fish/guestfish-actions.pod:2350
10819 "This function is a convenient way to get the list of root devices, as "
10820 "returned from a previous call to L</inspect-os>, but without redoing the "
10821 "whole inspection process."
10825 #: ../fish/guestfish-actions.pod:2354
10827 "This returns an empty list if either no root devices were found or the "
10828 "caller has not called L</inspect-os>."
10832 #: ../fish/guestfish-actions.pod:2359
10833 msgid "inspect-get-type"
10837 #: ../fish/guestfish-actions.pod:2361
10840 " inspect-get-type root\n"
10845 #: ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3643
10847 "This returns the type of the inspected operating system. Currently defined "
10852 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3648
10857 #: ../fish/guestfish-actions.pod:2370 ../src/guestfs-actions.pod:3650
10858 msgid "Any Linux-based operating system."
10862 #: ../fish/guestfish-actions.pod:2374 ../src/guestfs-actions.pod:3654
10863 msgid "Any Microsoft Windows operating system."
10867 #: ../fish/guestfish-actions.pod:2376 ../src/guestfs-actions.pod:3656
10868 msgid "\"freebsd\""
10872 #: ../fish/guestfish-actions.pod:2378 ../src/guestfs-actions.pod:3658
10877 #: ../fish/guestfish-actions.pod:2380 ../src/guestfs-actions.pod:3660
10882 #: ../fish/guestfish-actions.pod:2382 ../src/guestfs-actions.pod:3662
10887 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3664
10892 #: ../fish/guestfish-actions.pod:2386 ../src/guestfs-actions.pod:3666
10897 #: ../fish/guestfish-actions.pod:2390 ../src/guestfs-actions.pod:3670
10898 msgid "The operating system type could not be determined."
10902 #: ../fish/guestfish-actions.pod:2399
10903 msgid "inspect-get-windows-current-control-set"
10907 #: ../fish/guestfish-actions.pod:2401
10910 " inspect-get-windows-current-control-set root\n"
10915 #: ../fish/guestfish-actions.pod:2403 ../src/guestfs-actions.pod:3690
10917 "This returns the Windows CurrentControlSet of the inspected guest. The "
10918 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10922 #: ../fish/guestfish-actions.pod:2406 ../src/guestfs-actions.pod:3693
10924 "This call assumes that the guest is Windows and that the Registry could be "
10925 "examined by inspection. If this is not the case then an error is returned."
10929 #: ../fish/guestfish-actions.pod:2412
10930 msgid "inspect-get-windows-systemroot"
10934 #: ../fish/guestfish-actions.pod:2414
10937 " inspect-get-windows-systemroot root\n"
10942 #: ../fish/guestfish-actions.pod:2416 ../src/guestfs-actions.pod:3710
10944 "This returns the Windows systemroot of the inspected guest. The systemroot "
10945 "is a directory path such as C</WINDOWS>."
10949 #: ../fish/guestfish-actions.pod:2419 ../src/guestfs-actions.pod:3713
10951 "This call assumes that the guest is Windows and that the systemroot could be "
10952 "determined by inspection. If this is not the case then an error is "
10957 #: ../fish/guestfish-actions.pod:2425
10958 msgid "inspect-is-live"
10962 #: ../fish/guestfish-actions.pod:2427
10965 " inspect-is-live root\n"
10970 #: ../fish/guestfish-actions.pod:2429
10972 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10973 "then this returns true if a live image was detected on the disk."
10977 #: ../fish/guestfish-actions.pod:2435
10978 msgid "inspect-is-multipart"
10982 #: ../fish/guestfish-actions.pod:2437
10985 " inspect-is-multipart root\n"
10990 #: ../fish/guestfish-actions.pod:2439
10992 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10993 "then this returns true if the disk is part of a set."
10997 #: ../fish/guestfish-actions.pod:2445
10998 msgid "inspect-is-netinst"
11002 #: ../fish/guestfish-actions.pod:2447
11005 " inspect-is-netinst root\n"
11010 #: ../fish/guestfish-actions.pod:2449
11012 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
11013 "then this returns true if the disk is a network installer, ie. not a "
11014 "self-contained install CD but one which is likely to require network access "
11015 "to complete the install."
11019 #: ../fish/guestfish-actions.pod:2457
11020 msgid "inspect-list-applications"
11024 #: ../fish/guestfish-actions.pod:2459
11027 " inspect-list-applications root\n"
11032 #: ../fish/guestfish-actions.pod:2461 ../src/guestfs-actions.pod:3780
11033 msgid "Return the list of applications installed in the operating system."
11037 #: ../fish/guestfish-actions.pod:2463
11039 "I<Note:> This call works differently from other parts of the inspection "
11040 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
11041 "then mount up the disks, before calling this. Listing applications is a "
11042 "significantly more difficult operation which requires access to the full "
11043 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
11044 "are just returning data cached in the libguestfs handle, this call actually "
11045 "reads parts of the mounted filesystems during the call."
11049 #: ../fish/guestfish-actions.pod:2473 ../src/guestfs-actions.pod:3792
11051 "This returns an empty list if the inspection code was not able to determine "
11052 "the list of applications."
11056 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3795
11057 msgid "The application structure contains the following fields:"
11061 #: ../fish/guestfish-actions.pod:2480 ../src/guestfs-actions.pod:3799
11062 msgid "C<app_name>"
11066 #: ../fish/guestfish-actions.pod:2482 ../src/guestfs-actions.pod:3801
11068 "The name of the application. For Red Hat-derived and Debian-derived Linux "
11069 "guests, this is the package name."
11073 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3804
11074 msgid "C<app_display_name>"
11078 #: ../fish/guestfish-actions.pod:2487 ../src/guestfs-actions.pod:3806
11080 "The display name of the application, sometimes localized to the install "
11081 "language of the guest operating system."
11085 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3809
11087 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11088 "to display something can use C<app_name> instead."
11092 #: ../fish/guestfish-actions.pod:2493 ../src/guestfs-actions.pod:3812
11093 msgid "C<app_epoch>"
11097 #: ../fish/guestfish-actions.pod:2495 ../src/guestfs-actions.pod:3814
11099 "For package managers which use epochs, this contains the epoch of the "
11100 "package (an integer). If unavailable, this is returned as C<0>."
11104 #: ../fish/guestfish-actions.pod:2498 ../src/guestfs-actions.pod:3817
11105 msgid "C<app_version>"
11109 #: ../fish/guestfish-actions.pod:2500 ../src/guestfs-actions.pod:3819
11111 "The version string of the application or package. If unavailable this is "
11112 "returned as an empty string C<\"\">."
11116 #: ../fish/guestfish-actions.pod:2503 ../src/guestfs-actions.pod:3822
11117 msgid "C<app_release>"
11121 #: ../fish/guestfish-actions.pod:2505 ../src/guestfs-actions.pod:3824
11123 "The release string of the application or package, for package managers that "
11124 "use this. If unavailable this is returned as an empty string C<\"\">."
11128 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3828
11129 msgid "C<app_install_path>"
11133 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3830
11135 "The installation path of the application (on operating systems such as "
11136 "Windows which use installation paths). This path is in the format used by "
11137 "the guest operating system, it is not a libguestfs path."
11141 #: ../fish/guestfish-actions.pod:2516 ../src/guestfs-actions.pod:3835
11142 msgid "If unavailable this is returned as an empty string C<\"\">."
11146 #: ../fish/guestfish-actions.pod:2518 ../src/guestfs-actions.pod:3837
11147 msgid "C<app_trans_path>"
11151 #: ../fish/guestfish-actions.pod:2520 ../src/guestfs-actions.pod:3839
11153 "The install path translated into a libguestfs path. If unavailable this is "
11154 "returned as an empty string C<\"\">."
11158 #: ../fish/guestfish-actions.pod:2523 ../src/guestfs-actions.pod:3842
11159 msgid "C<app_publisher>"
11163 #: ../fish/guestfish-actions.pod:2525 ../src/guestfs-actions.pod:3844
11165 "The name of the publisher of the application, for package managers that use "
11166 "this. If unavailable this is returned as an empty string C<\"\">."
11170 #: ../fish/guestfish-actions.pod:2529 ../src/guestfs-actions.pod:3848
11175 #: ../fish/guestfish-actions.pod:2531 ../src/guestfs-actions.pod:3850
11177 "The URL (eg. upstream URL) of the application. If unavailable this is "
11178 "returned as an empty string C<\"\">."
11182 #: ../fish/guestfish-actions.pod:2534 ../src/guestfs-actions.pod:3853
11183 msgid "C<app_source_package>"
11187 #: ../fish/guestfish-actions.pod:2536 ../src/guestfs-actions.pod:3855
11189 "For packaging systems which support this, the name of the source package. "
11190 "If unavailable this is returned as an empty string C<\"\">."
11194 #: ../fish/guestfish-actions.pod:2539 ../src/guestfs-actions.pod:3858
11195 msgid "C<app_summary>"
11199 #: ../fish/guestfish-actions.pod:2541 ../src/guestfs-actions.pod:3860
11201 "A short (usually one line) description of the application or package. If "
11202 "unavailable this is returned as an empty string C<\"\">."
11206 #: ../fish/guestfish-actions.pod:2544 ../src/guestfs-actions.pod:3863
11207 msgid "C<app_description>"
11211 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3865
11213 "A longer description of the application or package. If unavailable this is "
11214 "returned as an empty string C<\"\">."
11218 #: ../fish/guestfish-actions.pod:2553
11223 #: ../fish/guestfish-actions.pod:2555
11231 #: ../fish/guestfish-actions.pod:2557 ../src/guestfs-actions.pod:3883
11233 "This function uses other libguestfs functions and certain heuristics to "
11234 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11235 "for operating systems."
11239 #: ../fish/guestfish-actions.pod:2561 ../src/guestfs-actions.pod:3887
11240 msgid "The list returned is empty if no operating systems were found."
11244 #: ../fish/guestfish-actions.pod:2563 ../src/guestfs-actions.pod:3889
11246 "If one operating system was found, then this returns a list with a single "
11247 "element, which is the name of the root filesystem of this operating system. "
11248 "It is also possible for this function to return a list containing more than "
11249 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11250 "element being the root filesystem of one of the operating systems."
11254 #: ../fish/guestfish-actions.pod:2570
11256 "You can pass the root string(s) returned to other L</inspect-get-*> "
11257 "functions in order to query further information about each operating system, "
11258 "such as the name and version."
11262 #: ../fish/guestfish-actions.pod:2575
11264 "This function uses other libguestfs features such as L</mount-ro> and "
11265 "L</umount-all> in order to mount and unmount filesystems and look at the "
11266 "contents. This should be called with no disks currently mounted. The "
11267 "function may also use Augeas, so any existing Augeas handle will be closed."
11271 #: ../fish/guestfish-actions.pod:2581 ../src/guestfs-actions.pod:3907
11273 "This function cannot decrypt encrypted disks. The caller must do that first "
11274 "(supplying the necessary keys) if the disk is encrypted."
11278 #: ../fish/guestfish-actions.pod:2587 ../fish/guestfish-actions.pod:2785 ../fish/guestfish-actions.pod:2850
11279 msgid "See also L</list-filesystems>."
11283 #: ../fish/guestfish-actions.pod:2589
11284 msgid "is-blockdev"
11288 #: ../fish/guestfish-actions.pod:2591
11291 " is-blockdev path\n"
11296 #: ../fish/guestfish-actions.pod:2593 ../src/guestfs-actions.pod:3927
11298 "This returns C<true> if and only if there is a block device with the given "
11303 #: ../fish/guestfish-actions.pod:2596 ../fish/guestfish-actions.pod:2614 ../fish/guestfish-actions.pod:2633 ../fish/guestfish-actions.pod:2642 ../fish/guestfish-actions.pod:2652 ../fish/guestfish-actions.pod:2686 ../fish/guestfish-actions.pod:2695
11304 msgid "See also L</stat>."
11308 #: ../fish/guestfish-actions.pod:2598
11313 #: ../fish/guestfish-actions.pod:2600
11321 #: ../fish/guestfish-actions.pod:2602 ../src/guestfs-actions.pod:3941
11323 "This returns true iff this handle is busy processing a command (in the "
11328 #: ../fish/guestfish-actions.pod:2607
11333 #: ../fish/guestfish-actions.pod:2609
11336 " is-chardev path\n"
11341 #: ../fish/guestfish-actions.pod:2611 ../src/guestfs-actions.pod:3956
11343 "This returns C<true> if and only if there is a character device with the "
11344 "given C<path> name."
11348 #: ../fish/guestfish-actions.pod:2616
11353 #: ../fish/guestfish-actions.pod:2618
11361 #: ../fish/guestfish-actions.pod:2620 ../src/guestfs-actions.pod:3970
11363 "This returns true iff this handle is being configured (in the C<CONFIG> "
11368 #: ../fish/guestfish-actions.pod:2625
11373 #: ../fish/guestfish-actions.pod:2627
11381 #: ../fish/guestfish-actions.pod:2629 ../src/guestfs-actions.pod:3985
11383 "This returns C<true> if and only if there is a directory with the given "
11384 "C<path> name. Note that it returns false for other objects like files."
11388 #: ../fish/guestfish-actions.pod:2635
11393 #: ../fish/guestfish-actions.pod:2637
11401 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4001
11403 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11404 "given C<path> name."
11408 #: ../fish/guestfish-actions.pod:2644
11413 #: ../fish/guestfish-actions.pod:2646
11421 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4016
11423 "This returns C<true> if and only if there is a regular file with the given "
11424 "C<path> name. Note that it returns false for other objects like "
11429 #: ../fish/guestfish-actions.pod:2654
11430 msgid "is-launching"
11434 #: ../fish/guestfish-actions.pod:2656
11442 #: ../fish/guestfish-actions.pod:2658 ../src/guestfs-actions.pod:4031
11444 "This returns true iff this handle is launching the subprocess (in the "
11445 "C<LAUNCHING> state)."
11449 #: ../fish/guestfish-actions.pod:2663
11454 #: ../fish/guestfish-actions.pod:2665
11462 #: ../fish/guestfish-actions.pod:2667 ../src/guestfs-actions.pod:4046
11464 "This command tests whether C<device> is a logical volume, and returns true "
11465 "iff this is the case."
11469 #: ../fish/guestfish-actions.pod:2670
11474 #: ../fish/guestfish-actions.pod:2672
11482 #: ../fish/guestfish-actions.pod:2674 ../src/guestfs-actions.pod:4058
11484 "This returns true iff this handle is ready to accept commands (in the "
11489 #: ../fish/guestfish-actions.pod:2679
11494 #: ../fish/guestfish-actions.pod:2681
11497 " is-socket path\n"
11502 #: ../fish/guestfish-actions.pod:2683 ../src/guestfs-actions.pod:4073
11504 "This returns C<true> if and only if there is a Unix domain socket with the "
11505 "given C<path> name."
11509 #: ../fish/guestfish-actions.pod:2688
11514 #: ../fish/guestfish-actions.pod:2690
11517 " is-symlink path\n"
11522 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4088
11524 "This returns C<true> if and only if there is a symbolic link with the given "
11529 #: ../fish/guestfish-actions.pod:2697
11534 #: ../fish/guestfish-actions.pod:2699
11542 #: ../fish/guestfish-actions.pod:2701 ../src/guestfs-actions.pod:4103
11544 "This returns true iff the file exists and the file is empty or it contains "
11549 #: ../fish/guestfish-actions.pod:2704
11550 msgid "is-zero-device"
11554 #: ../fish/guestfish-actions.pod:2706
11557 " is-zero-device device\n"
11562 #: ../fish/guestfish-actions.pod:2708 ../src/guestfs-actions.pod:4116
11563 msgid "This returns true iff the device exists and contains all zero bytes."
11567 #: ../fish/guestfish-actions.pod:2710 ../src/guestfs-actions.pod:4118
11568 msgid "Note that for large devices this can take a long time to run."
11572 #: ../fish/guestfish-actions.pod:2712
11573 msgid "kill-subprocess"
11577 #: ../fish/guestfish-actions.pod:2714
11580 " kill-subprocess\n"
11585 #: ../fish/guestfish-actions.pod:2716 ../src/guestfs-actions.pod:4129
11586 msgid "This kills the qemu subprocess. You should never need to call this."
11590 #: ../fish/guestfish-actions.pod:2718
11595 #: ../fish/guestfish-actions.pod:2720
11600 #: ../fish/guestfish-actions.pod:2722
11608 #: ../fish/guestfish-actions.pod:2724 ../src/guestfs-actions.pod:4140
11610 "Internally libguestfs is implemented by running a virtual machine using "
11615 #: ../fish/guestfish-actions.pod:2727 ../src/guestfs-actions.pod:4143
11617 "You should call this after configuring the handle (eg. adding drives) but "
11618 "before performing any actions."
11622 #: ../fish/guestfish-actions.pod:2730
11627 #: ../fish/guestfish-actions.pod:2732
11630 " lchown owner group path\n"
11635 #: ../fish/guestfish-actions.pod:2734
11637 "Change the file owner to C<owner> and group to C<group>. This is like "
11638 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
11643 #: ../fish/guestfish-actions.pod:2742
11648 #: ../fish/guestfish-actions.pod:2744
11651 " lgetxattr path name\n"
11656 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4183
11658 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11659 "is a symlink, then this call returns an extended attribute from the symlink."
11663 #: ../fish/guestfish-actions.pod:2760
11664 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11668 #: ../fish/guestfish-actions.pod:2762
11673 #: ../fish/guestfish-actions.pod:2764
11676 " lgetxattrs path\n"
11681 #: ../fish/guestfish-actions.pod:2766
11683 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11684 "it returns the extended attributes of the link itself."
11688 #: ../fish/guestfish-actions.pod:2770
11693 #: ../fish/guestfish-actions.pod:2772
11701 #: ../fish/guestfish-actions.pod:2774 ../src/guestfs-actions.pod:4226
11703 "List all 9p filesystems attached to the guest. A list of mount tags is "
11708 #: ../fish/guestfish-actions.pod:2777
11709 msgid "list-devices"
11713 #: ../fish/guestfish-actions.pod:2779
11721 #: ../fish/guestfish-actions.pod:2781 ../src/guestfs-actions.pod:4240
11722 msgid "List all the block devices."
11726 #: ../fish/guestfish-actions.pod:2783 ../src/guestfs-actions.pod:4242
11727 msgid "The full block device names are returned, eg. C</dev/sda>."
11731 #: ../fish/guestfish-actions.pod:2787
11732 msgid "list-dm-devices"
11736 #: ../fish/guestfish-actions.pod:2789
11739 " list-dm-devices\n"
11744 #: ../fish/guestfish-actions.pod:2791 ../src/guestfs-actions.pod:4257
11745 msgid "List all device mapper devices."
11749 #: ../fish/guestfish-actions.pod:2793
11751 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11752 "previous call to L</luks-open>."
11756 #: ../fish/guestfish-actions.pod:2796
11758 "Device mapper devices which correspond to logical volumes are I<not> "
11759 "returned in this list. Call L</lvs> if you want to list logical volumes."
11763 #: ../fish/guestfish-actions.pod:2800
11764 msgid "list-filesystems"
11768 #: ../fish/guestfish-actions.pod:2802
11771 " list-filesystems\n"
11776 #: ../fish/guestfish-actions.pod:2804 ../src/guestfs-actions.pod:4277
11778 "This inspection command looks for filesystems on partitions, block devices "
11779 "and logical volumes, returning a list of devices containing filesystems and "
11784 #: ../fish/guestfish-actions.pod:2808 ../src/guestfs-actions.pod:4281
11786 "The return value is a hash, where the keys are the devices containing "
11787 "filesystems, and the values are the filesystem types. For example:"
11791 #: ../fish/guestfish-actions.pod:2812 ../src/guestfs-actions.pod:4285
11794 " \"/dev/sda1\" => \"ntfs\"\n"
11795 " \"/dev/sda2\" => \"ext2\"\n"
11796 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11797 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11802 #: ../fish/guestfish-actions.pod:2817 ../src/guestfs-actions.pod:4290
11804 "The value can have the special value \"unknown\", meaning the content of the "
11805 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11809 #: ../fish/guestfish-actions.pod:2821
11811 "This command runs other libguestfs commands, which might include L</mount> "
11812 "and L</umount>, and therefore you should use this soon after launch and only "
11813 "when nothing is mounted."
11817 #: ../fish/guestfish-actions.pod:2825
11819 "Not all of the filesystems returned will be mountable. In particular, swap "
11820 "partitions are returned in the list. Also this command does not check that "
11821 "each filesystem found is valid and mountable, and some filesystems might be "
11822 "mountable but require special options. Filesystems may not all belong to a "
11823 "single logical operating system (use L</inspect-os> to look for OSes)."
11827 #: ../fish/guestfish-actions.pod:2833
11828 msgid "list-md-devices"
11832 #: ../fish/guestfish-actions.pod:2835
11835 " list-md-devices\n"
11840 #: ../fish/guestfish-actions.pod:2837 ../src/guestfs-actions.pod:4319
11841 msgid "List all Linux md devices."
11845 #: ../fish/guestfish-actions.pod:2839
11846 msgid "list-partitions"
11850 #: ../fish/guestfish-actions.pod:2841
11853 " list-partitions\n"
11858 #: ../fish/guestfish-actions.pod:2843 ../src/guestfs-actions.pod:4332
11859 msgid "List all the partitions detected on all block devices."
11863 #: ../fish/guestfish-actions.pod:2845 ../src/guestfs-actions.pod:4334
11864 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11868 #: ../fish/guestfish-actions.pod:2847
11870 "This does not return logical volumes. For that you will need to call "
11875 #: ../fish/guestfish-actions.pod:2852
11880 #: ../fish/guestfish-actions.pod:2854
11888 #: ../fish/guestfish-actions.pod:2856 ../src/guestfs-actions.pod:4353
11890 "List the files in C<directory> (relative to the root directory, there is no "
11891 "cwd) in the format of 'ls -la'."
11895 #: ../fish/guestfish-actions.pod:2859 ../src/guestfs-actions.pod:4356
11897 "This command is mostly useful for interactive sessions. It is I<not> "
11898 "intended that you try to parse the output string."
11902 #: ../fish/guestfish-actions.pod:2862
11907 #: ../fish/guestfish-actions.pod:2864
11910 " ln target linkname\n"
11915 #: ../fish/guestfish-actions.pod:2866 ../src/guestfs-actions.pod:4371
11916 msgid "This command creates a hard link using the C<ln> command."
11920 #: ../fish/guestfish-actions.pod:2868
11925 #: ../fish/guestfish-actions.pod:2870
11928 " ln-f target linkname\n"
11933 #: ../fish/guestfish-actions.pod:2872 ../src/guestfs-actions.pod:4384
11935 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11936 "option removes the link (C<linkname>) if it exists already."
11940 #: ../fish/guestfish-actions.pod:2875
11945 #: ../fish/guestfish-actions.pod:2877
11948 " ln-s target linkname\n"
11953 #: ../fish/guestfish-actions.pod:2879 ../src/guestfs-actions.pod:4398
11954 msgid "This command creates a symbolic link using the C<ln -s> command."
11958 #: ../fish/guestfish-actions.pod:2881
11963 #: ../fish/guestfish-actions.pod:2883
11966 " ln-sf target linkname\n"
11971 #: ../fish/guestfish-actions.pod:2885 ../src/guestfs-actions.pod:4411
11973 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11974 "option removes the link (C<linkname>) if it exists already."
11978 #: ../fish/guestfish-actions.pod:2888
11979 msgid "lremovexattr"
11983 #: ../fish/guestfish-actions.pod:2890
11986 " lremovexattr xattr path\n"
11991 #: ../fish/guestfish-actions.pod:2892
11993 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11994 "it removes an extended attribute of the link itself."
11998 #: ../fish/guestfish-actions.pod:2896
12003 #: ../fish/guestfish-actions.pod:2898
12011 #: ../fish/guestfish-actions.pod:2900 ../src/guestfs-actions.pod:4439
12013 "List the files in C<directory> (relative to the root directory, there is no "
12014 "cwd). The '.' and '..' entries are not returned, but hidden files are "
12019 #: ../fish/guestfish-actions.pod:2904
12021 "This command is mostly useful for interactive sessions. Programs should "
12022 "probably use L</readdir> instead."
12026 #: ../fish/guestfish-actions.pod:2907
12031 #: ../fish/guestfish-actions.pod:2909
12034 " lsetxattr xattr val vallen path\n"
12039 #: ../fish/guestfish-actions.pod:2911
12041 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
12042 "sets an extended attribute of the link itself."
12046 #: ../fish/guestfish-actions.pod:2915
12051 #: ../fish/guestfish-actions.pod:2917
12059 #: ../fish/guestfish-actions.pod:2919 ../fish/guestfish-actions.pod:4817 ../src/guestfs-actions.pod:4475 ../src/guestfs-actions.pod:7405
12060 msgid "Returns file information for the given C<path>."
12064 #: ../fish/guestfish-actions.pod:2921
12066 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
12067 "the link is stat-ed, not the file it refers to."
12071 #: ../fish/guestfish-actions.pod:2925 ../src/guestfs-actions.pod:4481
12072 msgid "This is the same as the C<lstat(2)> system call."
12076 #: ../fish/guestfish-actions.pod:2927
12081 #: ../fish/guestfish-actions.pod:2929
12084 " lstatlist path 'names ...'\n"
12089 #: ../fish/guestfish-actions.pod:2931
12091 "This call allows you to perform the L</lstat> operation on multiple files, "
12092 "where all files are in the directory C<path>. C<names> is the list of files "
12093 "from this directory."
12097 #: ../fish/guestfish-actions.pod:2935 ../src/guestfs-actions.pod:4500
12099 "On return you get a list of stat structs, with a one-to-one correspondence "
12100 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12101 "then the C<ino> field of that structure is set to C<-1>."
12105 #: ../fish/guestfish-actions.pod:2940
12107 "This call is intended for programs that want to efficiently list a directory "
12108 "contents without making many round-trips. See also L</lxattrlist> for a "
12109 "similarly efficient call for getting extended attributes. Very long "
12110 "directory listings might cause the protocol message size to be exceeded, "
12111 "causing this call to fail. The caller must split up such requests into "
12112 "smaller groups of names."
12116 #: ../fish/guestfish-actions.pod:2948
12117 msgid "luks-add-key"
12121 #: ../fish/guestfish-actions.pod:2950
12124 " luks-add-key device keyslot\n"
12129 #: ../fish/guestfish-actions.pod:2952 ../src/guestfs-actions.pod:4528
12131 "This command adds a new key on LUKS device C<device>. C<key> is any "
12132 "existing key, and is used to access the device. C<newkey> is the new key to "
12133 "add. C<keyslot> is the key slot that will be replaced."
12137 #: ../fish/guestfish-actions.pod:2957
12139 "Note that if C<keyslot> already contains a key, then this command will "
12140 "fail. You have to use L</luks-kill-slot> first to remove that key."
12144 #: ../fish/guestfish-actions.pod:2961 ../fish/guestfish-actions.pod:2983 ../fish/guestfish-actions.pod:2993 ../fish/guestfish-actions.pod:3004 ../fish/guestfish-actions.pod:3030 ../fish/guestfish-actions.pod:3040
12146 "This command has one or more key or passphrase parameters. Guestfish will "
12147 "prompt for these separately."
12151 #: ../fish/guestfish-actions.pod:2964
12156 #: ../fish/guestfish-actions.pod:2966
12159 " luks-close device\n"
12164 #: ../fish/guestfish-actions.pod:2968
12166 "This closes a LUKS device that was created earlier by L</luks-open> or "
12167 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
12168 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12169 "underlying block device."
12173 #: ../fish/guestfish-actions.pod:2974
12174 msgid "luks-format"
12178 #: ../fish/guestfish-actions.pod:2976
12181 " luks-format device keyslot\n"
12186 #: ../fish/guestfish-actions.pod:2978 ../src/guestfs-actions.pod:4569
12188 "This command erases existing data on C<device> and formats the device as a "
12189 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12190 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12194 #: ../fish/guestfish-actions.pod:2986
12195 msgid "luks-format-cipher"
12199 #: ../fish/guestfish-actions.pod:2988
12202 " luks-format-cipher device keyslot cipher\n"
12207 #: ../fish/guestfish-actions.pod:2990
12209 "This command is the same as L</luks-format> but it also allows you to set "
12210 "the C<cipher> used."
12214 #: ../fish/guestfish-actions.pod:2996
12215 msgid "luks-kill-slot"
12219 #: ../fish/guestfish-actions.pod:2998
12222 " luks-kill-slot device keyslot\n"
12227 #: ../fish/guestfish-actions.pod:3000 ../src/guestfs-actions.pod:4610
12229 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12230 "device C<device>. C<key> must be one of the I<other> keys."
12234 #: ../fish/guestfish-actions.pod:3007
12239 #: ../fish/guestfish-actions.pod:3009
12242 " luks-open device mapname\n"
12247 #: ../fish/guestfish-actions.pod:3011 ../src/guestfs-actions.pod:4630
12249 "This command opens a block device which has been encrypted according to the "
12250 "Linux Unified Key Setup (LUKS) standard."
12254 #: ../fish/guestfish-actions.pod:3014 ../src/guestfs-actions.pod:4633
12255 msgid "C<device> is the encrypted block device or partition."
12259 #: ../fish/guestfish-actions.pod:3016 ../src/guestfs-actions.pod:4635
12261 "The caller must supply one of the keys associated with the LUKS block "
12262 "device, in the C<key> parameter."
12266 #: ../fish/guestfish-actions.pod:3019 ../src/guestfs-actions.pod:4638
12268 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12269 "writes to this block device are decrypted from and encrypted to the "
12270 "underlying C<device> respectively."
12274 #: ../fish/guestfish-actions.pod:3023
12276 "If this block device contains LVM volume groups, then calling L</vgscan> "
12277 "followed by L</vg-activate-all> will make them visible."
12281 #: ../fish/guestfish-actions.pod:3027
12282 msgid "Use L</list-dm-devices> to list all device mapper devices."
12286 #: ../fish/guestfish-actions.pod:3033
12287 msgid "luks-open-ro"
12291 #: ../fish/guestfish-actions.pod:3035
12294 " luks-open-ro device mapname\n"
12299 #: ../fish/guestfish-actions.pod:3037
12301 "This is the same as L</luks-open> except that a read-only mapping is "
12306 #: ../fish/guestfish-actions.pod:3043
12311 #: ../fish/guestfish-actions.pod:3045
12314 " lvcreate logvol volgroup mbytes\n"
12319 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4684
12321 "This creates an LVM logical volume called C<logvol> on the volume group "
12322 "C<volgroup>, with C<size> megabytes."
12326 #: ../fish/guestfish-actions.pod:3050
12327 msgid "lvm-canonical-lv-name"
12331 #: ../fish/guestfish-actions.pod:3052
12334 " lvm-canonical-lv-name lvname\n"
12339 #: ../fish/guestfish-actions.pod:3054 ../src/guestfs-actions.pod:4697
12341 "This converts alternative naming schemes for LVs that you might find to the "
12342 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
12347 #: ../fish/guestfish-actions.pod:3058 ../src/guestfs-actions.pod:4701
12349 "This command returns an error if the C<lvname> parameter does not refer to a "
12354 #: ../fish/guestfish-actions.pod:3061
12355 msgid "See also L</is-lv>."
12359 #: ../fish/guestfish-actions.pod:3063
12360 msgid "lvm-clear-filter"
12364 #: ../fish/guestfish-actions.pod:3065
12367 " lvm-clear-filter\n"
12372 #: ../fish/guestfish-actions.pod:3067
12374 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12379 #: ../fish/guestfish-actions.pod:3070 ../fish/guestfish-actions.pod:3098 ../src/guestfs-actions.pod:4719 ../src/guestfs-actions.pod:4758
12380 msgid "This command also clears the LVM cache and performs a volume group scan."
12384 #: ../fish/guestfish-actions.pod:3073
12385 msgid "lvm-remove-all"
12389 #: ../fish/guestfish-actions.pod:3075
12392 " lvm-remove-all\n"
12397 #: ../fish/guestfish-actions.pod:3077 ../src/guestfs-actions.pod:4731
12399 "This command removes all LVM logical volumes, volume groups and physical "
12404 #: ../fish/guestfish-actions.pod:3080
12405 msgid "lvm-set-filter"
12409 #: ../fish/guestfish-actions.pod:3082
12412 " lvm-set-filter 'devices ...'\n"
12417 #: ../fish/guestfish-actions.pod:3084 ../src/guestfs-actions.pod:4744
12419 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12420 "block devices in the list C<devices>, and will ignore all other attached "
12425 #: ../fish/guestfish-actions.pod:3088 ../src/guestfs-actions.pod:4748
12427 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12428 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12429 "there are two types of duplication possible: either cloned PVs/VGs which "
12430 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12431 "same name. In normal operation you cannot create this situation, but you "
12432 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12433 "inside the LVM metadata."
12437 #: ../fish/guestfish-actions.pod:3101 ../src/guestfs-actions.pod:4761
12438 msgid "You can filter whole block devices or individual partitions."
12442 #: ../fish/guestfish-actions.pod:3103 ../src/guestfs-actions.pod:4763
12444 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12445 "filesystem), even if you are not filtering out that VG."
12449 #: ../fish/guestfish-actions.pod:3107
12454 #: ../fish/guestfish-actions.pod:3109
12457 " lvremove device\n"
12462 #: ../fish/guestfish-actions.pod:3111 ../src/guestfs-actions.pod:4777
12464 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12465 "LV, such as C</dev/VG/LV>."
12469 #: ../fish/guestfish-actions.pod:3114 ../src/guestfs-actions.pod:4780
12471 "You can also remove all LVs in a volume group by specifying the VG name, "
12476 #: ../fish/guestfish-actions.pod:3117
12481 #: ../fish/guestfish-actions.pod:3119
12484 " lvrename logvol newlogvol\n"
12489 #: ../fish/guestfish-actions.pod:3121 ../src/guestfs-actions.pod:4794
12490 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12494 #: ../fish/guestfish-actions.pod:3123
12499 #: ../fish/guestfish-actions.pod:3125
12502 " lvresize device mbytes\n"
12507 #: ../fish/guestfish-actions.pod:3127 ../src/guestfs-actions.pod:4807
12509 "This resizes (expands or shrinks) an existing LVM logical volume to "
12510 "C<mbytes>. When reducing, data in the reduced part is lost."
12514 #: ../fish/guestfish-actions.pod:3131
12515 msgid "lvresize-free"
12519 #: ../fish/guestfish-actions.pod:3133
12522 " lvresize-free lv percent\n"
12527 #: ../fish/guestfish-actions.pod:3135 ../src/guestfs-actions.pod:4822
12529 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12530 "remaining free space in the volume group. Commonly you would call this with "
12531 "pc = 100 which expands the logical volume as much as possible, using all "
12532 "remaining free space in the volume group."
12536 #: ../fish/guestfish-actions.pod:3141
12541 #: ../fish/guestfish-actions.pod:3143
12549 #: ../fish/guestfish-actions.pod:3145 ../src/guestfs-actions.pod:4837
12551 "List all the logical volumes detected. This is the equivalent of the "
12552 "L<lvs(8)> command."
12556 #: ../fish/guestfish-actions.pod:3148 ../src/guestfs-actions.pod:4840
12558 "This returns a list of the logical volume device names "
12559 "(eg. C</dev/VolGroup00/LogVol00>)."
12563 #: ../fish/guestfish-actions.pod:3151
12564 msgid "See also L</lvs-full>, L</list-filesystems>."
12568 #: ../fish/guestfish-actions.pod:3153
12573 #: ../fish/guestfish-actions.pod:3155
12581 #: ../fish/guestfish-actions.pod:3157 ../src/guestfs-actions.pod:4856
12583 "List all the logical volumes detected. This is the equivalent of the "
12584 "L<lvs(8)> command. The \"full\" version includes all fields."
12588 #: ../fish/guestfish-actions.pod:3160
12593 #: ../fish/guestfish-actions.pod:3162
12601 #: ../fish/guestfish-actions.pod:3164 ../src/guestfs-actions.pod:4871
12602 msgid "This command returns the UUID of the LVM LV C<device>."
12606 #: ../fish/guestfish-actions.pod:3166
12611 #: ../fish/guestfish-actions.pod:3168
12614 " lxattrlist path 'names ...'\n"
12619 #: ../fish/guestfish-actions.pod:3170 ../src/guestfs-actions.pod:4885
12621 "This call allows you to get the extended attributes of multiple files, where "
12622 "all files are in the directory C<path>. C<names> is the list of files from "
12627 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4889
12629 "On return you get a flat list of xattr structs which must be interpreted "
12630 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12631 "C<attrval> in this struct is zero-length to indicate there was an error "
12632 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12633 "number (the number of following attributes for this file, which could be "
12634 "C<\"0\">). Then after the first xattr struct are the zero or more "
12635 "attributes for the first named file. This repeats for the second and "
12636 "subsequent files."
12640 #: ../fish/guestfish-actions.pod:3184
12642 "This call is intended for programs that want to efficiently list a directory "
12643 "contents without making many round-trips. See also L</lstatlist> for a "
12644 "similarly efficient call for getting standard stats. Very long directory "
12645 "listings might cause the protocol message size to be exceeded, causing this "
12646 "call to fail. The caller must split up such requests into smaller groups of "
12651 #: ../fish/guestfish-actions.pod:3192
12656 #: ../fish/guestfish-actions.pod:3194
12659 " md-create name 'devices ...' [missingbitmap:N] [nrdevices:N] [spare:N] "
12660 "[chunk:N] [level:..]\n"
12665 #: ../fish/guestfish-actions.pod:3196 ../src/guestfs-actions.pod:4932
12667 "Create a Linux md (RAID) device named C<name> on the devices in the list "
12672 #: ../fish/guestfish-actions.pod:3203 ../src/guestfs-actions.pod:4939
12673 msgid "C<missingbitmap>"
12677 #: ../fish/guestfish-actions.pod:3205 ../src/guestfs-actions.pod:4941
12679 "A bitmap of missing devices. If a bit is set it means that a missing device "
12680 "is added to the array. The least significant bit corresponds to the first "
12681 "device in the array."
12685 #: ../fish/guestfish-actions.pod:3209 ../src/guestfs-actions.pod:4945
12686 msgid "As examples:"
12690 #: ../fish/guestfish-actions.pod:3211 ../src/guestfs-actions.pod:4947
12692 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x1> then the resulting "
12693 "array would be C<[E<lt>missingE<gt>, \"/dev/sda\"]>."
12697 #: ../fish/guestfish-actions.pod:3214 ../src/guestfs-actions.pod:4950
12699 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x2> then the resulting "
12700 "array would be C<[\"/dev/sda\", E<lt>missingE<gt>]>."
12704 #: ../fish/guestfish-actions.pod:3217 ../src/guestfs-actions.pod:4953
12705 msgid "This defaults to C<0> (no missing devices)."
12709 #: ../fish/guestfish-actions.pod:3219 ../src/guestfs-actions.pod:4955
12711 "The length of C<devices> + the number of bits set in C<missingbitmap> must "
12712 "equal C<nrdevices> + C<spare>."
12716 #: ../fish/guestfish-actions.pod:3222 ../src/guestfs-actions.pod:4958
12717 msgid "C<nrdevices>"
12721 #: ../fish/guestfish-actions.pod:3224 ../src/guestfs-actions.pod:4960
12722 msgid "The number of active RAID devices."
12726 #: ../fish/guestfish-actions.pod:3226 ../src/guestfs-actions.pod:4962
12728 "If not set, this defaults to the length of C<devices> plus the number of "
12729 "bits set in C<missingbitmap>."
12733 #: ../fish/guestfish-actions.pod:3229 ../src/guestfs-actions.pod:4965
12738 #: ../fish/guestfish-actions.pod:3231 ../src/guestfs-actions.pod:4967
12739 msgid "The number of spare devices."
12743 #: ../fish/guestfish-actions.pod:3233 ../src/guestfs-actions.pod:4969
12744 msgid "If not set, this defaults to C<0>."
12748 #: ../fish/guestfish-actions.pod:3235 ../src/guestfs-actions.pod:4971
12753 #: ../fish/guestfish-actions.pod:3237 ../src/guestfs-actions.pod:4973
12754 msgid "The chunk size in bytes."
12758 #: ../fish/guestfish-actions.pod:3239 ../fish/guestfish-actions.pod:3261 ../src/guestfs-actions.pod:4975 ../src/guestfs-actions.pod:5023
12763 #: ../fish/guestfish-actions.pod:3241 ../src/guestfs-actions.pod:4977
12765 "The RAID level, which can be one of: I<linear>, I<raid0>, I<0>, I<stripe>, "
12766 "I<raid1>, I<1>, I<mirror>, I<raid4>, I<4>, I<raid5>, I<5>, I<raid6>, I<6>, "
12767 "I<raid10>, I<10>. Some of these are synonymous, and more levels may be "
12772 #: ../fish/guestfish-actions.pod:3246 ../src/guestfs-actions.pod:4982
12773 msgid "If not set, this defaults to C<raid1>."
12777 #: ../fish/guestfish-actions.pod:3252
12782 #: ../fish/guestfish-actions.pod:3254
12790 #: ../fish/guestfish-actions.pod:3256 ../src/guestfs-actions.pod:5018
12792 "This command exposes the output of 'mdadm -DY <md>'. The following fields "
12793 "are usually present in the returned hash. Other fields may also be present."
12797 #: ../fish/guestfish-actions.pod:3263 ../src/guestfs-actions.pod:5025
12798 msgid "The raid level of the MD device."
12802 #: ../fish/guestfish-actions.pod:3265 ../src/guestfs-actions.pod:5027
12807 #: ../fish/guestfish-actions.pod:3267 ../src/guestfs-actions.pod:5029
12808 msgid "The number of underlying devices in the MD device."
12812 #: ../fish/guestfish-actions.pod:3269 ../src/guestfs-actions.pod:5031
12813 msgid "C<metadata>"
12817 #: ../fish/guestfish-actions.pod:3271 ../src/guestfs-actions.pod:5033
12818 msgid "The metadata version used."
12822 #: ../fish/guestfish-actions.pod:3273 ../src/guestfs-actions.pod:5035
12827 #: ../fish/guestfish-actions.pod:3275 ../src/guestfs-actions.pod:5037
12828 msgid "The UUID of the MD device."
12832 #: ../fish/guestfish-actions.pod:3279 ../src/guestfs-actions.pod:5041
12833 msgid "The name of the MD device."
12837 #: ../fish/guestfish-actions.pod:3283
12842 #: ../fish/guestfish-actions.pod:3285
12850 #: ../fish/guestfish-actions.pod:3287 ../src/guestfs-actions.pod:5057
12852 "This command deactivates the MD array named C<md>. The device is stopped, "
12853 "but it is not destroyed or zeroed."
12857 #: ../fish/guestfish-actions.pod:3290
12862 #: ../fish/guestfish-actions.pod:3292
12870 #: ../fish/guestfish-actions.pod:3294 ../src/guestfs-actions.pod:5068
12871 msgid "Create a directory named C<path>."
12875 #: ../fish/guestfish-actions.pod:3296
12880 #: ../fish/guestfish-actions.pod:3298
12883 " mkdir-mode path mode\n"
12888 #: ../fish/guestfish-actions.pod:3300 ../src/guestfs-actions.pod:5081
12890 "This command creates a directory, setting the initial permissions of the "
12891 "directory to C<mode>."
12895 #: ../fish/guestfish-actions.pod:3303 ../src/guestfs-actions.pod:5084
12897 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12898 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12903 #: ../fish/guestfish-actions.pod:3307
12904 msgid "See also L</mkdir>, L</umask>"
12908 #: ../fish/guestfish-actions.pod:3309
12913 #: ../fish/guestfish-actions.pod:3311
12921 #: ../fish/guestfish-actions.pod:3313 ../src/guestfs-actions.pod:5100
12923 "Create a directory named C<path>, creating any parent directories as "
12924 "necessary. This is like the C<mkdir -p> shell command."
12928 #: ../fish/guestfish-actions.pod:3316
12933 #: ../fish/guestfish-actions.pod:3318
12936 " mkdtemp template\n"
12941 #: ../fish/guestfish-actions.pod:3320 ../src/guestfs-actions.pod:5113
12943 "This command creates a temporary directory. The C<template> parameter "
12944 "should be a full pathname for the temporary directory name with the final "
12945 "six characters being \"XXXXXX\"."
12949 #: ../fish/guestfish-actions.pod:3325 ../src/guestfs-actions.pod:5118
12951 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12952 "being suitable for Windows filesystems."
12956 #: ../fish/guestfish-actions.pod:3328 ../src/guestfs-actions.pod:5121
12957 msgid "The name of the temporary directory that was created is returned."
12961 #: ../fish/guestfish-actions.pod:3331 ../src/guestfs-actions.pod:5124
12962 msgid "The temporary directory is created with mode 0700 and is owned by root."
12966 #: ../fish/guestfish-actions.pod:3334 ../src/guestfs-actions.pod:5127
12968 "The caller is responsible for deleting the temporary directory and its "
12969 "contents after use."
12973 #: ../fish/guestfish-actions.pod:3337 ../src/guestfs-actions.pod:5130
12974 msgid "See also: L<mkdtemp(3)>"
12978 #: ../fish/guestfish-actions.pod:3339
12983 #: ../fish/guestfish-actions.pod:3341
12986 " mke2fs-J fstype blocksize device journal\n"
12991 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5146
12993 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12994 "C<journal>. It is equivalent to the command:"
12998 #: ../fish/guestfish-actions.pod:3347 ../src/guestfs-actions.pod:5150
13001 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
13006 #: ../fish/guestfish-actions.pod:3349
13007 msgid "See also L</mke2journal>."
13011 #: ../fish/guestfish-actions.pod:3351
13016 #: ../fish/guestfish-actions.pod:3353
13019 " mke2fs-JL fstype blocksize device label\n"
13024 #: ../fish/guestfish-actions.pod:3355 ../src/guestfs-actions.pod:5167
13026 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13027 "the journal labeled C<label>."
13031 #: ../fish/guestfish-actions.pod:3358
13032 msgid "See also L</mke2journal-L>."
13036 #: ../fish/guestfish-actions.pod:3360
13041 #: ../fish/guestfish-actions.pod:3362
13044 " mke2fs-JU fstype blocksize device uuid\n"
13049 #: ../fish/guestfish-actions.pod:3364 ../src/guestfs-actions.pod:5185
13051 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13052 "the journal with UUID C<uuid>."
13056 #: ../fish/guestfish-actions.pod:3367
13057 msgid "See also L</mke2journal-U>."
13061 #: ../fish/guestfish-actions.pod:3369
13062 msgid "mke2journal"
13066 #: ../fish/guestfish-actions.pod:3371
13069 " mke2journal blocksize device\n"
13074 #: ../fish/guestfish-actions.pod:3373 ../src/guestfs-actions.pod:5201
13076 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13081 #: ../fish/guestfish-actions.pod:3376 ../src/guestfs-actions.pod:5204
13084 " mke2fs -O journal_dev -b blocksize device\n"
13089 #: ../fish/guestfish-actions.pod:3378
13090 msgid "mke2journal-L"
13094 #: ../fish/guestfish-actions.pod:3380
13097 " mke2journal-L blocksize label device\n"
13102 #: ../fish/guestfish-actions.pod:3382 ../src/guestfs-actions.pod:5218
13103 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13107 #: ../fish/guestfish-actions.pod:3384
13108 msgid "mke2journal-U"
13112 #: ../fish/guestfish-actions.pod:3386
13115 " mke2journal-U blocksize uuid device\n"
13120 #: ../fish/guestfish-actions.pod:3388 ../src/guestfs-actions.pod:5232
13121 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13125 #: ../fish/guestfish-actions.pod:3390
13130 #: ../fish/guestfish-actions.pod:3392
13133 " mkfifo mode path\n"
13138 #: ../fish/guestfish-actions.pod:3394
13140 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13141 "is just a convenient wrapper around L</mknod>."
13145 #: ../fish/guestfish-actions.pod:3400
13150 #: ../fish/guestfish-actions.pod:3402
13153 " mkfs fstype device\n"
13158 #: ../fish/guestfish-actions.pod:3404 ../src/guestfs-actions.pod:5262
13160 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13161 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13165 #: ../fish/guestfish-actions.pod:3408
13170 #: ../fish/guestfish-actions.pod:3410
13173 " mkfs-b fstype blocksize device\n"
13178 #: ../fish/guestfish-actions.pod:3412
13180 "This call is similar to L</mkfs>, but it allows you to control the block "
13181 "size of the resulting filesystem. Supported block sizes depend on the "
13182 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13186 #: ../fish/guestfish-actions.pod:3417 ../fish/guestfish-actions.pod:3444 ../src/guestfs-actions.pod:5290 ../src/guestfs-actions.pod:5328
13188 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13193 #: ../fish/guestfish-actions.pod:3420
13195 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
13200 #: ../fish/guestfish-actions.pod:3427
13205 #: ../fish/guestfish-actions.pod:3429
13208 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] "
13214 #: ../fish/guestfish-actions.pod:3431 ../src/guestfs-actions.pod:5315
13216 "This function creates a filesystem on C<device>. The filesystem type is "
13217 "C<fstype>, for example C<ext3>."
13221 #: ../fish/guestfish-actions.pod:3438 ../src/guestfs-actions.pod:5322
13222 msgid "C<blocksize>"
13226 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5324
13228 "The filesystem block size. Supported block sizes depend on the filesystem "
13229 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
13234 #: ../fish/guestfish-actions.pod:3447 ../src/guestfs-actions.pod:5331
13235 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
13239 #: ../fish/guestfish-actions.pod:3449 ../src/guestfs-actions.pod:5333
13240 msgid "C<features>"
13244 #: ../fish/guestfish-actions.pod:3451 ../src/guestfs-actions.pod:5335
13245 msgid "This passes the I<-O> parameter to the external mkfs program."
13249 #: ../fish/guestfish-actions.pod:3453 ../src/guestfs-actions.pod:5337
13251 "For certain filesystem types, this allows extra filesystem features to be "
13252 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
13256 #: ../fish/guestfish-actions.pod:3457 ../src/guestfs-actions.pod:5341
13258 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
13263 #: ../fish/guestfish-actions.pod:3460 ../src/guestfs-actions.pod:5344
13268 #: ../fish/guestfish-actions.pod:3462 ../src/guestfs-actions.pod:5346
13270 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
13271 "sets the inode size (only for ext2/3/4 filesystems at present)."
13275 #: ../fish/guestfish-actions.pod:3465 ../src/guestfs-actions.pod:5349
13276 msgid "C<sectorsize>"
13280 #: ../fish/guestfish-actions.pod:3467 ../src/guestfs-actions.pod:5351
13282 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
13283 "sets sector size for ufs filesystem."
13287 #: ../fish/guestfish-actions.pod:3474
13288 msgid "mkmountpoint"
13292 #: ../fish/guestfish-actions.pod:3476
13295 " mkmountpoint exemptpath\n"
13300 #: ../fish/guestfish-actions.pod:3478
13302 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
13303 "to create extra mountpoints before mounting the first filesystem."
13307 #: ../fish/guestfish-actions.pod:3482 ../src/guestfs-actions.pod:5394
13309 "These calls are I<only> necessary in some very limited circumstances, mainly "
13310 "the case where you want to mount a mix of unrelated and/or read-only "
13311 "filesystems together."
13315 #: ../fish/guestfish-actions.pod:3486 ../src/guestfs-actions.pod:5398
13317 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13318 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13319 "inside that. You can unpack this as follows in guestfish:"
13323 #: ../fish/guestfish-actions.pod:3491 ../src/guestfs-actions.pod:5403
13326 " add-ro Fedora-11-i686-Live.iso\n"
13328 " mkmountpoint /cd\n"
13329 " mkmountpoint /sqsh\n"
13330 " mkmountpoint /ext3fs\n"
13331 " mount /dev/sda /cd\n"
13332 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13333 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13338 #: ../fish/guestfish-actions.pod:3500 ../src/guestfs-actions.pod:5412
13339 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13343 #: ../fish/guestfish-actions.pod:3502
13345 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
13346 "unexpected errors if you try to mix these calls. It is safest to manually "
13347 "unmount filesystems and remove mountpoints after use."
13351 #: ../fish/guestfish-actions.pod:3506
13353 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
13354 "for this to work for manual mountpoints, you must ensure that the innermost "
13355 "mountpoints have the longest pathnames, as in the example code above."
13359 #: ../fish/guestfish-actions.pod:3511 ../src/guestfs-actions.pod:5423
13360 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13364 #: ../fish/guestfish-actions.pod:3513
13366 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
13367 "L</umount-all> to be called when the handle is closed which can also trigger "
13372 #: ../fish/guestfish-actions.pod:3517
13377 #: ../fish/guestfish-actions.pod:3519
13380 " mknod mode devmajor devminor path\n"
13385 #: ../fish/guestfish-actions.pod:3521 ../src/guestfs-actions.pod:5442
13387 "This call creates block or character special devices, or named pipes "
13392 #: ../fish/guestfish-actions.pod:3524 ../src/guestfs-actions.pod:5445
13394 "The C<mode> parameter should be the mode, using the standard constants. "
13395 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13396 "used when creating block and character special devices."
13400 #: ../fish/guestfish-actions.pod:3529
13402 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13403 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13404 "regular file). These constants are available in the standard Linux header "
13405 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
13406 "wrappers around this command which bitwise OR in the appropriate constant "
13411 #: ../fish/guestfish-actions.pod:3539
13416 #: ../fish/guestfish-actions.pod:3541
13419 " mknod-b mode devmajor devminor path\n"
13424 #: ../fish/guestfish-actions.pod:3543
13426 "This call creates a block device node called C<path> with mode C<mode> and "
13427 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13428 "wrapper around L</mknod>."
13432 #: ../fish/guestfish-actions.pod:3549
13437 #: ../fish/guestfish-actions.pod:3551
13440 " mknod-c mode devmajor devminor path\n"
13445 #: ../fish/guestfish-actions.pod:3553
13447 "This call creates a char device node called C<path> with mode C<mode> and "
13448 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13449 "wrapper around L</mknod>."
13453 #: ../fish/guestfish-actions.pod:3559
13458 #: ../fish/guestfish-actions.pod:3561
13466 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5508
13467 msgid "Create a swap partition on C<device>."
13471 #: ../fish/guestfish-actions.pod:3565
13476 #: ../fish/guestfish-actions.pod:3567
13479 " mkswap-L label device\n"
13484 #: ../fish/guestfish-actions.pod:3569 ../src/guestfs-actions.pod:5521
13485 msgid "Create a swap partition on C<device> with label C<label>."
13489 #: ../fish/guestfish-actions.pod:3571 ../src/guestfs-actions.pod:5523
13491 "Note that you cannot attach a swap label to a block device "
13492 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
13493 "the kernel or swap tools."
13497 #: ../fish/guestfish-actions.pod:3575
13502 #: ../fish/guestfish-actions.pod:3577
13505 " mkswap-U uuid device\n"
13510 #: ../fish/guestfish-actions.pod:3579 ../src/guestfs-actions.pod:5538
13511 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13515 #: ../fish/guestfish-actions.pod:3581
13516 msgid "mkswap-file"
13520 #: ../fish/guestfish-actions.pod:3583
13523 " mkswap-file path\n"
13528 #: ../fish/guestfish-actions.pod:3585 ../src/guestfs-actions.pod:5550
13529 msgid "Create a swap file."
13533 #: ../fish/guestfish-actions.pod:3587
13535 "This command just writes a swap file signature to an existing file. To "
13536 "create the file itself, use something like L</fallocate>."
13540 #: ../fish/guestfish-actions.pod:3590
13545 #: ../fish/guestfish-actions.pod:3592
13548 " modprobe modulename\n"
13553 #: ../fish/guestfish-actions.pod:3594 ../src/guestfs-actions.pod:5565
13554 msgid "This loads a kernel module in the appliance."
13558 #: ../fish/guestfish-actions.pod:3596 ../src/guestfs-actions.pod:5567
13560 "The kernel module must have been whitelisted when libguestfs was built (see "
13561 "C<appliance/kmod.whitelist.in> in the source)."
13565 #: ../fish/guestfish-actions.pod:3599
13570 #: ../fish/guestfish-actions.pod:3601
13573 " mount device mountpoint\n"
13578 #: ../fish/guestfish-actions.pod:3603 ../src/guestfs-actions.pod:5581
13580 "Mount a guest disk at a position in the filesystem. Block devices are named "
13581 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13582 "those block devices contain partitions, they will have the usual names "
13583 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13587 #: ../fish/guestfish-actions.pod:3609 ../src/guestfs-actions.pod:5587
13589 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13590 "mounted on C</> before others can be mounted. Other filesystems can only be "
13591 "mounted on directories which already exist."
13595 #: ../fish/guestfish-actions.pod:3614 ../src/guestfs-actions.pod:5592
13597 "The mounted filesystem is writable, if we have sufficient permissions on the "
13598 "underlying device."
13602 #: ../fish/guestfish-actions.pod:3617
13604 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13605 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13606 "problems for users. If your program might need to work with older versions "
13607 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13608 "first parameter if you don't want any options)."
13612 #: ../fish/guestfish-actions.pod:3624
13617 #: ../fish/guestfish-actions.pod:3626
13620 " mount-9p mounttag mountpoint [options:..]\n"
13625 #: ../fish/guestfish-actions.pod:3628 ../src/guestfs-actions.pod:5621
13627 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13632 #: ../fish/guestfish-actions.pod:3631 ../src/guestfs-actions.pod:5624
13634 "If required, C<trans=virtio> will be automatically added to the options. "
13635 "Any other options required can be passed in the optional C<options> "
13640 #: ../fish/guestfish-actions.pod:3637
13645 #: ../fish/guestfish-actions.pod:3639
13648 " mount-loop file mountpoint\n"
13653 #: ../fish/guestfish-actions.pod:3641 ../src/guestfs-actions.pod:5663
13655 "This command lets you mount C<file> (a filesystem image in a file) on a "
13656 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13661 #: ../fish/guestfish-actions.pod:3645
13662 msgid "mount-options"
13666 #: ../fish/guestfish-actions.pod:3647
13669 " mount-options options device mountpoint\n"
13674 #: ../fish/guestfish-actions.pod:3649
13676 "This is the same as the L</mount> command, but it allows you to set the "
13677 "mount options as for the L<mount(8)> I<-o> flag."
13681 #: ../fish/guestfish-actions.pod:3653 ../src/guestfs-actions.pod:5683
13683 "If the C<options> parameter is an empty string, then no options are passed "
13684 "(all options default to whatever the filesystem uses)."
13688 #: ../fish/guestfish-actions.pod:3657
13693 #: ../fish/guestfish-actions.pod:3659
13696 " mount-ro device mountpoint\n"
13701 #: ../fish/guestfish-actions.pod:3661
13703 "This is the same as the L</mount> command, but it mounts the filesystem with "
13704 "the read-only (I<-o ro>) flag."
13708 #: ../fish/guestfish-actions.pod:3664
13713 #: ../fish/guestfish-actions.pod:3666
13716 " mount-vfs options vfstype device mountpoint\n"
13721 #: ../fish/guestfish-actions.pod:3668
13723 "This is the same as the L</mount> command, but it allows you to set both the "
13724 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13728 #: ../fish/guestfish-actions.pod:3672
13729 msgid "mountpoints"
13733 #: ../fish/guestfish-actions.pod:3674
13741 #: ../fish/guestfish-actions.pod:3676
13743 "This call is similar to L</mounts>. That call returns a list of devices. "
13744 "This one returns a hash table (map) of device name to directory where the "
13745 "device is mounted."
13749 #: ../fish/guestfish-actions.pod:3680
13754 #: ../fish/guestfish-actions.pod:3682
13762 #: ../fish/guestfish-actions.pod:3684 ../src/guestfs-actions.pod:5744
13764 "This returns the list of currently mounted filesystems. It returns the list "
13765 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13769 #: ../fish/guestfish-actions.pod:3687 ../src/guestfs-actions.pod:5747
13770 msgid "Some internal mounts are not shown."
13774 #: ../fish/guestfish-actions.pod:3689
13775 msgid "See also: L</mountpoints>"
13779 #: ../fish/guestfish-actions.pod:3691
13784 #: ../fish/guestfish-actions.pod:3693
13792 #: ../fish/guestfish-actions.pod:3695 ../src/guestfs-actions.pod:5764
13794 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13795 "destination filename or destination directory."
13799 #: ../fish/guestfish-actions.pod:3698
13800 msgid "ntfs-3g-probe"
13804 #: ../fish/guestfish-actions.pod:3700
13807 " ntfs-3g-probe true|false device\n"
13812 #: ../fish/guestfish-actions.pod:3702 ../src/guestfs-actions.pod:5778
13814 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13815 "C<device> for mountability. (Not all NTFS volumes can be mounted "
13816 "read-write, and some cannot be mounted at all)."
13820 #: ../fish/guestfish-actions.pod:3706 ../src/guestfs-actions.pod:5782
13822 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13823 "can be mounted read-write. Set it to false if you want to test if the "
13824 "volume can be mounted read-only."
13828 #: ../fish/guestfish-actions.pod:3710 ../src/guestfs-actions.pod:5786
13830 "The return value is an integer which C<0> if the operation would succeed, or "
13831 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13835 #: ../fish/guestfish-actions.pod:3714
13840 #: ../fish/guestfish-actions.pod:3716
13843 " ntfsresize device\n"
13848 #: ../fish/guestfish-actions.pod:3718 ../fish/guestfish-actions.pod:3742 ../src/guestfs-actions.pod:5807 ../src/guestfs-actions.pod:5839
13850 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13851 "size of the underlying device."
13855 #: ../fish/guestfish-actions.pod:3721 ../src/guestfs-actions.pod:5810
13857 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13858 "consistency check (for safety). You have to boot into Windows to perform "
13859 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13860 "resize filesystems which have been marked in this way. So in effect it is "
13861 "not possible to call ntfsresize multiple times on a single filesystem "
13862 "without booting into Windows between each resize."
13866 #: ../fish/guestfish-actions.pod:3729 ../fish/guestfish-actions.pod:3768 ../src/guestfs-actions.pod:5818 ../src/guestfs-actions.pod:5865
13867 msgid "See also L<ntfsresize(8)>."
13871 #: ../fish/guestfish-actions.pod:3731 ../fish/guestfish-actions.pod:3779
13873 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13878 #: ../fish/guestfish-actions.pod:3738
13879 msgid "ntfsresize-opts"
13883 #: ../fish/guestfish-actions.pod:3740
13886 " ntfsresize-opts device [size:N] [force:true|false]\n"
13891 #: ../fish/guestfish-actions.pod:3751 ../src/guestfs-actions.pod:5848
13893 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13894 "resized to fit the container (eg. partition)."
13898 #: ../fish/guestfish-actions.pod:3754 ../fish/guestfish-actions.pod:5075 ../src/guestfs-actions.pod:5851 ../src/guestfs-actions.pod:7822
13903 #: ../fish/guestfish-actions.pod:3756 ../src/guestfs-actions.pod:5853
13905 "If this option is true, then force the resize of the filesystem even if the "
13906 "filesystem is marked as requiring a consistency check."
13910 #: ../fish/guestfish-actions.pod:3759
13912 "After the resize operation, the filesystem is always marked as requiring a "
13913 "consistency check (for safety). You have to boot into Windows to perform "
13914 "this check and clear this condition. If you I<don't> set the C<force> "
13915 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13916 "a single filesystem without booting into Windows between each resize."
13920 #: ../fish/guestfish-actions.pod:3772
13921 msgid "ntfsresize-size"
13925 #: ../fish/guestfish-actions.pod:3774
13928 " ntfsresize-size device size\n"
13933 #: ../fish/guestfish-actions.pod:3776
13935 "This command is the same as L</ntfsresize> except that it allows you to "
13936 "specify the new size (in bytes) explicitly."
13940 #: ../fish/guestfish-actions.pod:3786
13945 #: ../fish/guestfish-actions.pod:3788
13948 " part-add device prlogex startsect endsect\n"
13953 #: ../fish/guestfish-actions.pod:3790
13955 "This command adds a partition to C<device>. If there is no partition table "
13956 "on the device, call L</part-init> first."
13960 #: ../fish/guestfish-actions.pod:3793 ../src/guestfs-actions.pod:5926
13962 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13963 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13964 "C<logical>) and C<e> (or C<extended>) partition types."
13968 #: ../fish/guestfish-actions.pod:3798 ../src/guestfs-actions.pod:5931
13970 "C<startsect> and C<endsect> are the start and end of the partition in "
13971 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13972 "from the end of the disk (C<-1> is the last sector)."
13976 #: ../fish/guestfish-actions.pod:3802
13978 "Creating a partition which covers the whole disk is not so easy. Use "
13979 "L</part-disk> to do that."
13983 #: ../fish/guestfish-actions.pod:3805
13988 #: ../fish/guestfish-actions.pod:3807
13991 " part-del device partnum\n"
13996 #: ../fish/guestfish-actions.pod:3809 ../src/guestfs-actions.pod:5949
13997 msgid "This command deletes the partition numbered C<partnum> on C<device>."
14001 #: ../fish/guestfish-actions.pod:3811 ../src/guestfs-actions.pod:5951
14003 "Note that in the case of MBR partitioning, deleting an extended partition "
14004 "also deletes any logical partitions it contains."
14008 #: ../fish/guestfish-actions.pod:3815
14013 #: ../fish/guestfish-actions.pod:3817
14016 " part-disk device parttype\n"
14021 #: ../fish/guestfish-actions.pod:3819
14023 "This command is simply a combination of L</part-init> followed by "
14024 "L</part-add> to create a single primary partition covering the whole disk."
14028 #: ../fish/guestfish-actions.pod:3823
14030 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
14031 "possible values are described in L</part-init>."
14035 #: ../fish/guestfish-actions.pod:3826
14036 msgid "part-get-bootable"
14040 #: ../fish/guestfish-actions.pod:3828
14043 " part-get-bootable device partnum\n"
14048 #: ../fish/guestfish-actions.pod:3830 ../src/guestfs-actions.pod:5984
14050 "This command returns true if the partition C<partnum> on C<device> has the "
14051 "bootable flag set."
14055 #: ../fish/guestfish-actions.pod:3833
14056 msgid "See also L</part-set-bootable>."
14060 #: ../fish/guestfish-actions.pod:3835
14061 msgid "part-get-mbr-id"
14065 #: ../fish/guestfish-actions.pod:3837
14068 " part-get-mbr-id device partnum\n"
14073 #: ../fish/guestfish-actions.pod:3839 ../src/guestfs-actions.pod:6000
14075 "Returns the MBR type byte (also known as the ID byte) from the numbered "
14076 "partition C<partnum>."
14080 #: ../fish/guestfish-actions.pod:3842 ../fish/guestfish-actions.pod:3986
14082 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
14083 "undefined results for other partition table types (see "
14084 "L</part-get-parttype>)."
14088 #: ../fish/guestfish-actions.pod:3846
14089 msgid "part-get-parttype"
14093 #: ../fish/guestfish-actions.pod:3848
14096 " part-get-parttype device\n"
14101 #: ../fish/guestfish-actions.pod:3850 ../src/guestfs-actions.pod:6017
14103 "This command examines the partition table on C<device> and returns the "
14104 "partition table type (format) being used."
14108 #: ../fish/guestfish-actions.pod:3853
14110 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
14111 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
14112 "possible, although unusual. See L</part-init> for a full list."
14116 #: ../fish/guestfish-actions.pod:3858
14121 #: ../fish/guestfish-actions.pod:3860
14124 " part-init device parttype\n"
14129 #: ../fish/guestfish-actions.pod:3862 ../src/guestfs-actions.pod:6037
14131 "This creates an empty partition table on C<device> of one of the partition "
14132 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
14133 "(for large disks)."
14137 #: ../fish/guestfish-actions.pod:3866
14139 "Initially there are no partitions. Following this, you should call "
14140 "L</part-add> for each partition required."
14144 #: ../fish/guestfish-actions.pod:3869 ../src/guestfs-actions.pod:6044
14145 msgid "Possible values for C<parttype> are:"
14149 #: ../fish/guestfish-actions.pod:3873 ../src/guestfs-actions.pod:6048
14154 #: ../fish/guestfish-actions.pod:3875 ../src/guestfs-actions.pod:6050
14159 #: ../fish/guestfish-actions.pod:3877 ../src/guestfs-actions.pod:6052
14160 msgid "Intel EFI / GPT partition table."
14164 #: ../fish/guestfish-actions.pod:3879 ../src/guestfs-actions.pod:6054
14166 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
14167 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
14168 "the C<mbr> format."
14172 #: ../fish/guestfish-actions.pod:3883 ../src/guestfs-actions.pod:6058
14177 #: ../fish/guestfish-actions.pod:3885 ../src/guestfs-actions.pod:6060
14182 #: ../fish/guestfish-actions.pod:3887 ../src/guestfs-actions.pod:6062
14184 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
14185 "Windows. This partition type will B<only> work for device sizes up to 2 "
14186 "TB. For large disks we recommend using C<gpt>."
14190 #: ../fish/guestfish-actions.pod:3894 ../src/guestfs-actions.pod:6069
14191 msgid "Other partition table types that may work but are not supported include:"
14195 #: ../fish/guestfish-actions.pod:3899 ../src/guestfs-actions.pod:6074
14200 #: ../fish/guestfish-actions.pod:3901 ../src/guestfs-actions.pod:6076
14201 msgid "AIX disk labels."
14205 #: ../fish/guestfish-actions.pod:3903 ../src/guestfs-actions.pod:6078
14210 #: ../fish/guestfish-actions.pod:3905 ../src/guestfs-actions.pod:6080
14215 #: ../fish/guestfish-actions.pod:3907 ../src/guestfs-actions.pod:6082
14216 msgid "Amiga \"Rigid Disk Block\" format."
14220 #: ../fish/guestfish-actions.pod:3909 ../src/guestfs-actions.pod:6084
14225 #: ../fish/guestfish-actions.pod:3911 ../src/guestfs-actions.pod:6086
14226 msgid "BSD disk labels."
14230 #: ../fish/guestfish-actions.pod:3913 ../src/guestfs-actions.pod:6088
14235 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:6090
14236 msgid "DASD, used on IBM mainframes."
14240 #: ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6092
14245 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:6094
14246 msgid "MIPS/SGI volumes."
14250 #: ../fish/guestfish-actions.pod:3921 ../src/guestfs-actions.pod:6096
14255 #: ../fish/guestfish-actions.pod:3923 ../src/guestfs-actions.pod:6098
14256 msgid "Old Mac partition format. Modern Macs use C<gpt>."
14260 #: ../fish/guestfish-actions.pod:3925 ../src/guestfs-actions.pod:6100
14265 #: ../fish/guestfish-actions.pod:3927 ../src/guestfs-actions.pod:6102
14266 msgid "NEC PC-98 format, common in Japan apparently."
14270 #: ../fish/guestfish-actions.pod:3929 ../src/guestfs-actions.pod:6104
14275 #: ../fish/guestfish-actions.pod:3931 ../src/guestfs-actions.pod:6106
14276 msgid "Sun disk labels."
14280 #: ../fish/guestfish-actions.pod:3935
14285 #: ../fish/guestfish-actions.pod:3937
14288 " part-list device\n"
14293 #: ../fish/guestfish-actions.pod:3939 ../src/guestfs-actions.pod:6120
14295 "This command parses the partition table on C<device> and returns the list of "
14296 "partitions found."
14300 #: ../fish/guestfish-actions.pod:3942 ../src/guestfs-actions.pod:6123
14301 msgid "The fields in the returned structure are:"
14305 #: ../fish/guestfish-actions.pod:3946 ../src/guestfs-actions.pod:6127
14306 msgid "B<part_num>"
14310 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6129
14311 msgid "Partition number, counting from 1."
14315 #: ../fish/guestfish-actions.pod:3950 ../src/guestfs-actions.pod:6131
14316 msgid "B<part_start>"
14320 #: ../fish/guestfish-actions.pod:3952
14322 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14323 "the device's sector size, see L</blockdev-getss>."
14327 #: ../fish/guestfish-actions.pod:3955 ../src/guestfs-actions.pod:6136
14328 msgid "B<part_end>"
14332 #: ../fish/guestfish-actions.pod:3957 ../src/guestfs-actions.pod:6138
14333 msgid "End of the partition in bytes."
14337 #: ../fish/guestfish-actions.pod:3959 ../src/guestfs-actions.pod:6140
14338 msgid "B<part_size>"
14342 #: ../fish/guestfish-actions.pod:3961 ../src/guestfs-actions.pod:6142
14343 msgid "Size of the partition in bytes."
14347 #: ../fish/guestfish-actions.pod:3965
14348 msgid "part-set-bootable"
14352 #: ../fish/guestfish-actions.pod:3967
14355 " part-set-bootable device partnum true|false\n"
14360 #: ../fish/guestfish-actions.pod:3969 ../src/guestfs-actions.pod:6160
14362 "This sets the bootable flag on partition numbered C<partnum> on device "
14363 "C<device>. Note that partitions are numbered from 1."
14367 #: ../fish/guestfish-actions.pod:3972 ../src/guestfs-actions.pod:6163
14369 "The bootable flag is used by some operating systems (notably Windows) to "
14370 "determine which partition to boot from. It is by no means universally "
14375 #: ../fish/guestfish-actions.pod:3976
14376 msgid "part-set-mbr-id"
14380 #: ../fish/guestfish-actions.pod:3978
14383 " part-set-mbr-id device partnum idbyte\n"
14388 #: ../fish/guestfish-actions.pod:3980 ../src/guestfs-actions.pod:6179
14390 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14391 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14392 "documentation are in fact hexadecimal numbers, but usually documented "
14393 "without any leading \"0x\" which might be confusing."
14397 #: ../fish/guestfish-actions.pod:3990
14398 msgid "part-set-name"
14402 #: ../fish/guestfish-actions.pod:3992
14405 " part-set-name device partnum name\n"
14410 #: ../fish/guestfish-actions.pod:3994 ../src/guestfs-actions.pod:6201
14412 "This sets the partition name on partition numbered C<partnum> on device "
14413 "C<device>. Note that partitions are numbered from 1."
14417 #: ../fish/guestfish-actions.pod:3997 ../src/guestfs-actions.pod:6204
14419 "The partition name can only be set on certain types of partition table. "
14420 "This works on C<gpt> but not on C<mbr> partitions."
14424 #: ../fish/guestfish-actions.pod:4000
14425 msgid "part-to-dev"
14429 #: ../fish/guestfish-actions.pod:4002
14432 " part-to-dev partition\n"
14437 #: ../fish/guestfish-actions.pod:4004 ../src/guestfs-actions.pod:6217
14439 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14440 "partition number, returning the device name (eg. \"/dev/sdb\")."
14444 #: ../fish/guestfish-actions.pod:4008 ../fish/guestfish-actions.pod:4020
14446 "The named partition must exist, for example as a string returned from "
14447 "L</list-partitions>."
14451 #: ../fish/guestfish-actions.pod:4011
14452 msgid "See also L</part-to-partnum>."
14456 #: ../fish/guestfish-actions.pod:4013
14457 msgid "part-to-partnum"
14461 #: ../fish/guestfish-actions.pod:4015
14464 " part-to-partnum partition\n"
14469 #: ../fish/guestfish-actions.pod:4017 ../src/guestfs-actions.pod:6237
14471 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14472 "partition number (eg. C<1>)."
14476 #: ../fish/guestfish-actions.pod:4023
14477 msgid "See also L</part-to-dev>."
14481 #: ../fish/guestfish-actions.pod:4025
14482 msgid "ping-daemon"
14486 #: ../fish/guestfish-actions.pod:4027
14494 #: ../fish/guestfish-actions.pod:4029 ../src/guestfs-actions.pod:6254
14496 "This is a test probe into the guestfs daemon running inside the qemu "
14497 "subprocess. Calling this function checks that the daemon responds to the "
14498 "ping message, without affecting the daemon or attached block device(s) in "
14503 #: ../fish/guestfish-actions.pod:4034
14508 #: ../fish/guestfish-actions.pod:4036
14511 " pread path count offset\n"
14516 #: ../fish/guestfish-actions.pod:4038 ../src/guestfs-actions.pod:6272
14518 "This command lets you read part of a file. It reads C<count> bytes of the "
14519 "file, starting at C<offset>, from file C<path>."
14523 #: ../fish/guestfish-actions.pod:4041 ../fish/guestfish-actions.pod:4056 ../src/guestfs-actions.pod:6275 ../src/guestfs-actions.pod:6301
14525 "This may read fewer bytes than requested. For further details see the "
14526 "L<pread(2)> system call."
14530 #: ../fish/guestfish-actions.pod:4044
14531 msgid "See also L</pwrite>, L</pread-device>."
14535 #: ../fish/guestfish-actions.pod:4049
14536 msgid "pread-device"
14540 #: ../fish/guestfish-actions.pod:4051
14543 " pread-device device count offset\n"
14548 #: ../fish/guestfish-actions.pod:4053 ../src/guestfs-actions.pod:6298
14550 "This command lets you read part of a file. It reads C<count> bytes of "
14551 "C<device>, starting at C<offset>."
14555 #: ../fish/guestfish-actions.pod:4059
14556 msgid "See also L</pread>."
14560 #: ../fish/guestfish-actions.pod:4064
14565 #: ../fish/guestfish-actions.pod:4066
14568 " pvcreate device\n"
14573 #: ../fish/guestfish-actions.pod:4068 ../src/guestfs-actions.pod:6321
14575 "This creates an LVM physical volume on the named C<device>, where C<device> "
14576 "should usually be a partition name such as C</dev/sda1>."
14580 #: ../fish/guestfish-actions.pod:4072
14585 #: ../fish/guestfish-actions.pod:4074
14588 " pvremove device\n"
14593 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6335
14595 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14600 #: ../fish/guestfish-actions.pod:4079 ../src/guestfs-actions.pod:6338
14602 "The implementation uses the C<pvremove> command which refuses to wipe "
14603 "physical volumes that contain any volume groups, so you have to remove those "
14608 #: ../fish/guestfish-actions.pod:4083
14613 #: ../fish/guestfish-actions.pod:4085
14616 " pvresize device\n"
14621 #: ../fish/guestfish-actions.pod:4087 ../src/guestfs-actions.pod:6352
14623 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14624 "the new size of the underlying device."
14628 #: ../fish/guestfish-actions.pod:4090
14629 msgid "pvresize-size"
14633 #: ../fish/guestfish-actions.pod:4092
14636 " pvresize-size device size\n"
14641 #: ../fish/guestfish-actions.pod:4094
14643 "This command is the same as L</pvresize> except that it allows you to "
14644 "specify the new size (in bytes) explicitly."
14648 #: ../fish/guestfish-actions.pod:4097
14653 #: ../fish/guestfish-actions.pod:4099
14661 #: ../fish/guestfish-actions.pod:4101 ../src/guestfs-actions.pod:6378
14663 "List all the physical volumes detected. This is the equivalent of the "
14664 "L<pvs(8)> command."
14668 #: ../fish/guestfish-actions.pod:4104 ../src/guestfs-actions.pod:6381
14670 "This returns a list of just the device names that contain PVs "
14671 "(eg. C</dev/sda2>)."
14675 #: ../fish/guestfish-actions.pod:4107
14676 msgid "See also L</pvs-full>."
14680 #: ../fish/guestfish-actions.pod:4109
14685 #: ../fish/guestfish-actions.pod:4111
14693 #: ../fish/guestfish-actions.pod:4113 ../src/guestfs-actions.pod:6397
14695 "List all the physical volumes detected. This is the equivalent of the "
14696 "L<pvs(8)> command. The \"full\" version includes all fields."
14700 #: ../fish/guestfish-actions.pod:4116
14705 #: ../fish/guestfish-actions.pod:4118
14713 #: ../fish/guestfish-actions.pod:4120 ../src/guestfs-actions.pod:6412
14714 msgid "This command returns the UUID of the LVM PV C<device>."
14718 #: ../fish/guestfish-actions.pod:4122
14723 #: ../fish/guestfish-actions.pod:4124
14726 " pwrite path content offset\n"
14731 #: ../fish/guestfish-actions.pod:4126 ../src/guestfs-actions.pod:6428
14733 "This command writes to part of a file. It writes the data buffer C<content> "
14734 "to the file C<path> starting at offset C<offset>."
14738 #: ../fish/guestfish-actions.pod:4129 ../src/guestfs-actions.pod:6431
14740 "This command implements the L<pwrite(2)> system call, and like that system "
14741 "call it may not write the full data requested. The return value is the "
14742 "number of bytes that were actually written to the file. This could even be "
14743 "0, although short writes are unlikely for regular files in ordinary "
14748 #: ../fish/guestfish-actions.pod:4135
14749 msgid "See also L</pread>, L</pwrite-device>."
14753 #: ../fish/guestfish-actions.pod:4140
14754 msgid "pwrite-device"
14758 #: ../fish/guestfish-actions.pod:4142
14761 " pwrite-device device content offset\n"
14766 #: ../fish/guestfish-actions.pod:4144 ../src/guestfs-actions.pod:6455
14768 "This command writes to part of a device. It writes the data buffer "
14769 "C<content> to C<device> starting at offset C<offset>."
14773 #: ../fish/guestfish-actions.pod:4147 ../src/guestfs-actions.pod:6458
14775 "This command implements the L<pwrite(2)> system call, and like that system "
14776 "call it may not write the full data requested (although short writes to disk "
14777 "devices and partitions are probably impossible with standard Linux kernels)."
14781 #: ../fish/guestfish-actions.pod:4152
14782 msgid "See also L</pwrite>."
14786 #: ../fish/guestfish-actions.pod:4157
14791 #: ../fish/guestfish-actions.pod:4159
14794 " read-file path\n"
14799 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6479
14800 msgid "This calls returns the contents of the file C<path> as a buffer."
14804 #: ../fish/guestfish-actions.pod:4164
14806 "Unlike L</cat>, this function can correctly handle files that contain "
14807 "embedded ASCII NUL characters. However unlike L</download>, this function "
14808 "is limited in the total size of file that can be handled."
14812 #: ../fish/guestfish-actions.pod:4172
14817 #: ../fish/guestfish-actions.pod:4174
14820 " read-lines path\n"
14825 #: ../fish/guestfish-actions.pod:4178 ../src/guestfs-actions.pod:6504
14827 "The file contents are returned as a list of lines. Trailing C<LF> and "
14828 "C<CRLF> character sequences are I<not> returned."
14832 #: ../fish/guestfish-actions.pod:4181
14834 "Note that this function cannot correctly handle binary files (specifically, "
14835 "files containing C<\\0> character which is treated as end of line). For "
14836 "those you need to use the L</read-file> function which has a more complex "
14841 #: ../fish/guestfish-actions.pod:4186
14846 #: ../fish/guestfish-actions.pod:4188
14854 #: ../fish/guestfish-actions.pod:4190 ../src/guestfs-actions.pod:6524
14855 msgid "This returns the list of directory entries in directory C<dir>."
14859 #: ../fish/guestfish-actions.pod:4192 ../src/guestfs-actions.pod:6526
14861 "All entries in the directory are returned, including C<.> and C<..>. The "
14862 "entries are I<not> sorted, but returned in the same order as the underlying "
14867 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6530
14869 "Also this call returns basic file type information about each file. The "
14870 "C<ftyp> field will contain one of the following characters:"
14874 #: ../fish/guestfish-actions.pod:4201 ../src/guestfs-actions.pod:6535
14879 #: ../fish/guestfish-actions.pod:4203 ../src/guestfs-actions.pod:6537
14880 msgid "Block special"
14884 #: ../fish/guestfish-actions.pod:4205 ../src/guestfs-actions.pod:6539
14889 #: ../fish/guestfish-actions.pod:4207 ../src/guestfs-actions.pod:6541
14890 msgid "Char special"
14894 #: ../fish/guestfish-actions.pod:4209 ../src/guestfs-actions.pod:6543
14899 #: ../fish/guestfish-actions.pod:4211 ../src/guestfs-actions.pod:6545
14904 #: ../fish/guestfish-actions.pod:4213 ../src/guestfs-actions.pod:6547
14909 #: ../fish/guestfish-actions.pod:4215 ../src/guestfs-actions.pod:6549
14910 msgid "FIFO (named pipe)"
14914 #: ../fish/guestfish-actions.pod:4217 ../src/guestfs-actions.pod:6551
14919 #: ../fish/guestfish-actions.pod:4219 ../src/guestfs-actions.pod:6553
14920 msgid "Symbolic link"
14924 #: ../fish/guestfish-actions.pod:4221 ../src/guestfs-actions.pod:6555
14929 #: ../fish/guestfish-actions.pod:4223 ../src/guestfs-actions.pod:6557
14930 msgid "Regular file"
14934 #: ../fish/guestfish-actions.pod:4225 ../src/guestfs-actions.pod:6559
14939 #: ../fish/guestfish-actions.pod:4227 ../src/guestfs-actions.pod:6561
14944 #: ../fish/guestfish-actions.pod:4229 ../src/guestfs-actions.pod:6563
14949 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6565
14950 msgid "Unknown file type"
14954 #: ../fish/guestfish-actions.pod:4233 ../src/guestfs-actions.pod:6567
14959 #: ../fish/guestfish-actions.pod:4235 ../src/guestfs-actions.pod:6569
14960 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14964 #: ../fish/guestfish-actions.pod:4240
14966 "This function is primarily intended for use by programs. To get a simple "
14967 "list of names, use L</ls>. To get a printable directory for human "
14968 "consumption, use L</ll>."
14972 #: ../fish/guestfish-actions.pod:4244
14977 #: ../fish/guestfish-actions.pod:4246
14985 #: ../fish/guestfish-actions.pod:4248 ../src/guestfs-actions.pod:6590
14986 msgid "This command reads the target of a symbolic link."
14990 #: ../fish/guestfish-actions.pod:4250
14991 msgid "readlinklist"
14995 #: ../fish/guestfish-actions.pod:4252
14998 " readlinklist path 'names ...'\n"
15003 #: ../fish/guestfish-actions.pod:4254 ../src/guestfs-actions.pod:6604
15005 "This call allows you to do a C<readlink> operation on multiple files, where "
15006 "all files are in the directory C<path>. C<names> is the list of files from "
15011 #: ../fish/guestfish-actions.pod:4258 ../src/guestfs-actions.pod:6608
15013 "On return you get a list of strings, with a one-to-one correspondence to the "
15014 "C<names> list. Each string is the value of the symbolic link."
15018 #: ../fish/guestfish-actions.pod:4262 ../src/guestfs-actions.pod:6612
15020 "If the C<readlink(2)> operation fails on any name, then the corresponding "
15021 "result string is the empty string C<\"\">. However the whole operation is "
15022 "completed even if there were C<readlink(2)> errors, and so you can call this "
15023 "function with names where you don't know if they are symbolic links already "
15024 "(albeit slightly less efficient)."
15028 #: ../fish/guestfish-actions.pod:4269 ../src/guestfs-actions.pod:6619
15030 "This call is intended for programs that want to efficiently list a directory "
15031 "contents without making many round-trips. Very long directory listings "
15032 "might cause the protocol message size to be exceeded, causing this call to "
15033 "fail. The caller must split up such requests into smaller groups of names."
15037 #: ../fish/guestfish-actions.pod:4276
15042 #: ../fish/guestfish-actions.pod:4278
15050 #: ../fish/guestfish-actions.pod:4280 ../src/guestfs-actions.pod:6638
15052 "Return the canonicalized absolute pathname of C<path>. The returned path "
15053 "has no C<.>, C<..> or symbolic link path elements."
15057 #: ../fish/guestfish-actions.pod:4283
15058 msgid "removexattr"
15062 #: ../fish/guestfish-actions.pod:4285
15065 " removexattr xattr path\n"
15070 #: ../fish/guestfish-actions.pod:4287 ../src/guestfs-actions.pod:6653
15071 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
15075 #: ../fish/guestfish-actions.pod:4290
15076 msgid "See also: L</lremovexattr>, L<attr(5)>."
15080 #: ../fish/guestfish-actions.pod:4292
15085 #: ../fish/guestfish-actions.pod:4294
15088 " resize2fs device\n"
15093 #: ../fish/guestfish-actions.pod:4296 ../src/guestfs-actions.pod:6668
15095 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
15096 "underlying device."
15100 #: ../fish/guestfish-actions.pod:4299
15102 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
15103 "before calling this command. For unknown reasons C<resize2fs> sometimes "
15104 "gives an error about this and sometimes not. In any case, it is always safe "
15105 "to call L</e2fsck-f> before calling this function."
15109 #: ../fish/guestfish-actions.pod:4305
15110 msgid "resize2fs-M"
15114 #: ../fish/guestfish-actions.pod:4307
15117 " resize2fs-M device\n"
15122 #: ../fish/guestfish-actions.pod:4309
15124 "This command is the same as L</resize2fs>, but the filesystem is resized to "
15125 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
15130 #: ../fish/guestfish-actions.pod:4313
15132 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
15133 "and read the C<Block size> and C<Block count> values. These two numbers, "
15134 "multiplied together, give the resulting size of the minimal filesystem in "
15139 #: ../fish/guestfish-actions.pod:4318
15140 msgid "resize2fs-size"
15144 #: ../fish/guestfish-actions.pod:4320
15147 " resize2fs-size device size\n"
15152 #: ../fish/guestfish-actions.pod:4322
15154 "This command is the same as L</resize2fs> except that it allows you to "
15155 "specify the new size (in bytes) explicitly."
15159 #: ../fish/guestfish-actions.pod:4325
15164 #: ../fish/guestfish-actions.pod:4327
15172 #: ../fish/guestfish-actions.pod:4329 ../src/guestfs-actions.pod:6720
15173 msgid "Remove the single file C<path>."
15177 #: ../fish/guestfish-actions.pod:4331
15182 #: ../fish/guestfish-actions.pod:4333
15190 #: ../fish/guestfish-actions.pod:4335 ../src/guestfs-actions.pod:6732
15192 "Remove the file or directory C<path>, recursively removing the contents if "
15193 "its a directory. This is like the C<rm -rf> shell command."
15197 #: ../fish/guestfish-actions.pod:4339
15202 #: ../fish/guestfish-actions.pod:4341
15210 #: ../fish/guestfish-actions.pod:4343 ../src/guestfs-actions.pod:6746
15211 msgid "Remove the single directory C<path>."
15215 #: ../fish/guestfish-actions.pod:4345
15216 msgid "rmmountpoint"
15220 #: ../fish/guestfish-actions.pod:4347
15223 " rmmountpoint exemptpath\n"
15228 #: ../fish/guestfish-actions.pod:4349
15230 "This calls removes a mountpoint that was previously created with "
15231 "L</mkmountpoint>. See L</mkmountpoint> for full details."
15235 #: ../fish/guestfish-actions.pod:4353
15236 msgid "scrub-device"
15240 #: ../fish/guestfish-actions.pod:4355
15243 " scrub-device device\n"
15248 #: ../fish/guestfish-actions.pod:4357 ../src/guestfs-actions.pod:6772
15250 "This command writes patterns over C<device> to make data retrieval more "
15255 #: ../fish/guestfish-actions.pod:4360 ../fish/guestfish-actions.pod:4372 ../fish/guestfish-actions.pod:4385 ../src/guestfs-actions.pod:6775 ../src/guestfs-actions.pod:6793 ../src/guestfs-actions.pod:6812
15257 "It is an interface to the L<scrub(1)> program. See that manual page for "
15262 #: ../fish/guestfish-actions.pod:4363
15267 #: ../fish/guestfish-actions.pod:4365
15270 " scrub-file file\n"
15275 #: ../fish/guestfish-actions.pod:4367 ../src/guestfs-actions.pod:6788
15277 "This command writes patterns over a file to make data retrieval more "
15282 #: ../fish/guestfish-actions.pod:4370 ../src/guestfs-actions.pod:6791
15283 msgid "The file is I<removed> after scrubbing."
15287 #: ../fish/guestfish-actions.pod:4375
15288 msgid "scrub-freespace"
15292 #: ../fish/guestfish-actions.pod:4377
15295 " scrub-freespace dir\n"
15300 #: ../fish/guestfish-actions.pod:4379
15302 "This command creates the directory C<dir> and then fills it with files until "
15303 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
15304 "deletes them. The intention is to scrub any free space on the partition "
15305 "containing C<dir>."
15309 #: ../fish/guestfish-actions.pod:4388
15314 #: ../fish/guestfish-actions.pod:4390
15319 #: ../fish/guestfish-actions.pod:4392
15322 " set-append append\n"
15327 #: ../fish/guestfish-actions.pod:4394 ../src/guestfs-actions.pod:6825
15329 "This function is used to add additional options to the guest kernel command "
15334 #: ../fish/guestfish-actions.pod:4397 ../src/guestfs-actions.pod:6828
15336 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15337 "environment variable."
15341 #: ../fish/guestfish-actions.pod:4400 ../src/guestfs-actions.pod:6831
15343 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15344 "(libguestfs always adds a few of its own)."
15348 #: ../fish/guestfish-actions.pod:4403
15349 msgid "set-attach-method"
15353 #: ../fish/guestfish-actions.pod:4405
15354 msgid "attach-method"
15358 #: ../fish/guestfish-actions.pod:4407
15361 " set-attach-method attachmethod\n"
15366 #: ../fish/guestfish-actions.pod:4409 ../src/guestfs-actions.pod:6844
15368 "Set the method that libguestfs uses to connect to the back end guestfsd "
15369 "daemon. Possible methods are:"
15373 #: ../fish/guestfish-actions.pod:4414 ../src/guestfs-actions.pod:6849 ../src/guestfs.pod:2916
15374 msgid "C<appliance>"
15378 #: ../fish/guestfish-actions.pod:4416 ../src/guestfs-actions.pod:6851
15380 "Launch an appliance and connect to it. This is the ordinary method and the "
15385 #: ../fish/guestfish-actions.pod:4419 ../src/guestfs-actions.pod:6854
15386 msgid "C<unix:I<path>>"
15390 #: ../fish/guestfish-actions.pod:4421 ../src/guestfs-actions.pod:6856
15391 msgid "Connect to the Unix domain socket I<path>."
15395 #: ../fish/guestfish-actions.pod:4423 ../src/guestfs-actions.pod:6858
15397 "This method lets you connect to an existing daemon or (using virtio-serial) "
15398 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15399 "RUNNING DAEMONS>."
15403 #: ../fish/guestfish-actions.pod:4429
15404 msgid "set-autosync"
15408 #: ../fish/guestfish-actions.pod:4431
15413 #: ../fish/guestfish-actions.pod:4433
15416 " set-autosync true|false\n"
15421 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6874
15423 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15424 "effort attempt to make filesystems consistent and synchronized when the "
15425 "handle is closed (also if the program exits without closing handles)."
15429 #: ../fish/guestfish-actions.pod:4440 ../src/guestfs-actions.pod:6879
15431 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15432 "disabled by default)."
15436 #: ../fish/guestfish-actions.pod:4443
15441 #: ../fish/guestfish-actions.pod:4445
15446 #: ../fish/guestfish-actions.pod:4447
15449 " set-direct true|false\n"
15454 #: ../fish/guestfish-actions.pod:4449 ../src/guestfs-actions.pod:6892
15456 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15457 "passed directly through to the appliance once it is launched."
15461 #: ../fish/guestfish-actions.pod:4453
15463 "One consequence of this is that log messages aren't caught by the library "
15464 "and handled by L</set-log-message-callback>, but go straight to stdout."
15468 #: ../fish/guestfish-actions.pod:4457 ../src/guestfs-actions.pod:6900
15469 msgid "You probably don't want to use this unless you know what you are doing."
15473 #: ../fish/guestfish-actions.pod:4460 ../src/guestfs-actions.pod:6903
15474 msgid "The default is disabled."
15478 #: ../fish/guestfish-actions.pod:4462
15479 msgid "set-e2label"
15483 #: ../fish/guestfish-actions.pod:4464
15486 " set-e2label device label\n"
15491 #: ../fish/guestfish-actions.pod:4466 ../src/guestfs-actions.pod:6916
15493 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15494 "C<label>. Filesystem labels are limited to 16 characters."
15498 #: ../fish/guestfish-actions.pod:4470
15500 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15501 "label on a filesystem."
15505 #: ../fish/guestfish-actions.pod:4473
15510 #: ../fish/guestfish-actions.pod:4475
15513 " set-e2uuid device uuid\n"
15518 #: ../fish/guestfish-actions.pod:4477 ../src/guestfs-actions.pod:6934
15520 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15521 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15522 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15526 #: ../fish/guestfish-actions.pod:4482
15528 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15529 "UUID of a filesystem."
15533 #: ../fish/guestfish-actions.pod:4485
15534 msgid "set-memsize"
15538 #: ../fish/guestfish-actions.pod:4487
15543 #: ../fish/guestfish-actions.pod:4489
15546 " set-memsize memsize\n"
15551 #: ../fish/guestfish-actions.pod:4491
15553 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15554 "This only has any effect if called before L</launch>."
15558 #: ../fish/guestfish-actions.pod:4495 ../src/guestfs-actions.pod:6956
15560 "You can also change this by setting the environment variable "
15561 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15565 #: ../fish/guestfish-actions.pod:4502
15566 msgid "set-network"
15570 #: ../fish/guestfish-actions.pod:4504
15575 #: ../fish/guestfish-actions.pod:4506
15578 " set-network true|false\n"
15583 #: ../fish/guestfish-actions.pod:4508 ../src/guestfs-actions.pod:6973
15585 "If C<network> is true, then the network is enabled in the libguestfs "
15586 "appliance. The default is false."
15590 #: ../fish/guestfish-actions.pod:4511 ../src/guestfs-actions.pod:6976
15592 "This affects whether commands are able to access the network (see "
15593 "L<guestfs(3)/RUNNING COMMANDS>)."
15597 #: ../fish/guestfish-actions.pod:4514
15598 msgid "You must call this before calling L</launch>, otherwise it has no effect."
15602 #: ../fish/guestfish-actions.pod:4517
15607 #: ../fish/guestfish-actions.pod:4521
15610 " set-path searchpath\n"
15615 #: ../fish/guestfish-actions.pod:4523 ../src/guestfs-actions.pod:6992
15616 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15620 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6994
15622 "The default is C<$libdir/guestfs> unless overridden by setting "
15623 "C<LIBGUESTFS_PATH> environment variable."
15627 #: ../fish/guestfish-actions.pod:4528 ../src/guestfs-actions.pod:6997
15628 msgid "Setting C<path> to C<NULL> restores the default path."
15632 #: ../fish/guestfish-actions.pod:4530
15637 #: ../fish/guestfish-actions.pod:4532
15642 #: ../fish/guestfish-actions.pod:4534
15645 " set-pgroup true|false\n"
15650 #: ../fish/guestfish-actions.pod:4536 ../src/guestfs-actions.pod:7009
15652 "If C<pgroup> is true, child processes are placed into their own process "
15657 #: ../fish/guestfish-actions.pod:4539 ../src/guestfs-actions.pod:7012
15659 "The practical upshot of this is that signals like C<SIGINT> (from users "
15660 "pressing C<^C>) won't be received by the child process."
15664 #: ../fish/guestfish-actions.pod:4542 ../src/guestfs-actions.pod:7015
15666 "The default for this flag is false, because usually you want C<^C> to kill "
15671 #: ../fish/guestfish-actions.pod:4545
15676 #: ../fish/guestfish-actions.pod:4547
15681 #: ../fish/guestfish-actions.pod:4549
15689 #: ../fish/guestfish-actions.pod:4551 ../src/guestfs-actions.pod:7028
15690 msgid "Set the qemu binary that we will use."
15694 #: ../fish/guestfish-actions.pod:4553 ../src/guestfs-actions.pod:7030
15695 msgid "The default is chosen when the library was compiled by the configure script."
15699 #: ../fish/guestfish-actions.pod:4556 ../src/guestfs-actions.pod:7033
15701 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15706 #: ../fish/guestfish-actions.pod:4559 ../src/guestfs-actions.pod:7036
15707 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15711 #: ../fish/guestfish-actions.pod:4561 ../src/guestfs-actions.pod:7038
15713 "Note that you should call this function as early as possible after creating "
15714 "the handle. This is because some pre-launch operations depend on testing "
15715 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15716 "don't retest features, and so you might see inconsistent results. Using the "
15717 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15718 "the qemu binary at the same time as the handle is created."
15722 #: ../fish/guestfish-actions.pod:4569
15723 msgid "set-recovery-proc"
15727 #: ../fish/guestfish-actions.pod:4571
15728 msgid "recovery-proc"
15732 #: ../fish/guestfish-actions.pod:4573
15735 " set-recovery-proc true|false\n"
15740 #: ../fish/guestfish-actions.pod:4575
15742 "If this is called with the parameter C<false> then L</launch> does not "
15743 "create a recovery process. The purpose of the recovery process is to stop "
15744 "runaway qemu processes in the case where the main program aborts abruptly."
15748 #: ../fish/guestfish-actions.pod:4580
15750 "This only has any effect if called before L</launch>, and the default is "
15755 #: ../fish/guestfish-actions.pod:4583 ../src/guestfs-actions.pod:7064
15757 "About the only time when you would want to disable this is if the main "
15758 "process will fork itself into the background (\"daemonize\" itself). In "
15759 "this case the recovery process thinks that the main program has disappeared "
15760 "and so kills qemu, which is not very helpful."
15764 #: ../fish/guestfish-actions.pod:4589
15765 msgid "set-selinux"
15769 #: ../fish/guestfish-actions.pod:4591
15774 #: ../fish/guestfish-actions.pod:4593
15777 " set-selinux true|false\n"
15782 #: ../fish/guestfish-actions.pod:4595 ../src/guestfs-actions.pod:7080
15784 "This sets the selinux flag that is passed to the appliance at boot time. "
15785 "The default is C<selinux=0> (disabled)."
15789 #: ../fish/guestfish-actions.pod:4598 ../src/guestfs-actions.pod:7083
15791 "Note that if SELinux is enabled, it is always in Permissive mode "
15792 "(C<enforcing=0>)."
15796 #: ../fish/guestfish-actions.pod:4604
15801 #: ../fish/guestfish-actions.pod:4606
15806 #: ../fish/guestfish-actions.pod:4608
15814 #: ../fish/guestfish-actions.pod:4610 ../src/guestfs-actions.pod:7099
15816 "Change the number of virtual CPUs assigned to the appliance. The default is "
15817 "C<1>. Increasing this may improve performance, though often it has no "
15822 #: ../fish/guestfish-actions.pod:4614
15823 msgid "This function must be called before L</launch>."
15827 #: ../fish/guestfish-actions.pod:4616
15832 #: ../fish/guestfish-actions.pod:4618
15837 #: ../fish/guestfish-actions.pod:4620
15840 " set-trace true|false\n"
15845 #: ../fish/guestfish-actions.pod:4622 ../src/guestfs-actions.pod:7115
15847 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15848 "return values are traced."
15852 #: ../fish/guestfish-actions.pod:4625 ../src/guestfs-actions.pod:7118
15854 "If you want to trace C API calls into libguestfs (and other libraries) then "
15855 "possibly a better way is to use the external ltrace(1) command."
15859 #: ../fish/guestfish-actions.pod:4629 ../src/guestfs-actions.pod:7122
15861 "Command traces are disabled unless the environment variable "
15862 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15866 #: ../fish/guestfish-actions.pod:4632
15868 "Trace messages are normally sent to C<stderr>, unless you register a "
15869 "callback to send them somewhere else (see L</set-event-callback>)."
15873 #: ../fish/guestfish-actions.pod:4636
15874 msgid "set-verbose"
15878 #: ../fish/guestfish-actions.pod:4638
15883 #: ../fish/guestfish-actions.pod:4640
15886 " set-verbose true|false\n"
15891 #: ../fish/guestfish-actions.pod:4642 ../src/guestfs-actions.pod:7139
15892 msgid "If C<verbose> is true, this turns on verbose messages."
15896 #: ../fish/guestfish-actions.pod:4644 ../src/guestfs-actions.pod:7141
15898 "Verbose messages are disabled unless the environment variable "
15899 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15903 #: ../fish/guestfish-actions.pod:4647
15905 "Verbose messages are normally sent to C<stderr>, unless you register a "
15906 "callback to send them somewhere else (see L</set-event-callback>)."
15910 #: ../fish/guestfish-actions.pod:4651
15915 #: ../fish/guestfish-actions.pod:4653
15918 " setcon context\n"
15923 #: ../fish/guestfish-actions.pod:4655 ../src/guestfs-actions.pod:7158
15925 "This sets the SELinux security context of the daemon to the string "
15930 #: ../fish/guestfish-actions.pod:4658 ../src/guestfs-actions.pod:7161
15931 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15935 #: ../fish/guestfish-actions.pod:4660
15940 #: ../fish/guestfish-actions.pod:4662
15943 " setxattr xattr val vallen path\n"
15948 #: ../fish/guestfish-actions.pod:4664 ../src/guestfs-actions.pod:7176
15950 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15951 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15955 #: ../fish/guestfish-actions.pod:4668
15956 msgid "See also: L</lsetxattr>, L<attr(5)>."
15960 #: ../fish/guestfish-actions.pod:4670
15965 #: ../fish/guestfish-actions.pod:4672
15968 " sfdisk device cyls heads sectors 'lines ...'\n"
15973 #: ../fish/guestfish-actions.pod:4674 ../src/guestfs-actions.pod:7203
15975 "This is a direct interface to the L<sfdisk(8)> program for creating "
15976 "partitions on block devices."
15980 #: ../fish/guestfish-actions.pod:4677 ../src/guestfs-actions.pod:7206
15981 msgid "C<device> should be a block device, for example C</dev/sda>."
15985 #: ../fish/guestfish-actions.pod:4679 ../src/guestfs-actions.pod:7208
15987 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15988 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
15989 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15990 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15991 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15992 "the kernel) cannot work out the right geometry and you will need to tell it."
15996 #: ../fish/guestfish-actions.pod:4687 ../src/guestfs-actions.pod:7216
15998 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15999 "refer to the L<sfdisk(8)> manpage."
16003 #: ../fish/guestfish-actions.pod:4690 ../src/guestfs-actions.pod:7219
16005 "To create a single partition occupying the whole disk, you would pass "
16006 "C<lines> as a single element list, when the single element being the string "
16011 #: ../fish/guestfish-actions.pod:4694
16012 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
16016 #: ../fish/guestfish-actions.pod:4697 ../fish/guestfish-actions.pod:4717 ../fish/guestfish-actions.pod:4736
16018 "I<This function is deprecated.> In new code, use the L</part_add> call "
16023 #: ../fish/guestfish-actions.pod:4704
16028 #: ../fish/guestfish-actions.pod:4706
16031 " sfdiskM device 'lines ...'\n"
16036 #: ../fish/guestfish-actions.pod:4708
16038 "This is a simplified interface to the L</sfdisk> command, where partition "
16039 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
16040 "you don't need to specify the cyls, heads and sectors parameters which were "
16041 "rarely if ever used anyway."
16045 #: ../fish/guestfish-actions.pod:4714
16046 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
16050 #: ../fish/guestfish-actions.pod:4724
16055 #: ../fish/guestfish-actions.pod:4726
16058 " sfdisk-N device partnum cyls heads sectors line\n"
16063 #: ../fish/guestfish-actions.pod:4728 ../src/guestfs-actions.pod:7275
16065 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
16066 "(note: C<n> counts from 1)."
16070 #: ../fish/guestfish-actions.pod:4731
16072 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
16073 "cyls/heads/sectors parameters."
16077 #: ../fish/guestfish-actions.pod:4734
16078 msgid "See also: L</part-add>"
16082 #: ../fish/guestfish-actions.pod:4743
16083 msgid "sfdisk-disk-geometry"
16087 #: ../fish/guestfish-actions.pod:4745
16090 " sfdisk-disk-geometry device\n"
16095 #: ../fish/guestfish-actions.pod:4747
16097 "This displays the disk geometry of C<device> read from the partition table. "
16098 "Especially in the case where the underlying block device has been resized, "
16099 "this can be different from the kernel's idea of the geometry (see "
16100 "L</sfdisk-kernel-geometry>)."
16104 #: ../fish/guestfish-actions.pod:4752 ../fish/guestfish-actions.pod:4761 ../src/guestfs-actions.pod:7298 ../src/guestfs-actions.pod:7314
16105 msgid "The result is in human-readable format, and not designed to be parsed."
16109 #: ../fish/guestfish-actions.pod:4755
16110 msgid "sfdisk-kernel-geometry"
16114 #: ../fish/guestfish-actions.pod:4757
16117 " sfdisk-kernel-geometry device\n"
16122 #: ../fish/guestfish-actions.pod:4759 ../src/guestfs-actions.pod:7312
16123 msgid "This displays the kernel's idea of the geometry of C<device>."
16127 #: ../fish/guestfish-actions.pod:4764
16132 #: ../fish/guestfish-actions.pod:4766
16135 " sfdisk-l device\n"
16140 #: ../fish/guestfish-actions.pod:4768 ../src/guestfs-actions.pod:7335
16142 "This displays the partition table on C<device>, in the human-readable output "
16143 "of the L<sfdisk(8)> command. It is not intended to be parsed."
16147 #: ../fish/guestfish-actions.pod:4772
16148 msgid "See also: L</part-list>"
16152 #: ../fish/guestfish-actions.pod:4774
16154 "I<This function is deprecated.> In new code, use the L</part_list> call "
16159 #: ../fish/guestfish-actions.pod:4781
16164 #: ../fish/guestfish-actions.pod:4783
16172 #: ../fish/guestfish-actions.pod:4785 ../src/guestfs-actions.pod:7352
16174 "This call runs a command from the guest filesystem via the guest's "
16179 #: ../fish/guestfish-actions.pod:4788
16180 msgid "This is like L</command>, but passes the command to:"
16184 #: ../fish/guestfish-actions.pod:4790 ../src/guestfs-actions.pod:7357
16187 " /bin/sh -c \"command\"\n"
16192 #: ../fish/guestfish-actions.pod:4792 ../src/guestfs-actions.pod:7359
16194 "Depending on the guest's shell, this usually results in wildcards being "
16195 "expanded, shell expressions being interpolated and so on."
16199 #: ../fish/guestfish-actions.pod:4796
16200 msgid "All the provisos about L</command> apply to this call."
16204 #: ../fish/guestfish-actions.pod:4798
16209 #: ../fish/guestfish-actions.pod:4800
16212 " sh-lines command\n"
16217 #: ../fish/guestfish-actions.pod:4802
16218 msgid "This is the same as L</sh>, but splits the result into a list of lines."
16222 #: ../fish/guestfish-actions.pod:4805
16223 msgid "See also: L</command-lines>"
16227 #: ../fish/guestfish-actions.pod:4807
16232 #: ../fish/guestfish-actions.pod:4809
16240 #: ../fish/guestfish-actions.pod:4811 ../src/guestfs-actions.pod:7393
16241 msgid "Sleep for C<secs> seconds."
16245 #: ../fish/guestfish-actions.pod:4813
16250 #: ../fish/guestfish-actions.pod:4815
16258 #: ../fish/guestfish-actions.pod:4819 ../src/guestfs-actions.pod:7407
16259 msgid "This is the same as the C<stat(2)> system call."
16263 #: ../fish/guestfish-actions.pod:4821
16268 #: ../fish/guestfish-actions.pod:4823
16276 #: ../fish/guestfish-actions.pod:4825 ../src/guestfs-actions.pod:7421
16278 "Returns file system statistics for any mounted file system. C<path> should "
16279 "be a file or directory in the mounted file system (typically it is the mount "
16280 "point itself, but it doesn't need to be)."
16284 #: ../fish/guestfish-actions.pod:4829 ../src/guestfs-actions.pod:7425
16285 msgid "This is the same as the C<statvfs(2)> system call."
16289 #: ../fish/guestfish-actions.pod:4831
16294 #: ../fish/guestfish-actions.pod:4833
16302 #: ../fish/guestfish-actions.pod:4835 ../src/guestfs-actions.pod:7439
16304 "This runs the L<strings(1)> command on a file and returns the list of "
16305 "printable strings found."
16309 #: ../fish/guestfish-actions.pod:4841
16314 #: ../fish/guestfish-actions.pod:4843
16317 " strings-e encoding path\n"
16322 #: ../fish/guestfish-actions.pod:4845
16324 "This is like the L</strings> command, but allows you to specify the encoding "
16325 "of strings that are looked for in the source file C<path>."
16329 #: ../fish/guestfish-actions.pod:4849 ../src/guestfs-actions.pod:7462
16330 msgid "Allowed encodings are:"
16334 #: ../fish/guestfish-actions.pod:4853 ../src/guestfs-actions.pod:7466
16339 #: ../fish/guestfish-actions.pod:4855
16341 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16342 "ISO-8859-X (this is what L</strings> uses)."
16346 #: ../fish/guestfish-actions.pod:4858 ../src/guestfs-actions.pod:7471
16351 #: ../fish/guestfish-actions.pod:4860 ../src/guestfs-actions.pod:7473
16352 msgid "Single 8-bit-byte characters."
16356 #: ../fish/guestfish-actions.pod:4862 ../src/guestfs-actions.pod:7475
16361 #: ../fish/guestfish-actions.pod:4864 ../src/guestfs-actions.pod:7477
16362 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16366 #: ../fish/guestfish-actions.pod:4867 ../src/guestfs-actions.pod:7480
16367 msgid "l (lower case letter L)"
16371 #: ../fish/guestfish-actions.pod:4869 ../src/guestfs-actions.pod:7482
16373 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16374 "examining binaries in Windows guests."
16378 #: ../fish/guestfish-actions.pod:4872 ../src/guestfs-actions.pod:7485
16383 #: ../fish/guestfish-actions.pod:4874 ../src/guestfs-actions.pod:7487
16384 msgid "32-bit big endian such as UCS-4BE."
16388 #: ../fish/guestfish-actions.pod:4876 ../src/guestfs-actions.pod:7489
16393 #: ../fish/guestfish-actions.pod:4878 ../src/guestfs-actions.pod:7491
16394 msgid "32-bit little endian such as UCS-4LE."
16398 #: ../fish/guestfish-actions.pod:4882 ../src/guestfs-actions.pod:7495
16399 msgid "The returned strings are transcoded to UTF-8."
16403 #: ../fish/guestfish-actions.pod:4887
16404 msgid "swapoff-device"
16408 #: ../fish/guestfish-actions.pod:4889
16411 " swapoff-device device\n"
16416 #: ../fish/guestfish-actions.pod:4891
16418 "This command disables the libguestfs appliance swap device or partition "
16419 "named C<device>. See L</swapon-device>."
16423 #: ../fish/guestfish-actions.pod:4895
16424 msgid "swapoff-file"
16428 #: ../fish/guestfish-actions.pod:4897
16431 " swapoff-file file\n"
16436 #: ../fish/guestfish-actions.pod:4899 ../src/guestfs-actions.pod:7526
16437 msgid "This command disables the libguestfs appliance swap on file."
16441 #: ../fish/guestfish-actions.pod:4901
16442 msgid "swapoff-label"
16446 #: ../fish/guestfish-actions.pod:4903
16449 " swapoff-label label\n"
16454 #: ../fish/guestfish-actions.pod:4905 ../src/guestfs-actions.pod:7538
16456 "This command disables the libguestfs appliance swap on labeled swap "
16461 #: ../fish/guestfish-actions.pod:4908
16462 msgid "swapoff-uuid"
16466 #: ../fish/guestfish-actions.pod:4910
16469 " swapoff-uuid uuid\n"
16474 #: ../fish/guestfish-actions.pod:4912 ../src/guestfs-actions.pod:7551
16476 "This command disables the libguestfs appliance swap partition with the given "
16481 #: ../fish/guestfish-actions.pod:4915
16482 msgid "swapon-device"
16486 #: ../fish/guestfish-actions.pod:4917
16489 " swapon-device device\n"
16494 #: ../fish/guestfish-actions.pod:4919
16496 "This command enables the libguestfs appliance to use the swap device or "
16497 "partition named C<device>. The increased memory is made available for all "
16498 "commands, for example those run using L</command> or L</sh>."
16502 #: ../fish/guestfish-actions.pod:4924 ../src/guestfs-actions.pod:7569
16504 "Note that you should not swap to existing guest swap partitions unless you "
16505 "know what you are doing. They may contain hibernation information, or other "
16506 "information that the guest doesn't want you to trash. You also risk leaking "
16507 "information about the host to the guest this way. Instead, attach a new "
16508 "host device to the guest and swap on that."
16512 #: ../fish/guestfish-actions.pod:4931
16513 msgid "swapon-file"
16517 #: ../fish/guestfish-actions.pod:4933
16520 " swapon-file file\n"
16525 #: ../fish/guestfish-actions.pod:4935
16526 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
16530 #: ../fish/guestfish-actions.pod:4938
16531 msgid "swapon-label"
16535 #: ../fish/guestfish-actions.pod:4940
16538 " swapon-label label\n"
16543 #: ../fish/guestfish-actions.pod:4942
16545 "This command enables swap to a labeled swap partition. See "
16546 "L</swapon-device> for other notes."
16550 #: ../fish/guestfish-actions.pod:4945
16551 msgid "swapon-uuid"
16555 #: ../fish/guestfish-actions.pod:4947
16558 " swapon-uuid uuid\n"
16563 #: ../fish/guestfish-actions.pod:4949
16565 "This command enables swap to a swap partition with the given UUID. See "
16566 "L</swapon-device> for other notes."
16570 #: ../fish/guestfish-actions.pod:4952
16575 #: ../fish/guestfish-actions.pod:4954
16583 #: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7624
16585 "This syncs the disk, so that any writes are flushed through to the "
16586 "underlying disk image."
16590 #: ../fish/guestfish-actions.pod:4959 ../src/guestfs-actions.pod:7627
16592 "You should always call this if you have modified a disk image, before "
16593 "closing the handle."
16597 #: ../fish/guestfish-actions.pod:4962
16602 #: ../fish/guestfish-actions.pod:4964
16610 #: ../fish/guestfish-actions.pod:4966 ../src/guestfs-actions.pod:7640
16611 msgid "This command returns up to the last 10 lines of a file as a list of strings."
16615 #: ../fish/guestfish-actions.pod:4972
16620 #: ../fish/guestfish-actions.pod:4974
16623 " tail-n nrlines path\n"
16628 #: ../fish/guestfish-actions.pod:4976 ../src/guestfs-actions.pod:7659
16630 "If the parameter C<nrlines> is a positive number, this returns the last "
16631 "C<nrlines> lines of the file C<path>."
16635 #: ../fish/guestfish-actions.pod:4979 ../src/guestfs-actions.pod:7662
16637 "If the parameter C<nrlines> is a negative number, this returns lines from "
16638 "the file C<path>, starting with the C<-nrlines>th line."
16642 #: ../fish/guestfish-actions.pod:4987
16647 #: ../fish/guestfish-actions.pod:4989
16650 " tar-in (tarfile|-) directory\n"
16655 #: ../fish/guestfish-actions.pod:4991 ../src/guestfs-actions.pod:7683
16657 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16658 "tar file) into C<directory>."
16662 #: ../fish/guestfish-actions.pod:4994
16663 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16667 #: ../fish/guestfish-actions.pod:4999
16672 #: ../fish/guestfish-actions.pod:5001
16675 " tar-out directory (tarfile|-)\n"
16680 #: ../fish/guestfish-actions.pod:5003 ../src/guestfs-actions.pod:7700
16682 "This command packs the contents of C<directory> and downloads it to local "
16687 #: ../fish/guestfish-actions.pod:5006
16688 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16692 #: ../fish/guestfish-actions.pod:5011
16697 #: ../fish/guestfish-actions.pod:5013
16700 " tgz-in (tarball|-) directory\n"
16705 #: ../fish/guestfish-actions.pod:5015 ../src/guestfs-actions.pod:7717
16707 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16708 "tar file) into C<directory>."
16712 #: ../fish/guestfish-actions.pod:5018
16713 msgid "To upload an uncompressed tarball, use L</tar-in>."
16717 #: ../fish/guestfish-actions.pod:5022
16722 #: ../fish/guestfish-actions.pod:5024
16725 " tgz-out directory (tarball|-)\n"
16730 #: ../fish/guestfish-actions.pod:5026 ../src/guestfs-actions.pod:7733
16732 "This command packs the contents of C<directory> and downloads it to local "
16737 #: ../fish/guestfish-actions.pod:5029
16738 msgid "To download an uncompressed tarball, use L</tar-out>."
16742 #: ../fish/guestfish-actions.pod:5033
16747 #: ../fish/guestfish-actions.pod:5035
16755 #: ../fish/guestfish-actions.pod:5037 ../src/guestfs-actions.pod:7748
16757 "Touch acts like the L<touch(1)> command. It can be used to update the "
16758 "timestamps on a file, or, if the file does not exist, to create a new "
16759 "zero-length file."
16763 #: ../fish/guestfish-actions.pod:5041 ../src/guestfs-actions.pod:7752
16765 "This command only works on regular files, and will fail on other file types "
16766 "such as directories, symbolic links, block special etc."
16770 #: ../fish/guestfish-actions.pod:5044
16775 #: ../fish/guestfish-actions.pod:5046
16783 #: ../fish/guestfish-actions.pod:5048 ../src/guestfs-actions.pod:7765
16785 "This command truncates C<path> to a zero-length file. The file must exist "
16790 #: ../fish/guestfish-actions.pod:5051
16791 msgid "truncate-size"
16795 #: ../fish/guestfish-actions.pod:5053
16798 " truncate-size path size\n"
16803 #: ../fish/guestfish-actions.pod:5055 ../src/guestfs-actions.pod:7779
16805 "This command truncates C<path> to size C<size> bytes. The file must exist "
16810 #: ../fish/guestfish-actions.pod:5058
16812 "If the current file size is less than C<size> then the file is extended to "
16813 "the required size with zero bytes. This creates a sparse file (ie. disk "
16814 "blocks are not allocated for the file until you write to it). To create a "
16815 "non-sparse file of zeroes, use L</fallocate64> instead."
16819 #: ../fish/guestfish-actions.pod:5064
16824 #: ../fish/guestfish-actions.pod:5066
16827 " tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] "
16828 "[errorbehavior:..] [group:N] [intervalbetweenchecks:N] "
16829 "[reservedblockspercentage:N] [lastmounteddirectory:..] "
16830 "[reservedblockscount:N] [user:N]\n"
16835 #: ../fish/guestfish-actions.pod:5068 ../src/guestfs-actions.pod:7815
16837 "This call allows you to adjust various filesystem parameters of an "
16838 "ext2/ext3/ext4 filesystem called C<device>."
16842 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7824
16844 "Force tune2fs to complete the operation even in the face of errors. This is "
16845 "the same as the tune2fs C<-f> option."
16849 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7827
16850 msgid "C<maxmountcount>"
16854 #: ../fish/guestfish-actions.pod:5082 ../src/guestfs-actions.pod:7829
16856 "Set the number of mounts after which the filesystem is checked by "
16857 "L<e2fsck(8)>. If this is C<0> then the number of mounts is disregarded. "
16858 "This is the same as the tune2fs C<-c> option."
16862 #: ../fish/guestfish-actions.pod:5086 ../src/guestfs-actions.pod:7833
16863 msgid "C<mountcount>"
16867 #: ../fish/guestfish-actions.pod:5088 ../src/guestfs-actions.pod:7835
16869 "Set the number of times the filesystem has been mounted. This is the same "
16870 "as the tune2fs C<-C> option."
16874 #: ../fish/guestfish-actions.pod:5091 ../src/guestfs-actions.pod:7838
16875 msgid "C<errorbehavior>"
16879 #: ../fish/guestfish-actions.pod:5093 ../src/guestfs-actions.pod:7840
16881 "Change the behavior of the kernel code when errors are detected. Possible "
16882 "values currently are: C<continue>, C<remount-ro>, C<panic>. In practice "
16883 "these options don't really make any difference, particularly for write "
16888 #: ../fish/guestfish-actions.pod:5098 ../src/guestfs-actions.pod:7845
16889 msgid "This is the same as the tune2fs C<-e> option."
16893 #: ../fish/guestfish-actions.pod:5100 ../src/guestfs-actions.pod:7847
16898 #: ../fish/guestfish-actions.pod:5102 ../src/guestfs-actions.pod:7849
16900 "Set the group which can use reserved filesystem blocks. This is the same as "
16901 "the tune2fs C<-g> option except that it can only be specified as a number."
16905 #: ../fish/guestfish-actions.pod:5106 ../src/guestfs-actions.pod:7853
16906 msgid "C<intervalbetweenchecks>"
16910 #: ../fish/guestfish-actions.pod:5108 ../src/guestfs-actions.pod:7855
16912 "Adjust the maximal time between two filesystem checks (in seconds). If the "
16913 "option is passed as C<0> then time-dependent checking is disabled."
16917 #: ../fish/guestfish-actions.pod:5112 ../src/guestfs-actions.pod:7859
16918 msgid "This is the same as the tune2fs C<-i> option."
16922 #: ../fish/guestfish-actions.pod:5114 ../src/guestfs-actions.pod:7861
16923 msgid "C<reservedblockspercentage>"
16927 #: ../fish/guestfish-actions.pod:5116 ../src/guestfs-actions.pod:7863
16929 "Set the percentage of the filesystem which may only be allocated by "
16930 "privileged processes. This is the same as the tune2fs C<-m> option."
16934 #: ../fish/guestfish-actions.pod:5120 ../src/guestfs-actions.pod:7867
16935 msgid "C<lastmounteddirectory>"
16939 #: ../fish/guestfish-actions.pod:5122 ../src/guestfs-actions.pod:7869
16941 "Set the last mounted directory. This is the same as the tune2fs C<-M> "
16946 #: ../fish/guestfish-actions.pod:5125 ../src/guestfs-actions.pod:7872
16948 "C<reservedblockscount> Set the number of reserved filesystem blocks. This "
16949 "is the same as the tune2fs C<-r> option."
16953 #: ../fish/guestfish-actions.pod:5129 ../src/guestfs-actions.pod:7876
16958 #: ../fish/guestfish-actions.pod:5131 ../src/guestfs-actions.pod:7878
16960 "Set the user who can use the reserved filesystem blocks. This is the same "
16961 "as the tune2fs C<-u> option except that it can only be specified as a "
16966 #: ../fish/guestfish-actions.pod:5137
16968 "To get the current values of filesystem parameters, see L</tune2fs-l>. For "
16969 "precise details of how tune2fs works, see the L<tune2fs(8)> man page."
16973 #: ../fish/guestfish-actions.pod:5143
16978 #: ../fish/guestfish-actions.pod:5145
16981 " tune2fs-l device\n"
16986 #: ../fish/guestfish-actions.pod:5147 ../src/guestfs-actions.pod:7920
16988 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16993 #: ../fish/guestfish-actions.pod:5150 ../src/guestfs-actions.pod:7923
16995 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16996 "for more details. The list of fields returned isn't clearly defined, and "
16997 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16998 "and the filesystem itself."
17002 #: ../fish/guestfish-actions.pod:5155
17007 #: ../fish/guestfish-actions.pod:5157
17010 " txz-in (tarball|-) directory\n"
17015 #: ../fish/guestfish-actions.pod:5159 ../src/guestfs-actions.pod:7943
17017 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
17018 "tar file) into C<directory>."
17022 #: ../fish/guestfish-actions.pod:5164
17027 #: ../fish/guestfish-actions.pod:5166
17030 " txz-out directory (tarball|-)\n"
17035 #: ../fish/guestfish-actions.pod:5168 ../src/guestfs-actions.pod:7957
17037 "This command packs the contents of C<directory> and downloads it to local "
17038 "file C<tarball> (as an xz compressed tar archive)."
17042 #: ../fish/guestfish-actions.pod:5173
17047 #: ../fish/guestfish-actions.pod:5175
17055 #: ../fish/guestfish-actions.pod:5177 ../src/guestfs-actions.pod:7970
17057 "This function sets the mask used for creating new files and device nodes to "
17062 #: ../fish/guestfish-actions.pod:5180 ../src/guestfs-actions.pod:7973
17064 "Typical umask values would be C<022> which creates new files with "
17065 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
17066 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
17070 #: ../fish/guestfish-actions.pod:5185 ../src/guestfs-actions.pod:7978
17072 "The default umask is C<022>. This is important because it means that "
17073 "directories and device nodes will be created with C<0644> or C<0755> mode "
17074 "even if you specify C<0777>."
17078 #: ../fish/guestfish-actions.pod:5189
17079 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
17083 #: ../fish/guestfish-actions.pod:5192 ../src/guestfs-actions.pod:7985
17084 msgid "This call returns the previous umask."
17088 #: ../fish/guestfish-actions.pod:5194
17093 #: ../fish/guestfish-actions.pod:5196
17098 #: ../fish/guestfish-actions.pod:5198
17101 " umount pathordevice\n"
17106 #: ../fish/guestfish-actions.pod:5200 ../src/guestfs-actions.pod:7997
17108 "This unmounts the given filesystem. The filesystem may be specified either "
17109 "by its mountpoint (path) or the device which contains the filesystem."
17113 #: ../fish/guestfish-actions.pod:5204
17118 #: ../fish/guestfish-actions.pod:5206
17119 msgid "unmount-all"
17123 #: ../fish/guestfish-actions.pod:5208
17131 #: ../fish/guestfish-actions.pod:5210 ../src/guestfs-actions.pod:8010
17132 msgid "This unmounts all mounted filesystems."
17136 #: ../fish/guestfish-actions.pod:5212 ../src/guestfs-actions.pod:8012
17137 msgid "Some internal mounts are not unmounted by this call."
17141 #: ../fish/guestfish-actions.pod:5214
17146 #: ../fish/guestfish-actions.pod:5216
17149 " upload (filename|-) remotefilename\n"
17154 #: ../fish/guestfish-actions.pod:5218 ../fish/guestfish-actions.pod:5231 ../src/guestfs-actions.pod:8025 ../src/guestfs-actions.pod:8049
17155 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
17159 #: ../fish/guestfish-actions.pod:5223
17160 msgid "See also L</download>."
17164 #: ../fish/guestfish-actions.pod:5227
17165 msgid "upload-offset"
17169 #: ../fish/guestfish-actions.pod:5229
17172 " upload-offset (filename|-) remotefilename offset\n"
17177 #: ../fish/guestfish-actions.pod:5234 ../src/guestfs-actions.pod:8052
17179 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
17180 "The intention is to overwrite parts of existing files or devices, although "
17181 "if a non-existant file is specified then it is created with a \"hole\" "
17182 "before C<offset>. The size of the data written is implicit in the size of "
17183 "the source C<filename>."
17187 #: ../fish/guestfish-actions.pod:5241
17189 "Note that there is no limit on the amount of data that can be uploaded with "
17190 "this call, unlike with L</pwrite>, and this call always writes the full "
17191 "amount unless an error occurs."
17195 #: ../fish/guestfish-actions.pod:5246
17196 msgid "See also L</upload>, L</pwrite>."
17200 #: ../fish/guestfish-actions.pod:5250
17205 #: ../fish/guestfish-actions.pod:5252
17208 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
17213 #: ../fish/guestfish-actions.pod:5254 ../src/guestfs-actions.pod:8085
17214 msgid "This command sets the timestamps of a file with nanosecond precision."
17218 #: ../fish/guestfish-actions.pod:5257 ../src/guestfs-actions.pod:8088
17220 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
17225 #: ../fish/guestfish-actions.pod:5260 ../src/guestfs-actions.pod:8091
17227 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
17228 "nanoseconds from the epoch."
17232 #: ../fish/guestfish-actions.pod:5263 ../src/guestfs-actions.pod:8094
17234 "If the C<*nsecs> field contains the special value C<-1> then the "
17235 "corresponding timestamp is set to the current time. (The C<*secs> field is "
17236 "ignored in this case)."
17240 #: ../fish/guestfish-actions.pod:5267 ../src/guestfs-actions.pod:8098
17242 "If the C<*nsecs> field contains the special value C<-2> then the "
17243 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
17248 #: ../fish/guestfish-actions.pod:5271
17253 #: ../fish/guestfish-actions.pod:5273
17261 #: ../fish/guestfish-actions.pod:5275 ../src/guestfs-actions.pod:8111
17262 msgid "Return the libguestfs version number that the program is linked against."
17266 #: ../fish/guestfish-actions.pod:5278 ../src/guestfs-actions.pod:8114
17268 "Note that because of dynamic linking this is not necessarily the version of "
17269 "libguestfs that you compiled against. You can compile the program, and then "
17270 "at runtime dynamically link against a completely different C<libguestfs.so> "
17275 #: ../fish/guestfish-actions.pod:5283 ../src/guestfs-actions.pod:8119
17277 "This call was added in version C<1.0.58>. In previous versions of "
17278 "libguestfs there was no way to get the version number. From C code you can "
17279 "use dynamic linker functions to find out if this symbol exists (if it "
17280 "doesn't, then it's an earlier version)."
17284 #: ../fish/guestfish-actions.pod:5289 ../src/guestfs-actions.pod:8125
17286 "The call returns a structure with four elements. The first three (C<major>, "
17287 "C<minor> and C<release>) are numbers and correspond to the usual version "
17288 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
17289 "but may be used for distro-specific information."
17293 #: ../fish/guestfish-actions.pod:5295 ../src/guestfs-actions.pod:8131
17294 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
17298 #: ../fish/guestfish-actions.pod:5298 ../src/guestfs-actions.pod:8134
17299 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
17303 #: ../fish/guestfish-actions.pod:5300
17305 "I<Note:> Don't use this call to test for availability of features. In "
17306 "enterprise distributions we backport features from later versions into "
17307 "earlier versions, making this an unreliable way to test for features. Use "
17308 "L</available> instead."
17312 #: ../fish/guestfish-actions.pod:5306
17317 #: ../fish/guestfish-actions.pod:5308
17320 " vfs-label device\n"
17325 #: ../fish/guestfish-actions.pod:5310 ../src/guestfs-actions.pod:8154
17326 msgid "This returns the filesystem label of the filesystem on C<device>."
17330 #: ../fish/guestfish-actions.pod:5313 ../src/guestfs-actions.pod:8157
17331 msgid "If the filesystem is unlabeled, this returns the empty string."
17335 #: ../fish/guestfish-actions.pod:5315
17336 msgid "To find a filesystem from the label, use L</findfs-label>."
17340 #: ../fish/guestfish-actions.pod:5317
17345 #: ../fish/guestfish-actions.pod:5319
17348 " vfs-type device\n"
17353 #: ../fish/guestfish-actions.pod:5321 ../src/guestfs-actions.pod:8172
17355 "This command gets the filesystem type corresponding to the filesystem on "
17360 #: ../fish/guestfish-actions.pod:5324 ../src/guestfs-actions.pod:8175
17362 "For most filesystems, the result is the name of the Linux VFS module which "
17363 "would be used to mount this filesystem if you mounted it without specifying "
17364 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
17368 #: ../fish/guestfish-actions.pod:5329
17373 #: ../fish/guestfish-actions.pod:5331
17376 " vfs-uuid device\n"
17381 #: ../fish/guestfish-actions.pod:5333 ../src/guestfs-actions.pod:8191
17382 msgid "This returns the filesystem UUID of the filesystem on C<device>."
17386 #: ../fish/guestfish-actions.pod:5336 ../src/guestfs-actions.pod:8194
17387 msgid "If the filesystem does not have a UUID, this returns the empty string."
17391 #: ../fish/guestfish-actions.pod:5338
17392 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
17396 #: ../fish/guestfish-actions.pod:5340
17397 msgid "vg-activate"
17401 #: ../fish/guestfish-actions.pod:5342
17404 " vg-activate true|false 'volgroups ...'\n"
17409 #: ../fish/guestfish-actions.pod:5344 ../src/guestfs-actions.pod:8210
17411 "This command activates or (if C<activate> is false) deactivates all logical "
17412 "volumes in the listed volume groups C<volgroups>."
17416 #: ../fish/guestfish-actions.pod:5347 ../src/guestfs-actions.pod:8213
17417 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
17421 #: ../fish/guestfish-actions.pod:5349 ../src/guestfs-actions.pod:8215
17423 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
17424 "activated or deactivated."
17428 #: ../fish/guestfish-actions.pod:5352
17429 msgid "vg-activate-all"
17433 #: ../fish/guestfish-actions.pod:5354
17436 " vg-activate-all true|false\n"
17441 #: ../fish/guestfish-actions.pod:5356 ../src/guestfs-actions.pod:8228
17443 "This command activates or (if C<activate> is false) deactivates all logical "
17444 "volumes in all volume groups."
17448 #: ../fish/guestfish-actions.pod:5359 ../src/guestfs-actions.pod:8231
17449 msgid "This command is the same as running C<vgchange -a y|n>"
17453 #: ../fish/guestfish-actions.pod:5361
17458 #: ../fish/guestfish-actions.pod:5363
17461 " vgcreate volgroup 'physvols ...'\n"
17466 #: ../fish/guestfish-actions.pod:5365 ../src/guestfs-actions.pod:8244
17468 "This creates an LVM volume group called C<volgroup> from the non-empty list "
17469 "of physical volumes C<physvols>."
17473 #: ../fish/guestfish-actions.pod:5368
17478 #: ../fish/guestfish-actions.pod:5370
17481 " vglvuuids vgname\n"
17486 #: ../fish/guestfish-actions.pod:5372 ../src/guestfs-actions.pod:8257
17488 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
17489 "volumes created in this volume group."
17493 #: ../fish/guestfish-actions.pod:5375
17495 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
17496 "logical volumes and volume groups."
17500 #: ../fish/guestfish-actions.pod:5378
17501 msgid "See also L</vgpvuuids>."
17505 #: ../fish/guestfish-actions.pod:5380
17510 #: ../fish/guestfish-actions.pod:5382
17513 " vgpvuuids vgname\n"
17518 #: ../fish/guestfish-actions.pod:5384 ../src/guestfs-actions.pod:8277
17520 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
17521 "volumes that this volume group resides on."
17525 #: ../fish/guestfish-actions.pod:5387
17527 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
17528 "physical volumes and volume groups."
17532 #: ../fish/guestfish-actions.pod:5390
17533 msgid "See also L</vglvuuids>."
17537 #: ../fish/guestfish-actions.pod:5392
17542 #: ../fish/guestfish-actions.pod:5394
17545 " vgremove vgname\n"
17550 #: ../fish/guestfish-actions.pod:5396 ../src/guestfs-actions.pod:8297
17551 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17555 #: ../fish/guestfish-actions.pod:5398 ../src/guestfs-actions.pod:8299
17556 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
17560 #: ../fish/guestfish-actions.pod:5401
17565 #: ../fish/guestfish-actions.pod:5403
17568 " vgrename volgroup newvolgroup\n"
17573 #: ../fish/guestfish-actions.pod:5405 ../src/guestfs-actions.pod:8313
17574 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17578 #: ../fish/guestfish-actions.pod:5407
17583 #: ../fish/guestfish-actions.pod:5409
17591 #: ../fish/guestfish-actions.pod:5411 ../src/guestfs-actions.pod:8324
17593 "List all the volumes groups detected. This is the equivalent of the "
17594 "L<vgs(8)> command."
17598 #: ../fish/guestfish-actions.pod:5414 ../src/guestfs-actions.pod:8327
17600 "This returns a list of just the volume group names that were detected "
17601 "(eg. C<VolGroup00>)."
17605 #: ../fish/guestfish-actions.pod:5417
17606 msgid "See also L</vgs-full>."
17610 #: ../fish/guestfish-actions.pod:5419
17615 #: ../fish/guestfish-actions.pod:5421
17623 #: ../fish/guestfish-actions.pod:5423 ../src/guestfs-actions.pod:8343
17625 "List all the volumes groups detected. This is the equivalent of the "
17626 "L<vgs(8)> command. The \"full\" version includes all fields."
17630 #: ../fish/guestfish-actions.pod:5426
17635 #: ../fish/guestfish-actions.pod:5428
17643 #: ../fish/guestfish-actions.pod:5430 ../src/guestfs-actions.pod:8357
17645 "This rescans all block devices and rebuilds the list of LVM physical "
17646 "volumes, volume groups and logical volumes."
17650 #: ../fish/guestfish-actions.pod:5433
17655 #: ../fish/guestfish-actions.pod:5435
17663 #: ../fish/guestfish-actions.pod:5437 ../src/guestfs-actions.pod:8370
17664 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17668 #: ../fish/guestfish-actions.pod:5439
17673 #: ../fish/guestfish-actions.pod:5441
17681 #: ../fish/guestfish-actions.pod:5443 ../src/guestfs-actions.pod:8410
17683 "This command counts the characters in a file, using the C<wc -c> external "
17688 #: ../fish/guestfish-actions.pod:5446
17693 #: ../fish/guestfish-actions.pod:5448
17701 #: ../fish/guestfish-actions.pod:5450 ../src/guestfs-actions.pod:8423
17703 "This command counts the lines in a file, using the C<wc -l> external "
17708 #: ../fish/guestfish-actions.pod:5453
17713 #: ../fish/guestfish-actions.pod:5455
17721 #: ../fish/guestfish-actions.pod:5457 ../src/guestfs-actions.pod:8436
17723 "This command counts the words in a file, using the C<wc -w> external "
17728 #: ../fish/guestfish-actions.pod:5460
17733 #: ../fish/guestfish-actions.pod:5462
17736 " write path content\n"
17741 #: ../fish/guestfish-actions.pod:5464 ../src/guestfs-actions.pod:8451
17743 "This call creates a file called C<path>. The content of the file is the "
17744 "string C<content> (which can contain any 8 bit data)."
17748 #: ../fish/guestfish-actions.pod:5467
17749 msgid "See also L</write-append>."
17753 #: ../fish/guestfish-actions.pod:5472
17754 msgid "write-append"
17758 #: ../fish/guestfish-actions.pod:5474
17761 " write-append path content\n"
17766 #: ../fish/guestfish-actions.pod:5476 ../src/guestfs-actions.pod:8471
17768 "This call appends C<content> to the end of file C<path>. If C<path> does "
17769 "not exist, then a new file is created."
17773 #: ../fish/guestfish-actions.pod:5479
17774 msgid "See also L</write>."
17778 #: ../fish/guestfish-actions.pod:5484
17783 #: ../fish/guestfish-actions.pod:5486
17786 " write-file path content size\n"
17791 #: ../fish/guestfish-actions.pod:5488 ../src/guestfs-actions.pod:8498
17793 "This call creates a file called C<path>. The contents of the file is the "
17794 "string C<content> (which can contain any 8 bit data), with length C<size>."
17798 #: ../fish/guestfish-actions.pod:5492 ../src/guestfs-actions.pod:8502
17800 "As a special case, if C<size> is C<0> then the length is calculated using "
17801 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17805 #: ../fish/guestfish-actions.pod:5496 ../src/guestfs-actions.pod:8506
17807 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17808 "I<not> work, even if the length is specified."
17812 #: ../fish/guestfish-actions.pod:5502
17813 msgid "I<This function is deprecated.> In new code, use the L</write> call instead."
17817 #: ../fish/guestfish-actions.pod:5509
17822 #: ../fish/guestfish-actions.pod:5511
17825 " zegrep regex path\n"
17830 #: ../fish/guestfish-actions.pod:5513 ../src/guestfs-actions.pod:8523
17831 msgid "This calls the external C<zegrep> program and returns the matching lines."
17835 #: ../fish/guestfish-actions.pod:5519
17840 #: ../fish/guestfish-actions.pod:5521
17843 " zegrepi regex path\n"
17848 #: ../fish/guestfish-actions.pod:5523 ../src/guestfs-actions.pod:8542
17849 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
17853 #: ../fish/guestfish-actions.pod:5529
17858 #: ../fish/guestfish-actions.pod:5531
17866 #: ../fish/guestfish-actions.pod:5533 ../src/guestfs-actions.pod:8560
17867 msgid "This command writes zeroes over the first few blocks of C<device>."
17871 #: ../fish/guestfish-actions.pod:5535 ../src/guestfs-actions.pod:8562
17873 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17874 "securely wipe the device). It should be sufficient to remove any partition "
17875 "tables, filesystem superblocks and so on."
17879 #: ../fish/guestfish-actions.pod:5539 ../fish/guestfish-actions.pod:5554 ../src/guestfs-actions.pod:8566 ../src/guestfs-actions.pod:8592
17881 "If blocks are already zero, then this command avoids writing zeroes. This "
17882 "prevents the underlying device from becoming non-sparse or growing "
17887 #: ../fish/guestfish-actions.pod:5543
17888 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17892 #: ../fish/guestfish-actions.pod:5546
17893 msgid "zero-device"
17897 #: ../fish/guestfish-actions.pod:5548
17900 " zero-device device\n"
17905 #: ../fish/guestfish-actions.pod:5550
17907 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17908 "which just zeroes the first few blocks of a device."
17912 #: ../fish/guestfish-actions.pod:5558
17917 #: ../fish/guestfish-actions.pod:5560
17920 " zerofree device\n"
17925 #: ../fish/guestfish-actions.pod:5562 ../src/guestfs-actions.pod:8611
17927 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17928 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17929 "possible to compress the filesystem more effectively."
17933 #: ../fish/guestfish-actions.pod:5567 ../src/guestfs-actions.pod:8616
17934 msgid "You should B<not> run this program if the filesystem is mounted."
17938 #: ../fish/guestfish-actions.pod:5570 ../src/guestfs-actions.pod:8619
17940 "It is possible that using this program can damage the filesystem or data on "
17945 #: ../fish/guestfish-actions.pod:5573
17950 #: ../fish/guestfish-actions.pod:5575
17953 " zfgrep pattern path\n"
17958 #: ../fish/guestfish-actions.pod:5577 ../src/guestfs-actions.pod:8633
17959 msgid "This calls the external C<zfgrep> program and returns the matching lines."
17963 #: ../fish/guestfish-actions.pod:5583
17968 #: ../fish/guestfish-actions.pod:5585
17971 " zfgrepi pattern path\n"
17976 #: ../fish/guestfish-actions.pod:5587 ../src/guestfs-actions.pod:8652
17977 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
17981 #: ../fish/guestfish-actions.pod:5593
17986 #: ../fish/guestfish-actions.pod:5595
17989 " zfile meth path\n"
17994 #: ../fish/guestfish-actions.pod:5597 ../src/guestfs-actions.pod:8678
17995 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
17999 #: ../fish/guestfish-actions.pod:5600 ../src/guestfs-actions.pod:8681
18000 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
18004 #: ../fish/guestfish-actions.pod:5602
18005 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
18009 #: ../fish/guestfish-actions.pod:5605
18010 msgid "I<This function is deprecated.> In new code, use the L</file> call instead."
18014 #: ../fish/guestfish-actions.pod:5612
18019 #: ../fish/guestfish-actions.pod:5614
18022 " zgrep regex path\n"
18027 #: ../fish/guestfish-actions.pod:5616 ../src/guestfs-actions.pod:8698
18028 msgid "This calls the external C<zgrep> program and returns the matching lines."
18032 #: ../fish/guestfish-actions.pod:5622
18037 #: ../fish/guestfish-actions.pod:5624
18040 " zgrepi regex path\n"
18045 #: ../fish/guestfish-actions.pod:5626 ../src/guestfs-actions.pod:8717
18046 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
18050 #: ../fish/guestfish-commands.pod:1
18055 #: ../fish/guestfish-commands.pod:3
18060 #: ../fish/guestfish-commands.pod:5
18063 " alloc filename size\n"
18068 #: ../fish/guestfish-commands.pod:7
18070 "This creates an empty (zeroed) file of the given size, and then adds so it "
18071 "can be further examined."
18075 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
18076 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
18080 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
18081 msgid "Size can be specified using standard suffixes, eg. C<1M>."
18085 #: ../fish/guestfish-commands.pod:14
18087 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
18088 "image, see L</PREPARED DISK IMAGES>."
18092 #: ../fish/guestfish-commands.pod:17
18097 #: ../fish/guestfish-commands.pod:19
18100 " copy-in local [local ...] /remotedir\n"
18105 #: ../fish/guestfish-commands.pod:21
18107 "C<copy-in> copies local files or directories recursively into the disk "
18108 "image, placing them in the directory called C</remotedir> (which must "
18109 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
18110 "other commands as necessary."
18114 #: ../fish/guestfish-commands.pod:26
18116 "Multiple local files and directories can be specified, but the last "
18117 "parameter must always be a remote directory. Wildcards cannot be used."
18121 #: ../fish/guestfish-commands.pod:30
18126 #: ../fish/guestfish-commands.pod:32
18129 " copy-out remote [remote ...] localdir\n"
18134 #: ../fish/guestfish-commands.pod:34
18136 "C<copy-out> copies remote files or directories recursively out of the disk "
18137 "image, placing them on the host disk in a local directory called C<localdir> "
18138 "(which must exist). This guestfish meta-command turns into a sequence of "
18139 "L</download>, L</tar-out> and other commands as necessary."
18143 #: ../fish/guestfish-commands.pod:40
18145 "Multiple remote files and directories can be specified, but the last "
18146 "parameter must always be a local directory. To download to the current "
18147 "directory, use C<.> as in:"
18151 #: ../fish/guestfish-commands.pod:44
18154 " copy-out /home .\n"
18159 #: ../fish/guestfish-commands.pod:46
18161 "Wildcards cannot be used in the ordinary command, but you can use them with "
18162 "the help of L</glob> like this:"
18166 #: ../fish/guestfish-commands.pod:49
18169 " glob copy-out /home/* .\n"
18174 #: ../fish/guestfish-commands.pod:51
18179 #: ../fish/guestfish-commands.pod:53
18182 " display filename\n"
18187 #: ../fish/guestfish-commands.pod:55
18189 "Use C<display> (a graphical display program) to display an image file. It "
18190 "downloads the file, and runs C<display> on it."
18194 #: ../fish/guestfish-commands.pod:58
18196 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
18197 "environment variable. For example to use the GNOME display program:"
18201 #: ../fish/guestfish-commands.pod:61
18204 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
18209 #: ../fish/guestfish-commands.pod:63
18210 msgid "See also L<display(1)>."
18214 #: ../fish/guestfish-commands.pod:65
18219 #: ../fish/guestfish-commands.pod:67
18222 " echo [params ...]\n"
18227 #: ../fish/guestfish-commands.pod:69
18228 msgid "This echos the parameters to the terminal."
18232 #: ../fish/guestfish-commands.pod:71
18237 #: ../fish/guestfish-commands.pod:73
18242 #: ../fish/guestfish-commands.pod:75
18247 #: ../fish/guestfish-commands.pod:77
18255 #: ../fish/guestfish-commands.pod:79
18257 "This is used to edit a file. It downloads the file, edits it locally using "
18258 "your editor, then uploads the result."
18262 #: ../fish/guestfish-commands.pod:82
18264 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
18265 "or C<emacs> you will get those corresponding editors."
18269 #: ../fish/guestfish-commands.pod:86
18274 #: ../fish/guestfish-commands.pod:88
18277 " glob command args...\n"
18282 #: ../fish/guestfish-commands.pod:90
18284 "Expand wildcards in any paths in the args list, and run C<command> "
18285 "repeatedly on each matching path."
18289 #: ../fish/guestfish-commands.pod:93
18290 msgid "See L</WILDCARDS AND GLOBBING>."
18294 #: ../fish/guestfish-commands.pod:95
18299 #: ../fish/guestfish-commands.pod:97
18302 " hexedit <filename|device>\n"
18303 " hexedit <filename|device> <max>\n"
18304 " hexedit <filename|device> <start> <max>\n"
18309 #: ../fish/guestfish-commands.pod:101
18311 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
18316 #: ../fish/guestfish-commands.pod:104
18318 "This command works by downloading potentially the whole file or device, "
18319 "editing it locally, then uploading it. If the file or device is large, you "
18320 "have to specify which part you wish to edit by using C<max> and/or C<start> "
18321 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
18322 "usual modifiers allowed such as C<1M> (1 megabyte)."
18326 #: ../fish/guestfish-commands.pod:111
18327 msgid "For example to edit the first few sectors of a disk you might do:"
18331 #: ../fish/guestfish-commands.pod:114
18334 " hexedit /dev/sda 1M\n"
18339 #: ../fish/guestfish-commands.pod:116
18341 "which would allow you to edit anywhere within the first megabyte of the "
18346 #: ../fish/guestfish-commands.pod:119
18347 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
18351 #: ../fish/guestfish-commands.pod:121
18354 " hexedit /dev/sda1 0x400 0x400\n"
18359 #: ../fish/guestfish-commands.pod:123
18360 msgid "(assuming the superblock is in the standard location)."
18364 #: ../fish/guestfish-commands.pod:125
18366 "This command requires the external L<hexedit(1)> program. You can specify "
18367 "another program to use by setting the C<HEXEDITOR> environment variable."
18371 #: ../fish/guestfish-commands.pod:129
18372 msgid "See also L</hexdump>."
18376 #: ../fish/guestfish-commands.pod:131
18381 #: ../fish/guestfish-commands.pod:133
18389 #: ../fish/guestfish-commands.pod:135
18390 msgid "Change the local directory, ie. the current directory of guestfish itself."
18394 #: ../fish/guestfish-commands.pod:138
18395 msgid "Note that C<!cd> won't do what you might expect."
18399 #: ../fish/guestfish-commands.pod:140
18404 #: ../fish/guestfish-commands.pod:142
18409 #: ../fish/guestfish-commands.pod:144
18417 #: ../fish/guestfish-commands.pod:146
18418 msgid "Opens the manual page for guestfish."
18422 #: ../fish/guestfish-commands.pod:148
18427 #: ../fish/guestfish-commands.pod:150
18432 #: ../fish/guestfish-commands.pod:152
18440 #: ../fish/guestfish-commands.pod:154
18448 #: ../fish/guestfish-commands.pod:156
18449 msgid "This is used to view a file."
18453 #: ../fish/guestfish-commands.pod:158
18455 "The default viewer is C<$PAGER>. However if you use the alternate command "
18456 "C<less> you will get the C<less> command specifically."
18460 #: ../fish/guestfish-commands.pod:161
18465 #: ../fish/guestfish-commands.pod:163
18473 #: ../fish/guestfish-commands.pod:165
18475 "Close and reopen the libguestfs handle. It is not necessary to use this "
18476 "normally, because the handle is closed properly when guestfish exits. "
18477 "However this is occasionally useful for testing."
18481 #: ../fish/guestfish-commands.pod:169
18486 #: ../fish/guestfish-commands.pod:171
18489 " setenv VAR value\n"
18494 #: ../fish/guestfish-commands.pod:173
18495 msgid "Set the environment variable C<VAR> to the string C<value>."
18499 #: ../fish/guestfish-commands.pod:175
18500 msgid "To print the value of an environment variable use a shell command such as:"
18504 #: ../fish/guestfish-commands.pod:178
18512 #: ../fish/guestfish-commands.pod:180
18517 #: ../fish/guestfish-commands.pod:182
18520 " sparse filename size\n"
18525 #: ../fish/guestfish-commands.pod:184
18527 "This creates an empty sparse file of the given size, and then adds so it can "
18528 "be further examined."
18532 #: ../fish/guestfish-commands.pod:187
18534 "In all respects it works the same as the L</alloc> command, except that the "
18535 "image file is allocated sparsely, which means that disk blocks are not "
18536 "assigned to the file until they are needed. Sparse disk files only use "
18537 "space when written to, but they are slower and there is a danger you could "
18538 "run out of real disk space during a write operation."
18542 #: ../fish/guestfish-commands.pod:197
18547 #: ../fish/guestfish-commands.pod:199
18555 #: ../fish/guestfish-commands.pod:201
18557 "This command returns a list of the optional groups known to the daemon, and "
18558 "indicates which ones are supported by this build of the libguestfs "
18563 #: ../fish/guestfish-commands.pod:205
18564 msgid "See also L<guestfs(3)/AVAILABILITY>."
18568 #: ../fish/guestfish-commands.pod:207
18573 #: ../fish/guestfish-commands.pod:209
18576 " time command args...\n"
18581 #: ../fish/guestfish-commands.pod:211
18583 "Run the command as usual, but print the elapsed time afterwards. This can "
18584 "be useful for benchmarking operations."
18588 #: ../fish/guestfish-commands.pod:214
18593 #: ../fish/guestfish-commands.pod:216
18601 #: ../fish/guestfish-commands.pod:218
18602 msgid "Remove C<VAR> from the environment."
18606 #: ../fish/guestfish.pod:5
18607 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18611 #: ../fish/guestfish.pod:9
18614 " guestfish [--options] [commands]\n"
18619 #: ../fish/guestfish.pod:11
18627 #: ../fish/guestfish.pod:13
18630 " guestfish [--ro|--rw] -a disk.img\n"
18635 #: ../fish/guestfish.pod:15
18638 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18643 #: ../fish/guestfish.pod:17
18646 " guestfish -d libvirt-domain\n"
18651 #: ../fish/guestfish.pod:19
18654 " guestfish [--ro|--rw] -a disk.img -i\n"
18659 #: ../fish/guestfish.pod:21
18662 " guestfish -d libvirt-domain -i\n"
18667 #: ../fish/guestfish.pod:25
18669 "Using guestfish in read/write mode on live virtual machines can be "
18670 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
18671 "option to use guestfish safely if the disk image or virtual machine might be "
18676 #: ../fish/guestfish.pod:32
18678 "Guestfish is a shell and command-line tool for examining and modifying "
18679 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18680 "functionality of the guestfs API, see L<guestfs(3)>."
18684 #: ../fish/guestfish.pod:36
18686 "Guestfish gives you structured access to the libguestfs API, from shell "
18687 "scripts or the command line or interactively. If you want to rescue a "
18688 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18693 #: ../fish/guestfish.pod:43
18694 msgid "As an interactive shell"
18698 #: ../fish/guestfish.pod:45
18706 #: ../fish/guestfish.pod:47
18709 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18710 " editing virtual machine filesystems.\n"
18715 #: ../fish/guestfish.pod:50
18718 " Type: 'help' for a list of commands\n"
18719 " 'man' to read the manual\n"
18720 " 'quit' to quit the shell\n"
18725 #: ../fish/guestfish.pod:54
18728 " ><fs> add-ro disk.img\n"
18730 " ><fs> list-filesystems\n"
18731 " /dev/sda1: ext4\n"
18732 " /dev/vg_guest/lv_root: ext4\n"
18733 " /dev/vg_guest/lv_swap: swap\n"
18734 " ><fs> mount /dev/vg_guest/lv_root /\n"
18735 " ><fs> cat /etc/fstab\n"
18737 " # Created by anaconda\n"
18744 #: ../fish/guestfish.pod:67
18745 msgid "From shell scripts"
18749 #: ../fish/guestfish.pod:69
18750 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18754 #: ../fish/guestfish.pod:71
18757 " guestfish <<_EOF_\n"
18760 " mount /dev/vg_guest/lv_root /\n"
18761 " write /etc/motd \"Welcome, new users\"\n"
18767 #: ../fish/guestfish.pod:78
18768 msgid "List the LVM logical volumes in a disk image:"
18772 #: ../fish/guestfish.pod:80
18775 " guestfish -a disk.img --ro <<_EOF_\n"
18783 #: ../fish/guestfish.pod:85
18784 msgid "List all the filesystems in a disk image:"
18788 #: ../fish/guestfish.pod:87
18791 " guestfish -a disk.img --ro <<_EOF_\n"
18793 " list-filesystems\n"
18799 #: ../fish/guestfish.pod:92
18800 msgid "On one command line"
18804 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18805 msgid "Update C</etc/resolv.conf> in a guest:"
18809 #: ../fish/guestfish.pod:96
18813 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18814 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18819 #: ../fish/guestfish.pod:100
18820 msgid "Edit C</boot/grub/grub.conf> interactively:"
18824 #: ../fish/guestfish.pod:102
18827 " guestfish --rw --add disk.img \\\n"
18828 " --mount /dev/vg_guest/lv_root \\\n"
18829 " --mount /dev/sda1:/boot \\\n"
18830 " edit /boot/grub/grub.conf\n"
18835 #: ../fish/guestfish.pod:107
18836 msgid "Mount disks automatically"
18840 #: ../fish/guestfish.pod:109
18842 "Use the I<-i> option to automatically mount the disks from a virtual "
18847 #: ../fish/guestfish.pod:112
18850 " guestfish --ro -a disk.img -i cat /etc/group\n"
18855 #: ../fish/guestfish.pod:114
18858 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18863 #: ../fish/guestfish.pod:116
18864 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18868 #: ../fish/guestfish.pod:118
18871 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18876 #: ../fish/guestfish.pod:120
18877 msgid "As a script interpreter"
18881 #: ../fish/guestfish.pod:122
18882 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18886 #: ../fish/guestfish.pod:124
18889 " #!/usr/bin/guestfish -f\n"
18890 " sparse test1.img 100M\n"
18892 " part-disk /dev/sda mbr\n"
18893 " mkfs ext2 /dev/sda1\n"
18898 #: ../fish/guestfish.pod:130
18899 msgid "Start with a prepared disk"
18903 #: ../fish/guestfish.pod:132
18905 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18906 "single ext2-formatted partition:"
18910 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18913 " guestfish -N fs\n"
18918 #: ../fish/guestfish.pod:137
18919 msgid "To list what is available do:"
18923 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18926 " guestfish -N help | less\n"
18931 #: ../fish/guestfish.pod:141
18932 msgid "Remote control"
18936 #: ../fish/guestfish.pod:143
18939 " eval \"`guestfish --listen`\"\n"
18940 " guestfish --remote add-ro disk.img\n"
18941 " guestfish --remote run\n"
18942 " guestfish --remote lvs\n"
18947 #: ../fish/guestfish.pod:154
18948 msgid "Displays general help on options."
18952 #: ../fish/guestfish.pod:158
18953 msgid "B<--cmd-help>"
18957 #: ../fish/guestfish.pod:160
18958 msgid "Lists all available guestfish commands."
18962 #: ../fish/guestfish.pod:162
18967 #: ../fish/guestfish.pod:164
18968 msgid "B<--cmd-help cmd>"
18972 #: ../fish/guestfish.pod:166
18973 msgid "Displays detailed help on a single command C<cmd>."
18977 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18978 msgid "B<-a image>"
18982 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18983 msgid "B<--add image>"
18987 #: ../fish/guestfish.pod:172
18988 msgid "Add a block device or virtual machine image to the shell."
18992 #: ../fish/guestfish.pod:177
18994 "Using this flag is mostly equivalent to using the C<add> command, with "
18995 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18996 "the I<--format=...> flag was given."
19000 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
19002 "When used in conjunction with the I<-d> option, this specifies the libvirt "
19003 "URI to use. The default is to use the default libvirt connection."
19007 #: ../fish/guestfish.pod:189
19012 #: ../fish/guestfish.pod:191
19014 "If using the I<--listen> option and a csh-like shell, use this option. See "
19015 "section L</REMOTE CONTROL AND CSH> below."
19019 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
19020 msgid "B<-d libvirt-domain>"
19024 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
19025 msgid "B<--domain libvirt-domain>"
19029 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
19031 "Add disks from the named libvirt domain. If the I<--ro> option is also "
19032 "used, then any libvirt domain can be used. However in write mode, only "
19033 "libvirt domains which are shut down can be named here."
19037 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
19038 msgid "Domain UUIDs can be used instead of names."
19042 #: ../fish/guestfish.pod:204
19044 "Using this flag is mostly equivalent to using the C<add-domain> command, "
19045 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
19046 "if the I<--format:...> flag was given."
19050 #: ../fish/guestfish.pod:208
19055 #: ../fish/guestfish.pod:210
19056 msgid "B<--no-dest-paths>"
19060 #: ../fish/guestfish.pod:212
19062 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
19063 "to hit the tab key to complete paths on the guest filesystem, but this "
19064 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
19065 "allow this feature to be disabled."
19069 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
19071 "When prompting for keys and passphrases, guestfish normally turns echoing "
19072 "off so you cannot see what you are typing. If you are not worried about "
19073 "Tempest attacks and there is no one else in the room you can specify this "
19074 "flag to see what you are typing."
19078 #: ../fish/guestfish.pod:224
19083 #: ../fish/guestfish.pod:226
19084 msgid "B<--file file>"
19088 #: ../fish/guestfish.pod:228
19089 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
19093 #: ../fish/guestfish.pod:231
19096 " #!/usr/bin/guestfish -f\n"
19101 #: ../fish/guestfish.pod:244
19104 " guestfish --format=raw -a disk.img\n"
19109 #: ../fish/guestfish.pod:248
19112 " guestfish --format=raw -a disk.img --format -a another.img\n"
19117 #: ../fish/guestfish.pod:253
19119 "If you have untrusted raw-format guest disk images, you should use this "
19120 "option to specify the disk format. This avoids a possible security problem "
19121 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
19125 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
19126 msgid "B<--inspector>"
19130 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
19132 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
19133 "system and mount filesystems as they would be mounted on the real virtual "
19138 #: ../fish/guestfish.pod:266
19139 msgid "Typical usage is either:"
19143 #: ../fish/guestfish.pod:268
19146 " guestfish -d myguest -i\n"
19151 #: ../fish/guestfish.pod:270
19152 msgid "(for an inactive libvirt domain called I<myguest>), or:"
19156 #: ../fish/guestfish.pod:272
19159 " guestfish --ro -d myguest -i\n"
19164 #: ../fish/guestfish.pod:274
19165 msgid "(for active domains, readonly), or specify the block device directly:"
19169 #: ../fish/guestfish.pod:276
19172 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
19177 #: ../fish/guestfish.pod:278
19179 "Note that the command line syntax changed slightly over older versions of "
19180 "guestfish. You can still use the old syntax:"
19184 #: ../fish/guestfish.pod:281
19187 " guestfish [--ro] -i disk.img\n"
19192 #: ../fish/guestfish.pod:283
19195 " guestfish [--ro] -i libvirt-domain\n"
19200 #: ../fish/guestfish.pod:285
19202 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
19203 "then using other commands to mount the filesystems that were found."
19207 #: ../fish/guestfish.pod:294
19208 msgid "B<--listen>"
19212 #: ../fish/guestfish.pod:296
19214 "Fork into the background and listen for remote commands. See section "
19215 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
19219 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
19224 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
19226 "Connect to a live virtual machine. (Experimental, see "
19227 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
19231 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
19232 msgid "B<-m dev[:mountpoint[:options]]>"
19236 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
19237 msgid "B<--mount dev[:mountpoint[:options]]>"
19241 #: ../fish/guestfish.pod:308
19242 msgid "Mount the named partition or logical volume on the given mountpoint."
19246 #: ../fish/guestfish.pod:310
19247 msgid "If the mountpoint is omitted, it defaults to C</>."
19251 #: ../fish/guestfish.pod:312
19252 msgid "You have to mount something on C</> before most commands will work."
19256 #: ../fish/guestfish.pod:314
19258 "If any I<-m> or I<--mount> options are given, the guest is automatically "
19263 #: ../fish/guestfish.pod:317
19265 "If you don't know what filesystems a disk image contains, you can either run "
19266 "guestfish without this option, then list the partitions, filesystems and LVs "
19267 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
19268 "commands), or you can use the L<virt-filesystems(1)> program."
19272 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
19274 "The third (and rarely used) part of the mount parameter is the list of mount "
19275 "options used to mount the underlying filesystem. If this is not given, then "
19276 "the mount options are either the empty string or C<ro> (the latter if the "
19277 "I<--ro> flag is used). By specifying the mount options, you override this "
19278 "default choice. Probably the only time you would use this is to enable ACLs "
19279 "and/or extended attributes if the filesystem can support them:"
19283 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
19286 " -m /dev/sda1:/:acl,user_xattr\n"
19291 #: ../fish/guestfish.pod:333
19292 msgid "Using this flag is equivalent to using the C<mount-options> command."
19296 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202 ../resize/virt-resize.pod:441
19301 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
19302 msgid "B<--no-sync>"
19306 #: ../fish/guestfish.pod:339
19308 "Disable autosync. This is enabled by default. See the discussion of "
19309 "autosync in the L<guestfs(3)> manpage."
19313 #: ../fish/guestfish.pod:342
19318 #: ../fish/guestfish.pod:344
19319 msgid "B<--new type>"
19323 #: ../fish/guestfish.pod:346
19328 #: ../fish/guestfish.pod:348
19330 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
19331 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
19332 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
19337 #: ../fish/guestfish.pod:353
19338 msgid "B<--progress-bars>"
19342 #: ../fish/guestfish.pod:355
19343 msgid "Enable progress bars, even when guestfish is used non-interactively."
19347 #: ../fish/guestfish.pod:357
19349 "Progress bars are enabled by default when guestfish is used as an "
19350 "interactive shell."
19354 #: ../fish/guestfish.pod:360
19355 msgid "B<--no-progress-bars>"
19359 #: ../fish/guestfish.pod:362
19360 msgid "Disable progress bars."
19364 #: ../fish/guestfish.pod:364
19365 msgid "B<--remote[=pid]>"
19369 #: ../fish/guestfish.pod:366
19371 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
19372 "CONTROL GUESTFISH OVER A SOCKET> below."
19376 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248 ../rescue/virt-rescue.pod:189
19381 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250 ../rescue/virt-rescue.pod:191
19386 #: ../fish/guestfish.pod:373
19388 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
19389 "mounts are done read-only."
19393 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:195
19395 "The option must always be used if the disk image or virtual machine might be "
19396 "running, and is generally recommended in cases where you don't need write "
19397 "access to the disk."
19401 #: ../fish/guestfish.pod:380
19403 "Note that prepared disk images created with I<-N> are not affected by this "
19404 "option. Also commands like C<add> are not affected - you have to specify "
19405 "the C<readonly:true> option explicitly if you need it."
19409 #: ../fish/guestfish.pod:384
19410 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
19414 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262 ../rescue/virt-rescue.pod:201
19415 msgid "B<--selinux>"
19419 #: ../fish/guestfish.pod:388
19420 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
19424 #: ../fish/guestfish.pod:394
19426 "Enable very verbose messages. This is particularly useful if you find a "
19431 #: ../fish/guestfish.pod:401
19432 msgid "Display the guestfish / libguestfs version number and exit."
19436 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278 ../rescue/virt-rescue.pod:231
19441 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280 ../rescue/virt-rescue.pod:233
19446 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
19448 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
19449 "mounts are done read-write."
19453 #: ../fish/guestfish.pod:410
19454 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
19458 #: ../fish/guestfish.pod:414
19459 msgid "Echo each command before executing it."
19463 #: ../fish/guestfish.pod:418
19464 msgid "COMMANDS ON COMMAND LINE"
19468 #: ../fish/guestfish.pod:420
19469 msgid "Any additional (non-option) arguments are treated as commands to execute."
19473 #: ../fish/guestfish.pod:423
19475 "Commands to execute should be separated by a colon (C<:>), where the colon "
19476 "is a separate parameter. Thus:"
19480 #: ../fish/guestfish.pod:426
19483 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
19488 #: ../fish/guestfish.pod:428
19490 "If there are no additional arguments, then we enter a shell, either an "
19491 "interactive shell with a prompt (if the input is a terminal) or a "
19492 "non-interactive shell."
19496 #: ../fish/guestfish.pod:432
19498 "In either command line mode or non-interactive shell, the first command that "
19499 "gives an error causes the whole shell to exit. In interactive mode (with a "
19500 "prompt) if a command fails, you can continue to enter commands."
19504 #: ../fish/guestfish.pod:437
19505 msgid "USING launch (OR run)"
19509 #: ../fish/guestfish.pod:439
19511 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
19512 "then launch it, then mount any disks you need, and finally issue "
19513 "actions/commands. So the general order of the day is:"
19517 #: ../fish/guestfish.pod:447
19518 msgid "add or -a/--add"
19522 #: ../fish/guestfish.pod:451
19523 msgid "launch (aka run)"
19527 #: ../fish/guestfish.pod:455
19528 msgid "mount or -m/--mount"
19532 #: ../fish/guestfish.pod:459
19533 msgid "any other commands"
19537 #: ../fish/guestfish.pod:463
19539 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19540 "guest before mounting or performing any other commands."
19544 #: ../fish/guestfish.pod:466
19546 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19547 "I<--new> options were given then C<run> is done automatically, simply "
19548 "because guestfish can't perform the action you asked for without doing this."
19552 #: ../fish/guestfish.pod:471
19553 msgid "OPENING DISKS FOR READ AND WRITE"
19557 #: ../fish/guestfish.pod:473
19559 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19560 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19561 "I<-i> and I<-m> open disk images read-only or for writing."
19565 #: ../fish/guestfish.pod:478
19567 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
19568 "opening disk images supplied on the command line for write. To open a disk "
19569 "image read-only you have to do I<-a image --ro>."
19573 #: ../fish/guestfish.pod:482
19575 "This matters: If you accidentally open a live VM disk image writable then "
19576 "you will cause irreversible disk corruption."
19580 #: ../fish/guestfish.pod:485
19582 "In a future libguestfs we intend to change the default the other way. Disk "
19583 "images will be opened read-only. You will have to either specify "
19584 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19585 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19586 "access for disk images specified by those other command line options."
19590 #: ../fish/guestfish.pod:492
19592 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19593 "which does nothing (it is already the default). However it is highly "
19594 "recommended that you use this option to indicate that you need write access, "
19595 "and prepare your scripts for the day when this option will be required for "
19600 #: ../fish/guestfish.pod:498
19602 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
19603 "other libguestfs program apart from guestfish and guestmount."
19607 #: ../fish/guestfish.pod:501
19612 #: ../fish/guestfish.pod:503
19614 "You can quote ordinary parameters using either single or double quotes. For "
19619 #: ../fish/guestfish.pod:506
19622 " add \"file with a space.img\"\n"
19627 #: ../fish/guestfish.pod:508
19630 " rm '/file name'\n"
19635 #: ../fish/guestfish.pod:510
19643 #: ../fish/guestfish.pod:512
19645 "A few commands require a list of strings to be passed. For these, use a "
19646 "whitespace-separated list, enclosed in quotes. Strings containing "
19647 "whitespace to be passed through must be enclosed in single quotes. A "
19648 "literal single quote must be escaped with a backslash."
19652 #: ../fish/guestfish.pod:517
19655 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19656 " command \"/bin/echo 'foo bar'\"\n"
19657 " command \"/bin/echo \\'foo\\'\"\n"
19662 #: ../fish/guestfish.pod:521
19663 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19667 #: ../fish/guestfish.pod:523
19669 "In double-quoted arguments (only) use backslash to insert special "
19674 #: ../fish/guestfish.pod:528
19679 #: ../fish/guestfish.pod:530
19680 msgid "Alert (bell) character."
19684 #: ../fish/guestfish.pod:532
19689 #: ../fish/guestfish.pod:534
19690 msgid "Backspace character."
19694 #: ../fish/guestfish.pod:536
19699 #: ../fish/guestfish.pod:538
19700 msgid "Form feed character."
19704 #: ../fish/guestfish.pod:540
19709 #: ../fish/guestfish.pod:542
19710 msgid "Newline character."
19714 #: ../fish/guestfish.pod:544
19719 #: ../fish/guestfish.pod:546
19720 msgid "Carriage return character."
19724 #: ../fish/guestfish.pod:548
19729 #: ../fish/guestfish.pod:550
19730 msgid "Horizontal tab character."
19734 #: ../fish/guestfish.pod:552
19739 #: ../fish/guestfish.pod:554
19740 msgid "Vertical tab character."
19744 #: ../fish/guestfish.pod:556
19749 #: ../fish/guestfish.pod:558
19750 msgid "A literal double quote character."
19754 #: ../fish/guestfish.pod:560
19759 #: ../fish/guestfish.pod:562
19761 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
19766 #: ../fish/guestfish.pod:565
19771 #: ../fish/guestfish.pod:567
19772 msgid "A character with hex value I<hh>. There must be precisely 2 hex digits."
19776 #: ../fish/guestfish.pod:570
19778 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19783 #: ../fish/guestfish.pod:573
19788 #: ../fish/guestfish.pod:575
19789 msgid "A literal backslash character."
19793 #: ../fish/guestfish.pod:579
19794 msgid "OPTIONAL ARGUMENTS"
19798 #: ../fish/guestfish.pod:581
19800 "Some commands take optional arguments. These arguments appear in this "
19801 "documentation as C<[argname:..]>. You can use them as in these examples:"
19805 #: ../fish/guestfish.pod:585
19808 " add-drive-opts filename\n"
19813 #: ../fish/guestfish.pod:587
19816 " add-drive-opts filename readonly:true\n"
19821 #: ../fish/guestfish.pod:589
19824 " add-drive-opts filename format:qcow2 readonly:false\n"
19829 #: ../fish/guestfish.pod:591
19831 "Each optional argument can appear at most once. All optional arguments must "
19832 "appear after the required ones."
19836 #: ../fish/guestfish.pod:594
19841 #: ../fish/guestfish.pod:596
19842 msgid "This section applies to all commands which can take integers as parameters."
19846 #: ../fish/guestfish.pod:599
19847 msgid "SIZE SUFFIX"
19851 #: ../fish/guestfish.pod:601
19853 "When the command takes a parameter measured in bytes, you can use one of the "
19854 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19858 #: ../fish/guestfish.pod:607
19859 msgid "B<k> or B<K> or B<KiB>"
19863 #: ../fish/guestfish.pod:609
19864 msgid "The size in kilobytes (multiplied by 1024)."
19868 #: ../fish/guestfish.pod:611
19873 #: ../fish/guestfish.pod:613
19874 msgid "The size in SI 1000 byte units."
19878 #: ../fish/guestfish.pod:615
19879 msgid "B<M> or B<MiB>"
19883 #: ../fish/guestfish.pod:617
19884 msgid "The size in megabytes (multiplied by 1048576)."
19888 #: ../fish/guestfish.pod:619
19893 #: ../fish/guestfish.pod:621
19894 msgid "The size in SI 1000000 byte units."
19898 #: ../fish/guestfish.pod:623
19899 msgid "B<G> or B<GiB>"
19903 #: ../fish/guestfish.pod:625
19904 msgid "The size in gigabytes (multiplied by 2**30)."
19908 #: ../fish/guestfish.pod:627
19913 #: ../fish/guestfish.pod:629
19914 msgid "The size in SI 10**9 byte units."
19918 #: ../fish/guestfish.pod:631
19919 msgid "B<T> or B<TiB>"
19923 #: ../fish/guestfish.pod:633
19924 msgid "The size in terabytes (multiplied by 2**40)."
19928 #: ../fish/guestfish.pod:635
19933 #: ../fish/guestfish.pod:637
19934 msgid "The size in SI 10**12 byte units."
19938 #: ../fish/guestfish.pod:639
19939 msgid "B<P> or B<PiB>"
19943 #: ../fish/guestfish.pod:641
19944 msgid "The size in petabytes (multiplied by 2**50)."
19948 #: ../fish/guestfish.pod:643
19953 #: ../fish/guestfish.pod:645
19954 msgid "The size in SI 10**15 byte units."
19958 #: ../fish/guestfish.pod:647
19959 msgid "B<E> or B<EiB>"
19963 #: ../fish/guestfish.pod:649
19964 msgid "The size in exabytes (multiplied by 2**60)."
19968 #: ../fish/guestfish.pod:651
19973 #: ../fish/guestfish.pod:653
19974 msgid "The size in SI 10**18 byte units."
19978 #: ../fish/guestfish.pod:655
19979 msgid "B<Z> or B<ZiB>"
19983 #: ../fish/guestfish.pod:657
19984 msgid "The size in zettabytes (multiplied by 2**70)."
19988 #: ../fish/guestfish.pod:659
19993 #: ../fish/guestfish.pod:661
19994 msgid "The size in SI 10**21 byte units."
19998 #: ../fish/guestfish.pod:663
19999 msgid "B<Y> or B<YiB>"
20003 #: ../fish/guestfish.pod:665
20004 msgid "The size in yottabytes (multiplied by 2**80)."
20008 #: ../fish/guestfish.pod:667
20013 #: ../fish/guestfish.pod:669
20014 msgid "The size in SI 10**24 byte units."
20018 #: ../fish/guestfish.pod:675
20021 " truncate-size /file 1G\n"
20026 #: ../fish/guestfish.pod:677
20027 msgid "would truncate the file to 1 gigabyte."
20031 #: ../fish/guestfish.pod:679
20033 "Be careful because a few commands take sizes in kilobytes or megabytes "
20034 "(eg. the parameter to L</memsize> is specified in megabytes already). "
20035 "Adding a suffix will probably not do what you expect."
20039 #: ../fish/guestfish.pod:683
20040 msgid "OCTAL AND HEXADECIMAL NUMBERS"
20044 #: ../fish/guestfish.pod:685
20046 "For specifying the radix (base) use the C convention: C<0> to prefix an "
20047 "octal number or C<0x> to prefix a hexadecimal number. For example:"
20051 #: ../fish/guestfish.pod:688
20054 " 1234 decimal number 1234\n"
20055 " 02322 octal number, equivalent to decimal 1234\n"
20056 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
20061 #: ../fish/guestfish.pod:692
20063 "When using the C<chmod> command, you almost always want to specify an octal "
20064 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
20065 "L<chmod(1)> program):"
20069 #: ../fish/guestfish.pod:696
20072 " chmod 0777 /public # OK\n"
20073 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
20078 #: ../fish/guestfish.pod:699
20080 "Commands that return numbers usually print them in decimal, but some "
20081 "commands print numbers in other radices (eg. C<umask> prints the mode in "
20082 "octal, preceeded by C<0>)."
20086 #: ../fish/guestfish.pod:703
20087 msgid "WILDCARDS AND GLOBBING"
20091 #: ../fish/guestfish.pod:705
20093 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
20094 "(globbing) by default. So for example the following will not do what you "
20099 #: ../fish/guestfish.pod:709
20107 #: ../fish/guestfish.pod:711
20109 "Assuming you don't have a directory called literally C</home/*> then the "
20110 "above command will return an error."
20114 #: ../fish/guestfish.pod:714
20115 msgid "To perform wildcard expansion, use the C<glob> command."
20119 #: ../fish/guestfish.pod:716
20122 " glob rm-rf /home/*\n"
20127 #: ../fish/guestfish.pod:718
20129 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
20130 "many times), equivalent to:"
20134 #: ../fish/guestfish.pod:721
20137 " rm-rf /home/jim\n"
20138 " rm-rf /home/joe\n"
20139 " rm-rf /home/mary\n"
20144 #: ../fish/guestfish.pod:725
20145 msgid "C<glob> only works on simple guest paths and not on device names."
20149 #: ../fish/guestfish.pod:727
20151 "If you have several parameters, each containing a wildcard, then glob will "
20152 "perform a Cartesian product."
20156 #: ../fish/guestfish.pod:730
20161 #: ../fish/guestfish.pod:732
20163 "Any line which starts with a I<#> character is treated as a comment and "
20164 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
20165 "a command. For example:"
20169 #: ../fish/guestfish.pod:736
20172 " # this is a comment\n"
20173 " # this is a comment\n"
20174 " foo # NOT a comment\n"
20179 #: ../fish/guestfish.pod:740
20180 msgid "Blank lines are also ignored."
20184 #: ../fish/guestfish.pod:742
20185 msgid "RUNNING COMMANDS LOCALLY"
20189 #: ../fish/guestfish.pod:744
20191 "Any line which starts with a I<!> character is treated as a command sent to "
20192 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
20196 #: ../fish/guestfish.pod:748
20200 " tgz-out /remote local/remote-data.tar.gz\n"
20205 #: ../fish/guestfish.pod:751
20207 "will create a directory C<local> on the host, and then export the contents "
20208 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
20209 "(See C<tgz-out>)."
20213 #: ../fish/guestfish.pod:755
20215 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
20216 "effect, due to the way that subprocesses work in Unix."
20220 #: ../fish/guestfish.pod:758
20221 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
20225 #: ../fish/guestfish.pod:760
20227 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
20228 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
20229 "and executed as guestfish commands."
20233 #: ../fish/guestfish.pod:764
20235 "Thus you can use shell script to construct arbitrary guestfish commands "
20236 "which are then parsed by guestfish."
20240 #: ../fish/guestfish.pod:767
20242 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
20243 "through C</foo.100>) using guestfish commands alone. However this is simple "
20244 "if we use a shell script to create the guestfish commands for us:"
20248 #: ../fish/guestfish.pod:772
20251 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
20256 #: ../fish/guestfish.pod:774
20257 msgid "or with names like C</foo.001>:"
20261 #: ../fish/guestfish.pod:776
20264 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
20269 #: ../fish/guestfish.pod:778
20271 "When using guestfish interactively it can be helpful to just run the shell "
20272 "script first (ie. remove the initial C<E<lt>> character so it is just an "
20273 "ordinary I<!> local command), see what guestfish commands it would run, and "
20274 "when you are happy with those prepend the C<E<lt>> character to run the "
20275 "guestfish commands for real."
20279 #: ../fish/guestfish.pod:784
20284 #: ../fish/guestfish.pod:786
20286 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
20287 "command (a guestfish command) to the second command (any host command). For "
20292 #: ../fish/guestfish.pod:790
20295 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
20300 #: ../fish/guestfish.pod:792
20302 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
20303 "program). The above command would list all accounts in the guest filesystem "
20304 "which have UID 0, ie. root accounts including backdoors. Other examples:"
20308 #: ../fish/guestfish.pod:797
20311 " hexdump /bin/ls | head\n"
20312 " list-devices | tail -1\n"
20313 " tgz-out / - | tar ztf -\n"
20318 #: ../fish/guestfish.pod:801
20320 "The space before the pipe symbol is required, any space after the pipe "
20321 "symbol is optional. Everything after the pipe symbol is just passed "
20322 "straight to the host shell, so it can contain redirections, globs and "
20323 "anything else that makes sense on the host side."
20327 #: ../fish/guestfish.pod:806
20329 "To use a literal argument which begins with a pipe symbol, you have to quote "
20334 #: ../fish/guestfish.pod:809
20342 #: ../fish/guestfish.pod:811
20343 msgid "HOME DIRECTORIES"
20347 #: ../fish/guestfish.pod:813
20349 "If a parameter starts with the character C<~> then the tilde may be expanded "
20350 "as a home directory path (either C<~> for the current user's home directory, "
20351 "or C<~user> for another user)."
20355 #: ../fish/guestfish.pod:817
20357 "Note that home directory expansion happens for users known I<on the host>, "
20358 "not in the guest filesystem."
20362 #: ../fish/guestfish.pod:820
20364 "To use a literal argument which begins with a tilde, you have to quote it, "
20369 #: ../fish/guestfish.pod:823
20377 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
20378 msgid "ENCRYPTED DISKS"
20382 #: ../fish/guestfish.pod:827
20384 "Libguestfs has some support for Linux guests encrypted according to the "
20385 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
20386 "disk encryption systems used by modern Linux guests. Currently only "
20387 "LVM-on-LUKS is supported."
20391 #: ../fish/guestfish.pod:832
20392 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
20396 #: ../fish/guestfish.pod:834
20399 " ><fs> vfs-type /dev/sda2\n"
20405 #: ../fish/guestfish.pod:837
20407 "Then open those devices using L</luks-open>. This creates a device-mapper "
20408 "device called C</dev/mapper/luksdev>."
20412 #: ../fish/guestfish.pod:840
20415 " ><fs> luks-open /dev/sda2 luksdev\n"
20416 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
20421 #: ../fish/guestfish.pod:843
20423 "Finally you have to tell LVM to scan for volume groups on the newly created "
20428 #: ../fish/guestfish.pod:846
20432 " vg-activate-all true\n"
20437 #: ../fish/guestfish.pod:849
20438 msgid "The logical volume(s) can now be mounted in the usual way."
20442 #: ../fish/guestfish.pod:851
20444 "Before closing a LUKS device you must unmount any logical volumes on it and "
20445 "deactivate the volume groups by calling C<vg-activate false VG> on each "
20446 "one. Then you can close the mapper device:"
20450 #: ../fish/guestfish.pod:855
20453 " vg-activate false /dev/VG\n"
20454 " luks-close /dev/mapper/luksdev\n"
20459 #: ../fish/guestfish.pod:860
20461 "If a path is prefixed with C<win:> then you can use Windows-style drive "
20462 "letters and paths (with some limitations). The following commands are "
20467 #: ../fish/guestfish.pod:864
20470 " file /WINDOWS/system32/config/system.LOG\n"
20475 #: ../fish/guestfish.pod:866
20478 " file win:\\windows\\system32\\config\\system.log\n"
20483 #: ../fish/guestfish.pod:868
20486 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
20491 #: ../fish/guestfish.pod:870
20493 "The parameter is rewritten \"behind the scenes\" by looking up the position "
20494 "where the drive is mounted, prepending that to the path, changing all "
20495 "backslash characters to forward slash, then resolving the result using "
20496 "L</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
20497 "then the parameter might be rewritten like this:"
20501 #: ../fish/guestfish.pod:876
20504 " win:e:\\foo\\bar => /e/FOO/bar\n"
20509 #: ../fish/guestfish.pod:878
20510 msgid "This only works in argument positions that expect a path."
20514 #: ../fish/guestfish.pod:880
20515 msgid "UPLOADING AND DOWNLOADING FILES"
20519 #: ../fish/guestfish.pod:882
20521 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
20522 "others which upload from or download to a local file, you can use the "
20523 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
20527 #: ../fish/guestfish.pod:886
20535 #: ../fish/guestfish.pod:888
20536 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
20540 #: ../fish/guestfish.pod:891
20543 " tar-out /etc - | tar tf -\n"
20548 #: ../fish/guestfish.pod:893
20550 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20551 "command (see L</PIPES>)."
20555 #: ../fish/guestfish.pod:896
20557 "When using C<-> to read from stdin, the input is read up to the end of "
20558 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20559 "some arbitrary end marker:"
20563 #: ../fish/guestfish.pod:900
20566 " upload -<<END /foo\n"
20575 #: ../fish/guestfish.pod:906
20577 "Any string of characters can be used instead of C<END>. The end marker must "
20578 "appear on a line of its own, without any preceeding or following characters "
20579 "(not even spaces)."
20583 #: ../fish/guestfish.pod:910
20585 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20586 "upload local files (so-called \"FileIn\" parameters in the generator)."
20590 #: ../fish/guestfish.pod:913
20591 msgid "EXIT ON ERROR BEHAVIOUR"
20595 #: ../fish/guestfish.pod:915
20597 "By default, guestfish will ignore any errors when in interactive mode "
20598 "(ie. taking commands from a human over a tty), and will exit on the first "
20599 "error in non-interactive mode (scripts, commands given on the command line)."
20603 #: ../fish/guestfish.pod:920
20605 "If you prefix a command with a I<-> character, then that command will not "
20606 "cause guestfish to exit, even if that (one) command returns an error."
20610 #: ../fish/guestfish.pod:924
20611 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20615 #: ../fish/guestfish.pod:926
20617 "Guestfish can be remote-controlled over a socket. This is useful "
20618 "particularly in shell scripts where you want to make several different "
20619 "changes to a filesystem, but you don't want the overhead of starting up a "
20620 "guestfish process each time."
20624 #: ../fish/guestfish.pod:931
20625 msgid "Start a guestfish server process using:"
20629 #: ../fish/guestfish.pod:933
20632 " eval \"`guestfish --listen`\"\n"
20637 #: ../fish/guestfish.pod:935
20638 msgid "and then send it commands by doing:"
20642 #: ../fish/guestfish.pod:937
20645 " guestfish --remote cmd [...]\n"
20650 #: ../fish/guestfish.pod:939
20651 msgid "To cause the server to exit, send it the exit command:"
20655 #: ../fish/guestfish.pod:943
20657 "Note that the server will normally exit if there is an error in a command. "
20658 "You can change this in the usual way. See section L</EXIT ON ERROR "
20663 #: ../fish/guestfish.pod:947
20664 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20668 #: ../fish/guestfish.pod:949
20670 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
20671 "is how the I<--remote> option knows where to send the commands. You can "
20672 "have several guestfish listener processes running using:"
20676 #: ../fish/guestfish.pod:953
20679 " eval \"`guestfish --listen`\"\n"
20680 " pid1=$GUESTFISH_PID\n"
20681 " eval \"`guestfish --listen`\"\n"
20682 " pid2=$GUESTFISH_PID\n"
20684 " guestfish --remote=$pid1 cmd\n"
20685 " guestfish --remote=$pid2 cmd\n"
20690 #: ../fish/guestfish.pod:961
20691 msgid "REMOTE CONTROL AND CSH"
20695 #: ../fish/guestfish.pod:963
20697 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20702 #: ../fish/guestfish.pod:966
20705 " eval \"`guestfish --listen --csh`\"\n"
20710 #: ../fish/guestfish.pod:968
20711 msgid "REMOTE CONTROL DETAILS"
20715 #: ../fish/guestfish.pod:970
20717 "Remote control happens over a Unix domain socket called "
20718 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
20719 "of the process, and C<$PID> is the process ID of the server."
20723 #: ../fish/guestfish.pod:974
20724 msgid "Guestfish client and server versions must match exactly."
20728 #: ../fish/guestfish.pod:976
20729 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20733 #: ../fish/guestfish.pod:978
20735 "From Bash, you can use the following code which creates a guestfish "
20736 "instance, correctly quotes the command line, handles failure to start, and "
20737 "cleans up guestfish when the script exits:"
20741 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20749 #: ../fish/guestfish.pod:986
20752 " guestfish[0]=\"guestfish\"\n"
20753 " guestfish[1]=\"--listen\"\n"
20754 " guestfish[2]=\"--ro\"\n"
20755 " guestfish[3]=\"-a\"\n"
20756 " guestfish[4]=\"disk.img\"\n"
20761 #: ../fish/guestfish.pod:992
20764 " GUESTFISH_PID=\n"
20765 " eval $(\"${guestfish[@]}\")\n"
20766 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20767 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20774 #: ../fish/guestfish.pod:999
20777 " cleanup_guestfish ()\n"
20779 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20781 " trap cleanup_guestfish EXIT ERR\n"
20786 #: ../fish/guestfish.pod:1005
20789 " guestfish --remote -- run\n"
20794 #: ../fish/guestfish.pod:1007
20802 #: ../fish/guestfish.pod:1009
20803 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20807 #: ../fish/guestfish.pod:1011
20809 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20810 "context hangs, ie. don't do (note the backquotes):"
20814 #: ../fish/guestfish.pod:1014
20817 " a=`guestfish --remote run`\n"
20822 #: ../fish/guestfish.pod:1016
20824 "Since the C<run> command produces no output on stdout, this is not useful "
20825 "anyway. For further information see "
20826 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
20830 #: ../fish/guestfish.pod:1020
20831 msgid "PREPARED DISK IMAGES"
20835 #: ../fish/guestfish.pod:1022
20837 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20838 "preformatted disk images that guestfish can make for you to save typing. "
20839 "This is particularly useful for testing purposes. This option is used "
20840 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20841 "can be mixed with I<-a>)."
20845 #: ../fish/guestfish.pod:1028
20847 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20848 "the second and so on. Existing files in the current directory are "
20853 #: ../fish/guestfish.pod:1032
20855 "The type briefly describes how the disk should be sized, partitioned, how "
20856 "filesystem(s) should be created, and how content should be added. "
20857 "Optionally the type can be followed by extra parameters, separated by C<:> "
20858 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
20859 "sparsely-allocated disk, containing a single partition, with the partition "
20860 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
20861 "on a 1GB disk instead."
20865 #: ../fish/guestfish.pod:1040
20866 msgid "To list the available types and any extra parameters they take, run:"
20870 #: ../fish/guestfish.pod:1044
20872 "Note that the prepared filesystem is not mounted. You would usually have to "
20873 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20877 #: ../fish/guestfish.pod:1048
20879 "If any I<-N> or I<--new> options are given, the guest is automatically "
20884 #: ../fish/guestfish.pod:1053
20885 msgid "Create a 100MB disk with an ext4-formatted partition:"
20889 #: ../fish/guestfish.pod:1055
20892 " guestfish -N fs:ext4\n"
20897 #: ../fish/guestfish.pod:1057
20898 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20902 #: ../fish/guestfish.pod:1059
20905 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20910 #: ../fish/guestfish.pod:1061
20911 msgid "Create a blank 200MB disk:"
20915 #: ../fish/guestfish.pod:1063
20918 " guestfish -N disk:200M\n"
20923 #: ../fish/guestfish.pod:1065
20924 msgid "PROGRESS BARS"
20928 #: ../fish/guestfish.pod:1067
20930 "Some (not all) long-running commands send progress notification messages as "
20931 "they are running. Guestfish turns these messages into progress bars."
20935 #: ../fish/guestfish.pod:1071
20937 "When a command that supports progress bars takes longer than two seconds to "
20938 "run, and if progress bars are enabled, then you will see one appearing below "
20943 #: ../fish/guestfish.pod:1075
20946 " ><fs> copy-size /large-file /another-file 2048M\n"
20947 " / 10% [#####-----------------------------------------] 00:30\n"
20952 #: ../fish/guestfish.pod:1078
20954 "The spinner on the left hand side moves round once for every progress "
20955 "notification received from the backend. This is a (reasonably) golden "
20956 "assurance that the command is \"doing something\" even if the progress bar "
20957 "is not moving, because the command is able to send the progress "
20958 "notifications. When the bar reaches 100% and the command finishes, the "
20959 "spinner disappears."
20963 #: ../fish/guestfish.pod:1085
20965 "Progress bars are enabled by default when guestfish is used interactively. "
20966 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20967 "and you can disable them completely using I<--no-progress-bars>."
20971 #: ../fish/guestfish.pod:1090
20972 msgid "GUESTFISH COMMANDS"
20976 #: ../fish/guestfish.pod:1092
20978 "The commands in this section are guestfish convenience commands, in other "
20979 "words, they are not part of the L<guestfs(3)> API."
20983 #: ../fish/guestfish.pod:1095
20988 #: ../fish/guestfish.pod:1097
20997 #: ../fish/guestfish.pod:1100
20998 msgid "Without any parameter, this provides general help."
21002 #: ../fish/guestfish.pod:1102
21003 msgid "With a C<cmd> parameter, this displays detailed help for that command."
21007 #: ../fish/guestfish.pod:1104
21008 msgid "quit | exit"
21012 #: ../fish/guestfish.pod:1106
21013 msgid "This exits guestfish. You can also use C<^D> key."
21017 #: ../fish/guestfish.pod:1108
21018 msgid "@FISH_COMMANDS@"
21022 #: ../fish/guestfish.pod:1110
21027 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
21032 #: ../fish/guestfish.pod:1116
21034 "guestfish returns 0 if the commands completed without error, or 1 if there "
21039 #: ../fish/guestfish.pod:1123
21044 #: ../fish/guestfish.pod:1125
21046 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
21051 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3218
21052 msgid "FEBOOTSTRAP_KERNEL"
21056 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3220
21057 msgid "FEBOOTSTRAP_MODULES"
21061 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3222
21063 "These two environment variables allow the kernel that libguestfs uses in the "
21064 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
21065 "most recent host kernel is chosen. For more information about kernel "
21066 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
21067 "available in febootstrap E<ge> 3.8."
21071 #: ../fish/guestfish.pod:1138
21072 msgid "GUESTFISH_DISPLAY_IMAGE"
21076 #: ../fish/guestfish.pod:1140
21078 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
21079 "If not set, it uses L<display(1)>."
21083 #: ../fish/guestfish.pod:1143
21084 msgid "GUESTFISH_PID"
21088 #: ../fish/guestfish.pod:1145
21090 "Used with the I<--remote> option to specify the remote guestfish process to "
21091 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
21095 #: ../fish/guestfish.pod:1149
21100 #: ../fish/guestfish.pod:1151
21102 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
21103 "not specified, the external L<hexedit(1)> program is used."
21107 #: ../fish/guestfish.pod:1155
21112 #: ../fish/guestfish.pod:1157
21114 "If compiled with GNU readline support, various files in the home directory "
21115 "can be used. See L</FILES>."
21119 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3228
21120 msgid "LIBGUESTFS_APPEND"
21124 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3230
21125 msgid "Pass additional options to the guest kernel."
21129 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3232
21130 msgid "LIBGUESTFS_DEBUG"
21134 #: ../fish/guestfish.pod:1166
21136 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
21137 "effect as using the B<-v> option."
21141 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3237
21142 msgid "LIBGUESTFS_MEMSIZE"
21146 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3239
21147 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
21151 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3242
21154 " LIBGUESTFS_MEMSIZE=700\n"
21159 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3244
21160 msgid "LIBGUESTFS_PATH"
21164 #: ../fish/guestfish.pod:1178
21166 "Set the path that guestfish uses to search for kernel and initrd.img. See "
21167 "the discussion of paths in L<guestfs(3)>."
21171 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3249
21172 msgid "LIBGUESTFS_QEMU"
21176 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3251
21178 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
21179 "which was found at compile time by the configure script is used."
21183 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3257
21184 msgid "LIBGUESTFS_TRACE"
21188 #: ../fish/guestfish.pod:1189
21189 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
21193 #: ../fish/guestfish.pod:1191
21198 #: ../fish/guestfish.pod:1193
21200 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
21205 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:260 ../src/guestfs.pod:3262
21210 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3264
21212 "Location of temporary directory, defaults to C</tmp> except for the cached "
21213 "supermin appliance which defaults to C</var/tmp>."
21217 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3267
21219 "If libguestfs was compiled to use the supermin appliance then the real "
21220 "appliance is cached in this directory, shared between all handles belonging "
21221 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
21222 "use in case C</var/tmp> is not large enough."
21226 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297 ../rescue/virt-rescue.pod:310
21231 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301 ../rescue/virt-rescue.pod:314
21232 msgid "$HOME/.libguestfs-tools.rc"
21236 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303 ../rescue/virt-rescue.pod:316
21237 msgid "/etc/libguestfs-tools.conf"
21241 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305 ../rescue/virt-rescue.pod:318
21243 "This configuration file controls the default read-only or read-write mode "
21244 "(I<--ro> or I<--rw>)."
21248 #: ../fish/guestfish.pod:1220
21249 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
21253 #: ../fish/guestfish.pod:1222
21254 msgid "$HOME/.guestfish"
21258 #: ../fish/guestfish.pod:1224
21260 "If compiled with GNU readline support, then the command history is saved in "
21265 #: ../fish/guestfish.pod:1227
21266 msgid "$HOME/.inputrc"
21270 #: ../fish/guestfish.pod:1229
21271 msgid "/etc/inputrc"
21275 #: ../fish/guestfish.pod:1231
21277 "If compiled with GNU readline support, then these files can be used to "
21278 "configure readline. For further information, please see "
21279 "L<readline(3)/INITIALIZATION FILE>."
21283 #: ../fish/guestfish.pod:1235
21284 msgid "To write rules which only apply to guestfish, use:"
21288 #: ../fish/guestfish.pod:1237
21298 #: ../fish/guestfish.pod:1241
21300 "Variables that you can set in inputrc that change the behaviour of guestfish "
21301 "in useful ways include:"
21305 #: ../fish/guestfish.pod:1246
21306 msgid "completion-ignore-case (default: on)"
21310 #: ../fish/guestfish.pod:1248
21312 "By default, guestfish will ignore case when tab-completing paths on the "
21317 #: ../fish/guestfish.pod:1251
21320 " set completion-ignore-case off\n"
21325 #: ../fish/guestfish.pod:1253
21326 msgid "to make guestfish case sensitive."
21330 #: ../fish/guestfish.pod:1257
21335 #: ../fish/guestfish.pod:1259
21336 msgid "test2.img (etc)"
21340 #: ../fish/guestfish.pod:1261
21342 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
21343 "will be created in the file C<test1.img> in the current directory. The "
21344 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
21345 "the same name will be overwritten."
21349 #: ../fish/guestfish.pod:1270
21351 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, "
21352 "L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, "
21353 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
21354 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
21355 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
21356 "L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, "
21357 "L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<display(1)>, L<hexedit(1)>, "
21358 "L<febootstrap-supermin-helper(8)>."
21362 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3360 ../test-tool/libguestfs-test-tool.pod:112
21363 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
21367 #: ../fish/virt-copy-in.pod:5
21368 msgid "virt-copy-in - Copy files and directories into a virtual machine disk image."
21372 #: ../fish/virt-copy-in.pod:9
21375 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
21380 #: ../fish/virt-copy-in.pod:11
21383 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
21388 #: ../fish/virt-copy-in.pod:15
21390 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
21391 "causing disk corruption. The virtual machine must be shut down before you "
21392 "use this command."
21396 #: ../fish/virt-copy-in.pod:21
21398 "C<virt-copy-in> copies files and directories from the local disk into a "
21399 "virtual machine disk image or named libvirt domain."
21403 #: ../fish/virt-copy-in.pod:24
21405 "You can give one of more filenames and directories on the command line. "
21406 "Directories are copied in recursively. The final parameter must be the "
21407 "destination directory in the disk image which must be an absolute path "
21408 "starting with a C</> character."
21412 #: ../fish/virt-copy-in.pod:33
21415 " virt-copy-in -d MyGuest resolv.conf /etc\n"
21420 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
21421 msgid "Upload a home directory to a guest:"
21425 #: ../fish/virt-copy-in.pod:37
21428 " virt-copy-in -d MyGuest skel /home\n"
21433 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28 ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
21434 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
21438 #: ../fish/virt-copy-in.pod:41
21440 "This command is just a simple shell script wrapper around the "
21441 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
21442 "trivial copy, you are probably better off using guestfish directly."
21446 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36 ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
21448 "Since the shell script just passes options straight to guestfish, read "
21449 "L<guestfish(1)> to see the full list of options."
21453 #: ../fish/virt-copy-in.pod:52
21455 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
21456 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21460 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55 ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
21461 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
21465 #: ../fish/virt-copy-out.pod:5
21467 "virt-copy-out - Copy files and directories out of a virtual machine disk "
21472 #: ../fish/virt-copy-out.pod:9
21475 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
21480 #: ../fish/virt-copy-out.pod:11
21483 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
21488 #: ../fish/virt-copy-out.pod:15
21490 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
21491 "image or named libvirt domain."
21495 #: ../fish/virt-copy-out.pod:18
21497 "You can give one of more filenames and directories on the command line. "
21498 "Directories are copied out recursively."
21502 #: ../fish/virt-copy-out.pod:23
21503 msgid "Download the home directories from a virtual machine:"
21507 #: ../fish/virt-copy-out.pod:25
21511 " virt-copy-out -d MyGuest /home homes\n"
21516 #: ../fish/virt-copy-out.pod:30
21518 "This command is just a simple shell script wrapper around the "
21519 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
21520 "trivial copy, you are probably better off using guestfish directly."
21524 #: ../fish/virt-copy-out.pod:41
21526 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, "
21527 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21531 #: ../fish/virt-tar-in.pod:5
21532 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21536 #: ../fish/virt-tar-in.pod:9
21539 " virt-tar-in -a disk.img data.tar /destination\n"
21544 #: ../fish/virt-tar-in.pod:11
21547 " virt-tar-in -d domain data.tar /destination\n"
21552 #: ../fish/virt-tar-in.pod:13
21555 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21560 #: ../fish/virt-tar-in.pod:17
21562 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21563 "causing disk corruption. The virtual machine must be shut down before you "
21564 "use this command."
21568 #: ../fish/virt-tar-in.pod:23
21570 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21571 "image or named libvirt domain."
21575 #: ../fish/virt-tar-in.pod:26
21577 "The first parameter is the tar file. Use C<-> to read the tar file from "
21578 "standard input. The second parameter is the absolute target directory to "
21583 #: ../fish/virt-tar-in.pod:34
21586 " virt-tar-in -d MyGuest homes.tar /home\n"
21591 #: ../fish/virt-tar-in.pod:38
21593 "This command is just a simple shell script wrapper around the "
21594 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial "
21595 "copy, you are probably better off using guestfish directly."
21599 #: ../fish/virt-tar-in.pod:49
21601 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21602 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
21603 "L<http://libguestfs.org/>."
21607 #: ../fish/virt-tar-out.pod:5
21608 msgid "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21612 #: ../fish/virt-tar-out.pod:9
21615 " virt-tar-out -a disk.img /dir files.tar\n"
21620 #: ../fish/virt-tar-out.pod:11
21623 " virt-tar-out -d domain /dir files.tar\n"
21628 #: ../fish/virt-tar-out.pod:13
21631 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21636 #: ../fish/virt-tar-out.pod:17
21637 msgid "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21641 #: ../fish/virt-tar-out.pod:20
21643 "The first parameter is the absolute path of the virtual machine directory. "
21644 "The second parameter is the tar file to write. Use C<-> to write to "
21649 #: ../fish/virt-tar-out.pod:26
21650 msgid "Download the home directories from a guest:"
21654 #: ../fish/virt-tar-out.pod:28
21657 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21662 #: ../fish/virt-tar-out.pod:32
21664 "This command is just a simple shell script wrapper around the "
21665 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
21666 "trivial copy, you are probably better off using guestfish directly."
21670 #: ../fish/virt-tar-out.pod:43
21672 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21673 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21677 #: ../fuse/guestmount.pod:5
21678 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21682 #: ../fuse/guestmount.pod:9
21685 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21690 #: ../fuse/guestmount.pod:11
21693 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21698 #: ../fuse/guestmount.pod:13
21701 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21706 #: ../fuse/guestmount.pod:17
21708 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21709 "machines. If you do this, you risk disk corruption in the VM."
21713 #: ../fuse/guestmount.pod:22
21715 "The guestmount program can be used to mount virtual machine filesystems and "
21716 "other disk images on the host. It uses libguestfs for access to the guest "
21717 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21718 "a mountable device."
21722 #: ../fuse/guestmount.pod:27
21724 "Along with other options, you have to give at least one device (I<-a> "
21725 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
21726 "option) or use the I<-i> inspection option or the I<--live> option. How "
21727 "this works is better explained in the L<guestfish(1)> manual page, or by "
21728 "looking at the examples below."
21732 #: ../fuse/guestmount.pod:33
21734 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21735 "by you, and the filesystem will not be visible to any other users unless you "
21736 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21737 "the filesystem, use the C<fusermount -u> command."
21741 #: ../fuse/guestmount.pod:41
21743 "For a typical Windows guest which has its main filesystem on the first "
21748 #: ../fuse/guestmount.pod:44
21751 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21756 #: ../fuse/guestmount.pod:46
21758 "For a typical Linux guest which has a /boot filesystem on the first "
21759 "partition, and the root filesystem on a logical volume:"
21763 #: ../fuse/guestmount.pod:49
21766 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21771 #: ../fuse/guestmount.pod:51
21772 msgid "To get libguestfs to detect guest mountpoints for you:"
21776 #: ../fuse/guestmount.pod:53
21779 " guestmount -a guest.img -i --ro /mnt\n"
21784 #: ../fuse/guestmount.pod:55
21785 msgid "For a libvirt guest called \"Guest\" you could do:"
21789 #: ../fuse/guestmount.pod:57
21792 " guestmount -d Guest -i --ro /mnt\n"
21797 #: ../fuse/guestmount.pod:59
21799 "If you don't know what filesystems are contained in a guest or disk image, "
21800 "use L<virt-filesystems(1)> first:"
21804 #: ../fuse/guestmount.pod:62
21807 " virt-filesystems MyGuest\n"
21812 #: ../fuse/guestmount.pod:64
21814 "If you want to trace the libguestfs calls but without excessive debugging "
21815 "information, we recommend:"
21819 #: ../fuse/guestmount.pod:67
21822 " guestmount [...] --trace /mnt\n"
21827 #: ../fuse/guestmount.pod:69
21828 msgid "If you want to debug the program, we recommend:"
21832 #: ../fuse/guestmount.pod:71
21835 " guestmount [...] --trace --verbose /mnt\n"
21840 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:96 ../resize/virt-resize.pod:627
21845 #: ../fuse/guestmount.pod:75
21846 msgid "Other users cannot see the filesystem by default"
21850 #: ../fuse/guestmount.pod:77
21852 "If you mount a filesystem as one user (eg. root), then other users will not "
21853 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21854 "option when mounting:"
21858 #: ../fuse/guestmount.pod:81
21861 " sudo guestmount [...] -o allow_other /mnt\n"
21866 #: ../fuse/guestmount.pod:83
21867 msgid "Enabling FUSE"
21871 #: ../fuse/guestmount.pod:85
21873 "On some distros, you may need to add yourself to a special group "
21874 "(eg. C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21875 "Debian and derivatives."
21879 #: ../fuse/guestmount.pod:89
21881 "On other distros, no special group is required. It is not necessary on "
21882 "Fedora or Red Hat Enterprise Linux."
21886 #: ../fuse/guestmount.pod:100
21887 msgid "Add a block device or virtual machine image."
21891 #: ../fuse/guestmount.pod:123
21892 msgid "B<--dir-cache-timeout N>"
21896 #: ../fuse/guestmount.pod:125
21898 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21899 "seconds. The readdir cache [actually, there are several semi-independent "
21900 "caches] is populated after a readdir(2) call with the stat and extended "
21901 "attributes of the files in the directory, in anticipation that they will be "
21902 "requested soon after."
21906 #: ../fuse/guestmount.pod:131
21908 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21909 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21910 "requests, only cache existing ones."
21914 #: ../fuse/guestmount.pod:151
21916 "If you have untrusted raw-format guest disk images, you should use this "
21917 "option to specify the disk format. This avoids a possible security problem "
21918 "with malicious guests (CVE-2010-3851). See also "
21919 "L<guestfs(3)/guestfs_add_drive_opts>."
21923 #: ../fuse/guestmount.pod:156
21924 msgid "B<--fuse-help>"
21928 #: ../fuse/guestmount.pod:158
21929 msgid "Display help on special FUSE options (see I<-o> below)."
21933 #: ../fuse/guestmount.pod:162
21934 msgid "Display brief help and exit."
21938 #: ../fuse/guestmount.pod:186
21940 "Mount the named partition or logical volume on the given mountpoint B<in the "
21941 "guest> (this has nothing to do with mountpoints in the host)."
21945 #: ../fuse/guestmount.pod:189
21947 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21948 "something on C</>."
21952 #: ../fuse/guestmount.pod:206
21954 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21955 "unmounted. If you specify this option, then we don't attempt to sync the "
21956 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21960 #: ../fuse/guestmount.pod:211
21961 msgid "B<-o option>"
21965 #: ../fuse/guestmount.pod:213
21966 msgid "B<--option option>"
21970 #: ../fuse/guestmount.pod:215
21971 msgid "Pass extra options to FUSE."
21975 #: ../fuse/guestmount.pod:217
21977 "To get a list of all the extra options supported by FUSE, use the command "
21978 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21979 "of them are a good idea."
21983 #: ../fuse/guestmount.pod:221
21986 " guestmount --fuse-help\n"
21991 #: ../fuse/guestmount.pod:223
21992 msgid "Some potentially useful FUSE options:"
21996 #: ../fuse/guestmount.pod:227
21997 msgid "B<-o allow_other>"
22001 #: ../fuse/guestmount.pod:229
22002 msgid "Allow other users to see the filesystem."
22006 #: ../fuse/guestmount.pod:231
22007 msgid "B<-o attr_timeout=N>"
22011 #: ../fuse/guestmount.pod:233
22012 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
22016 #: ../fuse/guestmount.pod:235
22017 msgid "B<-o kernel_cache>"
22021 #: ../fuse/guestmount.pod:237
22023 "Allow the kernel to cache files (reduces the number of reads that have to go "
22024 "through the L<guestfs(3)> API). This is generally a good idea if you can "
22025 "afford the extra memory usage."
22029 #: ../fuse/guestmount.pod:241
22030 msgid "B<-o uid=N> B<-o gid=N>"
22034 #: ../fuse/guestmount.pod:243
22036 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
22037 "the chosen values."
22041 #: ../fuse/guestmount.pod:252
22043 "Add devices and mount everything read-only. Also disallow writes and make "
22044 "the disk appear read-only to FUSE."
22048 #: ../fuse/guestmount.pod:255
22050 "This is highly recommended if you are not going to edit the guest disk. If "
22051 "the guest is running and this option is I<not> supplied, then there is a "
22052 "strong risk of disk corruption in the guest. We try to prevent this from "
22053 "happening, but it is not always possible."
22057 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:199
22058 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
22062 #: ../fuse/guestmount.pod:264
22063 msgid "Enable SELinux support for the guest."
22067 #: ../fuse/guestmount.pod:270
22068 msgid "Enable verbose messages from underlying libguestfs."
22072 #: ../fuse/guestmount.pod:276
22073 msgid "Display the program version and exit."
22077 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308 ../rescue/virt-rescue.pod:238 ../rescue/virt-rescue.pod:321
22078 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
22082 #: ../fuse/guestmount.pod:289
22087 #: ../fuse/guestmount.pod:291
22088 msgid "Trace libguestfs calls and entry into each FUSE function."
22092 #: ../fuse/guestmount.pod:293
22093 msgid "This also stops the daemon from forking into the background."
22097 #: ../fuse/guestmount.pod:319
22099 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22100 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
22101 "L<http://fuse.sf.net/>."
22105 #: ../fuse/guestmount.pod:334
22106 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
22110 #: ../inspector/virt-inspector.pod:5
22112 "virt-inspector - Display operating system version and other information "
22113 "about a virtual machine"
22117 #: ../inspector/virt-inspector.pod:9
22120 " virt-inspector [--options] -d domname\n"
22125 #: ../inspector/virt-inspector.pod:11
22128 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
22133 #: ../inspector/virt-inspector.pod:15
22136 " virt-inspector domname\n"
22141 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
22144 " virt-inspector disk.img [disk.img ...]\n"
22149 #: ../inspector/virt-inspector.pod:21
22151 "B<virt-inspector> examines a virtual machine or disk image and tries to "
22152 "determine the version of the operating system and other information about "
22153 "the virtual machine."
22157 #: ../inspector/virt-inspector.pod:25
22158 msgid "Virt-inspector produces XML output for feeding into other programs."
22162 #: ../inspector/virt-inspector.pod:27
22164 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
22165 "the libvirt domain (see: C<virsh list --all>)."
22169 #: ../inspector/virt-inspector.pod:30
22171 "You can also run virt-inspector directly on disk images from a single "
22172 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
22173 "has several block devices, in which case you should list several I<-a> "
22174 "options one after another, with the first corresponding to the guest's "
22175 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
22179 #: ../inspector/virt-inspector.pod:37
22181 "You can also run virt-inspector on install disks, live CDs, bootable USB "
22182 "keys and similar."
22186 #: ../inspector/virt-inspector.pod:40
22188 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22189 "inspect several virtual machines, you have to run virt-inspector several "
22190 "times (for example, from a shell script for-loop)."
22194 #: ../inspector/virt-inspector.pod:45
22196 "Because virt-inspector needs direct access to guest images, it won't "
22197 "normally work over remote libvirt connections."
22201 #: ../inspector/virt-inspector.pod:48
22203 "All of the information available from virt-inspector is also available "
22204 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
22205 "The same information can also be fetched using guestfish or via libguestfs "
22206 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
22207 "WITH OTHER PROGRAMMING LANGUAGES>)."
22211 #: ../inspector/virt-inspector.pod:81
22213 "Libvirt is only used if you specify a C<domname> on the command line. If "
22214 "you specify guest block devices directly (I<-a>), then libvirt is not used "
22219 #: ../inspector/virt-inspector.pod:94
22221 "When prompting for keys and passphrases, virt-inspector normally turns "
22222 "echoing off so you cannot see what you are typing. If you are not worried "
22223 "about Tempest attacks and there is no one else in the room you can specify "
22224 "this flag to see what you are typing."
22228 #: ../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
22230 "Specify the format of disk images given on the command line. If this is "
22231 "omitted then the format is autodetected from the content of the disk image."
22235 #: ../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
22237 "If disk images are requested from libvirt, then this program asks libvirt "
22238 "for this information. In this case, the value of the format parameter is "
22243 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:397 ../resize/virt-resize.pod:489 ../sparsify/virt-sparsify.pod:144 ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
22245 "If working with untrusted raw-format guest disk images, you should ensure "
22246 "the format is always specified."
22250 #: ../inspector/virt-inspector.pod:135
22251 msgid "B<--xpath> query"
22255 #: ../inspector/virt-inspector.pod:137
22257 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
22258 "In this mode virt-inspector simply runs an XPath query; all other inspection "
22259 "functions are disabled. See L</XPATH QUERIES> below for some examples."
22263 #: ../inspector/virt-inspector.pod:146
22264 msgid "Previous versions of virt-inspector allowed you to write either:"
22268 #: ../inspector/virt-inspector.pod:152
22271 " virt-inspector guestname\n"
22276 #: ../inspector/virt-inspector.pod:160
22281 #: ../inspector/virt-inspector.pod:162
22283 "The virt-inspector XML is described precisely in a RELAX NG schema file "
22284 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
22285 "just an overview."
22289 #: ../inspector/virt-inspector.pod:166
22291 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
22292 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
22293 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
22294 "which is vanishingly rare in real world VMs."
22298 #: ../inspector/virt-inspector.pod:171
22299 msgid "E<lt>operatingsystemE<gt>"
22303 #: ../inspector/virt-inspector.pod:173
22305 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
22306 "describe the operating system, its architecture, the descriptive \"product "
22307 "name\" string, the type of OS and so on, as in this example:"
22311 #: ../inspector/virt-inspector.pod:177
22314 " <operatingsystems>\n"
22315 " <operatingsystem>\n"
22316 " <root>/dev/sda2</root>\n"
22317 " <name>windows</name>\n"
22318 " <arch>i386</arch>\n"
22319 " <distro>windows</distro>\n"
22320 " <product_name>Windows 7 Enterprise</product_name>\n"
22321 " <product_variant>Client</product_variant>\n"
22322 " <major_version>6</major_version>\n"
22323 " <minor_version>1</minor_version>\n"
22324 " <windows_systemroot>/Windows</windows_systemroot>\n"
22325 " <format>installed</format>\n"
22330 #: ../inspector/virt-inspector.pod:190
22332 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
22333 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
22334 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
22335 "architecture. The other fields are fairly self-explanatory, but because "
22336 "these fields are taken directly from the libguestfs inspection API you can "
22337 "find precise information from L<guestfs(3)/INSPECTION>."
22341 #: ../inspector/virt-inspector.pod:198
22343 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
22344 "of view of libguestfs (block devices may have completely different names "
22345 "inside the VM itself)."
22349 #: ../inspector/virt-inspector.pod:202
22350 msgid "E<lt>mountpointsE<gt>"
22354 #: ../inspector/virt-inspector.pod:204
22356 "Un*x-like guests typically have multiple filesystems which are mounted at "
22357 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
22358 "element which looks like this:"
22362 #: ../inspector/virt-inspector.pod:208
22365 " <operatingsystems>\n"
22366 " <operatingsystem>\n"
22369 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
22370 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
22371 " </mountpoints>\n"
22376 #: ../inspector/virt-inspector.pod:216
22378 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
22379 "and may have completely different names inside the guest. Only mountable "
22380 "filesystems appear in this list, not things like swap devices."
22384 #: ../inspector/virt-inspector.pod:221
22385 msgid "E<lt>filesystemsE<gt>"
22389 #: ../inspector/virt-inspector.pod:223
22391 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
22392 "filesystems belonging to the guest, including swap and empty partitions. "
22393 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
22394 "this OS or shared with this OS and other OSes)."
22398 #: ../inspector/virt-inspector.pod:229
22399 msgid "You might see something like this:"
22403 #: ../inspector/virt-inspector.pod:231
22406 " <operatingsystems>\n"
22407 " <operatingsystem>\n"
22410 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22411 " <type>ext4</type>\n"
22412 " <label>Fedora-13-x86_64</label>\n"
22413 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
22419 #: ../inspector/virt-inspector.pod:241
22421 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
22422 "the label, and the UUID."
22426 #: ../inspector/virt-inspector.pod:244
22427 msgid "E<lt>applicationsE<gt>"
22431 #: ../inspector/virt-inspector.pod:246
22433 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
22434 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
22439 #: ../inspector/virt-inspector.pod:250
22441 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
22442 "Typical values would be C<rpm> and C<deb>."
22446 #: ../inspector/virt-inspector.pod:253
22448 "E<lt>package_managementE<gt>, if present, describes the package manager. "
22449 "Typical values include C<yum>, C<up2date> and C<apt>"
22453 #: ../inspector/virt-inspector.pod:256
22454 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
22458 #: ../inspector/virt-inspector.pod:259
22461 " <operatingsystems>\n"
22462 " <operatingsystem>\n"
22464 " <applications>\n"
22466 " <name>coreutils</name>\n"
22467 " <version>8.5</version>\n"
22468 " <release>1</release>\n"
22469 " </application>\n"
22474 #: ../inspector/virt-inspector.pod:269
22476 "The version and release fields may not be available for some types guests. "
22477 "Other fields are possible, see "
22478 "L<guestfs(3)/guestfs_inspect_list_applications>."
22482 #: ../inspector/virt-inspector.pod:273
22483 msgid "E<lt>drive_mappingsE<gt>"
22487 #: ../inspector/virt-inspector.pod:275
22489 "For operating systems like Windows which use drive letters, virt-inspector "
22490 "is able to find out how drive letters map to filesystems."
22494 #: ../inspector/virt-inspector.pod:279
22497 " <operatingsystems>\n"
22498 " <operatingsystem>\n"
22500 " <drive_mappings>\n"
22501 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
22502 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
22503 " </drive_mappings>\n"
22508 #: ../inspector/virt-inspector.pod:287
22510 "In the example above, drive C maps to the filesystem on the second partition "
22511 "on the first disk, and drive E maps to the filesystem on the first partition "
22512 "on the second disk."
22516 #: ../inspector/virt-inspector.pod:291
22518 "Note that this only covers permanent local filesystem mappings, not things "
22519 "like network shares. Furthermore NTFS volume mount points may not be listed "
22524 #: ../inspector/virt-inspector.pod:295
22525 msgid "E<lt>iconE<gt>"
22529 #: ../inspector/virt-inspector.pod:297
22531 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22532 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22533 "very large and high quality."
22537 #: ../inspector/virt-inspector.pod:301
22540 " <operatingsystems>\n"
22541 " <operatingsystem>\n"
22544 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22545 " [... many lines of base64 data ...]\n"
22551 #: ../inspector/virt-inspector.pod:309
22553 "To display the icon, you have to extract it and convert the base64 data back "
22554 "to a binary file. Use an XPath query or simply an editor to extract the "
22555 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22560 #: ../inspector/virt-inspector.pod:314
22563 " base64 -i -d < icon.data > icon.png\n"
22568 #: ../inspector/virt-inspector.pod:316
22569 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22573 #: ../inspector/virt-inspector.pod:318
22575 "Virt-inspector can detect some operating system installers on install disks, "
22576 "live CDs, bootable USB keys and more."
22580 #: ../inspector/virt-inspector.pod:321
22582 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22583 "fields may be present to indicate a live CD, network installer, or one part "
22584 "of a multipart CD. For example:"
22588 #: ../inspector/virt-inspector.pod:325
22591 " <operatingsystems>\n"
22592 " <operatingsystem>\n"
22593 " <root>/dev/sda</root>\n"
22594 " <name>linux</name>\n"
22595 " <arch>i386</arch>\n"
22596 " <distro>ubuntu</distro>\n"
22597 " <product_name>Ubuntu 10.10 "Maverick "
22598 "Meerkat"</product_name>\n"
22599 " <major_version>10</major_version>\n"
22600 " <minor_version>10</minor_version>\n"
22601 " <format>installer</format>\n"
22607 #: ../inspector/virt-inspector.pod:337
22608 msgid "XPATH QUERIES"
22612 #: ../inspector/virt-inspector.pod:339
22614 "Virt-inspector includes built in support for running XPath queries. The "
22615 "reason for including XPath support directly in virt-inspector is simply that "
22616 "there are no good and widely available command line programs that can do "
22617 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
22618 "available on Red Hat Enterprise Linux."
22622 #: ../inspector/virt-inspector.pod:346
22624 "To perform an XPath query, use the I<--xpath> option. Note that in this "
22625 "mode, virt-inspector simply reads XML from stdin and outputs the query "
22626 "result on stdout. All other inspection features are disabled in this mode."
22630 #: ../inspector/virt-inspector.pod:353
22633 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
22635 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22636 " <type>ext4</type>\n"
22642 #: ../inspector/virt-inspector.pod:359
22645 " $ virt-inspector -d Guest | \\\n"
22646 " virt-inspector --xpath "
22647 "\"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22653 #: ../inspector/virt-inspector.pod:363
22656 " $ virt-inspector -d Guest | \\\n"
22657 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
22658 " [displays the guest icon, if there is one]\n"
22663 #: ../inspector/virt-inspector.pod:374
22664 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22668 #: ../inspector/virt-inspector.pod:376
22670 "Early versions of libguestfs shipped with a different virt-inspector program "
22671 "written in Perl (the current version is written in C). The XML output of "
22672 "the Perl virt-inspector was different and it could also output in other "
22673 "formats like text."
22677 #: ../inspector/virt-inspector.pod:381
22678 msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
22682 #: ../inspector/virt-inspector.pod:384
22684 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22685 "versions of virt-inspector with different names:"
22689 #: ../inspector/virt-inspector.pod:387
22692 " virt-inspector Old Perl version.\n"
22693 " virt-inspector2 New C version.\n"
22698 #: ../inspector/virt-inspector.pod:397
22700 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
22701 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22705 #: ../inspector/virt-inspector.pod:414
22706 msgid "Matthew Booth L<mbooth@redhat.com>"
22710 #: ../java/examples/guestfs-java.pod:5
22711 msgid "guestfs-java - How to use libguestfs from Java"
22715 #: ../java/examples/guestfs-java.pod:9
22718 " import com.redhat.et.libguestfs.*;\n"
22723 #: ../java/examples/guestfs-java.pod:11
22726 " GuestFS g = new GuestFS ();\n"
22727 " g.add_drive_opts (\"disk.img\", null);\n"
22733 #: ../java/examples/guestfs-java.pod:17
22735 "This manual page documents how to call libguestfs from the Java programming "
22736 "language. This page just documents the differences from the C API and gives "
22737 "some examples. If you are not familiar with using libguestfs, you also need "
22738 "to read L<guestfs(3)>."
22742 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22743 msgid "CLOSING THE HANDLE"
22747 #: ../java/examples/guestfs-java.pod:24
22749 "The handle is closed when it is reaped by the garbage collector. Because "
22750 "libguestfs handles include a lot of state, it is also possible to close (and "
22751 "hence free) them explicitly by calling the C<close> method."
22755 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60 ../python/examples/guestfs-python.pod:21 ../ruby/examples/guestfs-ruby.pod:22
22760 #: ../java/examples/guestfs-java.pod:31
22762 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22763 "exception. This has a single parameter which is the error message (a "
22768 #: ../java/examples/guestfs-java.pod:35
22769 msgid "Calling any method on a closed handle raises the same exception."
22773 #: ../java/examples/guestfs-java.pod:47
22775 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22776 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22777 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22778 "L<http://caml.inria.fr/>."
22782 #: ../ocaml/examples/guestfs-ocaml.pod:5
22783 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22787 #: ../ocaml/examples/guestfs-ocaml.pod:9
22788 msgid "Module style:"
22792 #: ../ocaml/examples/guestfs-ocaml.pod:11
22795 " let g = Guestfs.create () in\n"
22796 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22797 " Guestfs.launch g;\n"
22802 #: ../ocaml/examples/guestfs-ocaml.pod:15
22803 msgid "Object-oriented style:"
22807 #: ../ocaml/examples/guestfs-ocaml.pod:17
22810 " let g = new Guestfs.guestfs () in\n"
22811 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22817 #: ../ocaml/examples/guestfs-ocaml.pod:21
22820 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22822 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22827 #: ../ocaml/examples/guestfs-ocaml.pod:27
22829 "This manual page documents how to call libguestfs from the OCaml programming "
22830 "language. This page just documents the differences from the C API and gives "
22831 "some examples. If you are not familiar with using libguestfs, you also need "
22832 "to read L<guestfs(3)>."
22836 #: ../ocaml/examples/guestfs-ocaml.pod:32
22837 msgid "PROGRAMMING STYLES"
22841 #: ../ocaml/examples/guestfs-ocaml.pod:34
22843 "There are two different programming styles supported by the OCaml bindings. "
22844 "You can use a module style, with each C function mapped to an OCaml "
22849 #: ../ocaml/examples/guestfs-ocaml.pod:38
22852 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22857 #: ../ocaml/examples/guestfs-ocaml.pod:40
22862 #: ../ocaml/examples/guestfs-ocaml.pod:42
22865 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22870 #: ../ocaml/examples/guestfs-ocaml.pod:44
22872 "Alternately you can use an object-oriented style, calling methods on the "
22873 "class C<Guestfs.guestfs>:"
22877 #: ../ocaml/examples/guestfs-ocaml.pod:47
22880 " method set_verbose : bool -> unit\n"
22885 #: ../ocaml/examples/guestfs-ocaml.pod:49
22887 "The object-oriented style is usually briefer, and the minor performance "
22888 "penalty isn't noticable in the general overhead of performing libguestfs "
22893 #: ../ocaml/examples/guestfs-ocaml.pod:55
22895 "The handle is closed when it is reaped by the garbage collector. Because "
22896 "libguestfs handles include a lot of state, it is also possible to close (and "
22897 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22902 #: ../ocaml/examples/guestfs-ocaml.pod:62
22904 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22905 "exception. This has a single parameter which is the error message (a "
22910 #: ../ocaml/examples/guestfs-ocaml.pod:66
22912 "Calling any function/method on a closed handle raises "
22913 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
22918 #: ../ocaml/examples/guestfs-ocaml.pod:80
22920 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22921 "L<guestfs-java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22922 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22923 "L<http://caml.inria.fr/>."
22927 #: ../perl/examples/guestfs-perl.pod:5
22928 msgid "guestfs-perl - How to use libguestfs from Perl"
22932 #: ../perl/examples/guestfs-perl.pod:9
22935 " use Sys::Guestfs;\n"
22940 #: ../perl/examples/guestfs-perl.pod:11
22943 " my $h = Sys::Guestfs->new ();\n"
22944 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22945 " $h->launch ();\n"
22946 " $h->mount_options ('', '/dev/sda1', '/');\n"
22947 " $h->touch ('/hello');\n"
22953 #: ../perl/examples/guestfs-perl.pod:20
22955 "This manual page documents how to call libguestfs from the Perl programming "
22956 "language. This page just documents the differences from the C API and gives "
22957 "some examples. If you are not familiar with using libguestfs, you also need "
22958 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22962 #: ../perl/examples/guestfs-perl.pod:26
22967 #: ../perl/examples/guestfs-perl.pod:28
22969 "Errors from libguestfs functions turn into calls to C<croak> (see "
22974 #: ../perl/examples/guestfs-perl.pod:41
22976 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, "
22977 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
22978 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
22979 "L<http://libguestfs.org/>."
22983 #: ../python/examples/guestfs-python.pod:5
22984 msgid "guestfs-python - How to use libguestfs from Python"
22988 #: ../python/examples/guestfs-python.pod:9
22991 " import guestfs\n"
22992 " g = guestfs.GuestFS ()\n"
22993 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22999 #: ../python/examples/guestfs-python.pod:16
23001 "This manual page documents how to call libguestfs from the Python "
23002 "programming language. This page just documents the differences from the C "
23003 "API and gives some examples. If you are not familiar with using libguestfs, "
23004 "you also need to read L<guestfs(3)>."
23008 #: ../python/examples/guestfs-python.pod:23
23010 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
23011 "single string argument which is the error message."
23015 #: ../python/examples/guestfs-python.pod:26
23016 msgid "MORE DOCUMENTATION"
23020 #: ../python/examples/guestfs-python.pod:28
23025 #: ../python/examples/guestfs-python.pod:30
23029 " >>> import guestfs\n"
23030 " >>> help (guestfs)\n"
23035 #: ../python/examples/guestfs-python.pod:44
23037 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
23038 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
23039 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
23043 #: ../rescue/virt-rescue.pod:5
23044 msgid "virt-rescue - Run a rescue shell on a virtual machine"
23048 #: ../rescue/virt-rescue.pod:9
23051 " virt-rescue [--options] -d domname\n"
23056 #: ../rescue/virt-rescue.pod:11
23059 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
23064 #: ../rescue/virt-rescue.pod:13
23067 " virt-rescue --suggest (-d domname | -a disk.img ...)\n"
23072 #: ../rescue/virt-rescue.pod:17
23075 " virt-rescue [--options] domname\n"
23080 #: ../rescue/virt-rescue.pod:19
23083 " virt-rescue [--options] disk.img [disk.img ...]\n"
23088 #: ../rescue/virt-rescue.pod:23
23090 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
23091 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
23092 "you from doing this, but doesn't catch all cases."
23096 #: ../rescue/virt-rescue.pod:27
23098 "However if you use the I<--ro> (read only) option, then you can attach a "
23099 "shell to a live virtual machine. The results might be strange or "
23100 "inconsistent at times but you won't get disk corruption."
23104 #: ../rescue/virt-rescue.pod:33
23106 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
23107 "need for a CD. virt-rescue gives you a rescue shell and some simple "
23108 "recovery tools which you can use to examine or rescue a virtual machine or "
23113 #: ../rescue/virt-rescue.pod:38
23115 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
23116 "on disk image(s):"
23120 #: ../rescue/virt-rescue.pod:41
23123 " virt-rescue -d GuestName\n"
23128 #: ../rescue/virt-rescue.pod:43
23131 " virt-rescue --ro -a /path/to/disk.img\n"
23136 #: ../rescue/virt-rescue.pod:45
23139 " virt-rescue -a /dev/sdc\n"
23144 #: ../rescue/virt-rescue.pod:47
23145 msgid "For live VMs you I<must> use the --ro option."
23149 #: ../rescue/virt-rescue.pod:49
23151 "When you run virt-rescue on a virtual machine or disk image, you are placed "
23152 "in an interactive bash shell where you can use many ordinary Linux "
23153 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
23154 "appliance. You must mount the virtual machine's filesystems by hand. There "
23155 "is an empty directory called C</sysroot> where you can mount filesystems."
23159 #: ../rescue/virt-rescue.pod:56
23161 "You can get virt-rescue to suggest mount commands for you by using the "
23162 "I<--suggest> option (in another terminal):"
23166 #: ../rescue/virt-rescue.pod:59
23169 " $ virt-rescue --suggest -d Fedora15\n"
23170 " Inspecting the virtual machine or disk image ...\n"
23175 #: ../rescue/virt-rescue.pod:62
23178 " This disk contains one or more operating systems. You can use these\n"
23179 " mount commands in virt-rescue (at the ><rescue> prompt) to mount the\n"
23185 #: ../rescue/virt-rescue.pod:66
23188 " # /dev/vg_f15x32/lv_root is the root of a linux operating system\n"
23189 " # type: linux, distro: fedora, version: 15.0\n"
23190 " # Fedora release 15 (Lovelock)\n"
23195 #: ../rescue/virt-rescue.pod:70
23198 " mount /dev/vg_f15x32/lv_root /sysroot/\n"
23199 " mount /dev/vda1 /sysroot/boot\n"
23200 " mount --bind /dev /sysroot/dev\n"
23201 " mount --bind /dev/pts /sysroot/dev/pts\n"
23202 " mount --bind /proc /sysroot/proc\n"
23203 " mount --bind /sys /sysroot/sys\n"
23208 #: ../rescue/virt-rescue.pod:77
23210 "Another way is to list the logical volumes (with L<lvs(8)>) and partitions "
23211 "(with L<parted(8)>) and mount them by hand:"
23215 #: ../rescue/virt-rescue.pod:80
23219 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
23220 " lv_root vg_f15x32 -wi-a- 8.83G\n"
23221 " lv_swap vg_f15x32 -wi-a- 992.00M\n"
23222 " ><rescue> mount /dev/vg_f15x32/lv_root /sysroot\n"
23223 " ><rescue> mount /dev/vda1 /sysroot/boot\n"
23224 " ><rescue> ls /sysroot\n"
23229 #: ../rescue/virt-rescue.pod:88
23230 msgid "Another command to list available filesystems is L<virt-filesystems(1)>."
23234 #: ../rescue/virt-rescue.pod:91
23236 "To run commands in a Linux guest (for example, grub), you should chroot into "
23237 "the /sysroot directory first:"
23241 #: ../rescue/virt-rescue.pod:94
23244 " ><rescue> chroot /sysroot\n"
23249 #: ../rescue/virt-rescue.pod:98
23251 "Virt-rescue can be used on I<any> disk image file or device, not just a "
23252 "virtual machine. For example you can use it on a blank file if you want to "
23253 "partition that file (although we would recommend using L<guestfish(1)> "
23254 "instead as it is more suitable for this purpose). You can even use "
23255 "virt-rescue on things like SD cards."
23259 #: ../rescue/virt-rescue.pod:104
23261 "Virt-rescue does not require root. You only need to run it as root if you "
23262 "need root to open the disk image."
23266 #: ../rescue/virt-rescue.pod:107
23268 "This tool is just designed for quick interactive hacking on a virtual "
23269 "machine. For more structured access to a virtual machine disk image, you "
23270 "should use L<guestfs(3)>. To get a structured shell that you can use to "
23271 "make scripted changes to guests, use L<guestfish(1)>."
23275 #: ../rescue/virt-rescue.pod:131
23276 msgid "B<--append kernelopts>"
23280 #: ../rescue/virt-rescue.pod:133
23281 msgid "Pass additional options to the rescue kernel."
23285 #: ../rescue/virt-rescue.pod:163
23288 " virt-rescue --format=raw -a disk.img\n"
23293 #: ../rescue/virt-rescue.pod:167
23296 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
23301 #: ../rescue/virt-rescue.pod:176
23306 #: ../rescue/virt-rescue.pod:178
23307 msgid "B<--memsize MB>"
23311 #: ../rescue/virt-rescue.pod:180
23313 "Change the amount of memory allocated to the rescue system. The default is "
23314 "set by libguestfs and is small but adequate for running system tools. The "
23315 "occasional program might need more memory. The parameter is specified in "
23320 #: ../rescue/virt-rescue.pod:185
23321 msgid "B<--network>"
23325 #: ../rescue/virt-rescue.pod:187
23326 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
23330 #: ../rescue/virt-rescue.pod:193
23331 msgid "Open the image read-only."
23335 #: ../rescue/virt-rescue.pod:203
23337 "Enable SELinux in the rescue appliance. You should read "
23338 "L<guestfs(3)/SELINUX> before using this option."
23342 #: ../rescue/virt-rescue.pod:206
23347 #: ../rescue/virt-rescue.pod:208
23348 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
23352 #: ../rescue/virt-rescue.pod:210
23353 msgid "B<--suggest>"
23357 #: ../rescue/virt-rescue.pod:212
23359 "Inspect the disk image and suggest what mount commands should be used to "
23360 "mount the disks. You should use the I<--suggest> option in a second "
23361 "terminal, then paste the commands into another virt-rescue."
23365 #: ../rescue/virt-rescue.pod:216
23367 "This option implies I<--ro> and is safe to use even if the guest is up or if "
23368 "another virt-rescue is running."
23372 #: ../rescue/virt-rescue.pod:235
23374 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
23375 "are done read-write."
23379 #: ../rescue/virt-rescue.pod:248
23380 msgid "Previous versions of virt-rescue allowed you to write either:"
23384 #: ../rescue/virt-rescue.pod:250
23387 " virt-rescue disk.img [disk.img ...]\n"
23392 #: ../rescue/virt-rescue.pod:254
23395 " virt-rescue guestname\n"
23400 #: ../rescue/virt-rescue.pod:262
23405 #: ../rescue/virt-rescue.pod:264
23407 "Adding the I<--network> option enables QEMU user networking in the rescue "
23408 "appliance. There are some differences between user networking and ordinary "
23413 #: ../rescue/virt-rescue.pod:270
23414 msgid "ping does not work"
23418 #: ../rescue/virt-rescue.pod:272
23420 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
23421 "send the ping packets, and because virt-rescue must be able to run as "
23422 "non-root, QEMU user networking is not able to emulate the L<ping(8)> "
23423 "command. The ping command will appear to resolve addresses but will not be "
23424 "able to send or receive any packets. This does not mean that the network is "
23429 #: ../rescue/virt-rescue.pod:279
23430 msgid "cannot receive connections"
23434 #: ../rescue/virt-rescue.pod:281
23435 msgid "QEMU user networking cannot receive incoming connections."
23439 #: ../rescue/virt-rescue.pod:283
23440 msgid "making TCP connections"
23444 #: ../rescue/virt-rescue.pod:285
23446 "The virt-rescue appliance needs to be small and so does not include many "
23447 "network tools. In particular there is no L<telnet(1)> command. You can "
23448 "make TCP connections from the shell using the magical "
23449 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
23453 #: ../rescue/virt-rescue.pod:290
23456 " exec 3<>/dev/tcp/redhat.com/80\n"
23457 " echo \"GET /\" >&3\n"
23463 #: ../rescue/virt-rescue.pod:294
23464 msgid "See L<bash(1)> for more details."
23468 #: ../rescue/virt-rescue.pod:300
23470 "Several environment variables affect virt-rescue. See "
23471 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
23475 #: ../rescue/virt-rescue.pod:327
23477 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
23478 "L<virt-filesystems(1)>, L<http://libguestfs.org/>."
23482 #: ../resize/virt-resize.pod:5
23483 msgid "virt-resize - Resize a virtual machine disk"
23487 #: ../resize/virt-resize.pod:9
23490 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
23491 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
23492 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
23497 #: ../resize/virt-resize.pod:15
23499 "Virt-resize is a tool which can resize a virtual machine disk, making it "
23500 "larger or smaller overall, and resizing or deleting any partitions contained "
23505 #: ../resize/virt-resize.pod:19
23507 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
23508 "not> be used on live virtual machines - for consistent results, shut the "
23509 "virtual machine down before resizing it."
23513 #: ../resize/virt-resize.pod:23
23515 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
23516 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
23520 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:603 ../sparsify/virt-sparsify.pod:227 ../src/guestfs.pod:484 ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
23525 #: ../resize/virt-resize.pod:33
23527 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
23528 "fill the extra 5GB of space."
23532 #: ../resize/virt-resize.pod:36
23535 " virt-filesystems --long -h --all -a olddisk\n"
23540 #: ../resize/virt-resize.pod:38
23543 " truncate -r olddisk newdisk\n"
23544 " truncate -s +5G newdisk\n"
23549 #: ../resize/virt-resize.pod:41
23552 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
23553 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
23558 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:234 ../src/guestfs.pod:490 ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
23563 #: ../resize/virt-resize.pod:46
23565 "As above, but make the /boot partition 200MB bigger, while giving the "
23566 "remaining space to /dev/sda2:"
23570 #: ../resize/virt-resize.pod:49
23573 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23574 " olddisk newdisk\n"
23579 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:616 ../sparsify/virt-sparsify.pod:240 ../src/guestfs.pod:501 ../src/guestfs.pod:1451
23584 #: ../resize/virt-resize.pod:54
23586 "As in the first example, but expand a logical volume as the final step. "
23587 "This is what you would typically use for Linux guests that use LVM:"
23591 #: ../resize/virt-resize.pod:58
23594 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
23595 " olddisk newdisk\n"
23600 #: ../resize/virt-resize.pod:61
23605 #: ../resize/virt-resize.pod:63
23607 "As in the first example, but the output format will be qcow2 instead of a "
23612 #: ../resize/virt-resize.pod:66
23615 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
23616 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23621 #: ../resize/virt-resize.pod:71
23622 msgid "DETAILED USAGE"
23626 #: ../resize/virt-resize.pod:73
23627 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23631 #: ../resize/virt-resize.pod:77
23632 msgid "1. Shut down the virtual machine"
23636 #: ../resize/virt-resize.pod:79
23637 msgid "2. Locate input disk image"
23641 #: ../resize/virt-resize.pod:81
23643 "Locate the input disk image (ie. the file or device on the host containing "
23644 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23645 "dumpxml> like this to find the disk image name:"
23649 #: ../resize/virt-resize.pod:85
23652 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23653 " Found 1 nodes:\n"
23655 " <source dev=\"/dev/vg/lv_guest\" />\n"
23660 #: ../resize/virt-resize.pod:90
23661 msgid "3. Look at current sizing"
23665 #: ../resize/virt-resize.pod:92
23666 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23670 #: ../resize/virt-resize.pod:95
23673 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23674 " Name Type Size Parent\n"
23675 " /dev/sda1 partition 101M /dev/sda\n"
23676 " /dev/sda2 partition 7.9G /dev/sda\n"
23677 " /dev/sda device 8.0G -\n"
23682 #: ../resize/virt-resize.pod:101
23684 "(This example is a virtual machine with an 8 GB disk which we would like to "
23685 "expand up to 10 GB)."
23689 #: ../resize/virt-resize.pod:104
23690 msgid "4. Create output disk"
23694 #: ../resize/virt-resize.pod:106
23696 "Virt-resize cannot do in-place disk modifications. You have to have space "
23697 "to store the resized output disk."
23701 #: ../resize/virt-resize.pod:109
23702 msgid "To store the resized disk image in a file, create a file of a suitable size:"
23706 #: ../resize/virt-resize.pod:112
23709 " # rm -f outdisk\n"
23710 " # truncate -s 10G outdisk\n"
23715 #: ../resize/virt-resize.pod:115
23716 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23720 #: ../resize/virt-resize.pod:117
23723 " # lvcreate -L 10G -n lv_name vg_name\n"
23728 #: ../resize/virt-resize.pod:119
23729 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23733 #: ../resize/virt-resize.pod:121
23736 " # virsh pool-list\n"
23737 " # virsh vol-create-as poolname newvol 10G\n"
23742 #: ../resize/virt-resize.pod:124
23747 #: ../resize/virt-resize.pod:126
23749 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23750 "file) and the output disk. The output disk is the one created in the "
23755 #: ../resize/virt-resize.pod:130
23758 " # virt-resize indisk outdisk\n"
23763 #: ../resize/virt-resize.pod:132
23765 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23766 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23767 "larger, then an extra, empty partition is created at the end of the disk "
23768 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23773 #: ../resize/virt-resize.pod:138
23775 "More realistically you'd want to expand existing partitions in the disk "
23776 "image by passing extra options (for the full list see the L</OPTIONS> "
23781 #: ../resize/virt-resize.pod:142
23783 "L</--expand> is the most useful option. It expands the named partition "
23784 "within the disk to fill any extra space:"
23788 #: ../resize/virt-resize.pod:145
23791 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23796 #: ../resize/virt-resize.pod:147
23798 "(In this case, an extra partition is I<not> created at the end of the disk, "
23799 "because there will be no unused space)."
23803 #: ../resize/virt-resize.pod:150
23805 "L</--resize> is the other commonly used option. The following would "
23806 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23807 "rest of the available space:"
23811 #: ../resize/virt-resize.pod:154
23814 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23815 " indisk outdisk\n"
23820 #: ../resize/virt-resize.pod:157
23822 "If the expanded partition in the image contains a filesystem or LVM PV, then "
23823 "if virt-resize knows how, it will resize the contents, the equivalent of "
23824 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23825 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23826 "filesystems, so you would have to online resize them after booting the "
23831 #: ../resize/virt-resize.pod:164
23832 msgid "Other options are covered below."
23836 #: ../resize/virt-resize.pod:166
23841 #: ../resize/virt-resize.pod:168
23842 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23846 #: ../resize/virt-resize.pod:170
23847 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23851 #: ../resize/virt-resize.pod:172
23854 " # virsh edit guestname\n"
23859 #: ../resize/virt-resize.pod:174
23861 "Change E<lt>source ...E<gt>, see "
23862 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
23866 #: ../resize/virt-resize.pod:177
23867 msgid "Then start up the domain with the new, resized disk:"
23871 #: ../resize/virt-resize.pod:179
23874 " # virsh start guestname\n"
23879 #: ../resize/virt-resize.pod:181
23881 "and check that it still works. See also the L</NOTES> section below for "
23882 "additional information."
23886 #: ../resize/virt-resize.pod:184
23887 msgid "7. Resize LVs etc inside the guest"
23891 #: ../resize/virt-resize.pod:186
23892 msgid "(This can also be done offline using L<guestfish(1)>)"
23896 #: ../resize/virt-resize.pod:188
23898 "Once the guest has booted you should see the new space available, at least "
23899 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23900 "may need to resize LVs inside PVs, and also resize filesystem types that "
23901 "virt-resize does not know how to expand."
23905 #: ../resize/virt-resize.pod:195
23906 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23910 #: ../resize/virt-resize.pod:197
23912 "Shrinking is somewhat more complex than expanding, and only an overview is "
23917 #: ../resize/virt-resize.pod:200
23919 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23920 "filesystems). The user has to shrink content before passing the disk image "
23921 "to virt-resize, and virt-resize will check that the content has been shrunk "
23926 #: ../resize/virt-resize.pod:205
23927 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23931 #: ../resize/virt-resize.pod:207
23933 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23934 "steps 3 and 4 above to allocate a new disk image."
23938 #: ../resize/virt-resize.pod:210
23939 msgid "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23943 #: ../resize/virt-resize.pod:213
23944 msgid "IGNORING OR DELETING PARTITIONS"
23948 #: ../resize/virt-resize.pod:215
23950 "virt-resize also gives a convenient way to ignore or delete partitions when "
23951 "copying from the input disk to the output disk. Ignoring a partition speeds "
23952 "up the copy where you don't care about the existing contents of a "
23953 "partition. Deleting a partition removes it completely, but note that it "
23954 "also renumbers any partitions after the one which is deleted, which can "
23955 "leave some guests unbootable."
23959 #: ../resize/virt-resize.pod:222
23960 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23964 #: ../resize/virt-resize.pod:224
23966 "If the input disk is in qcow2 format, then you may prefer that the output is "
23967 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23968 "the fly. The output format is simply determined by the format of the empty "
23969 "output container that you provide. Thus to create qcow2 output, use:"
23973 #: ../resize/virt-resize.pod:230
23976 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23981 #: ../resize/virt-resize.pod:232
23982 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23986 #: ../resize/virt-resize.pod:234
23987 msgid "Similarly, to get non-sparse raw output use:"
23991 #: ../resize/virt-resize.pod:236
23994 " fallocate -l size outdisk\n"
23999 #: ../resize/virt-resize.pod:238
24001 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
24002 "if=/dev/zero of=outdisk bs=1M count=..>)"
24006 #: ../resize/virt-resize.pod:241
24007 msgid "LOGICAL PARTITIONS"
24011 #: ../resize/virt-resize.pod:243
24013 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
24014 "tables) cannot be resized."
24018 #: ../resize/virt-resize.pod:246
24020 "To understand what is going on, firstly one of the four partitions "
24021 "C</dev/sda1-4> will have MBR partition type C<05> or C<0f>. This is called "
24022 "the B<extended partition>. Use L<virt-filesystems(1)> to see the MBR "
24027 #: ../resize/virt-resize.pod:251
24028 msgid "Logical partitions live inside the extended partition."
24032 #: ../resize/virt-resize.pod:253
24034 "The extended partition can be expanded, but not shrunk (unless you force it, "
24035 "which is not advisable). When the extended partition is copied across, all "
24036 "the logical partitions contained inside are copied over implicitly. "
24037 "Virt-resize does not look inside the extended partition, so it copies the "
24038 "logical partitions blindly."
24042 #: ../resize/virt-resize.pod:259
24044 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
24045 "line. Doing so will give an error."
24049 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
24050 msgid "Display help."
24054 #: ../resize/virt-resize.pod:270
24055 msgid "B<--align-first auto>"
24059 #: ../resize/virt-resize.pod:272
24060 msgid "B<--align-first never>"
24064 #: ../resize/virt-resize.pod:274
24065 msgid "B<--align-first always>"
24069 #: ../resize/virt-resize.pod:276
24071 "Align the first partition for improved performance (see also the "
24072 "I<--alignment> option)."
24076 #: ../resize/virt-resize.pod:279
24078 "The default is I<--align-first auto> which only aligns the first partition "
24079 "if it is safe to do so. That is, only when we know how to fix the "
24080 "bootloader automatically, and at the moment that can only be done for "
24085 #: ../resize/virt-resize.pod:284
24087 "I<--align-first never> means we never move the first partition. This is the "
24088 "safest option. Try this if the guest does not boot after resizing."
24092 #: ../resize/virt-resize.pod:288
24094 "I<--align-first always> means we always align the first partition (if it "
24095 "needs to be aligned). For some guests this will break the bootloader, "
24096 "making the guest unbootable."
24100 #: ../resize/virt-resize.pod:292
24101 msgid "B<--alignment N>"
24105 #: ../resize/virt-resize.pod:294
24107 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
24108 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
24112 #: ../resize/virt-resize.pod:298
24114 "Assuming 512 byte sector size inside the guest, here are some suitable "
24119 #: ../resize/virt-resize.pod:303
24120 msgid "I<--alignment 1> (512 bytes)"
24124 #: ../resize/virt-resize.pod:305
24126 "The partitions would be packed together as closely as possible, but would be "
24127 "completely unaligned. In some cases this can cause very poor performance. "
24128 "See L<virt-alignment-scan(1)> for further details."
24132 #: ../resize/virt-resize.pod:309
24133 msgid "I<--alignment 8> (4K)"
24137 #: ../resize/virt-resize.pod:311
24139 "This would be the minimum acceptable alignment for reasonable performance on "
24144 #: ../resize/virt-resize.pod:314
24145 msgid "I<--alignment 128> (64K)"
24149 #: ../resize/virt-resize.pod:316
24151 "This alignment provides good performance when the host is using high end "
24156 #: ../resize/virt-resize.pod:319
24157 msgid "I<--alignment 2048> (1M)"
24161 #: ../resize/virt-resize.pod:321
24163 "This is the standard alignment used by all newly installed guests since "
24168 #: ../resize/virt-resize.pod:326
24173 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:120
24178 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
24179 msgid "Enable debugging messages."
24183 #: ../resize/virt-resize.pod:332 ../sparsify/virt-sparsify.pod:131
24184 msgid "B<--debug-gc>"
24188 #: ../resize/virt-resize.pod:334
24190 "Debug garbage collection and memory allocation. This is only useful when "
24191 "debugging memory problems in virt-resize or the OCaml libguestfs bindings."
24195 #: ../resize/virt-resize.pod:338
24196 msgid "B<--delete part>"
24200 #: ../resize/virt-resize.pod:340
24202 "Delete the named partition. It would be more accurate to describe this as "
24203 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
24204 "the original disk image is left intact."
24208 #: ../resize/virt-resize.pod:344
24210 "Note that when you delete a partition, then anything contained in the "
24211 "partition is also deleted. Furthermore, this causes any partitions that "
24212 "come after to be I<renumbered>, which can easily make your guest unbootable."
24216 #: ../resize/virt-resize.pod:349 ../resize/virt-resize.pod:410 ../resize/virt-resize.pod:537 ../sparsify/virt-sparsify.pod:157
24217 msgid "You can give this option multiple times."
24221 #: ../resize/virt-resize.pod:351
24222 msgid "B<--expand part>"
24226 #: ../resize/virt-resize.pod:353
24228 "Expand the named partition so it uses up all extra space (space left over "
24229 "after any other resize changes that you request have been done)."
24233 #: ../resize/virt-resize.pod:356
24235 "If virt-resize knows how, it will expand the direct content of the "
24236 "partition. For example, if the partition is an LVM PV, it will expand the "
24237 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
24238 "content it doesn't know about alone."
24242 #: ../resize/virt-resize.pod:361
24243 msgid "Currently virt-resize can resize:"
24247 #: ../resize/virt-resize.pod:367
24248 msgid "ext2, ext3 and ext4 filesystems."
24252 #: ../resize/virt-resize.pod:371
24253 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
24257 #: ../resize/virt-resize.pod:373
24259 "The filesystem must have been shut down consistently last time it was used. "
24260 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
24261 "consistency check, so at the first boot after resizing Windows will check "
24266 #: ../resize/virt-resize.pod:380
24268 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
24269 "inside the PV, but see the I<--LV-expand> option. The user could also "
24270 "resize LVs as desired after boot."
24274 #: ../resize/virt-resize.pod:386
24275 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
24279 #: ../resize/virt-resize.pod:390 ../resize/virt-resize.pod:565
24280 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
24284 #: ../resize/virt-resize.pod:392 ../sparsify/virt-sparsify.pod:137 ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
24285 msgid "B<--format> raw"
24289 #: ../resize/virt-resize.pod:394 ../sparsify/virt-sparsify.pod:141
24291 "Specify the format of the input disk image. If this flag is not given then "
24292 "it is auto-detected from the image itself."
24296 #: ../resize/virt-resize.pod:400
24298 "Note that this option I<does not> affect the output format. See L</QCOW2 "
24299 "AND NON-SPARSE RAW FORMATS>."
24303 #: ../resize/virt-resize.pod:403
24304 msgid "B<--ignore part>"
24308 #: ../resize/virt-resize.pod:405
24310 "Ignore the named partition. Effectively this means the partition is "
24311 "allocated on the destination disk, but the content is not copied across from "
24312 "the source disk. The content of the partition will be blank (all zero "
24317 #: ../resize/virt-resize.pod:412
24318 msgid "B<--LV-expand logvol>"
24322 #: ../resize/virt-resize.pod:414
24324 "This takes the logical volume and, as a final step, expands it to fill all "
24325 "the space available in its volume group. A typical usage, assuming a Linux "
24326 "guest with a single PV C</dev/sda2> and a root device called "
24327 "C</dev/vg_guest/lv_root> would be:"
24331 #: ../resize/virt-resize.pod:419
24334 " virt-resize indisk outdisk \\\n"
24335 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
24340 #: ../resize/virt-resize.pod:422
24342 "This would first expand the partition (and PV), and then expand the root "
24343 "device to fill the extra space in the PV."
24347 #: ../resize/virt-resize.pod:425
24349 "The contents of the LV are also resized if virt-resize knows how to do "
24350 "that. You can stop virt-resize from trying to expand the content by using "
24351 "the option I<--no-expand-content>."
24355 #: ../resize/virt-resize.pod:429
24356 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
24360 #: ../resize/virt-resize.pod:431
24362 "You can give this option multiple times, I<but> it doesn't make sense to do "
24363 "this unless the logical volumes you specify are all in different volume "
24368 #: ../resize/virt-resize.pod:435 ../sparsify/virt-sparsify.pod:159
24369 msgid "B<--machine-readable>"
24373 #: ../resize/virt-resize.pod:437 ../sparsify/virt-sparsify.pod:161
24375 "This option is used to make the output more machine friendly when being "
24376 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
24380 #: ../resize/virt-resize.pod:443
24381 msgid "B<--dryrun>"
24385 #: ../resize/virt-resize.pod:445
24386 msgid "Print a summary of what would be done, but don't do anything."
24390 #: ../resize/virt-resize.pod:447
24391 msgid "B<--no-copy-boot-loader>"
24395 #: ../resize/virt-resize.pod:449
24397 "By default, virt-resize copies over some sectors at the start of the disk "
24398 "(up to the beginning of the first partition). Commonly these sectors "
24399 "contain the Master Boot Record (MBR) and the boot loader, and are required "
24400 "in order for the guest to boot correctly."
24404 #: ../resize/virt-resize.pod:454
24406 "If you specify this flag, then this initial copy is not done. You may need "
24407 "to reinstall the boot loader in this case."
24411 #: ../resize/virt-resize.pod:457
24412 msgid "B<--no-extra-partition>"
24416 #: ../resize/virt-resize.pod:459
24418 "By default, virt-resize creates an extra partition if there is any extra, "
24419 "unused space after all resizing has happened. Use this option to prevent "
24420 "the extra partition from being created. If you do this then the extra space "
24421 "will be inaccessible until you run fdisk, parted, or some other partitioning "
24422 "tool in the guest."
24426 #: ../resize/virt-resize.pod:465
24428 "Note that if the surplus space is smaller than 10 MB, no extra partition "
24433 #: ../resize/virt-resize.pod:468
24434 msgid "B<--no-expand-content>"
24438 #: ../resize/virt-resize.pod:470
24440 "By default, virt-resize will try to expand the direct contents of "
24441 "partitions, if it knows how (see I<--expand> option above)."
24445 #: ../resize/virt-resize.pod:473
24447 "If you give the I<--no-expand-content> option then virt-resize will not "
24452 #: ../resize/virt-resize.pod:476
24453 msgid "B<--ntfsresize-force>"
24457 #: ../resize/virt-resize.pod:478
24459 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
24460 "the NTFS disk is marked as needing a consistency check. You have to use "
24461 "this option if you want to resize a Windows guest multiple times without "
24462 "booting into Windows between each resize."
24466 #: ../resize/virt-resize.pod:484
24467 msgid "B<--output-format> raw"
24471 #: ../resize/virt-resize.pod:486
24473 "Specify the format of the output disk image. If this flag is not given then "
24474 "it is auto-detected from the image itself."
24478 #: ../resize/virt-resize.pod:492
24480 "Note that this option I<does not create> the output format. This option "
24481 "just tells libguestfs what it is so it doesn't try to guess it. You still "
24482 "need to create the output disk with the right format. See L</QCOW2 AND "
24483 "NON-SPARSE RAW FORMATS>."
24487 #: ../resize/virt-resize.pod:501
24488 msgid "Don't print the summary."
24492 #: ../resize/virt-resize.pod:503
24493 msgid "B<--resize part=size>"
24497 #: ../resize/virt-resize.pod:505
24499 "Resize the named partition (expanding or shrinking it) so that it has the "
24504 #: ../resize/virt-resize.pod:508
24506 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
24507 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
24508 "size; or as a relative number or percentage. For example:"
24512 #: ../resize/virt-resize.pod:514
24515 " --resize /dev/sda2=10G\n"
24520 #: ../resize/virt-resize.pod:516
24523 " --resize /dev/sda4=90%\n"
24528 #: ../resize/virt-resize.pod:518
24531 " --resize /dev/sda2=+1G\n"
24536 #: ../resize/virt-resize.pod:520
24539 " --resize /dev/sda2=-200M\n"
24544 #: ../resize/virt-resize.pod:522
24547 " --resize /dev/sda1=+128K\n"
24552 #: ../resize/virt-resize.pod:524
24555 " --resize /dev/sda1=+10%\n"
24560 #: ../resize/virt-resize.pod:526
24563 " --resize /dev/sda1=-10%\n"
24568 #: ../resize/virt-resize.pod:528
24570 "You can increase the size of any partition. Virt-resize will expand the "
24571 "direct content of the partition if it knows how (see I<--expand> below)."
24575 #: ../resize/virt-resize.pod:532
24577 "You can only I<decrease> the size of partitions that contain filesystems or "
24578 "PVs which have already been shrunk. Virt-resize will check this has been "
24579 "done before proceeding, or else will print an error (see also "
24580 "I<--resize-force>)."
24584 #: ../resize/virt-resize.pod:539
24585 msgid "B<--resize-force part=size>"
24589 #: ../resize/virt-resize.pod:541
24591 "This is the same as I<--resize> except that it will let you decrease the "
24592 "size of any partition. Generally this means you will lose any data which "
24593 "was at the end of the partition you shrink, but you may not care about that "
24594 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24595 "as a swap partition)."
24599 #: ../resize/virt-resize.pod:547
24600 msgid "See also the I<--ignore> option."
24604 #: ../resize/virt-resize.pod:549
24605 msgid "B<--shrink part>"
24609 #: ../resize/virt-resize.pod:551
24611 "Shrink the named partition until the overall disk image fits in the "
24612 "destination. The named partition B<must> contain a filesystem or PV which "
24613 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24614 "online tools). Virt-resize will check this and give an error if it has not "
24619 #: ../resize/virt-resize.pod:557
24621 "The amount by which the overall disk must be shrunk (after carrying out all "
24622 "other operations requested by the user) is called the \"deficit\". For "
24623 "example, a straight copy (assume no other operations) from a 5GB disk image "
24624 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24625 "would give an error unless the user specified a partition to shrink and that "
24626 "partition had more than a gigabyte of free space."
24630 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:201
24631 msgid "MACHINE READABLE OUTPUT"
24635 #: ../resize/virt-resize.pod:577
24637 "The I<--machine-readable> option can be used to make the output more machine "
24638 "friendly, which is useful when calling virt-resize from other programs, GUIs "
24643 #: ../resize/virt-resize.pod:581 ../sparsify/virt-sparsify.pod:207
24644 msgid "There are two ways to use this option."
24648 #: ../resize/virt-resize.pod:583
24650 "Firstly use the option on its own to query the capabilities of the "
24651 "virt-resize binary. Typical output looks like this:"
24655 #: ../resize/virt-resize.pod:586
24658 " $ virt-resize --machine-readable\n"
24660 " ntfsresize-force\n"
24668 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:217
24670 "A list of features is printed, one per line, and the program exits with "
24675 #: ../resize/virt-resize.pod:596 ../sparsify/virt-sparsify.pod:220
24677 "Secondly use the option in conjunction with other options to make the "
24678 "regular program output more machine friendly."
24682 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:223
24683 msgid "At the moment this means:"
24687 #: ../resize/virt-resize.pod:605 ../sparsify/virt-sparsify.pod:229
24689 "Progress bar messages can be parsed from stdout by looking for this regular "
24694 #: ../resize/virt-resize.pod:608 ../sparsify/virt-sparsify.pod:232
24697 " ^[0-9]+/[0-9]+$\n"
24702 #: ../resize/virt-resize.pod:612 ../sparsify/virt-sparsify.pod:236
24704 "The calling program should treat messages sent to stdout (except for "
24705 "progress bar messages) as status messages. They can be logged and/or "
24706 "displayed to the user."
24710 #: ../resize/virt-resize.pod:618
24712 "The calling program should treat messages sent to stderr as error messages. "
24713 "In addition, virt-resize exits with a non-zero status code if there was a "
24718 #: ../resize/virt-resize.pod:624
24720 "Versions of the program prior to 1.13.9 did not support the "
24721 "I<--machine-readable> option and will return an error."
24725 #: ../resize/virt-resize.pod:629
24726 msgid "\"Partition 1 does not end on cylinder boundary.\""
24730 #: ../resize/virt-resize.pod:631
24732 "Virt-resize aligns partitions to multiples of 128 sectors (see the "
24733 "I<--alignment> parameter). Usually this means the partitions will not be "
24734 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24735 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
24736 "drives. Alignment of partitions to cylinders is not required by any modern "
24737 "operating system."
24741 #: ../resize/virt-resize.pod:638
24742 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24746 #: ../resize/virt-resize.pod:640
24748 "In Windows Vista and later versions, Microsoft switched to using a separate "
24749 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24750 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24751 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24752 "the second partition (ie. C: drive) should work."
24756 #: ../resize/virt-resize.pod:647
24758 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24759 "NTFS partitions have been expanded. This is just a safety check and (unless "
24760 "it find errors) is nothing to worry about."
24764 #: ../resize/virt-resize.pod:651
24765 msgid "GUEST BOOT STUCK AT \"GRUB\""
24769 #: ../resize/virt-resize.pod:653
24771 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24772 "printing C<GRUB> on the console, try reinstalling grub."
24776 #: ../resize/virt-resize.pod:656
24779 " guestfish -i -a newdisk\n"
24780 " ><fs> cat /boot/grub/device.map\n"
24781 " # check the contents of this file are sensible or\n"
24782 " # edit the file if necessary\n"
24783 " ><fs> grub-install / /dev/vda\n"
24789 #: ../resize/virt-resize.pod:663
24791 "For more flexible guest reconfiguration, including if you need to specify "
24792 "other parameters to grub-install, use L<virt-rescue(1)>."
24796 #: ../resize/virt-resize.pod:666
24797 msgid "ALTERNATIVE TOOLS"
24801 #: ../resize/virt-resize.pod:668
24803 "There are several proprietary tools for resizing partitions. We won't "
24804 "mention any here."
24808 #: ../resize/virt-resize.pod:671
24810 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24811 "operations on disk images. They can resize and move partitions, but I don't "
24812 "think they can do anything with the contents, and they certainly don't "
24817 #: ../resize/virt-resize.pod:676
24819 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24820 "but at a much lower level. You will probably end up hand-calculating sector "
24821 "offsets, which is something that virt-resize was designed to avoid. If you "
24822 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24827 #: ../resize/virt-resize.pod:696
24829 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
24830 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
24831 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
24832 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
24833 "L<virt-sparsify(1)>, L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24837 #: ../ruby/examples/guestfs-ruby.pod:5
24838 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24842 #: ../ruby/examples/guestfs-ruby.pod:9
24845 " require 'guestfs'\n"
24846 " g = Guestfs::Guestfs.new()\n"
24847 " g.add_drive_opts(\"disk.img\",\n"
24848 " :readonly => 1, :format => \"raw\")\n"
24854 #: ../ruby/examples/guestfs-ruby.pod:17
24856 "This manual page documents how to call libguestfs from the Ruby programming "
24857 "language. This page just documents the differences from the C API and gives "
24858 "some examples. If you are not familiar with using libguestfs, you also need "
24859 "to read L<guestfs(3)>."
24863 #: ../ruby/examples/guestfs-ruby.pod:24
24865 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24866 "This has a single parameter which is the error message (a string)."
24870 #: ../ruby/examples/guestfs-ruby.pod:38
24872 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
24873 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
24874 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24878 #: ../sparsify/virt-sparsify.pod:5
24879 msgid "virt-sparsify - Make a virtual machine disk sparse"
24883 #: ../sparsify/virt-sparsify.pod:9
24886 " virt-sparsify [--options] indisk outdisk\n"
24891 #: ../sparsify/virt-sparsify.pod:13
24893 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24894 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24895 "the disk image can be converted back to free space on the host."
24899 #: ../sparsify/virt-sparsify.pod:18
24901 "Virt-sparsify can locate and sparsify free space in most filesystems "
24902 "(eg. ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24906 #: ../sparsify/virt-sparsify.pod:21
24908 "Virt-sparsify can also convert between some disk formats, for example "
24909 "converting a raw disk image to a thin-provisioned qcow2 image."
24913 #: ../sparsify/virt-sparsify.pod:24
24915 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24916 "machines. If a virtual machine has more than one attached disk, you must "
24917 "sparsify each one separately."
24921 #: ../sparsify/virt-sparsify.pod:28
24922 msgid "IMPORTANT LIMITATIONS"
24926 #: ../sparsify/virt-sparsify.pod:34
24928 "Virt-sparsify does not do in-place modifications. It copies from a source "
24929 "image to a destination image, leaving the source unchanged. I<Check that "
24930 "the sparsification was successful before deleting the source image>."
24934 #: ../sparsify/virt-sparsify.pod:41
24935 msgid "The virtual machine I<must be shut down> before using this tool."
24939 #: ../sparsify/virt-sparsify.pod:45
24941 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24942 "(1 temporary copy + 1 destination image). This is in the worst case and "
24943 "usually much less space is required."
24947 #: ../sparsify/virt-sparsify.pod:51
24948 msgid "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24952 #: ../sparsify/virt-sparsify.pod:56
24953 msgid "Virt-sparsify cannot handle encrypted disks."
24957 #: ../sparsify/virt-sparsify.pod:60
24959 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24960 "this space is often used for critical items like bootloaders so it's not "
24965 #: ../sparsify/virt-sparsify.pod:66
24967 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24968 "to do this unless we can be sure there is no hibernation data, so at the "
24969 "moment swap partitions are ignored."
24973 #: ../sparsify/virt-sparsify.pod:72
24975 "You may also want to read the manual pages for the associated tools "
24976 "L<virt-filesystems(1)> and L<virt-df(1)> before starting."
24980 #: ../sparsify/virt-sparsify.pod:77
24981 msgid "Typical usage is:"
24985 #: ../sparsify/virt-sparsify.pod:79
24988 " virt-sparsify indisk outdisk\n"
24993 #: ../sparsify/virt-sparsify.pod:81
24995 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24996 "is created, or overwritten if it already exists. The format of the input "
24997 "disk is detected (eg. qcow2) and the same format is used for the output "
25002 #: ../sparsify/virt-sparsify.pod:86
25003 msgid "To convert between formats, use the I<--convert> option:"
25007 #: ../sparsify/virt-sparsify.pod:88
25010 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
25015 #: ../sparsify/virt-sparsify.pod:90
25017 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
25018 "can find within the source disk image. You can get it to ignore (don't zero "
25019 "free space on) certain filesystems by doing:"
25023 #: ../sparsify/virt-sparsify.pod:94
25026 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
25031 #: ../sparsify/virt-sparsify.pod:96
25032 msgid "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
25036 #: ../sparsify/virt-sparsify.pod:107
25037 msgid "B<--compress>"
25041 #: ../sparsify/virt-sparsify.pod:109
25043 "Compress the output file. This I<only> works if the output format is "
25048 #: ../sparsify/virt-sparsify.pod:112
25049 msgid "B<--convert> raw"
25053 #: ../sparsify/virt-sparsify.pod:114
25054 msgid "B<--convert> qcow2"
25058 #: ../sparsify/virt-sparsify.pod:116
25059 msgid "B<--convert> [other formats]"
25063 #: ../sparsify/virt-sparsify.pod:118
25065 "Use C<output-format> as the format for the destination image. If this is "
25066 "not specified, then the input format is used."
25070 #: ../sparsify/virt-sparsify.pod:121
25071 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>, C<vdi>."
25075 #: ../sparsify/virt-sparsify.pod:123
25077 "You can also use any format supported by the L<qemu-img(1)> program, "
25078 "eg. C<vmdk>, but support for other formats is reliant on qemu."
25082 #: ../sparsify/virt-sparsify.pod:126
25084 "Specifying the I<--convert> option is usually a good idea, because then "
25085 "virt-sparsify doesn't need to try to guess the input format."
25089 #: ../sparsify/virt-sparsify.pod:129
25090 msgid "For fine-tuning the output format, see: I<--compress>, I<-o>."
25094 #: ../sparsify/virt-sparsify.pod:133
25096 "Debug garbage collection and memory allocation. This is only useful when "
25097 "debugging memory problems in virt-sparsify or the OCaml libguestfs bindings."
25101 #: ../sparsify/virt-sparsify.pod:139
25102 msgid "B<--format> qcow2"
25106 #: ../sparsify/virt-sparsify.pod:147
25107 msgid "B<--ignore> filesystem"
25111 #: ../sparsify/virt-sparsify.pod:149
25112 msgid "B<--ignore> volgroup"
25116 #: ../sparsify/virt-sparsify.pod:151
25118 "Ignore the named filesystem. Free space on the filesystem will not be "
25119 "zeroed, but existing blocks of zeroes will still be sparsified."
25123 #: ../sparsify/virt-sparsify.pod:154
25125 "In the second form, this ignores the named volume group. Use the volume "
25126 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
25130 #: ../sparsify/virt-sparsify.pod:165
25131 msgid "B<-o> option[,option,...]"
25135 #: ../sparsify/virt-sparsify.pod:167
25137 "Pass I<-o> option(s) to the L<qemu-img(1)> command to fine-tune the output "
25138 "format. Options available depend on the output format (see I<--convert>) "
25139 "and the installed version of the qemu-img program."
25143 #: ../sparsify/virt-sparsify.pod:171
25145 "You should use I<-o> at most once. To pass multiple options, separate them "
25150 #: ../sparsify/virt-sparsify.pod:174
25153 " virt-sparsify --convert qcow2 \\\n"
25154 " -o cluster_size=512,preallocation=metadata ...\n"
25159 #: ../sparsify/virt-sparsify.pod:181
25160 msgid "This disables progress bars and other unnecessary output."
25164 #: ../sparsify/virt-sparsify.pod:203
25166 "The I<--machine-readable> option can be used to make the output more machine "
25167 "friendly, which is useful when calling virt-sparsify from other programs, "
25172 #: ../sparsify/virt-sparsify.pod:209
25174 "Firstly use the option on its own to query the capabilities of the "
25175 "virt-sparsify binary. Typical output looks like this:"
25179 #: ../sparsify/virt-sparsify.pod:212
25182 " $ virt-sparsify --machine-readable\n"
25190 #: ../sparsify/virt-sparsify.pod:242
25192 "The calling program should treat messages sent to stderr as error messages. "
25193 "In addition, virt-sparsify exits with a non-zero status code if there was a "
25198 #: ../sparsify/virt-sparsify.pod:248
25200 "All versions of virt-sparsify have supported the I<--machine-readable> "
25205 #: ../sparsify/virt-sparsify.pod:262
25207 "Location of the temporary directory used for the potentially large temporary "
25212 #: ../sparsify/virt-sparsify.pod:265
25214 "You should ensure there is enough free space in the worst case for a full "
25215 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
25216 "to another directory that has enough space."
25220 #: ../sparsify/virt-sparsify.pod:269
25221 msgid "This defaults to C</tmp>."
25225 #: ../sparsify/virt-sparsify.pod:273
25226 msgid "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
25230 #: ../sparsify/virt-sparsify.pod:277
25232 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
25233 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, "
25234 "L<qemu-img(1)>, L<http://libguestfs.org/>."
25238 #: ../src/guestfs-actions.pod:1
25239 msgid "guestfs_add_cdrom"
25243 #: ../src/guestfs-actions.pod:3
25247 " guestfs_add_cdrom (guestfs_h *g,\n"
25248 " const char *filename);\n"
25253 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:323
25255 "I<This function is deprecated.> In new code, use the "
25256 "L</guestfs_add_drive_opts> call instead."
25260 #: ../src/guestfs-actions.pod:24
25262 "This call checks for the existence of C<filename>. This stops you from "
25263 "specifying other types of drive which are supported by qemu such as C<nbd:> "
25264 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
25269 #: ../src/guestfs-actions.pod:31
25271 "If you just want to add an ISO file (often you use this as an efficient way "
25272 "to transfer large files into the guest), then you should probably use "
25273 "C<guestfs_add_drive_ro> instead."
25277 #: ../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:773 ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:904 ../src/guestfs-actions.pod:918 ../src/guestfs-actions.pod:955 ../src/guestfs-actions.pod:1138 ../src/guestfs-actions.pod:1158 ../src/guestfs-actions.pod:1176 ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1325 ../src/guestfs-actions.pod:1371 ../src/guestfs-actions.pod:1411 ../src/guestfs-actions.pod:1464 ../src/guestfs-actions.pod:1517 ../src/guestfs-actions.pod:1575 ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1648 ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1690 ../src/guestfs-actions.pod:1760 ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:1816 ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:1971 ../src/guestfs-actions.pod:1998 ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2235 ../src/guestfs-actions.pod:2322 ../src/guestfs-actions.pod:2830 ../src/guestfs-actions.pod:2974 ../src/guestfs-actions.pod:3035 ../src/guestfs-actions.pod:3070 ../src/guestfs-actions.pod:4131 ../src/guestfs-actions.pod:4146 ../src/guestfs-actions.pod:4171 ../src/guestfs-actions.pod:4373 ../src/guestfs-actions.pod:4387 ../src/guestfs-actions.pod:4400 ../src/guestfs-actions.pod:4414 ../src/guestfs-actions.pod:4429 ../src/guestfs-actions.pod:4465 ../src/guestfs-actions.pod:4537 ../src/guestfs-actions.pod:4557 ../src/guestfs-actions.pod:4574 ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4614 ../src/guestfs-actions.pod:4649 ../src/guestfs-actions.pod:4668 ../src/guestfs-actions.pod:4687 ../src/guestfs-actions.pod:4722 ../src/guestfs-actions.pod:4734 ../src/guestfs-actions.pod:4767 ../src/guestfs-actions.pod:4783 ../src/guestfs-actions.pod:4796 ../src/guestfs-actions.pod:4811 ../src/guestfs-actions.pod:4828 ../src/guestfs-actions.pod:4986 ../src/guestfs-actions.pod:5060 ../src/guestfs-actions.pod:5070 ../src/guestfs-actions.pod:5090 ../src/guestfs-actions.pod:5103 ../src/guestfs-actions.pod:5154 ../src/guestfs-actions.pod:5172 ../src/guestfs-actions.pod:5190 ../src/guestfs-actions.pod:5206 ../src/guestfs-actions.pod:5220 ../src/guestfs-actions.pod:5234 ../src/guestfs-actions.pod:5251 ../src/guestfs-actions.pod:5266 ../src/guestfs-actions.pod:5293 ../src/guestfs-actions.pod:5356 ../src/guestfs-actions.pod:5429 ../src/guestfs-actions.pod:5460 ../src/guestfs-actions.pod:5479 ../src/guestfs-actions.pod:5498 ../src/guestfs-actions.pod:5510 ../src/guestfs-actions.pod:5527 ../src/guestfs-actions.pod:5540 ../src/guestfs-actions.pod:5555 ../src/guestfs-actions.pod:5570 ../src/guestfs-actions.pod:5602 ../src/guestfs-actions.pod:5628 ../src/guestfs-actions.pod:5667 ../src/guestfs-actions.pod:5687 ../src/guestfs-actions.pod:5701 ../src/guestfs-actions.pod:5718 ../src/guestfs-actions.pod:5767 ../src/guestfs-actions.pod:5820 ../src/guestfs-actions.pod:5867 ../src/guestfs-actions.pod:5910 ../src/guestfs-actions.pod:5938 ../src/guestfs-actions.pod:5955 ../src/guestfs-actions.pod:5973 ../src/guestfs-actions.pod:6110 ../src/guestfs-actions.pod:6167 ../src/guestfs-actions.pod:6189 ../src/guestfs-actions.pod:6207 ../src/guestfs-actions.pod:6259 ../src/guestfs-actions.pod:6325 ../src/guestfs-actions.pod:6342 ../src/guestfs-actions.pod:6355 ../src/guestfs-actions.pod:6369 ../src/guestfs-actions.pod:6658 ../src/guestfs-actions.pod:6677 ../src/guestfs-actions.pod:6696 ../src/guestfs-actions.pod:6710 ../src/guestfs-actions.pod:6722 ../src/guestfs-actions.pod:6736 ../src/guestfs-actions.pod:6748 ../src/guestfs-actions.pod:6762 ../src/guestfs-actions.pod:6778 ../src/guestfs-actions.pod:6796 ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:6834 ../src/guestfs-actions.pod:6864 ../src/guestfs-actions.pod:6882 ../src/guestfs-actions.pod:6905 ../src/guestfs-actions.pod:6923 ../src/guestfs-actions.pod:6942 ../src/guestfs-actions.pod:6963 ../src/guestfs-actions.pod:6982 ../src/guestfs-actions.pod:6999 ../src/guestfs-actions.pod:7018 ../src/guestfs-actions.pod:7046 ../src/guestfs-actions.pod:7070 ../src/guestfs-actions.pod:7089 ../src/guestfs-actions.pod:7105 ../src/guestfs-actions.pod:7129 ../src/guestfs-actions.pod:7148 ../src/guestfs-actions.pod:7163 ../src/guestfs-actions.pod:7182 ../src/guestfs-actions.pod:7226 ../src/guestfs-actions.pod:7253 ../src/guestfs-actions.pod:7283 ../src/guestfs-actions.pod:7395 ../src/guestfs-actions.pod:7516 ../src/guestfs-actions.pod:7528 ../src/guestfs-actions.pod:7541 ../src/guestfs-actions.pod:7554 ../src/guestfs-actions.pod:7576 ../src/guestfs-actions.pod:7589 ../src/guestfs-actions.pod:7602 ../src/guestfs-actions.pod:7615 ../src/guestfs-actions.pod:7630 ../src/guestfs-actions.pod:7689 ../src/guestfs-actions.pod:7706 ../src/guestfs-actions.pod:7722 ../src/guestfs-actions.pod:7738 ../src/guestfs-actions.pod:7755 ../src/guestfs-actions.pod:7768 ../src/guestfs-actions.pod:7788 ../src/guestfs-actions.pod:7888 ../src/guestfs-actions.pod:7946 ../src/guestfs-actions.pod:7960 ../src/guestfs-actions.pod:8001 ../src/guestfs-actions.pod:8014 ../src/guestfs-actions.pod:8032 ../src/guestfs-actions.pod:8066 ../src/guestfs-actions.pod:8102 ../src/guestfs-actions.pod:8218 ../src/guestfs-actions.pod:8233 ../src/guestfs-actions.pod:8247 ../src/guestfs-actions.pod:8302 ../src/guestfs-actions.pod:8315 ../src/guestfs-actions.pod:8360 ../src/guestfs-actions.pod:8400 ../src/guestfs-actions.pod:8456 ../src/guestfs-actions.pod:8476 ../src/guestfs-actions.pod:8509 ../src/guestfs-actions.pod:8573 ../src/guestfs-actions.pod:8596 ../src/guestfs-actions.pod:8622
25278 msgid "This function returns 0 on success or -1 on error."
25282 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189 ../src/guestfs-actions.pod:1373 ../src/guestfs-actions.pod:2436 ../src/guestfs-actions.pod:2534 ../src/guestfs-actions.pod:2659 ../src/guestfs-actions.pod:4133 ../src/guestfs-actions.pod:4153 ../src/guestfs-actions.pod:5604 ../src/guestfs-actions.pod:6884 ../src/guestfs-actions.pod:7001 ../src/guestfs-actions.pod:7150 ../src/guestfs-actions.pod:7632 ../src/guestfs-actions.pod:7757 ../src/guestfs-actions.pod:8402
25283 msgid "(Added in 0.3)"
25287 #: ../src/guestfs-actions.pod:41
25288 msgid "guestfs_add_domain"
25292 #: ../src/guestfs-actions.pod:43
25296 " guestfs_add_domain (guestfs_h *g,\n"
25297 " const char *dom,\n"
25303 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198 ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:1253 ../src/guestfs-actions.pod:1305 ../src/guestfs-actions.pod:1383 ../src/guestfs-actions.pod:1452 ../src/guestfs-actions.pod:1505 ../src/guestfs-actions.pod:1558 ../src/guestfs-actions.pod:3327 ../src/guestfs-actions.pod:4921 ../src/guestfs-actions.pod:5305 ../src/guestfs-actions.pod:5614 ../src/guestfs-actions.pod:5831 ../src/guestfs-actions.pod:7799
25305 "You may supply a list of optional arguments to this call. Use zero or more "
25306 "of the following pairs of parameters, and terminate the list with C<-1> on "
25307 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
25311 #: ../src/guestfs-actions.pod:53
25314 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
25315 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
25316 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
25317 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
25318 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
25319 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
25324 #: ../src/guestfs-actions.pod:60
25326 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
25327 "It works by connecting to libvirt, requesting the domain and domain XML from "
25328 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
25333 #: ../src/guestfs-actions.pod:141
25335 "The other optional parameters are passed directly through to "
25336 "C<guestfs_add_drive_opts>."
25340 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403 ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:790 ../src/guestfs-actions.pod:821 ../src/guestfs-actions.pod:839 ../src/guestfs-actions.pod:858 ../src/guestfs-actions.pod:1836 ../src/guestfs-actions.pod:2192 ../src/guestfs-actions.pod:2395 ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:2557 ../src/guestfs-actions.pod:2609 ../src/guestfs-actions.pod:2623 ../src/guestfs-actions.pod:2646 ../src/guestfs-actions.pod:2961 ../src/guestfs-actions.pod:3445 ../src/guestfs-actions.pod:3463 ../src/guestfs-actions.pod:5790 ../src/guestfs-actions.pod:6007 ../src/guestfs-actions.pod:6245 ../src/guestfs-actions.pod:6439 ../src/guestfs-actions.pod:6465 ../src/guestfs-actions.pod:7987 ../src/guestfs-actions.pod:8413 ../src/guestfs-actions.pod:8426 ../src/guestfs-actions.pod:8439
25341 msgid "On error this function returns -1."
25345 #: ../src/guestfs-actions.pod:146
25346 msgid "(Added in 1.7.4)"
25350 #: ../src/guestfs-actions.pod:148
25351 msgid "guestfs_add_domain_va"
25355 #: ../src/guestfs-actions.pod:150
25359 " guestfs_add_domain_va (guestfs_h *g,\n"
25360 " const char *dom,\n"
25361 " va_list args);\n"
25366 #: ../src/guestfs-actions.pod:155
25367 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
25371 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168 ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:968 ../src/guestfs-actions.pod:979 ../src/guestfs-actions.pod:1281 ../src/guestfs-actions.pod:1294 ../src/guestfs-actions.pod:1340 ../src/guestfs-actions.pod:1353 ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1442 ../src/guestfs-actions.pod:1483 ../src/guestfs-actions.pod:1495 ../src/guestfs-actions.pod:1536 ../src/guestfs-actions.pod:1548 ../src/guestfs-actions.pod:1594 ../src/guestfs-actions.pod:1606 ../src/guestfs-actions.pod:3411 ../src/guestfs-actions.pod:3423 ../src/guestfs-actions.pod:4998 ../src/guestfs-actions.pod:5010 ../src/guestfs-actions.pod:5370 ../src/guestfs-actions.pod:5382 ../src/guestfs-actions.pod:5642 ../src/guestfs-actions.pod:5654 ../src/guestfs-actions.pod:5880 ../src/guestfs-actions.pod:5891 ../src/guestfs-actions.pod:7901 ../src/guestfs-actions.pod:7912
25372 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
25376 #: ../src/guestfs-actions.pod:159
25377 msgid "guestfs_add_domain_argv"
25381 #: ../src/guestfs-actions.pod:161
25385 " guestfs_add_domain_argv (guestfs_h *g,\n"
25386 " const char *dom,\n"
25387 " const struct guestfs_add_domain_argv *optargs);\n"
25392 #: ../src/guestfs-actions.pod:166
25393 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
25397 #: ../src/guestfs-actions.pod:170
25398 msgid "guestfs_add_drive"
25402 #: ../src/guestfs-actions.pod:172
25406 " guestfs_add_drive (guestfs_h *g,\n"
25407 " const char *filename);\n"
25412 #: ../src/guestfs-actions.pod:176
25414 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
25415 "optional parameters, so the disk is added writable, with the format being "
25416 "detected automatically."
25420 #: ../src/guestfs-actions.pod:180
25422 "Automatic detection of the format opens you up to a potential security hole "
25423 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
25424 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
25425 "you should think about replacing calls to this function with calls to "
25426 "C<guestfs_add_drive_opts>, and specifying the format."
25430 #: ../src/guestfs-actions.pod:191
25431 msgid "guestfs_add_drive_opts"
25435 #: ../src/guestfs-actions.pod:193
25439 " guestfs_add_drive_opts (guestfs_h *g,\n"
25440 " const char *filename,\n"
25446 #: ../src/guestfs-actions.pod:203
25449 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
25450 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
25451 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
25452 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
25457 #: ../src/guestfs-actions.pod:233
25459 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
25460 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
25461 "Possible formats include C<raw> and C<qcow2>."
25465 #: ../src/guestfs-actions.pod:244
25467 "This rarely-used option lets you emulate the behaviour of the deprecated "
25468 "C<guestfs_add_drive_with_if> call (q.v.)"
25472 #: ../src/guestfs-actions.pod:256
25473 msgid "(Added in 1.5.23)"
25477 #: ../src/guestfs-actions.pod:258
25478 msgid "guestfs_add_drive_opts_va"
25482 #: ../src/guestfs-actions.pod:260
25486 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
25487 " const char *filename,\n"
25488 " va_list args);\n"
25493 #: ../src/guestfs-actions.pod:265
25494 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
25498 #: ../src/guestfs-actions.pod:269
25499 msgid "guestfs_add_drive_opts_argv"
25503 #: ../src/guestfs-actions.pod:271
25507 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
25508 " const char *filename,\n"
25509 " const struct guestfs_add_drive_opts_argv "
25515 #: ../src/guestfs-actions.pod:276
25516 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
25520 #: ../src/guestfs-actions.pod:280
25521 msgid "guestfs_add_drive_ro"
25525 #: ../src/guestfs-actions.pod:282
25529 " guestfs_add_drive_ro (guestfs_h *g,\n"
25530 " const char *filename);\n"
25535 #: ../src/guestfs-actions.pod:286
25537 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
25538 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
25539 "disk is added read-only, with the format being detected automatically."
25543 #: ../src/guestfs-actions.pod:293
25544 msgid "(Added in 1.0.38)"
25548 #: ../src/guestfs-actions.pod:295
25549 msgid "guestfs_add_drive_ro_with_if"
25553 #: ../src/guestfs-actions.pod:297
25557 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
25558 " const char *filename,\n"
25559 " const char *iface);\n"
25564 #: ../src/guestfs-actions.pod:309
25566 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
25567 "QEMU interface emulation to use at run time."
25571 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335 ../src/guestfs-actions.pod:2920
25572 msgid "(Added in 1.0.84)"
25576 #: ../src/guestfs-actions.pod:316
25577 msgid "guestfs_add_drive_with_if"
25581 #: ../src/guestfs-actions.pod:318
25585 " guestfs_add_drive_with_if (guestfs_h *g,\n"
25586 " const char *filename,\n"
25587 " const char *iface);\n"
25592 #: ../src/guestfs-actions.pod:330
25594 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
25595 "QEMU interface emulation to use at run time."
25599 #: ../src/guestfs-actions.pod:337
25600 msgid "guestfs_aug_clear"
25604 #: ../src/guestfs-actions.pod:339
25608 " guestfs_aug_clear (guestfs_h *g,\n"
25609 " const char *augpath);\n"
25614 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2648
25615 msgid "(Added in 1.3.4)"
25619 #: ../src/guestfs-actions.pod:350
25620 msgid "guestfs_aug_close"
25624 #: ../src/guestfs-actions.pod:352
25628 " guestfs_aug_close (guestfs_h *g);\n"
25633 #: ../src/guestfs-actions.pod:355
25635 "Close the current Augeas handle and free up any resources used by it. After "
25636 "calling this, you have to call C<guestfs_aug_init> again before you can use "
25637 "any other Augeas functions."
25641 #: ../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:6516
25642 msgid "(Added in 0.7)"
25646 #: ../src/guestfs-actions.pod:364
25647 msgid "guestfs_aug_defnode"
25651 #: ../src/guestfs-actions.pod:366
25654 " struct guestfs_int_bool *\n"
25655 " guestfs_aug_defnode (guestfs_h *g,\n"
25656 " const char *name,\n"
25657 " const char *expr,\n"
25658 " const char *val);\n"
25663 #: ../src/guestfs-actions.pod:375
25665 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25666 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25667 "containing that single node."
25671 #: ../src/guestfs-actions.pod:383
25673 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25674 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25678 #: ../src/guestfs-actions.pod:389
25679 msgid "guestfs_aug_defvar"
25683 #: ../src/guestfs-actions.pod:391
25687 " guestfs_aug_defvar (guestfs_h *g,\n"
25688 " const char *name,\n"
25689 " const char *expr);\n"
25694 #: ../src/guestfs-actions.pod:407
25695 msgid "guestfs_aug_get"
25699 #: ../src/guestfs-actions.pod:409
25703 " guestfs_aug_get (guestfs_h *g,\n"
25704 " const char *augpath);\n"
25709 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:1019 ../src/guestfs-actions.pod:1037 ../src/guestfs-actions.pod:1097 ../src/guestfs-actions.pod:1113 ../src/guestfs-actions.pod:1216 ../src/guestfs-actions.pod:1705 ../src/guestfs-actions.pod:1722 ../src/guestfs-actions.pod:1741 ../src/guestfs-actions.pod:1875 ../src/guestfs-actions.pod:2063 ../src/guestfs-actions.pod:2175 ../src/guestfs-actions.pod:2338 ../src/guestfs-actions.pod:2355 ../src/guestfs-actions.pod:2422 ../src/guestfs-actions.pod:2465 ../src/guestfs-actions.pod:2486 ../src/guestfs-actions.pod:2671 ../src/guestfs-actions.pod:2885 ../src/guestfs-actions.pod:3089 ../src/guestfs-actions.pod:3191 ../src/guestfs-actions.pod:3295 ../src/guestfs-actions.pod:3314 ../src/guestfs-actions.pod:3529 ../src/guestfs-actions.pod:3557 ../src/guestfs-actions.pod:3578 ../src/guestfs-actions.pod:3612 ../src/guestfs-actions.pod:3679 ../src/guestfs-actions.pod:3699 ../src/guestfs-actions.pod:3719 ../src/guestfs-actions.pod:4359 ../src/guestfs-actions.pod:4706 ../src/guestfs-actions.pod:4873 ../src/guestfs-actions.pod:5132 ../src/guestfs-actions.pod:6025 ../src/guestfs-actions.pod:6226 ../src/guestfs-actions.pod:6414 ../src/guestfs-actions.pod:6592 ../src/guestfs-actions.pod:6641 ../src/guestfs-actions.pod:7301 ../src/guestfs-actions.pod:7317 ../src/guestfs-actions.pod:7341 ../src/guestfs-actions.pod:7365 ../src/guestfs-actions.pod:8161 ../src/guestfs-actions.pod:8180 ../src/guestfs-actions.pod:8198 ../src/guestfs-actions.pod:8372 ../src/guestfs-actions.pod:8686
25711 "This function returns a string, or NULL on error. I<The caller must free "
25712 "the returned string after use>."
25716 #: ../src/guestfs-actions.pod:421
25717 msgid "guestfs_aug_init"
25721 #: ../src/guestfs-actions.pod:423
25725 " guestfs_aug_init (guestfs_h *g,\n"
25726 " const char *root,\n"
25732 #: ../src/guestfs-actions.pod:432
25733 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25737 #: ../src/guestfs-actions.pod:457
25739 "This option is only useful when debugging Augeas lenses. Use of this option "
25740 "may require additional memory for the libguestfs appliance. You may need to "
25741 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25742 "C<guestfs_set_memsize>."
25746 #: ../src/guestfs-actions.pod:472
25747 msgid "Do not load the tree in C<guestfs_aug_init>."
25751 #: ../src/guestfs-actions.pod:476
25752 msgid "To close the handle, you can call C<guestfs_aug_close>."
25756 #: ../src/guestfs-actions.pod:484
25757 msgid "guestfs_aug_insert"
25761 #: ../src/guestfs-actions.pod:486
25765 " guestfs_aug_insert (guestfs_h *g,\n"
25766 " const char *augpath,\n"
25767 " const char *label,\n"
25773 #: ../src/guestfs-actions.pod:504
25774 msgid "guestfs_aug_load"
25778 #: ../src/guestfs-actions.pod:506
25782 " guestfs_aug_load (guestfs_h *g);\n"
25787 #: ../src/guestfs-actions.pod:518
25788 msgid "guestfs_aug_ls"
25792 #: ../src/guestfs-actions.pod:520
25796 " guestfs_aug_ls (guestfs_h *g,\n"
25797 " const char *augpath);\n"
25802 #: ../src/guestfs-actions.pod:524
25804 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25805 "sorting the resulting nodes into alphabetical order."
25809 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543 ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1235 ../src/guestfs-actions.pod:1890 ../src/guestfs-actions.pod:1909 ../src/guestfs-actions.pod:2012 ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:2277 ../src/guestfs-actions.pod:2743 ../src/guestfs-actions.pod:2759 ../src/guestfs-actions.pod:2778 ../src/guestfs-actions.pod:2843 ../src/guestfs-actions.pod:2867 ../src/guestfs-actions.pod:2938 ../src/guestfs-actions.pod:2987 ../src/guestfs-actions.pod:3256 ../src/guestfs-actions.pod:3631 ../src/guestfs-actions.pod:3915 ../src/guestfs-actions.pod:4229 ../src/guestfs-actions.pod:4246 ../src/guestfs-actions.pod:4266 ../src/guestfs-actions.pod:4321 ../src/guestfs-actions.pod:4341 ../src/guestfs-actions.pod:4446 ../src/guestfs-actions.pod:4845 ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:6386 ../src/guestfs-actions.pod:6512 ../src/guestfs-actions.pod:6626 ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:7442 ../src/guestfs-actions.pod:7497 ../src/guestfs-actions.pod:7643 ../src/guestfs-actions.pod:7667 ../src/guestfs-actions.pod:8265 ../src/guestfs-actions.pod:8285 ../src/guestfs-actions.pod:8332 ../src/guestfs-actions.pod:8526 ../src/guestfs-actions.pod:8545 ../src/guestfs-actions.pod:8636 ../src/guestfs-actions.pod:8655 ../src/guestfs-actions.pod:8701 ../src/guestfs-actions.pod:8720
25811 "This function returns a NULL-terminated array of strings (like "
25812 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
25813 "strings and the array after use>."
25817 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1160 ../src/guestfs-actions.pod:1178 ../src/guestfs-actions.pod:1947 ../src/guestfs-actions.pod:3993 ../src/guestfs-actions.pod:4024 ../src/guestfs-actions.pod:4689 ../src/guestfs-actions.pod:4736 ../src/guestfs-actions.pod:5072 ../src/guestfs-actions.pod:5105 ../src/guestfs-actions.pod:5268 ../src/guestfs-actions.pod:5755 ../src/guestfs-actions.pod:6327 ../src/guestfs-actions.pod:6724 ../src/guestfs-actions.pod:6738 ../src/guestfs-actions.pod:6750 ../src/guestfs-actions.pod:7228 ../src/guestfs-actions.pod:8003 ../src/guestfs-actions.pod:8016 ../src/guestfs-actions.pod:8249 ../src/guestfs-actions.pod:8514
25818 msgid "(Added in 0.8)"
25822 #: ../src/guestfs-actions.pod:533
25823 msgid "guestfs_aug_match"
25827 #: ../src/guestfs-actions.pod:535
25831 " guestfs_aug_match (guestfs_h *g,\n"
25832 " const char *augpath);\n"
25837 #: ../src/guestfs-actions.pod:549
25838 msgid "guestfs_aug_mv"
25842 #: ../src/guestfs-actions.pod:551
25846 " guestfs_aug_mv (guestfs_h *g,\n"
25847 " const char *src,\n"
25848 " const char *dest);\n"
25853 #: ../src/guestfs-actions.pod:563
25854 msgid "guestfs_aug_rm"
25858 #: ../src/guestfs-actions.pod:565
25862 " guestfs_aug_rm (guestfs_h *g,\n"
25863 " const char *augpath);\n"
25868 #: ../src/guestfs-actions.pod:577
25869 msgid "guestfs_aug_save"
25873 #: ../src/guestfs-actions.pod:579
25877 " guestfs_aug_save (guestfs_h *g);\n"
25882 #: ../src/guestfs-actions.pod:584
25884 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25889 #: ../src/guestfs-actions.pod:591
25890 msgid "guestfs_aug_set"
25894 #: ../src/guestfs-actions.pod:593
25898 " guestfs_aug_set (guestfs_h *g,\n"
25899 " const char *augpath,\n"
25900 " const char *val);\n"
25905 #: ../src/guestfs-actions.pod:600
25907 "In the Augeas API, it is possible to clear a node by setting the value to "
25908 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25909 "this call. Instead you must use the C<guestfs_aug_clear> call."
25913 #: ../src/guestfs-actions.pod:609
25914 msgid "guestfs_available"
25918 #: ../src/guestfs-actions.pod:611
25922 " guestfs_available (guestfs_h *g,\n"
25923 " char *const *groups);\n"
25928 #: ../src/guestfs-actions.pod:619
25930 "The libguestfs groups, and the functions that those groups correspond to, "
25931 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25932 "runtime by calling C<guestfs_available_all_groups>."
25936 #: ../src/guestfs-actions.pod:643
25937 msgid "You must call C<guestfs_launch> before calling this function."
25941 #: ../src/guestfs-actions.pod:665
25943 "This call was added in version C<1.0.80>. In previous versions of "
25944 "libguestfs all you could do would be to speculatively execute a command to "
25945 "find out if the daemon implemented it. See also C<guestfs_version>."
25949 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1692
25950 msgid "(Added in 1.0.80)"
25954 #: ../src/guestfs-actions.pod:676
25955 msgid "guestfs_available_all_groups"
25959 #: ../src/guestfs-actions.pod:678
25963 " guestfs_available_all_groups (guestfs_h *g);\n"
25968 #: ../src/guestfs-actions.pod:681
25970 "This command returns a list of all optional groups that this daemon knows "
25971 "about. Note this returns both supported and unsupported groups. To find "
25972 "out which ones the daemon can actually support you have to call "
25973 "C<guestfs_available> on each member of the returned list."
25977 #: ../src/guestfs-actions.pod:687
25978 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25982 #: ../src/guestfs-actions.pod:693
25983 msgid "(Added in 1.3.15)"
25987 #: ../src/guestfs-actions.pod:695
25988 msgid "guestfs_base64_in"
25992 #: ../src/guestfs-actions.pod:697
25996 " guestfs_base64_in (guestfs_h *g,\n"
25997 " const char *base64file,\n"
25998 " const char *filename);\n"
26003 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
26004 msgid "(Added in 1.3.5)"
26008 #: ../src/guestfs-actions.pod:709
26009 msgid "guestfs_base64_out"
26013 #: ../src/guestfs-actions.pod:711
26017 " guestfs_base64_out (guestfs_h *g,\n"
26018 " const char *filename,\n"
26019 " const char *base64file);\n"
26024 #: ../src/guestfs-actions.pod:723
26025 msgid "guestfs_blkid"
26029 #: ../src/guestfs-actions.pod:725
26033 " guestfs_blkid (guestfs_h *g,\n"
26034 " const char *device);\n"
26039 #: ../src/guestfs-actions.pod:756 ../src/guestfs-actions.pod:3231 ../src/guestfs-actions.pod:3499 ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:5045 ../src/guestfs-actions.pod:5731 ../src/guestfs-actions.pod:7928
26041 "This function returns a NULL-terminated array of strings, or NULL if there "
26042 "was an error. The array of strings will always have length C<2n+1>, where "
26043 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
26044 "caller must free the strings and the array after use>."
26048 #: ../src/guestfs-actions.pod:762
26049 msgid "guestfs_blockdev_flushbufs"
26053 #: ../src/guestfs-actions.pod:764
26057 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
26058 " const char *device);\n"
26063 #: ../src/guestfs-actions.pod:775 ../src/guestfs-actions.pod:792 ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:823 ../src/guestfs-actions.pod:841 ../src/guestfs-actions.pod:860 ../src/guestfs-actions.pod:874 ../src/guestfs-actions.pod:892 ../src/guestfs-actions.pod:906 ../src/guestfs-actions.pod:920
26064 msgid "(Added in 0.9.3)"
26068 #: ../src/guestfs-actions.pod:777
26069 msgid "guestfs_blockdev_getbsz"
26073 #: ../src/guestfs-actions.pod:779
26077 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
26078 " const char *device);\n"
26083 #: ../src/guestfs-actions.pod:794
26084 msgid "guestfs_blockdev_getro"
26088 #: ../src/guestfs-actions.pod:796
26092 " guestfs_blockdev_getro (guestfs_h *g,\n"
26093 " const char *device);\n"
26098 #: ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:1930 ../src/guestfs-actions.pod:1945 ../src/guestfs-actions.pod:2434 ../src/guestfs-actions.pod:2445 ../src/guestfs-actions.pod:2517 ../src/guestfs-actions.pod:2543 ../src/guestfs-actions.pod:2583 ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2657 ../src/guestfs-actions.pod:3736 ../src/guestfs-actions.pod:3752 ../src/guestfs-actions.pod:3770 ../src/guestfs-actions.pod:3932 ../src/guestfs-actions.pod:3946 ../src/guestfs-actions.pod:3961 ../src/guestfs-actions.pod:3975 ../src/guestfs-actions.pod:3991 ../src/guestfs-actions.pod:4006 ../src/guestfs-actions.pod:4022 ../src/guestfs-actions.pod:4036 ../src/guestfs-actions.pod:4049 ../src/guestfs-actions.pod:4063 ../src/guestfs-actions.pod:4078 ../src/guestfs-actions.pod:4093 ../src/guestfs-actions.pod:4106 ../src/guestfs-actions.pod:4120 ../src/guestfs-actions.pod:5989
26099 msgid "This function returns a C truth value on success or -1 on error."
26103 #: ../src/guestfs-actions.pod:809
26104 msgid "guestfs_blockdev_getsize64"
26108 #: ../src/guestfs-actions.pod:811
26112 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
26113 " const char *device);\n"
26118 #: ../src/guestfs-actions.pod:817
26119 msgid "See also C<guestfs_blockdev_getsz>."
26123 #: ../src/guestfs-actions.pod:825
26124 msgid "guestfs_blockdev_getss"
26128 #: ../src/guestfs-actions.pod:827
26132 " guestfs_blockdev_getss (guestfs_h *g,\n"
26133 " const char *device);\n"
26138 #: ../src/guestfs-actions.pod:834
26140 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
26145 #: ../src/guestfs-actions.pod:843
26146 msgid "guestfs_blockdev_getsz"
26150 #: ../src/guestfs-actions.pod:845
26154 " guestfs_blockdev_getsz (guestfs_h *g,\n"
26155 " const char *device);\n"
26160 #: ../src/guestfs-actions.pod:852
26162 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
26163 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
26167 #: ../src/guestfs-actions.pod:862
26168 msgid "guestfs_blockdev_rereadpt"
26172 #: ../src/guestfs-actions.pod:864
26176 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
26177 " const char *device);\n"
26182 #: ../src/guestfs-actions.pod:876
26183 msgid "guestfs_blockdev_setbsz"
26187 #: ../src/guestfs-actions.pod:878
26191 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
26192 " const char *device,\n"
26193 " int blocksize);\n"
26198 #: ../src/guestfs-actions.pod:894
26199 msgid "guestfs_blockdev_setro"
26203 #: ../src/guestfs-actions.pod:896
26207 " guestfs_blockdev_setro (guestfs_h *g,\n"
26208 " const char *device);\n"
26213 #: ../src/guestfs-actions.pod:908
26214 msgid "guestfs_blockdev_setrw"
26218 #: ../src/guestfs-actions.pod:910
26222 " guestfs_blockdev_setrw (guestfs_h *g,\n"
26223 " const char *device);\n"
26228 #: ../src/guestfs-actions.pod:922
26229 msgid "guestfs_btrfs_filesystem_resize"
26233 #: ../src/guestfs-actions.pod:924
26237 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
26238 " const char *mountpoint,\n"
26244 #: ../src/guestfs-actions.pod:934
26247 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
26252 #: ../src/guestfs-actions.pod:957
26253 msgid "(Added in 1.11.17)"
26257 #: ../src/guestfs-actions.pod:959
26258 msgid "guestfs_btrfs_filesystem_resize_va"
26262 #: ../src/guestfs-actions.pod:961
26266 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
26267 " const char *mountpoint,\n"
26268 " va_list args);\n"
26273 #: ../src/guestfs-actions.pod:966
26274 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
26278 #: ../src/guestfs-actions.pod:970
26279 msgid "guestfs_btrfs_filesystem_resize_argv"
26283 #: ../src/guestfs-actions.pod:972
26287 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
26288 " const char *mountpoint,\n"
26290 "guestfs_btrfs_filesystem_resize_argv *optargs);\n"
26295 #: ../src/guestfs-actions.pod:977
26296 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
26300 #: ../src/guestfs-actions.pod:981
26301 msgid "guestfs_case_sensitive_path"
26305 #: ../src/guestfs-actions.pod:983
26309 " guestfs_case_sensitive_path (guestfs_h *g,\n"
26310 " const char *path);\n"
26315 #: ../src/guestfs-actions.pod:1009
26317 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
26318 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
26319 "how the directories were originally created under Windows)."
26323 #: ../src/guestfs-actions.pod:1017
26324 msgid "See also C<guestfs_realpath>."
26328 #: ../src/guestfs-actions.pod:1022 ../src/guestfs-actions.pod:8183
26329 msgid "(Added in 1.0.75)"
26333 #: ../src/guestfs-actions.pod:1024
26334 msgid "guestfs_cat"
26338 #: ../src/guestfs-actions.pod:1026
26342 " guestfs_cat (guestfs_h *g,\n"
26343 " const char *path);\n"
26348 #: ../src/guestfs-actions.pod:1032
26350 "Note that this function cannot correctly handle binary files (specifically, "
26351 "files containing C<\\0> character which is treated as end of string). For "
26352 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
26353 "functions which have a more complex interface."
26357 #: ../src/guestfs-actions.pod:1043 ../src/guestfs-actions.pod:4250 ../src/guestfs-actions.pod:4345 ../src/guestfs-actions.pod:4362 ../src/guestfs-actions.pod:4450 ../src/guestfs-actions.pod:4849 ../src/guestfs-actions.pod:4863 ../src/guestfs-actions.pod:6390 ../src/guestfs-actions.pod:6404 ../src/guestfs-actions.pod:8336 ../src/guestfs-actions.pod:8350
26358 msgid "(Added in 0.4)"
26362 #: ../src/guestfs-actions.pod:1045
26363 msgid "guestfs_checksum"
26367 #: ../src/guestfs-actions.pod:1047
26371 " guestfs_checksum (guestfs_h *g,\n"
26372 " const char *csumtype,\n"
26373 " const char *path);\n"
26378 #: ../src/guestfs-actions.pod:1093
26379 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
26383 #: ../src/guestfs-actions.pod:1095
26384 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
26388 #: ../src/guestfs-actions.pod:1100 ../src/guestfs-actions.pod:1767 ../src/guestfs-actions.pod:2625 ../src/guestfs-actions.pod:3948 ../src/guestfs-actions.pod:3977 ../src/guestfs-actions.pod:4038 ../src/guestfs-actions.pod:4065 ../src/guestfs-actions.pod:8039
26389 msgid "(Added in 1.0.2)"
26393 #: ../src/guestfs-actions.pod:1102
26394 msgid "guestfs_checksum_device"
26398 #: ../src/guestfs-actions.pod:1104
26402 " guestfs_checksum_device (guestfs_h *g,\n"
26403 " const char *csumtype,\n"
26404 " const char *device);\n"
26409 #: ../src/guestfs-actions.pod:1109
26411 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
26412 "device named C<device>. For the types of checksums supported see the "
26413 "C<guestfs_checksum> command."
26417 #: ../src/guestfs-actions.pod:1116 ../src/guestfs-actions.pod:5822 ../src/guestfs-actions.pod:5957 ../src/guestfs-actions.pod:5991 ../src/guestfs-actions.pod:6009 ../src/guestfs-actions.pod:6191 ../src/guestfs-actions.pod:7948 ../src/guestfs-actions.pod:7962 ../src/guestfs-actions.pod:8362
26418 msgid "(Added in 1.3.2)"
26422 #: ../src/guestfs-actions.pod:1118
26423 msgid "guestfs_checksums_out"
26427 #: ../src/guestfs-actions.pod:1120
26431 " guestfs_checksums_out (guestfs_h *g,\n"
26432 " const char *csumtype,\n"
26433 " const char *directory,\n"
26434 " const char *sumsfile);\n"
26439 #: ../src/guestfs-actions.pod:1140
26440 msgid "(Added in 1.3.7)"
26444 #: ../src/guestfs-actions.pod:1142
26445 msgid "guestfs_chmod"
26449 #: ../src/guestfs-actions.pod:1144
26453 " guestfs_chmod (guestfs_h *g,\n"
26455 " const char *path);\n"
26460 #: ../src/guestfs-actions.pod:1162
26461 msgid "guestfs_chown"
26465 #: ../src/guestfs-actions.pod:1164
26469 " guestfs_chown (guestfs_h *g,\n"
26472 " const char *path);\n"
26477 #: ../src/guestfs-actions.pod:1180
26478 msgid "guestfs_command"
26482 #: ../src/guestfs-actions.pod:1182
26486 " guestfs_command (guestfs_h *g,\n"
26487 " char *const *arguments);\n"
26492 #: ../src/guestfs-actions.pod:1191
26494 "The single parameter is an argv-style list of arguments. The first element "
26495 "is the name of the program to run. Subsequent elements are parameters. The "
26496 "list must be non-empty (ie. must contain a program name). Note that the "
26497 "command runs directly, and is I<not> invoked via the shell (see "
26502 #: ../src/guestfs-actions.pod:1222 ../src/guestfs-actions.pod:1242 ../src/guestfs-actions.pod:2066
26503 msgid "(Added in 0.9.1)"
26507 #: ../src/guestfs-actions.pod:1224
26508 msgid "guestfs_command_lines"
26512 #: ../src/guestfs-actions.pod:1226
26516 " guestfs_command_lines (guestfs_h *g,\n"
26517 " char *const *arguments);\n"
26522 #: ../src/guestfs-actions.pod:1230
26524 "This is the same as C<guestfs_command>, but splits the result into a list of "
26529 #: ../src/guestfs-actions.pod:1233
26530 msgid "See also: C<guestfs_sh_lines>"
26534 #: ../src/guestfs-actions.pod:1244
26535 msgid "guestfs_compress_device_out"
26539 #: ../src/guestfs-actions.pod:1246
26543 " guestfs_compress_device_out (guestfs_h *g,\n"
26544 " const char *ctype,\n"
26545 " const char *device,\n"
26546 " const char *zdevice,\n"
26552 #: ../src/guestfs-actions.pod:1258
26555 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
26560 #: ../src/guestfs-actions.pod:1263
26562 "The C<ctype> and optional C<level> parameters have the same meaning as in "
26563 "C<guestfs_compress_out>."
26567 #: ../src/guestfs-actions.pod:1268 ../src/guestfs-actions.pod:1327 ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:7107
26568 msgid "(Added in 1.13.15)"
26572 #: ../src/guestfs-actions.pod:1270
26573 msgid "guestfs_compress_device_out_va"
26577 #: ../src/guestfs-actions.pod:1272
26581 " guestfs_compress_device_out_va (guestfs_h *g,\n"
26582 " const char *ctype,\n"
26583 " const char *device,\n"
26584 " const char *zdevice,\n"
26585 " va_list args);\n"
26590 #: ../src/guestfs-actions.pod:1279
26591 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
26595 #: ../src/guestfs-actions.pod:1283
26596 msgid "guestfs_compress_device_out_argv"
26600 #: ../src/guestfs-actions.pod:1285
26604 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
26605 " const char *ctype,\n"
26606 " const char *device,\n"
26607 " const char *zdevice,\n"
26609 "guestfs_compress_device_out_argv *optargs);\n"
26614 #: ../src/guestfs-actions.pod:1292
26615 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
26619 #: ../src/guestfs-actions.pod:1296
26620 msgid "guestfs_compress_out"
26624 #: ../src/guestfs-actions.pod:1298
26628 " guestfs_compress_out (guestfs_h *g,\n"
26629 " const char *ctype,\n"
26630 " const char *file,\n"
26631 " const char *zfile,\n"
26637 #: ../src/guestfs-actions.pod:1310
26640 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26645 #: ../src/guestfs-actions.pod:1329
26646 msgid "guestfs_compress_out_va"
26650 #: ../src/guestfs-actions.pod:1331
26654 " guestfs_compress_out_va (guestfs_h *g,\n"
26655 " const char *ctype,\n"
26656 " const char *file,\n"
26657 " const char *zfile,\n"
26658 " va_list args);\n"
26663 #: ../src/guestfs-actions.pod:1338
26664 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26668 #: ../src/guestfs-actions.pod:1342
26669 msgid "guestfs_compress_out_argv"
26673 #: ../src/guestfs-actions.pod:1344
26677 " guestfs_compress_out_argv (guestfs_h *g,\n"
26678 " const char *ctype,\n"
26679 " const char *file,\n"
26680 " const char *zfile,\n"
26681 " const struct guestfs_compress_out_argv "
26687 #: ../src/guestfs-actions.pod:1351
26688 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26692 #: ../src/guestfs-actions.pod:1355
26693 msgid "guestfs_config"
26697 #: ../src/guestfs-actions.pod:1357
26701 " guestfs_config (guestfs_h *g,\n"
26702 " const char *qemuparam,\n"
26703 " const char *qemuvalue);\n"
26708 #: ../src/guestfs-actions.pod:1375
26709 msgid "guestfs_copy_device_to_device"
26713 #: ../src/guestfs-actions.pod:1377
26717 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26718 " const char *src,\n"
26719 " const char *dest,\n"
26725 #: ../src/guestfs-actions.pod:1388
26728 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26729 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26730 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26735 #: ../src/guestfs-actions.pod:1392
26737 "The four calls C<guestfs_copy_device_to_device>, "
26738 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26739 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26740 "destination (device|file)."
26744 #: ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1466 ../src/guestfs-actions.pod:1519 ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1631 ../src/guestfs-actions.pod:1762 ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:1838 ../src/guestfs-actions.pod:2215 ../src/guestfs-actions.pod:2237 ../src/guestfs-actions.pod:4148 ../src/guestfs-actions.pod:8034 ../src/guestfs-actions.pod:8068 ../src/guestfs-actions.pod:8575 ../src/guestfs-actions.pod:8598
26746 "This long-running command can generate progress notification messages so "
26747 "that the caller can display a progress bar or indicator. To receive these "
26748 "messages, the caller must register a progress event callback. See "
26749 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
26753 #: ../src/guestfs-actions.pod:1418 ../src/guestfs-actions.pod:1471 ../src/guestfs-actions.pod:1524 ../src/guestfs-actions.pod:1582 ../src/guestfs-actions.pod:6247
26754 msgid "(Added in 1.13.25)"
26758 #: ../src/guestfs-actions.pod:1420
26759 msgid "guestfs_copy_device_to_device_va"
26763 #: ../src/guestfs-actions.pod:1422
26767 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26768 " const char *src,\n"
26769 " const char *dest,\n"
26770 " va_list args);\n"
26775 #: ../src/guestfs-actions.pod:1428
26776 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26780 #: ../src/guestfs-actions.pod:1432
26781 msgid "guestfs_copy_device_to_device_argv"
26785 #: ../src/guestfs-actions.pod:1434
26789 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26790 " const char *src,\n"
26791 " const char *dest,\n"
26793 "guestfs_copy_device_to_device_argv *optargs);\n"
26798 #: ../src/guestfs-actions.pod:1440
26799 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26803 #: ../src/guestfs-actions.pod:1444
26804 msgid "guestfs_copy_device_to_file"
26808 #: ../src/guestfs-actions.pod:1446
26812 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26813 " const char *src,\n"
26814 " const char *dest,\n"
26820 #: ../src/guestfs-actions.pod:1457
26823 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26824 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26825 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26830 #: ../src/guestfs-actions.pod:1461 ../src/guestfs-actions.pod:1514 ../src/guestfs-actions.pod:1567
26831 msgid "See C<guestfs_copy_device_to_device> for a general overview of this call."
26835 #: ../src/guestfs-actions.pod:1473
26836 msgid "guestfs_copy_device_to_file_va"
26840 #: ../src/guestfs-actions.pod:1475
26844 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26845 " const char *src,\n"
26846 " const char *dest,\n"
26847 " va_list args);\n"
26852 #: ../src/guestfs-actions.pod:1481
26853 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26857 #: ../src/guestfs-actions.pod:1485
26858 msgid "guestfs_copy_device_to_file_argv"
26862 #: ../src/guestfs-actions.pod:1487
26866 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26867 " const char *src,\n"
26868 " const char *dest,\n"
26870 "guestfs_copy_device_to_file_argv *optargs);\n"
26875 #: ../src/guestfs-actions.pod:1493
26876 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26880 #: ../src/guestfs-actions.pod:1497
26881 msgid "guestfs_copy_file_to_device"
26885 #: ../src/guestfs-actions.pod:1499
26889 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26890 " const char *src,\n"
26891 " const char *dest,\n"
26897 #: ../src/guestfs-actions.pod:1510
26900 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26901 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26902 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26907 #: ../src/guestfs-actions.pod:1526
26908 msgid "guestfs_copy_file_to_device_va"
26912 #: ../src/guestfs-actions.pod:1528
26916 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26917 " const char *src,\n"
26918 " const char *dest,\n"
26919 " va_list args);\n"
26924 #: ../src/guestfs-actions.pod:1534
26925 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26929 #: ../src/guestfs-actions.pod:1538
26930 msgid "guestfs_copy_file_to_device_argv"
26934 #: ../src/guestfs-actions.pod:1540
26938 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26939 " const char *src,\n"
26940 " const char *dest,\n"
26942 "guestfs_copy_file_to_device_argv *optargs);\n"
26947 #: ../src/guestfs-actions.pod:1546
26948 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26952 #: ../src/guestfs-actions.pod:1550
26953 msgid "guestfs_copy_file_to_file"
26957 #: ../src/guestfs-actions.pod:1552
26961 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26962 " const char *src,\n"
26963 " const char *dest,\n"
26969 #: ../src/guestfs-actions.pod:1563
26972 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26973 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26974 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26979 #: ../src/guestfs-actions.pod:1570
26981 "This is B<not> the function you want for copying files. This is for copying "
26982 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26983 "C<guestfs_mv> for general file copying and moving functions."
26987 #: ../src/guestfs-actions.pod:1584
26988 msgid "guestfs_copy_file_to_file_va"
26992 #: ../src/guestfs-actions.pod:1586
26996 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26997 " const char *src,\n"
26998 " const char *dest,\n"
26999 " va_list args);\n"
27004 #: ../src/guestfs-actions.pod:1592
27005 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
27009 #: ../src/guestfs-actions.pod:1596
27010 msgid "guestfs_copy_file_to_file_argv"
27014 #: ../src/guestfs-actions.pod:1598
27018 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
27019 " const char *src,\n"
27020 " const char *dest,\n"
27021 " const struct guestfs_copy_file_to_file_argv "
27027 #: ../src/guestfs-actions.pod:1604
27028 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
27032 #: ../src/guestfs-actions.pod:1608
27033 msgid "guestfs_copy_size"
27037 #: ../src/guestfs-actions.pod:1610
27041 " guestfs_copy_size (guestfs_h *g,\n"
27042 " const char *src,\n"
27043 " const char *dest,\n"
27044 " int64_t size);\n"
27049 #: ../src/guestfs-actions.pod:1616 ../src/guestfs-actions.pod:1673
27051 "I<This function is deprecated.> In new code, use the "
27052 "L</guestfs_copy_device_to_device> call instead."
27056 #: ../src/guestfs-actions.pod:1636 ../src/guestfs-actions.pod:4876 ../src/guestfs-actions.pod:6417 ../src/guestfs-actions.pod:8269 ../src/guestfs-actions.pod:8289 ../src/guestfs-actions.pod:8375
27057 msgid "(Added in 1.0.87)"
27061 #: ../src/guestfs-actions.pod:1638
27066 #: ../src/guestfs-actions.pod:1640
27070 " guestfs_cp (guestfs_h *g,\n"
27071 " const char *src,\n"
27072 " const char *dest);\n"
27077 #: ../src/guestfs-actions.pod:1650 ../src/guestfs-actions.pod:1664 ../src/guestfs-actions.pod:1744 ../src/guestfs-actions.pod:1818 ../src/guestfs-actions.pod:1932 ../src/guestfs-actions.pod:5769 ../src/guestfs-actions.pod:6261
27078 msgid "(Added in 1.0.18)"
27082 #: ../src/guestfs-actions.pod:1652
27083 msgid "guestfs_cp_a"
27087 #: ../src/guestfs-actions.pod:1654
27091 " guestfs_cp_a (guestfs_h *g,\n"
27092 " const char *src,\n"
27093 " const char *dest);\n"
27098 #: ../src/guestfs-actions.pod:1666
27103 #: ../src/guestfs-actions.pod:1668
27107 " guestfs_dd (guestfs_h *g,\n"
27108 " const char *src,\n"
27109 " const char *dest);\n"
27114 #: ../src/guestfs-actions.pod:1685
27116 "If the destination is a device, it must be as large or larger than the "
27117 "source file or device, otherwise the copy will fail. This command cannot do "
27118 "partial copies (see C<guestfs_copy_device_to_device>)."
27122 #: ../src/guestfs-actions.pod:1694
27127 #: ../src/guestfs-actions.pod:1696
27131 " guestfs_df (guestfs_h *g);\n"
27136 #: ../src/guestfs-actions.pod:1701 ../src/guestfs-actions.pod:1718
27138 "This command is mostly useful for interactive sessions. It is I<not> "
27139 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
27144 #: ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:1725 ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:2850 ../src/guestfs-actions.pod:2874 ../src/guestfs-actions.pod:2942 ../src/guestfs-actions.pod:5135 ../src/guestfs-actions.pod:5669 ../src/guestfs-actions.pod:7650 ../src/guestfs-actions.pod:7674 ../src/guestfs-actions.pod:8415 ../src/guestfs-actions.pod:8428 ../src/guestfs-actions.pod:8441
27145 msgid "(Added in 1.0.54)"
27149 #: ../src/guestfs-actions.pod:1710
27150 msgid "guestfs_df_h"
27154 #: ../src/guestfs-actions.pod:1712
27158 " guestfs_df_h (guestfs_h *g);\n"
27163 #: ../src/guestfs-actions.pod:1727
27164 msgid "guestfs_dmesg"
27168 #: ../src/guestfs-actions.pod:1729
27172 " guestfs_dmesg (guestfs_h *g);\n"
27177 #: ../src/guestfs-actions.pod:1736
27179 "Another way to get the same information is to enable verbose messages with "
27180 "C<guestfs_set_verbose> or by setting the environment variable "
27181 "C<LIBGUESTFS_DEBUG=1> before running the program."
27185 #: ../src/guestfs-actions.pod:1746
27186 msgid "guestfs_download"
27190 #: ../src/guestfs-actions.pod:1748
27194 " guestfs_download (guestfs_h *g,\n"
27195 " const char *remotefilename,\n"
27196 " const char *filename);\n"
27201 #: ../src/guestfs-actions.pod:1758
27202 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
27206 #: ../src/guestfs-actions.pod:1769
27207 msgid "guestfs_download_offset"
27211 #: ../src/guestfs-actions.pod:1771
27215 " guestfs_download_offset (guestfs_h *g,\n"
27216 " const char *remotefilename,\n"
27217 " const char *filename,\n"
27218 " int64_t offset,\n"
27219 " int64_t size);\n"
27224 #: ../src/guestfs-actions.pod:1784
27226 "Note that there is no limit on the amount of data that can be downloaded "
27227 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
27228 "full amount unless an error occurs."
27232 #: ../src/guestfs-actions.pod:1789
27233 msgid "See also C<guestfs_download>, C<guestfs_pread>."
27237 #: ../src/guestfs-actions.pod:1798 ../src/guestfs-actions.pod:8073
27238 msgid "(Added in 1.5.17)"
27242 #: ../src/guestfs-actions.pod:1800
27243 msgid "guestfs_drop_caches"
27247 #: ../src/guestfs-actions.pod:1802
27251 " guestfs_drop_caches (guestfs_h *g,\n"
27252 " int whattodrop);\n"
27257 #: ../src/guestfs-actions.pod:1820
27262 #: ../src/guestfs-actions.pod:1822
27266 " guestfs_du (guestfs_h *g,\n"
27267 " const char *path);\n"
27272 #: ../src/guestfs-actions.pod:1845
27273 msgid "guestfs_e2fsck_f"
27277 #: ../src/guestfs-actions.pod:1847
27281 " guestfs_e2fsck_f (guestfs_h *g,\n"
27282 " const char *device);\n"
27287 #: ../src/guestfs-actions.pod:1855
27289 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
27290 "Normally you should use C<guestfs_fsck>."
27294 #: ../src/guestfs-actions.pod:1860
27295 msgid "(Added in 1.0.29)"
27299 #: ../src/guestfs-actions.pod:1862
27300 msgid "guestfs_echo_daemon"
27304 #: ../src/guestfs-actions.pod:1864
27308 " guestfs_echo_daemon (guestfs_h *g,\n"
27309 " char *const *words);\n"
27314 #: ../src/guestfs-actions.pod:1873
27315 msgid "See also C<guestfs_ping_daemon>."
27319 #: ../src/guestfs-actions.pod:1878 ../src/guestfs-actions.pod:2636 ../src/guestfs-actions.pod:7131
27320 msgid "(Added in 1.0.69)"
27324 #: ../src/guestfs-actions.pod:1880
27325 msgid "guestfs_egrep"
27329 #: ../src/guestfs-actions.pod:1882
27333 " guestfs_egrep (guestfs_h *g,\n"
27334 " const char *regex,\n"
27335 " const char *path);\n"
27340 #: ../src/guestfs-actions.pod:1897 ../src/guestfs-actions.pod:1916 ../src/guestfs-actions.pod:1973 ../src/guestfs-actions.pod:2019 ../src/guestfs-actions.pod:2038 ../src/guestfs-actions.pod:2766 ../src/guestfs-actions.pod:2785 ../src/guestfs-actions.pod:2963 ../src/guestfs-actions.pod:2976 ../src/guestfs-actions.pod:2991 ../src/guestfs-actions.pod:3037 ../src/guestfs-actions.pod:3059 ../src/guestfs-actions.pod:3072 ../src/guestfs-actions.pod:4375 ../src/guestfs-actions.pod:4389 ../src/guestfs-actions.pod:4402 ../src/guestfs-actions.pod:4416 ../src/guestfs-actions.pod:5557 ../src/guestfs-actions.pod:6595 ../src/guestfs-actions.pod:6644 ../src/guestfs-actions.pod:7518 ../src/guestfs-actions.pod:7530 ../src/guestfs-actions.pod:7543 ../src/guestfs-actions.pod:7556 ../src/guestfs-actions.pod:7578 ../src/guestfs-actions.pod:7591 ../src/guestfs-actions.pod:7604 ../src/guestfs-actions.pod:7617 ../src/guestfs-actions.pod:8533 ../src/guestfs-actions.pod:8552 ../src/guestfs-actions.pod:8643 ../src/guestfs-actions.pod:8662 ../src/guestfs-actions.pod:8708 ../src/guestfs-actions.pod:8727
27341 msgid "(Added in 1.0.66)"
27345 #: ../src/guestfs-actions.pod:1899
27346 msgid "guestfs_egrepi"
27350 #: ../src/guestfs-actions.pod:1901
27354 " guestfs_egrepi (guestfs_h *g,\n"
27355 " const char *regex,\n"
27356 " const char *path);\n"
27361 #: ../src/guestfs-actions.pod:1918
27362 msgid "guestfs_equal"
27366 #: ../src/guestfs-actions.pod:1920
27370 " guestfs_equal (guestfs_h *g,\n"
27371 " const char *file1,\n"
27372 " const char *file2);\n"
27377 #: ../src/guestfs-actions.pod:1934
27378 msgid "guestfs_exists"
27382 #: ../src/guestfs-actions.pod:1936
27386 " guestfs_exists (guestfs_h *g,\n"
27387 " const char *path);\n"
27392 #: ../src/guestfs-actions.pod:1943
27393 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
27397 #: ../src/guestfs-actions.pod:1949
27398 msgid "guestfs_fallocate"
27402 #: ../src/guestfs-actions.pod:1951
27406 " guestfs_fallocate (guestfs_h *g,\n"
27407 " const char *path,\n"
27413 #: ../src/guestfs-actions.pod:1956
27415 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
27420 #: ../src/guestfs-actions.pod:1975
27421 msgid "guestfs_fallocate64"
27425 #: ../src/guestfs-actions.pod:1977
27429 " guestfs_fallocate64 (guestfs_h *g,\n"
27430 " const char *path,\n"
27436 #: ../src/guestfs-actions.pod:1986
27438 "Note that this call allocates disk blocks for the file. To create a sparse "
27439 "file use C<guestfs_truncate_size> instead."
27443 #: ../src/guestfs-actions.pod:1989
27445 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
27446 "oversight it only allowed 30 bit lengths to be specified, effectively "
27447 "limiting the maximum size of files created through that call to 1GB."
27451 #: ../src/guestfs-actions.pod:2000
27452 msgid "(Added in 1.3.17)"
27456 #: ../src/guestfs-actions.pod:2002
27457 msgid "guestfs_fgrep"
27461 #: ../src/guestfs-actions.pod:2004
27465 " guestfs_fgrep (guestfs_h *g,\n"
27466 " const char *pattern,\n"
27467 " const char *path);\n"
27472 #: ../src/guestfs-actions.pod:2021
27473 msgid "guestfs_fgrepi"
27477 #: ../src/guestfs-actions.pod:2023
27481 " guestfs_fgrepi (guestfs_h *g,\n"
27482 " const char *pattern,\n"
27483 " const char *path);\n"
27488 #: ../src/guestfs-actions.pod:2040
27489 msgid "guestfs_file"
27493 #: ../src/guestfs-actions.pod:2042
27497 " guestfs_file (guestfs_h *g,\n"
27498 " const char *path);\n"
27503 #: ../src/guestfs-actions.pod:2060
27505 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
27506 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
27510 #: ../src/guestfs-actions.pod:2068
27511 msgid "guestfs_file_architecture"
27515 #: ../src/guestfs-actions.pod:2070
27519 " guestfs_file_architecture (guestfs_h *g,\n"
27520 " const char *filename);\n"
27525 #: ../src/guestfs-actions.pod:2178 ../src/guestfs-actions.pod:2341 ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:3092 ../src/guestfs-actions.pod:3194 ../src/guestfs-actions.pod:3260 ../src/guestfs-actions.pod:3447 ../src/guestfs-actions.pod:3465 ../src/guestfs-actions.pod:3505 ../src/guestfs-actions.pod:3581 ../src/guestfs-actions.pod:3682 ../src/guestfs-actions.pod:3919 ../src/guestfs-actions.pod:4051
27526 msgid "(Added in 1.5.3)"
27530 #: ../src/guestfs-actions.pod:2180
27531 msgid "guestfs_filesize"
27535 #: ../src/guestfs-actions.pod:2182
27539 " guestfs_filesize (guestfs_h *g,\n"
27540 " const char *file);\n"
27545 #: ../src/guestfs-actions.pod:2188
27547 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
27548 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
27549 "devices, use C<guestfs_blockdev_getsize64>."
27553 #: ../src/guestfs-actions.pod:2194
27554 msgid "(Added in 1.0.82)"
27558 #: ../src/guestfs-actions.pod:2196
27559 msgid "guestfs_fill"
27563 #: ../src/guestfs-actions.pod:2198
27567 " guestfs_fill (guestfs_h *g,\n"
27570 " const char *path);\n"
27575 #: ../src/guestfs-actions.pod:2208
27577 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
27578 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
27579 "bytes use C<guestfs_fill_pattern>."
27583 #: ../src/guestfs-actions.pod:2220
27584 msgid "(Added in 1.0.79)"
27588 #: ../src/guestfs-actions.pod:2222
27589 msgid "guestfs_fill_pattern"
27593 #: ../src/guestfs-actions.pod:2224
27597 " guestfs_fill_pattern (guestfs_h *g,\n"
27598 " const char *pattern,\n"
27600 " const char *path);\n"
27605 #: ../src/guestfs-actions.pod:2230
27607 "This function is like C<guestfs_fill> except that it creates a new file of "
27608 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
27609 "pattern is truncated if necessary to ensure the length of the file is "
27610 "exactly C<len> bytes."
27614 #: ../src/guestfs-actions.pod:2242
27615 msgid "(Added in 1.3.12)"
27619 #: ../src/guestfs-actions.pod:2244
27620 msgid "guestfs_find"
27624 #: ../src/guestfs-actions.pod:2246
27628 " guestfs_find (guestfs_h *g,\n"
27629 " const char *directory);\n"
27634 #: ../src/guestfs-actions.pod:2262
27635 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27639 #: ../src/guestfs-actions.pod:2275
27640 msgid "See also C<guestfs_find0>."
27644 #: ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:4813 ../src/guestfs-actions.pod:6679
27645 msgid "(Added in 1.0.27)"
27649 #: ../src/guestfs-actions.pod:2286
27650 msgid "guestfs_find0"
27654 #: ../src/guestfs-actions.pod:2288
27658 " guestfs_find0 (guestfs_h *g,\n"
27659 " const char *directory,\n"
27660 " const char *files);\n"
27665 #: ../src/guestfs-actions.pod:2297
27667 "This command works the same way as C<guestfs_find> with the following "
27672 #: ../src/guestfs-actions.pod:2324
27673 msgid "(Added in 1.0.74)"
27677 #: ../src/guestfs-actions.pod:2326
27678 msgid "guestfs_findfs_label"
27682 #: ../src/guestfs-actions.pod:2328
27686 " guestfs_findfs_label (guestfs_h *g,\n"
27687 " const char *label);\n"
27692 #: ../src/guestfs-actions.pod:2336
27693 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27697 #: ../src/guestfs-actions.pod:2343
27698 msgid "guestfs_findfs_uuid"
27702 #: ../src/guestfs-actions.pod:2345
27706 " guestfs_findfs_uuid (guestfs_h *g,\n"
27707 " const char *uuid);\n"
27712 #: ../src/guestfs-actions.pod:2353
27713 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27717 #: ../src/guestfs-actions.pod:2360
27718 msgid "guestfs_fsck"
27722 #: ../src/guestfs-actions.pod:2362
27726 " guestfs_fsck (guestfs_h *g,\n"
27727 " const char *fstype,\n"
27728 " const char *device);\n"
27733 #: ../src/guestfs-actions.pod:2397 ../src/guestfs-actions.pod:8580
27734 msgid "(Added in 1.0.16)"
27738 #: ../src/guestfs-actions.pod:2399
27739 msgid "guestfs_get_append"
27743 #: ../src/guestfs-actions.pod:2401
27747 " guestfs_get_append (guestfs_h *g);\n"
27752 #: ../src/guestfs-actions.pod:2409
27754 "This function returns a string which may be NULL. There is no way to return "
27755 "an error from this function. The string is owned by the guest handle and "
27756 "must I<not> be freed."
27760 #: ../src/guestfs-actions.pod:2413 ../src/guestfs-actions.pod:6357 ../src/guestfs-actions.pod:6836 ../src/guestfs-actions.pod:7285 ../src/guestfs-actions.pod:7304 ../src/guestfs-actions.pod:7320 ../src/guestfs-actions.pod:7344 ../src/guestfs-actions.pod:8220 ../src/guestfs-actions.pod:8235 ../src/guestfs-actions.pod:8624
27761 msgid "(Added in 1.0.26)"
27765 #: ../src/guestfs-actions.pod:2415
27766 msgid "guestfs_get_attach_method"
27770 #: ../src/guestfs-actions.pod:2417
27774 " guestfs_get_attach_method (guestfs_h *g);\n"
27779 #: ../src/guestfs-actions.pod:2420
27780 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27784 #: ../src/guestfs-actions.pod:2425 ../src/guestfs-actions.pod:6866
27785 msgid "(Added in 1.9.8)"
27789 #: ../src/guestfs-actions.pod:2427
27790 msgid "guestfs_get_autosync"
27794 #: ../src/guestfs-actions.pod:2429
27798 " guestfs_get_autosync (guestfs_h *g);\n"
27803 #: ../src/guestfs-actions.pod:2438
27804 msgid "guestfs_get_direct"
27808 #: ../src/guestfs-actions.pod:2440
27812 " guestfs_get_direct (guestfs_h *g);\n"
27817 #: ../src/guestfs-actions.pod:2447 ../src/guestfs-actions.pod:6907
27818 msgid "(Added in 1.0.72)"
27822 #: ../src/guestfs-actions.pod:2449
27823 msgid "guestfs_get_e2label"
27827 #: ../src/guestfs-actions.pod:2451
27831 " guestfs_get_e2label (guestfs_h *g,\n"
27832 " const char *device);\n"
27837 #: ../src/guestfs-actions.pod:2455
27839 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27844 #: ../src/guestfs-actions.pod:2468 ../src/guestfs-actions.pod:2489 ../src/guestfs-actions.pod:6925 ../src/guestfs-actions.pod:6944
27845 msgid "(Added in 1.0.15)"
27849 #: ../src/guestfs-actions.pod:2470
27850 msgid "guestfs_get_e2uuid"
27854 #: ../src/guestfs-actions.pod:2472
27858 " guestfs_get_e2uuid (guestfs_h *g,\n"
27859 " const char *device);\n"
27864 #: ../src/guestfs-actions.pod:2476
27866 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27871 #: ../src/guestfs-actions.pod:2491
27872 msgid "guestfs_get_memsize"
27876 #: ../src/guestfs-actions.pod:2493
27880 " guestfs_get_memsize (guestfs_h *g);\n"
27885 #: ../src/guestfs-actions.pod:2499
27887 "If C<guestfs_set_memsize> was not called on this handle, and if "
27888 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27889 "value for memsize."
27893 #: ../src/guestfs-actions.pod:2508 ../src/guestfs-actions.pod:5253 ../src/guestfs-actions.pod:5462 ../src/guestfs-actions.pod:5481 ../src/guestfs-actions.pod:5500 ../src/guestfs-actions.pod:5512 ../src/guestfs-actions.pod:5529 ../src/guestfs-actions.pod:5542 ../src/guestfs-actions.pod:6582 ../src/guestfs-actions.pod:6965 ../src/guestfs-actions.pod:7255 ../src/guestfs-actions.pod:7989
27894 msgid "(Added in 1.0.55)"
27898 #: ../src/guestfs-actions.pod:2510
27899 msgid "guestfs_get_network"
27903 #: ../src/guestfs-actions.pod:2512
27907 " guestfs_get_network (guestfs_h *g);\n"
27912 #: ../src/guestfs-actions.pod:2519 ../src/guestfs-actions.pod:6984
27913 msgid "(Added in 1.5.4)"
27917 #: ../src/guestfs-actions.pod:2521
27918 msgid "guestfs_get_path"
27922 #: ../src/guestfs-actions.pod:2523
27926 " guestfs_get_path (guestfs_h *g);\n"
27931 #: ../src/guestfs-actions.pod:2531 ../src/guestfs-actions.pod:2571
27933 "This function returns a string, or NULL on error. The string is owned by "
27934 "the guest handle and must I<not> be freed."
27938 #: ../src/guestfs-actions.pod:2536
27939 msgid "guestfs_get_pgroup"
27943 #: ../src/guestfs-actions.pod:2538
27947 " guestfs_get_pgroup (guestfs_h *g);\n"
27952 #: ../src/guestfs-actions.pod:2545 ../src/guestfs-actions.pod:7020 ../src/guestfs-actions.pod:8481
27953 msgid "(Added in 1.11.18)"
27957 #: ../src/guestfs-actions.pod:2547
27958 msgid "guestfs_get_pid"
27962 #: ../src/guestfs-actions.pod:2549
27966 " guestfs_get_pid (guestfs_h *g);\n"
27971 #: ../src/guestfs-actions.pod:2559
27972 msgid "(Added in 1.0.56)"
27976 #: ../src/guestfs-actions.pod:2561
27977 msgid "guestfs_get_qemu"
27981 #: ../src/guestfs-actions.pod:2563
27985 " guestfs_get_qemu (guestfs_h *g);\n"
27990 #: ../src/guestfs-actions.pod:2574 ../src/guestfs-actions.pod:7048
27991 msgid "(Added in 1.0.6)"
27995 #: ../src/guestfs-actions.pod:2576
27996 msgid "guestfs_get_recovery_proc"
28000 #: ../src/guestfs-actions.pod:2578
28004 " guestfs_get_recovery_proc (guestfs_h *g);\n"
28009 #: ../src/guestfs-actions.pod:2585 ../src/guestfs-actions.pod:4173 ../src/guestfs-actions.pod:4517 ../src/guestfs-actions.pod:4911 ../src/guestfs-actions.pod:5092 ../src/guestfs-actions.pod:6287 ../src/guestfs-actions.pod:6630 ../src/guestfs-actions.pod:7072 ../src/guestfs-actions.pod:7770 ../src/guestfs-actions.pod:7790 ../src/guestfs-actions.pod:8104
28010 msgid "(Added in 1.0.77)"
28014 #: ../src/guestfs-actions.pod:2587
28015 msgid "guestfs_get_selinux"
28019 #: ../src/guestfs-actions.pod:2589
28023 " guestfs_get_selinux (guestfs_h *g);\n"
28028 #: ../src/guestfs-actions.pod:2592
28030 "This returns the current setting of the selinux flag which is passed to the "
28031 "appliance at boot time. See C<guestfs_set_selinux>."
28035 #: ../src/guestfs-actions.pod:2600 ../src/guestfs-actions.pod:2674 ../src/guestfs-actions.pod:7091 ../src/guestfs-actions.pod:7165
28036 msgid "(Added in 1.0.67)"
28040 #: ../src/guestfs-actions.pod:2602
28041 msgid "guestfs_get_smp"
28045 #: ../src/guestfs-actions.pod:2604
28049 " guestfs_get_smp (guestfs_h *g);\n"
28054 #: ../src/guestfs-actions.pod:2613
28055 msgid "guestfs_get_state"
28059 #: ../src/guestfs-actions.pod:2615
28063 " guestfs_get_state (guestfs_h *g);\n"
28068 #: ../src/guestfs-actions.pod:2627
28069 msgid "guestfs_get_trace"
28073 #: ../src/guestfs-actions.pod:2629
28077 " guestfs_get_trace (guestfs_h *g);\n"
28082 #: ../src/guestfs-actions.pod:2638
28083 msgid "guestfs_get_umask"
28087 #: ../src/guestfs-actions.pod:2640
28091 " guestfs_get_umask (guestfs_h *g);\n"
28096 #: ../src/guestfs-actions.pod:2643
28098 "Return the current umask. By default the umask is C<022> unless it has been "
28099 "set by calling C<guestfs_umask>."
28103 #: ../src/guestfs-actions.pod:2650
28104 msgid "guestfs_get_verbose"
28108 #: ../src/guestfs-actions.pod:2652
28112 " guestfs_get_verbose (guestfs_h *g);\n"
28117 #: ../src/guestfs-actions.pod:2661
28118 msgid "guestfs_getcon"
28122 #: ../src/guestfs-actions.pod:2663
28126 " guestfs_getcon (guestfs_h *g);\n"
28131 #: ../src/guestfs-actions.pod:2668
28132 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
28136 #: ../src/guestfs-actions.pod:2676
28137 msgid "guestfs_getxattr"
28141 #: ../src/guestfs-actions.pod:2678
28145 " guestfs_getxattr (guestfs_h *g,\n"
28146 " const char *path,\n"
28147 " const char *name,\n"
28148 " size_t *size_r);\n"
28153 #: ../src/guestfs-actions.pod:2684
28155 "Get a single extended attribute from file C<path> named C<name>. This call "
28156 "follows symlinks. If you want to lookup an extended attribute for the "
28157 "symlink itself, use C<guestfs_lgetxattr>."
28161 #: ../src/guestfs-actions.pod:2688 ../src/guestfs-actions.pod:4187
28163 "Normally it is better to get all extended attributes from a file in one go "
28164 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
28165 "implementations are buggy and do not provide a way to list out attributes. "
28166 "For these filesystems (notably ntfs-3g) you have to know the names of the "
28167 "extended attributes you want in advance and call this function."
28171 #: ../src/guestfs-actions.pod:2698
28172 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
28176 #: ../src/guestfs-actions.pod:2700 ../src/guestfs-actions.pod:2913 ../src/guestfs-actions.pod:3395 ../src/guestfs-actions.pod:4199 ../src/guestfs-actions.pod:6280 ../src/guestfs-actions.pod:6306 ../src/guestfs-actions.pod:6487
28178 "This function returns a buffer, or NULL on error. The size of the returned "
28179 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
28184 #: ../src/guestfs-actions.pod:2704 ../src/guestfs-actions.pod:4203
28185 msgid "(Added in 1.7.24)"
28189 #: ../src/guestfs-actions.pod:2706
28190 msgid "guestfs_getxattrs"
28194 #: ../src/guestfs-actions.pod:2708
28197 " struct guestfs_xattr_list *\n"
28198 " guestfs_getxattrs (guestfs_h *g,\n"
28199 " const char *path);\n"
28204 #: ../src/guestfs-actions.pod:2718
28205 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
28209 #: ../src/guestfs-actions.pod:2720 ../src/guestfs-actions.pod:4215 ../src/guestfs-actions.pod:4907
28211 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
28212 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
28216 #: ../src/guestfs-actions.pod:2724 ../src/guestfs-actions.pod:4219 ../src/guestfs-actions.pod:4431 ../src/guestfs-actions.pod:4467 ../src/guestfs-actions.pod:6660 ../src/guestfs-actions.pod:7184 ../src/guestfs-actions.pod:8689
28217 msgid "(Added in 1.0.59)"
28221 #: ../src/guestfs-actions.pod:2726
28222 msgid "guestfs_glob_expand"
28226 #: ../src/guestfs-actions.pod:2728
28230 " guestfs_glob_expand (guestfs_h *g,\n"
28231 " const char *pattern);\n"
28236 #: ../src/guestfs-actions.pod:2747 ../src/guestfs-actions.pod:7368 ../src/guestfs-actions.pod:7385
28237 msgid "(Added in 1.0.50)"
28241 #: ../src/guestfs-actions.pod:2749
28242 msgid "guestfs_grep"
28246 #: ../src/guestfs-actions.pod:2751
28250 " guestfs_grep (guestfs_h *g,\n"
28251 " const char *regex,\n"
28252 " const char *path);\n"
28257 #: ../src/guestfs-actions.pod:2768
28258 msgid "guestfs_grepi"
28262 #: ../src/guestfs-actions.pod:2770
28266 " guestfs_grepi (guestfs_h *g,\n"
28267 " const char *regex,\n"
28268 " const char *path);\n"
28273 #: ../src/guestfs-actions.pod:2787
28274 msgid "guestfs_grub_install"
28278 #: ../src/guestfs-actions.pod:2789
28282 " guestfs_grub_install (guestfs_h *g,\n"
28283 " const char *root,\n"
28284 " const char *device);\n"
28289 #: ../src/guestfs-actions.pod:2832
28290 msgid "(Added in 1.0.17)"
28294 #: ../src/guestfs-actions.pod:2834
28295 msgid "guestfs_head"
28299 #: ../src/guestfs-actions.pod:2836
28303 " guestfs_head (guestfs_h *g,\n"
28304 " const char *path);\n"
28309 #: ../src/guestfs-actions.pod:2852
28310 msgid "guestfs_head_n"
28314 #: ../src/guestfs-actions.pod:2854
28318 " guestfs_head_n (guestfs_h *g,\n"
28320 " const char *path);\n"
28325 #: ../src/guestfs-actions.pod:2876
28326 msgid "guestfs_hexdump"
28330 #: ../src/guestfs-actions.pod:2878
28334 " guestfs_hexdump (guestfs_h *g,\n"
28335 " const char *path);\n"
28340 #: ../src/guestfs-actions.pod:2891 ../src/guestfs-actions.pod:7449 ../src/guestfs-actions.pod:7504
28341 msgid "(Added in 1.0.22)"
28345 #: ../src/guestfs-actions.pod:2893
28346 msgid "guestfs_initrd_cat"
28350 #: ../src/guestfs-actions.pod:2895
28354 " guestfs_initrd_cat (guestfs_h *g,\n"
28355 " const char *initrdpath,\n"
28356 " const char *filename,\n"
28357 " size_t *size_r);\n"
28362 #: ../src/guestfs-actions.pod:2911
28363 msgid "See also C<guestfs_initrd_list>."
28367 #: ../src/guestfs-actions.pod:2922
28368 msgid "guestfs_initrd_list"
28372 #: ../src/guestfs-actions.pod:2924
28376 " guestfs_initrd_list (guestfs_h *g,\n"
28377 " const char *path);\n"
28382 #: ../src/guestfs-actions.pod:2944
28383 msgid "guestfs_inotify_add_watch"
28387 #: ../src/guestfs-actions.pod:2946
28391 " guestfs_inotify_add_watch (guestfs_h *g,\n"
28392 " const char *path,\n"
28398 #: ../src/guestfs-actions.pod:2965
28399 msgid "guestfs_inotify_close"
28403 #: ../src/guestfs-actions.pod:2967
28407 " guestfs_inotify_close (guestfs_h *g);\n"
28412 #: ../src/guestfs-actions.pod:2978
28413 msgid "guestfs_inotify_files"
28417 #: ../src/guestfs-actions.pod:2980
28421 " guestfs_inotify_files (guestfs_h *g);\n"
28426 #: ../src/guestfs-actions.pod:2983
28428 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
28429 "returns a list of pathnames of objects that were touched. The returned "
28430 "pathnames are sorted and deduplicated."
28434 #: ../src/guestfs-actions.pod:2993
28435 msgid "guestfs_inotify_init"
28439 #: ../src/guestfs-actions.pod:2995
28443 " guestfs_inotify_init (guestfs_h *g,\n"
28444 " int maxevents);\n"
28449 #: ../src/guestfs-actions.pod:3003
28451 "C<maxevents> is the maximum number of events which will be queued up between "
28452 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
28453 "passed as C<0>, then the kernel (or previously set) default is used. For "
28454 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
28455 "throws away events, but records the fact that it threw them away by setting "
28456 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
28457 "C<guestfs_inotify_read>)."
28461 #: ../src/guestfs-actions.pod:3013
28463 "Before any events are generated, you have to add some watches to the "
28464 "internal watch list. See: C<guestfs_inotify_add_watch>, "
28465 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
28469 #: ../src/guestfs-actions.pod:3019
28471 "Queued up events should be read periodically by calling "
28472 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
28473 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
28474 "often enough then you risk the internal queue overflowing."
28478 #: ../src/guestfs-actions.pod:3026
28480 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
28481 "This also removes any watches automatically."
28485 #: ../src/guestfs-actions.pod:3039
28486 msgid "guestfs_inotify_read"
28490 #: ../src/guestfs-actions.pod:3041
28493 " struct guestfs_inotify_event_list *\n"
28494 " guestfs_inotify_read (guestfs_h *g);\n"
28499 #: ../src/guestfs-actions.pod:3055
28501 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
28502 "there was an error. I<The caller must call "
28503 "C<guestfs_free_inotify_event_list> after use>."
28507 #: ../src/guestfs-actions.pod:3061
28508 msgid "guestfs_inotify_rm_watch"
28512 #: ../src/guestfs-actions.pod:3063
28516 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
28522 #: ../src/guestfs-actions.pod:3067
28524 "Remove a previously defined inotify watch. See "
28525 "C<guestfs_inotify_add_watch>."
28529 #: ../src/guestfs-actions.pod:3074
28530 msgid "guestfs_inspect_get_arch"
28534 #: ../src/guestfs-actions.pod:3076
28538 " guestfs_inspect_get_arch (guestfs_h *g,\n"
28539 " const char *root);\n"
28544 #: ../src/guestfs-actions.pod:3080
28546 "This returns the architecture of the inspected operating system. The "
28547 "possible return values are listed under C<guestfs_file_architecture>."
28551 #: ../src/guestfs-actions.pod:3094
28552 msgid "guestfs_inspect_get_distro"
28556 #: ../src/guestfs-actions.pod:3096
28560 " guestfs_inspect_get_distro (guestfs_h *g,\n"
28561 " const char *root);\n"
28566 #: ../src/guestfs-actions.pod:3196
28567 msgid "guestfs_inspect_get_drive_mappings"
28571 #: ../src/guestfs-actions.pod:3198
28575 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
28576 " const char *root);\n"
28581 #: ../src/guestfs-actions.pod:3227
28583 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28584 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
28588 #: ../src/guestfs-actions.pod:3237 ../src/guestfs-actions.pod:3702
28589 msgid "(Added in 1.9.17)"
28593 #: ../src/guestfs-actions.pod:3239
28594 msgid "guestfs_inspect_get_filesystems"
28598 #: ../src/guestfs-actions.pod:3241
28602 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
28603 " const char *root);\n"
28608 #: ../src/guestfs-actions.pod:3253
28610 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28611 "C<guestfs_inspect_get_mountpoints>."
28615 #: ../src/guestfs-actions.pod:3262
28616 msgid "guestfs_inspect_get_format"
28620 #: ../src/guestfs-actions.pod:3264
28624 " guestfs_inspect_get_format (guestfs_h *g,\n"
28625 " const char *root);\n"
28630 #: ../src/guestfs-actions.pod:3298 ../src/guestfs-actions.pod:3738 ../src/guestfs-actions.pod:3754 ../src/guestfs-actions.pod:3772 ../src/guestfs-actions.pod:6698
28631 msgid "(Added in 1.9.4)"
28635 #: ../src/guestfs-actions.pod:3300
28636 msgid "guestfs_inspect_get_hostname"
28640 #: ../src/guestfs-actions.pod:3302
28644 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28645 " const char *root);\n"
28650 #: ../src/guestfs-actions.pod:3317
28651 msgid "(Added in 1.7.9)"
28655 #: ../src/guestfs-actions.pod:3319
28656 msgid "guestfs_inspect_get_icon"
28660 #: ../src/guestfs-actions.pod:3321
28664 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28665 " const char *root,\n"
28666 " size_t *size_r,\n"
28672 #: ../src/guestfs-actions.pod:3332
28675 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28676 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28681 #: ../src/guestfs-actions.pod:3399 ../src/guestfs-actions.pod:4233 ../src/guestfs-actions.pod:5630
28682 msgid "(Added in 1.11.12)"
28686 #: ../src/guestfs-actions.pod:3401
28687 msgid "guestfs_inspect_get_icon_va"
28691 #: ../src/guestfs-actions.pod:3403
28695 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28696 " const char *root,\n"
28697 " size_t *size_r,\n"
28698 " va_list args);\n"
28703 #: ../src/guestfs-actions.pod:3409
28704 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28708 #: ../src/guestfs-actions.pod:3413
28709 msgid "guestfs_inspect_get_icon_argv"
28713 #: ../src/guestfs-actions.pod:3415
28717 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28718 " const char *root,\n"
28719 " size_t *size_r,\n"
28720 " const struct guestfs_inspect_get_icon_argv "
28726 #: ../src/guestfs-actions.pod:3421
28727 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28731 #: ../src/guestfs-actions.pod:3425
28732 msgid "guestfs_inspect_get_major_version"
28736 #: ../src/guestfs-actions.pod:3427
28740 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28741 " const char *root);\n"
28746 #: ../src/guestfs-actions.pod:3449
28747 msgid "guestfs_inspect_get_minor_version"
28751 #: ../src/guestfs-actions.pod:3451
28755 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28756 " const char *root);\n"
28761 #: ../src/guestfs-actions.pod:3460
28763 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28764 "C<guestfs_inspect_get_major_version>."
28768 #: ../src/guestfs-actions.pod:3467
28769 msgid "guestfs_inspect_get_mountpoints"
28773 #: ../src/guestfs-actions.pod:3469
28777 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28778 " const char *root);\n"
28783 #: ../src/guestfs-actions.pod:3490
28785 "For operating systems like Windows which still use drive letters, this call "
28786 "will only return an entry for the first drive \"mounted on\" C</>. For "
28787 "information about the mapping of drive letters to partitions, see "
28788 "C<guestfs_inspect_get_drive_mappings>."
28792 #: ../src/guestfs-actions.pod:3496
28794 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28795 "C<guestfs_inspect_get_filesystems>."
28799 #: ../src/guestfs-actions.pod:3507
28800 msgid "guestfs_inspect_get_package_format"
28804 #: ../src/guestfs-actions.pod:3509
28808 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28809 " const char *root);\n"
28814 #: ../src/guestfs-actions.pod:3513
28816 "This function and C<guestfs_inspect_get_package_management> return the "
28817 "package format and package management tool used by the inspected operating "
28818 "system. For example for Fedora these functions would return C<rpm> (package "
28819 "format) and C<yum> (package management)."
28823 #: ../src/guestfs-actions.pod:3532 ../src/guestfs-actions.pod:3560
28824 msgid "(Added in 1.7.5)"
28828 #: ../src/guestfs-actions.pod:3534
28829 msgid "guestfs_inspect_get_package_management"
28833 #: ../src/guestfs-actions.pod:3536
28837 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28838 " const char *root);\n"
28843 #: ../src/guestfs-actions.pod:3540
28845 "C<guestfs_inspect_get_package_format> and this function return the package "
28846 "format and package management tool used by the inspected operating system. "
28847 "For example for Fedora these functions would return C<rpm> (package format) "
28848 "and C<yum> (package management)."
28852 #: ../src/guestfs-actions.pod:3562
28853 msgid "guestfs_inspect_get_product_name"
28857 #: ../src/guestfs-actions.pod:3564
28861 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28862 " const char *root);\n"
28867 #: ../src/guestfs-actions.pod:3583
28868 msgid "guestfs_inspect_get_product_variant"
28872 #: ../src/guestfs-actions.pod:3585
28876 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28877 " const char *root);\n"
28882 #: ../src/guestfs-actions.pod:3608
28884 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28885 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28889 #: ../src/guestfs-actions.pod:3615
28890 msgid "(Added in 1.9.13)"
28894 #: ../src/guestfs-actions.pod:3617
28895 msgid "guestfs_inspect_get_roots"
28899 #: ../src/guestfs-actions.pod:3619
28903 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28908 #: ../src/guestfs-actions.pod:3622
28910 "This function is a convenient way to get the list of root devices, as "
28911 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28912 "the whole inspection process."
28916 #: ../src/guestfs-actions.pod:3626
28918 "This returns an empty list if either no root devices were found or the "
28919 "caller has not called C<guestfs_inspect_os>."
28923 #: ../src/guestfs-actions.pod:3635
28924 msgid "(Added in 1.7.3)"
28928 #: ../src/guestfs-actions.pod:3637
28929 msgid "guestfs_inspect_get_type"
28933 #: ../src/guestfs-actions.pod:3639
28937 " guestfs_inspect_get_type (guestfs_h *g,\n"
28938 " const char *root);\n"
28943 #: ../src/guestfs-actions.pod:3684
28944 msgid "guestfs_inspect_get_windows_current_control_set"
28948 #: ../src/guestfs-actions.pod:3686
28952 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28953 " const char *root);\n"
28958 #: ../src/guestfs-actions.pod:3704
28959 msgid "guestfs_inspect_get_windows_systemroot"
28963 #: ../src/guestfs-actions.pod:3706
28967 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28968 " const char *root);\n"
28973 #: ../src/guestfs-actions.pod:3722
28974 msgid "(Added in 1.5.25)"
28978 #: ../src/guestfs-actions.pod:3724
28979 msgid "guestfs_inspect_is_live"
28983 #: ../src/guestfs-actions.pod:3726
28987 " guestfs_inspect_is_live (guestfs_h *g,\n"
28988 " const char *root);\n"
28993 #: ../src/guestfs-actions.pod:3730
28995 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28996 "disk), then this returns true if a live image was detected on the disk."
29000 #: ../src/guestfs-actions.pod:3740
29001 msgid "guestfs_inspect_is_multipart"
29005 #: ../src/guestfs-actions.pod:3742
29009 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
29010 " const char *root);\n"
29015 #: ../src/guestfs-actions.pod:3746
29017 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
29018 "disk), then this returns true if the disk is part of a set."
29022 #: ../src/guestfs-actions.pod:3756
29023 msgid "guestfs_inspect_is_netinst"
29027 #: ../src/guestfs-actions.pod:3758
29031 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
29032 " const char *root);\n"
29037 #: ../src/guestfs-actions.pod:3762
29039 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
29040 "disk), then this returns true if the disk is a network installer, ie. not a "
29041 "self-contained install CD but one which is likely to require network access "
29042 "to complete the install."
29046 #: ../src/guestfs-actions.pod:3774
29047 msgid "guestfs_inspect_list_applications"
29051 #: ../src/guestfs-actions.pod:3776
29054 " struct guestfs_application_list *\n"
29055 " guestfs_inspect_list_applications (guestfs_h *g,\n"
29056 " const char *root);\n"
29061 #: ../src/guestfs-actions.pod:3782
29063 "I<Note:> This call works differently from other parts of the inspection "
29064 "API. You have to call C<guestfs_inspect_os>, then "
29065 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
29066 "this. Listing applications is a significantly more difficult operation "
29067 "which requires access to the full filesystem. Also note that unlike the "
29068 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
29069 "the libguestfs handle, this call actually reads parts of the mounted "
29070 "filesystems during the call."
29074 #: ../src/guestfs-actions.pod:3872
29076 "This function returns a C<struct guestfs_application_list *>, or NULL if "
29077 "there was an error. I<The caller must call C<guestfs_free_application_list> "
29082 #: ../src/guestfs-actions.pod:3876
29083 msgid "(Added in 1.7.8)"
29087 #: ../src/guestfs-actions.pod:3878
29088 msgid "guestfs_inspect_os"
29092 #: ../src/guestfs-actions.pod:3880
29096 " guestfs_inspect_os (guestfs_h *g);\n"
29101 #: ../src/guestfs-actions.pod:3896
29103 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
29104 "functions in order to query further information about each operating system, "
29105 "such as the name and version."
29109 #: ../src/guestfs-actions.pod:3901
29111 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
29112 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
29113 "the contents. This should be called with no disks currently mounted. The "
29114 "function may also use Augeas, so any existing Augeas handle will be closed."
29118 #: ../src/guestfs-actions.pod:3913 ../src/guestfs-actions.pod:4244 ../src/guestfs-actions.pod:4339
29119 msgid "See also C<guestfs_list_filesystems>."
29123 #: ../src/guestfs-actions.pod:3921
29124 msgid "guestfs_is_blockdev"
29128 #: ../src/guestfs-actions.pod:3923
29132 " guestfs_is_blockdev (guestfs_h *g,\n"
29133 " const char *path);\n"
29138 #: ../src/guestfs-actions.pod:3930 ../src/guestfs-actions.pod:3959 ../src/guestfs-actions.pod:3989 ../src/guestfs-actions.pod:4004 ../src/guestfs-actions.pod:4020 ../src/guestfs-actions.pod:4076 ../src/guestfs-actions.pod:4091
29139 msgid "See also C<guestfs_stat>."
29143 #: ../src/guestfs-actions.pod:3934 ../src/guestfs-actions.pod:3963 ../src/guestfs-actions.pod:4008 ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4095
29144 msgid "(Added in 1.5.10)"
29148 #: ../src/guestfs-actions.pod:3936
29149 msgid "guestfs_is_busy"
29153 #: ../src/guestfs-actions.pod:3938
29157 " guestfs_is_busy (guestfs_h *g);\n"
29162 #: ../src/guestfs-actions.pod:3950
29163 msgid "guestfs_is_chardev"
29167 #: ../src/guestfs-actions.pod:3952
29171 " guestfs_is_chardev (guestfs_h *g,\n"
29172 " const char *path);\n"
29177 #: ../src/guestfs-actions.pod:3965
29178 msgid "guestfs_is_config"
29182 #: ../src/guestfs-actions.pod:3967
29186 " guestfs_is_config (guestfs_h *g);\n"
29191 #: ../src/guestfs-actions.pod:3979
29192 msgid "guestfs_is_dir"
29196 #: ../src/guestfs-actions.pod:3981
29200 " guestfs_is_dir (guestfs_h *g,\n"
29201 " const char *path);\n"
29206 #: ../src/guestfs-actions.pod:3995
29207 msgid "guestfs_is_fifo"
29211 #: ../src/guestfs-actions.pod:3997
29215 " guestfs_is_fifo (guestfs_h *g,\n"
29216 " const char *path);\n"
29221 #: ../src/guestfs-actions.pod:4010
29222 msgid "guestfs_is_file"
29226 #: ../src/guestfs-actions.pod:4012
29230 " guestfs_is_file (guestfs_h *g,\n"
29231 " const char *path);\n"
29236 #: ../src/guestfs-actions.pod:4026
29237 msgid "guestfs_is_launching"
29241 #: ../src/guestfs-actions.pod:4028
29245 " guestfs_is_launching (guestfs_h *g);\n"
29250 #: ../src/guestfs-actions.pod:4040
29251 msgid "guestfs_is_lv"
29255 #: ../src/guestfs-actions.pod:4042
29259 " guestfs_is_lv (guestfs_h *g,\n"
29260 " const char *device);\n"
29265 #: ../src/guestfs-actions.pod:4053
29266 msgid "guestfs_is_ready"
29270 #: ../src/guestfs-actions.pod:4055
29274 " guestfs_is_ready (guestfs_h *g);\n"
29279 #: ../src/guestfs-actions.pod:4067
29280 msgid "guestfs_is_socket"
29284 #: ../src/guestfs-actions.pod:4069
29288 " guestfs_is_socket (guestfs_h *g,\n"
29289 " const char *path);\n"
29294 #: ../src/guestfs-actions.pod:4082
29295 msgid "guestfs_is_symlink"
29299 #: ../src/guestfs-actions.pod:4084
29303 " guestfs_is_symlink (guestfs_h *g,\n"
29304 " const char *path);\n"
29309 #: ../src/guestfs-actions.pod:4097
29310 msgid "guestfs_is_zero"
29314 #: ../src/guestfs-actions.pod:4099
29318 " guestfs_is_zero (guestfs_h *g,\n"
29319 " const char *path);\n"
29324 #: ../src/guestfs-actions.pod:4108 ../src/guestfs-actions.pod:4122
29325 msgid "(Added in 1.11.8)"
29329 #: ../src/guestfs-actions.pod:4110
29330 msgid "guestfs_is_zero_device"
29334 #: ../src/guestfs-actions.pod:4112
29338 " guestfs_is_zero_device (guestfs_h *g,\n"
29339 " const char *device);\n"
29344 #: ../src/guestfs-actions.pod:4124
29345 msgid "guestfs_kill_subprocess"
29349 #: ../src/guestfs-actions.pod:4126
29353 " guestfs_kill_subprocess (guestfs_h *g);\n"
29358 #: ../src/guestfs-actions.pod:4135
29359 msgid "guestfs_launch"
29363 #: ../src/guestfs-actions.pod:4137
29367 " guestfs_launch (guestfs_h *g);\n"
29372 #: ../src/guestfs-actions.pod:4155
29373 msgid "guestfs_lchown"
29377 #: ../src/guestfs-actions.pod:4157
29381 " guestfs_lchown (guestfs_h *g,\n"
29384 " const char *path);\n"
29389 #: ../src/guestfs-actions.pod:4163
29391 "Change the file owner to C<owner> and group to C<group>. This is like "
29392 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
29393 "changed, not the target."
29397 #: ../src/guestfs-actions.pod:4175
29398 msgid "guestfs_lgetxattr"
29402 #: ../src/guestfs-actions.pod:4177
29406 " guestfs_lgetxattr (guestfs_h *g,\n"
29407 " const char *path,\n"
29408 " const char *name,\n"
29409 " size_t *size_r);\n"
29414 #: ../src/guestfs-actions.pod:4197
29415 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
29419 #: ../src/guestfs-actions.pod:4205
29420 msgid "guestfs_lgetxattrs"
29424 #: ../src/guestfs-actions.pod:4207
29427 " struct guestfs_xattr_list *\n"
29428 " guestfs_lgetxattrs (guestfs_h *g,\n"
29429 " const char *path);\n"
29434 #: ../src/guestfs-actions.pod:4211
29436 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
29437 "then it returns the extended attributes of the link itself."
29441 #: ../src/guestfs-actions.pod:4221
29442 msgid "guestfs_list_9p"
29446 #: ../src/guestfs-actions.pod:4223
29450 " guestfs_list_9p (guestfs_h *g);\n"
29455 #: ../src/guestfs-actions.pod:4235
29456 msgid "guestfs_list_devices"
29460 #: ../src/guestfs-actions.pod:4237
29464 " guestfs_list_devices (guestfs_h *g);\n"
29469 #: ../src/guestfs-actions.pod:4252
29470 msgid "guestfs_list_dm_devices"
29474 #: ../src/guestfs-actions.pod:4254
29478 " guestfs_list_dm_devices (guestfs_h *g);\n"
29483 #: ../src/guestfs-actions.pod:4259
29485 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
29486 "previous call to C<guestfs_luks_open>."
29490 #: ../src/guestfs-actions.pod:4262
29492 "Device mapper devices which correspond to logical volumes are I<not> "
29493 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
29498 #: ../src/guestfs-actions.pod:4270 ../src/guestfs-actions.pod:5869
29499 msgid "(Added in 1.11.15)"
29503 #: ../src/guestfs-actions.pod:4272
29504 msgid "guestfs_list_filesystems"
29508 #: ../src/guestfs-actions.pod:4274
29512 " guestfs_list_filesystems (guestfs_h *g);\n"
29517 #: ../src/guestfs-actions.pod:4294
29519 "This command runs other libguestfs commands, which might include "
29520 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
29521 "soon after launch and only when nothing is mounted."
29525 #: ../src/guestfs-actions.pod:4298
29527 "Not all of the filesystems returned will be mountable. In particular, swap "
29528 "partitions are returned in the list. Also this command does not check that "
29529 "each filesystem found is valid and mountable, and some filesystems might be "
29530 "mountable but require special options. Filesystems may not all belong to a "
29531 "single logical operating system (use C<guestfs_inspect_os> to look for "
29536 #: ../src/guestfs-actions.pod:4312 ../src/guestfs-actions.pod:6229
29537 msgid "(Added in 1.5.15)"
29541 #: ../src/guestfs-actions.pod:4314
29542 msgid "guestfs_list_md_devices"
29546 #: ../src/guestfs-actions.pod:4316
29550 " guestfs_list_md_devices (guestfs_h *g);\n"
29555 #: ../src/guestfs-actions.pod:4325 ../src/guestfs-actions.pod:7890
29556 msgid "(Added in 1.15.4)"
29560 #: ../src/guestfs-actions.pod:4327
29561 msgid "guestfs_list_partitions"
29565 #: ../src/guestfs-actions.pod:4329
29569 " guestfs_list_partitions (guestfs_h *g);\n"
29574 #: ../src/guestfs-actions.pod:4336
29576 "This does not return logical volumes. For that you will need to call "
29581 #: ../src/guestfs-actions.pod:4347
29586 #: ../src/guestfs-actions.pod:4349
29590 " guestfs_ll (guestfs_h *g,\n"
29591 " const char *directory);\n"
29596 #: ../src/guestfs-actions.pod:4364
29601 #: ../src/guestfs-actions.pod:4366
29605 " guestfs_ln (guestfs_h *g,\n"
29606 " const char *target,\n"
29607 " const char *linkname);\n"
29612 #: ../src/guestfs-actions.pod:4377
29613 msgid "guestfs_ln_f"
29617 #: ../src/guestfs-actions.pod:4379
29621 " guestfs_ln_f (guestfs_h *g,\n"
29622 " const char *target,\n"
29623 " const char *linkname);\n"
29628 #: ../src/guestfs-actions.pod:4391
29629 msgid "guestfs_ln_s"
29633 #: ../src/guestfs-actions.pod:4393
29637 " guestfs_ln_s (guestfs_h *g,\n"
29638 " const char *target,\n"
29639 " const char *linkname);\n"
29644 #: ../src/guestfs-actions.pod:4404
29645 msgid "guestfs_ln_sf"
29649 #: ../src/guestfs-actions.pod:4406
29653 " guestfs_ln_sf (guestfs_h *g,\n"
29654 " const char *target,\n"
29655 " const char *linkname);\n"
29660 #: ../src/guestfs-actions.pod:4418
29661 msgid "guestfs_lremovexattr"
29665 #: ../src/guestfs-actions.pod:4420
29669 " guestfs_lremovexattr (guestfs_h *g,\n"
29670 " const char *xattr,\n"
29671 " const char *path);\n"
29676 #: ../src/guestfs-actions.pod:4425
29678 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29679 "link, then it removes an extended attribute of the link itself."
29683 #: ../src/guestfs-actions.pod:4433
29688 #: ../src/guestfs-actions.pod:4435
29692 " guestfs_ls (guestfs_h *g,\n"
29693 " const char *directory);\n"
29698 #: ../src/guestfs-actions.pod:4443
29700 "This command is mostly useful for interactive sessions. Programs should "
29701 "probably use C<guestfs_readdir> instead."
29705 #: ../src/guestfs-actions.pod:4452
29706 msgid "guestfs_lsetxattr"
29710 #: ../src/guestfs-actions.pod:4454
29714 " guestfs_lsetxattr (guestfs_h *g,\n"
29715 " const char *xattr,\n"
29716 " const char *val,\n"
29718 " const char *path);\n"
29723 #: ../src/guestfs-actions.pod:4461
29725 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29726 "then it sets an extended attribute of the link itself."
29730 #: ../src/guestfs-actions.pod:4469
29731 msgid "guestfs_lstat"
29735 #: ../src/guestfs-actions.pod:4471
29738 " struct guestfs_stat *\n"
29739 " guestfs_lstat (guestfs_h *g,\n"
29740 " const char *path);\n"
29745 #: ../src/guestfs-actions.pod:4477
29747 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29748 "link, then the link is stat-ed, not the file it refers to."
29752 #: ../src/guestfs-actions.pod:4483 ../src/guestfs-actions.pod:7409
29754 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29755 "error. I<The caller must call C<guestfs_free_stat> after use>."
29759 #: ../src/guestfs-actions.pod:4487 ../src/guestfs-actions.pod:7413 ../src/guestfs-actions.pod:7431 ../src/guestfs-actions.pod:7934
29760 msgid "(Added in 0.9.2)"
29764 #: ../src/guestfs-actions.pod:4489
29765 msgid "guestfs_lstatlist"
29769 #: ../src/guestfs-actions.pod:4491
29772 " struct guestfs_stat_list *\n"
29773 " guestfs_lstatlist (guestfs_h *g,\n"
29774 " const char *path,\n"
29775 " char *const *names);\n"
29780 #: ../src/guestfs-actions.pod:4496
29782 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29783 "files, where all files are in the directory C<path>. C<names> is the list "
29784 "of files from this directory."
29788 #: ../src/guestfs-actions.pod:4505
29790 "This call is intended for programs that want to efficiently list a directory "
29791 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
29792 "for a similarly efficient call for getting extended attributes. Very long "
29793 "directory listings might cause the protocol message size to be exceeded, "
29794 "causing this call to fail. The caller must split up such requests into "
29795 "smaller groups of names."
29799 #: ../src/guestfs-actions.pod:4513
29801 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29802 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29806 #: ../src/guestfs-actions.pod:4519
29807 msgid "guestfs_luks_add_key"
29811 #: ../src/guestfs-actions.pod:4521
29815 " guestfs_luks_add_key (guestfs_h *g,\n"
29816 " const char *device,\n"
29817 " const char *key,\n"
29818 " const char *newkey,\n"
29824 #: ../src/guestfs-actions.pod:4533
29826 "Note that if C<keyslot> already contains a key, then this command will "
29827 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
29831 #: ../src/guestfs-actions.pod:4539 ../src/guestfs-actions.pod:4576 ../src/guestfs-actions.pod:4596 ../src/guestfs-actions.pod:4616 ../src/guestfs-actions.pod:4651 ../src/guestfs-actions.pod:4670
29833 "This function takes a key or passphrase parameter which could contain "
29834 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29839 #: ../src/guestfs-actions.pod:4543 ../src/guestfs-actions.pod:4580 ../src/guestfs-actions.pod:4600 ../src/guestfs-actions.pod:4620
29840 msgid "(Added in 1.5.2)"
29844 #: ../src/guestfs-actions.pod:4545
29845 msgid "guestfs_luks_close"
29849 #: ../src/guestfs-actions.pod:4547
29853 " guestfs_luks_close (guestfs_h *g,\n"
29854 " const char *device);\n"
29859 #: ../src/guestfs-actions.pod:4551
29861 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29862 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
29863 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
29864 "underlying block device."
29868 #: ../src/guestfs-actions.pod:4559 ../src/guestfs-actions.pod:4655 ../src/guestfs-actions.pod:4674 ../src/guestfs-actions.pod:4724 ../src/guestfs-actions.pod:4769
29869 msgid "(Added in 1.5.1)"
29873 #: ../src/guestfs-actions.pod:4561
29874 msgid "guestfs_luks_format"
29878 #: ../src/guestfs-actions.pod:4563
29882 " guestfs_luks_format (guestfs_h *g,\n"
29883 " const char *device,\n"
29884 " const char *key,\n"
29890 #: ../src/guestfs-actions.pod:4582
29891 msgid "guestfs_luks_format_cipher"
29895 #: ../src/guestfs-actions.pod:4584
29899 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29900 " const char *device,\n"
29901 " const char *key,\n"
29903 " const char *cipher);\n"
29908 #: ../src/guestfs-actions.pod:4591
29910 "This command is the same as C<guestfs_luks_format> but it also allows you to "
29911 "set the C<cipher> used."
29915 #: ../src/guestfs-actions.pod:4602
29916 msgid "guestfs_luks_kill_slot"
29920 #: ../src/guestfs-actions.pod:4604
29924 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29925 " const char *device,\n"
29926 " const char *key,\n"
29932 #: ../src/guestfs-actions.pod:4622
29933 msgid "guestfs_luks_open"
29937 #: ../src/guestfs-actions.pod:4624
29941 " guestfs_luks_open (guestfs_h *g,\n"
29942 " const char *device,\n"
29943 " const char *key,\n"
29944 " const char *mapname);\n"
29949 #: ../src/guestfs-actions.pod:4642
29951 "If this block device contains LVM volume groups, then calling "
29952 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29957 #: ../src/guestfs-actions.pod:4646
29958 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29962 #: ../src/guestfs-actions.pod:4657
29963 msgid "guestfs_luks_open_ro"
29967 #: ../src/guestfs-actions.pod:4659
29971 " guestfs_luks_open_ro (guestfs_h *g,\n"
29972 " const char *device,\n"
29973 " const char *key,\n"
29974 " const char *mapname);\n"
29979 #: ../src/guestfs-actions.pod:4665
29981 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29986 #: ../src/guestfs-actions.pod:4676
29987 msgid "guestfs_lvcreate"
29991 #: ../src/guestfs-actions.pod:4678
29995 " guestfs_lvcreate (guestfs_h *g,\n"
29996 " const char *logvol,\n"
29997 " const char *volgroup,\n"
30003 #: ../src/guestfs-actions.pod:4691
30004 msgid "guestfs_lvm_canonical_lv_name"
30008 #: ../src/guestfs-actions.pod:4693
30012 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
30013 " const char *lvname);\n"
30018 #: ../src/guestfs-actions.pod:4704
30019 msgid "See also C<guestfs_is_lv>."
30023 #: ../src/guestfs-actions.pod:4709
30024 msgid "(Added in 1.5.24)"
30028 #: ../src/guestfs-actions.pod:4711
30029 msgid "guestfs_lvm_clear_filter"
30033 #: ../src/guestfs-actions.pod:4713
30037 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
30042 #: ../src/guestfs-actions.pod:4716
30044 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
30045 "see every block device."
30049 #: ../src/guestfs-actions.pod:4726
30050 msgid "guestfs_lvm_remove_all"
30054 #: ../src/guestfs-actions.pod:4728
30058 " guestfs_lvm_remove_all (guestfs_h *g);\n"
30063 #: ../src/guestfs-actions.pod:4738
30064 msgid "guestfs_lvm_set_filter"
30068 #: ../src/guestfs-actions.pod:4740
30072 " guestfs_lvm_set_filter (guestfs_h *g,\n"
30073 " char *const *devices);\n"
30078 #: ../src/guestfs-actions.pod:4771
30079 msgid "guestfs_lvremove"
30083 #: ../src/guestfs-actions.pod:4773
30087 " guestfs_lvremove (guestfs_h *g,\n"
30088 " const char *device);\n"
30093 #: ../src/guestfs-actions.pod:4785 ../src/guestfs-actions.pod:6344 ../src/guestfs-actions.pod:8304
30094 msgid "(Added in 1.0.13)"
30098 #: ../src/guestfs-actions.pod:4787
30099 msgid "guestfs_lvrename"
30103 #: ../src/guestfs-actions.pod:4789
30107 " guestfs_lvrename (guestfs_h *g,\n"
30108 " const char *logvol,\n"
30109 " const char *newlogvol);\n"
30114 #: ../src/guestfs-actions.pod:4798 ../src/guestfs-actions.pod:8317
30115 msgid "(Added in 1.0.83)"
30119 #: ../src/guestfs-actions.pod:4800
30120 msgid "guestfs_lvresize"
30124 #: ../src/guestfs-actions.pod:4802
30128 " guestfs_lvresize (guestfs_h *g,\n"
30129 " const char *device,\n"
30135 #: ../src/guestfs-actions.pod:4815
30136 msgid "guestfs_lvresize_free"
30140 #: ../src/guestfs-actions.pod:4817
30144 " guestfs_lvresize_free (guestfs_h *g,\n"
30145 " const char *lv,\n"
30151 #: ../src/guestfs-actions.pod:4830
30152 msgid "(Added in 1.3.3)"
30156 #: ../src/guestfs-actions.pod:4832
30157 msgid "guestfs_lvs"
30161 #: ../src/guestfs-actions.pod:4834
30165 " guestfs_lvs (guestfs_h *g);\n"
30170 #: ../src/guestfs-actions.pod:4843
30171 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
30175 #: ../src/guestfs-actions.pod:4851
30176 msgid "guestfs_lvs_full"
30180 #: ../src/guestfs-actions.pod:4853
30183 " struct guestfs_lvm_lv_list *\n"
30184 " guestfs_lvs_full (guestfs_h *g);\n"
30189 #: ../src/guestfs-actions.pod:4859
30191 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
30192 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
30197 #: ../src/guestfs-actions.pod:4865
30198 msgid "guestfs_lvuuid"
30202 #: ../src/guestfs-actions.pod:4867
30206 " guestfs_lvuuid (guestfs_h *g,\n"
30207 " const char *device);\n"
30212 #: ../src/guestfs-actions.pod:4878
30213 msgid "guestfs_lxattrlist"
30217 #: ../src/guestfs-actions.pod:4880
30220 " struct guestfs_xattr_list *\n"
30221 " guestfs_lxattrlist (guestfs_h *g,\n"
30222 " const char *path,\n"
30223 " char *const *names);\n"
30228 #: ../src/guestfs-actions.pod:4899
30230 "This call is intended for programs that want to efficiently list a directory "
30231 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
30232 "a similarly efficient call for getting standard stats. Very long directory "
30233 "listings might cause the protocol message size to be exceeded, causing this "
30234 "call to fail. The caller must split up such requests into smaller groups of "
30239 #: ../src/guestfs-actions.pod:4913
30240 msgid "guestfs_md_create"
30244 #: ../src/guestfs-actions.pod:4915
30248 " guestfs_md_create (guestfs_h *g,\n"
30249 " const char *name,\n"
30250 " char *const *devices,\n"
30256 #: ../src/guestfs-actions.pod:4926
30259 " GUESTFS_MD_CREATE_MISSINGBITMAP, int64_t missingbitmap,\n"
30260 " GUESTFS_MD_CREATE_NRDEVICES, int nrdevices,\n"
30261 " GUESTFS_MD_CREATE_SPARE, int spare,\n"
30262 " GUESTFS_MD_CREATE_CHUNK, int64_t chunk,\n"
30263 " GUESTFS_MD_CREATE_LEVEL, const char *level,\n"
30268 #: ../src/guestfs-actions.pod:4988
30269 msgid "guestfs_md_create_va"
30273 #: ../src/guestfs-actions.pod:4990
30277 " guestfs_md_create_va (guestfs_h *g,\n"
30278 " const char *name,\n"
30279 " char *const *devices,\n"
30280 " va_list args);\n"
30285 #: ../src/guestfs-actions.pod:4996
30286 msgid "This is the \"va_list variant\" of L</guestfs_md_create>."
30290 #: ../src/guestfs-actions.pod:5000
30291 msgid "guestfs_md_create_argv"
30295 #: ../src/guestfs-actions.pod:5002
30299 " guestfs_md_create_argv (guestfs_h *g,\n"
30300 " const char *name,\n"
30301 " char *const *devices,\n"
30302 " const struct guestfs_md_create_argv *optargs);\n"
30307 #: ../src/guestfs-actions.pod:5008
30308 msgid "This is the \"argv variant\" of L</guestfs_md_create>."
30312 #: ../src/guestfs-actions.pod:5012
30313 msgid "guestfs_md_detail"
30317 #: ../src/guestfs-actions.pod:5014
30321 " guestfs_md_detail (guestfs_h *g,\n"
30322 " const char *md);\n"
30327 #: ../src/guestfs-actions.pod:5051
30328 msgid "guestfs_md_stop"
30332 #: ../src/guestfs-actions.pod:5053
30336 " guestfs_md_stop (guestfs_h *g,\n"
30337 " const char *md);\n"
30342 #: ../src/guestfs-actions.pod:5062
30343 msgid "guestfs_mkdir"
30347 #: ../src/guestfs-actions.pod:5064
30351 " guestfs_mkdir (guestfs_h *g,\n"
30352 " const char *path);\n"
30357 #: ../src/guestfs-actions.pod:5074
30358 msgid "guestfs_mkdir_mode"
30362 #: ../src/guestfs-actions.pod:5076
30366 " guestfs_mkdir_mode (guestfs_h *g,\n"
30367 " const char *path,\n"
30373 #: ../src/guestfs-actions.pod:5088
30374 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
30378 #: ../src/guestfs-actions.pod:5094
30379 msgid "guestfs_mkdir_p"
30383 #: ../src/guestfs-actions.pod:5096
30387 " guestfs_mkdir_p (guestfs_h *g,\n"
30388 " const char *path);\n"
30393 #: ../src/guestfs-actions.pod:5107
30394 msgid "guestfs_mkdtemp"
30398 #: ../src/guestfs-actions.pod:5109
30402 " guestfs_mkdtemp (guestfs_h *g,\n"
30403 " const char *template);\n"
30408 #: ../src/guestfs-actions.pod:5137
30409 msgid "guestfs_mke2fs_J"
30413 #: ../src/guestfs-actions.pod:5139
30417 " guestfs_mke2fs_J (guestfs_h *g,\n"
30418 " const char *fstype,\n"
30419 " int blocksize,\n"
30420 " const char *device,\n"
30421 " const char *journal);\n"
30426 #: ../src/guestfs-actions.pod:5152
30427 msgid "See also C<guestfs_mke2journal>."
30431 #: ../src/guestfs-actions.pod:5156 ../src/guestfs-actions.pod:5174 ../src/guestfs-actions.pod:5192 ../src/guestfs-actions.pod:5208 ../src/guestfs-actions.pod:5222 ../src/guestfs-actions.pod:5236 ../src/guestfs-actions.pod:5295 ../src/guestfs-actions.pod:5572
30432 msgid "(Added in 1.0.68)"
30436 #: ../src/guestfs-actions.pod:5158
30437 msgid "guestfs_mke2fs_JL"
30441 #: ../src/guestfs-actions.pod:5160
30445 " guestfs_mke2fs_JL (guestfs_h *g,\n"
30446 " const char *fstype,\n"
30447 " int blocksize,\n"
30448 " const char *device,\n"
30449 " const char *label);\n"
30454 #: ../src/guestfs-actions.pod:5170
30455 msgid "See also C<guestfs_mke2journal_L>."
30459 #: ../src/guestfs-actions.pod:5176
30460 msgid "guestfs_mke2fs_JU"
30464 #: ../src/guestfs-actions.pod:5178
30468 " guestfs_mke2fs_JU (guestfs_h *g,\n"
30469 " const char *fstype,\n"
30470 " int blocksize,\n"
30471 " const char *device,\n"
30472 " const char *uuid);\n"
30477 #: ../src/guestfs-actions.pod:5188
30478 msgid "See also C<guestfs_mke2journal_U>."
30482 #: ../src/guestfs-actions.pod:5194
30483 msgid "guestfs_mke2journal"
30487 #: ../src/guestfs-actions.pod:5196
30491 " guestfs_mke2journal (guestfs_h *g,\n"
30492 " int blocksize,\n"
30493 " const char *device);\n"
30498 #: ../src/guestfs-actions.pod:5210
30499 msgid "guestfs_mke2journal_L"
30503 #: ../src/guestfs-actions.pod:5212
30507 " guestfs_mke2journal_L (guestfs_h *g,\n"
30508 " int blocksize,\n"
30509 " const char *label,\n"
30510 " const char *device);\n"
30515 #: ../src/guestfs-actions.pod:5224
30516 msgid "guestfs_mke2journal_U"
30520 #: ../src/guestfs-actions.pod:5226
30524 " guestfs_mke2journal_U (guestfs_h *g,\n"
30525 " int blocksize,\n"
30526 " const char *uuid,\n"
30527 " const char *device);\n"
30532 #: ../src/guestfs-actions.pod:5238
30533 msgid "guestfs_mkfifo"
30537 #: ../src/guestfs-actions.pod:5240
30541 " guestfs_mkfifo (guestfs_h *g,\n"
30543 " const char *path);\n"
30548 #: ../src/guestfs-actions.pod:5245
30550 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
30551 "is just a convenient wrapper around C<guestfs_mknod>."
30555 #: ../src/guestfs-actions.pod:5255
30556 msgid "guestfs_mkfs"
30560 #: ../src/guestfs-actions.pod:5257
30564 " guestfs_mkfs (guestfs_h *g,\n"
30565 " const char *fstype,\n"
30566 " const char *device);\n"
30571 #: ../src/guestfs-actions.pod:5270
30572 msgid "guestfs_mkfs_b"
30576 #: ../src/guestfs-actions.pod:5272
30580 " guestfs_mkfs_b (guestfs_h *g,\n"
30581 " const char *fstype,\n"
30582 " int blocksize,\n"
30583 " const char *device);\n"
30588 #: ../src/guestfs-actions.pod:5278
30590 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
30595 #: ../src/guestfs-actions.pod:5285
30597 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
30598 "block size of the resulting filesystem. Supported block sizes depend on the "
30599 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
30603 #: ../src/guestfs-actions.pod:5297
30604 msgid "guestfs_mkfs_opts"
30608 #: ../src/guestfs-actions.pod:5299
30612 " guestfs_mkfs_opts (guestfs_h *g,\n"
30613 " const char *fstype,\n"
30614 " const char *device,\n"
30620 #: ../src/guestfs-actions.pod:5310
30623 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
30624 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
30625 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
30626 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
30631 #: ../src/guestfs-actions.pod:5358
30632 msgid "(Added in 1.7.19)"
30636 #: ../src/guestfs-actions.pod:5360
30637 msgid "guestfs_mkfs_opts_va"
30641 #: ../src/guestfs-actions.pod:5362
30645 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
30646 " const char *fstype,\n"
30647 " const char *device,\n"
30648 " va_list args);\n"
30653 #: ../src/guestfs-actions.pod:5368
30654 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
30658 #: ../src/guestfs-actions.pod:5372
30659 msgid "guestfs_mkfs_opts_argv"
30663 #: ../src/guestfs-actions.pod:5374
30667 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
30668 " const char *fstype,\n"
30669 " const char *device,\n"
30670 " const struct guestfs_mkfs_opts_argv *optargs);\n"
30675 #: ../src/guestfs-actions.pod:5380
30676 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
30680 #: ../src/guestfs-actions.pod:5384
30681 msgid "guestfs_mkmountpoint"
30685 #: ../src/guestfs-actions.pod:5386
30689 " guestfs_mkmountpoint (guestfs_h *g,\n"
30690 " const char *exemptpath);\n"
30695 #: ../src/guestfs-actions.pod:5390
30697 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
30698 "that can be used to create extra mountpoints before mounting the first "
30703 #: ../src/guestfs-actions.pod:5414
30705 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
30706 "may get unexpected errors if you try to mix these calls. It is safest to "
30707 "manually unmount filesystems and remove mountpoints after use."
30711 #: ../src/guestfs-actions.pod:5418
30713 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
30714 "first, so for this to work for manual mountpoints, you must ensure that the "
30715 "innermost mountpoints have the longest pathnames, as in the example code "
30720 #: ../src/guestfs-actions.pod:5425
30722 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
30723 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
30724 "can also trigger these issues."
30728 #: ../src/guestfs-actions.pod:5431 ../src/guestfs-actions.pod:5737 ../src/guestfs-actions.pod:6764
30729 msgid "(Added in 1.0.62)"
30733 #: ../src/guestfs-actions.pod:5433
30734 msgid "guestfs_mknod"
30738 #: ../src/guestfs-actions.pod:5435
30742 " guestfs_mknod (guestfs_h *g,\n"
30746 " const char *path);\n"
30751 #: ../src/guestfs-actions.pod:5450
30753 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30754 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30755 "regular file). These constants are available in the standard Linux header "
30756 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30757 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
30758 "the appropriate constant for you."
30762 #: ../src/guestfs-actions.pod:5464
30763 msgid "guestfs_mknod_b"
30767 #: ../src/guestfs-actions.pod:5466
30771 " guestfs_mknod_b (guestfs_h *g,\n"
30775 " const char *path);\n"
30780 #: ../src/guestfs-actions.pod:5473
30782 "This call creates a block device node called C<path> with mode C<mode> and "
30783 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30784 "wrapper around C<guestfs_mknod>."
30788 #: ../src/guestfs-actions.pod:5483
30789 msgid "guestfs_mknod_c"
30793 #: ../src/guestfs-actions.pod:5485
30797 " guestfs_mknod_c (guestfs_h *g,\n"
30801 " const char *path);\n"
30806 #: ../src/guestfs-actions.pod:5492
30808 "This call creates a char device node called C<path> with mode C<mode> and "
30809 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30810 "wrapper around C<guestfs_mknod>."
30814 #: ../src/guestfs-actions.pod:5502
30815 msgid "guestfs_mkswap"
30819 #: ../src/guestfs-actions.pod:5504
30823 " guestfs_mkswap (guestfs_h *g,\n"
30824 " const char *device);\n"
30829 #: ../src/guestfs-actions.pod:5514
30830 msgid "guestfs_mkswap_L"
30834 #: ../src/guestfs-actions.pod:5516
30838 " guestfs_mkswap_L (guestfs_h *g,\n"
30839 " const char *label,\n"
30840 " const char *device);\n"
30845 #: ../src/guestfs-actions.pod:5531
30846 msgid "guestfs_mkswap_U"
30850 #: ../src/guestfs-actions.pod:5533
30854 " guestfs_mkswap_U (guestfs_h *g,\n"
30855 " const char *uuid,\n"
30856 " const char *device);\n"
30861 #: ../src/guestfs-actions.pod:5544
30862 msgid "guestfs_mkswap_file"
30866 #: ../src/guestfs-actions.pod:5546
30870 " guestfs_mkswap_file (guestfs_h *g,\n"
30871 " const char *path);\n"
30876 #: ../src/guestfs-actions.pod:5552
30878 "This command just writes a swap file signature to an existing file. To "
30879 "create the file itself, use something like C<guestfs_fallocate>."
30883 #: ../src/guestfs-actions.pod:5559
30884 msgid "guestfs_modprobe"
30888 #: ../src/guestfs-actions.pod:5561
30892 " guestfs_modprobe (guestfs_h *g,\n"
30893 " const char *modulename);\n"
30898 #: ../src/guestfs-actions.pod:5574
30899 msgid "guestfs_mount"
30903 #: ../src/guestfs-actions.pod:5576
30907 " guestfs_mount (guestfs_h *g,\n"
30908 " const char *device,\n"
30909 " const char *mountpoint);\n"
30914 #: ../src/guestfs-actions.pod:5595
30916 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30917 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30918 "problems for users. If your program might need to work with older versions "
30919 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30920 "for the first parameter if you don't want any options)."
30924 #: ../src/guestfs-actions.pod:5606
30925 msgid "guestfs_mount_9p"
30929 #: ../src/guestfs-actions.pod:5608
30933 " guestfs_mount_9p (guestfs_h *g,\n"
30934 " const char *mounttag,\n"
30935 " const char *mountpoint,\n"
30941 #: ../src/guestfs-actions.pod:5619
30944 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30949 #: ../src/guestfs-actions.pod:5632
30950 msgid "guestfs_mount_9p_va"
30954 #: ../src/guestfs-actions.pod:5634
30958 " guestfs_mount_9p_va (guestfs_h *g,\n"
30959 " const char *mounttag,\n"
30960 " const char *mountpoint,\n"
30961 " va_list args);\n"
30966 #: ../src/guestfs-actions.pod:5640
30967 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30971 #: ../src/guestfs-actions.pod:5644
30972 msgid "guestfs_mount_9p_argv"
30976 #: ../src/guestfs-actions.pod:5646
30980 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30981 " const char *mounttag,\n"
30982 " const char *mountpoint,\n"
30983 " const struct guestfs_mount_9p_argv *optargs);\n"
30988 #: ../src/guestfs-actions.pod:5652
30989 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30993 #: ../src/guestfs-actions.pod:5656
30994 msgid "guestfs_mount_loop"
30998 #: ../src/guestfs-actions.pod:5658
31002 " guestfs_mount_loop (guestfs_h *g,\n"
31003 " const char *file,\n"
31004 " const char *mountpoint);\n"
31009 #: ../src/guestfs-actions.pod:5671
31010 msgid "guestfs_mount_options"
31014 #: ../src/guestfs-actions.pod:5673
31018 " guestfs_mount_options (guestfs_h *g,\n"
31019 " const char *options,\n"
31020 " const char *device,\n"
31021 " const char *mountpoint);\n"
31026 #: ../src/guestfs-actions.pod:5679
31028 "This is the same as the C<guestfs_mount> command, but it allows you to set "
31029 "the mount options as for the L<mount(8)> I<-o> flag."
31033 #: ../src/guestfs-actions.pod:5689 ../src/guestfs-actions.pod:5703 ../src/guestfs-actions.pod:5720
31034 msgid "(Added in 1.0.10)"
31038 #: ../src/guestfs-actions.pod:5691
31039 msgid "guestfs_mount_ro"
31043 #: ../src/guestfs-actions.pod:5693
31047 " guestfs_mount_ro (guestfs_h *g,\n"
31048 " const char *device,\n"
31049 " const char *mountpoint);\n"
31054 #: ../src/guestfs-actions.pod:5698
31056 "This is the same as the C<guestfs_mount> command, but it mounts the "
31057 "filesystem with the read-only (I<-o ro>) flag."
31061 #: ../src/guestfs-actions.pod:5705
31062 msgid "guestfs_mount_vfs"
31066 #: ../src/guestfs-actions.pod:5707
31070 " guestfs_mount_vfs (guestfs_h *g,\n"
31071 " const char *options,\n"
31072 " const char *vfstype,\n"
31073 " const char *device,\n"
31074 " const char *mountpoint);\n"
31079 #: ../src/guestfs-actions.pod:5714
31081 "This is the same as the C<guestfs_mount> command, but it allows you to set "
31082 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
31087 #: ../src/guestfs-actions.pod:5722
31088 msgid "guestfs_mountpoints"
31092 #: ../src/guestfs-actions.pod:5724
31096 " guestfs_mountpoints (guestfs_h *g);\n"
31101 #: ../src/guestfs-actions.pod:5727
31103 "This call is similar to C<guestfs_mounts>. That call returns a list of "
31104 "devices. This one returns a hash table (map) of device name to directory "
31105 "where the device is mounted."
31109 #: ../src/guestfs-actions.pod:5739
31110 msgid "guestfs_mounts"
31114 #: ../src/guestfs-actions.pod:5741
31118 " guestfs_mounts (guestfs_h *g);\n"
31123 #: ../src/guestfs-actions.pod:5749
31124 msgid "See also: C<guestfs_mountpoints>"
31128 #: ../src/guestfs-actions.pod:5757
31133 #: ../src/guestfs-actions.pod:5759
31137 " guestfs_mv (guestfs_h *g,\n"
31138 " const char *src,\n"
31139 " const char *dest);\n"
31144 #: ../src/guestfs-actions.pod:5771
31145 msgid "guestfs_ntfs_3g_probe"
31149 #: ../src/guestfs-actions.pod:5773
31153 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
31155 " const char *device);\n"
31160 #: ../src/guestfs-actions.pod:5792
31161 msgid "(Added in 1.0.43)"
31165 #: ../src/guestfs-actions.pod:5794
31166 msgid "guestfs_ntfsresize"
31170 #: ../src/guestfs-actions.pod:5796
31174 " guestfs_ntfsresize (guestfs_h *g,\n"
31175 " const char *device);\n"
31180 #: ../src/guestfs-actions.pod:5800 ../src/guestfs-actions.pod:5900
31182 "I<This function is deprecated.> In new code, use the "
31183 "L</guestfs_ntfsresize_opts> call instead."
31187 #: ../src/guestfs-actions.pod:5824
31188 msgid "guestfs_ntfsresize_opts"
31192 #: ../src/guestfs-actions.pod:5826
31196 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
31197 " const char *device,\n"
31203 #: ../src/guestfs-actions.pod:5836
31206 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
31207 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
31212 #: ../src/guestfs-actions.pod:5856
31214 "After the resize operation, the filesystem is always marked as requiring a "
31215 "consistency check (for safety). You have to boot into Windows to perform "
31216 "this check and clear this condition. If you I<don't> set the C<force> "
31217 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
31218 "times on a single filesystem without booting into Windows between each "
31223 #: ../src/guestfs-actions.pod:5871
31224 msgid "guestfs_ntfsresize_opts_va"
31228 #: ../src/guestfs-actions.pod:5873
31232 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
31233 " const char *device,\n"
31234 " va_list args);\n"
31239 #: ../src/guestfs-actions.pod:5878
31240 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
31244 #: ../src/guestfs-actions.pod:5882
31245 msgid "guestfs_ntfsresize_opts_argv"
31249 #: ../src/guestfs-actions.pod:5884
31253 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
31254 " const char *device,\n"
31255 " const struct guestfs_ntfsresize_opts_argv "
31261 #: ../src/guestfs-actions.pod:5889
31262 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
31266 #: ../src/guestfs-actions.pod:5893
31267 msgid "guestfs_ntfsresize_size"
31271 #: ../src/guestfs-actions.pod:5895
31275 " guestfs_ntfsresize_size (guestfs_h *g,\n"
31276 " const char *device,\n"
31277 " int64_t size);\n"
31282 #: ../src/guestfs-actions.pod:5907
31284 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
31285 "to specify the new size (in bytes) explicitly."
31289 #: ../src/guestfs-actions.pod:5912 ../src/guestfs-actions.pod:6371 ../src/guestfs-actions.pod:6444 ../src/guestfs-actions.pod:6712 ../src/guestfs-actions.pod:8461
31290 msgid "(Added in 1.3.14)"
31294 #: ../src/guestfs-actions.pod:5914
31295 msgid "guestfs_part_add"
31299 #: ../src/guestfs-actions.pod:5916
31303 " guestfs_part_add (guestfs_h *g,\n"
31304 " const char *device,\n"
31305 " const char *prlogex,\n"
31306 " int64_t startsect,\n"
31307 " int64_t endsect);\n"
31312 #: ../src/guestfs-actions.pod:5923
31314 "This command adds a partition to C<device>. If there is no partition table "
31315 "on the device, call C<guestfs_part_init> first."
31319 #: ../src/guestfs-actions.pod:5935
31321 "Creating a partition which covers the whole disk is not so easy. Use "
31322 "C<guestfs_part_disk> to do that."
31326 #: ../src/guestfs-actions.pod:5940 ../src/guestfs-actions.pod:5975 ../src/guestfs-actions.pod:6028 ../src/guestfs-actions.pod:6112 ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6169 ../src/guestfs-actions.pod:6209
31327 msgid "(Added in 1.0.78)"
31331 #: ../src/guestfs-actions.pod:5942
31332 msgid "guestfs_part_del"
31336 #: ../src/guestfs-actions.pod:5944
31340 " guestfs_part_del (guestfs_h *g,\n"
31341 " const char *device,\n"
31347 #: ../src/guestfs-actions.pod:5959
31348 msgid "guestfs_part_disk"
31352 #: ../src/guestfs-actions.pod:5961
31356 " guestfs_part_disk (guestfs_h *g,\n"
31357 " const char *device,\n"
31358 " const char *parttype);\n"
31363 #: ../src/guestfs-actions.pod:5966
31365 "This command is simply a combination of C<guestfs_part_init> followed by "
31366 "C<guestfs_part_add> to create a single primary partition covering the whole "
31371 #: ../src/guestfs-actions.pod:5970
31373 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
31374 "possible values are described in C<guestfs_part_init>."
31378 #: ../src/guestfs-actions.pod:5977
31379 msgid "guestfs_part_get_bootable"
31383 #: ../src/guestfs-actions.pod:5979
31387 " guestfs_part_get_bootable (guestfs_h *g,\n"
31388 " const char *device,\n"
31394 #: ../src/guestfs-actions.pod:5987
31395 msgid "See also C<guestfs_part_set_bootable>."
31399 #: ../src/guestfs-actions.pod:5993
31400 msgid "guestfs_part_get_mbr_id"
31404 #: ../src/guestfs-actions.pod:5995
31408 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
31409 " const char *device,\n"
31415 #: ../src/guestfs-actions.pod:6003 ../src/guestfs-actions.pod:6185
31417 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
31418 "undefined results for other partition table types (see "
31419 "C<guestfs_part_get_parttype>)."
31423 #: ../src/guestfs-actions.pod:6011
31424 msgid "guestfs_part_get_parttype"
31428 #: ../src/guestfs-actions.pod:6013
31432 " guestfs_part_get_parttype (guestfs_h *g,\n"
31433 " const char *device);\n"
31438 #: ../src/guestfs-actions.pod:6020
31440 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
31441 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
31442 "possible, although unusual. See C<guestfs_part_init> for a full list."
31446 #: ../src/guestfs-actions.pod:6030
31447 msgid "guestfs_part_init"
31451 #: ../src/guestfs-actions.pod:6032
31455 " guestfs_part_init (guestfs_h *g,\n"
31456 " const char *device,\n"
31457 " const char *parttype);\n"
31462 #: ../src/guestfs-actions.pod:6041
31464 "Initially there are no partitions. Following this, you should call "
31465 "C<guestfs_part_add> for each partition required."
31469 #: ../src/guestfs-actions.pod:6114
31470 msgid "guestfs_part_list"
31474 #: ../src/guestfs-actions.pod:6116
31477 " struct guestfs_partition_list *\n"
31478 " guestfs_part_list (guestfs_h *g,\n"
31479 " const char *device);\n"
31484 #: ../src/guestfs-actions.pod:6133
31486 "Start of the partition I<in bytes>. To get sectors you have to divide by "
31487 "the device's sector size, see C<guestfs_blockdev_getss>."
31491 #: ../src/guestfs-actions.pod:6146
31493 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
31494 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
31499 #: ../src/guestfs-actions.pod:6152
31500 msgid "guestfs_part_set_bootable"
31504 #: ../src/guestfs-actions.pod:6154
31508 " guestfs_part_set_bootable (guestfs_h *g,\n"
31509 " const char *device,\n"
31511 " int bootable);\n"
31516 #: ../src/guestfs-actions.pod:6171
31517 msgid "guestfs_part_set_mbr_id"
31521 #: ../src/guestfs-actions.pod:6173
31525 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
31526 " const char *device,\n"
31533 #: ../src/guestfs-actions.pod:6193
31534 msgid "guestfs_part_set_name"
31538 #: ../src/guestfs-actions.pod:6195
31542 " guestfs_part_set_name (guestfs_h *g,\n"
31543 " const char *device,\n"
31545 " const char *name);\n"
31550 #: ../src/guestfs-actions.pod:6211
31551 msgid "guestfs_part_to_dev"
31555 #: ../src/guestfs-actions.pod:6213
31559 " guestfs_part_to_dev (guestfs_h *g,\n"
31560 " const char *partition);\n"
31565 #: ../src/guestfs-actions.pod:6221 ../src/guestfs-actions.pod:6240
31567 "The named partition must exist, for example as a string returned from "
31568 "C<guestfs_list_partitions>."
31572 #: ../src/guestfs-actions.pod:6224
31573 msgid "See also C<guestfs_part_to_partnum>."
31577 #: ../src/guestfs-actions.pod:6231
31578 msgid "guestfs_part_to_partnum"
31582 #: ../src/guestfs-actions.pod:6233
31586 " guestfs_part_to_partnum (guestfs_h *g,\n"
31587 " const char *partition);\n"
31592 #: ../src/guestfs-actions.pod:6243
31593 msgid "See also C<guestfs_part_to_dev>."
31597 #: ../src/guestfs-actions.pod:6249
31598 msgid "guestfs_ping_daemon"
31602 #: ../src/guestfs-actions.pod:6251
31606 " guestfs_ping_daemon (guestfs_h *g);\n"
31611 #: ../src/guestfs-actions.pod:6263
31612 msgid "guestfs_pread"
31616 #: ../src/guestfs-actions.pod:6265
31620 " guestfs_pread (guestfs_h *g,\n"
31621 " const char *path,\n"
31623 " int64_t offset,\n"
31624 " size_t *size_r);\n"
31629 #: ../src/guestfs-actions.pod:6278
31630 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
31634 #: ../src/guestfs-actions.pod:6289
31635 msgid "guestfs_pread_device"
31639 #: ../src/guestfs-actions.pod:6291
31643 " guestfs_pread_device (guestfs_h *g,\n"
31644 " const char *device,\n"
31646 " int64_t offset,\n"
31647 " size_t *size_r);\n"
31652 #: ../src/guestfs-actions.pod:6304
31653 msgid "See also C<guestfs_pread>."
31657 #: ../src/guestfs-actions.pod:6313
31658 msgid "(Added in 1.5.21)"
31662 #: ../src/guestfs-actions.pod:6315
31663 msgid "guestfs_pvcreate"
31667 #: ../src/guestfs-actions.pod:6317
31671 " guestfs_pvcreate (guestfs_h *g,\n"
31672 " const char *device);\n"
31677 #: ../src/guestfs-actions.pod:6329
31678 msgid "guestfs_pvremove"
31682 #: ../src/guestfs-actions.pod:6331
31686 " guestfs_pvremove (guestfs_h *g,\n"
31687 " const char *device);\n"
31692 #: ../src/guestfs-actions.pod:6346
31693 msgid "guestfs_pvresize"
31697 #: ../src/guestfs-actions.pod:6348
31701 " guestfs_pvresize (guestfs_h *g,\n"
31702 " const char *device);\n"
31707 #: ../src/guestfs-actions.pod:6359
31708 msgid "guestfs_pvresize_size"
31712 #: ../src/guestfs-actions.pod:6361
31716 " guestfs_pvresize_size (guestfs_h *g,\n"
31717 " const char *device,\n"
31718 " int64_t size);\n"
31723 #: ../src/guestfs-actions.pod:6366
31725 "This command is the same as C<guestfs_pvresize> except that it allows you to "
31726 "specify the new size (in bytes) explicitly."
31730 #: ../src/guestfs-actions.pod:6373
31731 msgid "guestfs_pvs"
31735 #: ../src/guestfs-actions.pod:6375
31739 " guestfs_pvs (guestfs_h *g);\n"
31744 #: ../src/guestfs-actions.pod:6384
31745 msgid "See also C<guestfs_pvs_full>."
31749 #: ../src/guestfs-actions.pod:6392
31750 msgid "guestfs_pvs_full"
31754 #: ../src/guestfs-actions.pod:6394
31757 " struct guestfs_lvm_pv_list *\n"
31758 " guestfs_pvs_full (guestfs_h *g);\n"
31763 #: ../src/guestfs-actions.pod:6400
31765 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31766 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
31771 #: ../src/guestfs-actions.pod:6406
31772 msgid "guestfs_pvuuid"
31776 #: ../src/guestfs-actions.pod:6408
31780 " guestfs_pvuuid (guestfs_h *g,\n"
31781 " const char *device);\n"
31786 #: ../src/guestfs-actions.pod:6419
31787 msgid "guestfs_pwrite"
31791 #: ../src/guestfs-actions.pod:6421
31795 " guestfs_pwrite (guestfs_h *g,\n"
31796 " const char *path,\n"
31797 " const char *content,\n"
31798 " size_t content_size,\n"
31799 " int64_t offset);\n"
31804 #: ../src/guestfs-actions.pod:6437
31805 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31809 #: ../src/guestfs-actions.pod:6446
31810 msgid "guestfs_pwrite_device"
31814 #: ../src/guestfs-actions.pod:6448
31818 " guestfs_pwrite_device (guestfs_h *g,\n"
31819 " const char *device,\n"
31820 " const char *content,\n"
31821 " size_t content_size,\n"
31822 " int64_t offset);\n"
31827 #: ../src/guestfs-actions.pod:6463
31828 msgid "See also C<guestfs_pwrite>."
31832 #: ../src/guestfs-actions.pod:6470
31833 msgid "(Added in 1.5.20)"
31837 #: ../src/guestfs-actions.pod:6472
31838 msgid "guestfs_read_file"
31842 #: ../src/guestfs-actions.pod:6474
31846 " guestfs_read_file (guestfs_h *g,\n"
31847 " const char *path,\n"
31848 " size_t *size_r);\n"
31853 #: ../src/guestfs-actions.pod:6482
31855 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
31856 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31857 "function is limited in the total size of file that can be handled."
31861 #: ../src/guestfs-actions.pod:6494
31862 msgid "(Added in 1.0.63)"
31866 #: ../src/guestfs-actions.pod:6496
31867 msgid "guestfs_read_lines"
31871 #: ../src/guestfs-actions.pod:6498
31875 " guestfs_read_lines (guestfs_h *g,\n"
31876 " const char *path);\n"
31881 #: ../src/guestfs-actions.pod:6507
31883 "Note that this function cannot correctly handle binary files (specifically, "
31884 "files containing C<\\0> character which is treated as end of line). For "
31885 "those you need to use the C<guestfs_read_file> function which has a more "
31886 "complex interface."
31890 #: ../src/guestfs-actions.pod:6518
31891 msgid "guestfs_readdir"
31895 #: ../src/guestfs-actions.pod:6520
31898 " struct guestfs_dirent_list *\n"
31899 " guestfs_readdir (guestfs_h *g,\n"
31900 " const char *dir);\n"
31905 #: ../src/guestfs-actions.pod:6574
31907 "This function is primarily intended for use by programs. To get a simple "
31908 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31909 "consumption, use C<guestfs_ll>."
31913 #: ../src/guestfs-actions.pod:6578
31915 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31916 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
31921 #: ../src/guestfs-actions.pod:6584
31922 msgid "guestfs_readlink"
31926 #: ../src/guestfs-actions.pod:6586
31930 " guestfs_readlink (guestfs_h *g,\n"
31931 " const char *path);\n"
31936 #: ../src/guestfs-actions.pod:6597
31937 msgid "guestfs_readlinklist"
31941 #: ../src/guestfs-actions.pod:6599
31945 " guestfs_readlinklist (guestfs_h *g,\n"
31946 " const char *path,\n"
31947 " char *const *names);\n"
31952 #: ../src/guestfs-actions.pod:6632
31953 msgid "guestfs_realpath"
31957 #: ../src/guestfs-actions.pod:6634
31961 " guestfs_realpath (guestfs_h *g,\n"
31962 " const char *path);\n"
31967 #: ../src/guestfs-actions.pod:6646
31968 msgid "guestfs_removexattr"
31972 #: ../src/guestfs-actions.pod:6648
31976 " guestfs_removexattr (guestfs_h *g,\n"
31977 " const char *xattr,\n"
31978 " const char *path);\n"
31983 #: ../src/guestfs-actions.pod:6656
31984 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31988 #: ../src/guestfs-actions.pod:6662
31989 msgid "guestfs_resize2fs"
31993 #: ../src/guestfs-actions.pod:6664
31997 " guestfs_resize2fs (guestfs_h *g,\n"
31998 " const char *device);\n"
32003 #: ../src/guestfs-actions.pod:6671
32005 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
32006 "C<device> before calling this command. For unknown reasons C<resize2fs> "
32007 "sometimes gives an error about this and sometimes not. In any case, it is "
32008 "always safe to call C<guestfs_e2fsck_f> before calling this function."
32012 #: ../src/guestfs-actions.pod:6681
32013 msgid "guestfs_resize2fs_M"
32017 #: ../src/guestfs-actions.pod:6683
32021 " guestfs_resize2fs_M (guestfs_h *g,\n"
32022 " const char *device);\n"
32027 #: ../src/guestfs-actions.pod:6687
32029 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
32030 "resized to its minimum size. This works like the I<-M> option to the "
32031 "C<resize2fs> command."
32035 #: ../src/guestfs-actions.pod:6691
32037 "To get the resulting size of the filesystem you should call "
32038 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
32039 "These two numbers, multiplied together, give the resulting size of the "
32040 "minimal filesystem in bytes."
32044 #: ../src/guestfs-actions.pod:6700
32045 msgid "guestfs_resize2fs_size"
32049 #: ../src/guestfs-actions.pod:6702
32053 " guestfs_resize2fs_size (guestfs_h *g,\n"
32054 " const char *device,\n"
32055 " int64_t size);\n"
32060 #: ../src/guestfs-actions.pod:6707
32062 "This command is the same as C<guestfs_resize2fs> except that it allows you "
32063 "to specify the new size (in bytes) explicitly."
32067 #: ../src/guestfs-actions.pod:6714
32072 #: ../src/guestfs-actions.pod:6716
32076 " guestfs_rm (guestfs_h *g,\n"
32077 " const char *path);\n"
32082 #: ../src/guestfs-actions.pod:6726
32083 msgid "guestfs_rm_rf"
32087 #: ../src/guestfs-actions.pod:6728
32091 " guestfs_rm_rf (guestfs_h *g,\n"
32092 " const char *path);\n"
32097 #: ../src/guestfs-actions.pod:6740
32098 msgid "guestfs_rmdir"
32102 #: ../src/guestfs-actions.pod:6742
32106 " guestfs_rmdir (guestfs_h *g,\n"
32107 " const char *path);\n"
32112 #: ../src/guestfs-actions.pod:6752
32113 msgid "guestfs_rmmountpoint"
32117 #: ../src/guestfs-actions.pod:6754
32121 " guestfs_rmmountpoint (guestfs_h *g,\n"
32122 " const char *exemptpath);\n"
32127 #: ../src/guestfs-actions.pod:6758
32129 "This calls removes a mountpoint that was previously created with "
32130 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
32134 #: ../src/guestfs-actions.pod:6766
32135 msgid "guestfs_scrub_device"
32139 #: ../src/guestfs-actions.pod:6768
32143 " guestfs_scrub_device (guestfs_h *g,\n"
32144 " const char *device);\n"
32149 #: ../src/guestfs-actions.pod:6780 ../src/guestfs-actions.pod:6798 ../src/guestfs-actions.pod:6817
32150 msgid "(Added in 1.0.52)"
32154 #: ../src/guestfs-actions.pod:6782
32155 msgid "guestfs_scrub_file"
32159 #: ../src/guestfs-actions.pod:6784
32163 " guestfs_scrub_file (guestfs_h *g,\n"
32164 " const char *file);\n"
32169 #: ../src/guestfs-actions.pod:6800
32170 msgid "guestfs_scrub_freespace"
32174 #: ../src/guestfs-actions.pod:6802
32178 " guestfs_scrub_freespace (guestfs_h *g,\n"
32179 " const char *dir);\n"
32184 #: ../src/guestfs-actions.pod:6806
32186 "This command creates the directory C<dir> and then fills it with files until "
32187 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
32188 "and deletes them. The intention is to scrub any free space on the partition "
32189 "containing C<dir>."
32193 #: ../src/guestfs-actions.pod:6819
32194 msgid "guestfs_set_append"
32198 #: ../src/guestfs-actions.pod:6821
32202 " guestfs_set_append (guestfs_h *g,\n"
32203 " const char *append);\n"
32208 #: ../src/guestfs-actions.pod:6838
32209 msgid "guestfs_set_attach_method"
32213 #: ../src/guestfs-actions.pod:6840
32217 " guestfs_set_attach_method (guestfs_h *g,\n"
32218 " const char *attachmethod);\n"
32223 #: ../src/guestfs-actions.pod:6868
32224 msgid "guestfs_set_autosync"
32228 #: ../src/guestfs-actions.pod:6870
32232 " guestfs_set_autosync (guestfs_h *g,\n"
32233 " int autosync);\n"
32238 #: ../src/guestfs-actions.pod:6886
32239 msgid "guestfs_set_direct"
32243 #: ../src/guestfs-actions.pod:6888
32247 " guestfs_set_direct (guestfs_h *g,\n"
32253 #: ../src/guestfs-actions.pod:6896
32255 "One consequence of this is that log messages aren't caught by the library "
32256 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
32261 #: ../src/guestfs-actions.pod:6909
32262 msgid "guestfs_set_e2label"
32266 #: ../src/guestfs-actions.pod:6911
32270 " guestfs_set_e2label (guestfs_h *g,\n"
32271 " const char *device,\n"
32272 " const char *label);\n"
32277 #: ../src/guestfs-actions.pod:6920
32279 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
32280 "the existing label on a filesystem."
32284 #: ../src/guestfs-actions.pod:6927
32285 msgid "guestfs_set_e2uuid"
32289 #: ../src/guestfs-actions.pod:6929
32293 " guestfs_set_e2uuid (guestfs_h *g,\n"
32294 " const char *device,\n"
32295 " const char *uuid);\n"
32300 #: ../src/guestfs-actions.pod:6939
32302 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
32303 "the existing UUID of a filesystem."
32307 #: ../src/guestfs-actions.pod:6946
32308 msgid "guestfs_set_memsize"
32312 #: ../src/guestfs-actions.pod:6948
32316 " guestfs_set_memsize (guestfs_h *g,\n"
32322 #: ../src/guestfs-actions.pod:6952
32324 "This sets the memory size in megabytes allocated to the qemu subprocess. "
32325 "This only has any effect if called before C<guestfs_launch>."
32329 #: ../src/guestfs-actions.pod:6967
32330 msgid "guestfs_set_network"
32334 #: ../src/guestfs-actions.pod:6969
32338 " guestfs_set_network (guestfs_h *g,\n"
32344 #: ../src/guestfs-actions.pod:6979
32346 "You must call this before calling C<guestfs_launch>, otherwise it has no "
32351 #: ../src/guestfs-actions.pod:6986
32352 msgid "guestfs_set_path"
32356 #: ../src/guestfs-actions.pod:6988
32360 " guestfs_set_path (guestfs_h *g,\n"
32361 " const char *searchpath);\n"
32366 #: ../src/guestfs-actions.pod:7003
32367 msgid "guestfs_set_pgroup"
32371 #: ../src/guestfs-actions.pod:7005
32375 " guestfs_set_pgroup (guestfs_h *g,\n"
32381 #: ../src/guestfs-actions.pod:7022
32382 msgid "guestfs_set_qemu"
32386 #: ../src/guestfs-actions.pod:7024
32390 " guestfs_set_qemu (guestfs_h *g,\n"
32391 " const char *qemu);\n"
32396 #: ../src/guestfs-actions.pod:7050
32397 msgid "guestfs_set_recovery_proc"
32401 #: ../src/guestfs-actions.pod:7052
32405 " guestfs_set_recovery_proc (guestfs_h *g,\n"
32406 " int recoveryproc);\n"
32411 #: ../src/guestfs-actions.pod:7056
32413 "If this is called with the parameter C<false> then C<guestfs_launch> does "
32414 "not create a recovery process. The purpose of the recovery process is to "
32415 "stop runaway qemu processes in the case where the main program aborts "
32420 #: ../src/guestfs-actions.pod:7061
32422 "This only has any effect if called before C<guestfs_launch>, and the default "
32427 #: ../src/guestfs-actions.pod:7074
32428 msgid "guestfs_set_selinux"
32432 #: ../src/guestfs-actions.pod:7076
32436 " guestfs_set_selinux (guestfs_h *g,\n"
32442 #: ../src/guestfs-actions.pod:7093
32443 msgid "guestfs_set_smp"
32447 #: ../src/guestfs-actions.pod:7095
32451 " guestfs_set_smp (guestfs_h *g,\n"
32457 #: ../src/guestfs-actions.pod:7103
32458 msgid "This function must be called before C<guestfs_launch>."
32462 #: ../src/guestfs-actions.pod:7109
32463 msgid "guestfs_set_trace"
32467 #: ../src/guestfs-actions.pod:7111
32471 " guestfs_set_trace (guestfs_h *g,\n"
32477 #: ../src/guestfs-actions.pod:7125
32479 "Trace messages are normally sent to C<stderr>, unless you register a "
32480 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32484 #: ../src/guestfs-actions.pod:7133
32485 msgid "guestfs_set_verbose"
32489 #: ../src/guestfs-actions.pod:7135
32493 " guestfs_set_verbose (guestfs_h *g,\n"
32499 #: ../src/guestfs-actions.pod:7144
32501 "Verbose messages are normally sent to C<stderr>, unless you register a "
32502 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32506 #: ../src/guestfs-actions.pod:7152
32507 msgid "guestfs_setcon"
32511 #: ../src/guestfs-actions.pod:7154
32515 " guestfs_setcon (guestfs_h *g,\n"
32516 " const char *context);\n"
32521 #: ../src/guestfs-actions.pod:7167
32522 msgid "guestfs_setxattr"
32526 #: ../src/guestfs-actions.pod:7169
32530 " guestfs_setxattr (guestfs_h *g,\n"
32531 " const char *xattr,\n"
32532 " const char *val,\n"
32534 " const char *path);\n"
32539 #: ../src/guestfs-actions.pod:7180
32540 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
32544 #: ../src/guestfs-actions.pod:7186
32545 msgid "guestfs_sfdisk"
32549 #: ../src/guestfs-actions.pod:7188
32553 " guestfs_sfdisk (guestfs_h *g,\n"
32554 " const char *device,\n"
32558 " char *const *lines);\n"
32563 #: ../src/guestfs-actions.pod:7196 ../src/guestfs-actions.pod:7237 ../src/guestfs-actions.pod:7268
32565 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
32570 #: ../src/guestfs-actions.pod:7223
32571 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
32575 #: ../src/guestfs-actions.pod:7230
32576 msgid "guestfs_sfdiskM"
32580 #: ../src/guestfs-actions.pod:7232
32584 " guestfs_sfdiskM (guestfs_h *g,\n"
32585 " const char *device,\n"
32586 " char *const *lines);\n"
32591 #: ../src/guestfs-actions.pod:7244
32593 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
32594 "partition sizes are specified in megabytes only (rounded to the nearest "
32595 "cylinder) and you don't need to specify the cyls, heads and sectors "
32596 "parameters which were rarely if ever used anyway."
32600 #: ../src/guestfs-actions.pod:7250
32602 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
32603 "C<guestfs_part_disk>"
32607 #: ../src/guestfs-actions.pod:7257
32608 msgid "guestfs_sfdisk_N"
32612 #: ../src/guestfs-actions.pod:7259
32616 " guestfs_sfdisk_N (guestfs_h *g,\n"
32617 " const char *device,\n"
32622 " const char *line);\n"
32627 #: ../src/guestfs-actions.pod:7278
32629 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
32630 "for the cyls/heads/sectors parameters."
32634 #: ../src/guestfs-actions.pod:7281
32635 msgid "See also: C<guestfs_part_add>"
32639 #: ../src/guestfs-actions.pod:7287
32640 msgid "guestfs_sfdisk_disk_geometry"
32644 #: ../src/guestfs-actions.pod:7289
32648 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
32649 " const char *device);\n"
32654 #: ../src/guestfs-actions.pod:7293
32656 "This displays the disk geometry of C<device> read from the partition table. "
32657 "Especially in the case where the underlying block device has been resized, "
32658 "this can be different from the kernel's idea of the geometry (see "
32659 "C<guestfs_sfdisk_kernel_geometry>)."
32663 #: ../src/guestfs-actions.pod:7306
32664 msgid "guestfs_sfdisk_kernel_geometry"
32668 #: ../src/guestfs-actions.pod:7308
32672 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
32673 " const char *device);\n"
32678 #: ../src/guestfs-actions.pod:7322
32679 msgid "guestfs_sfdisk_l"
32683 #: ../src/guestfs-actions.pod:7324
32687 " guestfs_sfdisk_l (guestfs_h *g,\n"
32688 " const char *device);\n"
32693 #: ../src/guestfs-actions.pod:7328
32695 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
32700 #: ../src/guestfs-actions.pod:7339
32701 msgid "See also: C<guestfs_part_list>"
32705 #: ../src/guestfs-actions.pod:7346
32710 #: ../src/guestfs-actions.pod:7348
32714 " guestfs_sh (guestfs_h *g,\n"
32715 " const char *command);\n"
32720 #: ../src/guestfs-actions.pod:7355
32721 msgid "This is like C<guestfs_command>, but passes the command to:"
32725 #: ../src/guestfs-actions.pod:7363
32726 msgid "All the provisos about C<guestfs_command> apply to this call."
32730 #: ../src/guestfs-actions.pod:7370
32731 msgid "guestfs_sh_lines"
32735 #: ../src/guestfs-actions.pod:7372
32739 " guestfs_sh_lines (guestfs_h *g,\n"
32740 " const char *command);\n"
32745 #: ../src/guestfs-actions.pod:7376
32747 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32752 #: ../src/guestfs-actions.pod:7379
32753 msgid "See also: C<guestfs_command_lines>"
32757 #: ../src/guestfs-actions.pod:7387
32758 msgid "guestfs_sleep"
32762 #: ../src/guestfs-actions.pod:7389
32766 " guestfs_sleep (guestfs_h *g,\n"
32772 #: ../src/guestfs-actions.pod:7397
32773 msgid "(Added in 1.0.41)"
32777 #: ../src/guestfs-actions.pod:7399 ../src/guestfs-structs.pod:109
32778 msgid "guestfs_stat"
32782 #: ../src/guestfs-actions.pod:7401
32785 " struct guestfs_stat *\n"
32786 " guestfs_stat (guestfs_h *g,\n"
32787 " const char *path);\n"
32792 #: ../src/guestfs-actions.pod:7415 ../src/guestfs-structs.pod:135
32793 msgid "guestfs_statvfs"
32797 #: ../src/guestfs-actions.pod:7417
32800 " struct guestfs_statvfs *\n"
32801 " guestfs_statvfs (guestfs_h *g,\n"
32802 " const char *path);\n"
32807 #: ../src/guestfs-actions.pod:7427
32809 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
32810 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
32814 #: ../src/guestfs-actions.pod:7433
32815 msgid "guestfs_strings"
32819 #: ../src/guestfs-actions.pod:7435
32823 " guestfs_strings (guestfs_h *g,\n"
32824 " const char *path);\n"
32829 #: ../src/guestfs-actions.pod:7451
32830 msgid "guestfs_strings_e"
32834 #: ../src/guestfs-actions.pod:7453
32838 " guestfs_strings_e (guestfs_h *g,\n"
32839 " const char *encoding,\n"
32840 " const char *path);\n"
32845 #: ../src/guestfs-actions.pod:7458
32847 "This is like the C<guestfs_strings> command, but allows you to specify the "
32848 "encoding of strings that are looked for in the source file C<path>."
32852 #: ../src/guestfs-actions.pod:7468
32854 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32855 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32859 #: ../src/guestfs-actions.pod:7506
32860 msgid "guestfs_swapoff_device"
32864 #: ../src/guestfs-actions.pod:7508
32868 " guestfs_swapoff_device (guestfs_h *g,\n"
32869 " const char *device);\n"
32874 #: ../src/guestfs-actions.pod:7512
32876 "This command disables the libguestfs appliance swap device or partition "
32877 "named C<device>. See C<guestfs_swapon_device>."
32881 #: ../src/guestfs-actions.pod:7520
32882 msgid "guestfs_swapoff_file"
32886 #: ../src/guestfs-actions.pod:7522
32890 " guestfs_swapoff_file (guestfs_h *g,\n"
32891 " const char *file);\n"
32896 #: ../src/guestfs-actions.pod:7532
32897 msgid "guestfs_swapoff_label"
32901 #: ../src/guestfs-actions.pod:7534
32905 " guestfs_swapoff_label (guestfs_h *g,\n"
32906 " const char *label);\n"
32911 #: ../src/guestfs-actions.pod:7545
32912 msgid "guestfs_swapoff_uuid"
32916 #: ../src/guestfs-actions.pod:7547
32920 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32921 " const char *uuid);\n"
32926 #: ../src/guestfs-actions.pod:7558
32927 msgid "guestfs_swapon_device"
32931 #: ../src/guestfs-actions.pod:7560
32935 " guestfs_swapon_device (guestfs_h *g,\n"
32936 " const char *device);\n"
32941 #: ../src/guestfs-actions.pod:7564
32943 "This command enables the libguestfs appliance to use the swap device or "
32944 "partition named C<device>. The increased memory is made available for all "
32945 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32949 #: ../src/guestfs-actions.pod:7580
32950 msgid "guestfs_swapon_file"
32954 #: ../src/guestfs-actions.pod:7582
32958 " guestfs_swapon_file (guestfs_h *g,\n"
32959 " const char *file);\n"
32964 #: ../src/guestfs-actions.pod:7586
32966 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32971 #: ../src/guestfs-actions.pod:7593
32972 msgid "guestfs_swapon_label"
32976 #: ../src/guestfs-actions.pod:7595
32980 " guestfs_swapon_label (guestfs_h *g,\n"
32981 " const char *label);\n"
32986 #: ../src/guestfs-actions.pod:7599
32988 "This command enables swap to a labeled swap partition. See "
32989 "C<guestfs_swapon_device> for other notes."
32993 #: ../src/guestfs-actions.pod:7606
32994 msgid "guestfs_swapon_uuid"
32998 #: ../src/guestfs-actions.pod:7608
33002 " guestfs_swapon_uuid (guestfs_h *g,\n"
33003 " const char *uuid);\n"
33008 #: ../src/guestfs-actions.pod:7612
33010 "This command enables swap to a swap partition with the given UUID. See "
33011 "C<guestfs_swapon_device> for other notes."
33015 #: ../src/guestfs-actions.pod:7619
33016 msgid "guestfs_sync"
33020 #: ../src/guestfs-actions.pod:7621
33024 " guestfs_sync (guestfs_h *g);\n"
33029 #: ../src/guestfs-actions.pod:7634
33030 msgid "guestfs_tail"
33034 #: ../src/guestfs-actions.pod:7636
33038 " guestfs_tail (guestfs_h *g,\n"
33039 " const char *path);\n"
33044 #: ../src/guestfs-actions.pod:7652
33045 msgid "guestfs_tail_n"
33049 #: ../src/guestfs-actions.pod:7654
33053 " guestfs_tail_n (guestfs_h *g,\n"
33055 " const char *path);\n"
33060 #: ../src/guestfs-actions.pod:7676
33061 msgid "guestfs_tar_in"
33065 #: ../src/guestfs-actions.pod:7678
33069 " guestfs_tar_in (guestfs_h *g,\n"
33070 " const char *tarfile,\n"
33071 " const char *directory);\n"
33076 #: ../src/guestfs-actions.pod:7686
33077 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
33081 #: ../src/guestfs-actions.pod:7691 ../src/guestfs-actions.pod:7708 ../src/guestfs-actions.pod:7724 ../src/guestfs-actions.pod:7740
33082 msgid "(Added in 1.0.3)"
33086 #: ../src/guestfs-actions.pod:7693
33087 msgid "guestfs_tar_out"
33091 #: ../src/guestfs-actions.pod:7695
33095 " guestfs_tar_out (guestfs_h *g,\n"
33096 " const char *directory,\n"
33097 " const char *tarfile);\n"
33102 #: ../src/guestfs-actions.pod:7703
33104 "To download a compressed tarball, use C<guestfs_tgz_out> or "
33105 "C<guestfs_txz_out>."
33109 #: ../src/guestfs-actions.pod:7710
33110 msgid "guestfs_tgz_in"
33114 #: ../src/guestfs-actions.pod:7712
33118 " guestfs_tgz_in (guestfs_h *g,\n"
33119 " const char *tarball,\n"
33120 " const char *directory);\n"
33125 #: ../src/guestfs-actions.pod:7720
33126 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
33130 #: ../src/guestfs-actions.pod:7726
33131 msgid "guestfs_tgz_out"
33135 #: ../src/guestfs-actions.pod:7728
33139 " guestfs_tgz_out (guestfs_h *g,\n"
33140 " const char *directory,\n"
33141 " const char *tarball);\n"
33146 #: ../src/guestfs-actions.pod:7736
33147 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
33151 #: ../src/guestfs-actions.pod:7742
33152 msgid "guestfs_touch"
33156 #: ../src/guestfs-actions.pod:7744
33160 " guestfs_touch (guestfs_h *g,\n"
33161 " const char *path);\n"
33166 #: ../src/guestfs-actions.pod:7759
33167 msgid "guestfs_truncate"
33171 #: ../src/guestfs-actions.pod:7761
33175 " guestfs_truncate (guestfs_h *g,\n"
33176 " const char *path);\n"
33181 #: ../src/guestfs-actions.pod:7772
33182 msgid "guestfs_truncate_size"
33186 #: ../src/guestfs-actions.pod:7774
33190 " guestfs_truncate_size (guestfs_h *g,\n"
33191 " const char *path,\n"
33192 " int64_t size);\n"
33197 #: ../src/guestfs-actions.pod:7782
33199 "If the current file size is less than C<size> then the file is extended to "
33200 "the required size with zero bytes. This creates a sparse file (ie. disk "
33201 "blocks are not allocated for the file until you write to it). To create a "
33202 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
33206 #: ../src/guestfs-actions.pod:7792
33207 msgid "guestfs_tune2fs"
33211 #: ../src/guestfs-actions.pod:7794
33215 " guestfs_tune2fs (guestfs_h *g,\n"
33216 " const char *device,\n"
33222 #: ../src/guestfs-actions.pod:7804
33225 " GUESTFS_TUNE2FS_FORCE, int force,\n"
33226 " GUESTFS_TUNE2FS_MAXMOUNTCOUNT, int maxmountcount,\n"
33227 " GUESTFS_TUNE2FS_MOUNTCOUNT, int mountcount,\n"
33228 " GUESTFS_TUNE2FS_ERRORBEHAVIOR, const char *errorbehavior,\n"
33229 " GUESTFS_TUNE2FS_GROUP, int64_t group,\n"
33230 " GUESTFS_TUNE2FS_INTERVALBETWEENCHECKS, int intervalbetweenchecks,\n"
33231 " GUESTFS_TUNE2FS_RESERVEDBLOCKSPERCENTAGE, int reservedblockspercentage,\n"
33232 " GUESTFS_TUNE2FS_LASTMOUNTEDDIRECTORY, const char *lastmounteddirectory,\n"
33233 " GUESTFS_TUNE2FS_RESERVEDBLOCKSCOUNT, int64_t reservedblockscount,\n"
33234 " GUESTFS_TUNE2FS_USER, int64_t user,\n"
33239 #: ../src/guestfs-actions.pod:7884
33241 "To get the current values of filesystem parameters, see "
33242 "C<guestfs_tune2fs_l>. For precise details of how tune2fs works, see the "
33243 "L<tune2fs(8)> man page."
33247 #: ../src/guestfs-actions.pod:7892
33248 msgid "guestfs_tune2fs_va"
33252 #: ../src/guestfs-actions.pod:7894
33256 " guestfs_tune2fs_va (guestfs_h *g,\n"
33257 " const char *device,\n"
33258 " va_list args);\n"
33263 #: ../src/guestfs-actions.pod:7899
33264 msgid "This is the \"va_list variant\" of L</guestfs_tune2fs>."
33268 #: ../src/guestfs-actions.pod:7903
33269 msgid "guestfs_tune2fs_argv"
33273 #: ../src/guestfs-actions.pod:7905
33277 " guestfs_tune2fs_argv (guestfs_h *g,\n"
33278 " const char *device,\n"
33279 " const struct guestfs_tune2fs_argv *optargs);\n"
33284 #: ../src/guestfs-actions.pod:7910
33285 msgid "This is the \"argv variant\" of L</guestfs_tune2fs>."
33289 #: ../src/guestfs-actions.pod:7914
33290 msgid "guestfs_tune2fs_l"
33294 #: ../src/guestfs-actions.pod:7916
33298 " guestfs_tune2fs_l (guestfs_h *g,\n"
33299 " const char *device);\n"
33304 #: ../src/guestfs-actions.pod:7936
33305 msgid "guestfs_txz_in"
33309 #: ../src/guestfs-actions.pod:7938
33313 " guestfs_txz_in (guestfs_h *g,\n"
33314 " const char *tarball,\n"
33315 " const char *directory);\n"
33320 #: ../src/guestfs-actions.pod:7950
33321 msgid "guestfs_txz_out"
33325 #: ../src/guestfs-actions.pod:7952
33329 " guestfs_txz_out (guestfs_h *g,\n"
33330 " const char *directory,\n"
33331 " const char *tarball);\n"
33336 #: ../src/guestfs-actions.pod:7964
33337 msgid "guestfs_umask"
33341 #: ../src/guestfs-actions.pod:7966
33345 " guestfs_umask (guestfs_h *g,\n"
33351 #: ../src/guestfs-actions.pod:7982
33353 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
33354 "C<guestfs_mkdir>."
33358 #: ../src/guestfs-actions.pod:7991
33359 msgid "guestfs_umount"
33363 #: ../src/guestfs-actions.pod:7993
33367 " guestfs_umount (guestfs_h *g,\n"
33368 " const char *pathordevice);\n"
33373 #: ../src/guestfs-actions.pod:8005
33374 msgid "guestfs_umount_all"
33378 #: ../src/guestfs-actions.pod:8007
33382 " guestfs_umount_all (guestfs_h *g);\n"
33387 #: ../src/guestfs-actions.pod:8018
33388 msgid "guestfs_upload"
33392 #: ../src/guestfs-actions.pod:8020
33396 " guestfs_upload (guestfs_h *g,\n"
33397 " const char *filename,\n"
33398 " const char *remotefilename);\n"
33403 #: ../src/guestfs-actions.pod:8030
33404 msgid "See also C<guestfs_download>."
33408 #: ../src/guestfs-actions.pod:8041
33409 msgid "guestfs_upload_offset"
33413 #: ../src/guestfs-actions.pod:8043
33417 " guestfs_upload_offset (guestfs_h *g,\n"
33418 " const char *filename,\n"
33419 " const char *remotefilename,\n"
33420 " int64_t offset);\n"
33425 #: ../src/guestfs-actions.pod:8059
33427 "Note that there is no limit on the amount of data that can be uploaded with "
33428 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
33429 "full amount unless an error occurs."
33433 #: ../src/guestfs-actions.pod:8064
33434 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
33438 #: ../src/guestfs-actions.pod:8075
33439 msgid "guestfs_utimens"
33443 #: ../src/guestfs-actions.pod:8077
33447 " guestfs_utimens (guestfs_h *g,\n"
33448 " const char *path,\n"
33449 " int64_t atsecs,\n"
33450 " int64_t atnsecs,\n"
33451 " int64_t mtsecs,\n"
33452 " int64_t mtnsecs);\n"
33457 #: ../src/guestfs-actions.pod:8106 ../src/guestfs-structs.pod:175
33458 msgid "guestfs_version"
33462 #: ../src/guestfs-actions.pod:8108
33465 " struct guestfs_version *\n"
33466 " guestfs_version (guestfs_h *g);\n"
33471 #: ../src/guestfs-actions.pod:8136
33473 "I<Note:> Don't use this call to test for availability of features. In "
33474 "enterprise distributions we backport features from later versions into "
33475 "earlier versions, making this an unreliable way to test for features. Use "
33476 "C<guestfs_available> instead."
33480 #: ../src/guestfs-actions.pod:8142
33482 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
33483 "error. I<The caller must call C<guestfs_free_version> after use>."
33487 #: ../src/guestfs-actions.pod:8146
33488 msgid "(Added in 1.0.58)"
33492 #: ../src/guestfs-actions.pod:8148
33493 msgid "guestfs_vfs_label"
33497 #: ../src/guestfs-actions.pod:8150
33501 " guestfs_vfs_label (guestfs_h *g,\n"
33502 " const char *device);\n"
33507 #: ../src/guestfs-actions.pod:8159
33508 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
33512 #: ../src/guestfs-actions.pod:8164 ../src/guestfs-actions.pod:8201
33513 msgid "(Added in 1.3.18)"
33517 #: ../src/guestfs-actions.pod:8166
33518 msgid "guestfs_vfs_type"
33522 #: ../src/guestfs-actions.pod:8168
33526 " guestfs_vfs_type (guestfs_h *g,\n"
33527 " const char *device);\n"
33532 #: ../src/guestfs-actions.pod:8185
33533 msgid "guestfs_vfs_uuid"
33537 #: ../src/guestfs-actions.pod:8187
33541 " guestfs_vfs_uuid (guestfs_h *g,\n"
33542 " const char *device);\n"
33547 #: ../src/guestfs-actions.pod:8196
33548 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
33552 #: ../src/guestfs-actions.pod:8203
33553 msgid "guestfs_vg_activate"
33557 #: ../src/guestfs-actions.pod:8205
33561 " guestfs_vg_activate (guestfs_h *g,\n"
33563 " char *const *volgroups);\n"
33568 #: ../src/guestfs-actions.pod:8222
33569 msgid "guestfs_vg_activate_all"
33573 #: ../src/guestfs-actions.pod:8224
33577 " guestfs_vg_activate_all (guestfs_h *g,\n"
33578 " int activate);\n"
33583 #: ../src/guestfs-actions.pod:8237
33584 msgid "guestfs_vgcreate"
33588 #: ../src/guestfs-actions.pod:8239
33592 " guestfs_vgcreate (guestfs_h *g,\n"
33593 " const char *volgroup,\n"
33594 " char *const *physvols);\n"
33599 #: ../src/guestfs-actions.pod:8251
33600 msgid "guestfs_vglvuuids"
33604 #: ../src/guestfs-actions.pod:8253
33608 " guestfs_vglvuuids (guestfs_h *g,\n"
33609 " const char *vgname);\n"
33614 #: ../src/guestfs-actions.pod:8260
33616 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
33617 "associate logical volumes and volume groups."
33621 #: ../src/guestfs-actions.pod:8263
33622 msgid "See also C<guestfs_vgpvuuids>."
33626 #: ../src/guestfs-actions.pod:8271
33627 msgid "guestfs_vgpvuuids"
33631 #: ../src/guestfs-actions.pod:8273
33635 " guestfs_vgpvuuids (guestfs_h *g,\n"
33636 " const char *vgname);\n"
33641 #: ../src/guestfs-actions.pod:8280
33643 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
33644 "associate physical volumes and volume groups."
33648 #: ../src/guestfs-actions.pod:8283
33649 msgid "See also C<guestfs_vglvuuids>."
33653 #: ../src/guestfs-actions.pod:8291
33654 msgid "guestfs_vgremove"
33658 #: ../src/guestfs-actions.pod:8293
33662 " guestfs_vgremove (guestfs_h *g,\n"
33663 " const char *vgname);\n"
33668 #: ../src/guestfs-actions.pod:8306
33669 msgid "guestfs_vgrename"
33673 #: ../src/guestfs-actions.pod:8308
33677 " guestfs_vgrename (guestfs_h *g,\n"
33678 " const char *volgroup,\n"
33679 " const char *newvolgroup);\n"
33684 #: ../src/guestfs-actions.pod:8319
33685 msgid "guestfs_vgs"
33689 #: ../src/guestfs-actions.pod:8321
33693 " guestfs_vgs (guestfs_h *g);\n"
33698 #: ../src/guestfs-actions.pod:8330
33699 msgid "See also C<guestfs_vgs_full>."
33703 #: ../src/guestfs-actions.pod:8338
33704 msgid "guestfs_vgs_full"
33708 #: ../src/guestfs-actions.pod:8340
33711 " struct guestfs_lvm_vg_list *\n"
33712 " guestfs_vgs_full (guestfs_h *g);\n"
33717 #: ../src/guestfs-actions.pod:8346
33719 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
33720 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
33725 #: ../src/guestfs-actions.pod:8352
33726 msgid "guestfs_vgscan"
33730 #: ../src/guestfs-actions.pod:8354
33734 " guestfs_vgscan (guestfs_h *g);\n"
33739 #: ../src/guestfs-actions.pod:8364
33740 msgid "guestfs_vguuid"
33744 #: ../src/guestfs-actions.pod:8366
33748 " guestfs_vguuid (guestfs_h *g,\n"
33749 " const char *vgname);\n"
33754 #: ../src/guestfs-actions.pod:8377
33755 msgid "guestfs_wait_ready"
33759 #: ../src/guestfs-actions.pod:8379
33763 " guestfs_wait_ready (guestfs_h *g);\n"
33768 #: ../src/guestfs-actions.pod:8382
33770 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
33775 #: ../src/guestfs-actions.pod:8389
33776 msgid "This function is a no op."
33780 #: ../src/guestfs-actions.pod:8391
33782 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
33783 "calling C<guestfs_launch> to wait for the launch to complete. However this "
33784 "is no longer necessary because C<guestfs_launch> now does the waiting."
33788 #: ../src/guestfs-actions.pod:8396
33790 "If you see any calls to this function in code then you can just remove them, "
33791 "unless you want to retain compatibility with older versions of the API."
33795 #: ../src/guestfs-actions.pod:8404
33796 msgid "guestfs_wc_c"
33800 #: ../src/guestfs-actions.pod:8406
33804 " guestfs_wc_c (guestfs_h *g,\n"
33805 " const char *path);\n"
33810 #: ../src/guestfs-actions.pod:8417
33811 msgid "guestfs_wc_l"
33815 #: ../src/guestfs-actions.pod:8419
33819 " guestfs_wc_l (guestfs_h *g,\n"
33820 " const char *path);\n"
33825 #: ../src/guestfs-actions.pod:8430
33826 msgid "guestfs_wc_w"
33830 #: ../src/guestfs-actions.pod:8432
33834 " guestfs_wc_w (guestfs_h *g,\n"
33835 " const char *path);\n"
33840 #: ../src/guestfs-actions.pod:8443
33841 msgid "guestfs_write"
33845 #: ../src/guestfs-actions.pod:8445
33849 " guestfs_write (guestfs_h *g,\n"
33850 " const char *path,\n"
33851 " const char *content,\n"
33852 " size_t content_size);\n"
33857 #: ../src/guestfs-actions.pod:8454
33858 msgid "See also C<guestfs_write_append>."
33862 #: ../src/guestfs-actions.pod:8463
33863 msgid "guestfs_write_append"
33867 #: ../src/guestfs-actions.pod:8465
33871 " guestfs_write_append (guestfs_h *g,\n"
33872 " const char *path,\n"
33873 " const char *content,\n"
33874 " size_t content_size);\n"
33879 #: ../src/guestfs-actions.pod:8474
33880 msgid "See also C<guestfs_write>."
33884 #: ../src/guestfs-actions.pod:8483
33885 msgid "guestfs_write_file"
33889 #: ../src/guestfs-actions.pod:8485
33893 " guestfs_write_file (guestfs_h *g,\n"
33894 " const char *path,\n"
33895 " const char *content,\n"
33901 #: ../src/guestfs-actions.pod:8491
33903 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33908 #: ../src/guestfs-actions.pod:8516
33909 msgid "guestfs_zegrep"
33913 #: ../src/guestfs-actions.pod:8518
33917 " guestfs_zegrep (guestfs_h *g,\n"
33918 " const char *regex,\n"
33919 " const char *path);\n"
33924 #: ../src/guestfs-actions.pod:8535
33925 msgid "guestfs_zegrepi"
33929 #: ../src/guestfs-actions.pod:8537
33933 " guestfs_zegrepi (guestfs_h *g,\n"
33934 " const char *regex,\n"
33935 " const char *path);\n"
33940 #: ../src/guestfs-actions.pod:8554
33941 msgid "guestfs_zero"
33945 #: ../src/guestfs-actions.pod:8556
33949 " guestfs_zero (guestfs_h *g,\n"
33950 " const char *device);\n"
33955 #: ../src/guestfs-actions.pod:8570
33957 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33958 "C<guestfs_is_zero_device>"
33962 #: ../src/guestfs-actions.pod:8582
33963 msgid "guestfs_zero_device"
33967 #: ../src/guestfs-actions.pod:8584
33971 " guestfs_zero_device (guestfs_h *g,\n"
33972 " const char *device);\n"
33977 #: ../src/guestfs-actions.pod:8588
33979 "This command writes zeroes over the entire C<device>. Compare with "
33980 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33984 #: ../src/guestfs-actions.pod:8603
33985 msgid "(Added in 1.3.1)"
33989 #: ../src/guestfs-actions.pod:8605
33990 msgid "guestfs_zerofree"
33994 #: ../src/guestfs-actions.pod:8607
33998 " guestfs_zerofree (guestfs_h *g,\n"
33999 " const char *device);\n"
34004 #: ../src/guestfs-actions.pod:8626
34005 msgid "guestfs_zfgrep"
34009 #: ../src/guestfs-actions.pod:8628
34013 " guestfs_zfgrep (guestfs_h *g,\n"
34014 " const char *pattern,\n"
34015 " const char *path);\n"
34020 #: ../src/guestfs-actions.pod:8645
34021 msgid "guestfs_zfgrepi"
34025 #: ../src/guestfs-actions.pod:8647
34029 " guestfs_zfgrepi (guestfs_h *g,\n"
34030 " const char *pattern,\n"
34031 " const char *path);\n"
34036 #: ../src/guestfs-actions.pod:8664
34037 msgid "guestfs_zfile"
34041 #: ../src/guestfs-actions.pod:8666
34045 " guestfs_zfile (guestfs_h *g,\n"
34046 " const char *meth,\n"
34047 " const char *path);\n"
34052 #: ../src/guestfs-actions.pod:8671
34054 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
34059 #: ../src/guestfs-actions.pod:8683
34061 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
34066 #: ../src/guestfs-actions.pod:8691
34067 msgid "guestfs_zgrep"
34071 #: ../src/guestfs-actions.pod:8693
34075 " guestfs_zgrep (guestfs_h *g,\n"
34076 " const char *regex,\n"
34077 " const char *path);\n"
34082 #: ../src/guestfs-actions.pod:8710
34083 msgid "guestfs_zgrepi"
34087 #: ../src/guestfs-actions.pod:8712
34091 " guestfs_zgrepi (guestfs_h *g,\n"
34092 " const char *regex,\n"
34093 " const char *path);\n"
34098 #: ../src/guestfs-availability.pod:3
34103 #: ../src/guestfs-availability.pod:5
34105 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
34106 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
34107 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
34108 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
34109 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
34113 #: ../src/guestfs-availability.pod:21
34118 #: ../src/guestfs-availability.pod:23
34119 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
34123 #: ../src/guestfs-availability.pod:26
34128 #: ../src/guestfs-availability.pod:28
34129 msgid "The following functions: L</guestfs_grub_install>"
34133 #: ../src/guestfs-availability.pod:31
34138 #: ../src/guestfs-availability.pod:33
34140 "The following functions: L</guestfs_inotify_add_watch> "
34141 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
34142 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
34146 #: ../src/guestfs-availability.pod:41
34147 msgid "B<linuxfsuuid>"
34151 #: ../src/guestfs-availability.pod:43
34153 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
34154 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
34158 #: ../src/guestfs-availability.pod:50
34159 msgid "B<linuxmodules>"
34163 #: ../src/guestfs-availability.pod:52
34164 msgid "The following functions: L</guestfs_modprobe>"
34168 #: ../src/guestfs-availability.pod:55
34169 msgid "B<linuxxattrs>"
34173 #: ../src/guestfs-availability.pod:57
34175 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
34176 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
34177 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
34178 "L</guestfs_setxattr>"
34182 #: ../src/guestfs-availability.pod:68
34187 #: ../src/guestfs-availability.pod:70
34189 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
34190 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
34191 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
34195 #: ../src/guestfs-availability.pod:79
34200 #: ../src/guestfs-availability.pod:81
34202 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
34203 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
34204 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
34205 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
34206 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
34207 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
34208 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
34209 "L</guestfs_vgs_full>"
34213 #: ../src/guestfs-availability.pod:104
34218 #: ../src/guestfs-availability.pod:106
34220 "The following functions: L</guestfs_md_create> L</guestfs_md_detail> "
34221 "L</guestfs_md_stop>"
34225 #: ../src/guestfs-availability.pod:111
34230 #: ../src/guestfs-availability.pod:113
34232 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
34233 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
34237 #: ../src/guestfs-availability.pod:119
34242 #: ../src/guestfs-availability.pod:121
34243 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
34247 #: ../src/guestfs-availability.pod:124
34248 msgid "B<ntfsprogs>"
34252 #: ../src/guestfs-availability.pod:126
34254 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
34255 "L</guestfs_ntfsresize_size>"
34259 #: ../src/guestfs-availability.pod:131
34260 msgid "B<realpath>"
34264 #: ../src/guestfs-availability.pod:133
34265 msgid "The following functions: L</guestfs_realpath>"
34269 #: ../src/guestfs-availability.pod:136
34274 #: ../src/guestfs-availability.pod:138
34276 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
34277 "L</guestfs_scrub_freespace>"
34281 #: ../src/guestfs-availability.pod:143
34286 #: ../src/guestfs-availability.pod:145
34287 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
34291 #: ../src/guestfs-availability.pod:149
34296 #: ../src/guestfs-availability.pod:151
34297 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
34301 #: ../src/guestfs-availability.pod:155
34302 msgid "B<zerofree>"
34306 #: ../src/guestfs-availability.pod:157
34307 msgid "The following functions: L</guestfs_zerofree>"
34311 #: ../src/guestfs-structs.pod:1
34312 msgid "guestfs_int_bool"
34316 #: ../src/guestfs-structs.pod:3
34319 " struct guestfs_int_bool {\n"
34327 #: ../src/guestfs-structs.pod:8
34330 " struct guestfs_int_bool_list {\n"
34331 " uint32_t len; /* Number of elements in list. */\n"
34332 " struct guestfs_int_bool *val; /* Elements. */\n"
34338 #: ../src/guestfs-structs.pod:13
34341 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
34342 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
34347 #: ../src/guestfs-structs.pod:16
34348 msgid "guestfs_lvm_pv"
34352 #: ../src/guestfs-structs.pod:18
34355 " struct guestfs_lvm_pv {\n"
34356 " char *pv_name;\n"
34357 " /* The next field is NOT nul-terminated, be careful when printing it: "
34359 " char pv_uuid[32];\n"
34361 " uint64_t pv_size;\n"
34362 " uint64_t dev_size;\n"
34363 " uint64_t pv_free;\n"
34364 " uint64_t pv_used;\n"
34365 " char *pv_attr;\n"
34366 " int64_t pv_pe_count;\n"
34367 " int64_t pv_pe_alloc_count;\n"
34368 " char *pv_tags;\n"
34369 " uint64_t pe_start;\n"
34370 " int64_t pv_mda_count;\n"
34371 " uint64_t pv_mda_free;\n"
34377 #: ../src/guestfs-structs.pod:36
34380 " struct guestfs_lvm_pv_list {\n"
34381 " uint32_t len; /* Number of elements in list. */\n"
34382 " struct guestfs_lvm_pv *val; /* Elements. */\n"
34388 #: ../src/guestfs-structs.pod:41
34391 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
34392 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
34397 #: ../src/guestfs-structs.pod:44
34398 msgid "guestfs_lvm_vg"
34402 #: ../src/guestfs-structs.pod:46
34405 " struct guestfs_lvm_vg {\n"
34406 " char *vg_name;\n"
34407 " /* The next field is NOT nul-terminated, be careful when printing it: "
34409 " char vg_uuid[32];\n"
34411 " char *vg_attr;\n"
34412 " uint64_t vg_size;\n"
34413 " uint64_t vg_free;\n"
34414 " char *vg_sysid;\n"
34415 " uint64_t vg_extent_size;\n"
34416 " int64_t vg_extent_count;\n"
34417 " int64_t vg_free_count;\n"
34418 " int64_t max_lv;\n"
34419 " int64_t max_pv;\n"
34420 " int64_t pv_count;\n"
34421 " int64_t lv_count;\n"
34422 " int64_t snap_count;\n"
34423 " int64_t vg_seqno;\n"
34424 " char *vg_tags;\n"
34425 " int64_t vg_mda_count;\n"
34426 " uint64_t vg_mda_free;\n"
34432 #: ../src/guestfs-structs.pod:69
34435 " struct guestfs_lvm_vg_list {\n"
34436 " uint32_t len; /* Number of elements in list. */\n"
34437 " struct guestfs_lvm_vg *val; /* Elements. */\n"
34443 #: ../src/guestfs-structs.pod:74
34446 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
34447 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
34452 #: ../src/guestfs-structs.pod:77
34453 msgid "guestfs_lvm_lv"
34457 #: ../src/guestfs-structs.pod:79
34460 " struct guestfs_lvm_lv {\n"
34461 " char *lv_name;\n"
34462 " /* The next field is NOT nul-terminated, be careful when printing it: "
34464 " char lv_uuid[32];\n"
34465 " char *lv_attr;\n"
34466 " int64_t lv_major;\n"
34467 " int64_t lv_minor;\n"
34468 " int64_t lv_kernel_major;\n"
34469 " int64_t lv_kernel_minor;\n"
34470 " uint64_t lv_size;\n"
34471 " int64_t seg_count;\n"
34473 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
34474 " float snap_percent;\n"
34475 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
34476 " float copy_percent;\n"
34477 " char *move_pv;\n"
34478 " char *lv_tags;\n"
34479 " char *mirror_log;\n"
34480 " char *modules;\n"
34486 #: ../src/guestfs-structs.pod:101
34489 " struct guestfs_lvm_lv_list {\n"
34490 " uint32_t len; /* Number of elements in list. */\n"
34491 " struct guestfs_lvm_lv *val; /* Elements. */\n"
34497 #: ../src/guestfs-structs.pod:106
34500 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
34501 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
34506 #: ../src/guestfs-structs.pod:111
34509 " struct guestfs_stat {\n"
34513 " int64_t nlink;\n"
34518 " int64_t blksize;\n"
34519 " int64_t blocks;\n"
34520 " int64_t atime;\n"
34521 " int64_t mtime;\n"
34522 " int64_t ctime;\n"
34528 #: ../src/guestfs-structs.pod:127
34531 " struct guestfs_stat_list {\n"
34532 " uint32_t len; /* Number of elements in list. */\n"
34533 " struct guestfs_stat *val; /* Elements. */\n"
34539 #: ../src/guestfs-structs.pod:132
34542 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
34543 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
34548 #: ../src/guestfs-structs.pod:137
34551 " struct guestfs_statvfs {\n"
34552 " int64_t bsize;\n"
34553 " int64_t frsize;\n"
34554 " int64_t blocks;\n"
34555 " int64_t bfree;\n"
34556 " int64_t bavail;\n"
34557 " int64_t files;\n"
34558 " int64_t ffree;\n"
34559 " int64_t favail;\n"
34562 " int64_t namemax;\n"
34568 #: ../src/guestfs-structs.pod:151
34571 " struct guestfs_statvfs_list {\n"
34572 " uint32_t len; /* Number of elements in list. */\n"
34573 " struct guestfs_statvfs *val; /* Elements. */\n"
34579 #: ../src/guestfs-structs.pod:156
34582 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
34583 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
34588 #: ../src/guestfs-structs.pod:159
34589 msgid "guestfs_dirent"
34593 #: ../src/guestfs-structs.pod:161
34596 " struct guestfs_dirent {\n"
34605 #: ../src/guestfs-structs.pod:167
34608 " struct guestfs_dirent_list {\n"
34609 " uint32_t len; /* Number of elements in list. */\n"
34610 " struct guestfs_dirent *val; /* Elements. */\n"
34616 #: ../src/guestfs-structs.pod:172
34619 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
34620 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
34625 #: ../src/guestfs-structs.pod:177
34628 " struct guestfs_version {\n"
34629 " int64_t major;\n"
34630 " int64_t minor;\n"
34631 " int64_t release;\n"
34638 #: ../src/guestfs-structs.pod:184
34641 " struct guestfs_version_list {\n"
34642 " uint32_t len; /* Number of elements in list. */\n"
34643 " struct guestfs_version *val; /* Elements. */\n"
34649 #: ../src/guestfs-structs.pod:189
34652 " void guestfs_free_version (struct guestfs_free_version *);\n"
34653 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
34658 #: ../src/guestfs-structs.pod:192
34659 msgid "guestfs_xattr"
34663 #: ../src/guestfs-structs.pod:194
34666 " struct guestfs_xattr {\n"
34667 " char *attrname;\n"
34668 " /* The next two fields describe a byte array. */\n"
34669 " uint32_t attrval_len;\n"
34670 " char *attrval;\n"
34676 #: ../src/guestfs-structs.pod:201
34679 " struct guestfs_xattr_list {\n"
34680 " uint32_t len; /* Number of elements in list. */\n"
34681 " struct guestfs_xattr *val; /* Elements. */\n"
34687 #: ../src/guestfs-structs.pod:206
34690 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
34691 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
34696 #: ../src/guestfs-structs.pod:209
34697 msgid "guestfs_inotify_event"
34701 #: ../src/guestfs-structs.pod:211
34704 " struct guestfs_inotify_event {\n"
34705 " int64_t in_wd;\n"
34706 " uint32_t in_mask;\n"
34707 " uint32_t in_cookie;\n"
34708 " char *in_name;\n"
34714 #: ../src/guestfs-structs.pod:218
34717 " struct guestfs_inotify_event_list {\n"
34718 " uint32_t len; /* Number of elements in list. */\n"
34719 " struct guestfs_inotify_event *val; /* Elements. */\n"
34725 #: ../src/guestfs-structs.pod:223
34728 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
34729 " void guestfs_free_inotify_event_list (struct "
34730 "guestfs_free_inotify_event_list *);\n"
34735 #: ../src/guestfs-structs.pod:226
34736 msgid "guestfs_partition"
34740 #: ../src/guestfs-structs.pod:228
34743 " struct guestfs_partition {\n"
34744 " int32_t part_num;\n"
34745 " uint64_t part_start;\n"
34746 " uint64_t part_end;\n"
34747 " uint64_t part_size;\n"
34753 #: ../src/guestfs-structs.pod:235
34756 " struct guestfs_partition_list {\n"
34757 " uint32_t len; /* Number of elements in list. */\n"
34758 " struct guestfs_partition *val; /* Elements. */\n"
34764 #: ../src/guestfs-structs.pod:240
34767 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
34768 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
34773 #: ../src/guestfs-structs.pod:243
34774 msgid "guestfs_application"
34778 #: ../src/guestfs-structs.pod:245
34781 " struct guestfs_application {\n"
34782 " char *app_name;\n"
34783 " char *app_display_name;\n"
34784 " int32_t app_epoch;\n"
34785 " char *app_version;\n"
34786 " char *app_release;\n"
34787 " char *app_install_path;\n"
34788 " char *app_trans_path;\n"
34789 " char *app_publisher;\n"
34790 " char *app_url;\n"
34791 " char *app_source_package;\n"
34792 " char *app_summary;\n"
34793 " char *app_description;\n"
34799 #: ../src/guestfs-structs.pod:260
34802 " struct guestfs_application_list {\n"
34803 " uint32_t len; /* Number of elements in list. */\n"
34804 " struct guestfs_application *val; /* Elements. */\n"
34810 #: ../src/guestfs-structs.pod:265
34813 " void guestfs_free_application (struct guestfs_free_application *);\n"
34814 " void guestfs_free_application_list (struct guestfs_free_application_list "
34820 #: ../src/guestfs.pod:5
34821 msgid "guestfs - Library for accessing and modifying virtual machine images"
34825 #: ../src/guestfs.pod:11
34828 " guestfs_h *g = guestfs_create ();\n"
34829 " guestfs_add_drive (g, \"guest.img\");\n"
34830 " guestfs_launch (g);\n"
34831 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34832 " guestfs_touch (g, \"/hello\");\n"
34833 " guestfs_umount (g, \"/\");\n"
34834 " guestfs_close (g);\n"
34839 #: ../src/guestfs.pod:25
34841 "Libguestfs is a library for accessing and modifying guest disk images. "
34842 "Amongst the things this is good for: making batch configuration changes to "
34843 "guests, getting disk used/free statistics (see also: virt-df), migrating "
34844 "between virtualization systems (see also: virt-p2v), performing partial "
34845 "backups, performing partial guest clones, cloning guests and changing "
34846 "registry/UUID/hostname info, and much else besides."
34850 #: ../src/guestfs.pod:33
34852 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
34853 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
34854 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34859 #: ../src/guestfs.pod:38
34861 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34862 "what filesystem is in each LV, etc.). It can also run commands in the "
34863 "context of the guest. Also you can access filesystems over FUSE."
34867 #: ../src/guestfs.pod:43
34869 "Libguestfs is a library that can be linked with C and C++ management "
34870 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
34871 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
34876 #: ../src/guestfs.pod:48
34878 "You don't need to be root to use libguestfs, although obviously you do need "
34879 "enough permissions to access the disk images."
34883 #: ../src/guestfs.pod:51
34885 "Libguestfs is a large API because it can do many things. For a gentle "
34886 "introduction, please read the L</API OVERVIEW> section next."
34890 #: ../src/guestfs.pod:54
34892 "There are also some example programs in the L<guestfs-examples(3)> manual "
34897 #: ../src/guestfs.pod:57
34898 msgid "API OVERVIEW"
34902 #: ../src/guestfs.pod:59
34904 "This section provides a gentler overview of the libguestfs API. We also try "
34905 "to group API calls together, where that may not be obvious from reading "
34906 "about the individual calls in the main section of this manual."
34910 #: ../src/guestfs.pod:64
34915 #: ../src/guestfs.pod:66
34917 "Before you can use libguestfs calls, you have to create a handle. Then you "
34918 "must add at least one disk image to the handle, followed by launching the "
34919 "handle, then performing whatever operations you want, and finally closing "
34920 "the handle. By convention we use the single letter C<g> for the name of the "
34921 "handle variable, although of course you can use any name you want."
34925 #: ../src/guestfs.pod:73
34926 msgid "The general structure of all libguestfs-using programs looks like this:"
34930 #: ../src/guestfs.pod:76
34933 " guestfs_h *g = guestfs_create ();\n"
34938 #: ../src/guestfs.pod:78
34941 " /* Call guestfs_add_drive additional times if there are\n"
34942 " * multiple disk images.\n"
34944 " guestfs_add_drive (g, \"guest.img\");\n"
34949 #: ../src/guestfs.pod:83
34952 " /* Most manipulation calls won't work until you've launched\n"
34953 " * the handle 'g'. You have to do this _after_ adding drives\n"
34954 " * and _before_ other commands.\n"
34956 " guestfs_launch (g);\n"
34961 #: ../src/guestfs.pod:89
34964 " /* Now you can examine what partitions, LVs etc are available.\n"
34966 " char **partitions = guestfs_list_partitions (g);\n"
34967 " char **logvols = guestfs_lvs (g);\n"
34972 #: ../src/guestfs.pod:94
34975 " /* To access a filesystem in the image, you must mount it.\n"
34977 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34982 #: ../src/guestfs.pod:98
34985 " /* Now you can perform filesystem actions on the guest\n"
34988 " guestfs_touch (g, \"/hello\");\n"
34993 #: ../src/guestfs.pod:103
34996 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34997 " * it is done automatically when you close the handle. See\n"
34998 " * discussion of autosync in this page.\n"
35000 " guestfs_sync (g);\n"
35005 #: ../src/guestfs.pod:109
35008 " /* Close the handle 'g'. */\n"
35009 " guestfs_close (g);\n"
35014 #: ../src/guestfs.pod:112
35016 "The code above doesn't include any error checking. In real code you should "
35017 "check return values carefully for errors. In general all functions that "
35018 "return integers return C<-1> on error, and all functions that return "
35019 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
35020 "how to handle errors, and consult the documentation for each function call "
35021 "below to see precisely how they return error indications. See "
35022 "L<guestfs-examples(3)> for fully worked examples."
35026 #: ../src/guestfs.pod:121
35027 msgid "DISK IMAGES"
35031 #: ../src/guestfs.pod:123
35033 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
35034 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
35035 "actual block device, or simply an empty file of zeroes that you have created "
35036 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
35041 #: ../src/guestfs.pod:129
35043 "The call you should use in modern code for adding drives is "
35044 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
35045 "specifying that the format is raw, do:"
35049 #: ../src/guestfs.pod:133
35052 " guestfs_add_drive_opts (g, filename,\n"
35053 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
35059 #: ../src/guestfs.pod:137
35060 msgid "You can add a disk read-only using:"
35064 #: ../src/guestfs.pod:139
35067 " guestfs_add_drive_opts (g, filename,\n"
35068 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
35069 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
35075 #: ../src/guestfs.pod:144
35077 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
35078 "libguestfs won't modify the file."
35082 #: ../src/guestfs.pod:147
35084 "Be extremely cautious if the disk image is in use, eg. if it is being used "
35085 "by a virtual machine. Adding it read-write will almost certainly cause disk "
35086 "corruption, but adding it read-only is safe."
35090 #: ../src/guestfs.pod:151
35092 "You must add at least one disk image, and you may add multiple disk images. "
35093 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
35094 "first one you added), C</dev/sdb> (for the second one you added), etc."
35098 #: ../src/guestfs.pod:156
35100 "Once L</guestfs_launch> has been called you cannot add any more images. You "
35101 "can call L</guestfs_list_devices> to get a list of the device names, in the "
35102 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
35106 #: ../src/guestfs.pod:161
35111 #: ../src/guestfs.pod:163
35113 "Before you can read or write files, create directories and so on in a disk "
35114 "image that contains filesystems, you have to mount those filesystems using "
35115 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
35116 "a disk image contains (for example) one partition with a filesystem on that "
35117 "partition, then you can mount it directly:"
35121 #: ../src/guestfs.pod:170
35124 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
35129 #: ../src/guestfs.pod:172
35131 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
35132 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
35133 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
35134 "that these are libguestfs virtual devices, and are nothing to do with host "
35139 #: ../src/guestfs.pod:178
35141 "If you are given a disk image and you don't know what it contains then you "
35142 "have to find out. Libguestfs can do that too: use "
35143 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
35144 "and LVs, and either try mounting each to see what is mountable, or else "
35145 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
35146 "filesystems, use L</guestfs_list_filesystems>."
35150 #: ../src/guestfs.pod:186
35152 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
35153 "L</INSPECTION> below). But you might find it easier to look at higher level "
35154 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
35158 #: ../src/guestfs.pod:191
35160 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
35161 "several other variations of the C<guestfs_mount_*> call."
35165 #: ../src/guestfs.pod:194
35166 msgid "FILESYSTEM ACCESS AND MODIFICATION"
35170 #: ../src/guestfs.pod:196
35172 "The majority of the libguestfs API consists of fairly low-level calls for "
35173 "accessing and modifying the files, directories, symlinks etc on mounted "
35174 "filesystems. There are over a hundred such calls which you can find listed "
35175 "in detail below in this man page, and we don't even pretend to cover them "
35176 "all in this overview."
35180 #: ../src/guestfs.pod:202
35182 "Specify filenames as full paths, starting with C<\"/\"> and including the "
35187 #: ../src/guestfs.pod:205
35189 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
35190 "the file called C<\"etc/passwd\"> then you could do:"
35194 #: ../src/guestfs.pod:208
35197 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
35202 #: ../src/guestfs.pod:210
35204 "This would return C<data> as a newly allocated buffer containing the full "
35205 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
35206 "or C<NULL> if there was an error."
35210 #: ../src/guestfs.pod:214
35212 "As another example, to create a top-level directory on that filesystem "
35213 "called C<\"var\"> you would do:"
35217 #: ../src/guestfs.pod:217
35220 " guestfs_mkdir (g, \"/var\");\n"
35225 #: ../src/guestfs.pod:219
35226 msgid "To create a symlink you could do:"
35230 #: ../src/guestfs.pod:221
35233 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
35234 " \"/etc/rc3.d/S30portmap\");\n"
35239 #: ../src/guestfs.pod:224
35241 "Libguestfs will reject attempts to use relative paths and there is no "
35242 "concept of a current working directory."
35246 #: ../src/guestfs.pod:227
35248 "Libguestfs can return errors in many situations: for example if the "
35249 "filesystem isn't writable, or if a file or directory that you requested "
35250 "doesn't exist. If you are using the C API (documented here) you have to "
35251 "check for those error conditions after each call. (Other language bindings "
35252 "turn these errors into exceptions)."
35256 #: ../src/guestfs.pod:233
35258 "File writes are affected by the per-handle umask, set by calling "
35259 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
35263 #: ../src/guestfs.pod:236
35264 msgid "PARTITIONING"
35268 #: ../src/guestfs.pod:238
35270 "Libguestfs contains API calls to read, create and modify partition tables on "
35275 #: ../src/guestfs.pod:241
35277 "In the common case where you want to create a single partition covering the "
35278 "whole disk, you should use the L</guestfs_part_disk> call:"
35282 #: ../src/guestfs.pod:245
35285 " const char *parttype = \"mbr\";\n"
35286 " if (disk_is_larger_than_2TB)\n"
35287 " parttype = \"gpt\";\n"
35288 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
35293 #: ../src/guestfs.pod:250
35295 "Obviously this effectively wipes anything that was on that disk image "
35300 #: ../src/guestfs.pod:253
35305 #: ../src/guestfs.pod:255
35307 "Libguestfs provides access to a large part of the LVM2 API, such as "
35308 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
35309 "unless you familiarize yourself with the concepts of physical volumes, "
35310 "volume groups and logical volumes."
35314 #: ../src/guestfs.pod:260
35316 "This author strongly recommends reading the LVM HOWTO, online at "
35317 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
35321 #: ../src/guestfs.pod:263
35322 msgid "DOWNLOADING"
35326 #: ../src/guestfs.pod:265
35328 "Use L</guestfs_cat> to download small, text only files. This call is "
35329 "limited to files which are less than 2 MB and which cannot contain any ASCII "
35330 "NUL (C<\\0>) characters. However the API is very simple to use."
35334 #: ../src/guestfs.pod:269
35336 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
35337 "bit data, since it returns a (pointer, size) pair. However it is still "
35338 "limited to \"small\" files, less than 2 MB."
35342 #: ../src/guestfs.pod:273
35344 "L</guestfs_download> can be used to download any file, with no limits on "
35345 "content or size (even files larger than 4 GB)."
35349 #: ../src/guestfs.pod:276
35350 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
35354 #: ../src/guestfs.pod:279
35359 #: ../src/guestfs.pod:281
35361 "It's often the case that you want to write a file or files to the disk "
35366 #: ../src/guestfs.pod:284
35368 "To write a small file with fixed content, use L</guestfs_write>. To create "
35369 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
35370 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
35371 "variety of other functions for creating test files, for example "
35372 "L</guestfs_fill> and L</guestfs_fill_pattern>."
35376 #: ../src/guestfs.pod:290
35378 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
35379 "file content or size (even files larger than 4 GB)."
35383 #: ../src/guestfs.pod:293
35384 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
35388 #: ../src/guestfs.pod:295
35390 "However the fastest way to upload I<large numbers of arbitrary files> is to "
35391 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
35392 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
35393 "the drive in a predictable way (eg. adding it last after all other drives) "
35394 "then you can get the device name from L</guestfs_list_devices> and mount it "
35395 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
35396 "sometimes non-portable between kernel versions, and they don't support "
35397 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
35398 "using a label or UUID, use an ISO image instead."
35402 #: ../src/guestfs.pod:306
35407 #: ../src/guestfs.pod:308
35409 "There are various different commands for copying between files and devices "
35410 "and in and out of the guest filesystem. These are summarised in the table "
35415 #: ../src/guestfs.pod:314
35416 msgid "B<file> to B<file>"
35420 #: ../src/guestfs.pod:316
35422 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
35423 "directories recursively."
35427 #: ../src/guestfs.pod:319
35428 msgid "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
35432 #: ../src/guestfs.pod:322
35433 msgid "B<file> to B<device>"
35437 #: ../src/guestfs.pod:324
35438 msgid "B<device> to B<file>"
35442 #: ../src/guestfs.pod:326
35443 msgid "B<device> to B<device>"
35447 #: ../src/guestfs.pod:328
35449 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or "
35450 "L</guestfs_copy_device_to_device>."
35454 #: ../src/guestfs.pod:331
35455 msgid "Example: duplicate the contents of an LV:"
35459 #: ../src/guestfs.pod:333
35462 " guestfs_copy_device_to_device (g,\n"
35463 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
35464 " /* -1 marks the end of the list of optional parameters */\n"
35470 #: ../src/guestfs.pod:338
35472 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
35473 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
35474 "optional C<size> parameter:"
35478 #: ../src/guestfs.pod:342
35481 " guestfs_copy_device_to_device (g,\n"
35482 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
35483 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
35489 #: ../src/guestfs.pod:347
35490 msgid "B<file on the host> to B<file or device>"
35494 #: ../src/guestfs.pod:349
35495 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
35499 #: ../src/guestfs.pod:351
35500 msgid "B<file or device> to B<file on the host>"
35504 #: ../src/guestfs.pod:353
35505 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
35509 #: ../src/guestfs.pod:357
35510 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
35514 #: ../src/guestfs.pod:359
35516 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
35517 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
35518 "appears you can only upload and download to files. However many Un*x-like "
35519 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
35520 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
35521 "stderr, and arbitrary file descriptor N."
35525 #: ../src/guestfs.pod:367
35526 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
35530 #: ../src/guestfs.pod:370
35533 " guestfs_download (g, filename, \"/dev/stdout\");\n"
35538 #: ../src/guestfs.pod:372
35539 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
35543 #: ../src/guestfs.pod:374
35546 " char devfd[64];\n"
35547 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
35548 " guestfs_tar_out (g, \"/\", devfd);\n"
35553 #: ../src/guestfs.pod:378
35554 msgid "LISTING FILES"
35558 #: ../src/guestfs.pod:380
35560 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
35561 "L<guestfish(1)>-equivalent command C<ll>)."
35565 #: ../src/guestfs.pod:383
35567 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
35568 "programs, as a flat list of strings."
35572 #: ../src/guestfs.pod:386
35574 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
35575 "directory, plus additional information about each one. It is more "
35576 "equivalent to using the L<readdir(3)> call on a local filesystem."
35580 #: ../src/guestfs.pod:390
35582 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
35587 #: ../src/guestfs.pod:393
35588 msgid "RUNNING COMMANDS"
35592 #: ../src/guestfs.pod:395
35594 "Although libguestfs is primarily an API for manipulating files inside guest "
35595 "images, we also provide some limited facilities for running commands inside "
35600 #: ../src/guestfs.pod:399
35601 msgid "There are many limitations to this:"
35605 #: ../src/guestfs.pod:405
35607 "The kernel version that the command runs under will be different from what "
35612 #: ../src/guestfs.pod:410
35614 "If the command needs to communicate with daemons, then most likely they "
35615 "won't be running."
35619 #: ../src/guestfs.pod:415
35620 msgid "The command will be running in limited memory."
35624 #: ../src/guestfs.pod:419
35626 "The network may not be available unless you enable it (see "
35627 "L</guestfs_set_network>)."
35631 #: ../src/guestfs.pod:424
35632 msgid "Only supports Linux guests (not Windows, BSD, etc)."
35636 #: ../src/guestfs.pod:428
35637 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
35641 #: ../src/guestfs.pod:433
35643 "For SELinux guests, you may need to enable SELinux and load policy first. "
35644 "See L</SELINUX> in this manpage."
35648 #: ../src/guestfs.pod:438
35650 "I<Security:> It is not safe to run commands from untrusted, possibly "
35651 "malicious guests. These commands may attempt to exploit your program by "
35652 "sending unexpected output. They could also try to exploit the Linux kernel "
35653 "or qemu provided by the libguestfs appliance. They could use the network "
35654 "provided by the libguestfs appliance to bypass ordinary network partitions "
35655 "and firewalls. They could use the elevated privileges or different SELinux "
35656 "context of your program to their advantage."
35660 #: ../src/guestfs.pod:447
35662 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
35663 "(a script which runs when the guest next boots normally), and to have this "
35664 "script run the commands you want in the normal context of the running guest, "
35665 "network security and so on. For information about other security issues, "
35666 "see L</SECURITY>."
35670 #: ../src/guestfs.pod:455
35672 "The two main API calls to run commands are L</guestfs_command> and "
35673 "L</guestfs_sh> (there are also variations)."
35677 #: ../src/guestfs.pod:458
35679 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
35680 "shell globs, redirections, etc will work."
35684 #: ../src/guestfs.pod:461
35685 msgid "CONFIGURATION FILES"
35689 #: ../src/guestfs.pod:463
35691 "To read and write configuration files in Linux guest filesystems, we "
35692 "strongly recommend using Augeas. For example, Augeas understands how to "
35693 "read and write, say, a Linux shadow password file or X.org configuration "
35694 "file, and so avoids you having to write that code."
35698 #: ../src/guestfs.pod:468
35700 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
35701 "document Augeas itself here because there is excellent documentation on the "
35702 "L<http://augeas.net/> website."
35706 #: ../src/guestfs.pod:472
35708 "If you don't want to use Augeas (you fool!) then try calling "
35709 "L</guestfs_read_lines> to get the file as a list of lines which you can "
35714 #: ../src/guestfs.pod:476
35719 #: ../src/guestfs.pod:478
35721 "We support SELinux guests. To ensure that labeling happens correctly in "
35722 "SELinux guests, you need to enable SELinux and load the guest's policy:"
35726 #: ../src/guestfs.pod:486
35727 msgid "Before launching, do:"
35731 #: ../src/guestfs.pod:488
35734 " guestfs_set_selinux (g, 1);\n"
35739 #: ../src/guestfs.pod:492
35741 "After mounting the guest's filesystem(s), load the policy. This is best "
35742 "done by running the L<load_policy(8)> command in the guest itself:"
35746 #: ../src/guestfs.pod:496
35749 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
35754 #: ../src/guestfs.pod:498
35756 "(Older versions of C<load_policy> require you to specify the name of the "
35761 #: ../src/guestfs.pod:503
35763 "Optionally, set the security context for the API. The correct security "
35764 "context to use can only be known by inspecting the guest. As an example:"
35768 #: ../src/guestfs.pod:507
35771 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
35776 #: ../src/guestfs.pod:511
35777 msgid "This will work for running commands and editing existing files."
35781 #: ../src/guestfs.pod:513
35783 "When new files are created, you may need to label them explicitly, for "
35784 "example by running the external command C<restorecon pathname>."
35788 #: ../src/guestfs.pod:517
35793 #: ../src/guestfs.pod:519
35795 "Certain calls are affected by the current file mode creation mask (the "
35796 "\"umask\"). In particular ones which create files or directories, such as "
35797 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
35798 "either the default mode that the file is created with or modifies the mode "
35803 #: ../src/guestfs.pod:525
35805 "The default umask is C<022>, so files are created with modes such as C<0644> "
35806 "and directories with C<0755>."
35810 #: ../src/guestfs.pod:528
35812 "There are two ways to avoid being affected by umask. Either set umask to 0 "
35813 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
35814 "L</guestfs_chmod> after creating each file or directory."
35818 #: ../src/guestfs.pod:532
35819 msgid "For more information about umask, see L<umask(2)>."
35823 #: ../src/guestfs.pod:536
35825 "Libguestfs allows you to access Linux guests which have been encrypted using "
35826 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
35827 "standard. This includes nearly all whole disk encryption systems used by "
35828 "modern Linux guests."
35832 #: ../src/guestfs.pod:542
35834 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
35835 "returns the string C<crypto_LUKS>)."
35839 #: ../src/guestfs.pod:545
35841 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
35842 "will require the passphrase!"
35846 #: ../src/guestfs.pod:548
35848 "Opening a LUKS device creates a new device mapper device called "
35849 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
35850 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
35851 "decrypted from and encrypted to the underlying block device respectively."
35855 #: ../src/guestfs.pod:554
35857 "LVM volume groups on the device can be made visible by calling "
35858 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
35859 "volume(s) can now be mounted in the usual way."
35863 #: ../src/guestfs.pod:558
35865 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
35866 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35867 "[\"/dev/VG\"])>. Then close the mapper device by calling "
35868 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35869 "underlying encrypted block device)."
35873 #: ../src/guestfs.pod:565
35878 #: ../src/guestfs.pod:567
35880 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35881 "contains operating systems, an install CD or a live CD. (These APIs used to "
35882 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
35883 "version 1.5.3 the most frequently used part of this library has been "
35884 "rewritten in C and moved into the core code)."
35888 #: ../src/guestfs.pod:574
35890 "Add all disks belonging to the unknown virtual machine and call "
35891 "L</guestfs_launch> in the usual way."
35895 #: ../src/guestfs.pod:577
35897 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
35898 "and certain heuristics, and returns a list of operating systems that were "
35899 "found. An empty list means none were found. A single element is the root "
35900 "filesystem of the operating system. For dual- or multi-boot guests, "
35901 "multiple roots can be returned, each one corresponding to a separate "
35902 "operating system. (Multi-boot virtual machines are extremely rare in the "
35903 "world of virtualization, but since this scenario can happen, we have built "
35904 "libguestfs to deal with it.)"
35908 #: ../src/guestfs.pod:586
35910 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35911 "to get additional details about that operating system. For example, call "
35912 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
35913 "Windows and Linux-based operating systems respectively."
35917 #: ../src/guestfs.pod:592
35919 "Un*x-like and Linux-based operating systems usually consist of several "
35920 "filesystems which are mounted at boot time (for example, a separate boot "
35921 "partition mounted on C</boot>). The inspection rules are able to detect how "
35922 "filesystems correspond to mount points. Call "
35923 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35924 "hash table like this example:"
35928 #: ../src/guestfs.pod:599
35931 " /boot => /dev/sda1\n"
35932 " / => /dev/vg_guest/lv_root\n"
35933 " /usr => /dev/vg_guest/lv_usr\n"
35938 #: ../src/guestfs.pod:603
35940 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35941 "filesystems as suggested."
35945 #: ../src/guestfs.pod:606
35947 "Be careful to mount filesystems in the right order (eg. C</> before "
35948 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
35953 #: ../src/guestfs.pod:610
35955 "Inspection currently only works for some common operating systems. "
35956 "Contributors are welcome to send patches for other operating systems that we "
35957 "currently cannot detect."
35961 #: ../src/guestfs.pod:614
35963 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35964 "for more details. The L</guestfs_inspect_os> function just ignores any "
35965 "encrypted devices."
35969 #: ../src/guestfs.pod:618
35971 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35972 "inspection and caches the results in the guest handle. Subsequent calls to "
35973 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
35974 "re-read the disks. If you change the content of the guest disks, you can "
35975 "redo inspection by calling L</guestfs_inspect_os> again. "
35976 "(L</guestfs_inspect_list_applications> works a little differently from the "
35977 "other calls and does read the disks. See documentation for that function "
35982 #: ../src/guestfs.pod:627
35983 msgid "INSPECTING INSTALL DISKS"
35987 #: ../src/guestfs.pod:629
35989 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35994 #: ../src/guestfs.pod:632
35996 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35997 "system, which currently can be C<installed> (a regular operating system) or "
35998 "C<installer> (some sort of install disk)."
36002 #: ../src/guestfs.pod:636
36004 "Further information is available about the operating system that can be "
36005 "installed using the regular inspection APIs like "
36006 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
36011 #: ../src/guestfs.pod:641
36013 "Some additional information specific to installer disks is also available "
36014 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
36015 "L</guestfs_inspect_is_multipart> calls."
36019 #: ../src/guestfs.pod:646
36020 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
36024 #: ../src/guestfs.pod:648
36026 "Libguestfs can mount NTFS partitions. It does this using the "
36027 "L<http://www.ntfs-3g.org/> driver."
36031 #: ../src/guestfs.pod:651
36032 msgid "DRIVE LETTERS AND PATHS"
36036 #: ../src/guestfs.pod:653
36038 "DOS and Windows still use drive letters, and the filesystems are always "
36039 "treated as case insensitive by Windows itself, and therefore you might find "
36040 "a Windows configuration file referring to a path like "
36041 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
36042 "that directory might be referred to as C</WINDOWS/System32>."
36046 #: ../src/guestfs.pod:659
36048 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
36049 "L</guestfs_inspect_get_drive_mappings>)"
36053 #: ../src/guestfs.pod:662
36055 "Dealing with separator characters (backslash vs forward slash) is outside "
36056 "the scope of libguestfs, but usually a simple character replacement will "
36061 #: ../src/guestfs.pod:666
36063 "To resolve the case insensitivity of paths, call "
36064 "L</guestfs_case_sensitive_path>."
36068 #: ../src/guestfs.pod:669
36069 msgid "ACCESSING THE WINDOWS REGISTRY"
36073 #: ../src/guestfs.pod:671
36075 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
36076 "files, through the library C<hivex> which is part of the libguestfs project "
36077 "although ships as a separate tarball. You have to locate and download the "
36078 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
36079 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
36080 "L<virt-win-reg(1)> for more help on this issue."
36084 #: ../src/guestfs.pod:679
36085 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
36089 #: ../src/guestfs.pod:681
36091 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
36092 "provide something which looks like a Linux symlink. The way it tries to do "
36093 "the rewriting is described here:"
36097 #: ../src/guestfs.pod:685
36098 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
36102 #: ../src/guestfs.pod:687
36104 "The essential problem is that ntfs-3g simply does not have enough "
36105 "information to do a correct job. NTFS links can contain drive letters and "
36106 "references to external device GUIDs that ntfs-3g has no way of resolving. "
36107 "It is almost certainly the case that libguestfs callers should ignore what "
36108 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
36112 #: ../src/guestfs.pod:694
36114 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
36115 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
36116 "attribute, and read the raw reparse data from that (you can find the format "
36117 "documented in various places around the web)."
36121 #: ../src/guestfs.pod:699
36122 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
36126 #: ../src/guestfs.pod:701
36128 "There are other useful extended attributes that can be read from ntfs-3g "
36129 "filesystems (using L</guestfs_getxattr>). See:"
36133 #: ../src/guestfs.pod:704
36134 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
36138 #: ../src/guestfs.pod:706
36139 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
36143 #: ../src/guestfs.pod:708
36145 "Although we don't want to discourage you from using the C API, we will "
36146 "mention here that the same API is also available in other languages."
36150 #: ../src/guestfs.pod:711
36152 "The API is broadly identical in all supported languages. This means that "
36153 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
36154 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
36155 "OCaml. In other words, a straightforward, predictable isomorphism between "
36160 #: ../src/guestfs.pod:717
36162 "Error messages are automatically transformed into exceptions if the language "
36167 #: ../src/guestfs.pod:720
36169 "We don't try to \"object orientify\" parts of the API in OO languages, "
36170 "although contributors are welcome to write higher level APIs above what we "
36171 "provide in their favourite languages if they wish."
36175 #: ../src/guestfs.pod:726
36180 #: ../src/guestfs.pod:728
36182 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
36183 "identical to the C API. C++ classes and exceptions are not used."
36187 #: ../src/guestfs.pod:732
36192 #: ../src/guestfs.pod:734
36194 "The C# bindings are highly experimental. Please read the warnings at the "
36195 "top of C<csharp/Libguestfs.cs>."
36199 #: ../src/guestfs.pod:737
36204 #: ../src/guestfs.pod:739
36205 msgid "See L<guestfs-erlang(3)>."
36209 #: ../src/guestfs.pod:741
36214 #: ../src/guestfs.pod:743
36216 "This is the only language binding that is working but incomplete. Only "
36217 "calls which return simple integers have been bound in Haskell, and we are "
36218 "looking for help to complete this binding."
36222 #: ../src/guestfs.pod:747
36227 #: ../src/guestfs.pod:749
36229 "Full documentation is contained in the Javadoc which is distributed with "
36230 "libguestfs. For examples, see L<guestfs-java(3)>."
36234 #: ../src/guestfs.pod:752
36239 #: ../src/guestfs.pod:754
36240 msgid "See L<guestfs-ocaml(3)>."
36244 #: ../src/guestfs.pod:756
36249 #: ../src/guestfs.pod:758
36250 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
36254 #: ../src/guestfs.pod:760
36259 #: ../src/guestfs.pod:762
36261 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
36262 "the php-libguestfs package for your distribution."
36266 #: ../src/guestfs.pod:765
36267 msgid "The PHP binding only works correctly on 64 bit machines."
36271 #: ../src/guestfs.pod:767
36276 #: ../src/guestfs.pod:769
36277 msgid "See L<guestfs-python(3)>."
36281 #: ../src/guestfs.pod:771
36286 #: ../src/guestfs.pod:773
36287 msgid "See L<guestfs-ruby(3)>."
36291 #: ../src/guestfs.pod:775
36292 msgid "B<shell scripts>"
36296 #: ../src/guestfs.pod:777
36297 msgid "See L<guestfish(1)>."
36301 #: ../src/guestfs.pod:781
36302 msgid "LIBGUESTFS GOTCHAS"
36306 #: ../src/guestfs.pod:783
36308 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
36309 "system [...] that works in the way it is documented but is counterintuitive "
36310 "and almost invites mistakes.\""
36314 #: ../src/guestfs.pod:787
36316 "Since we developed libguestfs and the associated tools, there are several "
36317 "things we would have designed differently, but are now stuck with for "
36318 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
36319 "release, you can expect these to change. Beware of them."
36323 #: ../src/guestfs.pod:795
36324 msgid "Autosync / forgetting to sync."
36328 #: ../src/guestfs.pod:797
36330 "I<Update:> Autosync is enabled by default for all API users starting from "
36331 "libguestfs 1.5.24. This section only applies to older versions."
36335 #: ../src/guestfs.pod:800
36337 "When modifying a filesystem from C or another language, you B<must> unmount "
36338 "all filesystems and call L</guestfs_sync> explicitly before you close the "
36339 "libguestfs handle. You can also call:"
36343 #: ../src/guestfs.pod:804
36346 " guestfs_set_autosync (g, 1);\n"
36351 #: ../src/guestfs.pod:806
36353 "to have the unmount/sync done automatically for you when the handle 'g' is "
36354 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
36359 #: ../src/guestfs.pod:810
36361 "If you forget to do this, then it is entirely possible that your changes "
36362 "won't be written out, or will be partially written, or (very rarely) that "
36363 "you'll get disk corruption."
36367 #: ../src/guestfs.pod:814
36369 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
36370 "guestfish scripts that forget to sync will work just fine, which can make "
36371 "this very puzzling if you are trying to debug a problem."
36375 #: ../src/guestfs.pod:818
36376 msgid "Mount option C<-o sync> should not be the default."
36380 #: ../src/guestfs.pod:820
36382 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
36383 "libguestfs 1.13.16. This section only applies to older versions."
36387 #: ../src/guestfs.pod:823
36389 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
36390 "However C<-o sync> does not add any reliability benefit, but does have a "
36391 "very large performance impact."
36395 #: ../src/guestfs.pod:827
36397 "The work around is to use L</guestfs_mount_options> and set the mount "
36398 "options that you actually want to use."
36402 #: ../src/guestfs.pod:830
36403 msgid "Read-only should be the default."
36407 #: ../src/guestfs.pod:832
36409 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
36410 "specify I<--rw> if you want to make changes to the image."
36414 #: ../src/guestfs.pod:835
36415 msgid "This would reduce the potential to corrupt live VM images."
36419 #: ../src/guestfs.pod:837
36421 "Note that many filesystems change the disk when you just mount and unmount, "
36422 "even if you didn't perform any writes. You need to use "
36423 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
36427 #: ../src/guestfs.pod:841
36428 msgid "guestfish command line is hard to use."
36432 #: ../src/guestfs.pod:843
36434 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
36435 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
36436 "exist, so it fails. In earlier versions of guestfish the error message was "
36437 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
36438 "we should have used C<guestfish -c command> to run commands."
36442 #: ../src/guestfs.pod:850
36443 msgid "guestfish megabyte modifiers don't work right on all commands"
36447 #: ../src/guestfs.pod:852
36449 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
36450 "other modifiers). What guestfish actually does is to multiply the number "
36451 "part by the modifier part and pass the result to the C API. However this "
36452 "doesn't work for a few APIs which aren't expecting bytes, but are already "
36453 "expecting some other unit (eg. megabytes)."
36457 #: ../src/guestfs.pod:859
36458 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
36462 #: ../src/guestfs.pod:861
36465 " lvcreate LV VG 100M\n"
36470 #: ../src/guestfs.pod:863
36472 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
36473 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
36474 "megabytes * megabytes) logical volume. The error message you get from this "
36475 "is also a little obscure."
36479 #: ../src/guestfs.pod:868
36481 "This could be fixed in the generator by specially marking parameters and "
36482 "return values which take bytes or other units."
36486 #: ../src/guestfs.pod:871
36487 msgid "Ambiguity between devices and paths"
36491 #: ../src/guestfs.pod:873
36493 "There is a subtle ambiguity in the API between a device name "
36494 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
36495 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
36499 #: ../src/guestfs.pod:878
36501 "In the current API we usually resolve this ambiguity by having two separate "
36502 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
36503 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
36504 "detecting if the path supplied begins with C</dev/>."
36508 #: ../src/guestfs.pod:884
36510 "To avoid both the ambiguity and the need to duplicate some calls, we could "
36511 "make paths/devices into structured names. One way to do this would be to "
36512 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
36513 "aspect of grub. Another way would be to use a structured type, equivalent "
36514 "to this OCaml type:"
36518 #: ../src/guestfs.pod:890
36521 " type path = Path of string | Device of int | Partition of int * int\n"
36526 #: ../src/guestfs.pod:892
36527 msgid "which would allow you to pass arguments like:"
36531 #: ../src/guestfs.pod:894
36534 " Path \"/foo/bar\"\n"
36535 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
36536 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
36537 " Path \"/dev/sdb2\" (* not a device *)\n"
36542 #: ../src/guestfs.pod:899
36544 "As you can see there are still problems to resolve even with this "
36545 "representation. Also consider how it might work in guestfish."
36549 #: ../src/guestfs.pod:904
36550 msgid "KEYS AND PASSPHRASES"
36554 #: ../src/guestfs.pod:906
36556 "Certain libguestfs calls take a parameter that contains sensitive key "
36557 "material, passed in as a C string."
36561 #: ../src/guestfs.pod:909
36563 "In the future we would hope to change the libguestfs implementation so that "
36564 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
36565 "swap. However this is I<not> done at the moment, because of the complexity "
36566 "of such an implementation."
36570 #: ../src/guestfs.pod:914
36572 "Therefore you should be aware that any key parameter you pass to libguestfs "
36573 "might end up being written out to the swap partition. If this is a concern, "
36574 "scrub the swap partition or don't use libguestfs on encrypted devices."
36578 #: ../src/guestfs.pod:919
36579 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
36583 #: ../src/guestfs.pod:921
36585 "All high-level libguestfs actions are synchronous. If you want to use "
36586 "libguestfs asynchronously then you must create a thread."
36590 #: ../src/guestfs.pod:924
36592 "Only use the handle from a single thread. Either use the handle exclusively "
36593 "from one thread, or provide your own mutex so that two threads cannot issue "
36594 "calls on the same handle at the same time."
36598 #: ../src/guestfs.pod:928
36600 "See the graphical program guestfs-browser for one possible architecture for "
36601 "multithreaded programs using libvirt and libguestfs."
36605 #: ../src/guestfs.pod:931
36610 #: ../src/guestfs.pod:933
36612 "Libguestfs needs a supermin appliance, which it finds by looking along an "
36617 #: ../src/guestfs.pod:936
36619 "By default it looks for these in the directory C<$libdir/guestfs> "
36620 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
36624 #: ../src/guestfs.pod:939
36626 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
36627 "to change the directories that libguestfs will search in. The value is a "
36628 "colon-separated list of paths. The current directory is I<not> searched "
36629 "unless the path contains an empty element or C<.>. For example "
36630 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
36631 "then C</usr/lib/guestfs>."
36635 #: ../src/guestfs.pod:946
36636 msgid "QEMU WRAPPERS"
36640 #: ../src/guestfs.pod:948
36642 "If you want to compile your own qemu, run qemu from a non-standard location, "
36643 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
36648 #: ../src/guestfs.pod:952
36650 "There is one important rule to remember: you I<must C<exec qemu>> as the "
36651 "last command in the shell script (so that qemu replaces the shell and "
36652 "becomes the direct child of the libguestfs-using program). If you don't do "
36653 "this, then the qemu process won't be cleaned up correctly."
36657 #: ../src/guestfs.pod:957
36659 "Here is an example of a wrapper, where I have built my own copy of qemu from "
36664 #: ../src/guestfs.pod:960
36668 " qemudir=/home/rjones/d/qemu\n"
36669 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
36675 #: ../src/guestfs.pod:964
36677 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
36678 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
36683 #: ../src/guestfs.pod:968
36686 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
36691 #: ../src/guestfs.pod:970
36693 "Note that libguestfs also calls qemu with the -help and -version options in "
36694 "order to determine features."
36698 #: ../src/guestfs.pod:973
36700 "Wrappers can also be used to edit the options passed to qemu. In the "
36701 "following example, the C<-machine ...> option (C<-machine> and the following "
36702 "argument) are removed from the command line and replaced with C<-machine "
36703 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
36704 "right one to remove, putting the remaining options into the C<args> array."
36708 #: ../src/guestfs.pod:982
36712 " while [ $# -gt 0 ]; do\n"
36713 " case \"$1\" in\n"
36717 " args[i]=\"$1\"\n"
36726 #: ../src/guestfs.pod:994
36729 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
36734 #: ../src/guestfs.pod:996
36735 msgid "ATTACHING TO RUNNING DAEMONS"
36739 #: ../src/guestfs.pod:998
36741 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
36742 "babies. Use with caution."
36746 #: ../src/guestfs.pod:1001
36748 "I<Note (2):> This section explains how to attach to a running daemon from a "
36749 "low level perspective. For most users, simply using virt tools such as "
36750 "L<guestfish(1)> with the I<--live> option will \"just work\"."
36754 #: ../src/guestfs.pod:1005
36755 msgid "Using guestfs_set_attach_method"
36759 #: ../src/guestfs.pod:1007
36761 "By calling L</guestfs_set_attach_method> you can change how the library "
36762 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
36763 "L</ARCHITECTURE> for some background)."
36767 #: ../src/guestfs.pod:1011
36769 "The normal attach method is C<appliance>, where a small appliance is created "
36770 "containing the daemon, and then the library connects to this."
36774 #: ../src/guestfs.pod:1014
36776 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
36777 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
36778 "daemon over the Unix domain socket."
36782 #: ../src/guestfs.pod:1018
36784 "The normal use for this is to connect to a running virtual machine that "
36785 "contains a C<guestfsd> daemon, and send commands so you can read and write "
36786 "files inside the live virtual machine."
36790 #: ../src/guestfs.pod:1022
36791 msgid "Using guestfs_add_domain with live flag"
36795 #: ../src/guestfs.pod:1024
36797 "L</guestfs_add_domain> provides some help for getting the correct attach "
36798 "method. If you pass the C<live> option to this function, then (if the "
36799 "virtual machine is running) it will examine the libvirt XML looking for a "
36800 "virtio-serial channel to connect to:"
36804 #: ../src/guestfs.pod:1030
36811 " <channel type='unix'>\n"
36812 " <source mode='bind' path='/path/to/socket'/>\n"
36813 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
36822 #: ../src/guestfs.pod:1042
36824 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
36825 "method to C<unix:/path/to/socket>."
36829 #: ../src/guestfs.pod:1045
36831 "Some of the libguestfs tools (including guestfish) support a I<--live> "
36832 "option which is passed through to L</guestfs_add_domain> thus allowing you "
36833 "to attach to and modify live virtual machines."
36837 #: ../src/guestfs.pod:1049
36839 "The virtual machine needs to have been set up beforehand so that it has the "
36840 "virtio-serial channel and so that guestfsd is running inside it."
36844 #: ../src/guestfs.pod:1053
36845 msgid "ABI GUARANTEE"
36849 #: ../src/guestfs.pod:1055
36851 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36852 "actions as outlined in this section. Although we will deprecate some "
36853 "actions, for example if they get replaced by newer calls, we will keep the "
36854 "old actions forever. This allows you the developer to program in confidence "
36855 "against the libguestfs API."
36859 #: ../src/guestfs.pod:1061
36860 msgid "BLOCK DEVICE NAMING"
36864 #: ../src/guestfs.pod:1063
36866 "In the kernel there is now quite a profusion of schemata for naming block "
36867 "devices (in this context, by I<block device> I mean a physical or virtual "
36868 "hard drive). The original Linux IDE driver used names starting with "
36869 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
36870 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
36871 "replacement for the old IDE driver (particularly for SATA devices) those "
36872 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
36873 "machines with paravirtualized drivers. This has created several different "
36874 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
36879 #: ../src/guestfs.pod:1075
36881 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36882 "Linux kernel to access block devices. We can run a variety of appliances "
36883 "based on a variety of Linux kernels."
36887 #: ../src/guestfs.pod:1079
36889 "This causes a problem for libguestfs because many API calls use device or "
36890 "partition names. Working scripts and the recipe (example) scripts that we "
36891 "make available over the internet could fail if the naming scheme changes."
36895 #: ../src/guestfs.pod:1084
36897 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36898 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
36899 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
36900 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36904 #: ../src/guestfs.pod:1090
36906 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
36907 "L</guestfs_list_partitions> and similar calls return the true names of the "
36908 "devices and partitions as known to the appliance."
36912 #: ../src/guestfs.pod:1095
36913 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36917 #: ../src/guestfs.pod:1097
36919 "Usually this translation is transparent. However in some (very rare) cases "
36920 "you may need to know the exact algorithm. Such cases include where you use "
36921 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
36922 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
36927 #: ../src/guestfs.pod:1103
36929 "The algorithm is applied only to I<parameters> which are known to be either "
36930 "device or partition names. Return values from functions such as "
36931 "L</guestfs_list_devices> are never changed."
36935 #: ../src/guestfs.pod:1111
36936 msgid "Is the string a parameter which is a device or partition name?"
36940 #: ../src/guestfs.pod:1115
36941 msgid "Does the string begin with C</dev/sd>?"
36945 #: ../src/guestfs.pod:1119
36947 "Does the named device exist? If so, we use that device. However if I<not> "
36948 "then we continue with this algorithm."
36952 #: ../src/guestfs.pod:1124
36953 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36957 #: ../src/guestfs.pod:1126
36958 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36962 #: ../src/guestfs.pod:1128
36963 msgid "If that named device exists, use it. If not, continue."
36967 #: ../src/guestfs.pod:1132
36968 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36972 #: ../src/guestfs.pod:1134
36973 msgid "If that named device exists, use it. If not, return an error."
36977 #: ../src/guestfs.pod:1138
36978 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36982 #: ../src/guestfs.pod:1140
36984 "Although the standard naming scheme and automatic translation is useful for "
36985 "simple programs and guestfish scripts, for larger programs it is best not to "
36986 "rely on this mechanism."
36990 #: ../src/guestfs.pod:1144
36992 "Where possible for maximum future portability programs using libguestfs "
36993 "should use these future-proof techniques:"
36997 #: ../src/guestfs.pod:1151
36999 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
37000 "device names, and then use those names directly."
37004 #: ../src/guestfs.pod:1154
37005 msgid "Since those device names exist by definition, they will never be translated."
37009 #: ../src/guestfs.pod:1159
37011 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
37012 "filesystem labels."
37016 #: ../src/guestfs.pod:1166
37018 "This section discusses security implications of using libguestfs, "
37019 "particularly with untrusted or malicious guests or disk images."
37023 #: ../src/guestfs.pod:1169
37024 msgid "GENERAL SECURITY CONSIDERATIONS"
37028 #: ../src/guestfs.pod:1171
37030 "Be careful with any files or data that you download from a guest (by "
37031 "\"download\" we mean not just the L</guestfs_download> command but any "
37032 "command that reads files, filenames, directories or anything else from a "
37033 "disk image). An attacker could manipulate the data to fool your program "
37034 "into doing the wrong thing. Consider cases such as:"
37038 #: ../src/guestfs.pod:1181
37039 msgid "the data (file etc) not being present"
37043 #: ../src/guestfs.pod:1185
37044 msgid "being present but empty"
37048 #: ../src/guestfs.pod:1189
37049 msgid "being much larger than normal"
37053 #: ../src/guestfs.pod:1193
37054 msgid "containing arbitrary 8 bit data"
37058 #: ../src/guestfs.pod:1197
37059 msgid "being in an unexpected character encoding"
37063 #: ../src/guestfs.pod:1201
37064 msgid "containing homoglyphs."
37068 #: ../src/guestfs.pod:1205
37069 msgid "SECURITY OF MOUNTING FILESYSTEMS"
37073 #: ../src/guestfs.pod:1207
37075 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
37076 "(VFS) module can sometimes be escalated into exploits by deliberately "
37077 "creating a malicious, malformed filesystem. These exploits are very severe "
37078 "for two reasons. Firstly there are very many filesystem drivers in the "
37079 "kernel, and many of them are infrequently used and not much developer "
37080 "attention has been paid to the code. Linux userspace helps potential "
37081 "crackers by detecting the filesystem type and automatically choosing the "
37082 "right VFS driver, even if that filesystem type is obscure or unexpected for "
37083 "the administrator. Secondly, a kernel-level exploit is like a local root "
37084 "exploit (worse in some ways), giving immediate and total access to the "
37085 "system right down to the hardware level."
37089 #: ../src/guestfs.pod:1220
37091 "That explains why you should never mount a filesystem from an untrusted "
37092 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
37093 "inside a qemu virtual machine, usually running as a non-root user. The "
37094 "attacker would need to write a filesystem which first exploited the kernel, "
37095 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
37096 "the libguestfs protocol, and finally to be as serious as the host kernel "
37097 "exploit it would need to escalate its privileges to root. This multi-step "
37098 "escalation, performed by a static piece of data, is thought to be extremely "
37099 "hard to do, although we never say 'never' about security issues."
37103 #: ../src/guestfs.pod:1231
37105 "In any case callers can reduce the attack surface by forcing the filesystem "
37106 "type when mounting (use L</guestfs_mount_vfs>)."
37110 #: ../src/guestfs.pod:1234
37111 msgid "PROTOCOL SECURITY"
37115 #: ../src/guestfs.pod:1236
37117 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
37118 "defined upper message size. However a program that uses libguestfs must "
37119 "also take care - for example you can write a program that downloads a binary "
37120 "from a disk image and executes it locally, and no amount of protocol "
37121 "security will save you from the consequences."
37125 #: ../src/guestfs.pod:1242
37126 msgid "INSPECTION SECURITY"
37130 #: ../src/guestfs.pod:1244
37132 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
37133 "directly from the guest, and these could contain any 8 bit data. Callers "
37134 "should be careful to escape these before printing them to a structured file "
37135 "(for example, use HTML escaping if creating a web page)."
37139 #: ../src/guestfs.pod:1250
37141 "Guest configuration may be altered in unusual ways by the administrator of "
37142 "the virtual machine, and may not reflect reality (particularly for untrusted "
37143 "or actively malicious guests). For example we parse the hostname from "
37144 "configuration files like C</etc/sysconfig/network> that we find in the "
37145 "guest, but the guest administrator can easily manipulate these files to "
37146 "provide the wrong hostname."
37150 #: ../src/guestfs.pod:1258
37152 "The inspection API parses guest configuration using two external libraries: "
37153 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
37154 "designed to be robust in the face of malicious data, although denial of "
37155 "service attacks are still possible, for example with oversized configuration "
37160 #: ../src/guestfs.pod:1264
37161 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
37165 #: ../src/guestfs.pod:1266
37167 "Be very cautious about running commands from the guest. By running a "
37168 "command in the guest, you are giving CPU time to a binary that you do not "
37169 "control, under the same user account as the library, albeit wrapped in qemu "
37170 "virtualization. More information and alternatives can be found in the "
37171 "section L</RUNNING COMMANDS>."
37175 #: ../src/guestfs.pod:1272
37176 msgid "CVE-2010-3851"
37180 #: ../src/guestfs.pod:1274
37181 msgid "https://bugzilla.redhat.com/642934"
37185 #: ../src/guestfs.pod:1276
37187 "This security bug concerns the automatic disk format detection that qemu "
37188 "does on disk images."
37192 #: ../src/guestfs.pod:1279
37194 "A raw disk image is just the raw bytes, there is no header. Other disk "
37195 "images like qcow2 contain a special header. Qemu deals with this by looking "
37196 "for one of the known headers, and if none is found then assuming the disk "
37197 "image must be raw."
37201 #: ../src/guestfs.pod:1284
37203 "This allows a guest which has been given a raw disk image to write some "
37204 "other header. At next boot (or when the disk image is accessed by "
37205 "libguestfs) qemu would do autodetection and think the disk image format was, "
37206 "say, qcow2 based on the header written by the guest."
37210 #: ../src/guestfs.pod:1289
37212 "This in itself would not be a problem, but qcow2 offers many features, one "
37213 "of which is to allow a disk image to refer to another image (called the "
37214 "\"backing disk\"). It does this by placing the path to the backing disk "
37215 "into the qcow2 header. This path is not validated and could point to any "
37216 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
37217 "\"holes\" in the qcow2 disk image, which of course is completely under the "
37218 "control of the attacker."
37222 #: ../src/guestfs.pod:1297
37223 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
37227 #: ../src/guestfs.pod:1304
37228 msgid "You have enabled the network or have opened the disk in write mode."
37232 #: ../src/guestfs.pod:1308
37234 "You are also running untrusted code from the guest (see L</RUNNING "
37239 #: ../src/guestfs.pod:1313
37241 "The way to avoid this is to specify the expected disk format when adding "
37242 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
37243 "should always do this if the disk is raw format, and it's a good idea for "
37248 #: ../src/guestfs.pod:1318
37250 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
37251 "format is fetched from libvirt and passed through."
37255 #: ../src/guestfs.pod:1321
37257 "For libguestfs tools, use the I<--format> command line parameter as "
37262 #: ../src/guestfs.pod:1324
37263 msgid "CONNECTION MANAGEMENT"
37267 #: ../src/guestfs.pod:1326
37268 msgid "guestfs_h *"
37272 #: ../src/guestfs.pod:1328
37274 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
37275 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
37276 "handle and release all resources used."
37280 #: ../src/guestfs.pod:1332
37282 "For information on using multiple handles and threads, see the section "
37283 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
37287 #: ../src/guestfs.pod:1335
37288 msgid "guestfs_create"
37292 #: ../src/guestfs.pod:1337
37295 " guestfs_h *guestfs_create (void);\n"
37300 #: ../src/guestfs.pod:1339
37301 msgid "Create a connection handle."
37305 #: ../src/guestfs.pod:1341
37307 "On success this returns a non-NULL pointer to a handle. On error it returns "
37312 #: ../src/guestfs.pod:1344
37314 "You have to \"configure\" the handle after creating it. This includes "
37315 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
37316 "handle at least once."
37320 #: ../src/guestfs.pod:1348
37321 msgid "After configuring the handle, you have to call L</guestfs_launch>."
37325 #: ../src/guestfs.pod:1350
37327 "You may also want to configure error handling for the handle. See the "
37328 "L</ERROR HANDLING> section below."
37332 #: ../src/guestfs.pod:1353
37333 msgid "guestfs_close"
37337 #: ../src/guestfs.pod:1355
37340 " void guestfs_close (guestfs_h *g);\n"
37345 #: ../src/guestfs.pod:1357
37346 msgid "This closes the connection handle and frees up all resources used."
37350 #: ../src/guestfs.pod:1359
37352 "If autosync was set on the handle and the handle was launched, then this "
37353 "implicitly calls various functions to unmount filesystems and sync the "
37354 "disk. See L</guestfs_set_autosync> for more details."
37358 #: ../src/guestfs.pod:1363
37359 msgid "If a close callback was set on the handle, then it is called."
37363 #: ../src/guestfs.pod:1365
37364 msgid "ERROR HANDLING"
37368 #: ../src/guestfs.pod:1367
37370 "API functions can return errors. For example, almost all functions that "
37371 "return C<int> will return C<-1> to indicate an error."
37375 #: ../src/guestfs.pod:1370
37377 "Additional information is available for errors: an error message string and "
37378 "optionally an error number (errno) if the thing that failed was a system "
37383 #: ../src/guestfs.pod:1374
37385 "You can get at the additional information about the last error on the handle "
37386 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
37387 "up an error handler with L</guestfs_set_error_handler>."
37391 #: ../src/guestfs.pod:1379
37393 "When the handle is created, a default error handler is installed which "
37394 "prints the error message string to C<stderr>. For small short-running "
37395 "command line programs it is sufficient to do:"
37399 #: ../src/guestfs.pod:1383
37402 " if (guestfs_launch (g) == -1)\n"
37403 " exit (EXIT_FAILURE);\n"
37408 #: ../src/guestfs.pod:1386
37410 "since the default error handler will ensure that an error message has been "
37411 "printed to C<stderr> before the program exits."
37415 #: ../src/guestfs.pod:1389
37417 "For other programs the caller will almost certainly want to install an "
37418 "alternate error handler or do error handling in-line like this:"
37422 #: ../src/guestfs.pod:1392
37425 " /* This disables the default behaviour of printing errors\n"
37427 " guestfs_set_error_handler (g, NULL, NULL);\n"
37432 #: ../src/guestfs.pod:1396
37435 " if (guestfs_launch (g) == -1) {\n"
37436 " /* Examine the error message and print it etc. */\n"
37437 " char *msg = guestfs_last_error (g);\n"
37438 " int errnum = guestfs_last_errno (g);\n"
37439 " fprintf (stderr, \"%s\", msg);\n"
37440 " if (errnum != 0)\n"
37441 " fprintf (stderr, \": %s\", strerror (errnum));\n"
37442 " fprintf (stderr, \"\\n\");\n"
37449 #: ../src/guestfs.pod:1407
37451 "Out of memory errors are handled differently. The default action is to call "
37452 "L<abort(3)>. If this is undesirable, then you can set a handler using "
37453 "L</guestfs_set_out_of_memory_handler>."
37457 #: ../src/guestfs.pod:1411
37459 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
37460 "because there is no handle if this happens there is no way to get additional "
37461 "error information. However L</guestfs_create> is supposed to be a "
37462 "lightweight operation which can only fail because of insufficient memory (it "
37463 "returns NULL in this case)."
37467 #: ../src/guestfs.pod:1417
37468 msgid "guestfs_last_error"
37472 #: ../src/guestfs.pod:1419
37475 " const char *guestfs_last_error (guestfs_h *g);\n"
37480 #: ../src/guestfs.pod:1421
37482 "This returns the last error message that happened on C<g>. If there has not "
37483 "been an error since the handle was created, then this returns C<NULL>."
37487 #: ../src/guestfs.pod:1425
37489 "The lifetime of the returned string is until the next error occurs, or "
37490 "L</guestfs_close> is called."
37494 #: ../src/guestfs.pod:1428
37495 msgid "guestfs_last_errno"
37499 #: ../src/guestfs.pod:1430
37502 " int guestfs_last_errno (guestfs_h *g);\n"
37507 #: ../src/guestfs.pod:1432
37508 msgid "This returns the last error number (errno) that happened on C<g>."
37512 #: ../src/guestfs.pod:1434
37513 msgid "If successful, an errno integer not equal to zero is returned."
37517 #: ../src/guestfs.pod:1436
37518 msgid "If no error, this returns 0. This call can return 0 in three situations:"
37522 #: ../src/guestfs.pod:1443
37523 msgid "There has not been any error on the handle."
37527 #: ../src/guestfs.pod:1447
37529 "There has been an error but the errno was meaningless. This corresponds to "
37530 "the case where the error did not come from a failed system call, but for "
37531 "some other reason."
37535 #: ../src/guestfs.pod:1453
37537 "There was an error from a failed system call, but for some reason the errno "
37538 "was not captured and returned. This usually indicates a bug in libguestfs."
37542 #: ../src/guestfs.pod:1459
37544 "Libguestfs tries to convert the errno from inside the applicance into a "
37545 "corresponding errno for the caller (not entirely trivial: the appliance "
37546 "might be running a completely different operating system from the library "
37547 "and error numbers are not standardized across Un*xen). If this could not be "
37548 "done, then the error is translated to C<EINVAL>. In practice this should "
37549 "only happen in very rare circumstances."
37553 #: ../src/guestfs.pod:1467
37554 msgid "guestfs_set_error_handler"
37558 #: ../src/guestfs.pod:1469
37561 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
37563 " const char *msg);\n"
37564 " void guestfs_set_error_handler (guestfs_h *g,\n"
37565 " guestfs_error_handler_cb cb,\n"
37566 " void *opaque);\n"
37571 #: ../src/guestfs.pod:1476
37573 "The callback C<cb> will be called if there is an error. The parameters "
37574 "passed to the callback are an opaque data pointer and the error message "
37579 #: ../src/guestfs.pod:1480
37581 "C<errno> is not passed to the callback. To get that the callback must call "
37582 "L</guestfs_last_errno>."
37586 #: ../src/guestfs.pod:1483
37588 "Note that the message string C<msg> is freed as soon as the callback "
37589 "function returns, so if you want to stash it somewhere you must make your "
37594 #: ../src/guestfs.pod:1487
37595 msgid "The default handler prints messages on C<stderr>."
37599 #: ../src/guestfs.pod:1489
37600 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
37604 #: ../src/guestfs.pod:1491
37605 msgid "guestfs_get_error_handler"
37609 #: ../src/guestfs.pod:1493
37612 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
37613 " void **opaque_rtn);\n"
37618 #: ../src/guestfs.pod:1496
37619 msgid "Returns the current error handler callback."
37623 #: ../src/guestfs.pod:1498
37624 msgid "guestfs_set_out_of_memory_handler"
37628 #: ../src/guestfs.pod:1500
37631 " typedef void (*guestfs_abort_cb) (void);\n"
37632 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
37633 " guestfs_abort_cb);\n"
37638 #: ../src/guestfs.pod:1504
37640 "The callback C<cb> will be called if there is an out of memory situation. "
37641 "I<Note this callback must not return>."
37645 #: ../src/guestfs.pod:1507
37646 msgid "The default is to call L<abort(3)>."
37650 #: ../src/guestfs.pod:1509
37651 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
37655 #: ../src/guestfs.pod:1512
37656 msgid "guestfs_get_out_of_memory_handler"
37660 #: ../src/guestfs.pod:1514
37663 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
37668 #: ../src/guestfs.pod:1516
37669 msgid "This returns the current out of memory handler."
37673 #: ../src/guestfs.pod:1518
37678 #: ../src/guestfs.pod:1522
37683 #: ../src/guestfs.pod:1524
37688 #: ../src/guestfs.pod:1526
37689 msgid "AVAILABILITY"
37693 #: ../src/guestfs.pod:1528
37694 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
37698 #: ../src/guestfs.pod:1530
37700 "Using L</guestfs_available> you can test availability of the following "
37701 "groups of functions. This test queries the appliance to see if the "
37702 "appliance you are currently using supports the functionality."
37706 #: ../src/guestfs.pod:1535
37707 msgid "@AVAILABILITY@"
37711 #: ../src/guestfs.pod:1537
37712 msgid "GUESTFISH supported COMMAND"
37716 #: ../src/guestfs.pod:1539
37718 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
37719 "prints out the available groups and whether they are supported by this build "
37720 "of libguestfs. Note however that you have to do C<run> first."
37724 #: ../src/guestfs.pod:1544
37725 msgid "SINGLE CALLS AT COMPILE TIME"
37729 #: ../src/guestfs.pod:1546
37731 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
37732 "function, such as:"
37736 #: ../src/guestfs.pod:1549
37739 " #define LIBGUESTFS_HAVE_DD 1\n"
37744 #: ../src/guestfs.pod:1551
37745 msgid "if L</guestfs_dd> is available."
37749 #: ../src/guestfs.pod:1553
37751 "Before version 1.5.8, if you needed to test whether a single libguestfs "
37752 "function is available at compile time, we recommended using build tools such "
37753 "as autoconf or cmake. For example in autotools you could use:"
37757 #: ../src/guestfs.pod:1558
37760 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
37761 " AC_CHECK_FUNCS([guestfs_dd])\n"
37766 #: ../src/guestfs.pod:1561
37768 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
37773 #: ../src/guestfs.pod:1564
37774 msgid "SINGLE CALLS AT RUN TIME"
37778 #: ../src/guestfs.pod:1566
37780 "Testing at compile time doesn't guarantee that a function really exists in "
37781 "the library. The reason is that you might be dynamically linked against a "
37782 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
37783 "This situation unfortunately results in a segmentation fault, which is a "
37784 "shortcoming of the C dynamic linking system itself."
37788 #: ../src/guestfs.pod:1573
37790 "You can use L<dlopen(3)> to test if a function is available at run time, as "
37791 "in this example program (note that you still need the compile time check as "
37796 #: ../src/guestfs.pod:1577
37799 " #include <stdio.h>\n"
37800 " #include <stdlib.h>\n"
37801 " #include <unistd.h>\n"
37802 " #include <dlfcn.h>\n"
37803 " #include <guestfs.h>\n"
37808 #: ../src/guestfs.pod:1583
37813 " #ifdef LIBGUESTFS_HAVE_DD\n"
37815 " int has_function;\n"
37820 #: ../src/guestfs.pod:1589
37823 " /* Test if the function guestfs_dd is really available. */\n"
37824 " dl = dlopen (NULL, RTLD_LAZY);\n"
37826 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
37827 " exit (EXIT_FAILURE);\n"
37829 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
37835 #: ../src/guestfs.pod:1598
37838 " if (!has_function)\n"
37839 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
37841 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
37842 " /* Now it's safe to call\n"
37843 " guestfs_dd (g, \"foo\", \"bar\");\n"
37847 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37854 #: ../src/guestfs.pod:1611
37856 "You may think the above is an awful lot of hassle, and it is. There are "
37857 "other ways outside of the C linking system to ensure that this kind of "
37858 "incompatibility never arises, such as using package versioning:"
37862 #: ../src/guestfs.pod:1616
37865 " Requires: libguestfs >= 1.0.80\n"
37870 #: ../src/guestfs.pod:1618
37871 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37875 #: ../src/guestfs.pod:1620
37877 "A recent feature of the API is the introduction of calls which take optional "
37878 "arguments. In C these are declared 3 ways. The main way is as a call which "
37879 "takes variable arguments (ie. C<...>), as in this example:"
37883 #: ../src/guestfs.pod:1625
37886 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37891 #: ../src/guestfs.pod:1627
37893 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37894 "call with no optional arguments specified:"
37898 #: ../src/guestfs.pod:1630
37901 " guestfs_add_drive_opts (g, filename, -1);\n"
37906 #: ../src/guestfs.pod:1632
37907 msgid "With a single optional argument:"
37911 #: ../src/guestfs.pod:1634
37914 " guestfs_add_drive_opts (g, filename,\n"
37915 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37921 #: ../src/guestfs.pod:1638
37926 #: ../src/guestfs.pod:1640
37929 " guestfs_add_drive_opts (g, filename,\n"
37930 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37931 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37937 #: ../src/guestfs.pod:1645
37939 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37944 #: ../src/guestfs.pod:1648
37945 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37949 #: ../src/guestfs.pod:1650
37951 "The second variant has the same name with the suffix C<_va>, which works the "
37952 "same way but takes a C<va_list>. See the C manual for details. For the "
37953 "example function, this is declared:"
37957 #: ../src/guestfs.pod:1654
37960 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37961 " va_list args);\n"
37966 #: ../src/guestfs.pod:1657
37967 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37971 #: ../src/guestfs.pod:1659
37973 "The third variant is useful where you need to construct these calls. You "
37974 "pass in a structure where you fill in the optional fields. The structure "
37975 "has a bitmask as the first element which you must set to indicate which "
37976 "fields you have filled in. For our example function the structure and call "
37981 #: ../src/guestfs.pod:1665
37984 " struct guestfs_add_drive_opts_argv {\n"
37985 " uint64_t bitmask;\n"
37987 " const char *format;\n"
37990 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37991 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37996 #: ../src/guestfs.pod:1674
37997 msgid "You could call it like this:"
38001 #: ../src/guestfs.pod:1676
38004 " struct guestfs_add_drive_opts_argv optargs = {\n"
38005 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
38006 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
38007 " .readonly = 1,\n"
38008 " .format = \"qcow2\"\n"
38014 #: ../src/guestfs.pod:1683
38017 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
38022 #: ../src/guestfs.pod:1691
38023 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
38027 #: ../src/guestfs.pod:1696
38028 msgid "You do not need to fill in all fields of the structure."
38032 #: ../src/guestfs.pod:1700
38034 "There must be a one-to-one correspondence between fields of the structure "
38035 "that are filled in, and bits set in the bitmask."
38039 #: ../src/guestfs.pod:1705
38040 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
38044 #: ../src/guestfs.pod:1707
38046 "In other languages, optional arguments are expressed in the way that is "
38047 "natural for that language. We refer you to the language-specific "
38048 "documentation for more details on that."
38052 #: ../src/guestfs.pod:1711
38053 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
38057 #: ../src/guestfs.pod:1713
38058 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
38062 #: ../src/guestfs.pod:1715
38064 "B<Note:> This section documents the generic event mechanism introduced in "
38065 "libguestfs 1.10, which you should use in new code if possible. The old "
38066 "functions C<guestfs_set_log_message_callback>, "
38067 "C<guestfs_set_subprocess_quit_callback>, "
38068 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
38069 "C<guestfs_set_progress_callback> are no longer documented in this manual "
38070 "page. Because of the ABI guarantee, the old functions continue to work."
38074 #: ../src/guestfs.pod:1724
38076 "Handles generate events when certain things happen, such as log messages "
38077 "being generated, progress messages during long-running operations, or the "
38078 "handle being closed. The API calls described below let you register a "
38079 "callback to be called when events happen. You can register multiple "
38080 "callbacks (for the same, different or overlapping sets of events), and "
38081 "individually remove callbacks. If callbacks are not removed, then they "
38082 "remain in force until the handle is closed."
38086 #: ../src/guestfs.pod:1732
38088 "In the current implementation, events are only generated synchronously: that "
38089 "means that events (and hence callbacks) can only happen while you are in the "
38090 "middle of making another libguestfs call. The callback is called in the "
38095 #: ../src/guestfs.pod:1737
38097 "Events may contain a payload, usually nothing (void), an array of 64 bit "
38098 "unsigned integers, or a message buffer. Payloads are discussed later on."
38102 #: ../src/guestfs.pod:1741
38103 msgid "CLASSES OF EVENTS"
38107 #: ../src/guestfs.pod:1745
38108 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
38112 #: ../src/guestfs.pod:1748
38114 "The callback function will be called while the handle is being closed "
38115 "(synchronously from L</guestfs_close>)."
38119 #: ../src/guestfs.pod:1751
38121 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
38122 "handles that are open when the program exits. This means that this callback "
38123 "might be called indirectly from L<exit(3)>, which can cause unexpected "
38124 "problems in higher-level languages (eg. if your HLL interpreter has already "
38125 "been cleaned up by the time this is called, and if your callback then jumps "
38126 "into some HLL function)."
38130 #: ../src/guestfs.pod:1758
38132 "If no callback is registered: the handle is closed without any callback "
38137 #: ../src/guestfs.pod:1761
38138 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
38142 #: ../src/guestfs.pod:1764
38144 "The callback function will be called when the child process quits, either "
38145 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
38146 "corresponds to a transition from any state to the CONFIG state)."
38150 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
38151 msgid "If no callback is registered: the event is ignored."
38155 #: ../src/guestfs.pod:1770
38156 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
38160 #: ../src/guestfs.pod:1773
38162 "The callback function will be called when the child process becomes ready "
38163 "first time after it has been launched. (This corresponds to a transition "
38164 "from LAUNCHING to the READY state)."
38168 #: ../src/guestfs.pod:1779
38169 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
38173 #: ../src/guestfs.pod:1782
38175 "Some long-running operations can generate progress messages. If this "
38176 "callback is registered, then it will be called each time a progress message "
38177 "is generated (usually two seconds after the operation started, and three "
38178 "times per second thereafter until it completes, although the frequency may "
38179 "change in future versions)."
38183 #: ../src/guestfs.pod:1788
38185 "The callback receives in the payload four unsigned 64 bit numbers which are "
38186 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
38190 #: ../src/guestfs.pod:1791
38192 "The units of C<total> are not defined, although for some operations C<total> "
38193 "may relate in some way to the amount of data to be transferred (eg. in bytes "
38194 "or megabytes), and C<position> may be the portion which has been "
38199 #: ../src/guestfs.pod:1796
38200 msgid "The only defined and stable parts of the API are:"
38204 #: ../src/guestfs.pod:1802
38206 "The callback can display to the user some type of progress bar or indicator "
38207 "which shows the ratio of C<position>:C<total>."
38211 #: ../src/guestfs.pod:1807
38212 msgid "0 E<lt>= C<position> E<lt>= C<total>"
38216 #: ../src/guestfs.pod:1811
38218 "If any progress notification is sent during a call, then a final progress "
38219 "notification is always sent when C<position> = C<total> (I<unless> the call "
38220 "fails with an error)."
38224 #: ../src/guestfs.pod:1815
38226 "This is to simplify caller code, so callers can easily set the progress "
38227 "indicator to \"100%\" at the end of the operation, without requiring special "
38228 "code to detect this case."
38232 #: ../src/guestfs.pod:1821
38234 "For some calls we are unable to estimate the progress of the call, but we "
38235 "can still generate progress messages to indicate activity. This is known as "
38236 "\"pulse mode\", and is directly supported by certain progress bar "
38237 "implementations (eg. GtkProgressBar)."
38241 #: ../src/guestfs.pod:1826
38243 "For these calls, zero or more progress messages are generated with "
38244 "C<position = 0> and C<total = 1>, followed by a final message with "
38245 "C<position = total = 1>."
38249 #: ../src/guestfs.pod:1830
38251 "As noted above, if the call fails with an error then the final message may "
38252 "not be generated."
38256 #: ../src/guestfs.pod:1835
38258 "The callback also receives the procedure number (C<proc_nr>) and serial "
38259 "number (C<serial>) of the call. These are only useful for debugging "
38260 "protocol issues, and the callback can normally ignore them. The callback "
38261 "may want to print these numbers in error messages or debugging messages."
38265 #: ../src/guestfs.pod:1841
38266 msgid "If no callback is registered: progress messages are discarded."
38270 #: ../src/guestfs.pod:1843
38271 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
38275 #: ../src/guestfs.pod:1846
38277 "The callback function is called whenever a log message is generated by qemu, "
38278 "the appliance kernel, guestfsd (daemon), or utility programs."
38282 #: ../src/guestfs.pod:1849
38284 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
38285 "(L</guestfs_launch>) then additional debug messages are generated."
38289 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
38291 "If no callback is registered: the messages are discarded unless the verbose "
38292 "flag is set in which case they are sent to stderr. You can override the "
38293 "printing of verbose messages to stderr by setting up a callback."
38297 #: ../src/guestfs.pod:1857
38298 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
38302 #: ../src/guestfs.pod:1860
38304 "The callback function is called whenever a log message is generated by the "
38305 "library part of libguestfs."
38309 #: ../src/guestfs.pod:1863
38311 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
38312 "messages are generated."
38316 #: ../src/guestfs.pod:1871
38317 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
38321 #: ../src/guestfs.pod:1874
38323 "The callback function is called whenever a trace message is generated. This "
38324 "only applies if the trace flag (L</guestfs_set_trace>) is set."
38328 #: ../src/guestfs.pod:1877
38330 "If no callback is registered: the messages are sent to stderr. You can "
38331 "override the printing of trace messages to stderr by setting up a callback."
38335 #: ../src/guestfs.pod:1881
38336 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
38340 #: ../src/guestfs.pod:1884
38341 msgid "The callback function is called whenever a libguestfs function is entered."
38345 #: ../src/guestfs.pod:1887
38347 "The payload is a string which contains the name of the function that we are "
38348 "entering (not including C<guestfs_> prefix)."
38352 #: ../src/guestfs.pod:1890
38354 "Note that libguestfs functions can call themselves, so you may see many "
38355 "events from a single call. A few libguestfs functions do not generate this "
38360 #: ../src/guestfs.pod:1898
38361 msgid "guestfs_set_event_callback"
38365 #: ../src/guestfs.pod:1900
38368 " int guestfs_set_event_callback (guestfs_h *g,\n"
38369 " guestfs_event_callback cb,\n"
38370 " uint64_t event_bitmask,\n"
38372 " void *opaque);\n"
38377 #: ../src/guestfs.pod:1906
38379 "This function registers a callback (C<cb>) for all event classes in the "
38380 "C<event_bitmask>."
38384 #: ../src/guestfs.pod:1909
38386 "For example, to register for all log message events, you could call this "
38387 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
38388 "To register a single callback for all possible classes of events, use "
38389 "C<GUESTFS_EVENT_ALL>."
38393 #: ../src/guestfs.pod:1915
38394 msgid "C<flags> should always be passed as 0."
38398 #: ../src/guestfs.pod:1917
38400 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
38401 "it for any purpose."
38405 #: ../src/guestfs.pod:1920
38407 "The return value is the event handle (an integer) which you can use to "
38408 "delete the callback (see below)."
38412 #: ../src/guestfs.pod:1923
38414 "If there is an error, this function returns C<-1>, and sets the error in the "
38415 "handle in the usual way (see L</guestfs_last_error> etc.)"
38419 #: ../src/guestfs.pod:1926
38421 "Callbacks remain in effect until they are deleted, or until the handle is "
38426 #: ../src/guestfs.pod:1929
38428 "In the case where multiple callbacks are registered for a particular event "
38429 "class, all of the callbacks are called. The order in which multiple "
38430 "callbacks are called is not defined."
38434 #: ../src/guestfs.pod:1933
38435 msgid "guestfs_delete_event_callback"
38439 #: ../src/guestfs.pod:1935
38442 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
38447 #: ../src/guestfs.pod:1937
38449 "Delete a callback that was previously registered. C<event_handle> should be "
38450 "the integer that was returned by a previous call to "
38451 "C<guestfs_set_event_callback> on the same handle."
38455 #: ../src/guestfs.pod:1941
38456 msgid "guestfs_event_callback"
38460 #: ../src/guestfs.pod:1943
38463 " typedef void (*guestfs_event_callback) (\n"
38466 " uint64_t event,\n"
38467 " int event_handle,\n"
38469 " const char *buf, size_t buf_len,\n"
38470 " const uint64_t *array, size_t array_len);\n"
38475 #: ../src/guestfs.pod:1952
38476 msgid "This is the type of the event callback function that you have to provide."
38480 #: ../src/guestfs.pod:1955
38482 "The basic parameters are: the handle (C<g>), the opaque user pointer "
38483 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
38484 "handle, and C<flags> which in the current API you should ignore."
38488 #: ../src/guestfs.pod:1959
38490 "The remaining parameters contain the event payload (if any). Each event may "
38491 "contain a payload, which usually relates to the event class, but for future "
38492 "proofing your code should be written to handle any payload for any event "
38497 #: ../src/guestfs.pod:1964
38499 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
38500 "there is no message buffer). Note that this message buffer can contain "
38501 "arbitrary 8 bit data, including NUL bytes."
38505 #: ../src/guestfs.pod:1968
38507 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
38508 "moment this is only used for progress messages."
38512 #: ../src/guestfs.pod:1971
38513 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
38517 #: ../src/guestfs.pod:1973
38519 "One motivation for the generic event API was to allow GUI programs to "
38520 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
38521 "unconditionally to C<stderr>."
38525 #: ../src/guestfs.pod:1977
38527 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
38528 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
38529 "messages are not events; you must capture error messages separately)."
38533 #: ../src/guestfs.pod:1982
38535 "Programs have to set up a callback to capture the classes of events of "
38540 #: ../src/guestfs.pod:1985
38544 " guestfs_set_event_callback\n"
38545 " (g, message_callback,\n"
38546 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
38547 " GUESTFS_EVENT_TRACE,\n"
38548 " 0, NULL) == -1)\n"
38549 " if (eh == -1) {\n"
38550 " // handle error in the usual way\n"
38556 #: ../src/guestfs.pod:1995
38558 "The callback can then direct messages to the appropriate place. In this "
38559 "example, messages are directed to syslog:"
38563 #: ../src/guestfs.pod:1998
38567 " message_callback (\n"
38570 " uint64_t event,\n"
38571 " int event_handle,\n"
38573 " const char *buf, size_t buf_len,\n"
38574 " const uint64_t *array, size_t array_len)\n"
38576 " const int priority = LOG_USER|LOG_INFO;\n"
38577 " if (buf_len > 0)\n"
38578 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
38584 #: ../src/guestfs.pod:2013
38585 msgid "CANCELLING LONG TRANSFERS"
38589 #: ../src/guestfs.pod:2015
38591 "Some operations can be cancelled by the caller while they are in progress. "
38592 "Currently only operations that involve uploading or downloading data can be "
38593 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
38594 "parameters in the generator)."
38598 #: ../src/guestfs.pod:2020
38599 msgid "guestfs_user_cancel"
38603 #: ../src/guestfs.pod:2022
38606 " void guestfs_user_cancel (guestfs_h *g);\n"
38611 #: ../src/guestfs.pod:2024
38612 msgid "C<guestfs_user_cancel> cancels the current upload or download operation."
38616 #: ../src/guestfs.pod:2027
38618 "Unlike most other libguestfs calls, this function is signal safe and thread "
38619 "safe. You can call it from a signal handler or from another thread, without "
38620 "needing to do any locking."
38624 #: ../src/guestfs.pod:2031
38626 "The transfer that was in progress (if there is one) will stop shortly "
38627 "afterwards, and will return an error. The errno (see "
38628 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
38629 "out if the operation was cancelled or failed because of another error."
38633 #: ../src/guestfs.pod:2037
38635 "No cleanup is performed: for example, if a file was being uploaded then "
38636 "after cancellation there may be a partially uploaded file. It is the "
38637 "caller's responsibility to clean up if necessary."
38641 #: ../src/guestfs.pod:2041
38642 msgid "There are two common places that you might call C<guestfs_user_cancel>."
38646 #: ../src/guestfs.pod:2043
38648 "In an interactive text-based program, you might call it from a C<SIGINT> "
38649 "signal handler so that pressing C<^C> cancels the current operation. (You "
38650 "also need to call L</guestfs_set_pgroup> so that child processes don't "
38651 "receive the C<^C> signal)."
38655 #: ../src/guestfs.pod:2048
38657 "In a graphical program, when the main thread is displaying a progress bar "
38658 "with a cancel button, wire up the cancel button to call this function."
38662 #: ../src/guestfs.pod:2052
38663 msgid "PRIVATE DATA AREA"
38667 #: ../src/guestfs.pod:2054
38669 "You can attach named pieces of private data to the libguestfs handle, fetch "
38670 "them by name, and walk over them, for the lifetime of the handle. This is "
38671 "called the private data area and is only available from the C API."
38675 #: ../src/guestfs.pod:2059
38676 msgid "To attach a named piece of data, use the following call:"
38680 #: ../src/guestfs.pod:2061
38683 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
38688 #: ../src/guestfs.pod:2063
38690 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
38691 "pointer (which can be C<NULL>). Any previous item with the same key is "
38696 #: ../src/guestfs.pod:2067
38698 "You can use any C<key> you want, but your key should I<not> start with an "
38699 "underscore character. Keys beginning with an underscore character are "
38700 "reserved for internal libguestfs purposes (eg. for implementing language "
38701 "bindings). It is recommended that you prefix the key with some unique "
38702 "string to avoid collisions with other users."
38706 #: ../src/guestfs.pod:2073
38707 msgid "To retrieve the pointer, use:"
38711 #: ../src/guestfs.pod:2075
38714 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
38719 #: ../src/guestfs.pod:2077
38721 "This function returns C<NULL> if either no data is found associated with "
38722 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
38727 #: ../src/guestfs.pod:2081
38729 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
38730 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
38731 "all. In particular, libguestfs does I<not> try to free the data when the "
38732 "handle is closed. If the data must be freed, then the caller must either "
38733 "free it before calling L</guestfs_close> or must set up a close callback to "
38734 "do it (see L</GUESTFS_EVENT_CLOSE>)."
38738 #: ../src/guestfs.pod:2088
38739 msgid "To walk over all entries, use these two functions:"
38743 #: ../src/guestfs.pod:2090
38746 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
38751 #: ../src/guestfs.pod:2092
38754 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
38759 #: ../src/guestfs.pod:2094
38761 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
38762 "not have any particular meaning -- keys are not returned in any defined "
38763 "order). A pointer to the key is returned in C<*key_rtn> and the "
38764 "corresponding data pointer is returned from the function. C<NULL> is "
38765 "returned if there are no keys stored in the handle."
38769 #: ../src/guestfs.pod:2100
38771 "C<guestfs_next_private> returns the next key, pointer pair. The return "
38772 "value of this function is also C<NULL> is there are no further entries to "
38777 #: ../src/guestfs.pod:2104
38778 msgid "Notes about walking over entries:"
38782 #: ../src/guestfs.pod:2110
38783 msgid "You must not call C<guestfs_set_private> while walking over the entries."
38787 #: ../src/guestfs.pod:2115
38789 "The handle maintains an internal iterator which is reset when you call "
38790 "C<guestfs_first_private>. This internal iterator is invalidated when you "
38791 "call C<guestfs_set_private>."
38795 #: ../src/guestfs.pod:2121
38796 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
38800 #: ../src/guestfs.pod:2123
38803 " guestfs_set_private (g, key, NULL);\n"
38808 #: ../src/guestfs.pod:2125
38809 msgid "then that C<key> is not returned when walking."
38813 #: ../src/guestfs.pod:2129
38815 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
38816 "C<guestfs_next_private> or C<guestfs_set_private>."
38820 #: ../src/guestfs.pod:2135
38822 "The following example code shows how to print all keys and data pointers "
38823 "that are associated with the handle C<g>:"
38827 #: ../src/guestfs.pod:2138
38830 " const char *key;\n"
38831 " void *data = guestfs_first_private (g, &key);\n"
38832 " while (data != NULL)\n"
38834 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38835 " data = guestfs_next_private (g, &key);\n"
38841 #: ../src/guestfs.pod:2146
38843 "More commonly you are only interested in keys that begin with an "
38844 "application-specific prefix C<foo_>. Modify the loop like so:"
38848 #: ../src/guestfs.pod:2149
38851 " const char *key;\n"
38852 " void *data = guestfs_first_private (g, &key);\n"
38853 " while (data != NULL)\n"
38855 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38856 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38857 " data = guestfs_next_private (g, &key);\n"
38863 #: ../src/guestfs.pod:2158
38865 "If you need to modify keys while walking, then you have to jump back to the "
38866 "beginning of the loop. For example, to delete all keys prefixed with "
38871 #: ../src/guestfs.pod:2162
38874 " const char *key;\n"
38877 " data = guestfs_first_private (g, &key);\n"
38878 " while (data != NULL)\n"
38880 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38882 " guestfs_set_private (g, key, NULL);\n"
38883 " /* note that 'key' pointer is now invalid, and so is\n"
38884 " the internal iterator */\n"
38887 " data = guestfs_next_private (g, &key);\n"
38893 #: ../src/guestfs.pod:2178
38895 "Note that the above loop is guaranteed to terminate because the keys are "
38896 "being deleted, but other manipulations of keys within the loop might not "
38897 "terminate unless you also maintain an indication of which keys have been "
38902 #: ../src/guestfs.pod:2183
38907 #: ../src/guestfs.pod:2185
38909 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38910 "true of any library, not just libguestfs. However libguestfs also contains "
38911 "static markers to help in probing internal operations."
38915 #: ../src/guestfs.pod:2189
38916 msgid "You can list all the static markers by doing:"
38920 #: ../src/guestfs.pod:2191
38923 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38924 " .provider(\"guestfs\").mark(\"*\")'\n"
38929 #: ../src/guestfs.pod:2194
38931 "B<Note:> These static markers are I<not> part of the stable API and may "
38932 "change in future versions."
38936 #: ../src/guestfs.pod:2197
38937 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38941 #: ../src/guestfs.pod:2199
38943 "This script contains examples of displaying both the static markers and some "
38944 "ordinary C entry points:"
38948 #: ../src/guestfs.pod:2202
38956 #: ../src/guestfs.pod:2204
38959 " function display_time () {\n"
38960 " now = gettimeofday_us ();\n"
38963 " delta = now - last;\n"
38969 #: ../src/guestfs.pod:2211
38972 " printf (\"%d (+%d):\", now, delta);\n"
38978 #: ../src/guestfs.pod:2214
38983 " printf (\"ready\\n\");\n"
38989 #: ../src/guestfs.pod:2219
38992 " /* Display all calls to static markers. */\n"
38993 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38994 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38995 " display_time();\n"
38996 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
39002 #: ../src/guestfs.pod:2226
39005 " /* Display all calls to guestfs_mkfs* functions. */\n"
39006 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
39007 " .function(\"guestfs_mkfs*\") ? {\n"
39008 " display_time();\n"
39009 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
39015 #: ../src/guestfs.pod:2233
39017 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
39018 "program. Note that you either have to be root, or you have to add yourself "
39019 "to several special stap groups. Consult the systemtap documentation for "
39020 "more information."
39024 #: ../src/guestfs.pod:2238
39027 " # stap /tmp/test.stap\n"
39033 #: ../src/guestfs.pod:2241
39034 msgid "In another terminal, run a guestfish command such as this:"
39038 #: ../src/guestfs.pod:2245
39039 msgid "In the first terminal, stap trace output similar to this is shown:"
39043 #: ../src/guestfs.pod:2247
39046 " 1318248056692655 (+0):\tlaunch_start\n"
39047 " 1318248056692850 (+195): launch_build_appliance_start\n"
39048 " 1318248056818285 (+125435): launch_build_appliance_end\n"
39049 " 1318248056838059 (+19774): launch_run_qemu\n"
39050 " 1318248061071167 (+4233108): launch_end\n"
39051 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f "
39052 "device=0x1024e60\n"
39057 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
39062 #: ../src/guestfs.pod:2256
39064 "<!-- old anchor for the next section --> <a "
39065 "name=\"state_machine_and_low_level_event_api\"/>"
39069 #: ../src/guestfs.pod:2261
39070 msgid "ARCHITECTURE"
39074 #: ../src/guestfs.pod:2263
39076 "Internally, libguestfs is implemented by running an appliance (a special "
39077 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
39078 "process of the main program."
39082 #: ../src/guestfs.pod:2267
39085 " ___________________\n"
39087 " | main program |\n"
39089 " | | child process / appliance\n"
39090 " | | __________________________\n"
39092 " +-------------------+ RPC | +-----------------+ |\n"
39093 " | libguestfs <--------------------> guestfsd | |\n"
39094 " | | | +-----------------+ |\n"
39095 " \\___________________/ | | Linux kernel | |\n"
39096 " | +--^--------------+ |\n"
39097 " \\_________|________________/\n"
39099 " _______v______\n"
39102 " | disk image |\n"
39103 " \\______________/\n"
39108 #: ../src/guestfs.pod:2287
39110 "The library, linked to the main program, creates the child process and hence "
39111 "the appliance in the L</guestfs_launch> function."
39115 #: ../src/guestfs.pod:2290
39117 "Inside the appliance is a Linux kernel and a complete stack of userspace "
39118 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
39119 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
39120 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
39121 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
39122 "attached to the qemu process which translates device access by the "
39123 "appliance's Linux kernel into accesses to the image."
39127 #: ../src/guestfs.pod:2299
39129 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
39130 "Although the disk image you are attached to might also be used by some "
39131 "virtual machine, libguestfs doesn't know or care about this. (But you will "
39132 "care if both libguestfs's qemu process and your virtual machine are trying "
39133 "to update the disk image at the same time, since these usually results in "
39134 "massive disk corruption)."
39138 #: ../src/guestfs.pod:2306
39139 msgid "STATE MACHINE"
39143 #: ../src/guestfs.pod:2308
39144 msgid "libguestfs uses a state machine to model the child process:"
39148 #: ../src/guestfs.pod:2310
39152 " guestfs_create\n"
39160 " / | \\ \\ guestfs_launch\n"
39161 " / | _\\__V______\n"
39163 " / | | LAUNCHING |\n"
39164 " / | \\___________/\n"
39166 " / | guestfs_launch\n"
39168 " ______ / __|____V\n"
39169 " / \\ ------> / \\\n"
39170 " | BUSY | | READY |\n"
39171 " \\______/ <------ \\________/\n"
39176 #: ../src/guestfs.pod:2332
39178 "The normal transitions are (1) CONFIG (when the handle is created, but there "
39179 "is no child process), (2) LAUNCHING (when the child process is booting up), "
39180 "(3) alternating between READY and BUSY as commands are issued to, and "
39181 "carried out by, the child process."
39185 #: ../src/guestfs.pod:2337
39187 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
39188 "asynchronously at any time (eg. due to some internal error), and that causes "
39189 "the state to transition back to CONFIG."
39193 #: ../src/guestfs.pod:2341
39195 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
39196 "issued when in the CONFIG state."
39200 #: ../src/guestfs.pod:2344
39202 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
39203 "L</guestfs_launch> blocks until the child process is READY to accept "
39204 "commands (or until some failure or timeout). L</guestfs_launch> internally "
39205 "moves the state from CONFIG to LAUNCHING while it is running."
39209 #: ../src/guestfs.pod:2350
39211 "API actions such as L</guestfs_mount> can only be issued when in the READY "
39212 "state. These API calls block waiting for the command to be carried out "
39213 "(ie. the state to transition to BUSY and then back to READY). There are no "
39214 "non-blocking versions, and no way to issue more than one command per handle "
39215 "at the same time."
39219 #: ../src/guestfs.pod:2356
39221 "Finally, the child process sends asynchronous messages back to the main "
39222 "program, such as kernel log messages. You can register a callback to "
39223 "receive these messages."
39227 #: ../src/guestfs.pod:2360
39232 #: ../src/guestfs.pod:2362
39233 msgid "APPLIANCE BOOT PROCESS"
39237 #: ../src/guestfs.pod:2364
39239 "This process has evolved and continues to evolve. The description here "
39240 "corresponds only to the current version of libguestfs and is provided for "
39241 "information only."
39245 #: ../src/guestfs.pod:2368
39247 "In order to follow the stages involved below, enable libguestfs debugging "
39248 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
39252 #: ../src/guestfs.pod:2373
39253 msgid "Create the appliance"
39257 #: ../src/guestfs.pod:2375
39259 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
39260 "initrd and the appliance."
39264 #: ../src/guestfs.pod:2378
39266 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
39267 "directory if C<TMPDIR> is set)."
39271 #: ../src/guestfs.pod:2381
39273 "For a complete description of how the appliance is created and cached, read "
39274 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
39278 #: ../src/guestfs.pod:2385
39279 msgid "Start qemu and boot the kernel"
39283 #: ../src/guestfs.pod:2387
39284 msgid "qemu is invoked to boot the kernel."
39288 #: ../src/guestfs.pod:2389
39289 msgid "Run the initrd"
39293 #: ../src/guestfs.pod:2391
39295 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
39296 "appliance. The purpose of the initrd is to load enough kernel modules in "
39297 "order that the appliance itself can be mounted and started."
39301 #: ../src/guestfs.pod:2395
39303 "The initrd is a cpio archive called "
39304 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
39308 #: ../src/guestfs.pod:2398
39310 "When the initrd has started you will see messages showing that kernel "
39311 "modules are being loaded, similar to this:"
39315 #: ../src/guestfs.pod:2401
39318 " febootstrap: ext2 mini initrd starting up\n"
39319 " febootstrap: mounting /sys\n"
39320 " febootstrap: internal insmod libcrc32c.ko\n"
39321 " febootstrap: internal insmod crc32c-intel.ko\n"
39326 #: ../src/guestfs.pod:2406
39327 msgid "Find and mount the appliance device"
39331 #: ../src/guestfs.pod:2408
39333 "The appliance is a sparse file containing an ext2 filesystem which contains "
39334 "a familiar (although reduced in size) Linux operating system. It would "
39335 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
39339 #: ../src/guestfs.pod:2412
39341 "The regular disks being inspected by libguestfs are the first devices "
39342 "exposed by qemu (eg. as C</dev/vda>)."
39346 #: ../src/guestfs.pod:2415
39348 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
39349 "there was only one regular disk)."
39353 #: ../src/guestfs.pod:2418
39355 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
39356 "and switch root into the appliance, and run C</init> from the appliance."
39360 #: ../src/guestfs.pod:2422
39361 msgid "If this works successfully you will see messages such as:"
39365 #: ../src/guestfs.pod:2424
39368 " febootstrap: picked /sys/block/vdb/dev as root device\n"
39369 " febootstrap: creating /dev/root as block special 252:16\n"
39370 " febootstrap: mounting new root on /root\n"
39371 " febootstrap: chroot\n"
39372 " Starting /init script ...\n"
39377 #: ../src/guestfs.pod:2430
39379 "Note that C<Starting /init script ...> indicates that the appliance's init "
39380 "script is now running."
39384 #: ../src/guestfs.pod:2433
39385 msgid "Initialize the appliance"
39389 #: ../src/guestfs.pod:2435
39391 "The appliance itself now initializes itself. This involves starting certain "
39392 "processes like C<udev>, possibly printing some debug information, and "
39393 "finally running the daemon (C<guestfsd>)."
39397 #: ../src/guestfs.pod:2439
39402 #: ../src/guestfs.pod:2441
39404 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
39409 #: ../src/guestfs.pod:2444
39412 " verbose daemon enabled\n"
39417 #: ../src/guestfs.pod:2446
39419 "The daemon expects to see a named virtio-serial port exposed by qemu and "
39420 "connected on the other end to the library."
39424 #: ../src/guestfs.pod:2449
39426 "The daemon connects to this port (and hence to the library) and sends a four "
39427 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
39428 "protocol (see below)."
39432 #: ../src/guestfs.pod:2455
39433 msgid "COMMUNICATION PROTOCOL"
39437 #: ../src/guestfs.pod:2457
39439 "Don't rely on using this protocol directly. This section documents how it "
39440 "currently works, but it may change at any time."
39444 #: ../src/guestfs.pod:2460
39446 "The protocol used to talk between the library and the daemon running inside "
39447 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
39448 "1014, RFC 1832, RFC 4506)."
39452 #: ../src/guestfs.pod:2464
39454 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
39455 "this file is automatically generated)."
39459 #: ../src/guestfs.pod:2467
39461 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
39462 "and C<FileOut> parameters, which are handled with very simple request/reply "
39463 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
39464 "parameters, which use the same request and reply messages, but they may also "
39465 "be followed by files sent using a chunked encoding."
39469 #: ../src/guestfs.pod:2474
39470 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
39474 #: ../src/guestfs.pod:2476
39475 msgid "For ordinary functions, the request message is:"
39479 #: ../src/guestfs.pod:2478
39482 " total length (header + arguments,\n"
39483 " but not including the length word itself)\n"
39484 " struct guestfs_message_header (encoded as XDR)\n"
39485 " struct guestfs_<foo>_args (encoded as XDR)\n"
39490 #: ../src/guestfs.pod:2483
39492 "The total length field allows the daemon to allocate a fixed size buffer "
39493 "into which it slurps the rest of the message. As a result, the total length "
39494 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
39495 "effective size of any request is limited to somewhere under this size."
39499 #: ../src/guestfs.pod:2489
39501 "Note also that many functions don't take any arguments, in which case the "
39502 "C<guestfs_I<foo>_args> is completely omitted."
39506 #: ../src/guestfs.pod:2492
39508 "The header contains the procedure number (C<guestfs_proc>) which is how the "
39509 "receiver knows what type of args structure to expect, or none at all."
39513 #: ../src/guestfs.pod:2496
39515 "For functions that take optional arguments, the optional arguments are "
39516 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
39517 "arguments. A bitmask in the header indicates which optional arguments are "
39518 "meaningful. The bitmask is also checked to see if it contains bits set "
39519 "which the daemon does not know about (eg. if more optional arguments were "
39520 "added in a later version of the library), and this causes the call to be "
39525 #: ../src/guestfs.pod:2504
39526 msgid "The reply message for ordinary functions is:"
39530 #: ../src/guestfs.pod:2506
39533 " total length (header + ret,\n"
39534 " but not including the length word itself)\n"
39535 " struct guestfs_message_header (encoded as XDR)\n"
39536 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39541 #: ../src/guestfs.pod:2511
39543 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
39544 "functions that return no formal return values."
39548 #: ../src/guestfs.pod:2514
39549 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
39553 #: ../src/guestfs.pod:2517
39555 "In the case of an error, a flag is set in the header, and the reply message "
39556 "is slightly changed:"
39560 #: ../src/guestfs.pod:2520
39563 " total length (header + error,\n"
39564 " but not including the length word itself)\n"
39565 " struct guestfs_message_header (encoded as XDR)\n"
39566 " struct guestfs_message_error (encoded as XDR)\n"
39571 #: ../src/guestfs.pod:2525
39573 "The C<guestfs_message_error> structure contains the error message as a "
39578 #: ../src/guestfs.pod:2528
39579 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
39583 #: ../src/guestfs.pod:2530
39585 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
39586 "The normal request message is sent (see above). However this is followed by "
39587 "a sequence of file chunks."
39591 #: ../src/guestfs.pod:2534
39594 " total length (header + arguments,\n"
39595 " but not including the length word itself,\n"
39596 " and not including the chunks)\n"
39597 " struct guestfs_message_header (encoded as XDR)\n"
39598 " struct guestfs_<foo>_args (encoded as XDR)\n"
39599 " sequence of chunks for FileIn param #0\n"
39600 " sequence of chunks for FileIn param #1 etc.\n"
39605 #: ../src/guestfs.pod:2542
39606 msgid "The \"sequence of chunks\" is:"
39610 #: ../src/guestfs.pod:2544
39613 " length of chunk (not including length word itself)\n"
39614 " struct guestfs_chunk (encoded as XDR)\n"
39615 " length of chunk\n"
39616 " struct guestfs_chunk (encoded as XDR)\n"
39618 " length of chunk\n"
39619 " struct guestfs_chunk (with data.data_len == 0)\n"
39624 #: ../src/guestfs.pod:2552
39626 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
39627 "is set in the final chunk to indicate either successful completion or early "
39632 #: ../src/guestfs.pod:2556
39634 "At time of writing there are no functions that have more than one FileIn "
39635 "parameter. However this is (theoretically) supported, by sending the "
39636 "sequence of chunks for each FileIn parameter one after another (from left to "
39641 #: ../src/guestfs.pod:2561
39643 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
39644 "transfer. The library does this by sending a chunk with a special flag set "
39645 "to indicate cancellation. When the daemon sees this, it cancels the whole "
39646 "RPC, does I<not> send any reply, and goes back to reading the next request."
39650 #: ../src/guestfs.pod:2567
39652 "The daemon may also cancel. It does this by writing a special word "
39653 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
39654 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
39655 "cancel chunk). The special word is chosen so that even if cancellation "
39656 "happens right at the end of the transfer (after the library has finished "
39657 "writing and has started listening for the reply), the \"spurious\" cancel "
39658 "flag will not be confused with the reply message."
39662 #: ../src/guestfs.pod:2576
39664 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
39665 "limit), and also files where the size is not known in advance (eg. from "
39666 "pipes or sockets). However the chunks are rather small "
39667 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
39668 "to keep much in memory."
39672 #: ../src/guestfs.pod:2582
39673 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
39677 #: ../src/guestfs.pod:2584
39679 "The protocol for FileOut parameters is exactly the same as for FileIn "
39680 "parameters, but with the roles of daemon and library reversed."
39684 #: ../src/guestfs.pod:2587
39687 " total length (header + ret,\n"
39688 " but not including the length word itself,\n"
39689 " and not including the chunks)\n"
39690 " struct guestfs_message_header (encoded as XDR)\n"
39691 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39692 " sequence of chunks for FileOut param #0\n"
39693 " sequence of chunks for FileOut param #1 etc.\n"
39698 #: ../src/guestfs.pod:2595
39699 msgid "INITIAL MESSAGE"
39703 #: ../src/guestfs.pod:2597
39705 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
39706 "which indicates that the guest and daemon is alive. This is what "
39707 "L</guestfs_launch> waits for."
39711 #: ../src/guestfs.pod:2601
39712 msgid "PROGRESS NOTIFICATION MESSAGES"
39716 #: ../src/guestfs.pod:2603
39718 "The daemon may send progress notification messages at any time. These are "
39719 "distinguished by the normal length word being replaced by "
39720 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
39724 #: ../src/guestfs.pod:2607
39726 "The library turns them into progress callbacks (see "
39727 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
39732 #: ../src/guestfs.pod:2611
39734 "The daemon self-limits the frequency of progress messages it sends (see "
39735 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
39740 #: ../src/guestfs.pod:2615
39741 msgid "LIBGUESTFS VERSION NUMBERS"
39745 #: ../src/guestfs.pod:2617
39747 "Since April 2010, libguestfs has started to make separate development and "
39748 "stable releases, along with corresponding branches in our git repository. "
39749 "These separate releases can be identified by version number:"
39753 #: ../src/guestfs.pod:2622
39756 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
39757 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
39763 " | `-------- sub-version\n"
39765 " `------ always '1' because we don't change the ABI\n"
39770 #: ../src/guestfs.pod:2633
39771 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
39775 #: ../src/guestfs.pod:2635
39777 "As time passes we cherry pick fixes from the development branch and backport "
39778 "those into the stable branch, the effect being that the stable branch should "
39779 "get more stable and less buggy over time. So the stable releases are ideal "
39780 "for people who don't need new features but would just like the software to "
39785 #: ../src/guestfs.pod:2641
39786 msgid "Our criteria for backporting changes are:"
39790 #: ../src/guestfs.pod:2647
39792 "Documentation changes which don't affect any code are backported unless the "
39793 "documentation refers to a future feature which is not in stable."
39797 #: ../src/guestfs.pod:2653
39799 "Bug fixes which are not controversial, fix obvious problems, and have been "
39800 "well tested are backported."
39804 #: ../src/guestfs.pod:2658
39806 "Simple rearrangements of code which shouldn't affect how it works get "
39807 "backported. This is so that the code in the two branches doesn't get too "
39808 "far out of step, allowing us to backport future fixes more easily."
39812 #: ../src/guestfs.pod:2664
39814 "We I<don't> backport new features, new APIs, new tools etc, except in one "
39815 "exceptional case: the new feature is required in order to implement an "
39816 "important bug fix."
39820 #: ../src/guestfs.pod:2670
39822 "A new stable branch starts when we think the new features in development are "
39823 "substantial and compelling enough over the current stable branch to warrant "
39824 "it. When that happens we create new stable and development versions 1.N.0 "
39825 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
39826 "stable at this point, but by backporting fixes from development, that branch "
39827 "will stabilize over time."
39831 #: ../src/guestfs.pod:2678
39832 msgid "EXTENDING LIBGUESTFS"
39836 #: ../src/guestfs.pod:2680
39837 msgid "ADDING A NEW API ACTION"
39841 #: ../src/guestfs.pod:2682
39843 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
39844 "documentation) are generated, and this makes it easy to extend the "
39849 #: ../src/guestfs.pod:2686
39850 msgid "To add a new API action there are two changes:"
39854 #: ../src/guestfs.pod:2692
39856 "You need to add a description of the call (name, parameters, return type, "
39857 "tests, documentation) to C<generator/generator_actions.ml>."
39861 #: ../src/guestfs.pod:2695
39863 "There are two sorts of API action, depending on whether the call goes "
39864 "through to the daemon in the appliance, or is serviced entirely by the "
39865 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
39866 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39867 "an example of the latter, since a trace flag is maintained in the handle and "
39868 "all tracing is done on the library side."
39872 #: ../src/guestfs.pod:2703
39874 "Most new actions are of the first type, and get added to the "
39875 "C<daemon_functions> list. Each function has a unique procedure number used "
39876 "in the RPC protocol which is assigned to that action when we publish "
39877 "libguestfs and cannot be reused. Take the latest procedure number and "
39882 #: ../src/guestfs.pod:2709
39884 "For library-only actions of the second type, add to the "
39885 "C<non_daemon_functions> list. Since these functions are serviced by the "
39886 "library and do not travel over the RPC mechanism to the daemon, these "
39887 "functions do not need a procedure number, and so the procedure number is set "
39892 #: ../src/guestfs.pod:2717
39893 msgid "Implement the action (in C):"
39897 #: ../src/guestfs.pod:2719
39899 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39900 "C<daemon/> directory."
39904 #: ../src/guestfs.pod:2722
39906 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39907 "(note: double underscore) in the C<src/> directory."
39911 #: ../src/guestfs.pod:2725
39912 msgid "In either case, use another function as an example of what to do."
39916 #: ../src/guestfs.pod:2729
39917 msgid "After making these changes, use C<make> to compile."
39921 #: ../src/guestfs.pod:2731
39923 "Note that you don't need to implement the RPC, language bindings, manual "
39924 "pages or anything else. It's all automatically generated from the OCaml "
39929 #: ../src/guestfs.pod:2735
39930 msgid "ADDING TESTS FOR AN API ACTION"
39934 #: ../src/guestfs.pod:2737
39936 "You can supply zero or as many tests as you want per API call. The tests "
39937 "can either be added as part of the API description "
39938 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
39939 "drop a script into C<regressions/>. Note that adding a script to "
39940 "C<regressions/> is slower, so if possible use the first method."
39944 #: ../src/guestfs.pod:2743
39946 "The following describes the test environment used when you add an API test "
39947 "in C<generator_actions.ml>."
39951 #: ../src/guestfs.pod:2746
39952 msgid "The test environment has 4 block devices:"
39956 #: ../src/guestfs.pod:2750
39957 msgid "C</dev/sda> 500MB"
39961 #: ../src/guestfs.pod:2752
39962 msgid "General block device for testing."
39966 #: ../src/guestfs.pod:2754
39967 msgid "C</dev/sdb> 50MB"
39971 #: ../src/guestfs.pod:2756
39973 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39978 #: ../src/guestfs.pod:2759
39979 msgid "C</dev/sdc> 10MB"
39983 #: ../src/guestfs.pod:2761
39984 msgid "Used in a few tests where two block devices are needed."
39988 #: ../src/guestfs.pod:2763
39989 msgid "C</dev/sdd>"
39993 #: ../src/guestfs.pod:2765
39994 msgid "ISO with fixed content (see C<images/test.iso>)."
39998 #: ../src/guestfs.pod:2769
40000 "To be able to run the tests in a reasonable amount of time, the libguestfs "
40001 "appliance and block devices are reused between tests. So don't try testing "
40002 "L</guestfs_kill_subprocess> :-x"
40006 #: ../src/guestfs.pod:2773
40008 "Each test starts with an initial scenario, selected using one of the "
40009 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
40010 "initialize the disks mentioned above in a particular way as documented in "
40011 "C<generator_types.ml>. You should not assume anything about the previous "
40012 "contents of other disks that are not initialized."
40016 #: ../src/guestfs.pod:2779
40018 "You can add a prerequisite clause to any individual test. This is a "
40019 "run-time check, which, if it fails, causes the test to be skipped. Useful "
40020 "if testing a command which might not work on all variations of libguestfs "
40021 "builds. A test that has prerequisite of C<Always> means to run "
40026 #: ../src/guestfs.pod:2785
40028 "In addition, packagers can skip individual tests by setting environment "
40029 "variables before running C<make check>."
40033 #: ../src/guestfs.pod:2788
40036 " SKIP_TEST_<CMD>_<NUM>=1\n"
40041 #: ../src/guestfs.pod:2790
40042 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
40046 #: ../src/guestfs.pod:2794
40049 " SKIP_TEST_<CMD>=1\n"
40054 #: ../src/guestfs.pod:2796
40055 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
40059 #: ../src/guestfs.pod:2798
40060 msgid "Packagers can run only certain tests by setting for example:"
40064 #: ../src/guestfs.pod:2800
40067 " TEST_ONLY=\"vfs_type zerofree\"\n"
40072 #: ../src/guestfs.pod:2802
40074 "See C<capitests/tests.c> for more details of how these environment variables "
40079 #: ../src/guestfs.pod:2805
40080 msgid "DEBUGGING NEW API ACTIONS"
40084 #: ../src/guestfs.pod:2807
40085 msgid "Test new actions work before submitting them."
40089 #: ../src/guestfs.pod:2809
40090 msgid "You can use guestfish to try out new commands."
40094 #: ../src/guestfs.pod:2811
40096 "Debugging the daemon is a problem because it runs inside a minimal "
40097 "environment. However you can fprintf messages in the daemon to stderr, and "
40098 "they will show up if you use C<guestfish -v>."
40102 #: ../src/guestfs.pod:2815
40103 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
40107 #: ../src/guestfs.pod:2817
40109 "Our C source code generally adheres to some basic code-formatting "
40110 "conventions. The existing code base is not totally consistent on this "
40111 "front, but we do prefer that contributed code be formatted similarly. In "
40112 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
40113 "indentation level, and other than that, follow the K&R style."
40117 #: ../src/guestfs.pod:2823
40119 "If you use Emacs, add the following to one of one of your start-up files "
40120 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
40124 #: ../src/guestfs.pod:2826
40127 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
40128 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
40129 " (add-hook 'find-file-hook\n"
40130 " '(lambda () (if (and buffer-file-name\n"
40131 " (string-match \"/libguestfs\\\\>\"\n"
40132 " (buffer-file-name))\n"
40133 " (not (string-equal mode-name \"Change Log\"))\n"
40134 " (not (string-equal mode-name \"Makefile\")))\n"
40135 " (setq indent-tabs-mode nil))))\n"
40140 #: ../src/guestfs.pod:2836
40143 " ;;; When editing C sources in libguestfs, use this style.\n"
40144 " (defun libguestfs-c-mode ()\n"
40145 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
40147 " (c-set-style \"K&R\")\n"
40148 " (setq c-indent-level 2)\n"
40149 " (setq c-basic-offset 2))\n"
40150 " (add-hook 'c-mode-hook\n"
40151 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
40152 " (buffer-file-name))\n"
40153 " (libguestfs-c-mode))))\n"
40158 #: ../src/guestfs.pod:2848
40159 msgid "Enable warnings when compiling (and fix any problems this finds):"
40163 #: ../src/guestfs.pod:2851
40166 " ./configure --enable-gcc-warnings\n"
40171 #: ../src/guestfs.pod:2853
40172 msgid "Useful targets are:"
40176 #: ../src/guestfs.pod:2855
40179 " make syntax-check # checks the syntax of the C code\n"
40180 " make check # runs the test suite\n"
40185 #: ../src/guestfs.pod:2858
40186 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
40190 #: ../src/guestfs.pod:2860
40192 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
40193 "which are used to do shell quoting."
40197 #: ../src/guestfs.pod:2865
40202 #: ../src/guestfs.pod:2867
40204 "Simple shell quoted string. Any spaces or other shell characters are "
40209 #: ../src/guestfs.pod:2870
40214 #: ../src/guestfs.pod:2872
40216 "Same as C<%Q> except the string is treated as a path which is prefixed by "
40221 #: ../src/guestfs.pod:2879
40224 " asprintf (&cmd, \"cat %R\", path);\n"
40229 #: ../src/guestfs.pod:2881
40230 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
40234 #: ../src/guestfs.pod:2883
40236 "I<Note:> Do I<not> use these when you are passing parameters to the "
40237 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
40238 "because they are not passed via the shell (instead, straight to exec). You "
40239 "probably want to use the C<sysroot_path()> function however."
40243 #: ../src/guestfs.pod:2889
40244 msgid "SUBMITTING YOUR NEW API ACTIONS"
40248 #: ../src/guestfs.pod:2891
40250 "Submit patches to the mailing list: "
40251 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
40252 "L<rjones@redhat.com>."
40256 #: ../src/guestfs.pod:2895
40257 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
40261 #: ../src/guestfs.pod:2897
40262 msgid "We support i18n (gettext anyhow) in the library."
40266 #: ../src/guestfs.pod:2899
40268 "However many messages come from the daemon, and we don't translate those at "
40269 "the moment. One reason is that the appliance generally has all locale files "
40270 "removed from it, because they take up a lot of space. So we'd have to readd "
40271 "some of those, as well as copying our PO files into the appliance."
40275 #: ../src/guestfs.pod:2905
40277 "Debugging messages are never translated, since they are intended for the "
40282 #: ../src/guestfs.pod:2908
40283 msgid "SOURCE CODE SUBDIRECTORIES"
40287 #: ../src/guestfs.pod:2912
40292 #: ../src/guestfs.pod:2914
40293 msgid "L<virt-alignment-scan(1)> command and documentation."
40297 #: ../src/guestfs.pod:2918
40298 msgid "The libguestfs appliance, build scripts and so on."
40302 #: ../src/guestfs.pod:2920
40303 msgid "C<capitests>"
40307 #: ../src/guestfs.pod:2922
40308 msgid "Automated tests of the C API."
40312 #: ../src/guestfs.pod:2924
40317 #: ../src/guestfs.pod:2926
40319 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
40324 #: ../src/guestfs.pod:2929
40329 #: ../src/guestfs.pod:2931
40331 "Safety and liveness tests of components that libguestfs depends upon (not of "
40332 "libguestfs itself). Mainly this is for qemu and the kernel."
40336 #: ../src/guestfs.pod:2934
40341 #: ../src/guestfs.pod:2936
40343 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
40344 "command and documentation."
40348 #: ../src/guestfs.pod:2939
40353 #: ../src/guestfs.pod:2941
40354 msgid "Outside contributions, experimental parts."
40358 #: ../src/guestfs.pod:2943
40363 #: ../src/guestfs.pod:2945
40365 "The daemon that runs inside the libguestfs appliance and carries out "
40370 #: ../src/guestfs.pod:2948
40375 #: ../src/guestfs.pod:2950
40376 msgid "L<virt-df(1)> command and documentation."
40380 #: ../src/guestfs.pod:2952
40385 #: ../src/guestfs.pod:2954
40386 msgid "L<virt-edit(1)> command and documentation."
40390 #: ../src/guestfs.pod:2956
40391 msgid "C<examples>"
40395 #: ../src/guestfs.pod:2958
40396 msgid "C API example code."
40400 #: ../src/guestfs.pod:2960
40401 msgid "C<extratests>"
40405 #: ../src/guestfs.pod:2962
40407 "Extra tests. These are not run by default because they require special "
40408 "tools or configuration."
40412 #: ../src/guestfs.pod:2965
40417 #: ../src/guestfs.pod:2967
40419 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
40420 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
40421 "L<virt-tar-out(1)>."
40425 #: ../src/guestfs.pod:2971
40430 #: ../src/guestfs.pod:2973
40431 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
40435 #: ../src/guestfs.pod:2975
40436 msgid "C<generator>"
40440 #: ../src/guestfs.pod:2977
40442 "The crucially important generator, used to automatically generate large "
40443 "amounts of boilerplate C code for things like RPC and bindings."
40447 #: ../src/guestfs.pod:2980
40452 #: ../src/guestfs.pod:2982
40453 msgid "Files used by the test suite."
40457 #: ../src/guestfs.pod:2984
40458 msgid "Some \"phony\" guest images which we test against."
40462 #: ../src/guestfs.pod:2986
40463 msgid "C<inspector>"
40467 #: ../src/guestfs.pod:2988
40468 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
40472 #: ../src/guestfs.pod:2990
40477 #: ../src/guestfs.pod:2992
40478 msgid "Logo used on the website. The fish is called Arthur by the way."
40482 #: ../src/guestfs.pod:2994
40487 #: ../src/guestfs.pod:2996
40488 msgid "M4 macros used by autoconf."
40492 #: ../src/guestfs.pod:2998
40497 #: ../src/guestfs.pod:3000
40498 msgid "Translations of simple gettext strings."
40502 #: ../src/guestfs.pod:3002
40507 #: ../src/guestfs.pod:3004
40509 "The build infrastructure and PO files for translations of manpages and POD "
40510 "files. Eventually this will be combined with the C<po> directory, but that "
40511 "is rather complicated."
40515 #: ../src/guestfs.pod:3008
40516 msgid "C<regressions>"
40520 #: ../src/guestfs.pod:3010
40521 msgid "Regression tests."
40525 #: ../src/guestfs.pod:3012
40530 #: ../src/guestfs.pod:3014
40531 msgid "L<virt-rescue(1)> command and documentation."
40535 #: ../src/guestfs.pod:3016
40540 #: ../src/guestfs.pod:3018
40541 msgid "L<virt-resize(1)> command and documentation."
40545 #: ../src/guestfs.pod:3020
40546 msgid "C<sparsify>"
40550 #: ../src/guestfs.pod:3022
40551 msgid "L<virt-sparsify(1)> command and documentation."
40555 #: ../src/guestfs.pod:3024
40560 #: ../src/guestfs.pod:3026
40561 msgid "Source code to the C library."
40565 #: ../src/guestfs.pod:3028
40570 #: ../src/guestfs.pod:3030
40571 msgid "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
40575 #: ../src/guestfs.pod:3032
40576 msgid "C<test-tool>"
40580 #: ../src/guestfs.pod:3034
40582 "Test tool for end users to test if their qemu/kernel combination will work "
40587 #: ../src/guestfs.pod:3037
40592 #: ../src/guestfs.pod:3039
40597 #: ../src/guestfs.pod:3041
40602 #: ../src/guestfs.pod:3043
40607 #: ../src/guestfs.pod:3045
40612 #: ../src/guestfs.pod:3047
40617 #: ../src/guestfs.pod:3049
40622 #: ../src/guestfs.pod:3051
40627 #: ../src/guestfs.pod:3053
40632 #: ../src/guestfs.pod:3055
40633 msgid "Language bindings."
40637 #: ../src/guestfs.pod:3059
40638 msgid "MAKING A STABLE RELEASE"
40642 #: ../src/guestfs.pod:3061
40644 "When we make a stable release, there are several steps documented here. See "
40645 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
40650 #: ../src/guestfs.pod:3069
40651 msgid "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
40655 #: ../src/guestfs.pod:3074
40656 msgid "Finalize RELEASE-NOTES."
40660 #: ../src/guestfs.pod:3078
40661 msgid "Update ROADMAP."
40665 #: ../src/guestfs.pod:3082
40666 msgid "Run C<src/api-support/update-from-tarballs.sh>."
40670 #: ../src/guestfs.pod:3086
40671 msgid "Push and pull from Transifex."
40675 #: ../src/guestfs.pod:3090
40683 #: ../src/guestfs.pod:3092
40684 msgid "to push the latest POT files to Transifex. Then run:"
40688 #: ../src/guestfs.pod:3094
40696 #: ../src/guestfs.pod:3096
40697 msgid "which is a wrapper to pull the latest translated C<*.po> files."
40701 #: ../src/guestfs.pod:3100
40703 "Create new stable and development directories under "
40704 "L<http://libguestfs.org/download>."
40708 #: ../src/guestfs.pod:3105
40709 msgid "Create the branch in git:"
40713 #: ../src/guestfs.pod:3107
40716 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
40717 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
40718 " git branch stable-1.XX\n"
40719 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
40724 #: ../src/guestfs.pod:3114
40729 #: ../src/guestfs.pod:3116
40730 msgid "PROTOCOL LIMITS"
40734 #: ../src/guestfs.pod:3118
40736 "Internally libguestfs uses a message-based protocol to pass API calls and "
40737 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
40738 "plenty more detail about this). The maximum message size used by the "
40739 "protocol is slightly less than 4 MB. For some API calls you may need to be "
40740 "aware of this limit. The API calls which may be affected are individually "
40741 "documented, with a link back to this section of the documentation."
40745 #: ../src/guestfs.pod:3126
40747 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
40748 "a simple string. Because this string is at some point internally encoded as "
40749 "a message, the maximum size that it can return is slightly under 4 MB. If "
40750 "the requested file is larger than this then you will get an error."
40754 #: ../src/guestfs.pod:3132
40756 "In order to transfer large files into and out of the guest filesystem, you "
40757 "need to use particular calls that support this. The sections L</UPLOADING> "
40758 "and L</DOWNLOADING> document how to do this."
40762 #: ../src/guestfs.pod:3136
40764 "You might also consider mounting the disk image using our FUSE filesystem "
40765 "support (L<guestmount(1)>)."
40769 #: ../src/guestfs.pod:3139
40770 msgid "MAXIMUM NUMBER OF DISKS"
40774 #: ../src/guestfs.pod:3141
40775 msgid "When using virtio disks (the default) the current limit is B<25> disks."
40779 #: ../src/guestfs.pod:3144
40781 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
40782 "slots. However febootstrap only understands disks with names C</dev/vda> "
40783 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
40788 #: ../src/guestfs.pod:3149
40790 "We are working to substantially raise this limit in future versions but it "
40791 "requires complex changes to qemu."
40795 #: ../src/guestfs.pod:3152
40797 "In future versions of libguestfs it should also be possible to \"hot plug\" "
40798 "disks (add and remove disks after calling L</guestfs_launch>). This also "
40799 "requires changes to qemu."
40803 #: ../src/guestfs.pod:3156
40804 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
40808 #: ../src/guestfs.pod:3158
40809 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
40813 #: ../src/guestfs.pod:3160
40815 "This is because it reserves 4 bits for the minor device number (thus "
40816 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
40820 #: ../src/guestfs.pod:3163
40822 "If you attach a disk with more than 15 partitions, the extra partitions are "
40823 "ignored by libguestfs."
40827 #: ../src/guestfs.pod:3166
40828 msgid "MAXIMUM SIZE OF A DISK"
40832 #: ../src/guestfs.pod:3168
40833 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
40837 #: ../src/guestfs.pod:3170
40839 "We have tested block devices up to 1 exabyte (2**60 or "
40840 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
40845 #: ../src/guestfs.pod:3174
40847 "Although libguestfs probably does not impose any limit, the underlying host "
40848 "storage will. If you store disk images on a host ext4 filesystem, then the "
40849 "maximum size will be limited by the maximum ext4 file size (currently 16 "
40850 "TB). If you store disk images as host logical volumes then you are limited "
40851 "by the maximum size of an LV."
40855 #: ../src/guestfs.pod:3180
40857 "For the hugest disk image files, we recommend using XFS on the host for "
40862 #: ../src/guestfs.pod:3183
40863 msgid "MAXIMUM SIZE OF A PARTITION"
40867 #: ../src/guestfs.pod:3185
40869 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
40870 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
40871 "address a partition located beyond 2 TB on the disk."
40875 #: ../src/guestfs.pod:3189
40877 "It is recommended that you use GPT partitions on disks which are larger than "
40878 "this size. GPT uses 64 bit sector numbers and so can address partitions "
40879 "which are theoretically larger than the largest disk we could support."
40883 #: ../src/guestfs.pod:3194
40884 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40888 #: ../src/guestfs.pod:3196
40890 "This depends on the filesystem type. libguestfs itself does not impose any "
40891 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40892 "what these limits are."
40896 #: ../src/guestfs.pod:3200
40897 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40901 #: ../src/guestfs.pod:3202
40903 "The API functions L</guestfs_upload>, L</guestfs_download>, "
40904 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40905 "uploads and downloads."
40909 #: ../src/guestfs.pod:3206
40910 msgid "INSPECTION LIMITS"
40914 #: ../src/guestfs.pod:3208
40916 "The inspection code has several arbitrary limits on things like the size of "
40917 "Windows Registry hive it will read, and the length of product name. These "
40918 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40919 "memory and disk space on the host, and should not be reached in practice. "
40920 "See the source code for more information."
40924 #: ../src/guestfs.pod:3234
40926 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40927 "effect as calling C<guestfs_set_verbose (g, 1)>."
40931 #: ../src/guestfs.pod:3246
40933 "Set the path that libguestfs uses to search for a supermin appliance. See "
40934 "the discussion of paths in section L</PATH> above."
40938 #: ../src/guestfs.pod:3255
40939 msgid "See also L</QEMU WRAPPERS> above."
40943 #: ../src/guestfs.pod:3259
40945 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40946 "effect as calling C<guestfs_set_trace (g, 1)>."
40950 #: ../src/guestfs.pod:3277
40952 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
40953 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
40954 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, "
40955 "L<virt-alignment-scan(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
40956 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
40957 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40958 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
40959 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, "
40960 "L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
40961 "L<virt-win-reg(1)>, L<guestfs-testing(1)>, L<qemu(1)>, L<febootstrap(1)>, "
40962 "L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)>, "
40963 "L<http://libguestfs.org/>."
40967 #: ../src/guestfs.pod:3314
40969 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
40970 "L<lvm(8)>, L<disktype(1)>."
40974 #: ../src/guestfs.pod:3321 ../tools/virt-make-fs.pl:571 ../tools/virt-win-reg.pl:772
40979 #: ../src/guestfs.pod:3323
40980 msgid "To get a list of bugs against libguestfs use this link:"
40984 #: ../src/guestfs.pod:3325
40985 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
40989 #: ../src/guestfs.pod:3327
40990 msgid "To report a new bug against libguestfs use this link:"
40994 #: ../src/guestfs.pod:3329
40995 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
40999 #: ../src/guestfs.pod:3331
41000 msgid "When reporting a bug, please check:"
41004 #: ../src/guestfs.pod:3337
41005 msgid "That the bug hasn't been reported already."
41009 #: ../src/guestfs.pod:3341
41010 msgid "That you are testing a recent version."
41014 #: ../src/guestfs.pod:3345
41015 msgid "Describe the bug accurately, and give a way to reproduce it."
41019 #: ../src/guestfs.pod:3349
41021 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
41026 #: ../test-tool/libguestfs-test-tool.pod:5
41027 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
41031 #: ../test-tool/libguestfs-test-tool.pod:9
41034 " libguestfs-test-tool [--options]\n"
41039 #: ../test-tool/libguestfs-test-tool.pod:13
41041 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
41042 "to check basic libguestfs functionality is working. This is needed because "
41043 "libguestfs occasionally breaks for reasons beyond our control: usually "
41044 "because of changes in the underlying qemu or kernel packages, or the host "
41049 #: ../test-tool/libguestfs-test-tool.pod:19
41050 msgid "If you suspect a problem in libguestfs, then just run:"
41054 #: ../test-tool/libguestfs-test-tool.pod:21
41057 " libguestfs-test-tool\n"
41062 #: ../test-tool/libguestfs-test-tool.pod:23
41063 msgid "It will print lots of diagnostic messages."
41067 #: ../test-tool/libguestfs-test-tool.pod:25
41068 msgid "If it runs to completion successfully, you will see this near the end:"
41072 #: ../test-tool/libguestfs-test-tool.pod:27
41075 " ===== TEST FINISHED OK =====\n"
41080 #: ../test-tool/libguestfs-test-tool.pod:29
41081 msgid "and the test tool will exit with code 0."
41085 #: ../test-tool/libguestfs-test-tool.pod:31
41087 "If it fails (and/or exits with non-zero error code), please paste the "
41088 "I<complete, unedited> output of the test tool into a bug report. More "
41089 "information about reporting bugs can be found on the "
41090 "L<http://libguestfs.org/> website."
41094 #: ../test-tool/libguestfs-test-tool.pod:42
41095 msgid "Display short usage information and exit."
41099 #: ../test-tool/libguestfs-test-tool.pod:44
41100 msgid "B<--qemu qemu_binary>"
41104 #: ../test-tool/libguestfs-test-tool.pod:46
41106 "If you have downloaded another qemu binary, point this option at the full "
41107 "path of the binary to try it."
41111 #: ../test-tool/libguestfs-test-tool.pod:49
41112 msgid "B<--qemudir qemu_source_dir>"
41116 #: ../test-tool/libguestfs-test-tool.pod:51
41118 "If you have compiled qemu from source, point this option at the source "
41119 "directory to try it."
41123 #: ../test-tool/libguestfs-test-tool.pod:54
41128 #: ../test-tool/libguestfs-test-tool.pod:56
41129 msgid "B<--timeout N>"
41133 #: ../test-tool/libguestfs-test-tool.pod:58
41135 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
41136 "minutes) which does not usually need to be adjusted."
41140 #: ../test-tool/libguestfs-test-tool.pod:63
41141 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
41145 #: ../test-tool/libguestfs-test-tool.pod:65
41147 "If you have compiled another version of qemu from source and would like to "
41148 "try that, then you can use the I<--qemudir> option to point to the qemu "
41149 "source directory."
41153 #: ../test-tool/libguestfs-test-tool.pod:69
41155 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
41156 "option to point to the binary."
41160 #: ../test-tool/libguestfs-test-tool.pod:72
41162 "Note when using these options, you can ignore the business of qemu wrapper "
41163 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
41164 "wrapper script for you if one is needed."
41168 #: ../test-tool/libguestfs-test-tool.pod:76
41169 msgid "TRYING OUT A DIFFERENT KERNEL"
41173 #: ../test-tool/libguestfs-test-tool.pod:78
41175 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
41176 "libguestfs tries. You do this by setting the environment variables "
41177 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
41181 #: ../test-tool/libguestfs-test-tool.pod:82
41183 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
41188 #: ../test-tool/libguestfs-test-tool.pod:85
41189 msgid "SELF-DIAGNOSIS"
41193 #: ../test-tool/libguestfs-test-tool.pod:87
41195 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
41196 "produced by libguestfs-test-tool and/or possible errors."
41200 #: ../test-tool/libguestfs-test-tool.pod:92
41202 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
41203 "I<1> if there was an error."
41207 #: ../test-tool/libguestfs-test-tool.pod:97
41209 "For the full list of environment variables which may affect libguestfs, "
41210 "please see the L<guestfs(3)> manual page."
41214 #: ../test-tool/libguestfs-test-tool.pod:102
41215 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
41219 #: ../tools/virt-list-filesystems.pl:32
41220 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
41224 #: ../tools/virt-list-filesystems.pl:36
41227 " virt-list-filesystems [--options] domname\n"
41232 #: ../tools/virt-list-filesystems.pl:38
41235 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
41240 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
41242 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
41247 #: ../tools/virt-list-filesystems.pl:45
41249 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
41250 "are contained in a virtual machine or disk image."
41254 #: ../tools/virt-list-filesystems.pl:49
41256 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
41257 "functionality. For more complex cases you should look at the "
41258 "L<guestfish(1)> tool."
41262 #: ../tools/virt-list-filesystems.pl:112
41264 "With this option, C<virt-list-filesystems> displays the type of each "
41265 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
41269 #: ../tools/virt-list-filesystems.pl:119
41274 #: ../tools/virt-list-filesystems.pl:123
41276 "Normally we only show mountable filesystems. If this option is given then "
41277 "swap devices are shown too."
41281 #: ../tools/virt-list-filesystems.pl:197
41283 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
41284 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
41285 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41289 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
41290 msgid "Copyright (C) 2009 Red Hat Inc."
41294 #: ../tools/virt-list-partitions.pl:32
41295 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
41299 #: ../tools/virt-list-partitions.pl:36
41302 " virt-list-partitions [--options] domname\n"
41307 #: ../tools/virt-list-partitions.pl:38
41310 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
41315 #: ../tools/virt-list-partitions.pl:45
41317 "C<virt-list-partitions> is a command line tool to list the partitions that "
41318 "are contained in a virtual machine or disk image. It is mainly useful as a "
41319 "first step to using L<virt-resize(1)>."
41323 #: ../tools/virt-list-partitions.pl:50
41325 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
41326 "functionality. For more complex cases you should look at the "
41327 "L<guestfish(1)> tool."
41331 #: ../tools/virt-list-partitions.pl:113
41332 msgid "Show sizes in human-readable form (eg. \"1G\")."
41336 #: ../tools/virt-list-partitions.pl:123
41338 "With this option, C<virt-list-partitions> displays the type and size of each "
41339 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
41343 #: ../tools/virt-list-partitions.pl:130
41348 #: ../tools/virt-list-partitions.pl:132
41353 #: ../tools/virt-list-partitions.pl:134
41354 msgid "Display the total size of each block device (as a separate row or rows)."
41358 #: ../tools/virt-list-partitions.pl:267
41360 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
41361 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
41362 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41366 #: ../tools/virt-list-partitions.pl:283
41367 msgid "Copyright (C) 2009-2010 Red Hat Inc."
41371 #: ../tools/virt-make-fs.pl:37
41372 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
41376 #: ../tools/virt-make-fs.pl:41
41379 " virt-make-fs [--options] input.tar output.img\n"
41384 #: ../tools/virt-make-fs.pl:43
41387 " virt-make-fs [--options] input.tar.gz output.img\n"
41392 #: ../tools/virt-make-fs.pl:45
41395 " virt-make-fs [--options] directory output.img\n"
41400 #: ../tools/virt-make-fs.pl:49
41402 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
41403 "archive or some files in a directory. It is similar to tools like "
41404 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
41405 "it can create common filesystem types like ext2/3 or NTFS, which can be "
41406 "useful if you want to attach these filesystems to existing virtual machines "
41407 "(eg. to import large amounts of read-only data to a VM)."
41411 #: ../tools/virt-make-fs.pl:57
41412 msgid "Basic usage is:"
41416 #: ../tools/virt-make-fs.pl:59
41419 " virt-make-fs input output.img\n"
41424 #: ../tools/virt-make-fs.pl:61
41426 "where C<input> is either a directory containing files that you want to add, "
41427 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
41428 "C<output.img> is a disk image. The input type is detected automatically. "
41429 "The output disk image defaults to a raw ext2 sparse image unless you specify "
41430 "extra flags (see L</OPTIONS> below)."
41434 #: ../tools/virt-make-fs.pl:67
41435 msgid "FILESYSTEM TYPE"
41439 #: ../tools/virt-make-fs.pl:69
41441 "The default filesystem type is C<ext2>. Just about any filesystem type that "
41442 "libguestfs supports can be used (but I<not> read-only formats like "
41443 "ISO9660). Here are some of the more common choices:"
41447 #: ../tools/virt-make-fs.pl:75
41452 #: ../tools/virt-make-fs.pl:77
41454 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
41455 "you are not going to use the filesystem in a way that requires the journal, "
41456 "then this is just wasted overhead."
41460 #: ../tools/virt-make-fs.pl:81
41461 msgid "I<ntfs> or I<vfat>"
41465 #: ../tools/virt-make-fs.pl:83
41466 msgid "Useful if exporting data to a Windows guest."
41470 #: ../tools/virt-make-fs.pl:85
41472 "I<Note for vfat>: The tar archive or local directory must only contain files "
41473 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
41474 "program running within libguestfs is unable to change the ownership of "
41475 "non-root files, since vfat itself does not support this."
41479 #: ../tools/virt-make-fs.pl:90
41484 #: ../tools/virt-make-fs.pl:92
41486 "Lower overhead than C<ext2>, but certain limitations on filename length and "
41487 "total filesystem size."
41491 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116 ../tools/virt-make-fs.pl:149
41496 #: ../tools/virt-make-fs.pl:99
41499 " virt-make-fs --type=minix input minixfs.img\n"
41504 #: ../tools/virt-make-fs.pl:101
41505 msgid "TO PARTITION OR NOT TO PARTITION"
41509 #: ../tools/virt-make-fs.pl:103
41510 msgid "Optionally virt-make-fs can add a partition table to the output disk."
41514 #: ../tools/virt-make-fs.pl:105
41516 "Adding a partition can make the disk image more compatible with certain "
41517 "virtualized operating systems which don't expect to see a filesystem "
41518 "directly located on a block device (Linux doesn't care and will happily "
41519 "handle both types)."
41523 #: ../tools/virt-make-fs.pl:110
41525 "On the other hand, if you have a partition table then the output image is no "
41526 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
41527 "directly on a partitioned disk image. (However libguestfs tools such as "
41528 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
41532 #: ../tools/virt-make-fs.pl:118
41533 msgid "Add an MBR partition:"
41537 #: ../tools/virt-make-fs.pl:120
41540 " virt-make-fs --partition -- input disk.img\n"
41545 #: ../tools/virt-make-fs.pl:122
41547 "If the output disk image could be terabyte-sized or larger, it's better to "
41548 "use an EFI/GPT-compatible partition table:"
41552 #: ../tools/virt-make-fs.pl:125
41555 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
41560 #: ../tools/virt-make-fs.pl:127
41561 msgid "EXTRA SPACE"
41565 #: ../tools/virt-make-fs.pl:129
41567 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
41568 "the files that it contains, but might have extra space. Depending on how "
41569 "you are going to use the output, you might think this extra space is wasted "
41570 "and want to minimize it, or you might want to leave space so that more files "
41571 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
41572 "but you can use the I<--size> flag to leave space in the filesystem if you "
41577 #: ../tools/virt-make-fs.pl:137
41579 "An alternative way to leave extra space but not make the output image any "
41580 "bigger is to use an alternative disk image format (instead of the default "
41581 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
41582 "image format (check your hypervisor supports this before using it). This "
41583 "allows you to choose a large I<--size> but the extra space won't actually be "
41584 "allocated in the image until you try to store something in it."
41588 #: ../tools/virt-make-fs.pl:145
41590 "Don't forget that you can also use local commands including L<resize2fs(8)> "
41591 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
41592 "to build another image from scratch."
41596 #: ../tools/virt-make-fs.pl:151
41599 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
41604 #: ../tools/virt-make-fs.pl:179
41605 msgid "Enable debugging information."
41609 #: ../tools/virt-make-fs.pl:185
41610 msgid "B<--size=E<lt>NE<gt>>"
41614 #: ../tools/virt-make-fs.pl:187
41615 msgid "B<--size=+E<lt>NE<gt>>"
41619 #: ../tools/virt-make-fs.pl:189
41620 msgid "B<-s E<lt>NE<gt>>"
41624 #: ../tools/virt-make-fs.pl:191
41625 msgid "B<-s +E<lt>NE<gt>>"
41629 #: ../tools/virt-make-fs.pl:193
41630 msgid "Use the I<--size> (or I<-s>) option to choose the size of the output image."
41634 #: ../tools/virt-make-fs.pl:196
41636 "If this option is I<not> given, then the output image will be just large "
41637 "enough to contain all the files, with not much wasted space."
41641 #: ../tools/virt-make-fs.pl:199
41643 "To choose a fixed size output disk, specify an absolute number followed by "
41644 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41645 "Petabytes or Exabytes. This must be large enough to contain all the input "
41646 "files, else you will get an error."
41650 #: ../tools/virt-make-fs.pl:204
41652 "To leave extra space, specify C<+> (plus sign) and a number followed by "
41653 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41654 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
41655 "the input files, and (approximately) an extra 200 MB free space."
41659 #: ../tools/virt-make-fs.pl:210
41661 "Note that virt-make-fs estimates free space, and therefore will not produce "
41662 "filesystems containing precisely the free space requested. (It is much more "
41663 "expensive and time-consuming to produce a filesystem which has precisely the "
41664 "desired free space)."
41668 #: ../tools/virt-make-fs.pl:219
41669 msgid "B<--format=E<lt>fmtE<gt>>"
41673 #: ../tools/virt-make-fs.pl:221
41674 msgid "B<-F E<lt>fmtE<gt>>"
41678 #: ../tools/virt-make-fs.pl:223
41679 msgid "Choose the output disk image format."
41683 #: ../tools/virt-make-fs.pl:225
41684 msgid "The default is C<raw> (raw sparse disk image)."
41688 #: ../tools/virt-make-fs.pl:227
41690 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
41691 "that would really make sense here is C<qcow2>."
41695 #: ../tools/virt-make-fs.pl:234
41696 msgid "B<--type=E<lt>fsE<gt>>"
41700 #: ../tools/virt-make-fs.pl:236
41701 msgid "B<-t E<lt>fsE<gt>>"
41705 #: ../tools/virt-make-fs.pl:238
41706 msgid "Choose the output filesystem type."
41710 #: ../tools/virt-make-fs.pl:240
41711 msgid "The default is C<ext2>."
41715 #: ../tools/virt-make-fs.pl:242
41716 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
41720 #: ../tools/virt-make-fs.pl:249
41721 msgid "B<--partition>"
41725 #: ../tools/virt-make-fs.pl:251
41726 msgid "B<--partition=E<lt>parttypeE<gt>>"
41730 #: ../tools/virt-make-fs.pl:253
41732 "If specified, this flag adds an MBR partition table to the output disk "
41737 #: ../tools/virt-make-fs.pl:256
41739 "You can change the partition table type, eg. I<--partition=gpt> for large "
41744 #: ../tools/virt-make-fs.pl:259
41746 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
41747 "might consider the next parameter to be the partition type. For example:"
41751 #: ../tools/virt-make-fs.pl:263
41754 " virt-make-fs --partition input.tar output.img\n"
41759 #: ../tools/virt-make-fs.pl:265
41761 "would cause virt-make-fs to think you wanted to use a partition type of "
41762 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
41763 "dash) between options and the input and output arguments:"
41767 #: ../tools/virt-make-fs.pl:269
41770 " virt-make-fs --partition -- input.tar output.img\n"
41775 #: ../tools/virt-make-fs.pl:271
41776 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
41780 #: ../tools/virt-make-fs.pl:559
41782 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
41783 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
41784 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
41788 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
41790 "When reporting bugs, please enable debugging and capture the I<complete> "
41795 #: ../tools/virt-make-fs.pl:576
41798 " export LIBGUESTFS_DEBUG=1\n"
41799 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
41804 #: ../tools/virt-make-fs.pl:579
41806 "Attach /tmp/virt-make-fs.log to a new bug report at "
41807 "L<https://bugzilla.redhat.com/>"
41811 #: ../tools/virt-tar.pl:33
41812 msgid "virt-tar - Extract or upload files to a virtual machine"
41816 #: ../tools/virt-tar.pl:37
41819 " virt-tar [--options] -x domname directory tarball\n"
41824 #: ../tools/virt-tar.pl:39
41827 " virt-tar [--options] -u domname tarball directory\n"
41832 #: ../tools/virt-tar.pl:41
41835 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
41840 #: ../tools/virt-tar.pl:43
41843 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
41848 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
41853 #: ../tools/virt-tar.pl:47
41855 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
41856 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
41860 #: ../tools/virt-tar.pl:52
41861 msgid "Download C</home> from the VM into a local tarball:"
41865 #: ../tools/virt-tar.pl:54
41868 " virt-tar -x domname /home home.tar\n"
41873 #: ../tools/virt-tar.pl:56
41876 " virt-tar -zx domname /home home.tar.gz\n"
41881 #: ../tools/virt-tar.pl:58
41882 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41886 #: ../tools/virt-tar.pl:60
41889 " virt-tar -u domname uploadstuff.tar /tmp\n"
41894 #: ../tools/virt-tar.pl:62
41897 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41902 #: ../tools/virt-tar.pl:66
41904 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41905 "virtual machines. If you do this, you risk disk corruption in the VM. "
41906 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41910 #: ../tools/virt-tar.pl:71
41912 "You can use I<-x> (extract) on live virtual machines, but you might get "
41913 "inconsistent results or errors if there is filesystem activity inside the "
41914 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41915 "work, but the only way to guarantee consistent results is if the virtual "
41916 "machine is shut down."
41920 #: ../tools/virt-tar.pl:79
41922 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41923 "parts of a guest filesystem. There are many possibilities: making backups, "
41924 "uploading data files, snooping on guest activity, fixing or customizing "
41929 #: ../tools/virt-tar.pl:84
41931 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41932 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
41933 "should look at the L<guestfish(1)> tool."
41937 #: ../tools/virt-tar.pl:88
41939 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41940 "its contents (recursively) from the virtual machine into a local tarball. "
41941 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
41942 "virtual machine. You cannot use these two options together."
41946 #: ../tools/virt-tar.pl:94
41948 "In addition, you may need to use the I<-z> (gZip) option to enable "
41949 "compression. When uploading, you have to specify I<-z> if the upload file "
41950 "is compressed because virt-tar won't detect this on its own."
41954 #: ../tools/virt-tar.pl:98
41956 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41957 "example it cannot do PKZip files or bzip2 compression. If you want that "
41958 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41959 "the L<libguestfs(3)> API)."
41963 #: ../tools/virt-tar.pl:160
41964 msgid "B<--extract>"
41968 #: ../tools/virt-tar.pl:162
41969 msgid "B<--download>"
41973 #: ../tools/virt-tar.pl:164
41978 #: ../tools/virt-tar.pl:166
41979 msgid "B<--upload>"
41983 #: ../tools/virt-tar.pl:168
41985 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41990 #: ../tools/virt-tar.pl:171
41992 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41993 "Please read the L</WARNING> section above before using this option."
41997 #: ../tools/virt-tar.pl:175
41998 msgid "You must specify exactly one of these options."
42002 #: ../tools/virt-tar.pl:181
42007 #: ../tools/virt-tar.pl:183
42012 #: ../tools/virt-tar.pl:185
42013 msgid "Specify that the input or output tarball is gzip-compressed."
42017 #: ../tools/virt-tar.pl:298
42019 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
42020 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
42021 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
42022 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42026 #: ../tools/virt-win-reg.pl:37
42028 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
42033 #: ../tools/virt-win-reg.pl:41
42036 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
42041 #: ../tools/virt-win-reg.pl:43
42044 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
42049 #: ../tools/virt-win-reg.pl:45
42052 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
42057 #: ../tools/virt-win-reg.pl:47
42060 " virt-win-reg --merge domname [input.reg ...]\n"
42065 #: ../tools/virt-win-reg.pl:49
42068 " virt-win-reg [--options] disk.img ... # instead of domname\n"
42073 #: ../tools/virt-win-reg.pl:53
42075 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
42076 "virtual machines. If you do this, you I<will> get irreversible disk "
42077 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
42078 "but doesn't catch all cases."
42082 #: ../tools/virt-win-reg.pl:58
42084 "Modifying the Windows Registry is an inherently risky operation. The format "
42085 "is deliberately obscure and undocumented, and Registry changes can leave the "
42086 "system unbootable. Therefore when using the I<--merge> option, make sure "
42087 "you have a reliable backup first."
42091 #: ../tools/virt-win-reg.pl:65
42093 "This program can export and merge Windows Registry entries from a Windows "
42098 #: ../tools/virt-win-reg.pl:68
42100 "The first parameter is the libvirt guest name or the raw disk image of a "
42105 #: ../tools/virt-win-reg.pl:71
42107 "If I<--merge> is I<not> specified, then the chosen registry key is "
42108 "displayed/exported (recursively). For example:"
42112 #: ../tools/virt-win-reg.pl:74
42115 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
42120 #: ../tools/virt-win-reg.pl:76
42121 msgid "You can also display single values from within registry keys, for example:"
42125 #: ../tools/virt-win-reg.pl:79
42128 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
42129 " $ virt-win-reg Windows7 $cvkey ProductName\n"
42130 " Windows 7 Enterprise\n"
42135 #: ../tools/virt-win-reg.pl:83
42137 "With I<--merge>, you can merge a textual regedit file into the Windows "
42142 #: ../tools/virt-win-reg.pl:86
42145 " $ virt-win-reg --merge Windows7 changes.reg\n"
42150 #: ../tools/virt-win-reg.pl:90
42152 "This program is only meant for simple access to the registry. If you want "
42153 "to do complicated things with the registry, we suggest you download the "
42154 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
42155 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
42156 "L<hivexregedit(1)>."
42160 #: ../tools/virt-win-reg.pl:159
42165 #: ../tools/virt-win-reg.pl:161
42167 "In merge mode, this merges a textual regedit file into the Windows Registry "
42168 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
42169 "displays or exports Registry entries instead."
42173 #: ../tools/virt-win-reg.pl:165
42175 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
42176 "result in disk corruption. However exporting (without this flag) is always "
42181 #: ../tools/virt-win-reg.pl:173
42182 msgid "B<--encoding> UTF-16LE|ASCII"
42186 #: ../tools/virt-win-reg.pl:175
42188 "When merging (only), you may need to specify the encoding for strings to be "
42189 "used in the hive file. This is explained in detail in "
42190 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
42194 #: ../tools/virt-win-reg.pl:179
42196 "The default is to use UTF-16LE, which should work with recent versions of "
42201 #: ../tools/virt-win-reg.pl:186
42202 msgid "B<--unsafe-printable-strings>"
42206 #: ../tools/virt-win-reg.pl:188
42208 "When exporting (only), assume strings are UTF-16LE and print them as strings "
42209 "instead of hex sequences. Remove the final zero codepoint from strings if "
42214 #: ../tools/virt-win-reg.pl:192
42216 "This is unsafe and does not preserve the fidelity of strings in the original "
42217 "Registry for various reasons:"
42221 #: ../tools/virt-win-reg.pl:199
42223 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
42224 "other encodings will be corrupted by this transformation."
42228 #: ../tools/virt-win-reg.pl:204
42230 "Assumes that everything which has type 1 or 2 is really a string and that "
42231 "everything else is not a string, but the type field in real Registries is "
42236 #: ../tools/virt-win-reg.pl:210
42238 "Loses information about whether a zero codepoint followed the string in the "
42243 #: ../tools/virt-win-reg.pl:215
42245 "This all happens because the Registry itself contains no information about "
42246 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
42250 #: ../tools/virt-win-reg.pl:219
42252 "You should only use this option for quick hacking and debugging of the "
42253 "Registry contents, and I<never> use it if the output is going to be passed "
42254 "into another program or stored in another Registry."
42258 #: ../tools/virt-win-reg.pl:556
42259 msgid "SUPPORTED SYSTEMS"
42263 #: ../tools/virt-win-reg.pl:558
42265 "The program currently supports Windows NT-derived guests starting with "
42266 "Windows XP through to at least Windows 7."
42270 #: ../tools/virt-win-reg.pl:561
42271 msgid "The following Registry keys are supported:"
42275 #: ../tools/virt-win-reg.pl:565
42276 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
42280 #: ../tools/virt-win-reg.pl:567
42281 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
42285 #: ../tools/virt-win-reg.pl:569
42286 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
42290 #: ../tools/virt-win-reg.pl:571
42291 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
42295 #: ../tools/virt-win-reg.pl:573
42296 msgid "C<HKEY_USERS\\.DEFAULT>"
42300 #: ../tools/virt-win-reg.pl:575
42301 msgid "C<HKEY_USERS\\I<SID>>"
42305 #: ../tools/virt-win-reg.pl:577
42306 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
42310 #: ../tools/virt-win-reg.pl:579
42311 msgid "C<HKEY_USERS\\I<username>>"
42315 #: ../tools/virt-win-reg.pl:581
42316 msgid "where I<username> is a local user name (this is a libguestfs extension)."
42320 #: ../tools/virt-win-reg.pl:585
42322 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
42327 #: ../tools/virt-win-reg.pl:588
42329 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
42330 "supported (there is no \"current user\")."
42334 #: ../tools/virt-win-reg.pl:591
42339 #: ../tools/virt-win-reg.pl:593
42341 "C<virt-win-reg> expects that regedit files have already been reencoded in "
42342 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
42343 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
42344 "with Windows-style line endings, you may need to reencode the whole file "
42345 "before or after processing."
42349 #: ../tools/virt-win-reg.pl:599
42351 "To reencode a file from Windows format to Linux (before processing it with "
42352 "the I<--merge> option), you would do something like this:"
42356 #: ../tools/virt-win-reg.pl:602
42359 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
42364 #: ../tools/virt-win-reg.pl:604
42366 "To go in the opposite direction, after exporting and before sending the file "
42367 "to a Windows user, do something like this:"
42371 #: ../tools/virt-win-reg.pl:607
42374 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
42379 #: ../tools/virt-win-reg.pl:609
42380 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
42384 #: ../tools/virt-win-reg.pl:611
42386 "If you are unsure about the current encoding, use the L<file(1)> command. "
42387 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
42388 "Windows-style (CRLF) line endings, like this:"
42392 #: ../tools/virt-win-reg.pl:615
42395 " $ file software.reg\n"
42396 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
42397 " with CRLF line terminators\n"
42402 #: ../tools/virt-win-reg.pl:619
42403 msgid "This file would need conversion before you could I<--merge> it."
42407 #: ../tools/virt-win-reg.pl:621
42408 msgid "CurrentControlSet etc."
42412 #: ../tools/virt-win-reg.pl:623
42414 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
42415 "Registry at the level of the hive file, and therefore you cannot modify "
42420 #: ../tools/virt-win-reg.pl:627
42422 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
42423 "circumstances it might refer to another control set. The way to find out is "
42424 "to look at the C<HKLM\\SYSTEM\\Select> key:"
42428 #: ../tools/virt-win-reg.pl:631
42431 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
42432 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
42433 " \"Current\"=dword:00000001\n"
42434 " \"Default\"=dword:00000001\n"
42435 " \"Failed\"=dword:00000000\n"
42436 " \"LastKnownGood\"=dword:00000002\n"
42441 #: ../tools/virt-win-reg.pl:638
42442 msgid "\"Current\" is the one which Windows will choose when it boots."
42446 #: ../tools/virt-win-reg.pl:640
42447 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
42451 #: ../tools/virt-win-reg.pl:643
42452 msgid "DELETING REGISTRY KEYS AND VALUES"
42456 #: ../tools/virt-win-reg.pl:645
42457 msgid "To delete a whole registry key, use the syntax:"
42461 #: ../tools/virt-win-reg.pl:647
42464 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
42469 #: ../tools/virt-win-reg.pl:649
42470 msgid "To delete a single value within a key, use the syntax:"
42474 #: ../tools/virt-win-reg.pl:651
42477 " [HKEY_LOCAL_MACHINE\\Foo]\n"
42483 #: ../tools/virt-win-reg.pl:654
42484 msgid "WINDOWS TIPS"
42488 #: ../tools/virt-win-reg.pl:656
42490 "Note that some of these tips modify the guest disk image. The guest I<must> "
42491 "be shut off, else you will get disk corruption."
42495 #: ../tools/virt-win-reg.pl:659
42496 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
42500 #: ../tools/virt-win-reg.pl:661
42502 "Prepare a DOS batch script, VBScript or executable. Upload this using "
42503 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
42504 "is uploaded into C<C:\\>:"
42508 #: ../tools/virt-win-reg.pl:665
42511 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
42516 #: ../tools/virt-win-reg.pl:667
42517 msgid "Prepare a regedit file containing the registry change:"
42521 #: ../tools/virt-win-reg.pl:669
42524 " cat > test.reg <<'EOF'\n"
42525 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
42526 " \"Test\"=\"c:\\\\test.bat\"\n"
42532 #: ../tools/virt-win-reg.pl:674
42534 "In this example we use the key C<RunOnce> which means that the script will "
42535 "run precisely once when the first user logs in. If you want it to run every "
42536 "time a user logs in, replace C<RunOnce> with C<Run>."
42540 #: ../tools/virt-win-reg.pl:678
42541 msgid "Now update the registry:"
42545 #: ../tools/virt-win-reg.pl:680
42548 " virt-win-reg --merge WindowsGuest test.reg\n"
42553 #: ../tools/virt-win-reg.pl:682
42554 msgid "INSTALLING A SERVICE"
42558 #: ../tools/virt-win-reg.pl:684
42560 "This section assumes you are familiar with Windows services, and you either "
42561 "have a program which handles the Windows Service Control Protocol directly "
42562 "or you want to run any program using a service wrapper like SrvAny or the "
42567 #: ../tools/virt-win-reg.pl:689
42569 "First upload the program and optionally the service wrapper. In this case "
42570 "the test program is called C<test.exe> and we are using the RHSrvAny "
42575 #: ../tools/virt-win-reg.pl:693
42578 " guestfish -i -d WindowsGuest <<EOF\n"
42579 " upload rhsrvany.exe /rhsrvany.exe\n"
42580 " upload test.exe /test.exe\n"
42586 #: ../tools/virt-win-reg.pl:698
42588 "Prepare a regedit file containing the registry changes. In this example, "
42589 "the first registry change is needed for the service itself or the service "
42590 "wrapper (if used). The second registry change is only needed because I am "
42591 "using the RHSrvAny service wrapper."
42595 #: ../tools/virt-win-reg.pl:703
42598 " cat > service.reg <<'EOF'\n"
42599 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
42600 " \"Type\"=dword:00000010\n"
42601 " \"Start\"=dword:00000002\n"
42602 " \"ErrorControl\"=dword:00000001\n"
42603 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
42604 " \"DisplayName\"=\"RHSrvAny\"\n"
42605 " \"ObjectName\"=\"NetworkService\"\n"
42610 #: ../tools/virt-win-reg.pl:712
42613 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
42614 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
42615 " \"PWD\"=\"c:\\\\Temp\"\n"
42621 #: ../tools/virt-win-reg.pl:723
42623 "For use of C<ControlSet001> see the section above in this manual page. You "
42624 "may need to adjust this according to the control set that is in use by the "
42629 #: ../tools/virt-win-reg.pl:729
42631 "C<\"ObjectName\"> controls the privileges that the service will have. An "
42632 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
42633 "privileged account."
42637 #: ../tools/virt-win-reg.pl:735
42639 "For the meaning of the magic numbers, see this Microsoft KB article: "
42640 "L<http://support.microsoft.com/kb/103000>."
42644 #: ../tools/virt-win-reg.pl:740
42645 msgid "Update the registry:"
42649 #: ../tools/virt-win-reg.pl:742
42652 " virt-win-reg --merge WindowsGuest service.reg\n"
42657 #: ../tools/virt-win-reg.pl:746
42659 "Be careful when passing parameters containing C<\\> (backslash) in the "
42660 "shell. Usually you will have to use 'single quotes' or double backslashes "
42661 "(but not both) to protect them from the shell."
42665 #: ../tools/virt-win-reg.pl:750
42666 msgid "Paths and value names are case-insensitive."
42670 #: ../tools/virt-win-reg.pl:759
42672 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
42673 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
42674 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
42675 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42679 #: ../tools/virt-win-reg.pl:777
42682 " export LIBGUESTFS_DEBUG=1\n"
42683 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
42688 #: ../tools/virt-win-reg.pl:780
42690 "Attach /tmp/virt-win-reg.log to a new bug report at "
42691 "L<https://bugzilla.redhat.com/>"