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.7\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-11-29 14:22+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:491 ../sparsify/virt-sparsify.pod:171
358 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:493 ../sparsify/virt-sparsify.pod:173
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:177
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:179
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:181
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:561 ../sparsify/virt-sparsify.pod:183
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:563 ../sparsify/virt-sparsify.pod:185 ../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:565 ../sparsify/virt-sparsify.pod:187 ../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:189 ../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:191
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:676 ../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:678 ../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:683 ../sparsify/virt-sparsify.pod:245 ../test-tool/libguestfs-test-tool.pod:90
695 #: ../align/virt-alignment-scan.pod:320
696 msgid "This program returns:"
700 #: ../align/virt-alignment-scan.pod:324 ../align/virt-alignment-scan.pod:330 ../align/virt-alignment-scan.pod:336 ../align/virt-alignment-scan.pod:343 ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187 ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202 ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287 ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295 ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314 ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322 ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362 ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388 ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266 ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276 ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291 ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102 ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132 ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227 ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235 ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243 ../examples/guestfs-testing.pod:110 ../examples/guestfs-testing.pod:114 ../examples/guestfs-testing.pod:118 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:441 ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:456 ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:1262 ../fish/guestfish-actions.pod:1266 ../fish/guestfish-actions.pod:1270 ../fish/guestfish-actions.pod:1274 ../fish/guestfish-actions.pod:1282 ../fish/guestfish-actions.pod:1286 ../fish/guestfish-actions.pod:1290 ../fish/guestfish-actions.pod:1300 ../fish/guestfish-actions.pod:1304 ../fish/guestfish-actions.pod:1308 ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:1402 ../fish/guestfish-actions.pod:1407 ../fish/guestfish-actions.pod:1412 ../fish/guestfish-actions.pod:1454 ../fish/guestfish-actions.pod:1458 ../fish/guestfish-actions.pod:1463 ../fish/guestfish-actions.pod:1719 ../fish/guestfish-actions.pod:1726 ../fish/guestfish-actions.pod:1733 ../fish/guestfish-actions.pod:2136 ../fish/guestfish-actions.pod:2142 ../fish/guestfish-actions.pod:2150 ../fish/guestfish-actions.pod:2157 ../fish/guestfish-actions.pod:2164 ../fish/guestfish.pod:445 ../fish/guestfish.pod:449 ../fish/guestfish.pod:453 ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:408 ../inspector/virt-inspector.pod:412 ../resize/virt-resize.pod:359 ../resize/virt-resize.pod:363 ../resize/virt-resize.pod:372 ../resize/virt-resize.pod:378 ../sparsify/virt-sparsify.pod:32 ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43 ../sparsify/virt-sparsify.pod:49 ../sparsify/virt-sparsify.pod:54 ../sparsify/virt-sparsify.pod:58 ../sparsify/virt-sparsify.pod:64 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:641 ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:656 ../src/guestfs-actions.pod:663 ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2083 ../src/guestfs-actions.pod:2087 ../src/guestfs-actions.pod:2091 ../src/guestfs-actions.pod:2099 ../src/guestfs-actions.pod:2103 ../src/guestfs-actions.pod:2107 ../src/guestfs-actions.pod:2117 ../src/guestfs-actions.pod:2121 ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:2263 ../src/guestfs-actions.pod:2267 ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:2277 ../src/guestfs-actions.pod:2338 ../src/guestfs-actions.pod:2342 ../src/guestfs-actions.pod:2347 ../src/guestfs-actions.pod:2762 ../src/guestfs-actions.pod:2769 ../src/guestfs-actions.pod:2776 ../src/guestfs-actions.pod:3321 ../src/guestfs-actions.pod:3327 ../src/guestfs-actions.pod:3335 ../src/guestfs-actions.pod:3342 ../src/guestfs-actions.pod:3349 ../src/guestfs.pod:403 ../src/guestfs.pod:408 ../src/guestfs.pod:413 ../src/guestfs.pod:417 ../src/guestfs.pod:422 ../src/guestfs.pod:426 ../src/guestfs.pod:431 ../src/guestfs.pod:436 ../src/guestfs.pod:1109 ../src/guestfs.pod:1113 ../src/guestfs.pod:1117 ../src/guestfs.pod:1122 ../src/guestfs.pod:1130 ../src/guestfs.pod:1149 ../src/guestfs.pod:1157 ../src/guestfs.pod:1179 ../src/guestfs.pod:1183 ../src/guestfs.pod:1187 ../src/guestfs.pod:1191 ../src/guestfs.pod:1195 ../src/guestfs.pod:1199 ../src/guestfs.pod:1689 ../src/guestfs.pod:1694 ../src/guestfs.pod:1698 ../src/guestfs.pod:1800 ../src/guestfs.pod:1805 ../src/guestfs.pod:1809 ../src/guestfs.pod:1819 ../src/guestfs.pod:2108 ../src/guestfs.pod:2113 ../src/guestfs.pod:2119 ../src/guestfs.pod:2127 ../src/guestfs.pod:2645 ../src/guestfs.pod:2651 ../src/guestfs.pod:2656 ../src/guestfs.pod:2662 ../src/guestfs.pod:3067 ../src/guestfs.pod:3072 ../src/guestfs.pod:3076 ../src/guestfs.pod:3080 ../src/guestfs.pod:3084 ../src/guestfs.pod:3098 ../src/guestfs.pod:3103 ../src/guestfs.pod:3335 ../src/guestfs.pod:3339 ../src/guestfs.pod:3343 ../src/guestfs.pod:3347 ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:721 ../tools/virt-win-reg.pl:727 ../tools/virt-win-reg.pl:733
705 #: ../align/virt-alignment-scan.pod:326
710 #: ../align/virt-alignment-scan.pod:328
711 msgid "successful exit, all partitions are aligned E<ge> 64K for best performance"
715 #: ../align/virt-alignment-scan.pod:332
720 #: ../align/virt-alignment-scan.pod:334
721 msgid "an error scanning the disk image or guest"
725 #: ../align/virt-alignment-scan.pod:338
730 #: ../align/virt-alignment-scan.pod:340
732 "successful exit, some partitions have alignment E<lt> 64K which can result "
733 "in poor performance on high end network storage"
737 #: ../align/virt-alignment-scan.pod:345
742 #: ../align/virt-alignment-scan.pod:347
744 "successful exit, some partitions have alignment E<lt> 4K which can result in "
745 "poor performance on most hypervisors"
749 #: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243 ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495 ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:253 ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97 ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384 ../examples/guestfs-testing.pod:291 ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317 ../inspector/virt-inspector.pod:395 ../java/examples/guestfs-java.pod:45 ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39 ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:325 ../resize/virt-resize.pod:688 ../ruby/examples/guestfs-ruby.pod:36 ../sparsify/virt-sparsify.pod:269 ../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:711 ../sparsify/virt-sparsify.pod:282 ../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:713 ../sparsify/virt-sparsify.pod:284 ../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:715 ../ruby/examples/guestfs-ruby.pod:52 ../sparsify/virt-sparsify.pod:286 ../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:288
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:719 ../sparsify/virt-sparsify.pod:290 ../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:724 ../sparsify/virt-sparsify.pod:295 ../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:729 ../sparsify/virt-sparsify.pod:300 ../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:685 ../sparsify/virt-sparsify.pod:247
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:717 ../tools/virt-make-fs.pl:588
1173 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1177 #: ../cat/virt-filesystems.pod:5
1179 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1180 "virtual machine or disk image"
1184 #: ../cat/virt-filesystems.pod:9
1187 " virt-filesystems [--options] -d domname\n"
1192 #: ../cat/virt-filesystems.pod:11
1195 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1200 #: ../cat/virt-filesystems.pod:15
1202 "This tool allows you to discover filesystems, partitions, logical volumes, "
1203 "and their sizes in a disk image or virtual machine. It is a replacement for "
1204 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1208 #: ../cat/virt-filesystems.pod:20
1210 "One use for this tool is from shell scripts to iterate over all filesystems "
1211 "from a disk image:"
1215 #: ../cat/virt-filesystems.pod:23
1218 " for fs in $(virt-filesystems -a disk.img); do\n"
1225 #: ../cat/virt-filesystems.pod:27
1227 "Another use is to list partitions before using another tool to modify those "
1228 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1229 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1233 #: ../cat/virt-filesystems.pod:32
1235 "Various command line options control what this program displays. You need "
1236 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1237 "guest respectively. If you just specify that then the program shows "
1238 "filesystems found, one per line, like this:"
1242 #: ../cat/virt-filesystems.pod:37
1245 " $ virt-filesystems -a disk.img\n"
1247 " /dev/vg_guest/lv_root\n"
1252 #: ../cat/virt-filesystems.pod:41
1253 msgid "If you add I<-l> or I<--long> then the output includes extra information:"
1257 #: ../cat/virt-filesystems.pod:44
1260 " $ virt-filesystems -a disk.img -l\n"
1261 " Name Type VFS Label Size\n"
1262 " /dev/sda1 filesystem ext4 boot 524288000\n"
1263 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1268 #: ../cat/virt-filesystems.pod:49
1270 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1275 #: ../cat/virt-filesystems.pod:52
1278 " $ virt-filesystems -a disk.img --extra\n"
1280 " /dev/vg_guest/lv_root\n"
1281 " /dev/vg_guest/lv_swap\n"
1282 " /dev/vg_guest/lv_data\n"
1287 #: ../cat/virt-filesystems.pod:58
1288 msgid "If you add I<--partitions> then partitions are shown instead of filesystems:"
1292 #: ../cat/virt-filesystems.pod:60
1295 " $ virt-filesystems -a disk.img --partitions\n"
1302 #: ../cat/virt-filesystems.pod:64
1304 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, "
1305 "I<--physical-volumes>, I<--block-devices> to list those items."
1309 #: ../cat/virt-filesystems.pod:67
1311 "You can use these options in combination as well (if you want a combination "
1312 "including filesystems, you have to add I<--filesystems>). Notice that some "
1313 "items fall into several categories (eg. C</dev/sda1> might be both a "
1314 "partition and a filesystem). These items are listed several times. To get "
1315 "a list which includes absolutely everything that virt-filesystems knows "
1316 "about, use the I<--all> option."
1320 #: ../cat/virt-filesystems.pod:74
1322 "UUIDs (because they are quite long) are not shown by default. Add the "
1323 "I<--uuid> option to display device and filesystem UUIDs in the long output."
1327 #: ../cat/virt-filesystems.pod:78
1329 "I<--all --long --uuid> is a useful combination to display all possible "
1330 "information about everything."
1334 #: ../cat/virt-filesystems.pod:81
1337 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1338 " Name Type VFS Label Size Parent UUID\n"
1339 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1340 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1341 " /dev/sda1 partition - - 100M /dev/sda -\n"
1342 " /dev/sda2 partition - - 20G /dev/sda -\n"
1343 " /dev/sda device - - 20G - -\n"
1348 #: ../cat/virt-filesystems.pod:89
1349 msgid "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1353 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1358 #: ../cat/virt-filesystems.pod:112
1360 "Display everything. This is currently the same as specifying these options: "
1361 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, "
1362 "I<--logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may "
1363 "be added to this list in future)."
1367 #: ../cat/virt-filesystems.pod:117
1368 msgid "See also I<--long>."
1372 #: ../cat/virt-filesystems.pod:119
1373 msgid "B<--blkdevs>"
1377 #: ../cat/virt-filesystems.pod:121
1378 msgid "B<--block-devices>"
1382 #: ../cat/virt-filesystems.pod:123
1383 msgid "Display block devices."
1387 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1392 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1394 "Write out the results in CSV format (comma-separated values). This format "
1395 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1396 "ABOUT CSV FORMAT> below."
1400 #: ../cat/virt-filesystems.pod:150
1402 "When prompting for keys and passphrases, virt-filesystems normally turns "
1403 "echoing off so you cannot see what you are typing. If you are not worried "
1404 "about Tempest attacks and there is no one else in the room you can specify "
1405 "this flag to see what you are typing."
1409 #: ../cat/virt-filesystems.pod:155
1414 #: ../cat/virt-filesystems.pod:157
1416 "This causes filesystems that are not ordinary, mountable filesystems to be "
1417 "displayed. This category includes swapspace, and filesystems that are empty "
1418 "or contain unknown data."
1422 #: ../cat/virt-filesystems.pod:161
1423 msgid "This option implies I<--filesystems>."
1427 #: ../cat/virt-filesystems.pod:163
1428 msgid "B<--filesystems>"
1432 #: ../cat/virt-filesystems.pod:165
1434 "Display mountable filesystems. If no display option was selected then this "
1435 "option is implied."
1439 #: ../cat/virt-filesystems.pod:168
1440 msgid "With I<--extra>, non-mountable filesystems are shown too."
1444 #: ../cat/virt-filesystems.pod:181
1447 " virt-filesystems --format=raw -a disk.img\n"
1452 #: ../cat/virt-filesystems.pod:185
1455 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1460 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352 ../df/virt-df.pod:125 ../fish/guestfish.pod:156 ../tools/virt-list-partitions.pl:109
1465 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354 ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1466 msgid "B<--human-readable>"
1470 #: ../cat/virt-filesystems.pod:198
1471 msgid "In I<--long> mode, display sizes in human-readable format."
1475 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366 ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1480 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368 ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1485 #: ../cat/virt-filesystems.pod:209
1486 msgid "Display extra columns of data (\"long format\")."
1490 #: ../cat/virt-filesystems.pod:211
1491 msgid "A title row is added unless you also specify I<--no-title>."
1495 #: ../cat/virt-filesystems.pod:213
1497 "The extra columns displayed depend on what output you select, and the "
1498 "ordering of columns may change in future versions. Use the title row, "
1499 "I<--csv> output and/or L<csvtool(1)> to match columns to data in external "
1504 #: ../cat/virt-filesystems.pod:218
1506 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1507 "default is to show raw numbers of I<bytes>."
1511 #: ../cat/virt-filesystems.pod:221
1512 msgid "Use I<--uuid> to display UUIDs too."
1516 #: ../cat/virt-filesystems.pod:223
1521 #: ../cat/virt-filesystems.pod:225
1522 msgid "B<--logvols>"
1526 #: ../cat/virt-filesystems.pod:227
1527 msgid "B<--logical-volumes>"
1531 #: ../cat/virt-filesystems.pod:229
1533 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1534 "of whether the LVs contain filesystems."
1538 #: ../cat/virt-filesystems.pod:232
1539 msgid "B<--no-title>"
1543 #: ../cat/virt-filesystems.pod:234
1544 msgid "In I<--long> mode, don't add a title row."
1548 #: ../cat/virt-filesystems.pod:236
1550 "Note that the order of the columns is not fixed, and may change in future "
1551 "versions of virt-filesystems, so using this option may give you unexpected "
1556 #: ../cat/virt-filesystems.pod:240
1561 #: ../cat/virt-filesystems.pod:242
1562 msgid "B<--partitions>"
1566 #: ../cat/virt-filesystems.pod:244
1568 "Display partitions. In this mode, these are displayed irrespective of "
1569 "whether the partitions contain filesystems."
1573 #: ../cat/virt-filesystems.pod:247
1578 #: ../cat/virt-filesystems.pod:249
1579 msgid "B<--physvols>"
1583 #: ../cat/virt-filesystems.pod:251
1584 msgid "B<--physical-volumes>"
1588 #: ../cat/virt-filesystems.pod:253
1589 msgid "Display LVM physical volumes."
1593 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1598 #: ../cat/virt-filesystems.pod:257
1603 #: ../cat/virt-filesystems.pod:259
1604 msgid "In I<--long> mode, display UUIDs as well."
1608 #: ../cat/virt-filesystems.pod:273
1613 #: ../cat/virt-filesystems.pod:275
1614 msgid "B<--volgroups>"
1618 #: ../cat/virt-filesystems.pod:277
1619 msgid "B<--volume-groups>"
1623 #: ../cat/virt-filesystems.pod:279
1624 msgid "Display LVM volume groups."
1628 #: ../cat/virt-filesystems.pod:287
1633 #: ../cat/virt-filesystems.pod:289
1635 "Note that columns in the output are subject to reordering and change in "
1636 "future versions of this tool."
1640 #: ../cat/virt-filesystems.pod:294
1645 #: ../cat/virt-filesystems.pod:296
1646 msgid "The filesystem, partition, block device or LVM name."
1650 #: ../cat/virt-filesystems.pod:298
1652 "For device and partition names these are displayed as canonical libguestfs "
1653 "names, so that for example C</dev/sda2> is the second partition on the first "
1658 #: ../cat/virt-filesystems.pod:302
1660 "If the I<--long> option is B<not> specified, then only the name column is "
1661 "shown in the output."
1665 #: ../cat/virt-filesystems.pod:305
1670 #: ../cat/virt-filesystems.pod:307
1671 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1675 #: ../cat/virt-filesystems.pod:309
1680 #: ../cat/virt-filesystems.pod:311
1682 "If there is a filesystem, then this column displays the filesystem type if "
1683 "one could be detected, eg. C<ext4>."
1687 #: ../cat/virt-filesystems.pod:314
1692 #: ../cat/virt-filesystems.pod:316
1694 "If the object has a label (used for identifying and mounting filesystems) "
1695 "then this column contains the label."
1699 #: ../cat/virt-filesystems.pod:319
1704 #: ../cat/virt-filesystems.pod:321
1706 "The partition type byte, displayed as a two digit hexadecimal number. A "
1707 "comprehensive list of partition types can be found here: "
1708 "L<http://www.win.tue.nl/~aeb/partitions/partition_types-1.html>"
1712 #: ../cat/virt-filesystems.pod:325
1713 msgid "This is only applicable for DOS (MBR) partitions."
1717 #: ../cat/virt-filesystems.pod:327
1722 #: ../cat/virt-filesystems.pod:329
1724 "The size of the object in bytes. If the I<--human> option is used then the "
1725 "size is displayed in a human-readable form."
1729 #: ../cat/virt-filesystems.pod:332
1734 #: ../cat/virt-filesystems.pod:334
1736 "The parent column records the parent relationship between objects. For "
1737 "example, if the object is a partition, then this column contains the name of "
1738 "the containing device. If the object is a logical volume, then this column "
1739 "is the name of the volume group."
1743 #: ../cat/virt-filesystems.pod:339
1748 #: ../cat/virt-filesystems.pod:341
1750 "If the object has a UUID (used for identifying and mounting filesystems and "
1751 "block devices) then this column contains the UUID as a string."
1755 #: ../cat/virt-filesystems.pod:345
1756 msgid "The UUID is only displayed if the I<--uuid> option is given."
1760 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:459 ../df/virt-df.pod:217
1761 msgid "NOTE ABOUT CSV FORMAT"
1765 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:461 ../df/virt-df.pod:219
1767 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
1768 "should be easy to parse, but it is definitely not easy to parse."
1772 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:464 ../df/virt-df.pod:222
1774 "Myth: Just split fields at commas. Reality: This does I<not> work "
1775 "reliably. This example has two columns:"
1779 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:467 ../df/virt-df.pod:225
1782 " \"foo,bar\",baz\n"
1787 #: ../cat/virt-filesystems.pod:359 ../cat/virt-ls.pod:469 ../df/virt-df.pod:227
1789 "Myth: Read the file one line at a time. Reality: This does I<not> work "
1790 "reliably. This example has one row:"
1794 #: ../cat/virt-filesystems.pod:362 ../cat/virt-ls.pod:472 ../df/virt-df.pod:230
1803 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:475 ../df/virt-df.pod:233
1805 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
1806 "packaged in major Linux distributions)."
1810 #: ../cat/virt-filesystems.pod:368 ../cat/virt-ls.pod:478 ../df/virt-df.pod:236
1812 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
1813 "or Python's built-in csv library)."
1817 #: ../cat/virt-filesystems.pod:371 ../cat/virt-ls.pod:481 ../df/virt-df.pod:239
1818 msgid "Most spreadsheets and databases can import CSV directly."
1822 #: ../cat/virt-filesystems.pod:387
1824 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
1825 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, "
1826 "L<http://libguestfs.org/>."
1830 #: ../cat/virt-filesystems.pod:402 ../tools/virt-win-reg.pl:789
1831 msgid "Copyright (C) 2010 Red Hat Inc."
1835 #: ../cat/virt-ls.pod:5
1836 msgid "virt-ls - List files in a virtual machine"
1840 #: ../cat/virt-ls.pod:9
1843 " virt-ls [--options] -d domname directory [directory ...]\n"
1848 #: ../cat/virt-ls.pod:11
1851 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory "
1857 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:15
1862 #: ../cat/virt-ls.pod:15
1865 " virt-ls [--options] domname directory\n"
1870 #: ../cat/virt-ls.pod:17
1873 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1878 #: ../cat/virt-ls.pod:21
1880 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1881 "more from a virtual machine or disk image."
1885 #: ../cat/virt-ls.pod:24
1887 "Multiple directory names can be given, in which case the output from each is "
1892 #: ../cat/virt-ls.pod:27
1894 "To list directories from a libvirt guest use the I<-d> option to specify the "
1895 "name of the guest. For a disk image, use the I<-a> option."
1899 #: ../cat/virt-ls.pod:31
1901 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1902 "may need to use L<guestfish(1)>, or write a program directly to the "
1903 "L<guestfs(3)> API."
1907 #: ../cat/virt-ls.pod:37
1908 msgid "Get a list of all files and directories in a virtual machine:"
1912 #: ../cat/virt-ls.pod:39
1915 " virt-ls -R -d guest /\n"
1920 #: ../cat/virt-ls.pod:41 ../examples/guestfs-testing.pod:182
1921 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1925 #: ../cat/virt-ls.pod:43
1928 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1933 #: ../cat/virt-ls.pod:45 ../examples/guestfs-testing.pod:186
1934 msgid "List all public-writable directories in a Linux virtual machine:"
1938 #: ../cat/virt-ls.pod:47
1941 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1946 #: ../cat/virt-ls.pod:49 ../examples/guestfs-testing.pod:190
1947 msgid "List all Unix domain sockets in a Linux virtual machine:"
1951 #: ../cat/virt-ls.pod:51
1954 " virt-ls -lR -d guest / | grep '^s'\n"
1959 #: ../cat/virt-ls.pod:53 ../examples/guestfs-testing.pod:194
1960 msgid "List all regular files with filenames ending in '.png':"
1964 #: ../cat/virt-ls.pod:55
1967 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1972 #: ../cat/virt-ls.pod:57
1973 msgid "To display files larger than 10MB in home directories:"
1977 #: ../cat/virt-ls.pod:59
1980 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1985 #: ../cat/virt-ls.pod:61 ../examples/guestfs-testing.pod:202
1986 msgid "Find everything modified in the last 7 days:"
1990 #: ../cat/virt-ls.pod:63
1993 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1998 #: ../cat/virt-ls.pod:65 ../examples/guestfs-testing.pod:206
1999 msgid "Find regular files modified in the last 24 hours:"
2003 #: ../cat/virt-ls.pod:67
2006 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2011 #: ../cat/virt-ls.pod:69
2012 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2016 #: ../cat/virt-ls.pod:71
2018 "Find the differences between files in a guest and an earlier snapshot of the "
2023 #: ../cat/virt-ls.pod:74
2026 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2027 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2028 " diff -u old new | less\n"
2033 #: ../cat/virt-ls.pod:78
2035 "The commands above won't find files where the content has changed but the "
2036 "metadata (eg. file size and modification date) is the same. To do that, you "
2037 "need to add the I<--checksum> parameter to both C<virt-ls> commands. "
2038 "I<--checksum> can be quite slow since it has to read and compute a checksum "
2039 "of every regular file in the virtual machine."
2043 #: ../cat/virt-ls.pod:84
2044 msgid "OUTPUT MODES"
2048 #: ../cat/virt-ls.pod:86
2050 "C<virt-ls> has four output modes, controlled by different combinations of "
2051 "the I<-l> and I<-R> options."
2055 #: ../cat/virt-ls.pod:89
2056 msgid "SIMPLE LISTING"
2060 #: ../cat/virt-ls.pod:91
2061 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2065 #: ../cat/virt-ls.pod:93
2068 " $ virt-ls -d guest /\n"
2076 #: ../cat/virt-ls.pod:98
2077 msgid "LONG LISTING"
2081 #: ../cat/virt-ls.pod:100
2083 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2084 "(more specifically, like the C<guestfs_ll> function)."
2088 #: ../cat/virt-ls.pod:103
2091 " $ virt-ls -l -d guest /\n"
2093 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2094 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2100 #: ../cat/virt-ls.pod:109
2102 "Note that while this is useful for displaying a directory, do not try "
2103 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2108 #: ../cat/virt-ls.pod:113
2109 msgid "RECURSIVE LISTING"
2113 #: ../cat/virt-ls.pod:115
2115 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2116 "and directories recursively:"
2120 #: ../cat/virt-ls.pod:118
2123 " $ virt-ls -R -d guest /tmp\n"
2131 #: ../cat/virt-ls.pod:123
2133 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2134 "converts C<\\0> characters to C<\\n>."
2138 #: ../cat/virt-ls.pod:126
2139 msgid "RECURSIVE LONG LISTING"
2143 #: ../cat/virt-ls.pod:128
2145 "Using I<-lR> options together changes the output to display directories "
2146 "recursively, with file stats, and optionally other features such as "
2147 "checksums and extended attributes."
2151 #: ../cat/virt-ls.pod:132
2153 "Most of the interesting features of C<virt-ls> are only available when using "
2158 #: ../cat/virt-ls.pod:135
2160 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2161 "you cannot use the output in another program (because filenames can contain "
2162 "spaces and other unsafe characters). If the guest was untrusted and someone "
2163 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2164 "on you by creating filenames with embedded newline characters. To B<safely> "
2165 "parse the output in another program, use the I<--csv> (Comma-Separated "
2170 #: ../cat/virt-ls.pod:143
2172 "Note that this output format is completely unrelated to the C<ls -lR> "
2177 #: ../cat/virt-ls.pod:146
2180 " $ virt-ls -lR -d guest /bin\n"
2181 " d 0555 4096 /bin\n"
2182 " - 0755 123 /bin/alsaunmute\n"
2183 " - 0755 28328 /bin/arch\n"
2184 " l 0777 4 /bin/awk -> gawk\n"
2185 " - 0755 27216 /bin/basename\n"
2186 " - 0755 943360 /bin/bash\n"
2192 #: ../cat/virt-ls.pod:155
2193 msgid "These basic fields are always shown:"
2197 #: ../cat/virt-ls.pod:159
2202 #: ../cat/virt-ls.pod:161
2204 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2205 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2206 "link), C<s> (socket) or C<u> (unknown)."
2210 #: ../cat/virt-ls.pod:171
2215 #: ../cat/virt-ls.pod:173
2216 msgid "The Unix permissions, displayed as a 4 digit octal number."
2220 #: ../cat/virt-ls.pod:175
2225 #: ../cat/virt-ls.pod:177
2227 "The size of the file. This is shown in bytes unless I<-h> or "
2228 "I<--human-readable> option is given, in which case this is shown as a "
2229 "human-readable number."
2233 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4488
2238 #: ../cat/virt-ls.pod:183
2239 msgid "The full path of the file or directory."
2243 #: ../cat/virt-ls.pod:185
2248 #: ../cat/virt-ls.pod:187
2249 msgid "For symbolic links only, the link target."
2253 #: ../cat/virt-ls.pod:191
2255 "In I<-lR> mode, additional command line options enable the display of more "
2260 #: ../cat/virt-ls.pod:194
2262 "With the I<--uids> flag, these additional fields are displayed before the "
2267 #: ../cat/virt-ls.pod:199
2272 #: ../cat/virt-ls.pod:201
2277 #: ../cat/virt-ls.pod:203
2279 "The UID and GID of the owner of the file (displayed numerically). Note "
2280 "these only make sense in the context of a Unix-like guest."
2284 #: ../cat/virt-ls.pod:208
2285 msgid "With the I<--times> flag, these additional fields are displayed:"
2289 #: ../cat/virt-ls.pod:212
2294 #: ../cat/virt-ls.pod:214
2295 msgid "The time of last access."
2299 #: ../cat/virt-ls.pod:216
2304 #: ../cat/virt-ls.pod:218
2305 msgid "The time of last modification."
2309 #: ../cat/virt-ls.pod:220
2314 #: ../cat/virt-ls.pod:222
2315 msgid "The time of last status change."
2319 #: ../cat/virt-ls.pod:226
2321 "The time fields are displayed as string dates and times, unless one of the "
2322 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2326 #: ../cat/virt-ls.pod:229
2327 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2331 #: ../cat/virt-ls.pod:233
2336 #: ../cat/virt-ls.pod:235
2338 "The device containing the file (displayed as major:minor). This may not "
2339 "match devices as known to the guest."
2343 #: ../cat/virt-ls.pod:238
2348 #: ../cat/virt-ls.pod:240
2349 msgid "The inode number."
2353 #: ../cat/virt-ls.pod:242
2358 #: ../cat/virt-ls.pod:244
2359 msgid "The number of hard links."
2363 #: ../cat/virt-ls.pod:246
2368 #: ../cat/virt-ls.pod:248
2369 msgid "For block and char special files, the device (displayed as major:minor)."
2373 #: ../cat/virt-ls.pod:251
2378 #: ../cat/virt-ls.pod:253
2379 msgid "The number of 512 byte blocks allocated to the file."
2383 #: ../cat/virt-ls.pod:257
2385 "With the I<--checksum> flag, the checksum of the file contents is shown "
2386 "(only for regular files). Computing file checksums can take a considerable "
2391 #: ../cat/virt-ls.pod:280
2392 msgid "B<--checksum>"
2396 #: ../cat/virt-ls.pod:282
2397 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2401 #: ../cat/virt-ls.pod:284
2403 "Display checksum over file contents for regular files. With no argument, "
2404 "this defaults to using I<md5>. Using an argument, you can select the "
2405 "checksum type to use."
2409 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358 ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408 ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2411 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2416 #: ../cat/virt-ls.pod:316
2418 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2419 "so you cannot see what you are typing. If you are not worried about Tempest "
2420 "attacks and there is no one else in the room you can specify this flag to "
2421 "see what you are typing."
2425 #: ../cat/virt-ls.pod:321
2426 msgid "B<--extra-stats>"
2430 #: ../cat/virt-ls.pod:323
2431 msgid "Display extra stats."
2435 #: ../cat/virt-ls.pod:339
2438 " virt-ls --format=raw -a disk.img /dir\n"
2443 #: ../cat/virt-ls.pod:343
2446 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2451 #: ../cat/virt-ls.pod:356
2452 msgid "Display file sizes in human-readable format."
2456 #: ../cat/virt-ls.pod:370
2461 #: ../cat/virt-ls.pod:372
2462 msgid "B<--recursive>"
2466 #: ../cat/virt-ls.pod:374
2468 "Select the mode. With neither of these options, C<virt-ls> produces a "
2469 "simple, flat list of the files in the named directory. See L</SIMPLE "
2474 #: ../cat/virt-ls.pod:378
2476 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See "
2481 #: ../cat/virt-ls.pod:381
2483 "C<virt-ls -R> produces a recursive list of files starting at the named "
2484 "directory. See L</RECURSIVE LISTING>."
2488 #: ../cat/virt-ls.pod:384
2490 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2491 "parsed. See L</RECURSIVE LONG LISTING>."
2495 #: ../cat/virt-ls.pod:387
2500 #: ../cat/virt-ls.pod:389
2501 msgid "Display time fields."
2505 #: ../cat/virt-ls.pod:394
2506 msgid "B<--time-days>"
2510 #: ../cat/virt-ls.pod:396
2511 msgid "Display time fields as days before now (negative if in the future)."
2515 #: ../cat/virt-ls.pod:398
2517 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2518 "of the file is between 0 and 86399 seconds."
2522 #: ../cat/virt-ls.pod:404
2523 msgid "B<--time-relative>"
2527 #: ../cat/virt-ls.pod:406
2528 msgid "Display time fields as seconds before now (negative if in the future)."
2532 #: ../cat/virt-ls.pod:411
2537 #: ../cat/virt-ls.pod:413
2538 msgid "Display time fields as seconds since the Unix epoch."
2542 #: ../cat/virt-ls.pod:418
2547 #: ../cat/virt-ls.pod:420
2548 msgid "Display UID and GID fields."
2552 #: ../cat/virt-ls.pod:445
2553 msgid "Previous versions of virt-ls allowed you to write either:"
2557 #: ../cat/virt-ls.pod:447
2560 " virt-ls disk.img [disk.img ...] /dir\n"
2565 #: ../cat/virt-ls.pod:451
2568 " virt-ls guestname /dir\n"
2573 #: ../cat/virt-ls.pod:497
2575 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, "
2576 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
2577 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
2581 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:267 ../edit/virt-edit.pod:374 ../rescue/virt-rescue.pod:340
2582 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2586 #: ../clone/virt-sysprep.pod:5
2587 msgid "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2591 #: ../clone/virt-sysprep.pod:9
2594 " virt-sysprep [--options] -d domname\n"
2599 #: ../clone/virt-sysprep.pod:11
2602 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2607 #: ../clone/virt-sysprep.pod:15
2609 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2610 "can be made from it. Steps in this process include removing SSH host keys, "
2611 "removing persistent network MAC configuration, and removing user accounts. "
2612 "Each step can be enabled or disabled as required."
2616 #: ../clone/virt-sysprep.pod:21
2618 "Virt-sysprep is a simple shell script, allowing easy inspection or "
2619 "customization by the system administrator."
2623 #: ../clone/virt-sysprep.pod:24
2625 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
2626 "be shut down. If you want to preserve the existing contents of the guest, "
2627 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> "
2632 #: ../clone/virt-sysprep.pod:29
2634 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
2635 "recommend that you don't. The time you might want to run it as root is when "
2636 "you need root in order to access the disk image, but even in this case it "
2637 "would be better to change the permissions on the disk image to be writable "
2638 "as the non-root user running virt-sysprep."
2642 #: ../clone/virt-sysprep.pod:35
2644 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
2645 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
2646 "machines in preparation for cloning them. Having said that, virt-sysprep "
2647 "does I<not> currently work on Microsoft Windows guests. We plan to support "
2648 "Windows sysprepping in a future version, and we already have code to do it."
2652 #: ../clone/virt-sysprep.pod:76
2653 msgid "B<--enable=...>"
2657 #: ../clone/virt-sysprep.pod:78
2659 "Choose which sysprep operations to perform. Give a comma-separated list of "
2660 "operations, for example:"
2664 #: ../clone/virt-sysprep.pod:81
2667 " --enable=ssh-hostkeys,udev-persistent-net\n"
2672 #: ../clone/virt-sysprep.pod:83
2673 msgid "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
2677 #: ../clone/virt-sysprep.pod:85
2679 "If the I<--enable> option is not given, then we default to trying all "
2680 "possible sysprep operations. But some sysprep operations are skipped for "
2685 #: ../clone/virt-sysprep.pod:89
2687 "Use I<--list-operations> to list operations supported by a particular "
2688 "version of virt-sysprep."
2692 #: ../clone/virt-sysprep.pod:92
2693 msgid "See L</OPERATIONS> below for a list and an explanation of each operation."
2697 #: ../clone/virt-sysprep.pod:106
2700 " virt-sysprep --format=raw -a disk.img\n"
2705 #: ../clone/virt-sysprep.pod:110
2708 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
2713 #: ../clone/virt-sysprep.pod:119
2714 msgid "B<--hostname> newhostname"
2718 #: ../clone/virt-sysprep.pod:121
2720 "Change the hostname. See the L</hostname> operation below. If not given, "
2721 "defaults to C<localhost.localdomain>."
2725 #: ../clone/virt-sysprep.pod:124
2726 msgid "B<--list-operations>"
2730 #: ../clone/virt-sysprep.pod:126
2731 msgid "List the operations supported by the virt-sysprep program."
2735 #: ../clone/virt-sysprep.pod:128
2736 msgid "B<--selinux-relabel>"
2740 #: ../clone/virt-sysprep.pod:130
2741 msgid "B<--no-selinux-relabel>"
2745 #: ../clone/virt-sysprep.pod:132
2747 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
2748 "I<--no-selinux-relabel> disables relabelling."
2752 #: ../clone/virt-sysprep.pod:135
2754 "The default is to try to detect if SELinux relabelling is required. See "
2755 "L</SELINUX RELABELLING> below for more details."
2759 #: ../clone/virt-sysprep.pod:156
2764 #: ../clone/virt-sysprep.pod:158
2766 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
2767 "enabled>, although some are skipped depending on the type of guest."
2771 #: ../clone/virt-sysprep.pod:162
2773 "Operations can be individually enabled using the I<--enable> option. Use a "
2774 "comma-separated list, for example:"
2778 #: ../clone/virt-sysprep.pod:165
2781 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
2786 #: ../clone/virt-sysprep.pod:167
2788 "To list the operations supported by the current version of virt-sysprep, use "
2789 "I<--list-operations>."
2793 #: ../clone/virt-sysprep.pod:170
2795 "Future versions of virt-sysprep may add more operations. If you are using "
2796 "virt-sysprep and want predictable behaviour, specify only the operations "
2797 "that you want to have enabled."
2801 #: ../clone/virt-sysprep.pod:174
2806 #: ../clone/virt-sysprep.pod:176
2807 msgid "Remove user at-jobs and cron-jobs."
2811 #: ../clone/virt-sysprep.pod:178
2812 msgid "dhcp-client-state"
2816 #: ../clone/virt-sysprep.pod:180
2817 msgid "Remove DHCP client leases."
2821 #: ../clone/virt-sysprep.pod:182
2822 msgid "dhcp-server-state"
2826 #: ../clone/virt-sysprep.pod:184
2827 msgid "Remove DHCP server leases."
2831 #: ../clone/virt-sysprep.pod:186
2836 #: ../clone/virt-sysprep.pod:188
2838 "Changes the hostname of the guest to the value given in the I<--hostname> "
2843 #: ../clone/virt-sysprep.pod:191
2845 "If the I<--hostname> parameter is not given, then the hostname is changed to "
2846 "C<localhost.localdomain>."
2850 #: ../clone/virt-sysprep.pod:194
2855 #: ../clone/virt-sysprep.pod:196
2856 msgid "Remove many log files."
2860 #: ../clone/virt-sysprep.pod:198
2865 #: ../clone/virt-sysprep.pod:200
2866 msgid "Remove email from the local mail spool directory."
2870 #: ../clone/virt-sysprep.pod:202
2875 #: ../clone/virt-sysprep.pod:204
2877 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
2878 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
2882 #: ../clone/virt-sysprep.pod:207
2887 #: ../clone/virt-sysprep.pod:209
2889 "Write some random bytes from the host into the random seed file of the "
2894 #: ../clone/virt-sysprep.pod:212
2895 msgid "See L</RANDOM SEED> below."
2899 #: ../clone/virt-sysprep.pod:214
2900 msgid "rhn-systemid"
2904 #: ../clone/virt-sysprep.pod:216
2905 msgid "Remove the RHN system ID."
2909 #: ../clone/virt-sysprep.pod:218
2914 #: ../clone/virt-sysprep.pod:220
2915 msgid "Remove the Smolt hardware UUID."
2919 #: ../clone/virt-sysprep.pod:222
2920 msgid "ssh-hostkeys"
2924 #: ../clone/virt-sysprep.pod:224
2925 msgid "Remove the SSH host keys in the guest."
2929 #: ../clone/virt-sysprep.pod:226
2931 "The SSH host keys are regenerated (differently) next time the guest is "
2936 #: ../clone/virt-sysprep.pod:229
2938 "If, after cloning, the guest gets the same IP address, ssh will give you a "
2939 "stark warning about the host key changing:"
2943 #: ../clone/virt-sysprep.pod:232
2946 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2947 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
2948 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
2949 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
2954 #: ../clone/virt-sysprep.pod:237
2955 msgid "udev-persistent-net"
2959 #: ../clone/virt-sysprep.pod:239
2961 "Remove udev persistent net rules which map the guest's existing MAC address "
2962 "to a fixed ethernet device (eg. eth0)."
2966 #: ../clone/virt-sysprep.pod:242
2968 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
2969 "address occupies the old name (eg. eth0), this means the fresh MAC address "
2970 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
2971 "Erasing the udev persistent net rules avoids this."
2975 #: ../clone/virt-sysprep.pod:247
2980 #: ../clone/virt-sysprep.pod:249
2981 msgid "Remove the utmp file."
2985 #: ../clone/virt-sysprep.pod:251
2987 "This records who is currently logged in on a machine. In modern Linux "
2988 "distros it is stored in a ramdisk and hence not part of the virtual "
2989 "machine's disk, but it was stored on disk in older distros."
2993 #: ../clone/virt-sysprep.pod:255
2998 #: ../clone/virt-sysprep.pod:257
2999 msgid "Remove the yum UUID."
3003 #: ../clone/virt-sysprep.pod:259
3005 "Yum creates a fresh UUID the next time it runs when it notices that the "
3006 "original UUID has been erased."
3010 #: ../clone/virt-sysprep.pod:262
3011 msgid "COPYING AND CLONING"
3015 #: ../clone/virt-sysprep.pod:264
3017 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3018 "prepare a template from which guests can be cloned. There are many "
3019 "different ways to achieve this using the virt tools, and this section is "
3020 "just an introduction."
3024 #: ../clone/virt-sysprep.pod:269
3025 msgid "A virtual machine (when switched off) consists of two parts:"
3029 #: ../clone/virt-sysprep.pod:273
3030 msgid "I<configuration>"
3034 #: ../clone/virt-sysprep.pod:275
3036 "The configuration or description of the guest. eg. The libvirt XML (see "
3037 "C<virsh dumpxml>), the running configuration of the guest, or another "
3038 "external format like OVF."
3042 #: ../clone/virt-sysprep.pod:279
3043 msgid "Some configuration items that might need to be changed:"
3047 #: ../clone/virt-sysprep.pod:285
3052 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3057 #: ../clone/virt-sysprep.pod:293
3058 msgid "path to block device(s)"
3062 #: ../clone/virt-sysprep.pod:297
3063 msgid "network card MAC address"
3067 #: ../clone/virt-sysprep.pod:301
3068 msgid "I<block device(s)>"
3072 #: ../clone/virt-sysprep.pod:303
3074 "One or more hard disk images, themselves containing files, directories, "
3075 "applications, kernels, configuration, etc."
3079 #: ../clone/virt-sysprep.pod:306
3080 msgid "Some things inside the block devices that might need to be changed:"
3084 #: ../clone/virt-sysprep.pod:312
3085 msgid "hostname and other net configuration"
3089 #: ../clone/virt-sysprep.pod:320
3090 msgid "SSH host keys"
3094 #: ../clone/virt-sysprep.pod:324
3095 msgid "Windows unique security ID (SID)"
3099 #: ../clone/virt-sysprep.pod:328
3100 msgid "Puppet registration"
3104 #: ../clone/virt-sysprep.pod:334
3105 msgid "COPYING THE BLOCK DEVICE"
3109 #: ../clone/virt-sysprep.pod:336
3111 "Starting with an original guest, you probably wish to copy the guest block "
3112 "device and its configuration to make a template. Then once you are happy "
3113 "with the template, you will want to make many clones from it."
3117 #: ../clone/virt-sysprep.pod:341
3123 " original guest --------> template ---------->\n"
3124 " \\------> cloned\n"
3125 " \\-----> guests\n"
3131 #: ../clone/virt-sysprep.pod:349
3133 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3138 #: ../clone/virt-sysprep.pod:352
3142 " original guest --------> template ---------->\n"
3143 " \\------> cloned\n"
3144 " \\-----> guests\n"
3150 #: ../clone/virt-sysprep.pod:358
3151 msgid "There are some smarter (and faster) ways too:"
3155 #: ../clone/virt-sysprep.pod:364
3159 " template ---------->\n"
3160 " \\------> cloned\n"
3161 " \\-----> guests\n"
3167 #: ../clone/virt-sysprep.pod:370
3169 "Use the block device as a backing file and create a snapshot on top for each "
3170 "guest. The advantage is that you don't need to copy the block device (very "
3171 "fast) and only changes are stored (less storage required)."
3175 #: ../clone/virt-sysprep.pod:375
3177 "Note that writing to the backing file once you have created guests on top of "
3178 "it is not possible: you will corrupt the guests."
3182 #: ../clone/virt-sysprep.pod:378
3184 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 "
3185 "-o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3186 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3187 "also create cheap snapshots from files or LUNs."
3191 #: ../clone/virt-sysprep.pod:386
3192 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3196 #: ../clone/virt-sysprep.pod:390
3197 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3201 #: ../clone/virt-sysprep.pod:394
3206 #: ../clone/virt-sysprep.pod:396
3208 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3209 "and/or modify the external libvirt configuration of a guest. It will reset "
3210 "the name, UUID and MAC address of the guest in the libvirt XML."
3214 #: ../clone/virt-sysprep.pod:401
3216 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3217 "image. This was the original motivation to write virt-sysprep."
3221 #: ../clone/virt-sysprep.pod:404
3226 #: ../clone/virt-sysprep.pod:406
3230 " original guest --------> template\n"
3235 #: ../clone/virt-sysprep.pod:409
3237 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3238 "it easier to compress and/or faster to copy."
3242 #: ../clone/virt-sysprep.pod:412
3244 "Notice that since virt-sparsify also copies the image, you can use it to "
3245 "make the initial copy (instead of C<dd>)."
3249 #: ../clone/virt-sysprep.pod:415
3254 #: ../clone/virt-sysprep.pod:417
3258 " template ---------->\n"
3259 " \\------> cloned\n"
3260 " \\-----> guests\n"
3266 #: ../clone/virt-sysprep.pod:423
3268 "If you want to give people cloned guests, but let them pick the size of the "
3269 "guest themselves (eg. depending on how much they are prepared to pay for "
3270 "disk space), then instead of copying the template, you can run "
3271 "L<virt-resize(1)>. Virt-resize performs a copy and resize, and thus is "
3272 "ideal for cloning guests from a template."
3276 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3281 #: ../clone/virt-sysprep.pod:431
3283 "Although virt-sysprep removes some sensitive information from the guest, it "
3284 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3285 "above, and the implementation of the operations in the shell script. You "
3286 "should also examine the guest afterwards."
3290 #: ../clone/virt-sysprep.pod:436
3292 "Sensitive files are simply removed. The data they contained may still exist "
3293 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3294 "L<virt-sparsify(1)> as one way to remove this content. See also the "
3295 "L<scrub(1)> command to get rid of deleted content in directory entries and "
3300 #: ../clone/virt-sysprep.pod:442
3305 #: ../clone/virt-sysprep.pod:444
3306 msgid "I<(This section applies to Linux guests only)>"
3310 #: ../clone/virt-sysprep.pod:446
3312 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3313 "from the host into the guest's random seed file."
3317 #: ../clone/virt-sysprep.pod:449
3319 "If this is just done once and the guest is cloned from the same template, "
3320 "then each guest will start with the same entropy, and things like SSH host "
3321 "keys and TCP sequence numbers may be predictable."
3325 #: ../clone/virt-sysprep.pod:453
3327 "Therefore you should arrange to add more randomness I<after> cloning from a "
3328 "template too, which can be done by just enabling the C<random-seed> "
3333 #: ../clone/virt-sysprep.pod:457
3336 " cp template.img newguest.img\n"
3337 " virt-sysprep --enable=random-seed -a newguest.img\n"
3342 #: ../clone/virt-sysprep.pod:460
3343 msgid "SELINUX RELABELLING"
3347 #: ../clone/virt-sysprep.pod:462
3348 msgid "I<(This section applies to Linux guests using SELinux only)>"
3352 #: ../clone/virt-sysprep.pod:464
3354 "If any new files are created by virt-sysprep, then virt-sysprep touches "
3355 "C</.autorelabel> so that these will be correctly labelled by SELinux the "
3356 "next time the guest is booted. This process interrupts boot and can take "
3361 #: ../clone/virt-sysprep.pod:469
3363 "You can force relabelling for all guests by supplying the "
3364 "I<--selinux-relabel> option."
3368 #: ../clone/virt-sysprep.pod:472
3370 "You can disable relabelling entirely by supplying the "
3371 "I<--no-selinux-relabel> option."
3375 #: ../clone/virt-sysprep.pod:484
3376 msgid "This program returns 0 on success, or 1 if there was an error."
3380 #: ../clone/virt-sysprep.pod:488
3382 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, "
3383 "L<virt-resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, "
3384 "L<qemu-img(1)>, L<scrub(1)>, L<http://libguestfs.org/>, "
3385 "L<http://libvirt.org/>."
3389 #: ../df/virt-df.pod:5
3390 msgid "virt-df - Display free space on virtual filesystems"
3394 #: ../df/virt-df.pod:9
3397 " virt-df [--options]\n"
3402 #: ../df/virt-df.pod:11
3405 " virt-df [--options] -d domname\n"
3410 #: ../df/virt-df.pod:13
3413 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3418 #: ../df/virt-df.pod:17
3421 " virt-df [--options] domname\n"
3426 #: ../df/virt-df.pod:19
3429 " virt-df [--options] disk.img [disk.img ...]\n"
3434 #: ../df/virt-df.pod:23
3436 "C<virt-df> is a command line tool to display free space on virtual machine "
3437 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3438 "allocated to a virtual machine, but can look inside disk images to see how "
3439 "much space is really being used."
3443 #: ../df/virt-df.pod:28
3445 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3446 "to get a list of all active and inactive guests, and performs a C<df>-type "
3447 "operation on each one in turn, printing out the results."
3451 #: ../df/virt-df.pod:32
3453 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a "
3454 "C<df>-type operation on either the single named libvirt domain, or on the "
3455 "disk image(s) listed on the command line (which must all belong to a single "
3456 "VM). In this mode (with arguments), C<virt-df> will I<only work for a "
3457 "single guest>. If you want to run on multiple guests, then you have to "
3458 "invoke C<virt-df> multiple times."
3462 #: ../df/virt-df.pod:39
3464 "Use the I<--csv> option to get a format which can be easily parsed by other "
3465 "programs. Other options are similar to the standard L<df(1)> command."
3469 #: ../df/virt-df.pod:45
3471 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3472 "output human-readable:"
3476 #: ../df/virt-df.pod:48
3479 " # virt-df -d F14x64 -h\n"
3480 " Filesystem Size Used Available Use%\n"
3481 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3482 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3487 #: ../df/virt-df.pod:53
3488 msgid "Show disk usage for a disk image file called C<test.img>:"
3492 #: ../df/virt-df.pod:55
3495 " $ virt-df -a test1.img\n"
3496 " Filesystem 1K-blocks Used Available Use%\n"
3497 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3502 #: ../df/virt-df.pod:112
3505 " virt-df --format=raw -a disk.img\n"
3510 #: ../df/virt-df.pod:116
3513 " virt-df --format=raw -a disk.img --format -a another.img\n"
3518 #: ../df/virt-df.pod:129
3519 msgid "Print sizes in human-readable format."
3523 #: ../df/virt-df.pod:131
3524 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3528 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3533 #: ../df/virt-df.pod:135
3538 #: ../df/virt-df.pod:137
3539 msgid "Print inodes instead of blocks."
3543 #: ../df/virt-df.pod:139
3544 msgid "B<--one-per-guest>"
3548 #: ../df/virt-df.pod:141
3550 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3551 "disks from several guests to a single libguestfs appliance."
3555 #: ../df/virt-df.pod:144
3556 msgid "You might use this option in the following circumstances:"
3560 #: ../df/virt-df.pod:150
3562 "If you think an untrusted guest might actively try to exploit the libguestfs "
3563 "appliance kernel, then this prevents one guest from interfering with the "
3564 "stats printed for another guest."
3568 #: ../df/virt-df.pod:156
3570 "If the kernel has a bug which stops it from accessing a filesystem in one "
3571 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3572 "and report stats for further guests."
3576 #: ../df/virt-df.pod:165
3578 "Print UUIDs instead of names. This is useful for following a guest even "
3579 "when the guest is migrated or renamed, or when two guests happen to have the "
3584 #: ../df/virt-df.pod:169
3586 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3587 "images, we still print the disk image name even when this option is "
3592 #: ../df/virt-df.pod:191
3593 msgid "STATVFS NUMBERS"
3597 #: ../df/virt-df.pod:193
3599 "C<virt-df> (and L<df(1)>) get information by issuing a L<statvfs(3)> system "
3600 "call. You can get the same information directly, either from the host "
3601 "(using libguestfs) or inside the guest:"
3605 #: ../df/virt-df.pod:199
3606 msgid "From the host"
3610 #: ../df/virt-df.pod:201 ../df/virt-df.pod:209
3611 msgid "Run this command:"
3615 #: ../df/virt-df.pod:203
3618 " guestfish --ro -d GuestName -i statvfs /\n"
3623 #: ../df/virt-df.pod:205 ../df/virt-df.pod:213
3624 msgid "(change C</> to see stats for other filesystems)."
3628 #: ../df/virt-df.pod:207
3629 msgid "From inside the guest"
3633 #: ../df/virt-df.pod:211
3636 " python -c 'import os; s = os.statvfs (\"/\"); print s'\n"
3641 #: ../df/virt-df.pod:255
3643 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
3644 "L<http://libguestfs.org/>."
3648 #: ../edit/virt-edit.pod:5
3649 msgid "virt-edit - Edit a file in a virtual machine"
3653 #: ../edit/virt-edit.pod:9
3656 " virt-edit [--options] -d domname file [file ...]\n"
3661 #: ../edit/virt-edit.pod:11
3664 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
3669 #: ../edit/virt-edit.pod:13
3672 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
3677 #: ../edit/virt-edit.pod:17
3680 " virt-edit domname file\n"
3685 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
3688 " virt-edit disk.img [disk.img ...] file\n"
3693 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23 ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15 ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:21 ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
3698 #: ../edit/virt-edit.pod:23
3700 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
3701 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
3702 "doing this, but doesn't catch all cases."
3706 #: ../edit/virt-edit.pod:29
3708 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
3709 "exists in the named virtual machine (or disk image)."
3713 #: ../edit/virt-edit.pod:32
3715 "Multiple filenames can be given, in which case they are each edited in "
3716 "turn. Each filename must be a full path, starting at the root directory "
3717 "(starting with '/')."
3721 #: ../edit/virt-edit.pod:36
3722 msgid "If you want to just view a file, use L<virt-cat(1)>."
3726 #: ../edit/virt-edit.pod:38
3728 "For more complex cases you should look at the L<guestfish(1)> tool (see "
3729 "L</USING GUESTFISH> below)."
3733 #: ../edit/virt-edit.pod:41
3735 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
3736 "that and much more."
3740 #: ../edit/virt-edit.pod:46
3741 msgid "Edit the named files interactively:"
3745 #: ../edit/virt-edit.pod:48
3748 " virt-edit -d mydomain /boot/grub/grub.conf\n"
3753 #: ../edit/virt-edit.pod:50
3756 " virt-edit -d mydomain /etc/passwd\n"
3761 #: ../edit/virt-edit.pod:52
3762 msgid "For Windows guests, some Windows paths are understood:"
3766 #: ../edit/virt-edit.pod:54
3769 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
3774 #: ../edit/virt-edit.pod:56
3776 "If Perl is installed, you can also edit files non-interactively (see "
3777 "L</NON-INTERACTIVE EDITING> below). To change the init default level to 5:"
3781 #: ../edit/virt-edit.pod:60
3784 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
3789 #: ../edit/virt-edit.pod:81
3790 msgid "B<-b> extension"
3794 #: ../edit/virt-edit.pod:83
3795 msgid "B<--backup> extension"
3799 #: ../edit/virt-edit.pod:85
3801 "Create a backup of the original file I<in the guest disk image>. The backup "
3802 "has the original filename with C<extension> added."
3806 #: ../edit/virt-edit.pod:88
3808 "Usually the first character of C<extension> would be a dot C<.> so you would "
3813 #: ../edit/virt-edit.pod:91
3816 " virt-edit -b .orig [etc]\n"
3821 #: ../edit/virt-edit.pod:93
3822 msgid "By default, no backup file is made."
3826 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181 ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74 ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78 ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
3831 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183 ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76 ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80 ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
3832 msgid "B<--connect URI>"
3836 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84 ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134 ../tools/virt-win-reg.pl:135
3838 "If you specify guest block devices directly, then libvirt is not used at "
3843 #: ../edit/virt-edit.pod:114
3845 "When prompting for keys and passphrases, virt-edit normally turns echoing "
3846 "off so you cannot see what you are typing. If you are not worried about "
3847 "Tempest attacks and there is no one else in the room you can specify this "
3848 "flag to see what you are typing."
3852 #: ../edit/virt-edit.pod:119
3857 #: ../edit/virt-edit.pod:121
3858 msgid "B<--expr> EXPR"
3862 #: ../edit/virt-edit.pod:123
3864 "Instead of launching the external editor, non-interactively apply the Perl "
3865 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
3870 #: ../edit/virt-edit.pod:127
3872 "Be careful to properly quote the expression to prevent it from being altered "
3877 #: ../edit/virt-edit.pod:130
3878 msgid "Note that this option is only available when Perl 5 is installed."
3882 #: ../edit/virt-edit.pod:132
3883 msgid "B<--format> raw|qcow2|..."
3887 #: ../edit/virt-edit.pod:143
3890 " virt-edit --format=raw -a disk.img file\n"
3895 #: ../edit/virt-edit.pod:147
3898 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
3903 #: ../edit/virt-edit.pod:181
3904 msgid "Previous versions of virt-edit allowed you to write either:"
3908 #: ../edit/virt-edit.pod:187
3911 " virt-edit guestname file\n"
3916 #: ../edit/virt-edit.pod:195
3917 msgid "NON-INTERACTIVE EDITING"
3921 #: ../edit/virt-edit.pod:197
3923 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
3924 "administrator can interactively edit the file."
3928 #: ../edit/virt-edit.pod:200
3930 "There are two ways also to use C<virt-edit> from scripts in order to make "
3931 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
3932 "like this, it's less error-prone to write scripts directly using the "
3933 "libguestfs API and Augeas for configuration file editing.)"
3937 #: ../edit/virt-edit.pod:206
3939 "The first method is to temporarily set C<$EDITOR> to any script or program "
3940 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
3941 "update C<tmpfile> in place however it likes."
3945 #: ../edit/virt-edit.pod:210
3947 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
3948 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
3949 "instances of C<foo> with C<bar> in a file:"
3953 #: ../edit/virt-edit.pod:214
3956 " virt-edit -d domname filename -e 's/foo/bar/'\n"
3961 #: ../edit/virt-edit.pod:216
3963 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
3964 "For example to delete root's password you could do:"
3968 #: ../edit/virt-edit.pod:219
3971 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
3976 #: ../edit/virt-edit.pod:221
3978 "What really happens is that the snippet is evaluated as a Perl expression "
3979 "for each line of the file. The line, including the final C<\\n>, is passed "
3980 "in C<$_> and the expression should update C<$_> or leave it unchanged."
3984 #: ../edit/virt-edit.pod:226
3986 "To delete a line, set C<$_> to the empty string. For example, to delete the "
3987 "C<apache> user account from the password file you can do:"
3991 #: ../edit/virt-edit.pod:229
3994 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
3999 #: ../edit/virt-edit.pod:231
4001 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4002 "the end of the file is rather difficult this way since there is no concept "
4003 "of \"last line of the file\" - your expression just doesn't get called "
4004 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4009 #: ../edit/virt-edit.pod:237
4011 "The variable C<$lineno> contains the current line number. As is "
4012 "traditional, the first line in the file is number C<1>."
4016 #: ../edit/virt-edit.pod:240
4018 "The return value from the expression is ignored, but the expression may call "
4019 "C<die> in order to abort the whole program, leaving the original file "
4024 #: ../edit/virt-edit.pod:244
4026 "Remember when matching the end of a line that C<$_> may contain the final "
4027 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4028 "newline then neither of these. Thus to match or substitute some text at the "
4029 "end of a line, use this regular expression:"
4033 #: ../edit/virt-edit.pod:249
4036 " /some text(\\r?\\n)?$/\n"
4041 #: ../edit/virt-edit.pod:251
4043 "Alternately, use the perl C<chomp> function, being careful not to chomp "
4044 "C<$_> itself (since that would remove all newlines from the file):"
4048 #: ../edit/virt-edit.pod:255
4051 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4056 #: ../edit/virt-edit.pod:259
4058 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4059 "paths (eg. C<E:\\foo\\bar.txt>)."
4063 #: ../edit/virt-edit.pod:278
4065 "The path is resolved case insensitively to locate the file that should be "
4070 #: ../edit/virt-edit.pod:299
4072 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4073 "C<virt-edit> doesn't work."
4077 #: ../edit/virt-edit.pod:302
4078 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4082 #: ../edit/virt-edit.pod:304
4085 " guestfish --rw -i -d domname edit /file\n"
4090 #: ../edit/virt-edit.pod:306
4092 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4097 #: ../edit/virt-edit.pod:309
4099 "The command above uses libguestfs's guest inspection feature and so does not "
4100 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4101 "disk images that don't contain guests. To edit a file on a disk image "
4106 #: ../edit/virt-edit.pod:314
4109 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4114 #: ../edit/virt-edit.pod:316
4116 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4117 "the disk image to edit, and C</file> is the full path to the file."
4121 #: ../edit/virt-edit.pod:320
4123 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4124 "C<write> or C<upload> instead:"
4128 #: ../edit/virt-edit.pod:323
4131 " guestfish --rw -i -d domname touch /newfile\n"
4136 #: ../edit/virt-edit.pod:325
4139 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4144 #: ../edit/virt-edit.pod:327
4147 " guestfish --rw -i -d domname upload localfile /newfile\n"
4152 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119 ../rescue/virt-rescue.pod:298 ../sparsify/virt-sparsify.pod:250 ../src/guestfs.pod:3214 ../test-tool/libguestfs-test-tool.pod:95
4153 msgid "ENVIRONMENT VARIABLES"
4157 #: ../edit/virt-edit.pod:333
4162 #: ../edit/virt-edit.pod:335
4164 "If set, this string is used as the editor. It may contain arguments, "
4165 "eg. C<\"emacs -nw\">"
4169 #: ../edit/virt-edit.pod:338
4170 msgid "If not set, C<vi> is used."
4174 #: ../edit/virt-edit.pod:356
4176 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
4177 "L<virt-tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
4178 "L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4182 #: ../erlang/examples/guestfs-erlang.pod:5
4183 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4187 #: ../erlang/examples/guestfs-erlang.pod:9
4190 " {ok, G} = guestfs:create(),\n"
4191 " ok = guestfs:add_drive_opts(G, Disk,\n"
4192 " [{format, \"raw\"}, {readonly, true}]),\n"
4193 " ok = guestfs:launch(G),\n"
4194 " [Device] = guestfs:list_devices(G),\n"
4195 " ok = guestfs:close(G).\n"
4200 #: ../erlang/examples/guestfs-erlang.pod:18
4202 "This manual page documents how to call libguestfs from the Erlang "
4203 "programming language. This page just documents the differences from the C "
4204 "API and gives some examples. If you are not familiar with using libguestfs, "
4205 "you also need to read L<guestfs(3)>."
4209 #: ../erlang/examples/guestfs-erlang.pod:23
4210 msgid "OPENING AND CLOSING THE HANDLE"
4214 #: ../erlang/examples/guestfs-erlang.pod:25
4216 "The Erlang bindings are implemented using an external program called "
4217 "C<erl-guestfs>. This program must be on the current PATH, or else you "
4218 "should specify the full path to the program:"
4222 #: ../erlang/examples/guestfs-erlang.pod:29
4225 " {ok, G} = guestfs:create().\n"
4230 #: ../erlang/examples/guestfs-erlang.pod:31
4233 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4238 #: ../erlang/examples/guestfs-erlang.pod:33
4239 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4243 #: ../erlang/examples/guestfs-erlang.pod:36
4244 msgid "To close the handle:"
4248 #: ../erlang/examples/guestfs-erlang.pod:38
4251 " ok = guestfs:close(G).\n"
4256 #: ../erlang/examples/guestfs-erlang.pod:40
4257 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4261 #: ../erlang/examples/guestfs-erlang.pod:42
4263 "For functions that take optional arguments, the first arguments are the "
4264 "non-optional ones. The last argument is a list of tuples supplying the "
4265 "remaining optional arguments."
4269 #: ../erlang/examples/guestfs-erlang.pod:46
4272 " ok = guestfs:add_drive_opts(G, Disk,\n"
4273 " [{format, \"raw\"}, {readonly, true}]).\n"
4278 #: ../erlang/examples/guestfs-erlang.pod:49
4279 msgid "If the last argument would be an empty list, you can also omit it:"
4283 #: ../erlang/examples/guestfs-erlang.pod:51
4286 " ok = guestfs:add_drive_opts(G, Disk).\n"
4291 #: ../erlang/examples/guestfs-erlang.pod:53
4292 msgid "RETURN VALUES AND ERRORS"
4296 #: ../erlang/examples/guestfs-erlang.pod:55
4298 "On success, most functions return a C<Result> term (which could be a list, "
4299 "string, tuple etc.). If there is nothing for the function to return, then "
4300 "the atom C<ok> is returned."
4304 #: ../erlang/examples/guestfs-erlang.pod:59
4305 msgid "On error, you would see one of the following tuples:"
4309 #: ../erlang/examples/guestfs-erlang.pod:63
4310 msgid "C<{error, Msg, Errno}>"
4314 #: ../erlang/examples/guestfs-erlang.pod:65
4315 msgid "This indicates an ordinary error from the function."
4319 #: ../erlang/examples/guestfs-erlang.pod:67
4321 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4326 #: ../erlang/examples/guestfs-erlang.pod:70
4327 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4331 #: ../erlang/examples/guestfs-erlang.pod:72
4332 msgid "C<{unknown, Function}>"
4336 #: ../erlang/examples/guestfs-erlang.pod:74
4338 "This indicates that the function you called is not known. Generally this "
4339 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4340 "which you should not do."
4344 #: ../erlang/examples/guestfs-erlang.pod:78
4345 msgid "C<Function> is the name of the unknown function."
4349 #: ../erlang/examples/guestfs-erlang.pod:80
4350 msgid "C<{unknownarg, Arg}>"
4354 #: ../erlang/examples/guestfs-erlang.pod:82
4356 "This indicates that you called a function with optional arguments, with an "
4357 "unknown argument name."
4361 #: ../erlang/examples/guestfs-erlang.pod:85
4362 msgid "C<Arg> is the name of the unknown argument."
4366 #: ../erlang/examples/guestfs-erlang.pod:89 ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37 ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31 ../python/examples/guestfs-python.pod:34 ../ruby/examples/guestfs-ruby.pod:28
4367 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4371 #: ../erlang/examples/guestfs-erlang.pod:91 ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39 ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33 ../python/examples/guestfs-python.pod:36 ../ruby/examples/guestfs-ruby.pod:30
4376 #: ../erlang/examples/guestfs-erlang.pod:93 ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41 ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35 ../python/examples/guestfs-python.pod:38 ../ruby/examples/guestfs-ruby.pod:32
4377 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4381 #: ../erlang/examples/guestfs-erlang.pod:95 ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43 ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37 ../python/examples/guestfs-python.pod:40 ../ruby/examples/guestfs-ruby.pod:34
4386 #: ../erlang/examples/guestfs-erlang.pod:99
4388 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, "
4389 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
4390 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://www.erlang.org/>. "
4391 "L<http://libguestfs.org/>."
4395 #: ../erlang/examples/guestfs-erlang.pod:110 ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397 ../examples/guestfs-testing.pod:298 ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60 ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58 ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328 ../inspector/virt-inspector.pod:404 ../java/examples/guestfs-java.pod:58 ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52 ../python/examples/guestfs-python.pod:54 ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3354 ../test-tool/libguestfs-test-tool.pod:106
4400 #: ../erlang/examples/guestfs-erlang.pod:112 ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399 ../examples/guestfs-testing.pod:300 ../fish/guestfish.pod:1298 ../fish/virt-copy-in.pod:62 ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60 ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:330 ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93 ../perl/examples/guestfs-perl.pod:54 ../python/examples/guestfs-python.pod:56 ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3356 ../test-tool/libguestfs-test-tool.pod:108
4401 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4405 #: ../erlang/examples/guestfs-erlang.pod:116 ../examples/guestfs-testing.pod:304 ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4406 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4410 #: ../erlang/examples/guestfs-erlang.pod:118 ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405 ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99 ../perl/examples/guestfs-perl.pod:60 ../python/examples/guestfs-python.pod:62 ../ruby/examples/guestfs-ruby.pod:56
4412 "The examples in this manual page may be freely copied, modified and "
4413 "distributed without any restrictions."
4417 #: ../erlang/examples/guestfs-erlang.pod:121 ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408 ../examples/guestfs-testing.pod:306 ../java/examples/guestfs-java.pod:69 ../ocaml/examples/guestfs-ocaml.pod:102 ../perl/examples/guestfs-perl.pod:63 ../python/examples/guestfs-python.pod:65 ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3363
4419 "This library is free software; you can redistribute it and/or modify it "
4420 "under the terms of the GNU Lesser General Public License as published by the "
4421 "Free Software Foundation; either version 2 of the License, or (at your "
4422 "option) any later version."
4426 #: ../erlang/examples/guestfs-erlang.pod:126 ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413 ../examples/guestfs-testing.pod:311 ../java/examples/guestfs-java.pod:74 ../ocaml/examples/guestfs-ocaml.pod:107 ../perl/examples/guestfs-perl.pod:68 ../python/examples/guestfs-python.pod:70 ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3368
4428 "This library is distributed in the hope that it will be useful, but WITHOUT "
4429 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4430 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4435 #: ../erlang/examples/guestfs-erlang.pod:131 ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418 ../examples/guestfs-testing.pod:316 ../java/examples/guestfs-java.pod:79 ../ocaml/examples/guestfs-ocaml.pod:112 ../perl/examples/guestfs-perl.pod:73 ../python/examples/guestfs-python.pod:75 ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3373
4437 "You should have received a copy of the GNU Lesser General Public License "
4438 "along with this library; if not, write to the Free Software Foundation, "
4439 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4443 #: ../examples/guestfs-examples.pod:5
4444 msgid "guestfs-examples - Examples of using libguestfs from C"
4448 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4451 " #include <guestfs.h>\n"
4456 #: ../examples/guestfs-examples.pod:11
4459 " guestfs_h *g = guestfs_create ();\n"
4460 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4461 " guestfs_launch (g);\n"
4466 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4469 " cc prog.c -o prog -lguestfs\n"
4471 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4476 #: ../examples/guestfs-examples.pod:21
4478 "This manual page contains examples of calling libguestfs from the C "
4479 "programming language. If you are not familiar with using libguestfs, you "
4480 "also need to read L<guestfs(3)>."
4484 #: ../examples/guestfs-examples.pod:35
4486 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
4487 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
4488 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4492 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97 ../python/examples/guestfs-python.pod:60 ../ruby/examples/guestfs-ruby.pod:54
4493 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4497 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4502 #: ../examples/guestfs-recipes.pod:5
4504 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4505 "here. The only way which works for both sorts of output is to just write "
4506 "the URL directly. Do NOT use L<...> for URLs."
4510 #: ../examples/guestfs-recipes.pod:9
4512 "We break with tradition here and don't use ALL CAPS for the section "
4513 "headings, as this makes them much easier to read."
4517 #: ../examples/guestfs-recipes.pod:16
4518 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4522 #: ../examples/guestfs-recipes.pod:20
4524 "This page contains recipes for and links to things you can do using "
4525 "libguestfs, L<guestfish(1)> and the virt tools."
4529 #: ../examples/guestfs-recipes.pod:23
4530 msgid "Audit a virtual machine for setuid files"
4534 #: ../examples/guestfs-recipes.pod:25
4536 "The link below contains a small program which can be used to audit a Linux "
4537 "virtual machine to see what setuid and setgid files it contains."
4541 #: ../examples/guestfs-recipes.pod:28
4542 msgid "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-files/#content"
4546 #: ../examples/guestfs-recipes.pod:30
4547 msgid "Change the background image in a Windows XP VM"
4551 #: ../examples/guestfs-recipes.pod:32
4553 "The links below explain how to use L<guestfish(1)> to change the background "
4554 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
4555 "be substantially different for each version of Windows."
4559 #: ../examples/guestfs-recipes.pod:37
4561 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html "
4562 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4566 #: ../examples/guestfs-recipes.pod:40
4567 msgid "Cloning a virtual machine (Linux)"
4571 #: ../examples/guestfs-recipes.pod:42
4573 "The guestfish technique described in the link below works well for most "
4574 "Linux VMs. Depending on the Linux distro you may need to change the paths "
4579 #: ../examples/guestfs-recipes.pod:46
4580 msgid "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/#content"
4584 #: ../examples/guestfs-recipes.pod:48
4586 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
4591 #: ../examples/guestfs-recipes.pod:51
4592 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4596 #: ../examples/guestfs-recipes.pod:53
4597 msgid "Cloning a virtual machine (Windows)"
4601 #: ../examples/guestfs-recipes.pod:55
4603 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
4604 "straightforward. Currently there is code in the Aeolus Oz project which "
4605 "does this (using libguestfs). As part of our review of the virt-clone tool, "
4606 "we may add sysprepping ability."
4610 #: ../examples/guestfs-recipes.pod:60
4612 "https://github.com/clalancette/oz "
4613 "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4617 #: ../examples/guestfs-recipes.pod:63
4618 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
4622 #: ../examples/guestfs-recipes.pod:65
4623 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
4627 #: ../examples/guestfs-recipes.pod:67
4630 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
4635 #: ../examples/guestfs-recipes.pod:69
4636 msgid "To export just a subdirectory, eg. C</files>, do:"
4640 #: ../examples/guestfs-recipes.pod:71
4643 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
4648 #: ../examples/guestfs-recipes.pod:73
4649 msgid "Create empty disk images"
4653 #: ../examples/guestfs-recipes.pod:75
4655 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
4656 "The useful guide below explains the options available."
4660 #: ../examples/guestfs-recipes.pod:78
4661 msgid "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/#content"
4665 #: ../examples/guestfs-recipes.pod:80
4666 msgid "Dump raw filesystem content from inside a disk image or VM"
4670 #: ../examples/guestfs-recipes.pod:82
4672 "You can use the L<guestfish(1)> C<download> command to extract the raw "
4673 "filesystem content from any filesystem in a disk image or a VM (even one "
4674 "which is encrypted or buried inside an LV):"
4678 #: ../examples/guestfs-recipes.pod:86
4681 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
4686 #: ../examples/guestfs-recipes.pod:88
4689 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
4694 #: ../examples/guestfs-recipes.pod:90
4695 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
4699 #: ../examples/guestfs-recipes.pod:92
4700 msgid "Edit grub configuration in a VM"
4704 #: ../examples/guestfs-recipes.pod:94
4705 msgid "You can use this to:"
4709 #: ../examples/guestfs-recipes.pod:100
4710 msgid "Fix a virtual machine that does not boot."
4714 #: ../examples/guestfs-recipes.pod:104
4715 msgid "Change which kernel is used to boot the VM."
4719 #: ../examples/guestfs-recipes.pod:108
4720 msgid "Change kernel command line options."
4724 #: ../examples/guestfs-recipes.pod:112
4725 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
4729 #: ../examples/guestfs-recipes.pod:114
4732 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
4737 #: ../examples/guestfs-recipes.pod:116
4739 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
4744 #: ../examples/guestfs-recipes.pod:119
4747 " virt-rescue -d BrokenGuest\n"
4752 #: ../examples/guestfs-recipes.pod:121
4753 msgid "Export any directory from a VM"
4757 #: ../examples/guestfs-recipes.pod:123
4758 msgid "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
4762 #: ../examples/guestfs-recipes.pod:126 ../examples/guestfs-testing.pod:93
4765 " virt-copy-out -d Guest /home .\n"
4770 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1450 ../fish/guestfish-actions.pod:1715 ../fish/guestfish-actions.pod:2132 ../src/guestfs-actions.pod:18 ../src/guestfs-actions.pod:2334 ../src/guestfs-actions.pod:2758 ../src/guestfs-actions.pod:3317 ../src/guestfs.pod:1685 ../tools/virt-win-reg.pl:717
4775 #: ../examples/guestfs-recipes.pod:134
4777 "The final dot of the command is not a printing error. It means we want to "
4778 "copy out to the current directory."
4782 #: ../examples/guestfs-recipes.pod:139
4783 msgid "This creates a directory called C<home> under the current directory."
4787 #: ../examples/guestfs-recipes.pod:143
4789 "If the guest is a Windows guest then you can use drive letters and "
4790 "backslashes, but you must prefix the path with C<win:> and quote it to "
4791 "protect it from the shell, like this:"
4795 #: ../examples/guestfs-recipes.pod:147
4798 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
4803 #: ../examples/guestfs-recipes.pod:149
4804 msgid "To get the output as a compressed tarball, do:"
4808 #: ../examples/guestfs-recipes.pod:151
4811 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
4816 #: ../examples/guestfs-recipes.pod:153
4818 "Although it sounds tempting, this is usually not a reliable way to get a "
4819 "backup from a running guest. See the entry in the FAQ: "
4820 "http://libguestfs.org/FAQ.html#backup"
4824 #: ../examples/guestfs-recipes.pod:157
4825 msgid "Find out which user is using the most space"
4829 #: ../examples/guestfs-recipes.pod:159
4831 "This simple script examines a Linux guest to find out which user is using "
4832 "the most space in their home directory:"
4836 #: ../examples/guestfs-recipes.pod:162
4844 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
4852 #: ../examples/guestfs-recipes.pod:166
4861 #: ../examples/guestfs-recipes.pod:169
4864 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
4869 #: ../examples/guestfs-recipes.pod:171
4872 " for d in $(guestfish --remote ls \"$dir\"); do\n"
4873 " echo -n \"$dir/$d\"\n"
4875 " guestfish --remote du \"$dir/$d\";\n"
4876 " done | sort -nr -k 2\n"
4881 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
4884 " guestfish --remote exit\n"
4889 #: ../examples/guestfs-recipes.pod:179
4890 msgid "Get DHCP address from a VM"
4894 #: ../examples/guestfs-recipes.pod:181
4896 "The link below explains the many different possible techniques for getting "
4897 "the last assigned DHCP address of a virtual machine."
4901 #: ../examples/guestfs-recipes.pod:184
4902 msgid "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-a-virtual-machine-disk-image/#content"
4906 #: ../examples/guestfs-recipes.pod:186
4908 "In the libguestfs source examples directory you will find the latest version "
4909 "of the C<virt-dhcp-address.c> program."
4913 #: ../examples/guestfs-recipes.pod:189
4914 msgid "Get the operating system product name string"
4918 #: ../examples/guestfs-recipes.pod:191
4919 msgid "Save the following script into a file called C<product-name.sh>:"
4923 #: ../examples/guestfs-recipes.pod:193
4928 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
4929 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
4930 " guestfish --remote inspect-get-product-name \"$root\"\n"
4931 " guestfish --remote exit\n"
4936 #: ../examples/guestfs-recipes.pod:200
4937 msgid "Make the script executable and run it on a named guest:"
4941 #: ../examples/guestfs-recipes.pod:202
4944 " # product-name.sh RHEL60x64\n"
4945 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
4950 #: ../examples/guestfs-recipes.pod:205
4952 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
4953 "C<xpath> command line tool or from your favourite programming language:"
4957 #: ../examples/guestfs-recipes.pod:209
4960 " # virt-inspector RHEL60x64 > xml\n"
4961 " # xpath '//product_name' < xml\n"
4964 " <product_name>Red Hat Enterprise Linux Server release 6.0 "
4965 "(Santiago)</product_name>\n"
4970 #: ../examples/guestfs-recipes.pod:215
4971 msgid "Get the default boot kernel for a Linux VM"
4975 #: ../examples/guestfs-recipes.pod:217
4977 "The link below contains a program to print the default boot kernel for a "
4982 #: ../examples/guestfs-recipes.pod:220
4983 msgid "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-kernel-for-a-vm/#content"
4987 #: ../examples/guestfs-recipes.pod:222
4989 "It uses Augeas, and the technique is generally applicable for many different "
4994 #: ../examples/guestfs-recipes.pod:229
4995 msgid "listing the user accounts in the guest"
4999 #: ../examples/guestfs-recipes.pod:233
5000 msgid "what repositories is it configured to use"
5004 #: ../examples/guestfs-recipes.pod:237
5005 msgid "what NTP servers does it connect to"
5009 #: ../examples/guestfs-recipes.pod:241
5010 msgid "what were the boot messages last time it booted"
5014 #: ../examples/guestfs-recipes.pod:245
5015 msgid "listing who was logged in recently"
5019 #: ../examples/guestfs-recipes.pod:249
5020 msgid "http://augeas.net/"
5024 #: ../examples/guestfs-recipes.pod:251
5025 msgid "Install RPMs in a guest"
5029 #: ../examples/guestfs-recipes.pod:253
5031 "The link below contains a method to install RPMs in a guest. In fact the "
5032 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
5033 "installs them next time the guest is booted. You could use this technique "
5034 "to install vital security updates in an offline guest."
5038 #: ../examples/guestfs-recipes.pod:259
5039 msgid "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
5043 #: ../examples/guestfs-recipes.pod:261
5044 msgid "List applications installed in a VM"
5048 #: ../examples/guestfs-recipes.pod:263
5049 msgid "Save the following to a file C<list-apps.sh>:"
5053 #: ../examples/guestfs-recipes.pod:265
5058 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5059 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5060 " guestfish --remote inspect-list-applications \"$root\"\n"
5061 " guestfish --remote exit\n"
5066 #: ../examples/guestfs-recipes.pod:272
5068 "Make the file executable and then you can run it on any named virtual "
5073 #: ../examples/guestfs-recipes.pod:275
5076 " # list-apps.sh WinGuest\n"
5078 " app_name: Mozilla Firefox (3.6.12)\n"
5079 " app_display_name: Mozilla Firefox (3.6.12)\n"
5081 " app_version: 3.6.12 (en-GB)\n"
5083 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5084 " app_trans_path:\n"
5085 " app_publisher: Mozilla\n"
5086 " app_url: http://www.mozilla.com/en-GB/\n"
5087 " app_source_package:\n"
5089 " app_description: Mozilla Firefox\n"
5092 " app_name: VLC media player\n"
5093 " app_display_name: VLC media player 1.1.5\n"
5095 " app_version: 1.1.5\n"
5097 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5098 " app_trans_path:\n"
5099 " app_publisher: VideoLAN\n"
5100 " app_url: http://www.videolan.org/\n"
5101 " app_source_package:\n"
5103 " app_description:\n"
5109 #: ../examples/guestfs-recipes.pod:305
5111 "If you want to run the script on disk images (instead of libvirt virtual "
5112 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also "
5113 "L<virt-inspector(1)>."
5117 #: ../examples/guestfs-recipes.pod:309
5118 msgid "List files and directories in a VM"
5122 #: ../examples/guestfs-recipes.pod:311
5123 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5127 #: ../examples/guestfs-recipes.pod:313
5130 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5135 #: ../examples/guestfs-recipes.pod:315
5136 msgid "List services in a Windows VM"
5140 #: ../examples/guestfs-recipes.pod:317
5142 "The link below contains a script that can be used to list out the services "
5143 "from a Windows VM, and whether those services run at boot time or are loaded "
5148 #: ../examples/guestfs-recipes.pod:321
5149 msgid "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/#content"
5153 #: ../examples/guestfs-recipes.pod:323
5154 msgid "Make a disk image sparse"
5158 #: ../examples/guestfs-recipes.pod:325
5160 "The link below contains some guides for making a disk image sparse (or "
5161 "reintroducing sparseness)."
5165 #: ../examples/guestfs-recipes.pod:328
5166 msgid "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
5170 #: ../examples/guestfs-recipes.pod:330
5171 msgid "Monitor disk usage over time"
5175 #: ../examples/guestfs-recipes.pod:332
5177 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5178 "The link below contains a guide."
5182 #: ../examples/guestfs-recipes.pod:335
5183 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5187 #: ../examples/guestfs-recipes.pod:337
5188 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5192 #: ../examples/guestfs-recipes.pod:339
5194 "L<guestfish(1)> plus the tools described in the link below can be used to "
5195 "read out the Windows Event Log from any virtual machine running Windows "
5196 "Vista or a later version."
5200 #: ../examples/guestfs-recipes.pod:343
5201 msgid "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-guestfish/#content"
5205 #: ../examples/guestfs-recipes.pod:345
5206 msgid "Remove root password (Linux)"
5210 #: ../examples/guestfs-recipes.pod:347
5212 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5213 "files. One use is to remove the root password from a Linux guest:"
5217 #: ../examples/guestfs-recipes.pod:350
5220 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5225 #: ../examples/guestfs-recipes.pod:352
5226 msgid "Remove Administrator password (Windows)"
5230 #: ../examples/guestfs-recipes.pod:354
5232 "The link below contains one technique for removing the Administrator "
5233 "password from a Windows VM, or to be more precise, it gives you a command "
5234 "prompt the next time you log in which you can use to bypass any security:"
5238 #: ../examples/guestfs-recipes.pod:359
5239 msgid "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-administrator-password-with-guestfish/"
5243 #: ../examples/guestfs-recipes.pod:361
5244 msgid "Unpack a live CD"
5248 #: ../examples/guestfs-recipes.pod:363
5250 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5251 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5252 "layers, as outlined in the guide below."
5256 #: ../examples/guestfs-recipes.pod:367
5257 msgid "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-cd/#content"
5261 #: ../examples/guestfs-recipes.pod:369
5262 msgid "Uploading and downloading files"
5266 #: ../examples/guestfs-recipes.pod:371
5268 "The link below contains general tips on uploading (copying in) and "
5269 "downloading (copying out) files from VMs."
5273 #: ../examples/guestfs-recipes.pod:374
5274 msgid "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5278 #: ../examples/guestfs-recipes.pod:376
5279 msgid "Use libguestfs tools on VMware ESX guests"
5283 #: ../examples/guestfs-recipes.pod:378
5285 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5286 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5290 #: ../examples/guestfs-recipes.pod:382
5291 msgid "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-guests/#content"
5295 #: ../examples/guestfs-recipes.pod:386
5297 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, "
5298 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
5299 "L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
5300 "L<http://libguestfs.org/>."
5304 #: ../examples/guestfs-recipes.pod:403
5305 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5309 #: ../examples/guestfs-testing.pod:5
5310 msgid "guestfs-testing - manual testing of libguestfs, you can help!"
5314 #: ../examples/guestfs-testing.pod:9
5316 "This page has manual tests you can try on libguestfs. Everyone has a "
5317 "slightly different combination of platform, hardware and guests, so this "
5318 "testing is very valuable. Thanks for helping out!"
5322 #: ../examples/guestfs-testing.pod:13
5323 msgid "These tests require libguestfs E<ge> 1.14."
5327 #: ../examples/guestfs-testing.pod:15
5329 "Tests marked with a B<*> (asterisk) can B<destroy data> if you're not "
5330 "careful. The others are safe and won't modify anything."
5334 #: ../examples/guestfs-testing.pod:18
5335 msgid "You can report bugs you find through this link:"
5339 #: ../examples/guestfs-testing.pod:20
5340 msgid "https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools"
5344 #: ../examples/guestfs-testing.pod:22
5346 "or post on the mailing list (registration is B<not> required, but if you're "
5347 "not registered then you'll have to wait for a moderator to manually approve "
5352 #: ../examples/guestfs-testing.pod:26
5353 msgid "https://www.redhat.com/mailman/listinfo/libguestfs"
5357 #: ../examples/guestfs-testing.pod:28
5362 #: ../examples/guestfs-testing.pod:30
5363 msgid "Check KVM acceleration is being used."
5367 #: ../examples/guestfs-testing.pod:32
5369 "If your host has hardware virt acceleration, then with a hot cache "
5370 "libguestfs should be able to start up in a few seconds. Run the following "
5371 "command a few times:"
5375 #: ../examples/guestfs-testing.pod:36
5378 " time guestfish -a /dev/null run\n"
5383 #: ../examples/guestfs-testing.pod:38
5385 "After a few runs, the time should settle down to a few seconds (under 5 "
5386 "seconds on fast 64 bit hardware)."
5390 #: ../examples/guestfs-testing.pod:41
5391 msgid "How to check for hardware virt:"
5395 #: ../examples/guestfs-testing.pod:43
5396 msgid "http://virt-tools.org/learning/check-hardware-virt/"
5400 #: ../examples/guestfs-testing.pod:45
5401 msgid "If the command above does not work at all, use L<libguestfs-test-tool(1)>."
5405 #: ../examples/guestfs-testing.pod:48
5406 msgid "Run virt-alignment-scan on all your guests."
5410 #: ../examples/guestfs-testing.pod:50
5411 msgid "Run L<virt-alignment-scan(1)> on guests or disk images:"
5415 #: ../examples/guestfs-testing.pod:52
5418 " virt-alignment-scan -a /path/to/disk.img\n"
5423 #: ../examples/guestfs-testing.pod:54 ../examples/guestfs-testing.pod:161 ../examples/guestfs-testing.pod:174 ../examples/guestfs-testing.pod:234 ../src/guestfs.pod:2792
5428 #: ../examples/guestfs-testing.pod:56
5431 " virt-alignment-scan -d Guest\n"
5436 #: ../examples/guestfs-testing.pod:58
5437 msgid "Does the alignment report match how the guest partitions are aligned?"
5441 #: ../examples/guestfs-testing.pod:60
5442 msgid "Run virt-cat on some files in guests."
5446 #: ../examples/guestfs-testing.pod:62
5447 msgid "L<virt-cat(1)> can display files from guests. For a Linux guest, try:"
5451 #: ../examples/guestfs-testing.pod:64
5454 " virt-cat LinuxGuest /etc/passwd\n"
5459 #: ../examples/guestfs-testing.pod:66
5460 msgid "A recent feature is support for Windows paths, for example:"
5464 #: ../examples/guestfs-testing.pod:68
5467 " virt-cat WindowsGuest 'c:\\windows\\win.ini'\n"
5472 #: ../examples/guestfs-testing.pod:70
5474 "An even better test is if you have a Windows guest with multiple drives. Do "
5475 "C<D:>, C<E:> etc paths work correctly?"
5479 #: ../examples/guestfs-testing.pod:73
5480 msgid "B<*> Copy some files into a B<shut off> guest."
5484 #: ../examples/guestfs-testing.pod:75
5486 "L<virt-copy-in(1)> can recursively copy files and directories into a guest "
5491 #: ../examples/guestfs-testing.pod:78
5494 " virt-copy-in -d Guest /etc /tmp\n"
5499 #: ../examples/guestfs-testing.pod:80
5501 "This should copy local directory C</etc> to C</tmp/etc> in the guest "
5502 "(recursively). If you boot the guest, can you see all of the copied files "
5507 #: ../examples/guestfs-testing.pod:84
5508 msgid "Shut the guest down and try copying multiple files and directories:"
5512 #: ../examples/guestfs-testing.pod:86
5515 " virt-copy-in -d Guest /home /etc/issue /tmp\n"
5520 #: ../examples/guestfs-testing.pod:88
5521 msgid "Copy some files out of a guest."
5525 #: ../examples/guestfs-testing.pod:90
5527 "L<virt-copy-out(1)> can recursively copy files and directories out of a "
5528 "guest or disk image."
5532 #: ../examples/guestfs-testing.pod:95
5533 msgid "Note the final space and period in the command is not a typo."
5537 #: ../examples/guestfs-testing.pod:97
5538 msgid "This should copy C</home> from the guest into the current directory."
5542 #: ../examples/guestfs-testing.pod:99
5543 msgid "Run virt-df."
5547 #: ../examples/guestfs-testing.pod:101
5548 msgid "L<virt-df(1)> lists disk space. Run:"
5552 #: ../examples/guestfs-testing.pod:103
5560 #: ../examples/guestfs-testing.pod:105
5562 "You can try comparing this to the results from L<df(1)> inside the guest, "
5563 "but there are some provisos:"
5567 #: ../examples/guestfs-testing.pod:112
5568 msgid "The guest must be idle."
5572 #: ../examples/guestfs-testing.pod:116
5573 msgid "The guest disks must be synched using L<sync(1)>."
5577 #: ../examples/guestfs-testing.pod:120
5579 "Any action such as booting the guest will write log files causing the "
5580 "numbers to change."
5584 #: ../examples/guestfs-testing.pod:125
5586 "We don't guarantee that the numbers will be identical even under these "
5587 "circumstances. They should be similar. It would indicate a bug if you saw "
5588 "greatly differing numbers."
5592 #: ../examples/guestfs-testing.pod:129
5593 msgid "Try importing virt-df CSV output into a spreadsheet or database."
5597 #: ../examples/guestfs-testing.pod:131 ../src/guestfs.pod:3088
5602 #: ../examples/guestfs-testing.pod:133
5605 " virt-df --csv > /tmp/report.csv\n"
5610 #: ../examples/guestfs-testing.pod:135
5612 "Now try to load this into your favorite spreadsheet or database. Are the "
5613 "results reproduced faithfully in the spreadsheet/database?"
5617 #: ../examples/guestfs-testing.pod:138
5619 "http://www.postgresql.org/docs/8.1/static/sql-copy.html "
5620 "http://dev.mysql.com/doc/refman/5.1/en/load-data.html"
5624 #: ../examples/guestfs-testing.pod:141
5625 msgid "B<*> Edit a file in a B<shut off> guest."
5629 #: ../examples/guestfs-testing.pod:143
5631 "L<virt-edit(1)> can edit files in guests. Try this command on a RHEL or "
5636 #: ../examples/guestfs-testing.pod:146
5639 " virt-edit LinuxGuest /etc/sysconfig/network\n"
5644 #: ../examples/guestfs-testing.pod:148
5645 msgid "On other Linux guests try editing other files such as:"
5649 #: ../examples/guestfs-testing.pod:150
5652 " virt-edit LinuxGuest /etc/motd\n"
5657 #: ../examples/guestfs-testing.pod:152
5658 msgid "Are the changes seen inside the guest when it is booted?"
5662 #: ../examples/guestfs-testing.pod:154
5663 msgid "Display the filesystems / partitions / LVs in a guest."
5667 #: ../examples/guestfs-testing.pod:156
5669 "L<virt-filesystems(1)> can be used to display filesystems in a guest. Try "
5670 "this command on any disk image or guest:"
5674 #: ../examples/guestfs-testing.pod:159
5677 " virt-filesystems -a /path/to/disk.img --all --long -h\n"
5682 #: ../examples/guestfs-testing.pod:163
5685 " virt-filesystems -d Guest --all --long -h\n"
5690 #: ../examples/guestfs-testing.pod:165
5691 msgid "Do the results match what is seen in the guest?"
5695 #: ../examples/guestfs-testing.pod:167
5696 msgid "Run virt-inspector on all your guests."
5700 #: ../examples/guestfs-testing.pod:169
5702 "Use L<virt-inspector(1)> to get a report on all of your guests or disk "
5707 #: ../examples/guestfs-testing.pod:172
5710 " virt-inspector -a /path/to/disk.img | less\n"
5715 #: ../examples/guestfs-testing.pod:176
5718 " virt-inspector -d Guest | less\n"
5723 #: ../examples/guestfs-testing.pod:178
5724 msgid "Do the results match what is actually in the guest?"
5728 #: ../examples/guestfs-testing.pod:180
5729 msgid "Try the auditing features of virt-ls on all your guests."
5733 #: ../examples/guestfs-testing.pod:184
5736 " virt-ls -lR -d Guest / | grep '^- [42]'\n"
5741 #: ../examples/guestfs-testing.pod:188
5744 " virt-ls -lR -d Guest / | grep '^d ...7'\n"
5749 #: ../examples/guestfs-testing.pod:192
5752 " virt-ls -lR -d Guest / | grep '^s'\n"
5757 #: ../examples/guestfs-testing.pod:196
5760 " virt-ls -lR -d Guest / | grep -i '^-.*\\.png$'\n"
5765 #: ../examples/guestfs-testing.pod:198
5766 msgid "Display files larger than 10MB in home directories:"
5770 #: ../examples/guestfs-testing.pod:200
5773 " virt-ls -lR -d Guest /home | awk '$3 > 10*1024*1024'\n"
5778 #: ../examples/guestfs-testing.pod:204
5781 " virt-ls -lR -d Guest --time-days / | awk '$6 <= 7'\n"
5786 #: ../examples/guestfs-testing.pod:208
5789 " virt-ls -lR -d Guest --time-days / | grep '^-' | awk '$6 < 1'\n"
5794 #: ../examples/guestfs-testing.pod:210
5795 msgid "Do the results match what is in the guest?"
5799 #: ../examples/guestfs-testing.pod:212
5800 msgid "Create a disk image from a tarball."
5804 #: ../examples/guestfs-testing.pod:214
5806 "Use L<virt-make-fs(1)> to create a disk image from any tarball that you "
5811 #: ../examples/guestfs-testing.pod:217
5814 " virt-make-fs --partition=mbr --type=vfat /any/tarball.tar.gz output.img\n"
5819 #: ../examples/guestfs-testing.pod:219
5821 "Add 'output.img' as a raw disk to an existing guest. Check the guest can "
5822 "see the files. This test is particularly useful if you try it with a "
5827 #: ../examples/guestfs-testing.pod:223
5828 msgid "Try other partitioning schemes, eg. I<--partition=gpt>."
5832 #: ../examples/guestfs-testing.pod:225
5833 msgid "Try other filesystem formats, eg. I<--type=ntfs>, I<--type=ext2>."
5837 #: ../examples/guestfs-testing.pod:227
5838 msgid "B<*> Run virt-rescue on a B<shut off> disk image or guest."
5842 #: ../examples/guestfs-testing.pod:229
5844 "Use L<virt-rescue(1)> to examine, rescue or repair a B<shut off> guest or "
5849 #: ../examples/guestfs-testing.pod:232
5852 " virt-rescue -a /path/to/disk.img\n"
5857 #: ../examples/guestfs-testing.pod:236
5860 " virt-rescue -d Guest\n"
5865 #: ../examples/guestfs-testing.pod:238
5866 msgid "Can you use ordinary shell commands to examine the guest?"
5870 #: ../examples/guestfs-testing.pod:240
5871 msgid "B<*> Resize your guests."
5875 #: ../examples/guestfs-testing.pod:242
5877 "Use L<virt-resize(1)> to give a guest some more disk space. For example, if "
5878 "you have a disk image that is smaller than 30G, increase it to 30G by doing:"
5882 #: ../examples/guestfs-testing.pod:246
5885 " truncate -s 30G newdisk.img\n"
5886 " virt-filesystems -a /path/to/olddisk.img --all --long -h\n"
5887 " virt-resize /path/to/olddisk.img newdisk.img --expand /dev/sda1\n"
5888 " qemu-kvm -m 1024 -hda newdisk.img\n"
5893 #: ../examples/guestfs-testing.pod:251
5894 msgid "Does the guest still boot? Try expanding other partitions."
5898 #: ../examples/guestfs-testing.pod:253
5899 msgid "B<*> Sparsify a guest disk."
5903 #: ../examples/guestfs-testing.pod:255
5904 msgid "Using L<virt-sparsify(1)>, make a disk image more sparse:"
5908 #: ../examples/guestfs-testing.pod:257
5911 " virt-sparsify /path/to/olddisk.img newdisk.img\n"
5916 #: ../examples/guestfs-testing.pod:259
5918 "Is C<newdisk.img> still bootable after sparsifying? Is the resulting disk "
5919 "image smaller (use C<du> to check)?"
5923 #: ../examples/guestfs-testing.pod:262
5924 msgid "B<*> \"sysprep\" a B<shut off> Linux guest."
5928 #: ../examples/guestfs-testing.pod:264
5930 "Note that this really will mess up an existing guest, so it's better to "
5931 "clone the guest before trying this."
5935 #: ../examples/guestfs-testing.pod:267
5938 " virt-sysprep --hostname newhost.example.com -a /path/to/disk.img\n"
5943 #: ../examples/guestfs-testing.pod:269
5945 "Was the sysprep successful? After booting, what changes were made and were "
5950 #: ../examples/guestfs-testing.pod:272
5951 msgid "Dump the Windows Registry from your Windows guests."
5955 #: ../examples/guestfs-testing.pod:274
5957 "Use L<virt-win-reg(1)> to dump out the Windows Registry from any Windows "
5958 "guests that you have."
5962 #: ../examples/guestfs-testing.pod:277
5965 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\Software' |\n"
5971 #: ../examples/guestfs-testing.pod:280
5974 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\System' |\n"
5980 #: ../examples/guestfs-testing.pod:283
5981 msgid "Does the output match running C<regedit> inside the guest?"
5985 #: ../examples/guestfs-testing.pod:285
5987 "A recent feature is the ability to dump user registries, so try this, "
5988 "replacing I<username> with the name of a local user in the guest:"
5992 #: ../examples/guestfs-testing.pod:288
5995 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKEY_USERS\\username' "
6002 #: ../examples/guestfs-testing.pod:293
6004 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, "
6005 "L<http://libguestfs.org/>."
6009 #: ../fish/guestfish-actions.pod:1
6014 #: ../fish/guestfish-actions.pod:3
6017 " add-cdrom filename\n"
6022 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
6023 msgid "This function adds a virtual CD-ROM disk image to the guest."
6027 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
6028 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
6032 #: ../fish/guestfish-actions.pod:15
6034 "This call checks for the existence of C<filename>. This stops you from "
6035 "specifying other types of drive which are supported by qemu such as C<nbd:> "
6036 "and C<http:> URLs. To specify those, use the general L</config> call "
6041 #: ../fish/guestfish-actions.pod:22
6043 "If you just want to add an ISO file (often you use this as an efficient way "
6044 "to transfer large files into the guest), then you should probably use "
6045 "L</add-drive-ro> instead."
6049 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214 ../fish/guestfish-actions.pod:228
6051 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
6056 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:217 ../fish/guestfish-actions.pod:231 ../fish/guestfish-actions.pod:941 ../fish/guestfish-actions.pod:976 ../fish/guestfish-actions.pod:1149 ../fish/guestfish-actions.pod:1509 ../fish/guestfish-actions.pod:1523 ../fish/guestfish-actions.pod:3392 ../fish/guestfish-actions.pod:3703 ../fish/guestfish-actions.pod:3751 ../fish/guestfish-actions.pod:4669 ../fish/guestfish-actions.pod:4689 ../fish/guestfish-actions.pod:4708 ../fish/guestfish-actions.pod:4746 ../fish/guestfish-actions.pod:5474 ../fish/guestfish-actions.pod:5577 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326 ../src/guestfs-actions.pod:1580 ../src/guestfs-actions.pod:1637 ../src/guestfs-actions.pod:1920 ../src/guestfs-actions.pod:2419 ../src/guestfs-actions.pod:2440 ../src/guestfs-actions.pod:5242 ../src/guestfs-actions.pod:5764 ../src/guestfs-actions.pod:5864 ../src/guestfs-actions.pod:7160 ../src/guestfs-actions.pod:7201 ../src/guestfs-actions.pod:7232 ../src/guestfs-actions.pod:7292 ../src/guestfs-actions.pod:8346 ../src/guestfs-actions.pod:8455 ../src/guestfs-actions.pod:8635
6058 "Deprecated functions will not be removed from the API, but the fact that "
6059 "they are deprecated indicates that there are problems with correct use of "
6064 #: ../fish/guestfish-actions.pod:35
6069 #: ../fish/guestfish-actions.pod:37
6074 #: ../fish/guestfish-actions.pod:39
6077 " add-domain dom [libvirturi:..] [readonly:true|false] [iface:..] "
6078 "[live:true|false] [allowuuid:true|false] [readonlydisk:..]\n"
6083 #: ../fish/guestfish-actions.pod:41
6085 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6086 "It works by connecting to libvirt, requesting the domain and domain XML from "
6087 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
6091 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
6093 "The number of disks added is returned. This operation is atomic: if an "
6094 "error is returned, then no disks are added."
6098 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
6100 "This function does some minimal checks to make sure the libvirt domain is "
6101 "not running (unless C<readonly> is true). In a future version we will try "
6102 "to acquire the libvirt lock on each disk."
6106 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
6108 "Disks must be accessible locally. This often means that adding disks from a "
6109 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6110 "unless those disks are accessible via the same device path locally too."
6114 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
6116 "The optional C<libvirturi> parameter sets the libvirt URI (see "
6117 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
6118 "default libvirt URI (or one set through an environment variable, see the "
6119 "libvirt documentation for full details)."
6123 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
6125 "The optional C<live> flag controls whether this call will try to connect to "
6126 "a running virtual machine C<guestfsd> process if it sees a suitable "
6127 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6128 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6129 "DAEMONS> for more information."
6133 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
6135 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6136 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6137 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6142 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
6144 "The optional C<readonlydisk> parameter controls what we do for disks which "
6145 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
6149 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
6150 msgid "readonlydisk = \"error\""
6154 #: ../fish/guestfish-actions.pod:84 ../fish/guestfish-actions.pod:95 ../fish/guestfish-actions.pod:106 ../src/guestfs-actions.pod:103 ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:125
6155 msgid "If C<readonly> is false:"
6159 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
6161 "The whole call is aborted with an error if any disk with the "
6162 "E<lt>readonly/E<gt> flag is found."
6166 #: ../fish/guestfish-actions.pod:89 ../fish/guestfish-actions.pod:100 ../fish/guestfish-actions.pod:110 ../src/guestfs-actions.pod:108 ../src/guestfs-actions.pod:119 ../src/guestfs-actions.pod:129
6167 msgid "If C<readonly> is true:"
6171 #: ../fish/guestfish-actions.pod:91 ../fish/guestfish-actions.pod:102 ../fish/guestfish-actions.pod:112 ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121 ../src/guestfs-actions.pod:131
6172 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
6176 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
6177 msgid "readonlydisk = \"read\""
6181 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
6183 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
6184 "are added read/write."
6188 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
6189 msgid "readonlydisk = \"write\" (default)"
6193 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
6194 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
6198 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
6199 msgid "readonlydisk = \"ignore\""
6203 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
6204 msgid "If C<readonly> is true or false:"
6208 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
6209 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
6213 #: ../fish/guestfish-actions.pod:122
6215 "The other optional parameters are passed directly through to "
6216 "L</add-drive-opts>."
6220 #: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:194 ../fish/guestfish-actions.pod:624 ../fish/guestfish-actions.pod:835 ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:894 ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:912 ../fish/guestfish-actions.pod:926 ../fish/guestfish-actions.pod:2171 ../fish/guestfish-actions.pod:3219 ../fish/guestfish-actions.pod:3441 ../fish/guestfish-actions.pod:3604 ../fish/guestfish-actions.pod:3739 ../fish/guestfish-actions.pod:5110
6222 "This command has one or more optional arguments. See L</OPTIONAL "
6227 #: ../fish/guestfish-actions.pod:127
6232 #: ../fish/guestfish-actions.pod:129
6235 " add-drive filename\n"
6240 #: ../fish/guestfish-actions.pod:131
6242 "This function is the equivalent of calling L</add-drive-opts> with no "
6243 "optional parameters, so the disk is added writable, with the format being "
6244 "detected automatically."
6248 #: ../fish/guestfish-actions.pod:135
6250 "Automatic detection of the format opens you up to a potential security hole "
6251 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6252 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6253 "you should think about replacing calls to this function with calls to "
6254 "L</add-drive-opts>, and specifying the format."
6258 #: ../fish/guestfish-actions.pod:142
6259 msgid "add-drive-opts"
6263 #: ../fish/guestfish-actions.pod:144
6268 #: ../fish/guestfish-actions.pod:146
6271 " add-drive-opts filename [readonly:true|false] [format:..] [iface:..] "
6277 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
6279 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6280 "The first time you call this function, the disk appears as C</dev/sda>, the "
6281 "second time as C</dev/sdb>, and so on."
6285 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
6287 "You don't necessarily need to be root when using libguestfs. However you "
6288 "obviously do need sufficient permissions to access the filename for whatever "
6289 "operations you want to perform (ie. read access if you just want to read the "
6290 "image or write access if you want to modify the image)."
6294 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
6295 msgid "This call checks that C<filename> exists."
6299 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3403 ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5279
6300 msgid "The optional arguments are:"
6304 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6309 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6311 "If true then the image is treated as read-only. Writes are still allowed, "
6312 "but they are stored in a temporary snapshot overlay which is discarded at "
6313 "the end. The disk that you add is not modified."
6317 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6322 #: ../fish/guestfish-actions.pod:173
6324 "This forces the image format. If you omit this (or use L</add-drive> or "
6325 "L</add-drive-ro>) then the format is automatically detected. Possible "
6326 "formats include C<raw> and C<qcow2>."
6330 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6332 "Automatic detection of the format opens you up to a potential security hole "
6333 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6334 "RHBZ#642934. Specifying the format closes this security hole."
6338 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6343 #: ../fish/guestfish-actions.pod:184
6345 "This rarely-used option lets you emulate the behaviour of the deprecated "
6346 "L</add-drive-with-if> call (q.v.)"
6350 #: ../fish/guestfish-actions.pod:187 ../fish/guestfish-actions.pod:3246 ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:5000
6355 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
6357 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
6358 "a hint to the guest inspection process if it is available."
6362 #: ../fish/guestfish-actions.pod:196
6363 msgid "add-drive-ro"
6367 #: ../fish/guestfish-actions.pod:198
6372 #: ../fish/guestfish-actions.pod:200
6375 " add-drive-ro filename\n"
6380 #: ../fish/guestfish-actions.pod:202
6382 "This function is the equivalent of calling L</add-drive-opts> with the "
6383 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6384 "is added read-only, with the format being detected automatically."
6388 #: ../fish/guestfish-actions.pod:207
6389 msgid "add-drive-ro-with-if"
6393 #: ../fish/guestfish-actions.pod:209
6396 " add-drive-ro-with-if filename iface\n"
6401 #: ../fish/guestfish-actions.pod:211
6403 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6404 "interface emulation to use at run time."
6408 #: ../fish/guestfish-actions.pod:221
6409 msgid "add-drive-with-if"
6413 #: ../fish/guestfish-actions.pod:223
6416 " add-drive-with-if filename iface\n"
6421 #: ../fish/guestfish-actions.pod:225
6423 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6424 "interface emulation to use at run time."
6428 #: ../fish/guestfish-actions.pod:235
6433 #: ../fish/guestfish-actions.pod:237
6436 " aug-clear augpath\n"
6441 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
6443 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6444 "L<augtool(1)> C<clear> command."
6448 #: ../fish/guestfish-actions.pod:242
6453 #: ../fish/guestfish-actions.pod:244
6461 #: ../fish/guestfish-actions.pod:246
6463 "Close the current Augeas handle and free up any resources used by it. After "
6464 "calling this, you have to call L</aug-init> again before you can use any "
6465 "other Augeas functions."
6469 #: ../fish/guestfish-actions.pod:251
6474 #: ../fish/guestfish-actions.pod:253
6477 " aug-defnode name expr val\n"
6482 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
6483 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6487 #: ../fish/guestfish-actions.pod:258
6489 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6490 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6491 "containing that single node."
6495 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
6497 "On success this returns a pair containing the number of nodes in the "
6498 "nodeset, and a boolean flag if a node was created."
6502 #: ../fish/guestfish-actions.pod:266
6507 #: ../fish/guestfish-actions.pod:268
6510 " aug-defvar name expr\n"
6515 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
6517 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6518 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6522 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
6524 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6525 "evaluates to something which is not a nodeset."
6529 #: ../fish/guestfish-actions.pod:277
6534 #: ../fish/guestfish-actions.pod:279
6537 " aug-get augpath\n"
6542 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
6544 "Look up the value associated with C<path>. If C<path> matches exactly one "
6545 "node, the C<value> is returned."
6549 #: ../fish/guestfish-actions.pod:284
6554 #: ../fish/guestfish-actions.pod:286
6557 " aug-init root flags\n"
6562 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
6564 "Create a new Augeas handle for editing configuration files. If there was "
6565 "any previous Augeas handle associated with this guestfs session, then it is "
6570 #: ../fish/guestfish-actions.pod:292
6571 msgid "You must call this before using any other L</aug-*> commands."
6575 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
6576 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6580 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
6582 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6583 "logical I<or> of the following integers:"
6587 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
6588 msgid "C<AUG_SAVE_BACKUP> = 1"
6592 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
6593 msgid "Keep the original file with a C<.augsave> extension."
6597 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
6598 msgid "C<AUG_SAVE_NEWFILE> = 2"
6602 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
6604 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6605 "original. Overrides C<AUG_SAVE_BACKUP>."
6609 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
6610 msgid "C<AUG_TYPE_CHECK> = 4"
6614 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
6615 msgid "Typecheck lenses."
6619 #: ../fish/guestfish-actions.pod:317
6621 "This option is only useful when debugging Augeas lenses. Use of this option "
6622 "may require additional memory for the libguestfs appliance. You may need to "
6623 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
6627 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
6628 msgid "C<AUG_NO_STDINC> = 8"
6632 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
6633 msgid "Do not use standard load path for modules."
6637 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
6638 msgid "C<AUG_SAVE_NOOP> = 16"
6642 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
6643 msgid "Make save a no-op, just record what would have been changed."
6647 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
6648 msgid "C<AUG_NO_LOAD> = 32"
6652 #: ../fish/guestfish-actions.pod:332
6653 msgid "Do not load the tree in L</aug-init>."
6657 #: ../fish/guestfish-actions.pod:336
6658 msgid "To close the handle, you can call L</aug-close>."
6662 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
6663 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6667 #: ../fish/guestfish-actions.pod:340
6672 #: ../fish/guestfish-actions.pod:342
6675 " aug-insert augpath label true|false\n"
6680 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
6682 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6683 "or after C<path> (depending on the boolean flag C<before>)."
6687 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
6689 "C<path> must match exactly one existing node in the tree, and C<label> must "
6690 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6694 #: ../fish/guestfish-actions.pod:352
6699 #: ../fish/guestfish-actions.pod:354
6707 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
6708 msgid "Load files into the tree."
6712 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
6713 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6717 #: ../fish/guestfish-actions.pod:361
6722 #: ../fish/guestfish-actions.pod:363
6730 #: ../fish/guestfish-actions.pod:365
6732 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6733 "resulting nodes into alphabetical order."
6737 #: ../fish/guestfish-actions.pod:368
6742 #: ../fish/guestfish-actions.pod:370
6745 " aug-match augpath\n"
6750 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
6752 "Returns a list of paths which match the path expression C<path>. The "
6753 "returned paths are sufficiently qualified so that they match exactly one "
6754 "node in the current tree."
6758 #: ../fish/guestfish-actions.pod:376
6763 #: ../fish/guestfish-actions.pod:378
6766 " aug-mv src dest\n"
6771 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
6773 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6774 "C<dest> is overwritten if it exists."
6778 #: ../fish/guestfish-actions.pod:383
6783 #: ../fish/guestfish-actions.pod:385
6791 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
6792 msgid "Remove C<path> and all of its children."
6796 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
6797 msgid "On success this returns the number of entries which were removed."
6801 #: ../fish/guestfish-actions.pod:391
6806 #: ../fish/guestfish-actions.pod:393
6814 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
6815 msgid "This writes all pending changes to disk."
6819 #: ../fish/guestfish-actions.pod:397
6821 "The flags which were passed to L</aug-init> affect exactly how files are "
6826 #: ../fish/guestfish-actions.pod:400
6831 #: ../fish/guestfish-actions.pod:402
6834 " aug-set augpath val\n"
6839 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
6840 msgid "Set the value associated with C<path> to C<val>."
6844 #: ../fish/guestfish-actions.pod:406
6846 "In the Augeas API, it is possible to clear a node by setting the value to "
6847 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6848 "this call. Instead you must use the L</aug-clear> call."
6852 #: ../fish/guestfish-actions.pod:411
6857 #: ../fish/guestfish-actions.pod:413
6860 " available 'groups ...'\n"
6865 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
6867 "This command is used to check the availability of some groups of "
6868 "functionality in the appliance, which not all builds of the libguestfs "
6869 "appliance will be able to provide."
6873 #: ../fish/guestfish-actions.pod:419
6875 "The libguestfs groups, and the functions that those groups correspond to, "
6876 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6877 "runtime by calling L</available-all-groups>."
6881 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
6883 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
6884 "\"augeas\"]> would check for the availability of the Linux inotify functions "
6885 "and Augeas (configuration file editing) functions."
6889 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
6890 msgid "The command returns no error if I<all> requested groups are available."
6894 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
6896 "It fails with an error if one or more of the requested groups is unavailable "
6901 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
6903 "If an unknown group name is included in the list of groups then an error is "
6908 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
6913 #: ../fish/guestfish-actions.pod:443
6914 msgid "You must call L</launch> before calling this function."
6918 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
6920 "The reason is because we don't know what groups are supported by the "
6921 "appliance/daemon until it is running and can be queried."
6925 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
6927 "If a group of functions is available, this does not necessarily mean that "
6928 "they will work. You still have to check for errors when calling individual "
6929 "API functions even if they are available."
6933 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
6935 "It is usually the job of distro packagers to build complete functionality "
6936 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6937 "with all requirements satisfied, will support everything."
6941 #: ../fish/guestfish-actions.pod:465
6943 "This call was added in version C<1.0.80>. In previous versions of "
6944 "libguestfs all you could do would be to speculatively execute a command to "
6945 "find out if the daemon implemented it. See also L</version>."
6949 #: ../fish/guestfish-actions.pod:472
6950 msgid "available-all-groups"
6954 #: ../fish/guestfish-actions.pod:474
6957 " available-all-groups\n"
6962 #: ../fish/guestfish-actions.pod:476
6964 "This command returns a list of all optional groups that this daemon knows "
6965 "about. Note this returns both supported and unsupported groups. To find "
6966 "out which ones the daemon can actually support you have to call "
6967 "L</available> on each member of the returned list."
6971 #: ../fish/guestfish-actions.pod:482
6972 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6976 #: ../fish/guestfish-actions.pod:484
6981 #: ../fish/guestfish-actions.pod:486
6984 " base64-in (base64file|-) filename\n"
6989 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
6990 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
6994 #: ../fish/guestfish-actions.pod:491 ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:749 ../fish/guestfish-actions.pod:833 ../fish/guestfish-actions.pod:854 ../fish/guestfish-actions.pod:1025 ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1418 ../fish/guestfish-actions.pod:4966 ../fish/guestfish-actions.pod:4978 ../fish/guestfish-actions.pod:4989 ../fish/guestfish-actions.pod:5000 ../fish/guestfish-actions.pod:5131 ../fish/guestfish-actions.pod:5140 ../fish/guestfish-actions.pod:5194 ../fish/guestfish-actions.pod:5217
6995 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6999 #: ../fish/guestfish-actions.pod:493
7004 #: ../fish/guestfish-actions.pod:495
7007 " base64-out filename (base64file|-)\n"
7012 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
7014 "This command downloads the contents of C<filename>, writing it out to local "
7015 "file C<base64file> encoded as base64."
7019 #: ../fish/guestfish-actions.pod:502
7020 msgid "blockdev-flushbufs"
7024 #: ../fish/guestfish-actions.pod:504
7027 " blockdev-flushbufs device\n"
7032 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
7033 msgid "This tells the kernel to flush internal buffers associated with C<device>."
7037 #: ../fish/guestfish-actions.pod:509 ../fish/guestfish-actions.pod:520 ../fish/guestfish-actions.pod:529 ../fish/guestfish-actions.pod:539 ../fish/guestfish-actions.pod:551 ../fish/guestfish-actions.pod:564 ../fish/guestfish-actions.pod:572 ../fish/guestfish-actions.pod:583 ../fish/guestfish-actions.pod:591 ../fish/guestfish-actions.pod:599 ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:780 ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:817 ../src/guestfs-actions.pod:831 ../src/guestfs-actions.pod:849 ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:877
7038 msgid "This uses the L<blockdev(8)> command."
7042 #: ../fish/guestfish-actions.pod:511
7043 msgid "blockdev-getbsz"
7047 #: ../fish/guestfish-actions.pod:513
7050 " blockdev-getbsz device\n"
7055 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
7056 msgid "This returns the block size of a device."
7060 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580 ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
7062 "(Note this is different from both I<size in blocks> and I<filesystem block "
7067 #: ../fish/guestfish-actions.pod:522
7068 msgid "blockdev-getro"
7072 #: ../fish/guestfish-actions.pod:524
7075 " blockdev-getro device\n"
7080 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
7082 "Returns a boolean indicating if the block device is read-only (true if "
7083 "read-only, false if not)."
7087 #: ../fish/guestfish-actions.pod:531
7088 msgid "blockdev-getsize64"
7092 #: ../fish/guestfish-actions.pod:533
7095 " blockdev-getsize64 device\n"
7100 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
7101 msgid "This returns the size of the device in bytes."
7105 #: ../fish/guestfish-actions.pod:537
7106 msgid "See also L</blockdev-getsz>."
7110 #: ../fish/guestfish-actions.pod:541
7111 msgid "blockdev-getss"
7115 #: ../fish/guestfish-actions.pod:543
7118 " blockdev-getss device\n"
7123 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
7125 "This returns the size of sectors on a block device. Usually 512, but can be "
7126 "larger for modern devices."
7130 #: ../fish/guestfish-actions.pod:548
7131 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
7135 #: ../fish/guestfish-actions.pod:553
7136 msgid "blockdev-getsz"
7140 #: ../fish/guestfish-actions.pod:555
7143 " blockdev-getsz device\n"
7148 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
7150 "This returns the size of the device in units of 512-byte sectors (even if "
7151 "the sectorsize isn't 512 bytes ... weird)."
7155 #: ../fish/guestfish-actions.pod:560
7157 "See also L</blockdev-getss> for the real sector size of the device, and "
7158 "L</blockdev-getsize64> for the more useful I<size in bytes>."
7162 #: ../fish/guestfish-actions.pod:566
7163 msgid "blockdev-rereadpt"
7167 #: ../fish/guestfish-actions.pod:568
7170 " blockdev-rereadpt device\n"
7175 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
7176 msgid "Reread the partition table on C<device>."
7180 #: ../fish/guestfish-actions.pod:574
7181 msgid "blockdev-setbsz"
7185 #: ../fish/guestfish-actions.pod:576
7188 " blockdev-setbsz device blocksize\n"
7193 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
7194 msgid "This sets the block size of a device."
7198 #: ../fish/guestfish-actions.pod:585
7199 msgid "blockdev-setro"
7203 #: ../fish/guestfish-actions.pod:587
7206 " blockdev-setro device\n"
7211 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
7212 msgid "Sets the block device named C<device> to read-only."
7216 #: ../fish/guestfish-actions.pod:593
7217 msgid "blockdev-setrw"
7221 #: ../fish/guestfish-actions.pod:595
7224 " blockdev-setrw device\n"
7229 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
7230 msgid "Sets the block device named C<device> to read-write."
7234 #: ../fish/guestfish-actions.pod:601
7235 msgid "btrfs-filesystem-resize"
7239 #: ../fish/guestfish-actions.pod:603
7242 " btrfs-filesystem-resize mountpoint [size:N]\n"
7247 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
7248 msgid "This command resizes a btrfs filesystem."
7252 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
7254 "Note that unlike other resize calls, the filesystem has to be mounted and "
7255 "the parameter is the mountpoint not the device (this is a requirement of "
7260 #: ../fish/guestfish-actions.pod:611 ../fish/guestfish-actions.pod:3168 ../fish/guestfish-actions.pod:3714 ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:4896 ../src/guestfs-actions.pod:5803 ../src/guestfs-actions.pod:7779
7261 msgid "The optional parameters are:"
7265 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3718 ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5807
7270 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
7272 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7273 "resized to the maximum size."
7277 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
7278 msgid "See also L<btrfs(8)>."
7282 #: ../fish/guestfish-actions.pod:626
7283 msgid "case-sensitive-path"
7287 #: ../fish/guestfish-actions.pod:628
7290 " case-sensitive-path path\n"
7295 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
7297 "This can be used to resolve case insensitive paths on a filesystem which is "
7298 "case sensitive. The use case is to resolve paths which you have read from "
7299 "Windows configuration files or the Windows Registry, to the true path."
7303 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
7305 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7306 "(and probably others), which is that although the underlying filesystem is "
7307 "case-insensitive, the driver exports the filesystem to Linux as "
7312 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
7314 "One consequence of this is that special directories such as C<c:\\windows> "
7315 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7316 "precise details of how they were created. In Windows itself this would not "
7321 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
7323 "Bug or feature? You decide: "
7324 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
7328 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
7330 "This function resolves the true case of each element in the path and returns "
7331 "the case-sensitive path."
7335 #: ../fish/guestfish-actions.pod:652
7337 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
7338 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7339 "how the directories were originally created under Windows)."
7343 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
7344 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7348 #: ../fish/guestfish-actions.pod:660
7349 msgid "See also L</realpath>."
7353 #: ../fish/guestfish-actions.pod:662
7358 #: ../fish/guestfish-actions.pod:664
7366 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4145 ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6463
7367 msgid "Return the contents of the file named C<path>."
7371 #: ../fish/guestfish-actions.pod:668
7373 "Note that this function cannot correctly handle binary files (specifically, "
7374 "files containing C<\\0> character which is treated as end of string). For "
7375 "those you need to use the L</read-file> or L</download> functions which have "
7376 "a more complex interface."
7380 #: ../fish/guestfish-actions.pod:673 ../fish/guestfish-actions.pod:808 ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:1103 ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1180 ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1382 ../fish/guestfish-actions.pod:1695 ../fish/guestfish-actions.pod:1705 ../fish/guestfish-actions.pod:1755 ../fish/guestfish-actions.pod:1770 ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1799 ../fish/guestfish-actions.pod:4015 ../fish/guestfish-actions.pod:4030 ../fish/guestfish-actions.pod:4106 ../fish/guestfish-actions.pod:4123 ../fish/guestfish-actions.pod:4138 ../fish/guestfish-actions.pod:4807 ../fish/guestfish-actions.pod:4853 ../fish/guestfish-actions.pod:4938 ../fish/guestfish-actions.pod:4953 ../fish/guestfish-actions.pod:5438 ../fish/guestfish-actions.pod:5450 ../fish/guestfish-actions.pod:5468 ../fish/guestfish-actions.pod:5485 ../fish/guestfish-actions.pod:5495 ../fish/guestfish-actions.pod:5549 ../fish/guestfish-actions.pod:5559 ../fish/guestfish-actions.pod:5588 ../fish/guestfish-actions.pod:5598 ../src/guestfs-actions.pod:1001 ../src/guestfs-actions.pod:1180 ../src/guestfs-actions.pod:1200 ../src/guestfs-actions.pod:1855 ../src/guestfs-actions.pod:1874 ../src/guestfs-actions.pod:1977 ../src/guestfs-actions.pod:1996 ../src/guestfs-actions.pod:2242 ../src/guestfs-actions.pod:2724 ../src/guestfs-actions.pod:2743 ../src/guestfs-actions.pod:2808 ../src/guestfs-actions.pod:2832 ../src/guestfs-actions.pod:2849 ../src/guestfs-actions.pod:2878 ../src/guestfs-actions.pod:6245 ../src/guestfs-actions.pod:6271 ../src/guestfs-actions.pod:6402 ../src/guestfs-actions.pod:6428 ../src/guestfs-actions.pod:6452 ../src/guestfs-actions.pod:7407 ../src/guestfs-actions.pod:7462 ../src/guestfs-actions.pod:7608 ../src/guestfs-actions.pod:7632 ../src/guestfs-actions.pod:8419 ../src/guestfs-actions.pod:8439 ../src/guestfs-actions.pod:8472 ../src/guestfs-actions.pod:8491 ../src/guestfs-actions.pod:8510 ../src/guestfs-actions.pod:8601 ../src/guestfs-actions.pod:8620 ../src/guestfs-actions.pod:8666 ../src/guestfs-actions.pod:8685
7382 "Because of the message protocol, there is a transfer limit of somewhere "
7383 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7387 #: ../fish/guestfish-actions.pod:676
7392 #: ../fish/guestfish-actions.pod:678
7395 " checksum csumtype path\n"
7400 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
7401 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7405 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
7407 "The type of checksum to compute is given by the C<csumtype> parameter which "
7408 "must have one of the following values:"
7412 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
7417 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
7419 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7424 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
7429 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
7430 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7434 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
7439 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
7440 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7444 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
7449 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
7450 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7454 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
7459 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
7460 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7464 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
7469 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
7470 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7474 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
7479 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
7480 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7484 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
7485 msgid "The checksum is returned as a printable string."
7489 #: ../fish/guestfish-actions.pod:721
7490 msgid "To get the checksum for a device, use L</checksum-device>."
7494 #: ../fish/guestfish-actions.pod:723
7495 msgid "To get the checksums for many files, use L</checksums-out>."
7499 #: ../fish/guestfish-actions.pod:725
7500 msgid "checksum-device"
7504 #: ../fish/guestfish-actions.pod:727
7507 " checksum-device csumtype device\n"
7512 #: ../fish/guestfish-actions.pod:729
7514 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7515 "device named C<device>. For the types of checksums supported see the "
7516 "L</checksum> command."
7520 #: ../fish/guestfish-actions.pod:733
7521 msgid "checksums-out"
7525 #: ../fish/guestfish-actions.pod:735
7528 " checksums-out csumtype directory (sumsfile|-)\n"
7533 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
7535 "This command computes the checksums of all regular files in C<directory> and "
7536 "then emits a list of those checksums to the local output file C<sumsfile>."
7540 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
7542 "This can be used for verifying the integrity of a virtual machine. However "
7543 "to be properly secure you should pay attention to the output of the checksum "
7544 "command (it uses the ones from GNU coreutils). In particular when the "
7545 "filename is not printable, coreutils uses a special backslash syntax. For "
7546 "more information, see the GNU coreutils info file."
7550 #: ../fish/guestfish-actions.pod:751
7555 #: ../fish/guestfish-actions.pod:753
7558 " chmod mode path\n"
7563 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
7565 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7570 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
7572 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7573 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7578 #: ../fish/guestfish-actions.pod:762 ../fish/guestfish-actions.pod:3367 ../fish/guestfish-actions.pod:3506 ../fish/guestfish-actions.pod:3516 ../fish/guestfish-actions.pod:3526 ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:5210 ../src/guestfs-actions.pod:5419 ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5457
7579 msgid "The mode actually set is affected by the umask."
7583 #: ../fish/guestfish-actions.pod:764
7588 #: ../fish/guestfish-actions.pod:766
7591 " chown owner group path\n"
7596 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
7597 msgid "Change the file owner to C<owner> and group to C<group>."
7601 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2707 ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4128
7603 "Only numeric uid and gid are supported. If you want to use names, you will "
7604 "need to locate and parse the password file yourself (Augeas support makes "
7605 "this relatively easy)."
7609 #: ../fish/guestfish-actions.pod:774
7614 #: ../fish/guestfish-actions.pod:776
7617 " command 'arguments ...'\n"
7622 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
7624 "This call runs a command from the guest filesystem. The filesystem must be "
7625 "mounted, and must contain a compatible operating system (ie. something "
7626 "Linux, with the same or compatible processor architecture)."
7630 #: ../fish/guestfish-actions.pod:783
7632 "The single parameter is an argv-style list of arguments. The first element "
7633 "is the name of the program to run. Subsequent elements are parameters. The "
7634 "list must be non-empty (ie. must contain a program name). Note that the "
7635 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7639 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
7640 msgid "The return value is anything printed to I<stdout> by the command."
7644 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
7646 "If the command returns a non-zero exit status, then this function returns an "
7647 "error message. The error message string is the content of I<stderr> from "
7652 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
7654 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
7655 "C</bin>. If you require a program from another location, you should provide "
7656 "the full path in the first parameter."
7660 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
7662 "Shared libraries and data files required by the program must be available on "
7663 "filesystems which are mounted in the correct places. It is the caller's "
7664 "responsibility to ensure all filesystems that are needed are mounted at the "
7669 #: ../fish/guestfish-actions.pod:811
7670 msgid "command-lines"
7674 #: ../fish/guestfish-actions.pod:813
7677 " command-lines 'arguments ...'\n"
7682 #: ../fish/guestfish-actions.pod:815
7683 msgid "This is the same as L</command>, but splits the result into a list of lines."
7687 #: ../fish/guestfish-actions.pod:818
7688 msgid "See also: L</sh-lines>"
7692 #: ../fish/guestfish-actions.pod:823
7693 msgid "compress-device-out"
7697 #: ../fish/guestfish-actions.pod:825
7700 " compress-device-out ctype device (zdevice|-) [level:N]\n"
7705 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
7707 "This command compresses C<device> and writes it out to the local file "
7712 #: ../fish/guestfish-actions.pod:830
7714 "The C<ctype> and optional C<level> parameters have the same meaning as in "
7719 #: ../fish/guestfish-actions.pod:837
7720 msgid "compress-out"
7724 #: ../fish/guestfish-actions.pod:839
7727 " compress-out ctype file (zfile|-) [level:N]\n"
7732 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
7734 "This command compresses C<file> and writes it out to the local file "
7739 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
7741 "The compression program used is controlled by the C<ctype> parameter. "
7742 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7743 "Some compression types may not be supported by particular builds of "
7744 "libguestfs, in which case you will get an error containing the substring "
7745 "\"not supported\"."
7749 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
7751 "The optional C<level> parameter controls compression level. The meaning and "
7752 "default for this parameter depends on the compression program being used."
7756 #: ../fish/guestfish-actions.pod:858
7761 #: ../fish/guestfish-actions.pod:860
7764 " config qemuparam qemuvalue\n"
7769 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
7771 "This can be used to add arbitrary qemu command line parameters of the form "
7772 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7773 "setting some parameters which would interfere with parameters that we use."
7777 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
7778 msgid "The first character of C<param> string must be a C<-> (dash)."
7782 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
7783 msgid "C<value> can be NULL."
7787 #: ../fish/guestfish-actions.pod:871
7788 msgid "copy-device-to-device"
7792 #: ../fish/guestfish-actions.pod:873
7795 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7800 #: ../fish/guestfish-actions.pod:875
7802 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, "
7803 "L</copy-file-to-device>, and L</copy-file-to-file> let you copy from a "
7804 "source (device|file) to a destination (device|file)."
7808 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
7810 "Partial copies can be made since you can specify optionally the source "
7811 "offset, destination offset and size to copy. These values are all specified "
7812 "in bytes. If not given, the offsets both default to zero, and the size "
7813 "defaults to copying as much as possible until we hit the end of the source."
7817 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
7819 "The source and destination may be the same object. However overlapping "
7820 "regions may not be copied correctly."
7824 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
7826 "If the destination is a file, it is created if required. If the destination "
7827 "file is not large enough, it is extended."
7831 #: ../fish/guestfish-actions.pod:896
7832 msgid "copy-device-to-file"
7836 #: ../fish/guestfish-actions.pod:898
7839 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7844 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909 ../fish/guestfish-actions.pod:918
7845 msgid "See L</copy-device-to-device> for a general overview of this call."
7849 #: ../fish/guestfish-actions.pod:905
7850 msgid "copy-file-to-device"
7854 #: ../fish/guestfish-actions.pod:907
7857 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7862 #: ../fish/guestfish-actions.pod:914
7863 msgid "copy-file-to-file"
7867 #: ../fish/guestfish-actions.pod:916
7870 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
7875 #: ../fish/guestfish-actions.pod:921
7877 "This is B<not> the function you want for copying files. This is for copying "
7878 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
7879 "file copying and moving functions."
7883 #: ../fish/guestfish-actions.pod:928
7888 #: ../fish/guestfish-actions.pod:930
7891 " copy-size src dest size\n"
7896 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1584
7898 "This command copies exactly C<size> bytes from one source device or file "
7899 "C<src> to another destination device or file C<dest>."
7903 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1587
7905 "Note this will fail if the source is too short or if the destination is not "
7910 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
7912 "I<This function is deprecated.> In new code, use the "
7913 "L</copy_device_to_device> call instead."
7917 #: ../fish/guestfish-actions.pod:945
7922 #: ../fish/guestfish-actions.pod:947
7930 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1606
7932 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7933 "destination filename or destination directory."
7937 #: ../fish/guestfish-actions.pod:952
7942 #: ../fish/guestfish-actions.pod:954
7950 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1620
7952 "This copies a file or directory from C<src> to C<dest> recursively using the "
7957 #: ../fish/guestfish-actions.pod:959
7962 #: ../fish/guestfish-actions.pod:961
7970 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1641
7972 "This command copies from one source device or file C<src> to another "
7973 "destination device or file C<dest>. Normally you would use this to copy to "
7974 "or from a device or partition, for example to duplicate a filesystem."
7978 #: ../fish/guestfish-actions.pod:968
7980 "If the destination is a device, it must be as large or larger than the "
7981 "source file or device, otherwise the copy will fail. This command cannot do "
7982 "partial copies (see L</copy-device-to-device>)."
7986 #: ../fish/guestfish-actions.pod:980
7991 #: ../fish/guestfish-actions.pod:982
7999 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1660
8000 msgid "This command runs the C<df> command to report disk space used."
8004 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
8006 "This command is mostly useful for interactive sessions. It is I<not> "
8007 "intended that you try to parse the output string. Use L</statvfs> from "
8012 #: ../fish/guestfish-actions.pod:990
8017 #: ../fish/guestfish-actions.pod:992
8025 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1676
8027 "This command runs the C<df -h> command to report disk space used in "
8028 "human-readable format."
8032 #: ../fish/guestfish-actions.pod:1001
8037 #: ../fish/guestfish-actions.pod:1003
8045 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1693
8047 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8048 "This is sometimes useful for extended debugging of problems."
8052 #: ../fish/guestfish-actions.pod:1009
8054 "Another way to get the same information is to enable verbose messages with "
8055 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
8056 "before running the program."
8060 #: ../fish/guestfish-actions.pod:1014
8065 #: ../fish/guestfish-actions.pod:1016
8068 " download remotefilename (filename|-)\n"
8073 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031 ../src/guestfs-actions.pod:1714 ../src/guestfs-actions.pod:1739
8075 "Download file C<remotefilename> and save it as C<filename> on the local "
8080 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5190 ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:7989
8081 msgid "C<filename> can also be a named pipe."
8085 #: ../fish/guestfish-actions.pod:1023
8086 msgid "See also L</upload>, L</cat>."
8090 #: ../fish/guestfish-actions.pod:1027
8091 msgid "download-offset"
8095 #: ../fish/guestfish-actions.pod:1029
8098 " download-offset remotefilename (filename|-) offset size\n"
8103 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1742
8105 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8106 "region must be within the file or device)."
8110 #: ../fish/guestfish-actions.pod:1037
8112 "Note that there is no limit on the amount of data that can be downloaded "
8113 "with this call, unlike with L</pread>, and this call always reads the full "
8114 "amount unless an error occurs."
8118 #: ../fish/guestfish-actions.pod:1042
8119 msgid "See also L</download>, L</pread>."
8123 #: ../fish/guestfish-actions.pod:1046
8128 #: ../fish/guestfish-actions.pod:1048
8131 " drop-caches whattodrop\n"
8136 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1767
8138 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8139 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8140 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8144 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1772
8145 msgid "Setting C<whattodrop> to 3 should drop everything."
8149 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1774
8151 "This automatically calls L<sync(2)> before the operation, so that the "
8152 "maximum guest memory is freed."
8156 #: ../fish/guestfish-actions.pod:1060
8161 #: ../fish/guestfish-actions.pod:1062
8169 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1787
8171 "This command runs the C<du -s> command to estimate file space usage for "
8176 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1790
8178 "C<path> can be a file or a directory. If C<path> is a directory then the "
8179 "estimate includes the contents of the directory and all subdirectories "
8184 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1794
8185 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8189 #: ../fish/guestfish-actions.pod:1074
8194 #: ../fish/guestfish-actions.pod:1076
8197 " e2fsck-f device\n"
8202 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1812
8204 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8205 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8210 #: ../fish/guestfish-actions.pod:1082
8212 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8213 "should use L</fsck>."
8217 #: ../fish/guestfish-actions.pod:1085
8222 #: ../fish/guestfish-actions.pod:1087
8225 " echo-daemon 'words ...'\n"
8230 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1829
8232 "This command concatenates the list of C<words> passed with single spaces "
8233 "between them and returns the resulting string."
8237 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1832
8238 msgid "You can use this command to test the connection through to the daemon."
8242 #: ../fish/guestfish-actions.pod:1094
8243 msgid "See also L</ping-daemon>."
8247 #: ../fish/guestfish-actions.pod:1096
8252 #: ../fish/guestfish-actions.pod:1098
8255 " egrep regex path\n"
8260 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1848
8261 msgid "This calls the external C<egrep> program and returns the matching lines."
8265 #: ../fish/guestfish-actions.pod:1106
8270 #: ../fish/guestfish-actions.pod:1108
8273 " egrepi regex path\n"
8278 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1867
8279 msgid "This calls the external C<egrep -i> program and returns the matching lines."
8283 #: ../fish/guestfish-actions.pod:1116
8288 #: ../fish/guestfish-actions.pod:1118
8291 " equal file1 file2\n"
8296 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1886
8298 "This compares the two files C<file1> and C<file2> and returns true if their "
8299 "content is exactly equal, or false otherwise."
8303 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1889
8304 msgid "The external L<cmp(1)> program is used for the comparison."
8308 #: ../fish/guestfish-actions.pod:1125
8313 #: ../fish/guestfish-actions.pod:1127
8321 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1901
8323 "This returns C<true> if and only if there is a file, directory (or anything) "
8324 "with the given C<path> name."
8328 #: ../fish/guestfish-actions.pod:1132
8329 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8333 #: ../fish/guestfish-actions.pod:1134
8338 #: ../fish/guestfish-actions.pod:1136
8341 " fallocate path len\n"
8346 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:1943
8348 "This command preallocates a file (containing zero bytes) named C<path> of "
8349 "size C<len> bytes. If the file exists already, it is overwritten."
8353 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1928
8355 "Do not confuse this with the guestfish-specific C<alloc> command which "
8356 "allocates a file in the host and attaches it as a device."
8360 #: ../fish/guestfish-actions.pod:1146
8362 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8367 #: ../fish/guestfish-actions.pod:1153
8372 #: ../fish/guestfish-actions.pod:1155
8375 " fallocate64 path len\n"
8380 #: ../fish/guestfish-actions.pod:1161
8382 "Note that this call allocates disk blocks for the file. To create a sparse "
8383 "file use L</truncate-size> instead."
8387 #: ../fish/guestfish-actions.pod:1164
8389 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8390 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8391 "maximum size of files created through that call to 1GB."
8395 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1955
8397 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8398 "commands which create a file in the host and attach it as a device."
8402 #: ../fish/guestfish-actions.pod:1173
8407 #: ../fish/guestfish-actions.pod:1175
8410 " fgrep pattern path\n"
8415 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1970
8416 msgid "This calls the external C<fgrep> program and returns the matching lines."
8420 #: ../fish/guestfish-actions.pod:1183
8425 #: ../fish/guestfish-actions.pod:1185
8428 " fgrepi pattern path\n"
8433 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1989
8434 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
8438 #: ../fish/guestfish-actions.pod:1193
8443 #: ../fish/guestfish-actions.pod:1195
8451 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:2007
8453 "This call uses the standard L<file(1)> command to determine the type or "
8454 "contents of the file."
8458 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2010
8460 "This call will also transparently look inside various types of compressed "
8465 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2013
8467 "The exact command which runs is C<file -zb path>. Note in particular that "
8468 "the filename is not prepended to the output (the I<-b> option)."
8472 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2017
8474 "The output depends on the output of the underlying L<file(1)> command and it "
8475 "can change in future in ways beyond our control. In other words, the output "
8476 "is not guaranteed by the ABI."
8480 #: ../fish/guestfish-actions.pod:1211
8482 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8483 "(etc), L</is-zero>."
8487 #: ../fish/guestfish-actions.pod:1214
8488 msgid "file-architecture"
8492 #: ../fish/guestfish-actions.pod:1216
8495 " file-architecture filename\n"
8500 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2035
8502 "This detects the architecture of the binary C<filename>, and returns it if "
8507 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2038
8508 msgid "Currently defined architectures are:"
8512 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2042
8517 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2044
8519 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8520 "irrespective of the precise processor requirements of the binary."
8524 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2047
8529 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2049
8530 msgid "64 bit x86-64."
8534 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2051
8539 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2053
8540 msgid "32 bit SPARC."
8544 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2055
8549 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2057
8550 msgid "64 bit SPARC V9 and above."
8554 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2059
8559 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2061
8560 msgid "Intel Itanium."
8564 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2063
8569 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2065
8570 msgid "32 bit Power PC."
8574 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2067
8579 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2069
8580 msgid "64 bit Power PC."
8584 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2073
8585 msgid "Libguestfs may return other architecture strings in future."
8589 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2075
8590 msgid "The function works on at least the following types of files:"
8594 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2081
8595 msgid "many types of Un*x and Linux binary"
8599 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2085
8600 msgid "many types of Un*x and Linux shared library"
8604 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2089
8605 msgid "Windows Win32 and Win64 binaries"
8609 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2093
8610 msgid "Windows Win32 and Win64 DLLs"
8614 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2095
8615 msgid "Win32 binaries and DLLs return C<i386>."
8619 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2097
8620 msgid "Win64 binaries and DLLs return C<x86_64>."
8624 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2101
8625 msgid "Linux kernel modules"
8629 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2105
8630 msgid "Linux new-style initrd images"
8634 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2109
8635 msgid "some non-x86 Linux vmlinuz kernels"
8639 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2113
8640 msgid "What it can't do currently:"
8644 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2119
8645 msgid "static libraries (libfoo.a)"
8649 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2123
8650 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8654 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2127
8655 msgid "x86 Linux vmlinuz kernels"
8659 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2129
8661 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8662 "compressed code, and are horribly hard to unpack. If you want to find the "
8663 "architecture of a kernel, use the architecture of the associated initrd or "
8664 "kernel module(s) instead."
8668 #: ../fish/guestfish-actions.pod:1319
8673 #: ../fish/guestfish-actions.pod:1321
8681 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2147
8682 msgid "This command returns the size of C<file> in bytes."
8686 #: ../fish/guestfish-actions.pod:1325
8688 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
8689 "L</is-file> etc. To get the size of block devices, use "
8690 "L</blockdev-getsize64>."
8694 #: ../fish/guestfish-actions.pod:1329
8699 #: ../fish/guestfish-actions.pod:1331
8702 " fill c len path\n"
8707 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2165
8709 "This command creates a new file called C<path>. The initial content of the "
8710 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
8715 #: ../fish/guestfish-actions.pod:1337
8717 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8718 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8723 #: ../fish/guestfish-actions.pod:1342
8724 msgid "fill-pattern"
8728 #: ../fish/guestfish-actions.pod:1344
8731 " fill-pattern pattern len path\n"
8736 #: ../fish/guestfish-actions.pod:1346
8738 "This function is like L</fill> except that it creates a new file of length "
8739 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8740 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8745 #: ../fish/guestfish-actions.pod:1351
8750 #: ../fish/guestfish-actions.pod:1353
8758 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2211
8760 "This command lists out all files and directories, recursively, starting at "
8761 "C<directory>. It is essentially equivalent to running the shell command "
8762 "C<find directory -print> but some post-processing happens on the output, "
8767 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2216
8769 "This returns a list of strings I<without any prefix>. Thus if the directory "
8774 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2219
8784 #: ../fish/guestfish-actions.pod:1367
8785 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8789 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2226
8800 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2231
8801 msgid "If C<directory> is not a directory, then this command returns an error."
8805 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2234
8806 msgid "The returned list is sorted."
8810 #: ../fish/guestfish-actions.pod:1380
8811 msgid "See also L</find0>."
8815 #: ../fish/guestfish-actions.pod:1385
8820 #: ../fish/guestfish-actions.pod:1387
8823 " find0 directory (files|-)\n"
8828 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2254
8830 "This command lists out all files and directories, recursively, starting at "
8831 "C<directory>, placing the resulting list in the external file called "
8836 #: ../fish/guestfish-actions.pod:1393
8837 msgid "This command works the same way as L</find> with the following exceptions:"
8841 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2265
8842 msgid "The resulting list is written to an external file."
8846 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2269
8848 "Items (filenames) in the result are separated by C<\\0> characters. See "
8849 "L<find(1)> option I<-print0>."
8853 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2274
8854 msgid "This command is not limited in the number of names that it can return."
8858 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2279
8859 msgid "The result list is not sorted."
8863 #: ../fish/guestfish-actions.pod:1420
8864 msgid "findfs-label"
8868 #: ../fish/guestfish-actions.pod:1422
8871 " findfs-label label\n"
8876 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2293
8878 "This command searches the filesystems and returns the one which has the "
8879 "given label. An error is returned if no such filesystem can be found."
8883 #: ../fish/guestfish-actions.pod:1428
8884 msgid "To find the label of a filesystem, use L</vfs-label>."
8888 #: ../fish/guestfish-actions.pod:1430
8893 #: ../fish/guestfish-actions.pod:1432
8896 " findfs-uuid uuid\n"
8901 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2310
8903 "This command searches the filesystems and returns the one which has the "
8904 "given UUID. An error is returned if no such filesystem can be found."
8908 #: ../fish/guestfish-actions.pod:1438
8909 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8913 #: ../fish/guestfish-actions.pod:1440
8918 #: ../fish/guestfish-actions.pod:1442
8921 " fsck fstype device\n"
8926 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2328
8928 "This runs the filesystem checker (fsck) on C<device> which should have "
8929 "filesystem type C<fstype>."
8933 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2331
8935 "The returned integer is the status. See L<fsck(8)> for the list of status "
8936 "codes from C<fsck>."
8940 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2340
8941 msgid "Multiple status codes can be summed together."
8945 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2344
8947 "A non-zero return code can mean \"success\", for example if errors have been "
8948 "corrected on the filesystem."
8952 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
8953 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8957 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2354
8958 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8962 #: ../fish/guestfish-actions.pod:1472
8967 #: ../fish/guestfish-actions.pod:1474
8975 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2365
8977 "Return the additional kernel options which are added to the guest kernel "
8982 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2368
8983 msgid "If C<NULL> then no options are added."
8987 #: ../fish/guestfish-actions.pod:1481
8988 msgid "get-attach-method"
8992 #: ../fish/guestfish-actions.pod:1483
8995 " get-attach-method\n"
9000 #: ../fish/guestfish-actions.pod:1485
9001 msgid "Return the current attach method. See L</set-attach-method>."
9005 #: ../fish/guestfish-actions.pod:1487
9006 msgid "get-autosync"
9010 #: ../fish/guestfish-actions.pod:1489
9018 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2393
9019 msgid "Get the autosync flag."
9023 #: ../fish/guestfish-actions.pod:1493
9028 #: ../fish/guestfish-actions.pod:1495
9036 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2404
9037 msgid "Return the direct appliance mode flag."
9041 #: ../fish/guestfish-actions.pod:1499
9046 #: ../fish/guestfish-actions.pod:1501
9049 " get-e2label device\n"
9054 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2423
9055 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9059 #: ../fish/guestfish-actions.pod:1506
9061 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
9066 #: ../fish/guestfish-actions.pod:1513
9071 #: ../fish/guestfish-actions.pod:1515
9074 " get-e2uuid device\n"
9079 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2444
9080 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9084 #: ../fish/guestfish-actions.pod:1520
9086 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
9091 #: ../fish/guestfish-actions.pod:1527
9096 #: ../fish/guestfish-actions.pod:1529
9104 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2457
9105 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
9109 #: ../fish/guestfish-actions.pod:1534
9111 "If L</set-memsize> was not called on this handle, and if "
9112 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9113 "value for memsize."
9117 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:1595 ../fish/guestfish-actions.pod:4468 ../fish/guestfish-actions.pod:4570 ../src/guestfs-actions.pod:2464 ../src/guestfs-actions.pod:2556 ../src/guestfs-actions.pod:6921 ../src/guestfs-actions.pod:7047
9118 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9122 #: ../fish/guestfish-actions.pod:1541
9127 #: ../fish/guestfish-actions.pod:1543
9135 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2476
9136 msgid "This returns the enable network flag."
9140 #: ../fish/guestfish-actions.pod:1547
9145 #: ../fish/guestfish-actions.pod:1549
9153 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2487
9154 msgid "Return the current search path."
9158 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2489
9160 "This is always non-NULL. If it wasn't set already, then this will return "
9165 #: ../fish/guestfish-actions.pod:1556
9170 #: ../fish/guestfish-actions.pod:1558
9178 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2502
9179 msgid "This returns the process group flag."
9183 #: ../fish/guestfish-actions.pod:1562
9188 #: ../fish/guestfish-actions.pod:1564
9193 #: ../fish/guestfish-actions.pod:1566
9201 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2513
9203 "Return the process ID of the qemu subprocess. If there is no qemu "
9204 "subprocess, then this will return an error."
9208 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2516
9209 msgid "This is an internal call used for debugging and testing."
9213 #: ../fish/guestfish-actions.pod:1573
9218 #: ../fish/guestfish-actions.pod:1575
9226 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2527
9227 msgid "Return the current qemu binary."
9231 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2529
9233 "This is always non-NULL. If it wasn't set already, then this will return "
9234 "the default qemu binary name."
9238 #: ../fish/guestfish-actions.pod:1582
9239 msgid "get-recovery-proc"
9243 #: ../fish/guestfish-actions.pod:1584
9246 " get-recovery-proc\n"
9251 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2542
9252 msgid "Return the recovery process enabled flag."
9256 #: ../fish/guestfish-actions.pod:1588
9261 #: ../fish/guestfish-actions.pod:1590
9269 #: ../fish/guestfish-actions.pod:1592
9271 "This returns the current setting of the selinux flag which is passed to the "
9272 "appliance at boot time. See L</set-selinux>."
9276 #: ../fish/guestfish-actions.pod:1598
9281 #: ../fish/guestfish-actions.pod:1600
9289 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2568
9290 msgid "This returns the number of virtual CPUs assigned to the appliance."
9294 #: ../fish/guestfish-actions.pod:1604
9299 #: ../fish/guestfish-actions.pod:1606
9307 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2579
9309 "This returns the current state as an opaque integer. This is only useful "
9310 "for printing debug and internal error messages."
9314 #: ../fish/guestfish-actions.pod:1611 ../fish/guestfish-actions.pod:2574 ../fish/guestfish-actions.pod:2592 ../fish/guestfish-actions.pod:2630 ../fish/guestfish-actions.pod:2646 ../src/guestfs-actions.pod:2582 ../src/guestfs-actions.pod:3905 ../src/guestfs-actions.pod:3934 ../src/guestfs-actions.pod:3995 ../src/guestfs-actions.pod:4022
9315 msgid "For more information on states, see L<guestfs(3)>."
9319 #: ../fish/guestfish-actions.pod:1613
9324 #: ../fish/guestfish-actions.pod:1615
9332 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2593
9333 msgid "Return the command trace flag."
9337 #: ../fish/guestfish-actions.pod:1619
9342 #: ../fish/guestfish-actions.pod:1621
9350 #: ../fish/guestfish-actions.pod:1623
9352 "Return the current umask. By default the umask is C<022> unless it has been "
9353 "set by calling L</umask>."
9357 #: ../fish/guestfish-actions.pod:1626
9362 #: ../fish/guestfish-actions.pod:1628
9370 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2616
9371 msgid "This returns the verbose messages flag."
9375 #: ../fish/guestfish-actions.pod:1632
9380 #: ../fish/guestfish-actions.pod:1634
9388 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2627
9389 msgid "This gets the SELinux security context of the daemon."
9393 #: ../fish/guestfish-actions.pod:1638
9394 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9398 #: ../fish/guestfish-actions.pod:1641
9403 #: ../fish/guestfish-actions.pod:1643
9406 " getxattr path name\n"
9411 #: ../fish/guestfish-actions.pod:1645
9413 "Get a single extended attribute from file C<path> named C<name>. This call "
9414 "follows symlinks. If you want to lookup an extended attribute for the "
9415 "symlink itself, use L</lgetxattr>."
9419 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2719
9421 "Normally it is better to get all extended attributes from a file in one go "
9422 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9423 "buggy and do not provide a way to list out attributes. For these "
9424 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9425 "attributes you want in advance and call this function."
9429 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2726 ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:4155
9431 "Extended attribute values are blobs of binary data. If there is no extended "
9432 "attribute named C<name>, this returns an error."
9436 #: ../fish/guestfish-actions.pod:1659
9437 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9441 #: ../fish/guestfish-actions.pod:1661
9446 #: ../fish/guestfish-actions.pod:1663
9454 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2673
9455 msgid "This call lists the extended attributes of the file or directory C<path>."
9459 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2676
9461 "At the system call level, this is a combination of the L<listxattr(2)> and "
9462 "L<getxattr(2)> calls."
9466 #: ../fish/guestfish-actions.pod:1671
9467 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9471 #: ../fish/guestfish-actions.pod:1673
9476 #: ../fish/guestfish-actions.pod:1675
9479 " glob-expand pattern\n"
9484 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2693
9486 "This command searches for all the pathnames matching C<pattern> according to "
9487 "the wildcard expansion rules used by the shell."
9491 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2697
9492 msgid "If no paths match, then this returns an empty list (note: not an error)."
9496 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2700
9498 "It is just a wrapper around the C L<glob(3)> function with flags "
9499 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
9503 #: ../fish/guestfish-actions.pod:1688
9508 #: ../fish/guestfish-actions.pod:1690
9511 " grep regex path\n"
9516 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2717
9517 msgid "This calls the external C<grep> program and returns the matching lines."
9521 #: ../fish/guestfish-actions.pod:1698
9526 #: ../fish/guestfish-actions.pod:1700
9529 " grepi regex path\n"
9534 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2736
9535 msgid "This calls the external C<grep -i> program and returns the matching lines."
9539 #: ../fish/guestfish-actions.pod:1708
9540 msgid "grub-install"
9544 #: ../fish/guestfish-actions.pod:1710
9547 " grub-install root device\n"
9552 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2755
9554 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9555 "with the root directory being C<root>."
9559 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2764
9561 "There is currently no way in the API to install grub2, which is used by most "
9562 "modern Linux guests. It is possible to run the grub2 command from the "
9563 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9567 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2771
9569 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9570 "compatible with itself, so this only works in rather narrow circumstances. "
9571 "Careful testing with each guest version is advisable."
9575 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2778
9577 "If grub-install reports the error \"No suitable drive was found in the "
9578 "generated device map.\" it may be that you need to create a "
9579 "C</boot/grub/device.map> file first that contains the mapping between grub "
9580 "device names and Linux device names. It is usually sufficient to create a "
9585 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2785
9593 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2787
9594 msgid "replacing C</dev/vda> with the name of the installation device."
9598 #: ../fish/guestfish-actions.pod:1748
9603 #: ../fish/guestfish-actions.pod:1750
9611 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2801
9613 "This command returns up to the first 10 lines of a file as a list of "
9618 #: ../fish/guestfish-actions.pod:1758
9623 #: ../fish/guestfish-actions.pod:1760
9626 " head-n nrlines path\n"
9631 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2820
9633 "If the parameter C<nrlines> is a positive number, this returns the first "
9634 "C<nrlines> lines of the file C<path>."
9638 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2823
9640 "If the parameter C<nrlines> is a negative number, this returns lines from "
9641 "the file C<path>, excluding the last C<nrlines> lines."
9645 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4951 ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:7626
9646 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9650 #: ../fish/guestfish-actions.pod:1773
9655 #: ../fish/guestfish-actions.pod:1775
9663 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2843
9665 "This runs C<hexdump -C> on the given C<path>. The result is the "
9666 "human-readable, canonical hex dump of the file."
9670 #: ../fish/guestfish-actions.pod:1783
9675 #: ../fish/guestfish-actions.pod:1785
9678 " initrd-cat initrdpath filename\n"
9683 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2862
9685 "This command unpacks the file C<filename> from the initrd file called "
9686 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9691 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2866
9693 "For example, in guestfish you could use the following command to examine the "
9694 "boot script (usually called C</init>) contained in a Linux initrd or "
9699 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2870
9702 " initrd-cat /boot/initrd-<version>.img init\n"
9707 #: ../fish/guestfish-actions.pod:1797
9708 msgid "See also L</initrd-list>."
9712 #: ../fish/guestfish-actions.pod:1802
9717 #: ../fish/guestfish-actions.pod:1804
9720 " initrd-list path\n"
9725 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2889
9726 msgid "This command lists out files contained in an initrd."
9730 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2891
9732 "The files are listed without any initial C</> character. The files are "
9733 "listed in the order they appear (not necessarily alphabetical). Directory "
9734 "names are listed as separate items."
9738 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2895
9740 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9741 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9746 #: ../fish/guestfish-actions.pod:1816
9747 msgid "inotify-add-watch"
9751 #: ../fish/guestfish-actions.pod:1818
9754 " inotify-add-watch path mask\n"
9759 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2912
9760 msgid "Watch C<path> for the events listed in C<mask>."
9764 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2914
9766 "Note that if C<path> is a directory then events within that directory are "
9767 "watched, but this does I<not> happen recursively (in subdirectories)."
9771 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2918
9773 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9774 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9778 #: ../fish/guestfish-actions.pod:1830
9779 msgid "inotify-close"
9783 #: ../fish/guestfish-actions.pod:1832
9791 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2931
9793 "This closes the inotify handle which was previously opened by inotify_init. "
9794 "It removes all watches, throws away any pending events, and deallocates all "
9799 #: ../fish/guestfish-actions.pod:1838
9800 msgid "inotify-files"
9804 #: ../fish/guestfish-actions.pod:1840
9812 #: ../fish/guestfish-actions.pod:1842
9814 "This function is a helpful wrapper around L</inotify-read> which just "
9815 "returns a list of pathnames of objects that were touched. The returned "
9816 "pathnames are sorted and deduplicated."
9820 #: ../fish/guestfish-actions.pod:1846
9821 msgid "inotify-init"
9825 #: ../fish/guestfish-actions.pod:1848
9828 " inotify-init maxevents\n"
9833 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2960
9835 "This command creates a new inotify handle. The inotify subsystem can be "
9836 "used to notify events which happen to objects in the guest filesystem."
9840 #: ../fish/guestfish-actions.pod:1854
9842 "C<maxevents> is the maximum number of events which will be queued up between "
9843 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9844 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9845 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9846 "but records the fact that it threw them away by setting a flag "
9847 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9851 #: ../fish/guestfish-actions.pod:1864
9853 "Before any events are generated, you have to add some watches to the "
9854 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9855 "L</inotify-watch-all>."
9859 #: ../fish/guestfish-actions.pod:1870
9861 "Queued up events should be read periodically by calling L</inotify-read> (or "
9862 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9863 "If you don't read the events out often enough then you risk the internal "
9864 "queue overflowing."
9868 #: ../fish/guestfish-actions.pod:1877
9870 "The handle should be closed after use by calling L</inotify-close>. This "
9871 "also removes any watches automatically."
9875 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2991
9877 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9878 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9879 "that there is one global inotify handle per libguestfs instance."
9883 #: ../fish/guestfish-actions.pod:1886
9884 msgid "inotify-read"
9888 #: ../fish/guestfish-actions.pod:1888
9896 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:3005
9898 "Return the complete queue of events that have happened since the previous "
9903 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3008
9904 msgid "If no events have happened, this returns an empty list."
9908 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3010
9910 "I<Note>: In order to make sure that all events have been read, you must call "
9911 "this function repeatedly until it returns an empty list. The reason is that "
9912 "the call will read events up to the maximum appliance-to-host message size "
9913 "and leave remaining events in the queue."
9917 #: ../fish/guestfish-actions.pod:1901
9918 msgid "inotify-rm-watch"
9922 #: ../fish/guestfish-actions.pod:1903
9925 " inotify-rm-watch wd\n"
9930 #: ../fish/guestfish-actions.pod:1905
9931 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9935 #: ../fish/guestfish-actions.pod:1908
9936 msgid "inspect-get-arch"
9940 #: ../fish/guestfish-actions.pod:1910
9943 " inspect-get-arch root\n"
9948 #: ../fish/guestfish-actions.pod:1912
9950 "This returns the architecture of the inspected operating system. The "
9951 "possible return values are listed under L</file-architecture>."
9955 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3045
9957 "If the architecture could not be determined, then the string C<unknown> is "
9962 #: ../fish/guestfish-actions.pod:1919 ../fish/guestfish-actions.pod:2014 ../fish/guestfish-actions.pod:2093 ../fish/guestfish-actions.pod:2105 ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2251 ../fish/guestfish-actions.pod:2272 ../fish/guestfish-actions.pod:2286 ../fish/guestfish-actions.pod:2326 ../fish/guestfish-actions.pod:2366 ../fish/guestfish-actions.pod:2379 ../fish/guestfish-actions.pod:2392 ../fish/guestfish-actions.pod:2402 ../fish/guestfish-actions.pod:2412 ../fish/guestfish-actions.pod:2424 ../fish/guestfish-actions.pod:2520 ../fish/guestfish-actions.pod:2554 ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3150 ../src/guestfs-actions.pod:3254 ../src/guestfs-actions.pod:3273 ../src/guestfs-actions.pod:3404 ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3516 ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:3590 ../src/guestfs-actions.pod:3638 ../src/guestfs-actions.pod:3658 ../src/guestfs-actions.pod:3678 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3729 ../src/guestfs-actions.pod:3831 ../src/guestfs-actions.pod:3872
9963 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9967 #: ../fish/guestfish-actions.pod:1921
9968 msgid "inspect-get-distro"
9972 #: ../fish/guestfish-actions.pod:1923
9975 " inspect-get-distro root\n"
9980 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3061
9981 msgid "This returns the distro (distribution) of the inspected operating system."
9985 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3064
9986 msgid "Currently defined distros are:"
9990 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3068
9991 msgid "\"archlinux\""
9995 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3070
10000 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3072
10005 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3074
10010 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3076
10015 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3078
10020 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3080
10025 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3082
10030 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3084
10035 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3086
10040 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3088
10041 msgid "\"linuxmint\""
10045 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3090
10046 msgid "Linux Mint."
10050 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3092
10055 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3094
10060 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3096
10061 msgid "\"mandriva\""
10065 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3098
10070 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3100
10075 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3102
10080 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3104
10081 msgid "\"opensuse\""
10085 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3106
10090 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3108
10095 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3110
10100 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3112
10101 msgid "\"redhat-based\""
10105 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3114
10106 msgid "Some Red Hat-derived distro."
10110 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3116
10115 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3118
10116 msgid "Red Hat Enterprise Linux."
10120 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3120
10121 msgid "\"scientificlinux\""
10125 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3122
10126 msgid "Scientific Linux."
10130 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3124
10131 msgid "\"slackware\""
10135 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3126
10140 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3128
10141 msgid "\"ttylinux\""
10145 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3130
10150 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3132
10155 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3134
10160 #: ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2084 ../fish/guestfish-actions.pod:2357 ../src/guestfs-actions.pod:3136 ../src/guestfs-actions.pod:3245 ../src/guestfs-actions.pod:3629
10161 msgid "\"unknown\""
10165 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3138
10166 msgid "The distro could not be determined."
10170 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341 ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3613
10171 msgid "\"windows\""
10175 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3142
10177 "Windows does not have distributions. This string is returned if the OS type "
10182 #: ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2090 ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3147 ../src/guestfs-actions.pod:3251 ../src/guestfs-actions.pod:3635
10184 "Future versions of libguestfs may return other strings here. The caller "
10185 "should be prepared to handle any string."
10189 #: ../fish/guestfish-actions.pod:2016
10190 msgid "inspect-get-drive-mappings"
10194 #: ../fish/guestfish-actions.pod:2018
10197 " inspect-get-drive-mappings root\n"
10202 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3163
10204 "This call is useful for Windows which uses a primitive system of assigning "
10205 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10206 "Windows Registry to find out how disks/partitions are mapped to drive "
10207 "letters, and returns a hash table as in the example below:"
10211 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3169
10214 " C => /dev/vda2\n"
10215 " E => /dev/vdb1\n"
10216 " F => /dev/vdc1\n"
10221 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3173
10223 "Note that keys are drive letters. For Windows, the key is case insensitive "
10224 "and just contains the drive letter, without the customary colon separator "
10229 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3177
10231 "In future we may support other operating systems that also used drive "
10232 "letters, but the keys for those might not be case insensitive and might be "
10233 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10238 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3182
10240 "For Windows guests, currently only hard drive mappings are returned. "
10241 "Removable disks (eg. DVD-ROMs) are ignored."
10245 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3185
10247 "For guests that do not use drive mappings, or if the drive mappings could "
10248 "not be determined, this returns an empty hash table."
10252 #: ../fish/guestfish-actions.pod:2045
10254 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10255 "L</inspect-get-mountpoints>, L</inspect-get-filesystems>."
10259 #: ../fish/guestfish-actions.pod:2049
10260 msgid "inspect-get-filesystems"
10264 #: ../fish/guestfish-actions.pod:2051
10267 " inspect-get-filesystems root\n"
10272 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3206
10274 "This returns a list of all the filesystems that we think are associated with "
10275 "this operating system. This includes the root filesystem, other ordinary "
10276 "filesystems, and non-mounted devices like swap partitions."
10280 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3211
10282 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10283 "to be shared between operating systems."
10287 #: ../fish/guestfish-actions.pod:2061
10289 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10290 "L</inspect-get-mountpoints>."
10294 #: ../fish/guestfish-actions.pod:2064
10295 msgid "inspect-get-format"
10299 #: ../fish/guestfish-actions.pod:2066
10302 " inspect-get-format root\n"
10307 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3229
10309 "This returns the format of the inspected operating system. You can use it "
10310 "to detect install images, live CDs and similar."
10314 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3232
10315 msgid "Currently defined formats are:"
10319 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3236
10320 msgid "\"installed\""
10324 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3238
10325 msgid "This is an installed operating system."
10329 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3240
10330 msgid "\"installer\""
10334 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3242
10336 "The disk image being inspected is not an installed operating system, but a "
10337 "I<bootable> install disk, live CD, or similar."
10341 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3247
10342 msgid "The format of this disk image is not known."
10346 #: ../fish/guestfish-actions.pod:2095
10347 msgid "inspect-get-hostname"
10351 #: ../fish/guestfish-actions.pod:2097
10354 " inspect-get-hostname root\n"
10359 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3267
10361 "This function returns the hostname of the operating system as found by "
10362 "inspection of the guest's configuration files."
10366 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3270
10368 "If the hostname could not be determined, then the string C<unknown> is "
10373 #: ../fish/guestfish-actions.pod:2107
10374 msgid "inspect-get-icon"
10378 #: ../fish/guestfish-actions.pod:2109
10381 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
10386 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3296
10388 "This function returns an icon corresponding to the inspected operating "
10389 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10390 "to PNG if necessary)."
10394 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3300
10396 "If it was not possible to get an icon this function returns a zero-length "
10397 "(non-NULL) buffer. I<Callers must check for this case>."
10401 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3303
10403 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10404 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10405 "this file will be returned. You can disable favicons by passing the "
10406 "optional C<favicon> boolean as false (default is true)."
10410 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3309
10412 "If finding the favicon fails, then we look in other places in the guest for "
10417 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3312
10419 "If the optional C<highquality> boolean is true then only high quality icons "
10420 "are returned, which means only icons of high resolution with an alpha "
10421 "channel. The default (false) is to return any icon we can, even if it is of "
10422 "substandard quality."
10426 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3323
10428 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10429 "before you call this, since it needs to read information from the guest "
10430 "filesystem during the call."
10434 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3329
10436 "B<Security:> The icon data comes from the untrusted guest, and should be "
10437 "treated with caution. PNG files have been known to contain exploits. "
10438 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10439 "trying to process or display the icon."
10443 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3337
10445 "The PNG image returned can be any size. It might not be square. Libguestfs "
10446 "tries to return the largest, highest quality icon available. The "
10447 "application must scale the icon to the required size."
10451 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3344
10453 "Extracting icons from Windows guests requires the external C<wrestool> "
10454 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10455 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10456 "installed separately."
10460 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3351
10462 "Operating system icons are usually trademarks. Seek legal advice before "
10463 "using trademarks in applications."
10467 #: ../fish/guestfish-actions.pod:2173
10468 msgid "inspect-get-major-version"
10472 #: ../fish/guestfish-actions.pod:2175
10475 " inspect-get-major-version root\n"
10480 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3392
10481 msgid "This returns the major version number of the inspected operating system."
10485 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3395
10487 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10488 "popular public names used by the operating system. Notably the operating "
10489 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10490 "1). You can find out the real versions corresponding to releases of Windows "
10491 "by consulting Wikipedia or MSDN."
10495 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198 ../src/guestfs-actions.pod:3402 ../src/guestfs-actions.pod:3419
10496 msgid "If the version could not be determined, then C<0> is returned."
10500 #: ../fish/guestfish-actions.pod:2191
10501 msgid "inspect-get-minor-version"
10505 #: ../fish/guestfish-actions.pod:2193
10508 " inspect-get-minor-version root\n"
10513 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3416
10514 msgid "This returns the minor version number of the inspected operating system."
10518 #: ../fish/guestfish-actions.pod:2200
10520 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10521 "L</inspect-get-major-version>."
10525 #: ../fish/guestfish-actions.pod:2203
10526 msgid "inspect-get-mountpoints"
10530 #: ../fish/guestfish-actions.pod:2205
10533 " inspect-get-mountpoints root\n"
10538 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3434
10540 "This returns a hash of where we think the filesystems associated with this "
10541 "operating system should be mounted. Callers should note that this is at "
10542 "best an educated guess made by reading configuration files such as "
10543 "C</etc/fstab>. I<In particular note> that this may return filesystems which "
10544 "are non-existent or not mountable and callers should be prepared to handle "
10545 "or ignore failures if they try to mount them."
10549 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3443
10551 "Each element in the returned hashtable has a key which is the path of the "
10552 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10553 "mounted there (eg. C</dev/sda1>)."
10557 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3448
10558 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
10562 #: ../fish/guestfish-actions.pod:2224
10564 "For operating systems like Windows which still use drive letters, this call "
10565 "will only return an entry for the first drive \"mounted on\" C</>. For "
10566 "information about the mapping of drive letters to partitions, see "
10567 "L</inspect-get-drive-mappings>."
10571 #: ../fish/guestfish-actions.pod:2230
10573 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10574 "L</inspect-get-filesystems>."
10578 #: ../fish/guestfish-actions.pod:2233
10579 msgid "inspect-get-package-format"
10583 #: ../fish/guestfish-actions.pod:2235
10586 " inspect-get-package-format root\n"
10591 #: ../fish/guestfish-actions.pod:2237
10593 "This function and L</inspect-get-package-management> return the package "
10594 "format and package management tool used by the inspected operating system. "
10595 "For example for Fedora these functions would return C<rpm> (package format) "
10596 "and C<yum> (package management)."
10600 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3480
10602 "This returns the string C<unknown> if we could not determine the package "
10603 "format I<or> if the operating system does not have a real packaging system "
10608 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3484
10610 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10611 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10615 #: ../fish/guestfish-actions.pod:2253
10616 msgid "inspect-get-package-management"
10620 #: ../fish/guestfish-actions.pod:2255
10623 " inspect-get-package-management root\n"
10628 #: ../fish/guestfish-actions.pod:2257
10630 "L</inspect-get-package-format> and this function return the package format "
10631 "and package management tool used by the inspected operating system. For "
10632 "example for Fedora these functions would return C<rpm> (package format) and "
10633 "C<yum> (package management)."
10637 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3507
10639 "This returns the string C<unknown> if we could not determine the package "
10640 "management tool I<or> if the operating system does not have a real packaging "
10641 "system (eg. Windows)."
10645 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3511
10647 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10648 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10649 "versions of libguestfs may return other strings."
10653 #: ../fish/guestfish-actions.pod:2274
10654 msgid "inspect-get-product-name"
10658 #: ../fish/guestfish-actions.pod:2276
10661 " inspect-get-product-name root\n"
10666 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3529
10668 "This returns the product name of the inspected operating system. The "
10669 "product name is generally some freeform string which can be displayed to the "
10670 "user, but should not be parsed by programs."
10674 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3534
10676 "If the product name could not be determined, then the string C<unknown> is "
10681 #: ../fish/guestfish-actions.pod:2288
10682 msgid "inspect-get-product-variant"
10686 #: ../fish/guestfish-actions.pod:2290
10689 " inspect-get-product-variant root\n"
10694 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3550
10695 msgid "This returns the product variant of the inspected operating system."
10699 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3553
10701 "For Windows guests, this returns the contents of the Registry key "
10702 "C<HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> "
10703 "which is usually a string such as C<Client> or C<Server> (other values are "
10704 "possible). This can be used to distinguish consumer and enterprise versions "
10705 "of Windows that have the same version number (for example, Windows 7 and "
10706 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10707 "the latter is C<Server>)."
10711 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3562
10713 "For enterprise Linux guests, in future we intend this to return the product "
10714 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10715 "implemented at present."
10719 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3566
10721 "If the product variant could not be determined, then the string C<unknown> "
10726 #: ../fish/guestfish-actions.pod:2311
10728 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10729 "L</inspect-get-product-name>, L</inspect-get-major-version>."
10733 #: ../fish/guestfish-actions.pod:2315
10734 msgid "inspect-get-roots"
10738 #: ../fish/guestfish-actions.pod:2317
10741 " inspect-get-roots\n"
10746 #: ../fish/guestfish-actions.pod:2319
10748 "This function is a convenient way to get the list of root devices, as "
10749 "returned from a previous call to L</inspect-os>, but without redoing the "
10750 "whole inspection process."
10754 #: ../fish/guestfish-actions.pod:2323
10756 "This returns an empty list if either no root devices were found or the "
10757 "caller has not called L</inspect-os>."
10761 #: ../fish/guestfish-actions.pod:2328
10762 msgid "inspect-get-type"
10766 #: ../fish/guestfish-actions.pod:2330
10769 " inspect-get-type root\n"
10774 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3604
10776 "This returns the type of the inspected operating system. Currently defined "
10781 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3609
10786 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3611
10787 msgid "Any Linux-based operating system."
10791 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3615
10792 msgid "Any Microsoft Windows operating system."
10796 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3617
10797 msgid "\"freebsd\""
10801 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3619
10806 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3621
10811 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3623
10816 #: ../fish/guestfish-actions.pod:2353 ../src/guestfs-actions.pod:3625
10821 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3627
10826 #: ../fish/guestfish-actions.pod:2359 ../src/guestfs-actions.pod:3631
10827 msgid "The operating system type could not be determined."
10831 #: ../fish/guestfish-actions.pod:2368
10832 msgid "inspect-get-windows-current-control-set"
10836 #: ../fish/guestfish-actions.pod:2370
10839 " inspect-get-windows-current-control-set root\n"
10844 #: ../fish/guestfish-actions.pod:2372 ../src/guestfs-actions.pod:3651
10846 "This returns the Windows CurrentControlSet of the inspected guest. The "
10847 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10851 #: ../fish/guestfish-actions.pod:2375 ../src/guestfs-actions.pod:3654
10853 "This call assumes that the guest is Windows and that the Registry could be "
10854 "examined by inspection. If this is not the case then an error is returned."
10858 #: ../fish/guestfish-actions.pod:2381
10859 msgid "inspect-get-windows-systemroot"
10863 #: ../fish/guestfish-actions.pod:2383
10866 " inspect-get-windows-systemroot root\n"
10871 #: ../fish/guestfish-actions.pod:2385 ../src/guestfs-actions.pod:3671
10873 "This returns the Windows systemroot of the inspected guest. The systemroot "
10874 "is a directory path such as C</WINDOWS>."
10878 #: ../fish/guestfish-actions.pod:2388 ../src/guestfs-actions.pod:3674
10880 "This call assumes that the guest is Windows and that the systemroot could be "
10881 "determined by inspection. If this is not the case then an error is "
10886 #: ../fish/guestfish-actions.pod:2394
10887 msgid "inspect-is-live"
10891 #: ../fish/guestfish-actions.pod:2396
10894 " inspect-is-live root\n"
10899 #: ../fish/guestfish-actions.pod:2398
10901 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10902 "then this returns true if a live image was detected on the disk."
10906 #: ../fish/guestfish-actions.pod:2404
10907 msgid "inspect-is-multipart"
10911 #: ../fish/guestfish-actions.pod:2406
10914 " inspect-is-multipart root\n"
10919 #: ../fish/guestfish-actions.pod:2408
10921 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10922 "then this returns true if the disk is part of a set."
10926 #: ../fish/guestfish-actions.pod:2414
10927 msgid "inspect-is-netinst"
10931 #: ../fish/guestfish-actions.pod:2416
10934 " inspect-is-netinst root\n"
10939 #: ../fish/guestfish-actions.pod:2418
10941 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10942 "then this returns true if the disk is a network installer, ie. not a "
10943 "self-contained install CD but one which is likely to require network access "
10944 "to complete the install."
10948 #: ../fish/guestfish-actions.pod:2426
10949 msgid "inspect-list-applications"
10953 #: ../fish/guestfish-actions.pod:2428
10956 " inspect-list-applications root\n"
10961 #: ../fish/guestfish-actions.pod:2430 ../src/guestfs-actions.pod:3741
10962 msgid "Return the list of applications installed in the operating system."
10966 #: ../fish/guestfish-actions.pod:2432
10968 "I<Note:> This call works differently from other parts of the inspection "
10969 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10970 "then mount up the disks, before calling this. Listing applications is a "
10971 "significantly more difficult operation which requires access to the full "
10972 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10973 "are just returning data cached in the libguestfs handle, this call actually "
10974 "reads parts of the mounted filesystems during the call."
10978 #: ../fish/guestfish-actions.pod:2442 ../src/guestfs-actions.pod:3753
10980 "This returns an empty list if the inspection code was not able to determine "
10981 "the list of applications."
10985 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3756
10986 msgid "The application structure contains the following fields:"
10990 #: ../fish/guestfish-actions.pod:2449 ../src/guestfs-actions.pod:3760
10991 msgid "C<app_name>"
10995 #: ../fish/guestfish-actions.pod:2451 ../src/guestfs-actions.pod:3762
10997 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10998 "guests, this is the package name."
11002 #: ../fish/guestfish-actions.pod:2454 ../src/guestfs-actions.pod:3765
11003 msgid "C<app_display_name>"
11007 #: ../fish/guestfish-actions.pod:2456 ../src/guestfs-actions.pod:3767
11009 "The display name of the application, sometimes localized to the install "
11010 "language of the guest operating system."
11014 #: ../fish/guestfish-actions.pod:2459 ../src/guestfs-actions.pod:3770
11016 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11017 "to display something can use C<app_name> instead."
11021 #: ../fish/guestfish-actions.pod:2462 ../src/guestfs-actions.pod:3773
11022 msgid "C<app_epoch>"
11026 #: ../fish/guestfish-actions.pod:2464 ../src/guestfs-actions.pod:3775
11028 "For package managers which use epochs, this contains the epoch of the "
11029 "package (an integer). If unavailable, this is returned as C<0>."
11033 #: ../fish/guestfish-actions.pod:2467 ../src/guestfs-actions.pod:3778
11034 msgid "C<app_version>"
11038 #: ../fish/guestfish-actions.pod:2469 ../src/guestfs-actions.pod:3780
11040 "The version string of the application or package. If unavailable this is "
11041 "returned as an empty string C<\"\">."
11045 #: ../fish/guestfish-actions.pod:2472 ../src/guestfs-actions.pod:3783
11046 msgid "C<app_release>"
11050 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3785
11052 "The release string of the application or package, for package managers that "
11053 "use this. If unavailable this is returned as an empty string C<\"\">."
11057 #: ../fish/guestfish-actions.pod:2478 ../src/guestfs-actions.pod:3789
11058 msgid "C<app_install_path>"
11062 #: ../fish/guestfish-actions.pod:2480 ../src/guestfs-actions.pod:3791
11064 "The installation path of the application (on operating systems such as "
11065 "Windows which use installation paths). This path is in the format used by "
11066 "the guest operating system, it is not a libguestfs path."
11070 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3796
11071 msgid "If unavailable this is returned as an empty string C<\"\">."
11075 #: ../fish/guestfish-actions.pod:2487 ../src/guestfs-actions.pod:3798
11076 msgid "C<app_trans_path>"
11080 #: ../fish/guestfish-actions.pod:2489 ../src/guestfs-actions.pod:3800
11082 "The install path translated into a libguestfs path. If unavailable this is "
11083 "returned as an empty string C<\"\">."
11087 #: ../fish/guestfish-actions.pod:2492 ../src/guestfs-actions.pod:3803
11088 msgid "C<app_publisher>"
11092 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3805
11094 "The name of the publisher of the application, for package managers that use "
11095 "this. If unavailable this is returned as an empty string C<\"\">."
11099 #: ../fish/guestfish-actions.pod:2498 ../src/guestfs-actions.pod:3809
11104 #: ../fish/guestfish-actions.pod:2500 ../src/guestfs-actions.pod:3811
11106 "The URL (eg. upstream URL) of the application. If unavailable this is "
11107 "returned as an empty string C<\"\">."
11111 #: ../fish/guestfish-actions.pod:2503 ../src/guestfs-actions.pod:3814
11112 msgid "C<app_source_package>"
11116 #: ../fish/guestfish-actions.pod:2505 ../src/guestfs-actions.pod:3816
11118 "For packaging systems which support this, the name of the source package. "
11119 "If unavailable this is returned as an empty string C<\"\">."
11123 #: ../fish/guestfish-actions.pod:2508 ../src/guestfs-actions.pod:3819
11124 msgid "C<app_summary>"
11128 #: ../fish/guestfish-actions.pod:2510 ../src/guestfs-actions.pod:3821
11130 "A short (usually one line) description of the application or package. If "
11131 "unavailable this is returned as an empty string C<\"\">."
11135 #: ../fish/guestfish-actions.pod:2513 ../src/guestfs-actions.pod:3824
11136 msgid "C<app_description>"
11140 #: ../fish/guestfish-actions.pod:2515 ../src/guestfs-actions.pod:3826
11142 "A longer description of the application or package. If unavailable this is "
11143 "returned as an empty string C<\"\">."
11147 #: ../fish/guestfish-actions.pod:2522
11152 #: ../fish/guestfish-actions.pod:2524
11160 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3844
11162 "This function uses other libguestfs functions and certain heuristics to "
11163 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11164 "for operating systems."
11168 #: ../fish/guestfish-actions.pod:2530 ../src/guestfs-actions.pod:3848
11169 msgid "The list returned is empty if no operating systems were found."
11173 #: ../fish/guestfish-actions.pod:2532 ../src/guestfs-actions.pod:3850
11175 "If one operating system was found, then this returns a list with a single "
11176 "element, which is the name of the root filesystem of this operating system. "
11177 "It is also possible for this function to return a list containing more than "
11178 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11179 "element being the root filesystem of one of the operating systems."
11183 #: ../fish/guestfish-actions.pod:2539
11185 "You can pass the root string(s) returned to other L</inspect-get-*> "
11186 "functions in order to query further information about each operating system, "
11187 "such as the name and version."
11191 #: ../fish/guestfish-actions.pod:2544
11193 "This function uses other libguestfs features such as L</mount-ro> and "
11194 "L</umount-all> in order to mount and unmount filesystems and look at the "
11195 "contents. This should be called with no disks currently mounted. The "
11196 "function may also use Augeas, so any existing Augeas handle will be closed."
11200 #: ../fish/guestfish-actions.pod:2550 ../src/guestfs-actions.pod:3868
11202 "This function cannot decrypt encrypted disks. The caller must do that first "
11203 "(supplying the necessary keys) if the disk is encrypted."
11207 #: ../fish/guestfish-actions.pod:2556 ../fish/guestfish-actions.pod:2754 ../fish/guestfish-actions.pod:2819
11208 msgid "See also L</list-filesystems>."
11212 #: ../fish/guestfish-actions.pod:2558
11213 msgid "is-blockdev"
11217 #: ../fish/guestfish-actions.pod:2560
11220 " is-blockdev path\n"
11225 #: ../fish/guestfish-actions.pod:2562 ../src/guestfs-actions.pod:3888
11227 "This returns C<true> if and only if there is a block device with the given "
11232 #: ../fish/guestfish-actions.pod:2565 ../fish/guestfish-actions.pod:2583 ../fish/guestfish-actions.pod:2602 ../fish/guestfish-actions.pod:2611 ../fish/guestfish-actions.pod:2621 ../fish/guestfish-actions.pod:2655 ../fish/guestfish-actions.pod:2664
11233 msgid "See also L</stat>."
11237 #: ../fish/guestfish-actions.pod:2567
11242 #: ../fish/guestfish-actions.pod:2569
11250 #: ../fish/guestfish-actions.pod:2571 ../src/guestfs-actions.pod:3902
11252 "This returns true iff this handle is busy processing a command (in the "
11257 #: ../fish/guestfish-actions.pod:2576
11262 #: ../fish/guestfish-actions.pod:2578
11265 " is-chardev path\n"
11270 #: ../fish/guestfish-actions.pod:2580 ../src/guestfs-actions.pod:3917
11272 "This returns C<true> if and only if there is a character device with the "
11273 "given C<path> name."
11277 #: ../fish/guestfish-actions.pod:2585
11282 #: ../fish/guestfish-actions.pod:2587
11290 #: ../fish/guestfish-actions.pod:2589 ../src/guestfs-actions.pod:3931
11292 "This returns true iff this handle is being configured (in the C<CONFIG> "
11297 #: ../fish/guestfish-actions.pod:2594
11302 #: ../fish/guestfish-actions.pod:2596
11310 #: ../fish/guestfish-actions.pod:2598 ../src/guestfs-actions.pod:3946
11312 "This returns C<true> if and only if there is a directory with the given "
11313 "C<path> name. Note that it returns false for other objects like files."
11317 #: ../fish/guestfish-actions.pod:2604
11322 #: ../fish/guestfish-actions.pod:2606
11330 #: ../fish/guestfish-actions.pod:2608 ../src/guestfs-actions.pod:3962
11332 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11333 "given C<path> name."
11337 #: ../fish/guestfish-actions.pod:2613
11342 #: ../fish/guestfish-actions.pod:2615
11350 #: ../fish/guestfish-actions.pod:2617 ../src/guestfs-actions.pod:3977
11352 "This returns C<true> if and only if there is a regular file with the given "
11353 "C<path> name. Note that it returns false for other objects like "
11358 #: ../fish/guestfish-actions.pod:2623
11359 msgid "is-launching"
11363 #: ../fish/guestfish-actions.pod:2625
11371 #: ../fish/guestfish-actions.pod:2627 ../src/guestfs-actions.pod:3992
11373 "This returns true iff this handle is launching the subprocess (in the "
11374 "C<LAUNCHING> state)."
11378 #: ../fish/guestfish-actions.pod:2632
11383 #: ../fish/guestfish-actions.pod:2634
11391 #: ../fish/guestfish-actions.pod:2636 ../src/guestfs-actions.pod:4007
11393 "This command tests whether C<device> is a logical volume, and returns true "
11394 "iff this is the case."
11398 #: ../fish/guestfish-actions.pod:2639
11403 #: ../fish/guestfish-actions.pod:2641
11411 #: ../fish/guestfish-actions.pod:2643 ../src/guestfs-actions.pod:4019
11413 "This returns true iff this handle is ready to accept commands (in the "
11418 #: ../fish/guestfish-actions.pod:2648
11423 #: ../fish/guestfish-actions.pod:2650
11426 " is-socket path\n"
11431 #: ../fish/guestfish-actions.pod:2652 ../src/guestfs-actions.pod:4034
11433 "This returns C<true> if and only if there is a Unix domain socket with the "
11434 "given C<path> name."
11438 #: ../fish/guestfish-actions.pod:2657
11443 #: ../fish/guestfish-actions.pod:2659
11446 " is-symlink path\n"
11451 #: ../fish/guestfish-actions.pod:2661 ../src/guestfs-actions.pod:4049
11453 "This returns C<true> if and only if there is a symbolic link with the given "
11458 #: ../fish/guestfish-actions.pod:2666
11463 #: ../fish/guestfish-actions.pod:2668
11471 #: ../fish/guestfish-actions.pod:2670 ../src/guestfs-actions.pod:4064
11473 "This returns true iff the file exists and the file is empty or it contains "
11478 #: ../fish/guestfish-actions.pod:2673
11479 msgid "is-zero-device"
11483 #: ../fish/guestfish-actions.pod:2675
11486 " is-zero-device device\n"
11491 #: ../fish/guestfish-actions.pod:2677 ../src/guestfs-actions.pod:4077
11492 msgid "This returns true iff the device exists and contains all zero bytes."
11496 #: ../fish/guestfish-actions.pod:2679 ../src/guestfs-actions.pod:4079
11497 msgid "Note that for large devices this can take a long time to run."
11501 #: ../fish/guestfish-actions.pod:2681
11502 msgid "kill-subprocess"
11506 #: ../fish/guestfish-actions.pod:2683
11509 " kill-subprocess\n"
11514 #: ../fish/guestfish-actions.pod:2685 ../src/guestfs-actions.pod:4090
11515 msgid "This kills the qemu subprocess. You should never need to call this."
11519 #: ../fish/guestfish-actions.pod:2687
11524 #: ../fish/guestfish-actions.pod:2689
11529 #: ../fish/guestfish-actions.pod:2691
11537 #: ../fish/guestfish-actions.pod:2693 ../src/guestfs-actions.pod:4101
11539 "Internally libguestfs is implemented by running a virtual machine using "
11544 #: ../fish/guestfish-actions.pod:2696 ../src/guestfs-actions.pod:4104
11546 "You should call this after configuring the handle (eg. adding drives) but "
11547 "before performing any actions."
11551 #: ../fish/guestfish-actions.pod:2699
11556 #: ../fish/guestfish-actions.pod:2701
11559 " lchown owner group path\n"
11564 #: ../fish/guestfish-actions.pod:2703
11566 "Change the file owner to C<owner> and group to C<group>. This is like "
11567 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
11572 #: ../fish/guestfish-actions.pod:2711
11577 #: ../fish/guestfish-actions.pod:2713
11580 " lgetxattr path name\n"
11585 #: ../fish/guestfish-actions.pod:2715 ../src/guestfs-actions.pod:4144
11587 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11588 "is a symlink, then this call returns an extended attribute from the symlink."
11592 #: ../fish/guestfish-actions.pod:2729
11593 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11597 #: ../fish/guestfish-actions.pod:2731
11602 #: ../fish/guestfish-actions.pod:2733
11605 " lgetxattrs path\n"
11610 #: ../fish/guestfish-actions.pod:2735
11612 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11613 "it returns the extended attributes of the link itself."
11617 #: ../fish/guestfish-actions.pod:2739
11622 #: ../fish/guestfish-actions.pod:2741
11630 #: ../fish/guestfish-actions.pod:2743 ../src/guestfs-actions.pod:4187
11632 "List all 9p filesystems attached to the guest. A list of mount tags is "
11637 #: ../fish/guestfish-actions.pod:2746
11638 msgid "list-devices"
11642 #: ../fish/guestfish-actions.pod:2748
11650 #: ../fish/guestfish-actions.pod:2750 ../src/guestfs-actions.pod:4201
11651 msgid "List all the block devices."
11655 #: ../fish/guestfish-actions.pod:2752 ../src/guestfs-actions.pod:4203
11656 msgid "The full block device names are returned, eg. C</dev/sda>."
11660 #: ../fish/guestfish-actions.pod:2756
11661 msgid "list-dm-devices"
11665 #: ../fish/guestfish-actions.pod:2758
11668 " list-dm-devices\n"
11673 #: ../fish/guestfish-actions.pod:2760 ../src/guestfs-actions.pod:4218
11674 msgid "List all device mapper devices."
11678 #: ../fish/guestfish-actions.pod:2762
11680 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11681 "previous call to L</luks-open>."
11685 #: ../fish/guestfish-actions.pod:2765
11687 "Device mapper devices which correspond to logical volumes are I<not> "
11688 "returned in this list. Call L</lvs> if you want to list logical volumes."
11692 #: ../fish/guestfish-actions.pod:2769
11693 msgid "list-filesystems"
11697 #: ../fish/guestfish-actions.pod:2771
11700 " list-filesystems\n"
11705 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4238
11707 "This inspection command looks for filesystems on partitions, block devices "
11708 "and logical volumes, returning a list of devices containing filesystems and "
11713 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4242
11715 "The return value is a hash, where the keys are the devices containing "
11716 "filesystems, and the values are the filesystem types. For example:"
11720 #: ../fish/guestfish-actions.pod:2781 ../src/guestfs-actions.pod:4246
11723 " \"/dev/sda1\" => \"ntfs\"\n"
11724 " \"/dev/sda2\" => \"ext2\"\n"
11725 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11726 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11731 #: ../fish/guestfish-actions.pod:2786 ../src/guestfs-actions.pod:4251
11733 "The value can have the special value \"unknown\", meaning the content of the "
11734 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11738 #: ../fish/guestfish-actions.pod:2790
11740 "This command runs other libguestfs commands, which might include L</mount> "
11741 "and L</umount>, and therefore you should use this soon after launch and only "
11742 "when nothing is mounted."
11746 #: ../fish/guestfish-actions.pod:2794
11748 "Not all of the filesystems returned will be mountable. In particular, swap "
11749 "partitions are returned in the list. Also this command does not check that "
11750 "each filesystem found is valid and mountable, and some filesystems might be "
11751 "mountable but require special options. Filesystems may not all belong to a "
11752 "single logical operating system (use L</inspect-os> to look for OSes)."
11756 #: ../fish/guestfish-actions.pod:2802
11757 msgid "list-md-devices"
11761 #: ../fish/guestfish-actions.pod:2804
11764 " list-md-devices\n"
11769 #: ../fish/guestfish-actions.pod:2806 ../src/guestfs-actions.pod:4280
11770 msgid "List all Linux md devices."
11774 #: ../fish/guestfish-actions.pod:2808
11775 msgid "list-partitions"
11779 #: ../fish/guestfish-actions.pod:2810
11782 " list-partitions\n"
11787 #: ../fish/guestfish-actions.pod:2812 ../src/guestfs-actions.pod:4293
11788 msgid "List all the partitions detected on all block devices."
11792 #: ../fish/guestfish-actions.pod:2814 ../src/guestfs-actions.pod:4295
11793 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11797 #: ../fish/guestfish-actions.pod:2816
11799 "This does not return logical volumes. For that you will need to call "
11804 #: ../fish/guestfish-actions.pod:2821
11809 #: ../fish/guestfish-actions.pod:2823
11817 #: ../fish/guestfish-actions.pod:2825 ../src/guestfs-actions.pod:4314
11819 "List the files in C<directory> (relative to the root directory, there is no "
11820 "cwd) in the format of 'ls -la'."
11824 #: ../fish/guestfish-actions.pod:2828 ../src/guestfs-actions.pod:4317
11826 "This command is mostly useful for interactive sessions. It is I<not> "
11827 "intended that you try to parse the output string."
11831 #: ../fish/guestfish-actions.pod:2831
11836 #: ../fish/guestfish-actions.pod:2833
11839 " ln target linkname\n"
11844 #: ../fish/guestfish-actions.pod:2835 ../src/guestfs-actions.pod:4332
11845 msgid "This command creates a hard link using the C<ln> command."
11849 #: ../fish/guestfish-actions.pod:2837
11854 #: ../fish/guestfish-actions.pod:2839
11857 " ln-f target linkname\n"
11862 #: ../fish/guestfish-actions.pod:2841 ../src/guestfs-actions.pod:4345
11864 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11865 "option removes the link (C<linkname>) if it exists already."
11869 #: ../fish/guestfish-actions.pod:2844
11874 #: ../fish/guestfish-actions.pod:2846
11877 " ln-s target linkname\n"
11882 #: ../fish/guestfish-actions.pod:2848 ../src/guestfs-actions.pod:4359
11883 msgid "This command creates a symbolic link using the C<ln -s> command."
11887 #: ../fish/guestfish-actions.pod:2850
11892 #: ../fish/guestfish-actions.pod:2852
11895 " ln-sf target linkname\n"
11900 #: ../fish/guestfish-actions.pod:2854 ../src/guestfs-actions.pod:4372
11902 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11903 "option removes the link (C<linkname>) if it exists already."
11907 #: ../fish/guestfish-actions.pod:2857
11908 msgid "lremovexattr"
11912 #: ../fish/guestfish-actions.pod:2859
11915 " lremovexattr xattr path\n"
11920 #: ../fish/guestfish-actions.pod:2861
11922 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11923 "it removes an extended attribute of the link itself."
11927 #: ../fish/guestfish-actions.pod:2865
11932 #: ../fish/guestfish-actions.pod:2867
11940 #: ../fish/guestfish-actions.pod:2869 ../src/guestfs-actions.pod:4400
11942 "List the files in C<directory> (relative to the root directory, there is no "
11943 "cwd). The '.' and '..' entries are not returned, but hidden files are "
11948 #: ../fish/guestfish-actions.pod:2873
11950 "This command is mostly useful for interactive sessions. Programs should "
11951 "probably use L</readdir> instead."
11955 #: ../fish/guestfish-actions.pod:2876
11960 #: ../fish/guestfish-actions.pod:2878
11963 " lsetxattr xattr val vallen path\n"
11968 #: ../fish/guestfish-actions.pod:2880
11970 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11971 "sets an extended attribute of the link itself."
11975 #: ../fish/guestfish-actions.pod:2884
11980 #: ../fish/guestfish-actions.pod:2886
11988 #: ../fish/guestfish-actions.pod:2888 ../fish/guestfish-actions.pod:4786 ../src/guestfs-actions.pod:4436 ../src/guestfs-actions.pod:7366
11989 msgid "Returns file information for the given C<path>."
11993 #: ../fish/guestfish-actions.pod:2890
11995 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11996 "the link is stat-ed, not the file it refers to."
12000 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4442
12001 msgid "This is the same as the C<lstat(2)> system call."
12005 #: ../fish/guestfish-actions.pod:2896
12010 #: ../fish/guestfish-actions.pod:2898
12013 " lstatlist path 'names ...'\n"
12018 #: ../fish/guestfish-actions.pod:2900
12020 "This call allows you to perform the L</lstat> operation on multiple files, "
12021 "where all files are in the directory C<path>. C<names> is the list of files "
12022 "from this directory."
12026 #: ../fish/guestfish-actions.pod:2904 ../src/guestfs-actions.pod:4461
12028 "On return you get a list of stat structs, with a one-to-one correspondence "
12029 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12030 "then the C<ino> field of that structure is set to C<-1>."
12034 #: ../fish/guestfish-actions.pod:2909
12036 "This call is intended for programs that want to efficiently list a directory "
12037 "contents without making many round-trips. See also L</lxattrlist> for a "
12038 "similarly efficient call for getting extended attributes. Very long "
12039 "directory listings might cause the protocol message size to be exceeded, "
12040 "causing this call to fail. The caller must split up such requests into "
12041 "smaller groups of names."
12045 #: ../fish/guestfish-actions.pod:2917
12046 msgid "luks-add-key"
12050 #: ../fish/guestfish-actions.pod:2919
12053 " luks-add-key device keyslot\n"
12058 #: ../fish/guestfish-actions.pod:2921 ../src/guestfs-actions.pod:4489
12060 "This command adds a new key on LUKS device C<device>. C<key> is any "
12061 "existing key, and is used to access the device. C<newkey> is the new key to "
12062 "add. C<keyslot> is the key slot that will be replaced."
12066 #: ../fish/guestfish-actions.pod:2926
12068 "Note that if C<keyslot> already contains a key, then this command will "
12069 "fail. You have to use L</luks-kill-slot> first to remove that key."
12073 #: ../fish/guestfish-actions.pod:2930 ../fish/guestfish-actions.pod:2952 ../fish/guestfish-actions.pod:2962 ../fish/guestfish-actions.pod:2973 ../fish/guestfish-actions.pod:2999 ../fish/guestfish-actions.pod:3009
12075 "This command has one or more key or passphrase parameters. Guestfish will "
12076 "prompt for these separately."
12080 #: ../fish/guestfish-actions.pod:2933
12085 #: ../fish/guestfish-actions.pod:2935
12088 " luks-close device\n"
12093 #: ../fish/guestfish-actions.pod:2937
12095 "This closes a LUKS device that was created earlier by L</luks-open> or "
12096 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
12097 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12098 "underlying block device."
12102 #: ../fish/guestfish-actions.pod:2943
12103 msgid "luks-format"
12107 #: ../fish/guestfish-actions.pod:2945
12110 " luks-format device keyslot\n"
12115 #: ../fish/guestfish-actions.pod:2947 ../src/guestfs-actions.pod:4530
12117 "This command erases existing data on C<device> and formats the device as a "
12118 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12119 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12123 #: ../fish/guestfish-actions.pod:2955
12124 msgid "luks-format-cipher"
12128 #: ../fish/guestfish-actions.pod:2957
12131 " luks-format-cipher device keyslot cipher\n"
12136 #: ../fish/guestfish-actions.pod:2959
12138 "This command is the same as L</luks-format> but it also allows you to set "
12139 "the C<cipher> used."
12143 #: ../fish/guestfish-actions.pod:2965
12144 msgid "luks-kill-slot"
12148 #: ../fish/guestfish-actions.pod:2967
12151 " luks-kill-slot device keyslot\n"
12156 #: ../fish/guestfish-actions.pod:2969 ../src/guestfs-actions.pod:4571
12158 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12159 "device C<device>. C<key> must be one of the I<other> keys."
12163 #: ../fish/guestfish-actions.pod:2976
12168 #: ../fish/guestfish-actions.pod:2978
12171 " luks-open device mapname\n"
12176 #: ../fish/guestfish-actions.pod:2980 ../src/guestfs-actions.pod:4591
12178 "This command opens a block device which has been encrypted according to the "
12179 "Linux Unified Key Setup (LUKS) standard."
12183 #: ../fish/guestfish-actions.pod:2983 ../src/guestfs-actions.pod:4594
12184 msgid "C<device> is the encrypted block device or partition."
12188 #: ../fish/guestfish-actions.pod:2985 ../src/guestfs-actions.pod:4596
12190 "The caller must supply one of the keys associated with the LUKS block "
12191 "device, in the C<key> parameter."
12195 #: ../fish/guestfish-actions.pod:2988 ../src/guestfs-actions.pod:4599
12197 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12198 "writes to this block device are decrypted from and encrypted to the "
12199 "underlying C<device> respectively."
12203 #: ../fish/guestfish-actions.pod:2992
12205 "If this block device contains LVM volume groups, then calling L</vgscan> "
12206 "followed by L</vg-activate-all> will make them visible."
12210 #: ../fish/guestfish-actions.pod:2996
12211 msgid "Use L</list-dm-devices> to list all device mapper devices."
12215 #: ../fish/guestfish-actions.pod:3002
12216 msgid "luks-open-ro"
12220 #: ../fish/guestfish-actions.pod:3004
12223 " luks-open-ro device mapname\n"
12228 #: ../fish/guestfish-actions.pod:3006
12230 "This is the same as L</luks-open> except that a read-only mapping is "
12235 #: ../fish/guestfish-actions.pod:3012
12240 #: ../fish/guestfish-actions.pod:3014
12243 " lvcreate logvol volgroup mbytes\n"
12248 #: ../fish/guestfish-actions.pod:3016 ../src/guestfs-actions.pod:4645
12250 "This creates an LVM logical volume called C<logvol> on the volume group "
12251 "C<volgroup>, with C<size> megabytes."
12255 #: ../fish/guestfish-actions.pod:3019
12256 msgid "lvm-canonical-lv-name"
12260 #: ../fish/guestfish-actions.pod:3021
12263 " lvm-canonical-lv-name lvname\n"
12268 #: ../fish/guestfish-actions.pod:3023 ../src/guestfs-actions.pod:4658
12270 "This converts alternative naming schemes for LVs that you might find to the "
12271 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
12276 #: ../fish/guestfish-actions.pod:3027 ../src/guestfs-actions.pod:4662
12278 "This command returns an error if the C<lvname> parameter does not refer to a "
12283 #: ../fish/guestfish-actions.pod:3030
12284 msgid "See also L</is-lv>."
12288 #: ../fish/guestfish-actions.pod:3032
12289 msgid "lvm-clear-filter"
12293 #: ../fish/guestfish-actions.pod:3034
12296 " lvm-clear-filter\n"
12301 #: ../fish/guestfish-actions.pod:3036
12303 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12308 #: ../fish/guestfish-actions.pod:3039 ../fish/guestfish-actions.pod:3067 ../src/guestfs-actions.pod:4680 ../src/guestfs-actions.pod:4719
12309 msgid "This command also clears the LVM cache and performs a volume group scan."
12313 #: ../fish/guestfish-actions.pod:3042
12314 msgid "lvm-remove-all"
12318 #: ../fish/guestfish-actions.pod:3044
12321 " lvm-remove-all\n"
12326 #: ../fish/guestfish-actions.pod:3046 ../src/guestfs-actions.pod:4692
12328 "This command removes all LVM logical volumes, volume groups and physical "
12333 #: ../fish/guestfish-actions.pod:3049
12334 msgid "lvm-set-filter"
12338 #: ../fish/guestfish-actions.pod:3051
12341 " lvm-set-filter 'devices ...'\n"
12346 #: ../fish/guestfish-actions.pod:3053 ../src/guestfs-actions.pod:4705
12348 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12349 "block devices in the list C<devices>, and will ignore all other attached "
12354 #: ../fish/guestfish-actions.pod:3057 ../src/guestfs-actions.pod:4709
12356 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12357 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12358 "there are two types of duplication possible: either cloned PVs/VGs which "
12359 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12360 "same name. In normal operation you cannot create this situation, but you "
12361 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12362 "inside the LVM metadata."
12366 #: ../fish/guestfish-actions.pod:3070 ../src/guestfs-actions.pod:4722
12367 msgid "You can filter whole block devices or individual partitions."
12371 #: ../fish/guestfish-actions.pod:3072 ../src/guestfs-actions.pod:4724
12373 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12374 "filesystem), even if you are not filtering out that VG."
12378 #: ../fish/guestfish-actions.pod:3076
12383 #: ../fish/guestfish-actions.pod:3078
12386 " lvremove device\n"
12391 #: ../fish/guestfish-actions.pod:3080 ../src/guestfs-actions.pod:4738
12393 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12394 "LV, such as C</dev/VG/LV>."
12398 #: ../fish/guestfish-actions.pod:3083 ../src/guestfs-actions.pod:4741
12400 "You can also remove all LVs in a volume group by specifying the VG name, "
12405 #: ../fish/guestfish-actions.pod:3086
12410 #: ../fish/guestfish-actions.pod:3088
12413 " lvrename logvol newlogvol\n"
12418 #: ../fish/guestfish-actions.pod:3090 ../src/guestfs-actions.pod:4755
12419 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12423 #: ../fish/guestfish-actions.pod:3092
12428 #: ../fish/guestfish-actions.pod:3094
12431 " lvresize device mbytes\n"
12436 #: ../fish/guestfish-actions.pod:3096 ../src/guestfs-actions.pod:4768
12438 "This resizes (expands or shrinks) an existing LVM logical volume to "
12439 "C<mbytes>. When reducing, data in the reduced part is lost."
12443 #: ../fish/guestfish-actions.pod:3100
12444 msgid "lvresize-free"
12448 #: ../fish/guestfish-actions.pod:3102
12451 " lvresize-free lv percent\n"
12456 #: ../fish/guestfish-actions.pod:3104 ../src/guestfs-actions.pod:4783
12458 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12459 "remaining free space in the volume group. Commonly you would call this with "
12460 "pc = 100 which expands the logical volume as much as possible, using all "
12461 "remaining free space in the volume group."
12465 #: ../fish/guestfish-actions.pod:3110
12470 #: ../fish/guestfish-actions.pod:3112
12478 #: ../fish/guestfish-actions.pod:3114 ../src/guestfs-actions.pod:4798
12480 "List all the logical volumes detected. This is the equivalent of the "
12481 "L<lvs(8)> command."
12485 #: ../fish/guestfish-actions.pod:3117 ../src/guestfs-actions.pod:4801
12487 "This returns a list of the logical volume device names "
12488 "(eg. C</dev/VolGroup00/LogVol00>)."
12492 #: ../fish/guestfish-actions.pod:3120
12493 msgid "See also L</lvs-full>, L</list-filesystems>."
12497 #: ../fish/guestfish-actions.pod:3122
12502 #: ../fish/guestfish-actions.pod:3124
12510 #: ../fish/guestfish-actions.pod:3126 ../src/guestfs-actions.pod:4817
12512 "List all the logical volumes detected. This is the equivalent of the "
12513 "L<lvs(8)> command. The \"full\" version includes all fields."
12517 #: ../fish/guestfish-actions.pod:3129
12522 #: ../fish/guestfish-actions.pod:3131
12530 #: ../fish/guestfish-actions.pod:3133 ../src/guestfs-actions.pod:4832
12531 msgid "This command returns the UUID of the LVM LV C<device>."
12535 #: ../fish/guestfish-actions.pod:3135
12540 #: ../fish/guestfish-actions.pod:3137
12543 " lxattrlist path 'names ...'\n"
12548 #: ../fish/guestfish-actions.pod:3139 ../src/guestfs-actions.pod:4846
12550 "This call allows you to get the extended attributes of multiple files, where "
12551 "all files are in the directory C<path>. C<names> is the list of files from "
12556 #: ../fish/guestfish-actions.pod:3143 ../src/guestfs-actions.pod:4850
12558 "On return you get a flat list of xattr structs which must be interpreted "
12559 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12560 "C<attrval> in this struct is zero-length to indicate there was an error "
12561 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12562 "number (the number of following attributes for this file, which could be "
12563 "C<\"0\">). Then after the first xattr struct are the zero or more "
12564 "attributes for the first named file. This repeats for the second and "
12565 "subsequent files."
12569 #: ../fish/guestfish-actions.pod:3153
12571 "This call is intended for programs that want to efficiently list a directory "
12572 "contents without making many round-trips. See also L</lstatlist> for a "
12573 "similarly efficient call for getting standard stats. Very long directory "
12574 "listings might cause the protocol message size to be exceeded, causing this "
12575 "call to fail. The caller must split up such requests into smaller groups of "
12580 #: ../fish/guestfish-actions.pod:3161
12585 #: ../fish/guestfish-actions.pod:3163
12588 " md-create name 'devices ...' [missingbitmap:N] [nrdevices:N] [spare:N] "
12589 "[chunk:N] [level:..]\n"
12594 #: ../fish/guestfish-actions.pod:3165 ../src/guestfs-actions.pod:4893
12596 "Create a Linux md (RAID) device named C<name> on the devices in the list "
12601 #: ../fish/guestfish-actions.pod:3172 ../src/guestfs-actions.pod:4900
12602 msgid "C<missingbitmap>"
12606 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4902
12608 "A bitmap of missing devices. If a bit is set it means that a missing device "
12609 "is added to the array. The least significant bit corresponds to the first "
12610 "device in the array."
12614 #: ../fish/guestfish-actions.pod:3178 ../src/guestfs-actions.pod:4906
12615 msgid "As examples:"
12619 #: ../fish/guestfish-actions.pod:3180 ../src/guestfs-actions.pod:4908
12621 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x1> then the resulting "
12622 "array would be C<[E<lt>missingE<gt>, \"/dev/sda\"]>."
12626 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4911
12628 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x2> then the resulting "
12629 "array would be C<[\"/dev/sda\", E<lt>missingE<gt>]>."
12633 #: ../fish/guestfish-actions.pod:3186 ../src/guestfs-actions.pod:4914
12634 msgid "This defaults to C<0> (no missing devices)."
12638 #: ../fish/guestfish-actions.pod:3188 ../src/guestfs-actions.pod:4916
12640 "The length of C<devices> + the number of bits set in C<missingbitmap> must "
12641 "equal C<nrdevices> + C<spare>."
12645 #: ../fish/guestfish-actions.pod:3191 ../src/guestfs-actions.pod:4919
12646 msgid "C<nrdevices>"
12650 #: ../fish/guestfish-actions.pod:3193 ../src/guestfs-actions.pod:4921
12651 msgid "The number of active RAID devices."
12655 #: ../fish/guestfish-actions.pod:3195 ../src/guestfs-actions.pod:4923
12657 "If not set, this defaults to the length of C<devices> plus the number of "
12658 "bits set in C<missingbitmap>."
12662 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4926
12667 #: ../fish/guestfish-actions.pod:3200 ../src/guestfs-actions.pod:4928
12668 msgid "The number of spare devices."
12672 #: ../fish/guestfish-actions.pod:3202 ../src/guestfs-actions.pod:4930
12673 msgid "If not set, this defaults to C<0>."
12677 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4932
12682 #: ../fish/guestfish-actions.pod:3206 ../src/guestfs-actions.pod:4934
12683 msgid "The chunk size in bytes."
12687 #: ../fish/guestfish-actions.pod:3208 ../fish/guestfish-actions.pod:3230 ../src/guestfs-actions.pod:4936 ../src/guestfs-actions.pod:4984
12692 #: ../fish/guestfish-actions.pod:3210 ../src/guestfs-actions.pod:4938
12694 "The RAID level, which can be one of: I<linear>, I<raid0>, I<0>, I<stripe>, "
12695 "I<raid1>, I<1>, I<mirror>, I<raid4>, I<4>, I<raid5>, I<5>, I<raid6>, I<6>, "
12696 "I<raid10>, I<10>. Some of these are synonymous, and more levels may be "
12701 #: ../fish/guestfish-actions.pod:3215 ../src/guestfs-actions.pod:4943
12702 msgid "If not set, this defaults to C<raid1>."
12706 #: ../fish/guestfish-actions.pod:3221
12711 #: ../fish/guestfish-actions.pod:3223
12719 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4979
12721 "This command exposes the output of 'mdadm -DY <md>'. The following fields "
12722 "are usually present in the returned hash. Other fields may also be present."
12726 #: ../fish/guestfish-actions.pod:3232 ../src/guestfs-actions.pod:4986
12727 msgid "The raid level of the MD device."
12731 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4988
12736 #: ../fish/guestfish-actions.pod:3236 ../src/guestfs-actions.pod:4990
12737 msgid "The number of underlying devices in the MD device."
12741 #: ../fish/guestfish-actions.pod:3238 ../src/guestfs-actions.pod:4992
12742 msgid "C<metadata>"
12746 #: ../fish/guestfish-actions.pod:3240 ../src/guestfs-actions.pod:4994
12747 msgid "The metadata version used."
12751 #: ../fish/guestfish-actions.pod:3242 ../src/guestfs-actions.pod:4996
12756 #: ../fish/guestfish-actions.pod:3244 ../src/guestfs-actions.pod:4998
12757 msgid "The UUID of the MD device."
12761 #: ../fish/guestfish-actions.pod:3248 ../src/guestfs-actions.pod:5002
12762 msgid "The name of the MD device."
12766 #: ../fish/guestfish-actions.pod:3252
12771 #: ../fish/guestfish-actions.pod:3254
12779 #: ../fish/guestfish-actions.pod:3256 ../src/guestfs-actions.pod:5018
12781 "This command deactivates the MD array named C<md>. The device is stopped, "
12782 "but it is not destroyed or zeroed."
12786 #: ../fish/guestfish-actions.pod:3259
12791 #: ../fish/guestfish-actions.pod:3261
12799 #: ../fish/guestfish-actions.pod:3263 ../src/guestfs-actions.pod:5029
12800 msgid "Create a directory named C<path>."
12804 #: ../fish/guestfish-actions.pod:3265
12809 #: ../fish/guestfish-actions.pod:3267
12812 " mkdir-mode path mode\n"
12817 #: ../fish/guestfish-actions.pod:3269 ../src/guestfs-actions.pod:5042
12819 "This command creates a directory, setting the initial permissions of the "
12820 "directory to C<mode>."
12824 #: ../fish/guestfish-actions.pod:3272 ../src/guestfs-actions.pod:5045
12826 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12827 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12832 #: ../fish/guestfish-actions.pod:3276
12833 msgid "See also L</mkdir>, L</umask>"
12837 #: ../fish/guestfish-actions.pod:3278
12842 #: ../fish/guestfish-actions.pod:3280
12850 #: ../fish/guestfish-actions.pod:3282 ../src/guestfs-actions.pod:5061
12852 "Create a directory named C<path>, creating any parent directories as "
12853 "necessary. This is like the C<mkdir -p> shell command."
12857 #: ../fish/guestfish-actions.pod:3285
12862 #: ../fish/guestfish-actions.pod:3287
12865 " mkdtemp template\n"
12870 #: ../fish/guestfish-actions.pod:3289 ../src/guestfs-actions.pod:5074
12872 "This command creates a temporary directory. The C<template> parameter "
12873 "should be a full pathname for the temporary directory name with the final "
12874 "six characters being \"XXXXXX\"."
12878 #: ../fish/guestfish-actions.pod:3294 ../src/guestfs-actions.pod:5079
12880 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12881 "being suitable for Windows filesystems."
12885 #: ../fish/guestfish-actions.pod:3297 ../src/guestfs-actions.pod:5082
12886 msgid "The name of the temporary directory that was created is returned."
12890 #: ../fish/guestfish-actions.pod:3300 ../src/guestfs-actions.pod:5085
12891 msgid "The temporary directory is created with mode 0700 and is owned by root."
12895 #: ../fish/guestfish-actions.pod:3303 ../src/guestfs-actions.pod:5088
12897 "The caller is responsible for deleting the temporary directory and its "
12898 "contents after use."
12902 #: ../fish/guestfish-actions.pod:3306 ../src/guestfs-actions.pod:5091
12903 msgid "See also: L<mkdtemp(3)>"
12907 #: ../fish/guestfish-actions.pod:3308
12912 #: ../fish/guestfish-actions.pod:3310
12915 " mke2fs-J fstype blocksize device journal\n"
12920 #: ../fish/guestfish-actions.pod:3312 ../src/guestfs-actions.pod:5107
12922 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12923 "C<journal>. It is equivalent to the command:"
12927 #: ../fish/guestfish-actions.pod:3316 ../src/guestfs-actions.pod:5111
12930 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12935 #: ../fish/guestfish-actions.pod:3318
12936 msgid "See also L</mke2journal>."
12940 #: ../fish/guestfish-actions.pod:3320
12945 #: ../fish/guestfish-actions.pod:3322
12948 " mke2fs-JL fstype blocksize device label\n"
12953 #: ../fish/guestfish-actions.pod:3324 ../src/guestfs-actions.pod:5128
12955 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12956 "the journal labeled C<label>."
12960 #: ../fish/guestfish-actions.pod:3327
12961 msgid "See also L</mke2journal-L>."
12965 #: ../fish/guestfish-actions.pod:3329
12970 #: ../fish/guestfish-actions.pod:3331
12973 " mke2fs-JU fstype blocksize device uuid\n"
12978 #: ../fish/guestfish-actions.pod:3333 ../src/guestfs-actions.pod:5146
12980 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12981 "the journal with UUID C<uuid>."
12985 #: ../fish/guestfish-actions.pod:3336
12986 msgid "See also L</mke2journal-U>."
12990 #: ../fish/guestfish-actions.pod:3338
12991 msgid "mke2journal"
12995 #: ../fish/guestfish-actions.pod:3340
12998 " mke2journal blocksize device\n"
13003 #: ../fish/guestfish-actions.pod:3342 ../src/guestfs-actions.pod:5162
13005 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13010 #: ../fish/guestfish-actions.pod:3345 ../src/guestfs-actions.pod:5165
13013 " mke2fs -O journal_dev -b blocksize device\n"
13018 #: ../fish/guestfish-actions.pod:3347
13019 msgid "mke2journal-L"
13023 #: ../fish/guestfish-actions.pod:3349
13026 " mke2journal-L blocksize label device\n"
13031 #: ../fish/guestfish-actions.pod:3351 ../src/guestfs-actions.pod:5179
13032 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13036 #: ../fish/guestfish-actions.pod:3353
13037 msgid "mke2journal-U"
13041 #: ../fish/guestfish-actions.pod:3355
13044 " mke2journal-U blocksize uuid device\n"
13049 #: ../fish/guestfish-actions.pod:3357 ../src/guestfs-actions.pod:5193
13050 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13054 #: ../fish/guestfish-actions.pod:3359
13059 #: ../fish/guestfish-actions.pod:3361
13062 " mkfifo mode path\n"
13067 #: ../fish/guestfish-actions.pod:3363
13069 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13070 "is just a convenient wrapper around L</mknod>."
13074 #: ../fish/guestfish-actions.pod:3369
13079 #: ../fish/guestfish-actions.pod:3371
13082 " mkfs fstype device\n"
13087 #: ../fish/guestfish-actions.pod:3373 ../src/guestfs-actions.pod:5223
13089 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13090 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13094 #: ../fish/guestfish-actions.pod:3377
13099 #: ../fish/guestfish-actions.pod:3379
13102 " mkfs-b fstype blocksize device\n"
13107 #: ../fish/guestfish-actions.pod:3381
13109 "This call is similar to L</mkfs>, but it allows you to control the block "
13110 "size of the resulting filesystem. Supported block sizes depend on the "
13111 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13115 #: ../fish/guestfish-actions.pod:3386 ../fish/guestfish-actions.pod:3413 ../src/guestfs-actions.pod:5251 ../src/guestfs-actions.pod:5289
13117 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13122 #: ../fish/guestfish-actions.pod:3389
13124 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
13129 #: ../fish/guestfish-actions.pod:3396
13134 #: ../fish/guestfish-actions.pod:3398
13137 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] "
13143 #: ../fish/guestfish-actions.pod:3400 ../src/guestfs-actions.pod:5276
13145 "This function creates a filesystem on C<device>. The filesystem type is "
13146 "C<fstype>, for example C<ext3>."
13150 #: ../fish/guestfish-actions.pod:3407 ../src/guestfs-actions.pod:5283
13151 msgid "C<blocksize>"
13155 #: ../fish/guestfish-actions.pod:3409 ../src/guestfs-actions.pod:5285
13157 "The filesystem block size. Supported block sizes depend on the filesystem "
13158 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
13163 #: ../fish/guestfish-actions.pod:3416 ../src/guestfs-actions.pod:5292
13164 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
13168 #: ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:5294
13169 msgid "C<features>"
13173 #: ../fish/guestfish-actions.pod:3420 ../src/guestfs-actions.pod:5296
13174 msgid "This passes the I<-O> parameter to the external mkfs program."
13178 #: ../fish/guestfish-actions.pod:3422 ../src/guestfs-actions.pod:5298
13180 "For certain filesystem types, this allows extra filesystem features to be "
13181 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
13185 #: ../fish/guestfish-actions.pod:3426 ../src/guestfs-actions.pod:5302
13187 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
13192 #: ../fish/guestfish-actions.pod:3429 ../src/guestfs-actions.pod:5305
13197 #: ../fish/guestfish-actions.pod:3431 ../src/guestfs-actions.pod:5307
13199 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
13200 "sets the inode size (only for ext2/3/4 filesystems at present)."
13204 #: ../fish/guestfish-actions.pod:3434 ../src/guestfs-actions.pod:5310
13205 msgid "C<sectorsize>"
13209 #: ../fish/guestfish-actions.pod:3436 ../src/guestfs-actions.pod:5312
13211 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
13212 "sets sector size for ufs filesystem."
13216 #: ../fish/guestfish-actions.pod:3443
13217 msgid "mkmountpoint"
13221 #: ../fish/guestfish-actions.pod:3445
13224 " mkmountpoint exemptpath\n"
13229 #: ../fish/guestfish-actions.pod:3447
13231 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
13232 "to create extra mountpoints before mounting the first filesystem."
13236 #: ../fish/guestfish-actions.pod:3451 ../src/guestfs-actions.pod:5355
13238 "These calls are I<only> necessary in some very limited circumstances, mainly "
13239 "the case where you want to mount a mix of unrelated and/or read-only "
13240 "filesystems together."
13244 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5359
13246 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13247 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13248 "inside that. You can unpack this as follows in guestfish:"
13252 #: ../fish/guestfish-actions.pod:3460 ../src/guestfs-actions.pod:5364
13255 " add-ro Fedora-11-i686-Live.iso\n"
13257 " mkmountpoint /cd\n"
13258 " mkmountpoint /sqsh\n"
13259 " mkmountpoint /ext3fs\n"
13260 " mount /dev/sda /cd\n"
13261 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13262 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13267 #: ../fish/guestfish-actions.pod:3469 ../src/guestfs-actions.pod:5373
13268 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13272 #: ../fish/guestfish-actions.pod:3471
13274 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
13275 "unexpected errors if you try to mix these calls. It is safest to manually "
13276 "unmount filesystems and remove mountpoints after use."
13280 #: ../fish/guestfish-actions.pod:3475
13282 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
13283 "for this to work for manual mountpoints, you must ensure that the innermost "
13284 "mountpoints have the longest pathnames, as in the example code above."
13288 #: ../fish/guestfish-actions.pod:3480 ../src/guestfs-actions.pod:5384
13289 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13293 #: ../fish/guestfish-actions.pod:3482
13295 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
13296 "L</umount-all> to be called when the handle is closed which can also trigger "
13301 #: ../fish/guestfish-actions.pod:3486
13306 #: ../fish/guestfish-actions.pod:3488
13309 " mknod mode devmajor devminor path\n"
13314 #: ../fish/guestfish-actions.pod:3490 ../src/guestfs-actions.pod:5403
13316 "This call creates block or character special devices, or named pipes "
13321 #: ../fish/guestfish-actions.pod:3493 ../src/guestfs-actions.pod:5406
13323 "The C<mode> parameter should be the mode, using the standard constants. "
13324 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13325 "used when creating block and character special devices."
13329 #: ../fish/guestfish-actions.pod:3498
13331 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13332 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13333 "regular file). These constants are available in the standard Linux header "
13334 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
13335 "wrappers around this command which bitwise OR in the appropriate constant "
13340 #: ../fish/guestfish-actions.pod:3508
13345 #: ../fish/guestfish-actions.pod:3510
13348 " mknod-b mode devmajor devminor path\n"
13353 #: ../fish/guestfish-actions.pod:3512
13355 "This call creates a block device node called C<path> with mode C<mode> and "
13356 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13357 "wrapper around L</mknod>."
13361 #: ../fish/guestfish-actions.pod:3518
13366 #: ../fish/guestfish-actions.pod:3520
13369 " mknod-c mode devmajor devminor path\n"
13374 #: ../fish/guestfish-actions.pod:3522
13376 "This call creates a char device node called C<path> with mode C<mode> and "
13377 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13378 "wrapper around L</mknod>."
13382 #: ../fish/guestfish-actions.pod:3528
13387 #: ../fish/guestfish-actions.pod:3530
13395 #: ../fish/guestfish-actions.pod:3532 ../src/guestfs-actions.pod:5469
13396 msgid "Create a swap partition on C<device>."
13400 #: ../fish/guestfish-actions.pod:3534
13405 #: ../fish/guestfish-actions.pod:3536
13408 " mkswap-L label device\n"
13413 #: ../fish/guestfish-actions.pod:3538 ../src/guestfs-actions.pod:5482
13414 msgid "Create a swap partition on C<device> with label C<label>."
13418 #: ../fish/guestfish-actions.pod:3540 ../src/guestfs-actions.pod:5484
13420 "Note that you cannot attach a swap label to a block device "
13421 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
13422 "the kernel or swap tools."
13426 #: ../fish/guestfish-actions.pod:3544
13431 #: ../fish/guestfish-actions.pod:3546
13434 " mkswap-U uuid device\n"
13439 #: ../fish/guestfish-actions.pod:3548 ../src/guestfs-actions.pod:5499
13440 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13444 #: ../fish/guestfish-actions.pod:3550
13445 msgid "mkswap-file"
13449 #: ../fish/guestfish-actions.pod:3552
13452 " mkswap-file path\n"
13457 #: ../fish/guestfish-actions.pod:3554 ../src/guestfs-actions.pod:5511
13458 msgid "Create a swap file."
13462 #: ../fish/guestfish-actions.pod:3556
13464 "This command just writes a swap file signature to an existing file. To "
13465 "create the file itself, use something like L</fallocate>."
13469 #: ../fish/guestfish-actions.pod:3559
13474 #: ../fish/guestfish-actions.pod:3561
13477 " modprobe modulename\n"
13482 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5526
13483 msgid "This loads a kernel module in the appliance."
13487 #: ../fish/guestfish-actions.pod:3565 ../src/guestfs-actions.pod:5528
13489 "The kernel module must have been whitelisted when libguestfs was built (see "
13490 "C<appliance/kmod.whitelist.in> in the source)."
13494 #: ../fish/guestfish-actions.pod:3568
13499 #: ../fish/guestfish-actions.pod:3570
13502 " mount device mountpoint\n"
13507 #: ../fish/guestfish-actions.pod:3572 ../src/guestfs-actions.pod:5542
13509 "Mount a guest disk at a position in the filesystem. Block devices are named "
13510 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
13511 "those block devices contain partitions, they will have the usual names "
13512 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
13516 #: ../fish/guestfish-actions.pod:3578 ../src/guestfs-actions.pod:5548
13518 "The rules are the same as for L<mount(2)>: A filesystem must first be "
13519 "mounted on C</> before others can be mounted. Other filesystems can only be "
13520 "mounted on directories which already exist."
13524 #: ../fish/guestfish-actions.pod:3583 ../src/guestfs-actions.pod:5553
13526 "The mounted filesystem is writable, if we have sufficient permissions on the "
13527 "underlying device."
13531 #: ../fish/guestfish-actions.pod:3586
13533 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
13534 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
13535 "problems for users. If your program might need to work with older versions "
13536 "of libguestfs, use L</mount-options> instead (using an empty string for the "
13537 "first parameter if you don't want any options)."
13541 #: ../fish/guestfish-actions.pod:3593
13546 #: ../fish/guestfish-actions.pod:3595
13549 " mount-9p mounttag mountpoint [options:..]\n"
13554 #: ../fish/guestfish-actions.pod:3597 ../src/guestfs-actions.pod:5582
13556 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13561 #: ../fish/guestfish-actions.pod:3600 ../src/guestfs-actions.pod:5585
13563 "If required, C<trans=virtio> will be automatically added to the options. "
13564 "Any other options required can be passed in the optional C<options> "
13569 #: ../fish/guestfish-actions.pod:3606
13574 #: ../fish/guestfish-actions.pod:3608
13577 " mount-loop file mountpoint\n"
13582 #: ../fish/guestfish-actions.pod:3610 ../src/guestfs-actions.pod:5624
13584 "This command lets you mount C<file> (a filesystem image in a file) on a "
13585 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13590 #: ../fish/guestfish-actions.pod:3614
13591 msgid "mount-options"
13595 #: ../fish/guestfish-actions.pod:3616
13598 " mount-options options device mountpoint\n"
13603 #: ../fish/guestfish-actions.pod:3618
13605 "This is the same as the L</mount> command, but it allows you to set the "
13606 "mount options as for the L<mount(8)> I<-o> flag."
13610 #: ../fish/guestfish-actions.pod:3622 ../src/guestfs-actions.pod:5644
13612 "If the C<options> parameter is an empty string, then no options are passed "
13613 "(all options default to whatever the filesystem uses)."
13617 #: ../fish/guestfish-actions.pod:3626
13622 #: ../fish/guestfish-actions.pod:3628
13625 " mount-ro device mountpoint\n"
13630 #: ../fish/guestfish-actions.pod:3630
13632 "This is the same as the L</mount> command, but it mounts the filesystem with "
13633 "the read-only (I<-o ro>) flag."
13637 #: ../fish/guestfish-actions.pod:3633
13642 #: ../fish/guestfish-actions.pod:3635
13645 " mount-vfs options vfstype device mountpoint\n"
13650 #: ../fish/guestfish-actions.pod:3637
13652 "This is the same as the L</mount> command, but it allows you to set both the "
13653 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13657 #: ../fish/guestfish-actions.pod:3641
13658 msgid "mountpoints"
13662 #: ../fish/guestfish-actions.pod:3643
13670 #: ../fish/guestfish-actions.pod:3645
13672 "This call is similar to L</mounts>. That call returns a list of devices. "
13673 "This one returns a hash table (map) of device name to directory where the "
13674 "device is mounted."
13678 #: ../fish/guestfish-actions.pod:3649
13683 #: ../fish/guestfish-actions.pod:3651
13691 #: ../fish/guestfish-actions.pod:3653 ../src/guestfs-actions.pod:5705
13693 "This returns the list of currently mounted filesystems. It returns the list "
13694 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13698 #: ../fish/guestfish-actions.pod:3656 ../src/guestfs-actions.pod:5708
13699 msgid "Some internal mounts are not shown."
13703 #: ../fish/guestfish-actions.pod:3658
13704 msgid "See also: L</mountpoints>"
13708 #: ../fish/guestfish-actions.pod:3660
13713 #: ../fish/guestfish-actions.pod:3662
13721 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5725
13723 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13724 "destination filename or destination directory."
13728 #: ../fish/guestfish-actions.pod:3667
13729 msgid "ntfs-3g-probe"
13733 #: ../fish/guestfish-actions.pod:3669
13736 " ntfs-3g-probe true|false device\n"
13741 #: ../fish/guestfish-actions.pod:3671 ../src/guestfs-actions.pod:5739
13743 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13744 "C<device> for mountability. (Not all NTFS volumes can be mounted "
13745 "read-write, and some cannot be mounted at all)."
13749 #: ../fish/guestfish-actions.pod:3675 ../src/guestfs-actions.pod:5743
13751 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13752 "can be mounted read-write. Set it to false if you want to test if the "
13753 "volume can be mounted read-only."
13757 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5747
13759 "The return value is an integer which C<0> if the operation would succeed, or "
13760 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13764 #: ../fish/guestfish-actions.pod:3683
13769 #: ../fish/guestfish-actions.pod:3685
13772 " ntfsresize device\n"
13777 #: ../fish/guestfish-actions.pod:3687 ../fish/guestfish-actions.pod:3711 ../src/guestfs-actions.pod:5768 ../src/guestfs-actions.pod:5800
13779 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13780 "size of the underlying device."
13784 #: ../fish/guestfish-actions.pod:3690 ../src/guestfs-actions.pod:5771
13786 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13787 "consistency check (for safety). You have to boot into Windows to perform "
13788 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13789 "resize filesystems which have been marked in this way. So in effect it is "
13790 "not possible to call ntfsresize multiple times on a single filesystem "
13791 "without booting into Windows between each resize."
13795 #: ../fish/guestfish-actions.pod:3698 ../fish/guestfish-actions.pod:3737 ../src/guestfs-actions.pod:5779 ../src/guestfs-actions.pod:5826
13796 msgid "See also L<ntfsresize(8)>."
13800 #: ../fish/guestfish-actions.pod:3700 ../fish/guestfish-actions.pod:3748
13802 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13807 #: ../fish/guestfish-actions.pod:3707
13808 msgid "ntfsresize-opts"
13812 #: ../fish/guestfish-actions.pod:3709
13815 " ntfsresize-opts device [size:N] [force:true|false]\n"
13820 #: ../fish/guestfish-actions.pod:3720 ../src/guestfs-actions.pod:5809
13822 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13823 "resized to fit the container (eg. partition)."
13827 #: ../fish/guestfish-actions.pod:3723 ../fish/guestfish-actions.pod:5044 ../src/guestfs-actions.pod:5812 ../src/guestfs-actions.pod:7783
13832 #: ../fish/guestfish-actions.pod:3725 ../src/guestfs-actions.pod:5814
13834 "If this option is true, then force the resize of the filesystem even if the "
13835 "filesystem is marked as requiring a consistency check."
13839 #: ../fish/guestfish-actions.pod:3728
13841 "After the resize operation, the filesystem is always marked as requiring a "
13842 "consistency check (for safety). You have to boot into Windows to perform "
13843 "this check and clear this condition. If you I<don't> set the C<force> "
13844 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13845 "a single filesystem without booting into Windows between each resize."
13849 #: ../fish/guestfish-actions.pod:3741
13850 msgid "ntfsresize-size"
13854 #: ../fish/guestfish-actions.pod:3743
13857 " ntfsresize-size device size\n"
13862 #: ../fish/guestfish-actions.pod:3745
13864 "This command is the same as L</ntfsresize> except that it allows you to "
13865 "specify the new size (in bytes) explicitly."
13869 #: ../fish/guestfish-actions.pod:3755
13874 #: ../fish/guestfish-actions.pod:3757
13877 " part-add device prlogex startsect endsect\n"
13882 #: ../fish/guestfish-actions.pod:3759
13884 "This command adds a partition to C<device>. If there is no partition table "
13885 "on the device, call L</part-init> first."
13889 #: ../fish/guestfish-actions.pod:3762 ../src/guestfs-actions.pod:5887
13891 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13892 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13893 "C<logical>) and C<e> (or C<extended>) partition types."
13897 #: ../fish/guestfish-actions.pod:3767 ../src/guestfs-actions.pod:5892
13899 "C<startsect> and C<endsect> are the start and end of the partition in "
13900 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13901 "from the end of the disk (C<-1> is the last sector)."
13905 #: ../fish/guestfish-actions.pod:3771
13907 "Creating a partition which covers the whole disk is not so easy. Use "
13908 "L</part-disk> to do that."
13912 #: ../fish/guestfish-actions.pod:3774
13917 #: ../fish/guestfish-actions.pod:3776
13920 " part-del device partnum\n"
13925 #: ../fish/guestfish-actions.pod:3778 ../src/guestfs-actions.pod:5910
13926 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13930 #: ../fish/guestfish-actions.pod:3780 ../src/guestfs-actions.pod:5912
13932 "Note that in the case of MBR partitioning, deleting an extended partition "
13933 "also deletes any logical partitions it contains."
13937 #: ../fish/guestfish-actions.pod:3784
13942 #: ../fish/guestfish-actions.pod:3786
13945 " part-disk device parttype\n"
13950 #: ../fish/guestfish-actions.pod:3788
13952 "This command is simply a combination of L</part-init> followed by "
13953 "L</part-add> to create a single primary partition covering the whole disk."
13957 #: ../fish/guestfish-actions.pod:3792
13959 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13960 "possible values are described in L</part-init>."
13964 #: ../fish/guestfish-actions.pod:3795
13965 msgid "part-get-bootable"
13969 #: ../fish/guestfish-actions.pod:3797
13972 " part-get-bootable device partnum\n"
13977 #: ../fish/guestfish-actions.pod:3799 ../src/guestfs-actions.pod:5945
13979 "This command returns true if the partition C<partnum> on C<device> has the "
13980 "bootable flag set."
13984 #: ../fish/guestfish-actions.pod:3802
13985 msgid "See also L</part-set-bootable>."
13989 #: ../fish/guestfish-actions.pod:3804
13990 msgid "part-get-mbr-id"
13994 #: ../fish/guestfish-actions.pod:3806
13997 " part-get-mbr-id device partnum\n"
14002 #: ../fish/guestfish-actions.pod:3808 ../src/guestfs-actions.pod:5961
14004 "Returns the MBR type byte (also known as the ID byte) from the numbered "
14005 "partition C<partnum>."
14009 #: ../fish/guestfish-actions.pod:3811 ../fish/guestfish-actions.pod:3955
14011 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
14012 "undefined results for other partition table types (see "
14013 "L</part-get-parttype>)."
14017 #: ../fish/guestfish-actions.pod:3815
14018 msgid "part-get-parttype"
14022 #: ../fish/guestfish-actions.pod:3817
14025 " part-get-parttype device\n"
14030 #: ../fish/guestfish-actions.pod:3819 ../src/guestfs-actions.pod:5978
14032 "This command examines the partition table on C<device> and returns the "
14033 "partition table type (format) being used."
14037 #: ../fish/guestfish-actions.pod:3822
14039 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
14040 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
14041 "possible, although unusual. See L</part-init> for a full list."
14045 #: ../fish/guestfish-actions.pod:3827
14050 #: ../fish/guestfish-actions.pod:3829
14053 " part-init device parttype\n"
14058 #: ../fish/guestfish-actions.pod:3831 ../src/guestfs-actions.pod:5998
14060 "This creates an empty partition table on C<device> of one of the partition "
14061 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
14062 "(for large disks)."
14066 #: ../fish/guestfish-actions.pod:3835
14068 "Initially there are no partitions. Following this, you should call "
14069 "L</part-add> for each partition required."
14073 #: ../fish/guestfish-actions.pod:3838 ../src/guestfs-actions.pod:6005
14074 msgid "Possible values for C<parttype> are:"
14078 #: ../fish/guestfish-actions.pod:3842 ../src/guestfs-actions.pod:6009
14083 #: ../fish/guestfish-actions.pod:3844 ../src/guestfs-actions.pod:6011
14088 #: ../fish/guestfish-actions.pod:3846 ../src/guestfs-actions.pod:6013
14089 msgid "Intel EFI / GPT partition table."
14093 #: ../fish/guestfish-actions.pod:3848 ../src/guestfs-actions.pod:6015
14095 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
14096 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
14097 "the C<mbr> format."
14101 #: ../fish/guestfish-actions.pod:3852 ../src/guestfs-actions.pod:6019
14106 #: ../fish/guestfish-actions.pod:3854 ../src/guestfs-actions.pod:6021
14111 #: ../fish/guestfish-actions.pod:3856 ../src/guestfs-actions.pod:6023
14113 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
14114 "Windows. This partition type will B<only> work for device sizes up to 2 "
14115 "TB. For large disks we recommend using C<gpt>."
14119 #: ../fish/guestfish-actions.pod:3863 ../src/guestfs-actions.pod:6030
14120 msgid "Other partition table types that may work but are not supported include:"
14124 #: ../fish/guestfish-actions.pod:3868 ../src/guestfs-actions.pod:6035
14129 #: ../fish/guestfish-actions.pod:3870 ../src/guestfs-actions.pod:6037
14130 msgid "AIX disk labels."
14134 #: ../fish/guestfish-actions.pod:3872 ../src/guestfs-actions.pod:6039
14139 #: ../fish/guestfish-actions.pod:3874 ../src/guestfs-actions.pod:6041
14144 #: ../fish/guestfish-actions.pod:3876 ../src/guestfs-actions.pod:6043
14145 msgid "Amiga \"Rigid Disk Block\" format."
14149 #: ../fish/guestfish-actions.pod:3878 ../src/guestfs-actions.pod:6045
14154 #: ../fish/guestfish-actions.pod:3880 ../src/guestfs-actions.pod:6047
14155 msgid "BSD disk labels."
14159 #: ../fish/guestfish-actions.pod:3882 ../src/guestfs-actions.pod:6049
14164 #: ../fish/guestfish-actions.pod:3884 ../src/guestfs-actions.pod:6051
14165 msgid "DASD, used on IBM mainframes."
14169 #: ../fish/guestfish-actions.pod:3886 ../src/guestfs-actions.pod:6053
14174 #: ../fish/guestfish-actions.pod:3888 ../src/guestfs-actions.pod:6055
14175 msgid "MIPS/SGI volumes."
14179 #: ../fish/guestfish-actions.pod:3890 ../src/guestfs-actions.pod:6057
14184 #: ../fish/guestfish-actions.pod:3892 ../src/guestfs-actions.pod:6059
14185 msgid "Old Mac partition format. Modern Macs use C<gpt>."
14189 #: ../fish/guestfish-actions.pod:3894 ../src/guestfs-actions.pod:6061
14194 #: ../fish/guestfish-actions.pod:3896 ../src/guestfs-actions.pod:6063
14195 msgid "NEC PC-98 format, common in Japan apparently."
14199 #: ../fish/guestfish-actions.pod:3898 ../src/guestfs-actions.pod:6065
14204 #: ../fish/guestfish-actions.pod:3900 ../src/guestfs-actions.pod:6067
14205 msgid "Sun disk labels."
14209 #: ../fish/guestfish-actions.pod:3904
14214 #: ../fish/guestfish-actions.pod:3906
14217 " part-list device\n"
14222 #: ../fish/guestfish-actions.pod:3908 ../src/guestfs-actions.pod:6081
14224 "This command parses the partition table on C<device> and returns the list of "
14225 "partitions found."
14229 #: ../fish/guestfish-actions.pod:3911 ../src/guestfs-actions.pod:6084
14230 msgid "The fields in the returned structure are:"
14234 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:6088
14235 msgid "B<part_num>"
14239 #: ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6090
14240 msgid "Partition number, counting from 1."
14244 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:6092
14245 msgid "B<part_start>"
14249 #: ../fish/guestfish-actions.pod:3921
14251 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14252 "the device's sector size, see L</blockdev-getss>."
14256 #: ../fish/guestfish-actions.pod:3924 ../src/guestfs-actions.pod:6097
14257 msgid "B<part_end>"
14261 #: ../fish/guestfish-actions.pod:3926 ../src/guestfs-actions.pod:6099
14262 msgid "End of the partition in bytes."
14266 #: ../fish/guestfish-actions.pod:3928 ../src/guestfs-actions.pod:6101
14267 msgid "B<part_size>"
14271 #: ../fish/guestfish-actions.pod:3930 ../src/guestfs-actions.pod:6103
14272 msgid "Size of the partition in bytes."
14276 #: ../fish/guestfish-actions.pod:3934
14277 msgid "part-set-bootable"
14281 #: ../fish/guestfish-actions.pod:3936
14284 " part-set-bootable device partnum true|false\n"
14289 #: ../fish/guestfish-actions.pod:3938 ../src/guestfs-actions.pod:6121
14291 "This sets the bootable flag on partition numbered C<partnum> on device "
14292 "C<device>. Note that partitions are numbered from 1."
14296 #: ../fish/guestfish-actions.pod:3941 ../src/guestfs-actions.pod:6124
14298 "The bootable flag is used by some operating systems (notably Windows) to "
14299 "determine which partition to boot from. It is by no means universally "
14304 #: ../fish/guestfish-actions.pod:3945
14305 msgid "part-set-mbr-id"
14309 #: ../fish/guestfish-actions.pod:3947
14312 " part-set-mbr-id device partnum idbyte\n"
14317 #: ../fish/guestfish-actions.pod:3949 ../src/guestfs-actions.pod:6140
14319 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14320 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14321 "documentation are in fact hexadecimal numbers, but usually documented "
14322 "without any leading \"0x\" which might be confusing."
14326 #: ../fish/guestfish-actions.pod:3959
14327 msgid "part-set-name"
14331 #: ../fish/guestfish-actions.pod:3961
14334 " part-set-name device partnum name\n"
14339 #: ../fish/guestfish-actions.pod:3963 ../src/guestfs-actions.pod:6162
14341 "This sets the partition name on partition numbered C<partnum> on device "
14342 "C<device>. Note that partitions are numbered from 1."
14346 #: ../fish/guestfish-actions.pod:3966 ../src/guestfs-actions.pod:6165
14348 "The partition name can only be set on certain types of partition table. "
14349 "This works on C<gpt> but not on C<mbr> partitions."
14353 #: ../fish/guestfish-actions.pod:3969
14354 msgid "part-to-dev"
14358 #: ../fish/guestfish-actions.pod:3971
14361 " part-to-dev partition\n"
14366 #: ../fish/guestfish-actions.pod:3973 ../src/guestfs-actions.pod:6178
14368 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14369 "partition number, returning the device name (eg. \"/dev/sdb\")."
14373 #: ../fish/guestfish-actions.pod:3977 ../fish/guestfish-actions.pod:3989
14375 "The named partition must exist, for example as a string returned from "
14376 "L</list-partitions>."
14380 #: ../fish/guestfish-actions.pod:3980
14381 msgid "See also L</part-to-partnum>."
14385 #: ../fish/guestfish-actions.pod:3982
14386 msgid "part-to-partnum"
14390 #: ../fish/guestfish-actions.pod:3984
14393 " part-to-partnum partition\n"
14398 #: ../fish/guestfish-actions.pod:3986 ../src/guestfs-actions.pod:6198
14400 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
14401 "partition number (eg. C<1>)."
14405 #: ../fish/guestfish-actions.pod:3992
14406 msgid "See also L</part-to-dev>."
14410 #: ../fish/guestfish-actions.pod:3994
14411 msgid "ping-daemon"
14415 #: ../fish/guestfish-actions.pod:3996
14423 #: ../fish/guestfish-actions.pod:3998 ../src/guestfs-actions.pod:6215
14425 "This is a test probe into the guestfs daemon running inside the qemu "
14426 "subprocess. Calling this function checks that the daemon responds to the "
14427 "ping message, without affecting the daemon or attached block device(s) in "
14432 #: ../fish/guestfish-actions.pod:4003
14437 #: ../fish/guestfish-actions.pod:4005
14440 " pread path count offset\n"
14445 #: ../fish/guestfish-actions.pod:4007 ../src/guestfs-actions.pod:6233
14447 "This command lets you read part of a file. It reads C<count> bytes of the "
14448 "file, starting at C<offset>, from file C<path>."
14452 #: ../fish/guestfish-actions.pod:4010 ../fish/guestfish-actions.pod:4025 ../src/guestfs-actions.pod:6236 ../src/guestfs-actions.pod:6262
14454 "This may read fewer bytes than requested. For further details see the "
14455 "L<pread(2)> system call."
14459 #: ../fish/guestfish-actions.pod:4013
14460 msgid "See also L</pwrite>, L</pread-device>."
14464 #: ../fish/guestfish-actions.pod:4018
14465 msgid "pread-device"
14469 #: ../fish/guestfish-actions.pod:4020
14472 " pread-device device count offset\n"
14477 #: ../fish/guestfish-actions.pod:4022 ../src/guestfs-actions.pod:6259
14479 "This command lets you read part of a file. It reads C<count> bytes of "
14480 "C<device>, starting at C<offset>."
14484 #: ../fish/guestfish-actions.pod:4028
14485 msgid "See also L</pread>."
14489 #: ../fish/guestfish-actions.pod:4033
14494 #: ../fish/guestfish-actions.pod:4035
14497 " pvcreate device\n"
14502 #: ../fish/guestfish-actions.pod:4037 ../src/guestfs-actions.pod:6282
14504 "This creates an LVM physical volume on the named C<device>, where C<device> "
14505 "should usually be a partition name such as C</dev/sda1>."
14509 #: ../fish/guestfish-actions.pod:4041
14514 #: ../fish/guestfish-actions.pod:4043
14517 " pvremove device\n"
14522 #: ../fish/guestfish-actions.pod:4045 ../src/guestfs-actions.pod:6296
14524 "This wipes a physical volume C<device> so that LVM will no longer recognise "
14529 #: ../fish/guestfish-actions.pod:4048 ../src/guestfs-actions.pod:6299
14531 "The implementation uses the C<pvremove> command which refuses to wipe "
14532 "physical volumes that contain any volume groups, so you have to remove those "
14537 #: ../fish/guestfish-actions.pod:4052
14542 #: ../fish/guestfish-actions.pod:4054
14545 " pvresize device\n"
14550 #: ../fish/guestfish-actions.pod:4056 ../src/guestfs-actions.pod:6313
14552 "This resizes (expands or shrinks) an existing LVM physical volume to match "
14553 "the new size of the underlying device."
14557 #: ../fish/guestfish-actions.pod:4059
14558 msgid "pvresize-size"
14562 #: ../fish/guestfish-actions.pod:4061
14565 " pvresize-size device size\n"
14570 #: ../fish/guestfish-actions.pod:4063
14572 "This command is the same as L</pvresize> except that it allows you to "
14573 "specify the new size (in bytes) explicitly."
14577 #: ../fish/guestfish-actions.pod:4066
14582 #: ../fish/guestfish-actions.pod:4068
14590 #: ../fish/guestfish-actions.pod:4070 ../src/guestfs-actions.pod:6339
14592 "List all the physical volumes detected. This is the equivalent of the "
14593 "L<pvs(8)> command."
14597 #: ../fish/guestfish-actions.pod:4073 ../src/guestfs-actions.pod:6342
14599 "This returns a list of just the device names that contain PVs "
14600 "(eg. C</dev/sda2>)."
14604 #: ../fish/guestfish-actions.pod:4076
14605 msgid "See also L</pvs-full>."
14609 #: ../fish/guestfish-actions.pod:4078
14614 #: ../fish/guestfish-actions.pod:4080
14622 #: ../fish/guestfish-actions.pod:4082 ../src/guestfs-actions.pod:6358
14624 "List all the physical volumes detected. This is the equivalent of the "
14625 "L<pvs(8)> command. The \"full\" version includes all fields."
14629 #: ../fish/guestfish-actions.pod:4085
14634 #: ../fish/guestfish-actions.pod:4087
14642 #: ../fish/guestfish-actions.pod:4089 ../src/guestfs-actions.pod:6373
14643 msgid "This command returns the UUID of the LVM PV C<device>."
14647 #: ../fish/guestfish-actions.pod:4091
14652 #: ../fish/guestfish-actions.pod:4093
14655 " pwrite path content offset\n"
14660 #: ../fish/guestfish-actions.pod:4095 ../src/guestfs-actions.pod:6389
14662 "This command writes to part of a file. It writes the data buffer C<content> "
14663 "to the file C<path> starting at offset C<offset>."
14667 #: ../fish/guestfish-actions.pod:4098 ../src/guestfs-actions.pod:6392
14669 "This command implements the L<pwrite(2)> system call, and like that system "
14670 "call it may not write the full data requested. The return value is the "
14671 "number of bytes that were actually written to the file. This could even be "
14672 "0, although short writes are unlikely for regular files in ordinary "
14677 #: ../fish/guestfish-actions.pod:4104
14678 msgid "See also L</pread>, L</pwrite-device>."
14682 #: ../fish/guestfish-actions.pod:4109
14683 msgid "pwrite-device"
14687 #: ../fish/guestfish-actions.pod:4111
14690 " pwrite-device device content offset\n"
14695 #: ../fish/guestfish-actions.pod:4113 ../src/guestfs-actions.pod:6416
14697 "This command writes to part of a device. It writes the data buffer "
14698 "C<content> to C<device> starting at offset C<offset>."
14702 #: ../fish/guestfish-actions.pod:4116 ../src/guestfs-actions.pod:6419
14704 "This command implements the L<pwrite(2)> system call, and like that system "
14705 "call it may not write the full data requested (although short writes to disk "
14706 "devices and partitions are probably impossible with standard Linux kernels)."
14710 #: ../fish/guestfish-actions.pod:4121
14711 msgid "See also L</pwrite>."
14715 #: ../fish/guestfish-actions.pod:4126
14720 #: ../fish/guestfish-actions.pod:4128
14723 " read-file path\n"
14728 #: ../fish/guestfish-actions.pod:4130 ../src/guestfs-actions.pod:6440
14729 msgid "This calls returns the contents of the file C<path> as a buffer."
14733 #: ../fish/guestfish-actions.pod:4133
14735 "Unlike L</cat>, this function can correctly handle files that contain "
14736 "embedded ASCII NUL characters. However unlike L</download>, this function "
14737 "is limited in the total size of file that can be handled."
14741 #: ../fish/guestfish-actions.pod:4141
14746 #: ../fish/guestfish-actions.pod:4143
14749 " read-lines path\n"
14754 #: ../fish/guestfish-actions.pod:4147 ../src/guestfs-actions.pod:6465
14756 "The file contents are returned as a list of lines. Trailing C<LF> and "
14757 "C<CRLF> character sequences are I<not> returned."
14761 #: ../fish/guestfish-actions.pod:4150
14763 "Note that this function cannot correctly handle binary files (specifically, "
14764 "files containing C<\\0> character which is treated as end of line). For "
14765 "those you need to use the L</read-file> function which has a more complex "
14770 #: ../fish/guestfish-actions.pod:4155
14775 #: ../fish/guestfish-actions.pod:4157
14783 #: ../fish/guestfish-actions.pod:4159 ../src/guestfs-actions.pod:6485
14784 msgid "This returns the list of directory entries in directory C<dir>."
14788 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6487
14790 "All entries in the directory are returned, including C<.> and C<..>. The "
14791 "entries are I<not> sorted, but returned in the same order as the underlying "
14796 #: ../fish/guestfish-actions.pod:4165 ../src/guestfs-actions.pod:6491
14798 "Also this call returns basic file type information about each file. The "
14799 "C<ftyp> field will contain one of the following characters:"
14803 #: ../fish/guestfish-actions.pod:4170 ../src/guestfs-actions.pod:6496
14808 #: ../fish/guestfish-actions.pod:4172 ../src/guestfs-actions.pod:6498
14809 msgid "Block special"
14813 #: ../fish/guestfish-actions.pod:4174 ../src/guestfs-actions.pod:6500
14818 #: ../fish/guestfish-actions.pod:4176 ../src/guestfs-actions.pod:6502
14819 msgid "Char special"
14823 #: ../fish/guestfish-actions.pod:4178 ../src/guestfs-actions.pod:6504
14828 #: ../fish/guestfish-actions.pod:4180 ../src/guestfs-actions.pod:6506
14833 #: ../fish/guestfish-actions.pod:4182 ../src/guestfs-actions.pod:6508
14838 #: ../fish/guestfish-actions.pod:4184 ../src/guestfs-actions.pod:6510
14839 msgid "FIFO (named pipe)"
14843 #: ../fish/guestfish-actions.pod:4186 ../src/guestfs-actions.pod:6512
14848 #: ../fish/guestfish-actions.pod:4188 ../src/guestfs-actions.pod:6514
14849 msgid "Symbolic link"
14853 #: ../fish/guestfish-actions.pod:4190 ../src/guestfs-actions.pod:6516
14858 #: ../fish/guestfish-actions.pod:4192 ../src/guestfs-actions.pod:6518
14859 msgid "Regular file"
14863 #: ../fish/guestfish-actions.pod:4194 ../src/guestfs-actions.pod:6520
14868 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6522
14873 #: ../fish/guestfish-actions.pod:4198 ../src/guestfs-actions.pod:6524
14878 #: ../fish/guestfish-actions.pod:4200 ../src/guestfs-actions.pod:6526
14879 msgid "Unknown file type"
14883 #: ../fish/guestfish-actions.pod:4202 ../src/guestfs-actions.pod:6528
14888 #: ../fish/guestfish-actions.pod:4204 ../src/guestfs-actions.pod:6530
14889 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14893 #: ../fish/guestfish-actions.pod:4209
14895 "This function is primarily intended for use by programs. To get a simple "
14896 "list of names, use L</ls>. To get a printable directory for human "
14897 "consumption, use L</ll>."
14901 #: ../fish/guestfish-actions.pod:4213
14906 #: ../fish/guestfish-actions.pod:4215
14914 #: ../fish/guestfish-actions.pod:4217 ../src/guestfs-actions.pod:6551
14915 msgid "This command reads the target of a symbolic link."
14919 #: ../fish/guestfish-actions.pod:4219
14920 msgid "readlinklist"
14924 #: ../fish/guestfish-actions.pod:4221
14927 " readlinklist path 'names ...'\n"
14932 #: ../fish/guestfish-actions.pod:4223 ../src/guestfs-actions.pod:6565
14934 "This call allows you to do a C<readlink> operation on multiple files, where "
14935 "all files are in the directory C<path>. C<names> is the list of files from "
14940 #: ../fish/guestfish-actions.pod:4227 ../src/guestfs-actions.pod:6569
14942 "On return you get a list of strings, with a one-to-one correspondence to the "
14943 "C<names> list. Each string is the value of the symbolic link."
14947 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6573
14949 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14950 "result string is the empty string C<\"\">. However the whole operation is "
14951 "completed even if there were C<readlink(2)> errors, and so you can call this "
14952 "function with names where you don't know if they are symbolic links already "
14953 "(albeit slightly less efficient)."
14957 #: ../fish/guestfish-actions.pod:4238 ../src/guestfs-actions.pod:6580
14959 "This call is intended for programs that want to efficiently list a directory "
14960 "contents without making many round-trips. Very long directory listings "
14961 "might cause the protocol message size to be exceeded, causing this call to "
14962 "fail. The caller must split up such requests into smaller groups of names."
14966 #: ../fish/guestfish-actions.pod:4245
14971 #: ../fish/guestfish-actions.pod:4247
14979 #: ../fish/guestfish-actions.pod:4249 ../src/guestfs-actions.pod:6599
14981 "Return the canonicalized absolute pathname of C<path>. The returned path "
14982 "has no C<.>, C<..> or symbolic link path elements."
14986 #: ../fish/guestfish-actions.pod:4252
14987 msgid "removexattr"
14991 #: ../fish/guestfish-actions.pod:4254
14994 " removexattr xattr path\n"
14999 #: ../fish/guestfish-actions.pod:4256 ../src/guestfs-actions.pod:6614
15000 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
15004 #: ../fish/guestfish-actions.pod:4259
15005 msgid "See also: L</lremovexattr>, L<attr(5)>."
15009 #: ../fish/guestfish-actions.pod:4261
15014 #: ../fish/guestfish-actions.pod:4263
15017 " resize2fs device\n"
15022 #: ../fish/guestfish-actions.pod:4265 ../src/guestfs-actions.pod:6629
15024 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
15025 "underlying device."
15029 #: ../fish/guestfish-actions.pod:4268
15031 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
15032 "before calling this command. For unknown reasons C<resize2fs> sometimes "
15033 "gives an error about this and sometimes not. In any case, it is always safe "
15034 "to call L</e2fsck-f> before calling this function."
15038 #: ../fish/guestfish-actions.pod:4274
15039 msgid "resize2fs-M"
15043 #: ../fish/guestfish-actions.pod:4276
15046 " resize2fs-M device\n"
15051 #: ../fish/guestfish-actions.pod:4278
15053 "This command is the same as L</resize2fs>, but the filesystem is resized to "
15054 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
15059 #: ../fish/guestfish-actions.pod:4282
15061 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
15062 "and read the C<Block size> and C<Block count> values. These two numbers, "
15063 "multiplied together, give the resulting size of the minimal filesystem in "
15068 #: ../fish/guestfish-actions.pod:4287
15069 msgid "resize2fs-size"
15073 #: ../fish/guestfish-actions.pod:4289
15076 " resize2fs-size device size\n"
15081 #: ../fish/guestfish-actions.pod:4291
15083 "This command is the same as L</resize2fs> except that it allows you to "
15084 "specify the new size (in bytes) explicitly."
15088 #: ../fish/guestfish-actions.pod:4294
15093 #: ../fish/guestfish-actions.pod:4296
15101 #: ../fish/guestfish-actions.pod:4298 ../src/guestfs-actions.pod:6681
15102 msgid "Remove the single file C<path>."
15106 #: ../fish/guestfish-actions.pod:4300
15111 #: ../fish/guestfish-actions.pod:4302
15119 #: ../fish/guestfish-actions.pod:4304 ../src/guestfs-actions.pod:6693
15121 "Remove the file or directory C<path>, recursively removing the contents if "
15122 "its a directory. This is like the C<rm -rf> shell command."
15126 #: ../fish/guestfish-actions.pod:4308
15131 #: ../fish/guestfish-actions.pod:4310
15139 #: ../fish/guestfish-actions.pod:4312 ../src/guestfs-actions.pod:6707
15140 msgid "Remove the single directory C<path>."
15144 #: ../fish/guestfish-actions.pod:4314
15145 msgid "rmmountpoint"
15149 #: ../fish/guestfish-actions.pod:4316
15152 " rmmountpoint exemptpath\n"
15157 #: ../fish/guestfish-actions.pod:4318
15159 "This calls removes a mountpoint that was previously created with "
15160 "L</mkmountpoint>. See L</mkmountpoint> for full details."
15164 #: ../fish/guestfish-actions.pod:4322
15165 msgid "scrub-device"
15169 #: ../fish/guestfish-actions.pod:4324
15172 " scrub-device device\n"
15177 #: ../fish/guestfish-actions.pod:4326 ../src/guestfs-actions.pod:6733
15179 "This command writes patterns over C<device> to make data retrieval more "
15184 #: ../fish/guestfish-actions.pod:4329 ../fish/guestfish-actions.pod:4341 ../fish/guestfish-actions.pod:4354 ../src/guestfs-actions.pod:6736 ../src/guestfs-actions.pod:6754 ../src/guestfs-actions.pod:6773
15186 "It is an interface to the L<scrub(1)> program. See that manual page for "
15191 #: ../fish/guestfish-actions.pod:4332
15196 #: ../fish/guestfish-actions.pod:4334
15199 " scrub-file file\n"
15204 #: ../fish/guestfish-actions.pod:4336 ../src/guestfs-actions.pod:6749
15206 "This command writes patterns over a file to make data retrieval more "
15211 #: ../fish/guestfish-actions.pod:4339 ../src/guestfs-actions.pod:6752
15212 msgid "The file is I<removed> after scrubbing."
15216 #: ../fish/guestfish-actions.pod:4344
15217 msgid "scrub-freespace"
15221 #: ../fish/guestfish-actions.pod:4346
15224 " scrub-freespace dir\n"
15229 #: ../fish/guestfish-actions.pod:4348
15231 "This command creates the directory C<dir> and then fills it with files until "
15232 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
15233 "deletes them. The intention is to scrub any free space on the partition "
15234 "containing C<dir>."
15238 #: ../fish/guestfish-actions.pod:4357
15243 #: ../fish/guestfish-actions.pod:4359
15248 #: ../fish/guestfish-actions.pod:4361
15251 " set-append append\n"
15256 #: ../fish/guestfish-actions.pod:4363 ../src/guestfs-actions.pod:6786
15258 "This function is used to add additional options to the guest kernel command "
15263 #: ../fish/guestfish-actions.pod:4366 ../src/guestfs-actions.pod:6789
15265 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15266 "environment variable."
15270 #: ../fish/guestfish-actions.pod:4369 ../src/guestfs-actions.pod:6792
15272 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15273 "(libguestfs always adds a few of its own)."
15277 #: ../fish/guestfish-actions.pod:4372
15278 msgid "set-attach-method"
15282 #: ../fish/guestfish-actions.pod:4374
15283 msgid "attach-method"
15287 #: ../fish/guestfish-actions.pod:4376
15290 " set-attach-method attachmethod\n"
15295 #: ../fish/guestfish-actions.pod:4378 ../src/guestfs-actions.pod:6805
15297 "Set the method that libguestfs uses to connect to the back end guestfsd "
15298 "daemon. Possible methods are:"
15302 #: ../fish/guestfish-actions.pod:4383 ../src/guestfs-actions.pod:6810 ../src/guestfs.pod:2916
15303 msgid "C<appliance>"
15307 #: ../fish/guestfish-actions.pod:4385 ../src/guestfs-actions.pod:6812
15309 "Launch an appliance and connect to it. This is the ordinary method and the "
15314 #: ../fish/guestfish-actions.pod:4388 ../src/guestfs-actions.pod:6815
15315 msgid "C<unix:I<path>>"
15319 #: ../fish/guestfish-actions.pod:4390 ../src/guestfs-actions.pod:6817
15320 msgid "Connect to the Unix domain socket I<path>."
15324 #: ../fish/guestfish-actions.pod:4392 ../src/guestfs-actions.pod:6819
15326 "This method lets you connect to an existing daemon or (using virtio-serial) "
15327 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15328 "RUNNING DAEMONS>."
15332 #: ../fish/guestfish-actions.pod:4398
15333 msgid "set-autosync"
15337 #: ../fish/guestfish-actions.pod:4400
15342 #: ../fish/guestfish-actions.pod:4402
15345 " set-autosync true|false\n"
15350 #: ../fish/guestfish-actions.pod:4404 ../src/guestfs-actions.pod:6835
15352 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15353 "effort attempt to make filesystems consistent and synchronized when the "
15354 "handle is closed (also if the program exits without closing handles)."
15358 #: ../fish/guestfish-actions.pod:4409 ../src/guestfs-actions.pod:6840
15360 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15361 "disabled by default)."
15365 #: ../fish/guestfish-actions.pod:4412
15370 #: ../fish/guestfish-actions.pod:4414
15375 #: ../fish/guestfish-actions.pod:4416
15378 " set-direct true|false\n"
15383 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6853
15385 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15386 "passed directly through to the appliance once it is launched."
15390 #: ../fish/guestfish-actions.pod:4422
15392 "One consequence of this is that log messages aren't caught by the library "
15393 "and handled by L</set-log-message-callback>, but go straight to stdout."
15397 #: ../fish/guestfish-actions.pod:4426 ../src/guestfs-actions.pod:6861
15398 msgid "You probably don't want to use this unless you know what you are doing."
15402 #: ../fish/guestfish-actions.pod:4429 ../src/guestfs-actions.pod:6864
15403 msgid "The default is disabled."
15407 #: ../fish/guestfish-actions.pod:4431
15408 msgid "set-e2label"
15412 #: ../fish/guestfish-actions.pod:4433
15415 " set-e2label device label\n"
15420 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6877
15422 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
15423 "C<label>. Filesystem labels are limited to 16 characters."
15427 #: ../fish/guestfish-actions.pod:4439
15429 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
15430 "label on a filesystem."
15434 #: ../fish/guestfish-actions.pod:4442
15439 #: ../fish/guestfish-actions.pod:4444
15442 " set-e2uuid device uuid\n"
15447 #: ../fish/guestfish-actions.pod:4446 ../src/guestfs-actions.pod:6895
15449 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
15450 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
15451 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
15455 #: ../fish/guestfish-actions.pod:4451
15457 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
15458 "UUID of a filesystem."
15462 #: ../fish/guestfish-actions.pod:4454
15463 msgid "set-memsize"
15467 #: ../fish/guestfish-actions.pod:4456
15472 #: ../fish/guestfish-actions.pod:4458
15475 " set-memsize memsize\n"
15480 #: ../fish/guestfish-actions.pod:4460
15482 "This sets the memory size in megabytes allocated to the qemu subprocess. "
15483 "This only has any effect if called before L</launch>."
15487 #: ../fish/guestfish-actions.pod:4464 ../src/guestfs-actions.pod:6917
15489 "You can also change this by setting the environment variable "
15490 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
15494 #: ../fish/guestfish-actions.pod:4471
15495 msgid "set-network"
15499 #: ../fish/guestfish-actions.pod:4473
15504 #: ../fish/guestfish-actions.pod:4475
15507 " set-network true|false\n"
15512 #: ../fish/guestfish-actions.pod:4477 ../src/guestfs-actions.pod:6934
15514 "If C<network> is true, then the network is enabled in the libguestfs "
15515 "appliance. The default is false."
15519 #: ../fish/guestfish-actions.pod:4480 ../src/guestfs-actions.pod:6937
15521 "This affects whether commands are able to access the network (see "
15522 "L<guestfs(3)/RUNNING COMMANDS>)."
15526 #: ../fish/guestfish-actions.pod:4483
15527 msgid "You must call this before calling L</launch>, otherwise it has no effect."
15531 #: ../fish/guestfish-actions.pod:4486
15536 #: ../fish/guestfish-actions.pod:4490
15539 " set-path searchpath\n"
15544 #: ../fish/guestfish-actions.pod:4492 ../src/guestfs-actions.pod:6953
15545 msgid "Set the path that libguestfs searches for kernel and initrd.img."
15549 #: ../fish/guestfish-actions.pod:4494 ../src/guestfs-actions.pod:6955
15551 "The default is C<$libdir/guestfs> unless overridden by setting "
15552 "C<LIBGUESTFS_PATH> environment variable."
15556 #: ../fish/guestfish-actions.pod:4497 ../src/guestfs-actions.pod:6958
15557 msgid "Setting C<path> to C<NULL> restores the default path."
15561 #: ../fish/guestfish-actions.pod:4499
15566 #: ../fish/guestfish-actions.pod:4501
15571 #: ../fish/guestfish-actions.pod:4503
15574 " set-pgroup true|false\n"
15579 #: ../fish/guestfish-actions.pod:4505 ../src/guestfs-actions.pod:6970
15581 "If C<pgroup> is true, child processes are placed into their own process "
15586 #: ../fish/guestfish-actions.pod:4508 ../src/guestfs-actions.pod:6973
15588 "The practical upshot of this is that signals like C<SIGINT> (from users "
15589 "pressing C<^C>) won't be received by the child process."
15593 #: ../fish/guestfish-actions.pod:4511 ../src/guestfs-actions.pod:6976
15595 "The default for this flag is false, because usually you want C<^C> to kill "
15600 #: ../fish/guestfish-actions.pod:4514
15605 #: ../fish/guestfish-actions.pod:4516
15610 #: ../fish/guestfish-actions.pod:4518
15618 #: ../fish/guestfish-actions.pod:4520 ../src/guestfs-actions.pod:6989
15619 msgid "Set the qemu binary that we will use."
15623 #: ../fish/guestfish-actions.pod:4522 ../src/guestfs-actions.pod:6991
15624 msgid "The default is chosen when the library was compiled by the configure script."
15628 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6994
15630 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15635 #: ../fish/guestfish-actions.pod:4528 ../src/guestfs-actions.pod:6997
15636 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15640 #: ../fish/guestfish-actions.pod:4530 ../src/guestfs-actions.pod:6999
15642 "Note that you should call this function as early as possible after creating "
15643 "the handle. This is because some pre-launch operations depend on testing "
15644 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15645 "don't retest features, and so you might see inconsistent results. Using the "
15646 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15647 "the qemu binary at the same time as the handle is created."
15651 #: ../fish/guestfish-actions.pod:4538
15652 msgid "set-recovery-proc"
15656 #: ../fish/guestfish-actions.pod:4540
15657 msgid "recovery-proc"
15661 #: ../fish/guestfish-actions.pod:4542
15664 " set-recovery-proc true|false\n"
15669 #: ../fish/guestfish-actions.pod:4544
15671 "If this is called with the parameter C<false> then L</launch> does not "
15672 "create a recovery process. The purpose of the recovery process is to stop "
15673 "runaway qemu processes in the case where the main program aborts abruptly."
15677 #: ../fish/guestfish-actions.pod:4549
15679 "This only has any effect if called before L</launch>, and the default is "
15684 #: ../fish/guestfish-actions.pod:4552 ../src/guestfs-actions.pod:7025
15686 "About the only time when you would want to disable this is if the main "
15687 "process will fork itself into the background (\"daemonize\" itself). In "
15688 "this case the recovery process thinks that the main program has disappeared "
15689 "and so kills qemu, which is not very helpful."
15693 #: ../fish/guestfish-actions.pod:4558
15694 msgid "set-selinux"
15698 #: ../fish/guestfish-actions.pod:4560
15703 #: ../fish/guestfish-actions.pod:4562
15706 " set-selinux true|false\n"
15711 #: ../fish/guestfish-actions.pod:4564 ../src/guestfs-actions.pod:7041
15713 "This sets the selinux flag that is passed to the appliance at boot time. "
15714 "The default is C<selinux=0> (disabled)."
15718 #: ../fish/guestfish-actions.pod:4567 ../src/guestfs-actions.pod:7044
15720 "Note that if SELinux is enabled, it is always in Permissive mode "
15721 "(C<enforcing=0>)."
15725 #: ../fish/guestfish-actions.pod:4573
15730 #: ../fish/guestfish-actions.pod:4575
15735 #: ../fish/guestfish-actions.pod:4577
15743 #: ../fish/guestfish-actions.pod:4579 ../src/guestfs-actions.pod:7060
15745 "Change the number of virtual CPUs assigned to the appliance. The default is "
15746 "C<1>. Increasing this may improve performance, though often it has no "
15751 #: ../fish/guestfish-actions.pod:4583
15752 msgid "This function must be called before L</launch>."
15756 #: ../fish/guestfish-actions.pod:4585
15761 #: ../fish/guestfish-actions.pod:4587
15766 #: ../fish/guestfish-actions.pod:4589
15769 " set-trace true|false\n"
15774 #: ../fish/guestfish-actions.pod:4591 ../src/guestfs-actions.pod:7076
15776 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15777 "return values are traced."
15781 #: ../fish/guestfish-actions.pod:4594 ../src/guestfs-actions.pod:7079
15783 "If you want to trace C API calls into libguestfs (and other libraries) then "
15784 "possibly a better way is to use the external ltrace(1) command."
15788 #: ../fish/guestfish-actions.pod:4598 ../src/guestfs-actions.pod:7083
15790 "Command traces are disabled unless the environment variable "
15791 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15795 #: ../fish/guestfish-actions.pod:4601
15797 "Trace messages are normally sent to C<stderr>, unless you register a "
15798 "callback to send them somewhere else (see L</set-event-callback>)."
15802 #: ../fish/guestfish-actions.pod:4605
15803 msgid "set-verbose"
15807 #: ../fish/guestfish-actions.pod:4607
15812 #: ../fish/guestfish-actions.pod:4609
15815 " set-verbose true|false\n"
15820 #: ../fish/guestfish-actions.pod:4611 ../src/guestfs-actions.pod:7100
15821 msgid "If C<verbose> is true, this turns on verbose messages."
15825 #: ../fish/guestfish-actions.pod:4613 ../src/guestfs-actions.pod:7102
15827 "Verbose messages are disabled unless the environment variable "
15828 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15832 #: ../fish/guestfish-actions.pod:4616
15834 "Verbose messages are normally sent to C<stderr>, unless you register a "
15835 "callback to send them somewhere else (see L</set-event-callback>)."
15839 #: ../fish/guestfish-actions.pod:4620
15844 #: ../fish/guestfish-actions.pod:4622
15847 " setcon context\n"
15852 #: ../fish/guestfish-actions.pod:4624 ../src/guestfs-actions.pod:7119
15854 "This sets the SELinux security context of the daemon to the string "
15859 #: ../fish/guestfish-actions.pod:4627 ../src/guestfs-actions.pod:7122
15860 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15864 #: ../fish/guestfish-actions.pod:4629
15869 #: ../fish/guestfish-actions.pod:4631
15872 " setxattr xattr val vallen path\n"
15877 #: ../fish/guestfish-actions.pod:4633 ../src/guestfs-actions.pod:7137
15879 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15880 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15884 #: ../fish/guestfish-actions.pod:4637
15885 msgid "See also: L</lsetxattr>, L<attr(5)>."
15889 #: ../fish/guestfish-actions.pod:4639
15894 #: ../fish/guestfish-actions.pod:4641
15897 " sfdisk device cyls heads sectors 'lines ...'\n"
15902 #: ../fish/guestfish-actions.pod:4643 ../src/guestfs-actions.pod:7164
15904 "This is a direct interface to the L<sfdisk(8)> program for creating "
15905 "partitions on block devices."
15909 #: ../fish/guestfish-actions.pod:4646 ../src/guestfs-actions.pod:7167
15910 msgid "C<device> should be a block device, for example C</dev/sda>."
15914 #: ../fish/guestfish-actions.pod:4648 ../src/guestfs-actions.pod:7169
15916 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15917 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
15918 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15919 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15920 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15921 "the kernel) cannot work out the right geometry and you will need to tell it."
15925 #: ../fish/guestfish-actions.pod:4656 ../src/guestfs-actions.pod:7177
15927 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15928 "refer to the L<sfdisk(8)> manpage."
15932 #: ../fish/guestfish-actions.pod:4659 ../src/guestfs-actions.pod:7180
15934 "To create a single partition occupying the whole disk, you would pass "
15935 "C<lines> as a single element list, when the single element being the string "
15940 #: ../fish/guestfish-actions.pod:4663
15941 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15945 #: ../fish/guestfish-actions.pod:4666 ../fish/guestfish-actions.pod:4686 ../fish/guestfish-actions.pod:4705
15947 "I<This function is deprecated.> In new code, use the L</part_add> call "
15952 #: ../fish/guestfish-actions.pod:4673
15957 #: ../fish/guestfish-actions.pod:4675
15960 " sfdiskM device 'lines ...'\n"
15965 #: ../fish/guestfish-actions.pod:4677
15967 "This is a simplified interface to the L</sfdisk> command, where partition "
15968 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15969 "you don't need to specify the cyls, heads and sectors parameters which were "
15970 "rarely if ever used anyway."
15974 #: ../fish/guestfish-actions.pod:4683
15975 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15979 #: ../fish/guestfish-actions.pod:4693
15984 #: ../fish/guestfish-actions.pod:4695
15987 " sfdisk-N device partnum cyls heads sectors line\n"
15992 #: ../fish/guestfish-actions.pod:4697 ../src/guestfs-actions.pod:7236
15994 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15995 "(note: C<n> counts from 1)."
15999 #: ../fish/guestfish-actions.pod:4700
16001 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
16002 "cyls/heads/sectors parameters."
16006 #: ../fish/guestfish-actions.pod:4703
16007 msgid "See also: L</part-add>"
16011 #: ../fish/guestfish-actions.pod:4712
16012 msgid "sfdisk-disk-geometry"
16016 #: ../fish/guestfish-actions.pod:4714
16019 " sfdisk-disk-geometry device\n"
16024 #: ../fish/guestfish-actions.pod:4716
16026 "This displays the disk geometry of C<device> read from the partition table. "
16027 "Especially in the case where the underlying block device has been resized, "
16028 "this can be different from the kernel's idea of the geometry (see "
16029 "L</sfdisk-kernel-geometry>)."
16033 #: ../fish/guestfish-actions.pod:4721 ../fish/guestfish-actions.pod:4730 ../src/guestfs-actions.pod:7259 ../src/guestfs-actions.pod:7275
16034 msgid "The result is in human-readable format, and not designed to be parsed."
16038 #: ../fish/guestfish-actions.pod:4724
16039 msgid "sfdisk-kernel-geometry"
16043 #: ../fish/guestfish-actions.pod:4726
16046 " sfdisk-kernel-geometry device\n"
16051 #: ../fish/guestfish-actions.pod:4728 ../src/guestfs-actions.pod:7273
16052 msgid "This displays the kernel's idea of the geometry of C<device>."
16056 #: ../fish/guestfish-actions.pod:4733
16061 #: ../fish/guestfish-actions.pod:4735
16064 " sfdisk-l device\n"
16069 #: ../fish/guestfish-actions.pod:4737 ../src/guestfs-actions.pod:7296
16071 "This displays the partition table on C<device>, in the human-readable output "
16072 "of the L<sfdisk(8)> command. It is not intended to be parsed."
16076 #: ../fish/guestfish-actions.pod:4741
16077 msgid "See also: L</part-list>"
16081 #: ../fish/guestfish-actions.pod:4743
16083 "I<This function is deprecated.> In new code, use the L</part_list> call "
16088 #: ../fish/guestfish-actions.pod:4750
16093 #: ../fish/guestfish-actions.pod:4752
16101 #: ../fish/guestfish-actions.pod:4754 ../src/guestfs-actions.pod:7313
16103 "This call runs a command from the guest filesystem via the guest's "
16108 #: ../fish/guestfish-actions.pod:4757
16109 msgid "This is like L</command>, but passes the command to:"
16113 #: ../fish/guestfish-actions.pod:4759 ../src/guestfs-actions.pod:7318
16116 " /bin/sh -c \"command\"\n"
16121 #: ../fish/guestfish-actions.pod:4761 ../src/guestfs-actions.pod:7320
16123 "Depending on the guest's shell, this usually results in wildcards being "
16124 "expanded, shell expressions being interpolated and so on."
16128 #: ../fish/guestfish-actions.pod:4765
16129 msgid "All the provisos about L</command> apply to this call."
16133 #: ../fish/guestfish-actions.pod:4767
16138 #: ../fish/guestfish-actions.pod:4769
16141 " sh-lines command\n"
16146 #: ../fish/guestfish-actions.pod:4771
16147 msgid "This is the same as L</sh>, but splits the result into a list of lines."
16151 #: ../fish/guestfish-actions.pod:4774
16152 msgid "See also: L</command-lines>"
16156 #: ../fish/guestfish-actions.pod:4776
16161 #: ../fish/guestfish-actions.pod:4778
16169 #: ../fish/guestfish-actions.pod:4780 ../src/guestfs-actions.pod:7354
16170 msgid "Sleep for C<secs> seconds."
16174 #: ../fish/guestfish-actions.pod:4782
16179 #: ../fish/guestfish-actions.pod:4784
16187 #: ../fish/guestfish-actions.pod:4788 ../src/guestfs-actions.pod:7368
16188 msgid "This is the same as the C<stat(2)> system call."
16192 #: ../fish/guestfish-actions.pod:4790
16197 #: ../fish/guestfish-actions.pod:4792
16205 #: ../fish/guestfish-actions.pod:4794 ../src/guestfs-actions.pod:7382
16207 "Returns file system statistics for any mounted file system. C<path> should "
16208 "be a file or directory in the mounted file system (typically it is the mount "
16209 "point itself, but it doesn't need to be)."
16213 #: ../fish/guestfish-actions.pod:4798 ../src/guestfs-actions.pod:7386
16214 msgid "This is the same as the C<statvfs(2)> system call."
16218 #: ../fish/guestfish-actions.pod:4800
16223 #: ../fish/guestfish-actions.pod:4802
16231 #: ../fish/guestfish-actions.pod:4804 ../src/guestfs-actions.pod:7400
16233 "This runs the L<strings(1)> command on a file and returns the list of "
16234 "printable strings found."
16238 #: ../fish/guestfish-actions.pod:4810
16243 #: ../fish/guestfish-actions.pod:4812
16246 " strings-e encoding path\n"
16251 #: ../fish/guestfish-actions.pod:4814
16253 "This is like the L</strings> command, but allows you to specify the encoding "
16254 "of strings that are looked for in the source file C<path>."
16258 #: ../fish/guestfish-actions.pod:4818 ../src/guestfs-actions.pod:7423
16259 msgid "Allowed encodings are:"
16263 #: ../fish/guestfish-actions.pod:4822 ../src/guestfs-actions.pod:7427
16268 #: ../fish/guestfish-actions.pod:4824
16270 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16271 "ISO-8859-X (this is what L</strings> uses)."
16275 #: ../fish/guestfish-actions.pod:4827 ../src/guestfs-actions.pod:7432
16280 #: ../fish/guestfish-actions.pod:4829 ../src/guestfs-actions.pod:7434
16281 msgid "Single 8-bit-byte characters."
16285 #: ../fish/guestfish-actions.pod:4831 ../src/guestfs-actions.pod:7436
16290 #: ../fish/guestfish-actions.pod:4833 ../src/guestfs-actions.pod:7438
16291 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16295 #: ../fish/guestfish-actions.pod:4836 ../src/guestfs-actions.pod:7441
16296 msgid "l (lower case letter L)"
16300 #: ../fish/guestfish-actions.pod:4838 ../src/guestfs-actions.pod:7443
16302 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16303 "examining binaries in Windows guests."
16307 #: ../fish/guestfish-actions.pod:4841 ../src/guestfs-actions.pod:7446
16312 #: ../fish/guestfish-actions.pod:4843 ../src/guestfs-actions.pod:7448
16313 msgid "32-bit big endian such as UCS-4BE."
16317 #: ../fish/guestfish-actions.pod:4845 ../src/guestfs-actions.pod:7450
16322 #: ../fish/guestfish-actions.pod:4847 ../src/guestfs-actions.pod:7452
16323 msgid "32-bit little endian such as UCS-4LE."
16327 #: ../fish/guestfish-actions.pod:4851 ../src/guestfs-actions.pod:7456
16328 msgid "The returned strings are transcoded to UTF-8."
16332 #: ../fish/guestfish-actions.pod:4856
16333 msgid "swapoff-device"
16337 #: ../fish/guestfish-actions.pod:4858
16340 " swapoff-device device\n"
16345 #: ../fish/guestfish-actions.pod:4860
16347 "This command disables the libguestfs appliance swap device or partition "
16348 "named C<device>. See L</swapon-device>."
16352 #: ../fish/guestfish-actions.pod:4864
16353 msgid "swapoff-file"
16357 #: ../fish/guestfish-actions.pod:4866
16360 " swapoff-file file\n"
16365 #: ../fish/guestfish-actions.pod:4868 ../src/guestfs-actions.pod:7487
16366 msgid "This command disables the libguestfs appliance swap on file."
16370 #: ../fish/guestfish-actions.pod:4870
16371 msgid "swapoff-label"
16375 #: ../fish/guestfish-actions.pod:4872
16378 " swapoff-label label\n"
16383 #: ../fish/guestfish-actions.pod:4874 ../src/guestfs-actions.pod:7499
16385 "This command disables the libguestfs appliance swap on labeled swap "
16390 #: ../fish/guestfish-actions.pod:4877
16391 msgid "swapoff-uuid"
16395 #: ../fish/guestfish-actions.pod:4879
16398 " swapoff-uuid uuid\n"
16403 #: ../fish/guestfish-actions.pod:4881 ../src/guestfs-actions.pod:7512
16405 "This command disables the libguestfs appliance swap partition with the given "
16410 #: ../fish/guestfish-actions.pod:4884
16411 msgid "swapon-device"
16415 #: ../fish/guestfish-actions.pod:4886
16418 " swapon-device device\n"
16423 #: ../fish/guestfish-actions.pod:4888
16425 "This command enables the libguestfs appliance to use the swap device or "
16426 "partition named C<device>. The increased memory is made available for all "
16427 "commands, for example those run using L</command> or L</sh>."
16431 #: ../fish/guestfish-actions.pod:4893 ../src/guestfs-actions.pod:7530
16433 "Note that you should not swap to existing guest swap partitions unless you "
16434 "know what you are doing. They may contain hibernation information, or other "
16435 "information that the guest doesn't want you to trash. You also risk leaking "
16436 "information about the host to the guest this way. Instead, attach a new "
16437 "host device to the guest and swap on that."
16441 #: ../fish/guestfish-actions.pod:4900
16442 msgid "swapon-file"
16446 #: ../fish/guestfish-actions.pod:4902
16449 " swapon-file file\n"
16454 #: ../fish/guestfish-actions.pod:4904
16455 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
16459 #: ../fish/guestfish-actions.pod:4907
16460 msgid "swapon-label"
16464 #: ../fish/guestfish-actions.pod:4909
16467 " swapon-label label\n"
16472 #: ../fish/guestfish-actions.pod:4911
16474 "This command enables swap to a labeled swap partition. See "
16475 "L</swapon-device> for other notes."
16479 #: ../fish/guestfish-actions.pod:4914
16480 msgid "swapon-uuid"
16484 #: ../fish/guestfish-actions.pod:4916
16487 " swapon-uuid uuid\n"
16492 #: ../fish/guestfish-actions.pod:4918
16494 "This command enables swap to a swap partition with the given UUID. See "
16495 "L</swapon-device> for other notes."
16499 #: ../fish/guestfish-actions.pod:4921
16504 #: ../fish/guestfish-actions.pod:4923
16512 #: ../fish/guestfish-actions.pod:4925 ../src/guestfs-actions.pod:7585
16514 "This syncs the disk, so that any writes are flushed through to the "
16515 "underlying disk image."
16519 #: ../fish/guestfish-actions.pod:4928 ../src/guestfs-actions.pod:7588
16521 "You should always call this if you have modified a disk image, before "
16522 "closing the handle."
16526 #: ../fish/guestfish-actions.pod:4931
16531 #: ../fish/guestfish-actions.pod:4933
16539 #: ../fish/guestfish-actions.pod:4935 ../src/guestfs-actions.pod:7601
16540 msgid "This command returns up to the last 10 lines of a file as a list of strings."
16544 #: ../fish/guestfish-actions.pod:4941
16549 #: ../fish/guestfish-actions.pod:4943
16552 " tail-n nrlines path\n"
16557 #: ../fish/guestfish-actions.pod:4945 ../src/guestfs-actions.pod:7620
16559 "If the parameter C<nrlines> is a positive number, this returns the last "
16560 "C<nrlines> lines of the file C<path>."
16564 #: ../fish/guestfish-actions.pod:4948 ../src/guestfs-actions.pod:7623
16566 "If the parameter C<nrlines> is a negative number, this returns lines from "
16567 "the file C<path>, starting with the C<-nrlines>th line."
16571 #: ../fish/guestfish-actions.pod:4956
16576 #: ../fish/guestfish-actions.pod:4958
16579 " tar-in (tarfile|-) directory\n"
16584 #: ../fish/guestfish-actions.pod:4960 ../src/guestfs-actions.pod:7644
16586 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16587 "tar file) into C<directory>."
16591 #: ../fish/guestfish-actions.pod:4963
16592 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16596 #: ../fish/guestfish-actions.pod:4968
16601 #: ../fish/guestfish-actions.pod:4970
16604 " tar-out directory (tarfile|-)\n"
16609 #: ../fish/guestfish-actions.pod:4972 ../src/guestfs-actions.pod:7661
16611 "This command packs the contents of C<directory> and downloads it to local "
16616 #: ../fish/guestfish-actions.pod:4975
16617 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16621 #: ../fish/guestfish-actions.pod:4980
16626 #: ../fish/guestfish-actions.pod:4982
16629 " tgz-in (tarball|-) directory\n"
16634 #: ../fish/guestfish-actions.pod:4984 ../src/guestfs-actions.pod:7678
16636 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16637 "tar file) into C<directory>."
16641 #: ../fish/guestfish-actions.pod:4987
16642 msgid "To upload an uncompressed tarball, use L</tar-in>."
16646 #: ../fish/guestfish-actions.pod:4991
16651 #: ../fish/guestfish-actions.pod:4993
16654 " tgz-out directory (tarball|-)\n"
16659 #: ../fish/guestfish-actions.pod:4995 ../src/guestfs-actions.pod:7694
16661 "This command packs the contents of C<directory> and downloads it to local "
16666 #: ../fish/guestfish-actions.pod:4998
16667 msgid "To download an uncompressed tarball, use L</tar-out>."
16671 #: ../fish/guestfish-actions.pod:5002
16676 #: ../fish/guestfish-actions.pod:5004
16684 #: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7709
16686 "Touch acts like the L<touch(1)> command. It can be used to update the "
16687 "timestamps on a file, or, if the file does not exist, to create a new "
16688 "zero-length file."
16692 #: ../fish/guestfish-actions.pod:5010 ../src/guestfs-actions.pod:7713
16694 "This command only works on regular files, and will fail on other file types "
16695 "such as directories, symbolic links, block special etc."
16699 #: ../fish/guestfish-actions.pod:5013
16704 #: ../fish/guestfish-actions.pod:5015
16712 #: ../fish/guestfish-actions.pod:5017 ../src/guestfs-actions.pod:7726
16714 "This command truncates C<path> to a zero-length file. The file must exist "
16719 #: ../fish/guestfish-actions.pod:5020
16720 msgid "truncate-size"
16724 #: ../fish/guestfish-actions.pod:5022
16727 " truncate-size path size\n"
16732 #: ../fish/guestfish-actions.pod:5024 ../src/guestfs-actions.pod:7740
16734 "This command truncates C<path> to size C<size> bytes. The file must exist "
16739 #: ../fish/guestfish-actions.pod:5027
16741 "If the current file size is less than C<size> then the file is extended to "
16742 "the required size with zero bytes. This creates a sparse file (ie. disk "
16743 "blocks are not allocated for the file until you write to it). To create a "
16744 "non-sparse file of zeroes, use L</fallocate64> instead."
16748 #: ../fish/guestfish-actions.pod:5033
16753 #: ../fish/guestfish-actions.pod:5035
16756 " tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] "
16757 "[errorbehavior:..] [group:N] [intervalbetweenchecks:N] "
16758 "[reservedblockspercentage:N] [lastmounteddirectory:..] "
16759 "[reservedblockscount:N] [user:N]\n"
16764 #: ../fish/guestfish-actions.pod:5037 ../src/guestfs-actions.pod:7776
16766 "This call allows you to adjust various filesystem parameters of an "
16767 "ext2/ext3/ext4 filesystem called C<device>."
16771 #: ../fish/guestfish-actions.pod:5046 ../src/guestfs-actions.pod:7785
16773 "Force tune2fs to complete the operation even in the face of errors. This is "
16774 "the same as the tune2fs C<-f> option."
16778 #: ../fish/guestfish-actions.pod:5049 ../src/guestfs-actions.pod:7788
16779 msgid "C<maxmountcount>"
16783 #: ../fish/guestfish-actions.pod:5051 ../src/guestfs-actions.pod:7790
16785 "Set the number of mounts after which the filesystem is checked by "
16786 "L<e2fsck(8)>. If this is C<0> then the number of mounts is disregarded. "
16787 "This is the same as the tune2fs C<-c> option."
16791 #: ../fish/guestfish-actions.pod:5055 ../src/guestfs-actions.pod:7794
16792 msgid "C<mountcount>"
16796 #: ../fish/guestfish-actions.pod:5057 ../src/guestfs-actions.pod:7796
16798 "Set the number of times the filesystem has been mounted. This is the same "
16799 "as the tune2fs C<-C> option."
16803 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7799
16804 msgid "C<errorbehavior>"
16808 #: ../fish/guestfish-actions.pod:5062 ../src/guestfs-actions.pod:7801
16810 "Change the behavior of the kernel code when errors are detected. Possible "
16811 "values currently are: C<continue>, C<remount-ro>, C<panic>. In practice "
16812 "these options don't really make any difference, particularly for write "
16817 #: ../fish/guestfish-actions.pod:5067 ../src/guestfs-actions.pod:7806
16818 msgid "This is the same as the tune2fs C<-e> option."
16822 #: ../fish/guestfish-actions.pod:5069 ../src/guestfs-actions.pod:7808
16827 #: ../fish/guestfish-actions.pod:5071 ../src/guestfs-actions.pod:7810
16829 "Set the group which can use reserved filesystem blocks. This is the same as "
16830 "the tune2fs C<-g> option except that it can only be specified as a number."
16834 #: ../fish/guestfish-actions.pod:5075 ../src/guestfs-actions.pod:7814
16835 msgid "C<intervalbetweenchecks>"
16839 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7816
16841 "Adjust the maximal time between two filesystem checks (in seconds). If the "
16842 "option is passed as C<0> then time-dependent checking is disabled."
16846 #: ../fish/guestfish-actions.pod:5081 ../src/guestfs-actions.pod:7820
16847 msgid "This is the same as the tune2fs C<-i> option."
16851 #: ../fish/guestfish-actions.pod:5083 ../src/guestfs-actions.pod:7822
16852 msgid "C<reservedblockspercentage>"
16856 #: ../fish/guestfish-actions.pod:5085 ../src/guestfs-actions.pod:7824
16858 "Set the percentage of the filesystem which may only be allocated by "
16859 "privileged processes. This is the same as the tune2fs C<-m> option."
16863 #: ../fish/guestfish-actions.pod:5089 ../src/guestfs-actions.pod:7828
16864 msgid "C<lastmounteddirectory>"
16868 #: ../fish/guestfish-actions.pod:5091 ../src/guestfs-actions.pod:7830
16870 "Set the last mounted directory. This is the same as the tune2fs C<-M> "
16875 #: ../fish/guestfish-actions.pod:5094 ../src/guestfs-actions.pod:7833
16877 "C<reservedblockscount> Set the number of reserved filesystem blocks. This "
16878 "is the same as the tune2fs C<-r> option."
16882 #: ../fish/guestfish-actions.pod:5098 ../src/guestfs-actions.pod:7837
16887 #: ../fish/guestfish-actions.pod:5100 ../src/guestfs-actions.pod:7839
16889 "Set the user who can use the reserved filesystem blocks. This is the same "
16890 "as the tune2fs C<-u> option except that it can only be specified as a "
16895 #: ../fish/guestfish-actions.pod:5106
16897 "To get the current values of filesystem parameters, see L</tune2fs-l>. For "
16898 "precise details of how tune2fs works, see the L<tune2fs(8)> man page."
16902 #: ../fish/guestfish-actions.pod:5112
16907 #: ../fish/guestfish-actions.pod:5114
16910 " tune2fs-l device\n"
16915 #: ../fish/guestfish-actions.pod:5116 ../src/guestfs-actions.pod:7881
16917 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16922 #: ../fish/guestfish-actions.pod:5119 ../src/guestfs-actions.pod:7884
16924 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16925 "for more details. The list of fields returned isn't clearly defined, and "
16926 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16927 "and the filesystem itself."
16931 #: ../fish/guestfish-actions.pod:5124
16936 #: ../fish/guestfish-actions.pod:5126
16939 " txz-in (tarball|-) directory\n"
16944 #: ../fish/guestfish-actions.pod:5128 ../src/guestfs-actions.pod:7904
16946 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16947 "tar file) into C<directory>."
16951 #: ../fish/guestfish-actions.pod:5133
16956 #: ../fish/guestfish-actions.pod:5135
16959 " txz-out directory (tarball|-)\n"
16964 #: ../fish/guestfish-actions.pod:5137 ../src/guestfs-actions.pod:7918
16966 "This command packs the contents of C<directory> and downloads it to local "
16967 "file C<tarball> (as an xz compressed tar archive)."
16971 #: ../fish/guestfish-actions.pod:5142
16976 #: ../fish/guestfish-actions.pod:5144
16984 #: ../fish/guestfish-actions.pod:5146 ../src/guestfs-actions.pod:7931
16986 "This function sets the mask used for creating new files and device nodes to "
16991 #: ../fish/guestfish-actions.pod:5149 ../src/guestfs-actions.pod:7934
16993 "Typical umask values would be C<022> which creates new files with "
16994 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16995 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16999 #: ../fish/guestfish-actions.pod:5154 ../src/guestfs-actions.pod:7939
17001 "The default umask is C<022>. This is important because it means that "
17002 "directories and device nodes will be created with C<0644> or C<0755> mode "
17003 "even if you specify C<0777>."
17007 #: ../fish/guestfish-actions.pod:5158
17008 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
17012 #: ../fish/guestfish-actions.pod:5161 ../src/guestfs-actions.pod:7946
17013 msgid "This call returns the previous umask."
17017 #: ../fish/guestfish-actions.pod:5163
17022 #: ../fish/guestfish-actions.pod:5165
17027 #: ../fish/guestfish-actions.pod:5167
17030 " umount pathordevice\n"
17035 #: ../fish/guestfish-actions.pod:5169 ../src/guestfs-actions.pod:7958
17037 "This unmounts the given filesystem. The filesystem may be specified either "
17038 "by its mountpoint (path) or the device which contains the filesystem."
17042 #: ../fish/guestfish-actions.pod:5173
17047 #: ../fish/guestfish-actions.pod:5175
17048 msgid "unmount-all"
17052 #: ../fish/guestfish-actions.pod:5177
17060 #: ../fish/guestfish-actions.pod:5179 ../src/guestfs-actions.pod:7971
17061 msgid "This unmounts all mounted filesystems."
17065 #: ../fish/guestfish-actions.pod:5181 ../src/guestfs-actions.pod:7973
17066 msgid "Some internal mounts are not unmounted by this call."
17070 #: ../fish/guestfish-actions.pod:5183
17075 #: ../fish/guestfish-actions.pod:5185
17078 " upload (filename|-) remotefilename\n"
17083 #: ../fish/guestfish-actions.pod:5187 ../fish/guestfish-actions.pod:5200 ../src/guestfs-actions.pod:7986 ../src/guestfs-actions.pod:8010
17084 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
17088 #: ../fish/guestfish-actions.pod:5192
17089 msgid "See also L</download>."
17093 #: ../fish/guestfish-actions.pod:5196
17094 msgid "upload-offset"
17098 #: ../fish/guestfish-actions.pod:5198
17101 " upload-offset (filename|-) remotefilename offset\n"
17106 #: ../fish/guestfish-actions.pod:5203 ../src/guestfs-actions.pod:8013
17108 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
17109 "The intention is to overwrite parts of existing files or devices, although "
17110 "if a non-existant file is specified then it is created with a \"hole\" "
17111 "before C<offset>. The size of the data written is implicit in the size of "
17112 "the source C<filename>."
17116 #: ../fish/guestfish-actions.pod:5210
17118 "Note that there is no limit on the amount of data that can be uploaded with "
17119 "this call, unlike with L</pwrite>, and this call always writes the full "
17120 "amount unless an error occurs."
17124 #: ../fish/guestfish-actions.pod:5215
17125 msgid "See also L</upload>, L</pwrite>."
17129 #: ../fish/guestfish-actions.pod:5219
17134 #: ../fish/guestfish-actions.pod:5221
17137 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
17142 #: ../fish/guestfish-actions.pod:5223 ../src/guestfs-actions.pod:8046
17143 msgid "This command sets the timestamps of a file with nanosecond precision."
17147 #: ../fish/guestfish-actions.pod:5226 ../src/guestfs-actions.pod:8049
17149 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
17154 #: ../fish/guestfish-actions.pod:5229 ../src/guestfs-actions.pod:8052
17156 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
17157 "nanoseconds from the epoch."
17161 #: ../fish/guestfish-actions.pod:5232 ../src/guestfs-actions.pod:8055
17163 "If the C<*nsecs> field contains the special value C<-1> then the "
17164 "corresponding timestamp is set to the current time. (The C<*secs> field is "
17165 "ignored in this case)."
17169 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:8059
17171 "If the C<*nsecs> field contains the special value C<-2> then the "
17172 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
17177 #: ../fish/guestfish-actions.pod:5240
17182 #: ../fish/guestfish-actions.pod:5242
17190 #: ../fish/guestfish-actions.pod:5244 ../src/guestfs-actions.pod:8072
17191 msgid "Return the libguestfs version number that the program is linked against."
17195 #: ../fish/guestfish-actions.pod:5247 ../src/guestfs-actions.pod:8075
17197 "Note that because of dynamic linking this is not necessarily the version of "
17198 "libguestfs that you compiled against. You can compile the program, and then "
17199 "at runtime dynamically link against a completely different C<libguestfs.so> "
17204 #: ../fish/guestfish-actions.pod:5252 ../src/guestfs-actions.pod:8080
17206 "This call was added in version C<1.0.58>. In previous versions of "
17207 "libguestfs there was no way to get the version number. From C code you can "
17208 "use dynamic linker functions to find out if this symbol exists (if it "
17209 "doesn't, then it's an earlier version)."
17213 #: ../fish/guestfish-actions.pod:5258 ../src/guestfs-actions.pod:8086
17215 "The call returns a structure with four elements. The first three (C<major>, "
17216 "C<minor> and C<release>) are numbers and correspond to the usual version "
17217 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
17218 "but may be used for distro-specific information."
17222 #: ../fish/guestfish-actions.pod:5264 ../src/guestfs-actions.pod:8092
17223 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
17227 #: ../fish/guestfish-actions.pod:5267 ../src/guestfs-actions.pod:8095
17228 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
17232 #: ../fish/guestfish-actions.pod:5269
17234 "I<Note:> Don't use this call to test for availability of features. In "
17235 "enterprise distributions we backport features from later versions into "
17236 "earlier versions, making this an unreliable way to test for features. Use "
17237 "L</available> instead."
17241 #: ../fish/guestfish-actions.pod:5275
17246 #: ../fish/guestfish-actions.pod:5277
17249 " vfs-label device\n"
17254 #: ../fish/guestfish-actions.pod:5279 ../src/guestfs-actions.pod:8115
17255 msgid "This returns the filesystem label of the filesystem on C<device>."
17259 #: ../fish/guestfish-actions.pod:5282 ../src/guestfs-actions.pod:8118
17260 msgid "If the filesystem is unlabeled, this returns the empty string."
17264 #: ../fish/guestfish-actions.pod:5284
17265 msgid "To find a filesystem from the label, use L</findfs-label>."
17269 #: ../fish/guestfish-actions.pod:5286
17274 #: ../fish/guestfish-actions.pod:5288
17277 " vfs-type device\n"
17282 #: ../fish/guestfish-actions.pod:5290 ../src/guestfs-actions.pod:8133
17284 "This command gets the filesystem type corresponding to the filesystem on "
17289 #: ../fish/guestfish-actions.pod:5293 ../src/guestfs-actions.pod:8136
17291 "For most filesystems, the result is the name of the Linux VFS module which "
17292 "would be used to mount this filesystem if you mounted it without specifying "
17293 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
17297 #: ../fish/guestfish-actions.pod:5298
17302 #: ../fish/guestfish-actions.pod:5300
17305 " vfs-uuid device\n"
17310 #: ../fish/guestfish-actions.pod:5302 ../src/guestfs-actions.pod:8152
17311 msgid "This returns the filesystem UUID of the filesystem on C<device>."
17315 #: ../fish/guestfish-actions.pod:5305 ../src/guestfs-actions.pod:8155
17316 msgid "If the filesystem does not have a UUID, this returns the empty string."
17320 #: ../fish/guestfish-actions.pod:5307
17321 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
17325 #: ../fish/guestfish-actions.pod:5309
17326 msgid "vg-activate"
17330 #: ../fish/guestfish-actions.pod:5311
17333 " vg-activate true|false 'volgroups ...'\n"
17338 #: ../fish/guestfish-actions.pod:5313 ../src/guestfs-actions.pod:8171
17340 "This command activates or (if C<activate> is false) deactivates all logical "
17341 "volumes in the listed volume groups C<volgroups>."
17345 #: ../fish/guestfish-actions.pod:5316 ../src/guestfs-actions.pod:8174
17346 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
17350 #: ../fish/guestfish-actions.pod:5318 ../src/guestfs-actions.pod:8176
17352 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
17353 "activated or deactivated."
17357 #: ../fish/guestfish-actions.pod:5321
17358 msgid "vg-activate-all"
17362 #: ../fish/guestfish-actions.pod:5323
17365 " vg-activate-all true|false\n"
17370 #: ../fish/guestfish-actions.pod:5325 ../src/guestfs-actions.pod:8189
17372 "This command activates or (if C<activate> is false) deactivates all logical "
17373 "volumes in all volume groups."
17377 #: ../fish/guestfish-actions.pod:5328 ../src/guestfs-actions.pod:8192
17378 msgid "This command is the same as running C<vgchange -a y|n>"
17382 #: ../fish/guestfish-actions.pod:5330
17387 #: ../fish/guestfish-actions.pod:5332
17390 " vgcreate volgroup 'physvols ...'\n"
17395 #: ../fish/guestfish-actions.pod:5334 ../src/guestfs-actions.pod:8205
17397 "This creates an LVM volume group called C<volgroup> from the non-empty list "
17398 "of physical volumes C<physvols>."
17402 #: ../fish/guestfish-actions.pod:5337
17407 #: ../fish/guestfish-actions.pod:5339
17410 " vglvuuids vgname\n"
17415 #: ../fish/guestfish-actions.pod:5341 ../src/guestfs-actions.pod:8218
17417 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
17418 "volumes created in this volume group."
17422 #: ../fish/guestfish-actions.pod:5344
17424 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
17425 "logical volumes and volume groups."
17429 #: ../fish/guestfish-actions.pod:5347
17430 msgid "See also L</vgpvuuids>."
17434 #: ../fish/guestfish-actions.pod:5349
17439 #: ../fish/guestfish-actions.pod:5351
17442 " vgpvuuids vgname\n"
17447 #: ../fish/guestfish-actions.pod:5353 ../src/guestfs-actions.pod:8238
17449 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
17450 "volumes that this volume group resides on."
17454 #: ../fish/guestfish-actions.pod:5356
17456 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
17457 "physical volumes and volume groups."
17461 #: ../fish/guestfish-actions.pod:5359
17462 msgid "See also L</vglvuuids>."
17466 #: ../fish/guestfish-actions.pod:5361
17471 #: ../fish/guestfish-actions.pod:5363
17474 " vgremove vgname\n"
17479 #: ../fish/guestfish-actions.pod:5365 ../src/guestfs-actions.pod:8258
17480 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
17484 #: ../fish/guestfish-actions.pod:5367 ../src/guestfs-actions.pod:8260
17485 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
17489 #: ../fish/guestfish-actions.pod:5370
17494 #: ../fish/guestfish-actions.pod:5372
17497 " vgrename volgroup newvolgroup\n"
17502 #: ../fish/guestfish-actions.pod:5374 ../src/guestfs-actions.pod:8274
17503 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
17507 #: ../fish/guestfish-actions.pod:5376
17512 #: ../fish/guestfish-actions.pod:5378
17520 #: ../fish/guestfish-actions.pod:5380 ../src/guestfs-actions.pod:8285
17522 "List all the volumes groups detected. This is the equivalent of the "
17523 "L<vgs(8)> command."
17527 #: ../fish/guestfish-actions.pod:5383 ../src/guestfs-actions.pod:8288
17529 "This returns a list of just the volume group names that were detected "
17530 "(eg. C<VolGroup00>)."
17534 #: ../fish/guestfish-actions.pod:5386
17535 msgid "See also L</vgs-full>."
17539 #: ../fish/guestfish-actions.pod:5388
17544 #: ../fish/guestfish-actions.pod:5390
17552 #: ../fish/guestfish-actions.pod:5392 ../src/guestfs-actions.pod:8304
17554 "List all the volumes groups detected. This is the equivalent of the "
17555 "L<vgs(8)> command. The \"full\" version includes all fields."
17559 #: ../fish/guestfish-actions.pod:5395
17564 #: ../fish/guestfish-actions.pod:5397
17572 #: ../fish/guestfish-actions.pod:5399 ../src/guestfs-actions.pod:8318
17574 "This rescans all block devices and rebuilds the list of LVM physical "
17575 "volumes, volume groups and logical volumes."
17579 #: ../fish/guestfish-actions.pod:5402
17584 #: ../fish/guestfish-actions.pod:5404
17592 #: ../fish/guestfish-actions.pod:5406 ../src/guestfs-actions.pod:8331
17593 msgid "This command returns the UUID of the LVM VG named C<vgname>."
17597 #: ../fish/guestfish-actions.pod:5408
17602 #: ../fish/guestfish-actions.pod:5410
17610 #: ../fish/guestfish-actions.pod:5412 ../src/guestfs-actions.pod:8371
17612 "This command counts the characters in a file, using the C<wc -c> external "
17617 #: ../fish/guestfish-actions.pod:5415
17622 #: ../fish/guestfish-actions.pod:5417
17630 #: ../fish/guestfish-actions.pod:5419 ../src/guestfs-actions.pod:8384
17632 "This command counts the lines in a file, using the C<wc -l> external "
17637 #: ../fish/guestfish-actions.pod:5422
17642 #: ../fish/guestfish-actions.pod:5424
17650 #: ../fish/guestfish-actions.pod:5426 ../src/guestfs-actions.pod:8397
17652 "This command counts the words in a file, using the C<wc -w> external "
17657 #: ../fish/guestfish-actions.pod:5429
17662 #: ../fish/guestfish-actions.pod:5431
17665 " write path content\n"
17670 #: ../fish/guestfish-actions.pod:5433 ../src/guestfs-actions.pod:8412
17672 "This call creates a file called C<path>. The content of the file is the "
17673 "string C<content> (which can contain any 8 bit data)."
17677 #: ../fish/guestfish-actions.pod:5436
17678 msgid "See also L</write-append>."
17682 #: ../fish/guestfish-actions.pod:5441
17683 msgid "write-append"
17687 #: ../fish/guestfish-actions.pod:5443
17690 " write-append path content\n"
17695 #: ../fish/guestfish-actions.pod:5445 ../src/guestfs-actions.pod:8432
17697 "This call appends C<content> to the end of file C<path>. If C<path> does "
17698 "not exist, then a new file is created."
17702 #: ../fish/guestfish-actions.pod:5448
17703 msgid "See also L</write>."
17707 #: ../fish/guestfish-actions.pod:5453
17712 #: ../fish/guestfish-actions.pod:5455
17715 " write-file path content size\n"
17720 #: ../fish/guestfish-actions.pod:5457 ../src/guestfs-actions.pod:8459
17722 "This call creates a file called C<path>. The contents of the file is the "
17723 "string C<content> (which can contain any 8 bit data), with length C<size>."
17727 #: ../fish/guestfish-actions.pod:5461 ../src/guestfs-actions.pod:8463
17729 "As a special case, if C<size> is C<0> then the length is calculated using "
17730 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17734 #: ../fish/guestfish-actions.pod:5465 ../src/guestfs-actions.pod:8467
17736 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17737 "I<not> work, even if the length is specified."
17741 #: ../fish/guestfish-actions.pod:5471
17742 msgid "I<This function is deprecated.> In new code, use the L</write> call instead."
17746 #: ../fish/guestfish-actions.pod:5478
17751 #: ../fish/guestfish-actions.pod:5480
17754 " zegrep regex path\n"
17759 #: ../fish/guestfish-actions.pod:5482 ../src/guestfs-actions.pod:8484
17760 msgid "This calls the external C<zegrep> program and returns the matching lines."
17764 #: ../fish/guestfish-actions.pod:5488
17769 #: ../fish/guestfish-actions.pod:5490
17772 " zegrepi regex path\n"
17777 #: ../fish/guestfish-actions.pod:5492 ../src/guestfs-actions.pod:8503
17778 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
17782 #: ../fish/guestfish-actions.pod:5498
17787 #: ../fish/guestfish-actions.pod:5500
17795 #: ../fish/guestfish-actions.pod:5502 ../src/guestfs-actions.pod:8521
17796 msgid "This command writes zeroes over the first few blocks of C<device>."
17800 #: ../fish/guestfish-actions.pod:5504 ../src/guestfs-actions.pod:8523
17802 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17803 "securely wipe the device). It should be sufficient to remove any partition "
17804 "tables, filesystem superblocks and so on."
17808 #: ../fish/guestfish-actions.pod:5508 ../fish/guestfish-actions.pod:5523 ../src/guestfs-actions.pod:8527 ../src/guestfs-actions.pod:8553
17810 "If blocks are already zero, then this command avoids writing zeroes. This "
17811 "prevents the underlying device from becoming non-sparse or growing "
17816 #: ../fish/guestfish-actions.pod:5512
17817 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17821 #: ../fish/guestfish-actions.pod:5515
17822 msgid "zero-device"
17826 #: ../fish/guestfish-actions.pod:5517
17829 " zero-device device\n"
17834 #: ../fish/guestfish-actions.pod:5519
17836 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17837 "which just zeroes the first few blocks of a device."
17841 #: ../fish/guestfish-actions.pod:5527
17846 #: ../fish/guestfish-actions.pod:5529
17849 " zerofree device\n"
17854 #: ../fish/guestfish-actions.pod:5531 ../src/guestfs-actions.pod:8572
17856 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17857 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17858 "possible to compress the filesystem more effectively."
17862 #: ../fish/guestfish-actions.pod:5536 ../src/guestfs-actions.pod:8577
17863 msgid "You should B<not> run this program if the filesystem is mounted."
17867 #: ../fish/guestfish-actions.pod:5539 ../src/guestfs-actions.pod:8580
17869 "It is possible that using this program can damage the filesystem or data on "
17874 #: ../fish/guestfish-actions.pod:5542
17879 #: ../fish/guestfish-actions.pod:5544
17882 " zfgrep pattern path\n"
17887 #: ../fish/guestfish-actions.pod:5546 ../src/guestfs-actions.pod:8594
17888 msgid "This calls the external C<zfgrep> program and returns the matching lines."
17892 #: ../fish/guestfish-actions.pod:5552
17897 #: ../fish/guestfish-actions.pod:5554
17900 " zfgrepi pattern path\n"
17905 #: ../fish/guestfish-actions.pod:5556 ../src/guestfs-actions.pod:8613
17906 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
17910 #: ../fish/guestfish-actions.pod:5562
17915 #: ../fish/guestfish-actions.pod:5564
17918 " zfile meth path\n"
17923 #: ../fish/guestfish-actions.pod:5566 ../src/guestfs-actions.pod:8639
17924 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
17928 #: ../fish/guestfish-actions.pod:5569 ../src/guestfs-actions.pod:8642
17929 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17933 #: ../fish/guestfish-actions.pod:5571
17934 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
17938 #: ../fish/guestfish-actions.pod:5574
17939 msgid "I<This function is deprecated.> In new code, use the L</file> call instead."
17943 #: ../fish/guestfish-actions.pod:5581
17948 #: ../fish/guestfish-actions.pod:5583
17951 " zgrep regex path\n"
17956 #: ../fish/guestfish-actions.pod:5585 ../src/guestfs-actions.pod:8659
17957 msgid "This calls the external C<zgrep> program and returns the matching lines."
17961 #: ../fish/guestfish-actions.pod:5591
17966 #: ../fish/guestfish-actions.pod:5593
17969 " zgrepi regex path\n"
17974 #: ../fish/guestfish-actions.pod:5595 ../src/guestfs-actions.pod:8678
17975 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
17979 #: ../fish/guestfish-commands.pod:1
17984 #: ../fish/guestfish-commands.pod:3
17989 #: ../fish/guestfish-commands.pod:5
17992 " alloc filename size\n"
17997 #: ../fish/guestfish-commands.pod:7
17999 "This creates an empty (zeroed) file of the given size, and then adds so it "
18000 "can be further examined."
18004 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
18005 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
18009 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
18010 msgid "Size can be specified using standard suffixes, eg. C<1M>."
18014 #: ../fish/guestfish-commands.pod:14
18016 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
18017 "image, see L</PREPARED DISK IMAGES>."
18021 #: ../fish/guestfish-commands.pod:17
18026 #: ../fish/guestfish-commands.pod:19
18029 " copy-in local [local ...] /remotedir\n"
18034 #: ../fish/guestfish-commands.pod:21
18036 "C<copy-in> copies local files or directories recursively into the disk "
18037 "image, placing them in the directory called C</remotedir> (which must "
18038 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
18039 "other commands as necessary."
18043 #: ../fish/guestfish-commands.pod:26
18045 "Multiple local files and directories can be specified, but the last "
18046 "parameter must always be a remote directory. Wildcards cannot be used."
18050 #: ../fish/guestfish-commands.pod:30
18055 #: ../fish/guestfish-commands.pod:32
18058 " copy-out remote [remote ...] localdir\n"
18063 #: ../fish/guestfish-commands.pod:34
18065 "C<copy-out> copies remote files or directories recursively out of the disk "
18066 "image, placing them on the host disk in a local directory called C<localdir> "
18067 "(which must exist). This guestfish meta-command turns into a sequence of "
18068 "L</download>, L</tar-out> and other commands as necessary."
18072 #: ../fish/guestfish-commands.pod:40
18074 "Multiple remote files and directories can be specified, but the last "
18075 "parameter must always be a local directory. To download to the current "
18076 "directory, use C<.> as in:"
18080 #: ../fish/guestfish-commands.pod:44
18083 " copy-out /home .\n"
18088 #: ../fish/guestfish-commands.pod:46
18090 "Wildcards cannot be used in the ordinary command, but you can use them with "
18091 "the help of L</glob> like this:"
18095 #: ../fish/guestfish-commands.pod:49
18098 " glob copy-out /home/* .\n"
18103 #: ../fish/guestfish-commands.pod:51
18108 #: ../fish/guestfish-commands.pod:53
18111 " display filename\n"
18116 #: ../fish/guestfish-commands.pod:55
18118 "Use C<display> (a graphical display program) to display an image file. It "
18119 "downloads the file, and runs C<display> on it."
18123 #: ../fish/guestfish-commands.pod:58
18125 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
18126 "environment variable. For example to use the GNOME display program:"
18130 #: ../fish/guestfish-commands.pod:61
18133 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
18138 #: ../fish/guestfish-commands.pod:63
18139 msgid "See also L<display(1)>."
18143 #: ../fish/guestfish-commands.pod:65
18148 #: ../fish/guestfish-commands.pod:67
18151 " echo [params ...]\n"
18156 #: ../fish/guestfish-commands.pod:69
18157 msgid "This echos the parameters to the terminal."
18161 #: ../fish/guestfish-commands.pod:71
18166 #: ../fish/guestfish-commands.pod:73
18171 #: ../fish/guestfish-commands.pod:75
18176 #: ../fish/guestfish-commands.pod:77
18184 #: ../fish/guestfish-commands.pod:79
18186 "This is used to edit a file. It downloads the file, edits it locally using "
18187 "your editor, then uploads the result."
18191 #: ../fish/guestfish-commands.pod:82
18193 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
18194 "or C<emacs> you will get those corresponding editors."
18198 #: ../fish/guestfish-commands.pod:86
18203 #: ../fish/guestfish-commands.pod:88
18206 " glob command args...\n"
18211 #: ../fish/guestfish-commands.pod:90
18213 "Expand wildcards in any paths in the args list, and run C<command> "
18214 "repeatedly on each matching path."
18218 #: ../fish/guestfish-commands.pod:93
18219 msgid "See L</WILDCARDS AND GLOBBING>."
18223 #: ../fish/guestfish-commands.pod:95
18228 #: ../fish/guestfish-commands.pod:97
18231 " hexedit <filename|device>\n"
18232 " hexedit <filename|device> <max>\n"
18233 " hexedit <filename|device> <start> <max>\n"
18238 #: ../fish/guestfish-commands.pod:101
18240 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
18245 #: ../fish/guestfish-commands.pod:104
18247 "This command works by downloading potentially the whole file or device, "
18248 "editing it locally, then uploading it. If the file or device is large, you "
18249 "have to specify which part you wish to edit by using C<max> and/or C<start> "
18250 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
18251 "usual modifiers allowed such as C<1M> (1 megabyte)."
18255 #: ../fish/guestfish-commands.pod:111
18256 msgid "For example to edit the first few sectors of a disk you might do:"
18260 #: ../fish/guestfish-commands.pod:114
18263 " hexedit /dev/sda 1M\n"
18268 #: ../fish/guestfish-commands.pod:116
18270 "which would allow you to edit anywhere within the first megabyte of the "
18275 #: ../fish/guestfish-commands.pod:119
18276 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
18280 #: ../fish/guestfish-commands.pod:121
18283 " hexedit /dev/sda1 0x400 0x400\n"
18288 #: ../fish/guestfish-commands.pod:123
18289 msgid "(assuming the superblock is in the standard location)."
18293 #: ../fish/guestfish-commands.pod:125
18295 "This command requires the external L<hexedit(1)> program. You can specify "
18296 "another program to use by setting the C<HEXEDITOR> environment variable."
18300 #: ../fish/guestfish-commands.pod:129
18301 msgid "See also L</hexdump>."
18305 #: ../fish/guestfish-commands.pod:131
18310 #: ../fish/guestfish-commands.pod:133
18318 #: ../fish/guestfish-commands.pod:135
18319 msgid "Change the local directory, ie. the current directory of guestfish itself."
18323 #: ../fish/guestfish-commands.pod:138
18324 msgid "Note that C<!cd> won't do what you might expect."
18328 #: ../fish/guestfish-commands.pod:140
18333 #: ../fish/guestfish-commands.pod:142
18338 #: ../fish/guestfish-commands.pod:144
18346 #: ../fish/guestfish-commands.pod:146
18347 msgid "Opens the manual page for guestfish."
18351 #: ../fish/guestfish-commands.pod:148
18356 #: ../fish/guestfish-commands.pod:150
18361 #: ../fish/guestfish-commands.pod:152
18369 #: ../fish/guestfish-commands.pod:154
18377 #: ../fish/guestfish-commands.pod:156
18378 msgid "This is used to view a file."
18382 #: ../fish/guestfish-commands.pod:158
18384 "The default viewer is C<$PAGER>. However if you use the alternate command "
18385 "C<less> you will get the C<less> command specifically."
18389 #: ../fish/guestfish-commands.pod:161
18394 #: ../fish/guestfish-commands.pod:163
18402 #: ../fish/guestfish-commands.pod:165
18404 "Close and reopen the libguestfs handle. It is not necessary to use this "
18405 "normally, because the handle is closed properly when guestfish exits. "
18406 "However this is occasionally useful for testing."
18410 #: ../fish/guestfish-commands.pod:169
18415 #: ../fish/guestfish-commands.pod:171
18418 " setenv VAR value\n"
18423 #: ../fish/guestfish-commands.pod:173
18424 msgid "Set the environment variable C<VAR> to the string C<value>."
18428 #: ../fish/guestfish-commands.pod:175
18429 msgid "To print the value of an environment variable use a shell command such as:"
18433 #: ../fish/guestfish-commands.pod:178
18441 #: ../fish/guestfish-commands.pod:180
18446 #: ../fish/guestfish-commands.pod:182
18449 " sparse filename size\n"
18454 #: ../fish/guestfish-commands.pod:184
18456 "This creates an empty sparse file of the given size, and then adds so it can "
18457 "be further examined."
18461 #: ../fish/guestfish-commands.pod:187
18463 "In all respects it works the same as the L</alloc> command, except that the "
18464 "image file is allocated sparsely, which means that disk blocks are not "
18465 "assigned to the file until they are needed. Sparse disk files only use "
18466 "space when written to, but they are slower and there is a danger you could "
18467 "run out of real disk space during a write operation."
18471 #: ../fish/guestfish-commands.pod:197
18476 #: ../fish/guestfish-commands.pod:199
18484 #: ../fish/guestfish-commands.pod:201
18486 "This command returns a list of the optional groups known to the daemon, and "
18487 "indicates which ones are supported by this build of the libguestfs "
18492 #: ../fish/guestfish-commands.pod:205
18493 msgid "See also L<guestfs(3)/AVAILABILITY>."
18497 #: ../fish/guestfish-commands.pod:207
18502 #: ../fish/guestfish-commands.pod:209
18505 " time command args...\n"
18510 #: ../fish/guestfish-commands.pod:211
18512 "Run the command as usual, but print the elapsed time afterwards. This can "
18513 "be useful for benchmarking operations."
18517 #: ../fish/guestfish-commands.pod:214
18522 #: ../fish/guestfish-commands.pod:216
18530 #: ../fish/guestfish-commands.pod:218
18531 msgid "Remove C<VAR> from the environment."
18535 #: ../fish/guestfish.pod:5
18536 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
18540 #: ../fish/guestfish.pod:9
18543 " guestfish [--options] [commands]\n"
18548 #: ../fish/guestfish.pod:11
18556 #: ../fish/guestfish.pod:13
18559 " guestfish [--ro|--rw] -a disk.img\n"
18564 #: ../fish/guestfish.pod:15
18567 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
18572 #: ../fish/guestfish.pod:17
18575 " guestfish -d libvirt-domain\n"
18580 #: ../fish/guestfish.pod:19
18583 " guestfish [--ro|--rw] -a disk.img -i\n"
18588 #: ../fish/guestfish.pod:21
18591 " guestfish -d libvirt-domain -i\n"
18596 #: ../fish/guestfish.pod:25
18598 "Using guestfish in read/write mode on live virtual machines can be "
18599 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
18600 "option to use guestfish safely if the disk image or virtual machine might be "
18605 #: ../fish/guestfish.pod:32
18607 "Guestfish is a shell and command-line tool for examining and modifying "
18608 "virtual machine filesystems. It uses libguestfs and exposes all of the "
18609 "functionality of the guestfs API, see L<guestfs(3)>."
18613 #: ../fish/guestfish.pod:36
18615 "Guestfish gives you structured access to the libguestfs API, from shell "
18616 "scripts or the command line or interactively. If you want to rescue a "
18617 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
18622 #: ../fish/guestfish.pod:43
18623 msgid "As an interactive shell"
18627 #: ../fish/guestfish.pod:45
18635 #: ../fish/guestfish.pod:47
18638 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
18639 " editing virtual machine filesystems.\n"
18644 #: ../fish/guestfish.pod:50
18647 " Type: 'help' for a list of commands\n"
18648 " 'man' to read the manual\n"
18649 " 'quit' to quit the shell\n"
18654 #: ../fish/guestfish.pod:54
18657 " ><fs> add-ro disk.img\n"
18659 " ><fs> list-filesystems\n"
18660 " /dev/sda1: ext4\n"
18661 " /dev/vg_guest/lv_root: ext4\n"
18662 " /dev/vg_guest/lv_swap: swap\n"
18663 " ><fs> mount /dev/vg_guest/lv_root /\n"
18664 " ><fs> cat /etc/fstab\n"
18666 " # Created by anaconda\n"
18673 #: ../fish/guestfish.pod:67
18674 msgid "From shell scripts"
18678 #: ../fish/guestfish.pod:69
18679 msgid "Create a new C</etc/motd> file in a guest or disk image:"
18683 #: ../fish/guestfish.pod:71
18686 " guestfish <<_EOF_\n"
18689 " mount /dev/vg_guest/lv_root /\n"
18690 " write /etc/motd \"Welcome, new users\"\n"
18696 #: ../fish/guestfish.pod:78
18697 msgid "List the LVM logical volumes in a disk image:"
18701 #: ../fish/guestfish.pod:80
18704 " guestfish -a disk.img --ro <<_EOF_\n"
18712 #: ../fish/guestfish.pod:85
18713 msgid "List all the filesystems in a disk image:"
18717 #: ../fish/guestfish.pod:87
18720 " guestfish -a disk.img --ro <<_EOF_\n"
18722 " list-filesystems\n"
18728 #: ../fish/guestfish.pod:92
18729 msgid "On one command line"
18733 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18734 msgid "Update C</etc/resolv.conf> in a guest:"
18738 #: ../fish/guestfish.pod:96
18742 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18743 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18748 #: ../fish/guestfish.pod:100
18749 msgid "Edit C</boot/grub/grub.conf> interactively:"
18753 #: ../fish/guestfish.pod:102
18756 " guestfish --rw --add disk.img \\\n"
18757 " --mount /dev/vg_guest/lv_root \\\n"
18758 " --mount /dev/sda1:/boot \\\n"
18759 " edit /boot/grub/grub.conf\n"
18764 #: ../fish/guestfish.pod:107
18765 msgid "Mount disks automatically"
18769 #: ../fish/guestfish.pod:109
18771 "Use the I<-i> option to automatically mount the disks from a virtual "
18776 #: ../fish/guestfish.pod:112
18779 " guestfish --ro -a disk.img -i cat /etc/group\n"
18784 #: ../fish/guestfish.pod:114
18787 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18792 #: ../fish/guestfish.pod:116
18793 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18797 #: ../fish/guestfish.pod:118
18800 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18805 #: ../fish/guestfish.pod:120
18806 msgid "As a script interpreter"
18810 #: ../fish/guestfish.pod:122
18811 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18815 #: ../fish/guestfish.pod:124
18818 " #!/usr/bin/guestfish -f\n"
18819 " sparse test1.img 100M\n"
18821 " part-disk /dev/sda mbr\n"
18822 " mkfs ext2 /dev/sda1\n"
18827 #: ../fish/guestfish.pod:130
18828 msgid "Start with a prepared disk"
18832 #: ../fish/guestfish.pod:132
18834 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18835 "single ext2-formatted partition:"
18839 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
18842 " guestfish -N fs\n"
18847 #: ../fish/guestfish.pod:137
18848 msgid "To list what is available do:"
18852 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18855 " guestfish -N help | less\n"
18860 #: ../fish/guestfish.pod:141
18861 msgid "Remote control"
18865 #: ../fish/guestfish.pod:143
18868 " eval \"`guestfish --listen`\"\n"
18869 " guestfish --remote add-ro disk.img\n"
18870 " guestfish --remote run\n"
18871 " guestfish --remote lvs\n"
18876 #: ../fish/guestfish.pod:154
18877 msgid "Displays general help on options."
18881 #: ../fish/guestfish.pod:158
18882 msgid "B<--cmd-help>"
18886 #: ../fish/guestfish.pod:160
18887 msgid "Lists all available guestfish commands."
18891 #: ../fish/guestfish.pod:162
18896 #: ../fish/guestfish.pod:164
18897 msgid "B<--cmd-help cmd>"
18901 #: ../fish/guestfish.pod:166
18902 msgid "Displays detailed help on a single command C<cmd>."
18906 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18907 msgid "B<-a image>"
18911 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18912 msgid "B<--add image>"
18916 #: ../fish/guestfish.pod:172
18917 msgid "Add a block device or virtual machine image to the shell."
18921 #: ../fish/guestfish.pod:177
18923 "Using this flag is mostly equivalent to using the C<add> command, with "
18924 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18925 "the I<--format=...> flag was given."
18929 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18931 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18932 "URI to use. The default is to use the default libvirt connection."
18936 #: ../fish/guestfish.pod:189
18941 #: ../fish/guestfish.pod:191
18943 "If using the I<--listen> option and a csh-like shell, use this option. See "
18944 "section L</REMOTE CONTROL AND CSH> below."
18948 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18949 msgid "B<-d libvirt-domain>"
18953 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18954 msgid "B<--domain libvirt-domain>"
18958 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18960 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18961 "used, then any libvirt domain can be used. However in write mode, only "
18962 "libvirt domains which are shut down can be named here."
18966 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18967 msgid "Domain UUIDs can be used instead of names."
18971 #: ../fish/guestfish.pod:204
18973 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18974 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18975 "if the I<--format:...> flag was given."
18979 #: ../fish/guestfish.pod:208
18984 #: ../fish/guestfish.pod:210
18985 msgid "B<--no-dest-paths>"
18989 #: ../fish/guestfish.pod:212
18991 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18992 "to hit the tab key to complete paths on the guest filesystem, but this "
18993 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18994 "allow this feature to be disabled."
18998 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
19000 "When prompting for keys and passphrases, guestfish normally turns echoing "
19001 "off so you cannot see what you are typing. If you are not worried about "
19002 "Tempest attacks and there is no one else in the room you can specify this "
19003 "flag to see what you are typing."
19007 #: ../fish/guestfish.pod:224
19012 #: ../fish/guestfish.pod:226
19013 msgid "B<--file file>"
19017 #: ../fish/guestfish.pod:228
19018 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
19022 #: ../fish/guestfish.pod:231
19025 " #!/usr/bin/guestfish -f\n"
19030 #: ../fish/guestfish.pod:244
19033 " guestfish --format=raw -a disk.img\n"
19038 #: ../fish/guestfish.pod:248
19041 " guestfish --format=raw -a disk.img --format -a another.img\n"
19046 #: ../fish/guestfish.pod:253
19048 "If you have untrusted raw-format guest disk images, you should use this "
19049 "option to specify the disk format. This avoids a possible security problem "
19050 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
19054 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
19055 msgid "B<--inspector>"
19059 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
19061 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
19062 "system and mount filesystems as they would be mounted on the real virtual "
19067 #: ../fish/guestfish.pod:266
19068 msgid "Typical usage is either:"
19072 #: ../fish/guestfish.pod:268
19075 " guestfish -d myguest -i\n"
19080 #: ../fish/guestfish.pod:270
19081 msgid "(for an inactive libvirt domain called I<myguest>), or:"
19085 #: ../fish/guestfish.pod:272
19088 " guestfish --ro -d myguest -i\n"
19093 #: ../fish/guestfish.pod:274
19094 msgid "(for active domains, readonly), or specify the block device directly:"
19098 #: ../fish/guestfish.pod:276
19101 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
19106 #: ../fish/guestfish.pod:278
19108 "Note that the command line syntax changed slightly over older versions of "
19109 "guestfish. You can still use the old syntax:"
19113 #: ../fish/guestfish.pod:281
19116 " guestfish [--ro] -i disk.img\n"
19121 #: ../fish/guestfish.pod:283
19124 " guestfish [--ro] -i libvirt-domain\n"
19129 #: ../fish/guestfish.pod:285
19131 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
19132 "then using other commands to mount the filesystems that were found."
19136 #: ../fish/guestfish.pod:294
19137 msgid "B<--listen>"
19141 #: ../fish/guestfish.pod:296
19143 "Fork into the background and listen for remote commands. See section "
19144 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
19148 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
19153 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
19155 "Connect to a live virtual machine. (Experimental, see "
19156 "L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>)."
19160 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
19161 msgid "B<-m dev[:mountpoint[:options]]>"
19165 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
19166 msgid "B<--mount dev[:mountpoint[:options]]>"
19170 #: ../fish/guestfish.pod:308
19171 msgid "Mount the named partition or logical volume on the given mountpoint."
19175 #: ../fish/guestfish.pod:310
19176 msgid "If the mountpoint is omitted, it defaults to C</>."
19180 #: ../fish/guestfish.pod:312
19181 msgid "You have to mount something on C</> before most commands will work."
19185 #: ../fish/guestfish.pod:314
19187 "If any I<-m> or I<--mount> options are given, the guest is automatically "
19192 #: ../fish/guestfish.pod:317
19194 "If you don't know what filesystems a disk image contains, you can either run "
19195 "guestfish without this option, then list the partitions, filesystems and LVs "
19196 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
19197 "commands), or you can use the L<virt-filesystems(1)> program."
19201 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
19203 "The third (and rarely used) part of the mount parameter is the list of mount "
19204 "options used to mount the underlying filesystem. If this is not given, then "
19205 "the mount options are either the empty string or C<ro> (the latter if the "
19206 "I<--ro> flag is used). By specifying the mount options, you override this "
19207 "default choice. Probably the only time you would use this is to enable ACLs "
19208 "and/or extended attributes if the filesystem can support them:"
19212 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
19215 " -m /dev/sda1:/:acl,user_xattr\n"
19220 #: ../fish/guestfish.pod:333
19221 msgid "Using this flag is equivalent to using the C<mount-options> command."
19225 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202 ../resize/virt-resize.pod:435
19230 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
19231 msgid "B<--no-sync>"
19235 #: ../fish/guestfish.pod:339
19237 "Disable autosync. This is enabled by default. See the discussion of "
19238 "autosync in the L<guestfs(3)> manpage."
19242 #: ../fish/guestfish.pod:342
19247 #: ../fish/guestfish.pod:344
19248 msgid "B<--new type>"
19252 #: ../fish/guestfish.pod:346
19257 #: ../fish/guestfish.pod:348
19259 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
19260 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
19261 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
19266 #: ../fish/guestfish.pod:353
19267 msgid "B<--progress-bars>"
19271 #: ../fish/guestfish.pod:355
19272 msgid "Enable progress bars, even when guestfish is used non-interactively."
19276 #: ../fish/guestfish.pod:357
19278 "Progress bars are enabled by default when guestfish is used as an "
19279 "interactive shell."
19283 #: ../fish/guestfish.pod:360
19284 msgid "B<--no-progress-bars>"
19288 #: ../fish/guestfish.pod:362
19289 msgid "Disable progress bars."
19293 #: ../fish/guestfish.pod:364
19294 msgid "B<--remote[=pid]>"
19298 #: ../fish/guestfish.pod:366
19300 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
19301 "CONTROL GUESTFISH OVER A SOCKET> below."
19305 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248 ../rescue/virt-rescue.pod:189
19310 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250 ../rescue/virt-rescue.pod:191
19315 #: ../fish/guestfish.pod:373
19317 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
19318 "mounts are done read-only."
19322 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:195
19324 "The option must always be used if the disk image or virtual machine might be "
19325 "running, and is generally recommended in cases where you don't need write "
19326 "access to the disk."
19330 #: ../fish/guestfish.pod:380
19332 "Note that prepared disk images created with I<-N> are not affected by this "
19333 "option. Also commands like C<add> are not affected - you have to specify "
19334 "the C<readonly:true> option explicitly if you need it."
19338 #: ../fish/guestfish.pod:384
19339 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
19343 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262 ../rescue/virt-rescue.pod:201
19344 msgid "B<--selinux>"
19348 #: ../fish/guestfish.pod:388
19349 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
19353 #: ../fish/guestfish.pod:394
19355 "Enable very verbose messages. This is particularly useful if you find a "
19360 #: ../fish/guestfish.pod:401
19361 msgid "Display the guestfish / libguestfs version number and exit."
19365 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278 ../rescue/virt-rescue.pod:231
19370 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280 ../rescue/virt-rescue.pod:233
19375 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
19377 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
19378 "mounts are done read-write."
19382 #: ../fish/guestfish.pod:410
19383 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
19387 #: ../fish/guestfish.pod:414
19388 msgid "Echo each command before executing it."
19392 #: ../fish/guestfish.pod:418
19393 msgid "COMMANDS ON COMMAND LINE"
19397 #: ../fish/guestfish.pod:420
19398 msgid "Any additional (non-option) arguments are treated as commands to execute."
19402 #: ../fish/guestfish.pod:423
19404 "Commands to execute should be separated by a colon (C<:>), where the colon "
19405 "is a separate parameter. Thus:"
19409 #: ../fish/guestfish.pod:426
19412 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
19417 #: ../fish/guestfish.pod:428
19419 "If there are no additional arguments, then we enter a shell, either an "
19420 "interactive shell with a prompt (if the input is a terminal) or a "
19421 "non-interactive shell."
19425 #: ../fish/guestfish.pod:432
19427 "In either command line mode or non-interactive shell, the first command that "
19428 "gives an error causes the whole shell to exit. In interactive mode (with a "
19429 "prompt) if a command fails, you can continue to enter commands."
19433 #: ../fish/guestfish.pod:437
19434 msgid "USING launch (OR run)"
19438 #: ../fish/guestfish.pod:439
19440 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
19441 "then launch it, then mount any disks you need, and finally issue "
19442 "actions/commands. So the general order of the day is:"
19446 #: ../fish/guestfish.pod:447
19447 msgid "add or -a/--add"
19451 #: ../fish/guestfish.pod:451
19452 msgid "launch (aka run)"
19456 #: ../fish/guestfish.pod:455
19457 msgid "mount or -m/--mount"
19461 #: ../fish/guestfish.pod:459
19462 msgid "any other commands"
19466 #: ../fish/guestfish.pod:463
19468 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
19469 "guest before mounting or performing any other commands."
19473 #: ../fish/guestfish.pod:466
19475 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
19476 "I<--new> options were given then C<run> is done automatically, simply "
19477 "because guestfish can't perform the action you asked for without doing this."
19481 #: ../fish/guestfish.pod:471
19482 msgid "OPENING DISKS FOR READ AND WRITE"
19486 #: ../fish/guestfish.pod:473
19488 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
19489 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
19490 "I<-i> and I<-m> open disk images read-only or for writing."
19494 #: ../fish/guestfish.pod:478
19496 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
19497 "opening disk images supplied on the command line for write. To open a disk "
19498 "image read-only you have to do I<-a image --ro>."
19502 #: ../fish/guestfish.pod:482
19504 "This matters: If you accidentally open a live VM disk image writable then "
19505 "you will cause irreversible disk corruption."
19509 #: ../fish/guestfish.pod:485
19511 "In a future libguestfs we intend to change the default the other way. Disk "
19512 "images will be opened read-only. You will have to either specify "
19513 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
19514 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
19515 "access for disk images specified by those other command line options."
19519 #: ../fish/guestfish.pod:492
19521 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
19522 "which does nothing (it is already the default). However it is highly "
19523 "recommended that you use this option to indicate that you need write access, "
19524 "and prepare your scripts for the day when this option will be required for "
19529 #: ../fish/guestfish.pod:498
19531 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
19532 "other libguestfs program apart from guestfish and guestmount."
19536 #: ../fish/guestfish.pod:501
19541 #: ../fish/guestfish.pod:503
19543 "You can quote ordinary parameters using either single or double quotes. For "
19548 #: ../fish/guestfish.pod:506
19551 " add \"file with a space.img\"\n"
19556 #: ../fish/guestfish.pod:508
19559 " rm '/file name'\n"
19564 #: ../fish/guestfish.pod:510
19572 #: ../fish/guestfish.pod:512
19574 "A few commands require a list of strings to be passed. For these, use a "
19575 "whitespace-separated list, enclosed in quotes. Strings containing "
19576 "whitespace to be passed through must be enclosed in single quotes. A "
19577 "literal single quote must be escaped with a backslash."
19581 #: ../fish/guestfish.pod:517
19584 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
19585 " command \"/bin/echo 'foo bar'\"\n"
19586 " command \"/bin/echo \\'foo\\'\"\n"
19591 #: ../fish/guestfish.pod:521
19592 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
19596 #: ../fish/guestfish.pod:523
19598 "In double-quoted arguments (only) use backslash to insert special "
19603 #: ../fish/guestfish.pod:528
19608 #: ../fish/guestfish.pod:530
19609 msgid "Alert (bell) character."
19613 #: ../fish/guestfish.pod:532
19618 #: ../fish/guestfish.pod:534
19619 msgid "Backspace character."
19623 #: ../fish/guestfish.pod:536
19628 #: ../fish/guestfish.pod:538
19629 msgid "Form feed character."
19633 #: ../fish/guestfish.pod:540
19638 #: ../fish/guestfish.pod:542
19639 msgid "Newline character."
19643 #: ../fish/guestfish.pod:544
19648 #: ../fish/guestfish.pod:546
19649 msgid "Carriage return character."
19653 #: ../fish/guestfish.pod:548
19658 #: ../fish/guestfish.pod:550
19659 msgid "Horizontal tab character."
19663 #: ../fish/guestfish.pod:552
19668 #: ../fish/guestfish.pod:554
19669 msgid "Vertical tab character."
19673 #: ../fish/guestfish.pod:556
19678 #: ../fish/guestfish.pod:558
19679 msgid "A literal double quote character."
19683 #: ../fish/guestfish.pod:560
19688 #: ../fish/guestfish.pod:562
19690 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
19695 #: ../fish/guestfish.pod:565
19700 #: ../fish/guestfish.pod:567
19701 msgid "A character with hex value I<hh>. There must be precisely 2 hex digits."
19705 #: ../fish/guestfish.pod:570
19707 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19712 #: ../fish/guestfish.pod:573
19717 #: ../fish/guestfish.pod:575
19718 msgid "A literal backslash character."
19722 #: ../fish/guestfish.pod:579
19723 msgid "OPTIONAL ARGUMENTS"
19727 #: ../fish/guestfish.pod:581
19729 "Some commands take optional arguments. These arguments appear in this "
19730 "documentation as C<[argname:..]>. You can use them as in these examples:"
19734 #: ../fish/guestfish.pod:585
19737 " add-drive-opts filename\n"
19742 #: ../fish/guestfish.pod:587
19745 " add-drive-opts filename readonly:true\n"
19750 #: ../fish/guestfish.pod:589
19753 " add-drive-opts filename format:qcow2 readonly:false\n"
19758 #: ../fish/guestfish.pod:591
19760 "Each optional argument can appear at most once. All optional arguments must "
19761 "appear after the required ones."
19765 #: ../fish/guestfish.pod:594
19770 #: ../fish/guestfish.pod:596
19771 msgid "This section applies to all commands which can take integers as parameters."
19775 #: ../fish/guestfish.pod:599
19776 msgid "SIZE SUFFIX"
19780 #: ../fish/guestfish.pod:601
19782 "When the command takes a parameter measured in bytes, you can use one of the "
19783 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19787 #: ../fish/guestfish.pod:607
19788 msgid "B<k> or B<K> or B<KiB>"
19792 #: ../fish/guestfish.pod:609
19793 msgid "The size in kilobytes (multiplied by 1024)."
19797 #: ../fish/guestfish.pod:611
19802 #: ../fish/guestfish.pod:613
19803 msgid "The size in SI 1000 byte units."
19807 #: ../fish/guestfish.pod:615
19808 msgid "B<M> or B<MiB>"
19812 #: ../fish/guestfish.pod:617
19813 msgid "The size in megabytes (multiplied by 1048576)."
19817 #: ../fish/guestfish.pod:619
19822 #: ../fish/guestfish.pod:621
19823 msgid "The size in SI 1000000 byte units."
19827 #: ../fish/guestfish.pod:623
19828 msgid "B<G> or B<GiB>"
19832 #: ../fish/guestfish.pod:625
19833 msgid "The size in gigabytes (multiplied by 2**30)."
19837 #: ../fish/guestfish.pod:627
19842 #: ../fish/guestfish.pod:629
19843 msgid "The size in SI 10**9 byte units."
19847 #: ../fish/guestfish.pod:631
19848 msgid "B<T> or B<TiB>"
19852 #: ../fish/guestfish.pod:633
19853 msgid "The size in terabytes (multiplied by 2**40)."
19857 #: ../fish/guestfish.pod:635
19862 #: ../fish/guestfish.pod:637
19863 msgid "The size in SI 10**12 byte units."
19867 #: ../fish/guestfish.pod:639
19868 msgid "B<P> or B<PiB>"
19872 #: ../fish/guestfish.pod:641
19873 msgid "The size in petabytes (multiplied by 2**50)."
19877 #: ../fish/guestfish.pod:643
19882 #: ../fish/guestfish.pod:645
19883 msgid "The size in SI 10**15 byte units."
19887 #: ../fish/guestfish.pod:647
19888 msgid "B<E> or B<EiB>"
19892 #: ../fish/guestfish.pod:649
19893 msgid "The size in exabytes (multiplied by 2**60)."
19897 #: ../fish/guestfish.pod:651
19902 #: ../fish/guestfish.pod:653
19903 msgid "The size in SI 10**18 byte units."
19907 #: ../fish/guestfish.pod:655
19908 msgid "B<Z> or B<ZiB>"
19912 #: ../fish/guestfish.pod:657
19913 msgid "The size in zettabytes (multiplied by 2**70)."
19917 #: ../fish/guestfish.pod:659
19922 #: ../fish/guestfish.pod:661
19923 msgid "The size in SI 10**21 byte units."
19927 #: ../fish/guestfish.pod:663
19928 msgid "B<Y> or B<YiB>"
19932 #: ../fish/guestfish.pod:665
19933 msgid "The size in yottabytes (multiplied by 2**80)."
19937 #: ../fish/guestfish.pod:667
19942 #: ../fish/guestfish.pod:669
19943 msgid "The size in SI 10**24 byte units."
19947 #: ../fish/guestfish.pod:675
19950 " truncate-size /file 1G\n"
19955 #: ../fish/guestfish.pod:677
19956 msgid "would truncate the file to 1 gigabyte."
19960 #: ../fish/guestfish.pod:679
19962 "Be careful because a few commands take sizes in kilobytes or megabytes "
19963 "(eg. the parameter to L</memsize> is specified in megabytes already). "
19964 "Adding a suffix will probably not do what you expect."
19968 #: ../fish/guestfish.pod:683
19969 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19973 #: ../fish/guestfish.pod:685
19975 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19976 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19980 #: ../fish/guestfish.pod:688
19983 " 1234 decimal number 1234\n"
19984 " 02322 octal number, equivalent to decimal 1234\n"
19985 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19990 #: ../fish/guestfish.pod:692
19992 "When using the C<chmod> command, you almost always want to specify an octal "
19993 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19994 "L<chmod(1)> program):"
19998 #: ../fish/guestfish.pod:696
20001 " chmod 0777 /public # OK\n"
20002 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
20007 #: ../fish/guestfish.pod:699
20009 "Commands that return numbers usually print them in decimal, but some "
20010 "commands print numbers in other radices (eg. C<umask> prints the mode in "
20011 "octal, preceeded by C<0>)."
20015 #: ../fish/guestfish.pod:703
20016 msgid "WILDCARDS AND GLOBBING"
20020 #: ../fish/guestfish.pod:705
20022 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
20023 "(globbing) by default. So for example the following will not do what you "
20028 #: ../fish/guestfish.pod:709
20036 #: ../fish/guestfish.pod:711
20038 "Assuming you don't have a directory called literally C</home/*> then the "
20039 "above command will return an error."
20043 #: ../fish/guestfish.pod:714
20044 msgid "To perform wildcard expansion, use the C<glob> command."
20048 #: ../fish/guestfish.pod:716
20051 " glob rm-rf /home/*\n"
20056 #: ../fish/guestfish.pod:718
20058 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
20059 "many times), equivalent to:"
20063 #: ../fish/guestfish.pod:721
20066 " rm-rf /home/jim\n"
20067 " rm-rf /home/joe\n"
20068 " rm-rf /home/mary\n"
20073 #: ../fish/guestfish.pod:725
20074 msgid "C<glob> only works on simple guest paths and not on device names."
20078 #: ../fish/guestfish.pod:727
20080 "If you have several parameters, each containing a wildcard, then glob will "
20081 "perform a Cartesian product."
20085 #: ../fish/guestfish.pod:730
20090 #: ../fish/guestfish.pod:732
20092 "Any line which starts with a I<#> character is treated as a comment and "
20093 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
20094 "a command. For example:"
20098 #: ../fish/guestfish.pod:736
20101 " # this is a comment\n"
20102 " # this is a comment\n"
20103 " foo # NOT a comment\n"
20108 #: ../fish/guestfish.pod:740
20109 msgid "Blank lines are also ignored."
20113 #: ../fish/guestfish.pod:742
20114 msgid "RUNNING COMMANDS LOCALLY"
20118 #: ../fish/guestfish.pod:744
20120 "Any line which starts with a I<!> character is treated as a command sent to "
20121 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
20125 #: ../fish/guestfish.pod:748
20129 " tgz-out /remote local/remote-data.tar.gz\n"
20134 #: ../fish/guestfish.pod:751
20136 "will create a directory C<local> on the host, and then export the contents "
20137 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
20138 "(See C<tgz-out>)."
20142 #: ../fish/guestfish.pod:755
20144 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
20145 "effect, due to the way that subprocesses work in Unix."
20149 #: ../fish/guestfish.pod:758
20150 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
20154 #: ../fish/guestfish.pod:760
20156 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
20157 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
20158 "and executed as guestfish commands."
20162 #: ../fish/guestfish.pod:764
20164 "Thus you can use shell script to construct arbitrary guestfish commands "
20165 "which are then parsed by guestfish."
20169 #: ../fish/guestfish.pod:767
20171 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
20172 "through C</foo.100>) using guestfish commands alone. However this is simple "
20173 "if we use a shell script to create the guestfish commands for us:"
20177 #: ../fish/guestfish.pod:772
20180 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
20185 #: ../fish/guestfish.pod:774
20186 msgid "or with names like C</foo.001>:"
20190 #: ../fish/guestfish.pod:776
20193 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
20198 #: ../fish/guestfish.pod:778
20200 "When using guestfish interactively it can be helpful to just run the shell "
20201 "script first (ie. remove the initial C<E<lt>> character so it is just an "
20202 "ordinary I<!> local command), see what guestfish commands it would run, and "
20203 "when you are happy with those prepend the C<E<lt>> character to run the "
20204 "guestfish commands for real."
20208 #: ../fish/guestfish.pod:784
20213 #: ../fish/guestfish.pod:786
20215 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
20216 "command (a guestfish command) to the second command (any host command). For "
20221 #: ../fish/guestfish.pod:790
20224 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
20229 #: ../fish/guestfish.pod:792
20231 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
20232 "program). The above command would list all accounts in the guest filesystem "
20233 "which have UID 0, ie. root accounts including backdoors. Other examples:"
20237 #: ../fish/guestfish.pod:797
20240 " hexdump /bin/ls | head\n"
20241 " list-devices | tail -1\n"
20242 " tgz-out / - | tar ztf -\n"
20247 #: ../fish/guestfish.pod:801
20249 "The space before the pipe symbol is required, any space after the pipe "
20250 "symbol is optional. Everything after the pipe symbol is just passed "
20251 "straight to the host shell, so it can contain redirections, globs and "
20252 "anything else that makes sense on the host side."
20256 #: ../fish/guestfish.pod:806
20258 "To use a literal argument which begins with a pipe symbol, you have to quote "
20263 #: ../fish/guestfish.pod:809
20271 #: ../fish/guestfish.pod:811
20272 msgid "HOME DIRECTORIES"
20276 #: ../fish/guestfish.pod:813
20278 "If a parameter starts with the character C<~> then the tilde may be expanded "
20279 "as a home directory path (either C<~> for the current user's home directory, "
20280 "or C<~user> for another user)."
20284 #: ../fish/guestfish.pod:817
20286 "Note that home directory expansion happens for users known I<on the host>, "
20287 "not in the guest filesystem."
20291 #: ../fish/guestfish.pod:820
20293 "To use a literal argument which begins with a tilde, you have to quote it, "
20298 #: ../fish/guestfish.pod:823
20306 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
20307 msgid "ENCRYPTED DISKS"
20311 #: ../fish/guestfish.pod:827
20313 "Libguestfs has some support for Linux guests encrypted according to the "
20314 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
20315 "disk encryption systems used by modern Linux guests. Currently only "
20316 "LVM-on-LUKS is supported."
20320 #: ../fish/guestfish.pod:832
20321 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
20325 #: ../fish/guestfish.pod:834
20328 " ><fs> vfs-type /dev/sda2\n"
20334 #: ../fish/guestfish.pod:837
20336 "Then open those devices using L</luks-open>. This creates a device-mapper "
20337 "device called C</dev/mapper/luksdev>."
20341 #: ../fish/guestfish.pod:840
20344 " ><fs> luks-open /dev/sda2 luksdev\n"
20345 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
20350 #: ../fish/guestfish.pod:843
20352 "Finally you have to tell LVM to scan for volume groups on the newly created "
20357 #: ../fish/guestfish.pod:846
20361 " vg-activate-all true\n"
20366 #: ../fish/guestfish.pod:849
20367 msgid "The logical volume(s) can now be mounted in the usual way."
20371 #: ../fish/guestfish.pod:851
20373 "Before closing a LUKS device you must unmount any logical volumes on it and "
20374 "deactivate the volume groups by calling C<vg-activate false VG> on each "
20375 "one. Then you can close the mapper device:"
20379 #: ../fish/guestfish.pod:855
20382 " vg-activate false /dev/VG\n"
20383 " luks-close /dev/mapper/luksdev\n"
20388 #: ../fish/guestfish.pod:860
20390 "If a path is prefixed with C<win:> then you can use Windows-style drive "
20391 "letters and paths (with some limitations). The following commands are "
20396 #: ../fish/guestfish.pod:864
20399 " file /WINDOWS/system32/config/system.LOG\n"
20404 #: ../fish/guestfish.pod:866
20407 " file win:\\windows\\system32\\config\\system.log\n"
20412 #: ../fish/guestfish.pod:868
20415 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
20420 #: ../fish/guestfish.pod:870
20422 "The parameter is rewritten \"behind the scenes\" by looking up the position "
20423 "where the drive is mounted, prepending that to the path, changing all "
20424 "backslash characters to forward slash, then resolving the result using "
20425 "L</case-sensitive-path>. For example if the E: drive was mounted on C</e> "
20426 "then the parameter might be rewritten like this:"
20430 #: ../fish/guestfish.pod:876
20433 " win:e:\\foo\\bar => /e/FOO/bar\n"
20438 #: ../fish/guestfish.pod:878
20439 msgid "This only works in argument positions that expect a path."
20443 #: ../fish/guestfish.pod:880
20444 msgid "UPLOADING AND DOWNLOADING FILES"
20448 #: ../fish/guestfish.pod:882
20450 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
20451 "others which upload from or download to a local file, you can use the "
20452 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
20456 #: ../fish/guestfish.pod:886
20464 #: ../fish/guestfish.pod:888
20465 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
20469 #: ../fish/guestfish.pod:891
20472 " tar-out /etc - | tar tf -\n"
20477 #: ../fish/guestfish.pod:893
20479 "writes the tarball to stdout and then pipes that into the external \"tar\" "
20480 "command (see L</PIPES>)."
20484 #: ../fish/guestfish.pod:896
20486 "When using C<-> to read from stdin, the input is read up to the end of "
20487 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
20488 "some arbitrary end marker:"
20492 #: ../fish/guestfish.pod:900
20495 " upload -<<END /foo\n"
20504 #: ../fish/guestfish.pod:906
20506 "Any string of characters can be used instead of C<END>. The end marker must "
20507 "appear on a line of its own, without any preceeding or following characters "
20508 "(not even spaces)."
20512 #: ../fish/guestfish.pod:910
20514 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
20515 "upload local files (so-called \"FileIn\" parameters in the generator)."
20519 #: ../fish/guestfish.pod:913
20520 msgid "EXIT ON ERROR BEHAVIOUR"
20524 #: ../fish/guestfish.pod:915
20526 "By default, guestfish will ignore any errors when in interactive mode "
20527 "(ie. taking commands from a human over a tty), and will exit on the first "
20528 "error in non-interactive mode (scripts, commands given on the command line)."
20532 #: ../fish/guestfish.pod:920
20534 "If you prefix a command with a I<-> character, then that command will not "
20535 "cause guestfish to exit, even if that (one) command returns an error."
20539 #: ../fish/guestfish.pod:924
20540 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
20544 #: ../fish/guestfish.pod:926
20546 "Guestfish can be remote-controlled over a socket. This is useful "
20547 "particularly in shell scripts where you want to make several different "
20548 "changes to a filesystem, but you don't want the overhead of starting up a "
20549 "guestfish process each time."
20553 #: ../fish/guestfish.pod:931
20554 msgid "Start a guestfish server process using:"
20558 #: ../fish/guestfish.pod:933
20561 " eval \"`guestfish --listen`\"\n"
20566 #: ../fish/guestfish.pod:935
20567 msgid "and then send it commands by doing:"
20571 #: ../fish/guestfish.pod:937
20574 " guestfish --remote cmd [...]\n"
20579 #: ../fish/guestfish.pod:939
20580 msgid "To cause the server to exit, send it the exit command:"
20584 #: ../fish/guestfish.pod:943
20586 "Note that the server will normally exit if there is an error in a command. "
20587 "You can change this in the usual way. See section L</EXIT ON ERROR "
20592 #: ../fish/guestfish.pod:947
20593 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
20597 #: ../fish/guestfish.pod:949
20599 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
20600 "is how the I<--remote> option knows where to send the commands. You can "
20601 "have several guestfish listener processes running using:"
20605 #: ../fish/guestfish.pod:953
20608 " eval \"`guestfish --listen`\"\n"
20609 " pid1=$GUESTFISH_PID\n"
20610 " eval \"`guestfish --listen`\"\n"
20611 " pid2=$GUESTFISH_PID\n"
20613 " guestfish --remote=$pid1 cmd\n"
20614 " guestfish --remote=$pid2 cmd\n"
20619 #: ../fish/guestfish.pod:961
20620 msgid "REMOTE CONTROL AND CSH"
20624 #: ../fish/guestfish.pod:963
20626 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
20631 #: ../fish/guestfish.pod:966
20634 " eval \"`guestfish --listen --csh`\"\n"
20639 #: ../fish/guestfish.pod:968
20640 msgid "REMOTE CONTROL DETAILS"
20644 #: ../fish/guestfish.pod:970
20646 "Remote control happens over a Unix domain socket called "
20647 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
20648 "of the process, and C<$PID> is the process ID of the server."
20652 #: ../fish/guestfish.pod:974
20653 msgid "Guestfish client and server versions must match exactly."
20657 #: ../fish/guestfish.pod:976
20658 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
20662 #: ../fish/guestfish.pod:978
20664 "From Bash, you can use the following code which creates a guestfish "
20665 "instance, correctly quotes the command line, handles failure to start, and "
20666 "cleans up guestfish when the script exits:"
20670 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
20678 #: ../fish/guestfish.pod:986
20681 " guestfish[0]=\"guestfish\"\n"
20682 " guestfish[1]=\"--listen\"\n"
20683 " guestfish[2]=\"--ro\"\n"
20684 " guestfish[3]=\"-a\"\n"
20685 " guestfish[4]=\"disk.img\"\n"
20690 #: ../fish/guestfish.pod:992
20693 " GUESTFISH_PID=\n"
20694 " eval $(\"${guestfish[@]}\")\n"
20695 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
20696 " echo \"error: guestfish didn't start up, see error messages above\"\n"
20703 #: ../fish/guestfish.pod:999
20706 " cleanup_guestfish ()\n"
20708 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20710 " trap cleanup_guestfish EXIT ERR\n"
20715 #: ../fish/guestfish.pod:1005
20718 " guestfish --remote -- run\n"
20723 #: ../fish/guestfish.pod:1007
20731 #: ../fish/guestfish.pod:1009
20732 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20736 #: ../fish/guestfish.pod:1011
20738 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20739 "context hangs, ie. don't do (note the backquotes):"
20743 #: ../fish/guestfish.pod:1014
20746 " a=`guestfish --remote run`\n"
20751 #: ../fish/guestfish.pod:1016
20753 "Since the C<run> command produces no output on stdout, this is not useful "
20754 "anyway. For further information see "
20755 "L<https://bugzilla.redhat.com/show_bug.cgi?id=592910>."
20759 #: ../fish/guestfish.pod:1020
20760 msgid "PREPARED DISK IMAGES"
20764 #: ../fish/guestfish.pod:1022
20766 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20767 "preformatted disk images that guestfish can make for you to save typing. "
20768 "This is particularly useful for testing purposes. This option is used "
20769 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20770 "can be mixed with I<-a>)."
20774 #: ../fish/guestfish.pod:1028
20776 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20777 "the second and so on. Existing files in the current directory are "
20782 #: ../fish/guestfish.pod:1032
20784 "The type briefly describes how the disk should be sized, partitioned, how "
20785 "filesystem(s) should be created, and how content should be added. "
20786 "Optionally the type can be followed by extra parameters, separated by C<:> "
20787 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
20788 "sparsely-allocated disk, containing a single partition, with the partition "
20789 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
20790 "on a 1GB disk instead."
20794 #: ../fish/guestfish.pod:1040
20795 msgid "To list the available types and any extra parameters they take, run:"
20799 #: ../fish/guestfish.pod:1044
20801 "Note that the prepared filesystem is not mounted. You would usually have to "
20802 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20806 #: ../fish/guestfish.pod:1048
20808 "If any I<-N> or I<--new> options are given, the guest is automatically "
20813 #: ../fish/guestfish.pod:1053
20814 msgid "Create a 100MB disk with an ext4-formatted partition:"
20818 #: ../fish/guestfish.pod:1055
20821 " guestfish -N fs:ext4\n"
20826 #: ../fish/guestfish.pod:1057
20827 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20831 #: ../fish/guestfish.pod:1059
20834 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20839 #: ../fish/guestfish.pod:1061
20840 msgid "Create a blank 200MB disk:"
20844 #: ../fish/guestfish.pod:1063
20847 " guestfish -N disk:200M\n"
20852 #: ../fish/guestfish.pod:1065
20853 msgid "PROGRESS BARS"
20857 #: ../fish/guestfish.pod:1067
20859 "Some (not all) long-running commands send progress notification messages as "
20860 "they are running. Guestfish turns these messages into progress bars."
20864 #: ../fish/guestfish.pod:1071
20866 "When a command that supports progress bars takes longer than two seconds to "
20867 "run, and if progress bars are enabled, then you will see one appearing below "
20872 #: ../fish/guestfish.pod:1075
20875 " ><fs> copy-size /large-file /another-file 2048M\n"
20876 " / 10% [#####-----------------------------------------] 00:30\n"
20881 #: ../fish/guestfish.pod:1078
20883 "The spinner on the left hand side moves round once for every progress "
20884 "notification received from the backend. This is a (reasonably) golden "
20885 "assurance that the command is \"doing something\" even if the progress bar "
20886 "is not moving, because the command is able to send the progress "
20887 "notifications. When the bar reaches 100% and the command finishes, the "
20888 "spinner disappears."
20892 #: ../fish/guestfish.pod:1085
20894 "Progress bars are enabled by default when guestfish is used interactively. "
20895 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20896 "and you can disable them completely using I<--no-progress-bars>."
20900 #: ../fish/guestfish.pod:1090
20901 msgid "GUESTFISH COMMANDS"
20905 #: ../fish/guestfish.pod:1092
20907 "The commands in this section are guestfish convenience commands, in other "
20908 "words, they are not part of the L<guestfs(3)> API."
20912 #: ../fish/guestfish.pod:1095
20917 #: ../fish/guestfish.pod:1097
20926 #: ../fish/guestfish.pod:1100
20927 msgid "Without any parameter, this provides general help."
20931 #: ../fish/guestfish.pod:1102
20932 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20936 #: ../fish/guestfish.pod:1104
20937 msgid "quit | exit"
20941 #: ../fish/guestfish.pod:1106
20942 msgid "This exits guestfish. You can also use C<^D> key."
20946 #: ../fish/guestfish.pod:1108
20947 msgid "@FISH_COMMANDS@"
20951 #: ../fish/guestfish.pod:1110
20956 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
20961 #: ../fish/guestfish.pod:1116
20963 "guestfish returns 0 if the commands completed without error, or 1 if there "
20968 #: ../fish/guestfish.pod:1123
20973 #: ../fish/guestfish.pod:1125
20975 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20980 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3218
20981 msgid "FEBOOTSTRAP_KERNEL"
20985 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3220
20986 msgid "FEBOOTSTRAP_MODULES"
20990 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3222
20992 "These two environment variables allow the kernel that libguestfs uses in the "
20993 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20994 "most recent host kernel is chosen. For more information about kernel "
20995 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20996 "available in febootstrap E<ge> 3.8."
21000 #: ../fish/guestfish.pod:1138
21001 msgid "GUESTFISH_DISPLAY_IMAGE"
21005 #: ../fish/guestfish.pod:1140
21007 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
21008 "If not set, it uses L<display(1)>."
21012 #: ../fish/guestfish.pod:1143
21013 msgid "GUESTFISH_PID"
21017 #: ../fish/guestfish.pod:1145
21019 "Used with the I<--remote> option to specify the remote guestfish process to "
21020 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
21024 #: ../fish/guestfish.pod:1149
21029 #: ../fish/guestfish.pod:1151
21031 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
21032 "not specified, the external L<hexedit(1)> program is used."
21036 #: ../fish/guestfish.pod:1155
21041 #: ../fish/guestfish.pod:1157
21043 "If compiled with GNU readline support, various files in the home directory "
21044 "can be used. See L</FILES>."
21048 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3228
21049 msgid "LIBGUESTFS_APPEND"
21053 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3230
21054 msgid "Pass additional options to the guest kernel."
21058 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3232
21059 msgid "LIBGUESTFS_DEBUG"
21063 #: ../fish/guestfish.pod:1166
21065 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
21066 "effect as using the B<-v> option."
21070 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3237
21071 msgid "LIBGUESTFS_MEMSIZE"
21075 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3239
21076 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
21080 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3242
21083 " LIBGUESTFS_MEMSIZE=700\n"
21088 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3244
21089 msgid "LIBGUESTFS_PATH"
21093 #: ../fish/guestfish.pod:1178
21095 "Set the path that guestfish uses to search for kernel and initrd.img. See "
21096 "the discussion of paths in L<guestfs(3)>."
21100 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3249
21101 msgid "LIBGUESTFS_QEMU"
21105 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3251
21107 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
21108 "which was found at compile time by the configure script is used."
21112 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3257
21113 msgid "LIBGUESTFS_TRACE"
21117 #: ../fish/guestfish.pod:1189
21118 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
21122 #: ../fish/guestfish.pod:1191
21127 #: ../fish/guestfish.pod:1193
21129 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
21134 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:254 ../src/guestfs.pod:3262
21139 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3264
21141 "Location of temporary directory, defaults to C</tmp> except for the cached "
21142 "supermin appliance which defaults to C</var/tmp>."
21146 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3267
21148 "If libguestfs was compiled to use the supermin appliance then the real "
21149 "appliance is cached in this directory, shared between all handles belonging "
21150 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
21151 "use in case C</var/tmp> is not large enough."
21155 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297 ../rescue/virt-rescue.pod:310
21160 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301 ../rescue/virt-rescue.pod:314
21161 msgid "$HOME/.libguestfs-tools.rc"
21165 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303 ../rescue/virt-rescue.pod:316
21166 msgid "/etc/libguestfs-tools.conf"
21170 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305 ../rescue/virt-rescue.pod:318
21172 "This configuration file controls the default read-only or read-write mode "
21173 "(I<--ro> or I<--rw>)."
21177 #: ../fish/guestfish.pod:1220
21178 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
21182 #: ../fish/guestfish.pod:1222
21183 msgid "$HOME/.guestfish"
21187 #: ../fish/guestfish.pod:1224
21189 "If compiled with GNU readline support, then the command history is saved in "
21194 #: ../fish/guestfish.pod:1227
21195 msgid "$HOME/.inputrc"
21199 #: ../fish/guestfish.pod:1229
21200 msgid "/etc/inputrc"
21204 #: ../fish/guestfish.pod:1231
21206 "If compiled with GNU readline support, then these files can be used to "
21207 "configure readline. For further information, please see "
21208 "L<readline(3)/INITIALIZATION FILE>."
21212 #: ../fish/guestfish.pod:1235
21213 msgid "To write rules which only apply to guestfish, use:"
21217 #: ../fish/guestfish.pod:1237
21227 #: ../fish/guestfish.pod:1241
21229 "Variables that you can set in inputrc that change the behaviour of guestfish "
21230 "in useful ways include:"
21234 #: ../fish/guestfish.pod:1246
21235 msgid "completion-ignore-case (default: on)"
21239 #: ../fish/guestfish.pod:1248
21241 "By default, guestfish will ignore case when tab-completing paths on the "
21246 #: ../fish/guestfish.pod:1251
21249 " set completion-ignore-case off\n"
21254 #: ../fish/guestfish.pod:1253
21255 msgid "to make guestfish case sensitive."
21259 #: ../fish/guestfish.pod:1257
21264 #: ../fish/guestfish.pod:1259
21265 msgid "test2.img (etc)"
21269 #: ../fish/guestfish.pod:1261
21271 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
21272 "will be created in the file C<test1.img> in the current directory. The "
21273 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
21274 "the same name will be overwritten."
21278 #: ../fish/guestfish.pod:1270
21280 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, "
21281 "L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, "
21282 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
21283 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
21284 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
21285 "L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, "
21286 "L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<display(1)>, L<hexedit(1)>, "
21287 "L<febootstrap-supermin-helper(8)>."
21291 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3360 ../test-tool/libguestfs-test-tool.pod:112
21292 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
21296 #: ../fish/virt-copy-in.pod:5
21297 msgid "virt-copy-in - Copy files and directories into a virtual machine disk image."
21301 #: ../fish/virt-copy-in.pod:9
21304 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
21309 #: ../fish/virt-copy-in.pod:11
21312 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
21317 #: ../fish/virt-copy-in.pod:15
21319 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
21320 "causing disk corruption. The virtual machine must be shut down before you "
21321 "use this command."
21325 #: ../fish/virt-copy-in.pod:21
21327 "C<virt-copy-in> copies files and directories from the local disk into a "
21328 "virtual machine disk image or named libvirt domain."
21332 #: ../fish/virt-copy-in.pod:24
21334 "You can give one of more filenames and directories on the command line. "
21335 "Directories are copied in recursively. The final parameter must be the "
21336 "destination directory in the disk image which must be an absolute path "
21337 "starting with a C</> character."
21341 #: ../fish/virt-copy-in.pod:33
21344 " virt-copy-in -d MyGuest resolv.conf /etc\n"
21349 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
21350 msgid "Upload a home directory to a guest:"
21354 #: ../fish/virt-copy-in.pod:37
21357 " virt-copy-in -d MyGuest skel /home\n"
21362 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28 ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
21363 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
21367 #: ../fish/virt-copy-in.pod:41
21369 "This command is just a simple shell script wrapper around the "
21370 "L<guestfish(1)> C<copy-in> command. For anything more complex than a "
21371 "trivial copy, you are probably better off using guestfish directly."
21375 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36 ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
21377 "Since the shell script just passes options straight to guestfish, read "
21378 "L<guestfish(1)> to see the full list of options."
21382 #: ../fish/virt-copy-in.pod:52
21384 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
21385 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21389 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55 ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
21390 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
21394 #: ../fish/virt-copy-out.pod:5
21396 "virt-copy-out - Copy files and directories out of a virtual machine disk "
21401 #: ../fish/virt-copy-out.pod:9
21404 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
21409 #: ../fish/virt-copy-out.pod:11
21412 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
21417 #: ../fish/virt-copy-out.pod:15
21419 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
21420 "image or named libvirt domain."
21424 #: ../fish/virt-copy-out.pod:18
21426 "You can give one of more filenames and directories on the command line. "
21427 "Directories are copied out recursively."
21431 #: ../fish/virt-copy-out.pod:23
21432 msgid "Download the home directories from a virtual machine:"
21436 #: ../fish/virt-copy-out.pod:25
21440 " virt-copy-out -d MyGuest /home homes\n"
21445 #: ../fish/virt-copy-out.pod:30
21447 "This command is just a simple shell script wrapper around the "
21448 "L<guestfish(1)> C<copy-out> command. For anything more complex than a "
21449 "trivial copy, you are probably better off using guestfish directly."
21453 #: ../fish/virt-copy-out.pod:41
21455 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, "
21456 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
21460 #: ../fish/virt-tar-in.pod:5
21461 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
21465 #: ../fish/virt-tar-in.pod:9
21468 " virt-tar-in -a disk.img data.tar /destination\n"
21473 #: ../fish/virt-tar-in.pod:11
21476 " virt-tar-in -d domain data.tar /destination\n"
21481 #: ../fish/virt-tar-in.pod:13
21484 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
21489 #: ../fish/virt-tar-in.pod:17
21491 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
21492 "causing disk corruption. The virtual machine must be shut down before you "
21493 "use this command."
21497 #: ../fish/virt-tar-in.pod:23
21499 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
21500 "image or named libvirt domain."
21504 #: ../fish/virt-tar-in.pod:26
21506 "The first parameter is the tar file. Use C<-> to read the tar file from "
21507 "standard input. The second parameter is the absolute target directory to "
21512 #: ../fish/virt-tar-in.pod:34
21515 " virt-tar-in -d MyGuest homes.tar /home\n"
21520 #: ../fish/virt-tar-in.pod:38
21522 "This command is just a simple shell script wrapper around the "
21523 "L<guestfish(1)> C<tar-in> command. For anything more complex than a trivial "
21524 "copy, you are probably better off using guestfish directly."
21528 #: ../fish/virt-tar-in.pod:49
21530 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21531 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, "
21532 "L<http://libguestfs.org/>."
21536 #: ../fish/virt-tar-out.pod:5
21537 msgid "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
21541 #: ../fish/virt-tar-out.pod:9
21544 " virt-tar-out -a disk.img /dir files.tar\n"
21549 #: ../fish/virt-tar-out.pod:11
21552 " virt-tar-out -d domain /dir files.tar\n"
21557 #: ../fish/virt-tar-out.pod:13
21560 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
21565 #: ../fish/virt-tar-out.pod:17
21566 msgid "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
21570 #: ../fish/virt-tar-out.pod:20
21572 "The first parameter is the absolute path of the virtual machine directory. "
21573 "The second parameter is the tar file to write. Use C<-> to write to "
21578 #: ../fish/virt-tar-out.pod:26
21579 msgid "Download the home directories from a guest:"
21583 #: ../fish/virt-tar-out.pod:28
21586 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
21591 #: ../fish/virt-tar-out.pod:32
21593 "This command is just a simple shell script wrapper around the "
21594 "L<guestfish(1)> C<tar-out> command. For anything more complex than a "
21595 "trivial copy, you are probably better off using guestfish directly."
21599 #: ../fish/virt-tar-out.pod:43
21601 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
21602 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
21606 #: ../fuse/guestmount.pod:5
21607 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21611 #: ../fuse/guestmount.pod:9
21614 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21619 #: ../fuse/guestmount.pod:11
21622 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
21627 #: ../fuse/guestmount.pod:13
21630 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
21635 #: ../fuse/guestmount.pod:17
21637 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21638 "machines. If you do this, you risk disk corruption in the VM."
21642 #: ../fuse/guestmount.pod:22
21644 "The guestmount program can be used to mount virtual machine filesystems and "
21645 "other disk images on the host. It uses libguestfs for access to the guest "
21646 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21647 "a mountable device."
21651 #: ../fuse/guestmount.pod:27
21653 "Along with other options, you have to give at least one device (I<-a> "
21654 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
21655 "option) or use the I<-i> inspection option or the I<--live> option. How "
21656 "this works is better explained in the L<guestfish(1)> manual page, or by "
21657 "looking at the examples below."
21661 #: ../fuse/guestmount.pod:33
21663 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21664 "by you, and the filesystem will not be visible to any other users unless you "
21665 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21666 "the filesystem, use the C<fusermount -u> command."
21670 #: ../fuse/guestmount.pod:41
21672 "For a typical Windows guest which has its main filesystem on the first "
21677 #: ../fuse/guestmount.pod:44
21680 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21685 #: ../fuse/guestmount.pod:46
21687 "For a typical Linux guest which has a /boot filesystem on the first "
21688 "partition, and the root filesystem on a logical volume:"
21692 #: ../fuse/guestmount.pod:49
21695 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21700 #: ../fuse/guestmount.pod:51
21701 msgid "To get libguestfs to detect guest mountpoints for you:"
21705 #: ../fuse/guestmount.pod:53
21708 " guestmount -a guest.img -i --ro /mnt\n"
21713 #: ../fuse/guestmount.pod:55
21714 msgid "For a libvirt guest called \"Guest\" you could do:"
21718 #: ../fuse/guestmount.pod:57
21721 " guestmount -d Guest -i --ro /mnt\n"
21726 #: ../fuse/guestmount.pod:59
21728 "If you don't know what filesystems are contained in a guest or disk image, "
21729 "use L<virt-filesystems(1)> first:"
21733 #: ../fuse/guestmount.pod:62
21736 " virt-filesystems MyGuest\n"
21741 #: ../fuse/guestmount.pod:64
21743 "If you want to trace the libguestfs calls but without excessive debugging "
21744 "information, we recommend:"
21748 #: ../fuse/guestmount.pod:67
21751 " guestmount [...] --trace /mnt\n"
21756 #: ../fuse/guestmount.pod:69
21757 msgid "If you want to debug the program, we recommend:"
21761 #: ../fuse/guestmount.pod:71
21764 " guestmount [...] --trace --verbose /mnt\n"
21769 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:96 ../resize/virt-resize.pod:621
21774 #: ../fuse/guestmount.pod:75
21775 msgid "Other users cannot see the filesystem by default"
21779 #: ../fuse/guestmount.pod:77
21781 "If you mount a filesystem as one user (eg. root), then other users will not "
21782 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21783 "option when mounting:"
21787 #: ../fuse/guestmount.pod:81
21790 " sudo guestmount [...] -o allow_other /mnt\n"
21795 #: ../fuse/guestmount.pod:83
21796 msgid "Enabling FUSE"
21800 #: ../fuse/guestmount.pod:85
21802 "On some distros, you may need to add yourself to a special group "
21803 "(eg. C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21804 "Debian and derivatives."
21808 #: ../fuse/guestmount.pod:89
21810 "On other distros, no special group is required. It is not necessary on "
21811 "Fedora or Red Hat Enterprise Linux."
21815 #: ../fuse/guestmount.pod:100
21816 msgid "Add a block device or virtual machine image."
21820 #: ../fuse/guestmount.pod:123
21821 msgid "B<--dir-cache-timeout N>"
21825 #: ../fuse/guestmount.pod:125
21827 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21828 "seconds. The readdir cache [actually, there are several semi-independent "
21829 "caches] is populated after a readdir(2) call with the stat and extended "
21830 "attributes of the files in the directory, in anticipation that they will be "
21831 "requested soon after."
21835 #: ../fuse/guestmount.pod:131
21837 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21838 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21839 "requests, only cache existing ones."
21843 #: ../fuse/guestmount.pod:151
21845 "If you have untrusted raw-format guest disk images, you should use this "
21846 "option to specify the disk format. This avoids a possible security problem "
21847 "with malicious guests (CVE-2010-3851). See also "
21848 "L<guestfs(3)/guestfs_add_drive_opts>."
21852 #: ../fuse/guestmount.pod:156
21853 msgid "B<--fuse-help>"
21857 #: ../fuse/guestmount.pod:158
21858 msgid "Display help on special FUSE options (see I<-o> below)."
21862 #: ../fuse/guestmount.pod:162
21863 msgid "Display brief help and exit."
21867 #: ../fuse/guestmount.pod:186
21869 "Mount the named partition or logical volume on the given mountpoint B<in the "
21870 "guest> (this has nothing to do with mountpoints in the host)."
21874 #: ../fuse/guestmount.pod:189
21876 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21877 "something on C</>."
21881 #: ../fuse/guestmount.pod:206
21883 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21884 "unmounted. If you specify this option, then we don't attempt to sync the "
21885 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21889 #: ../fuse/guestmount.pod:211
21890 msgid "B<-o option>"
21894 #: ../fuse/guestmount.pod:213
21895 msgid "B<--option option>"
21899 #: ../fuse/guestmount.pod:215
21900 msgid "Pass extra options to FUSE."
21904 #: ../fuse/guestmount.pod:217
21906 "To get a list of all the extra options supported by FUSE, use the command "
21907 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21908 "of them are a good idea."
21912 #: ../fuse/guestmount.pod:221
21915 " guestmount --fuse-help\n"
21920 #: ../fuse/guestmount.pod:223
21921 msgid "Some potentially useful FUSE options:"
21925 #: ../fuse/guestmount.pod:227
21926 msgid "B<-o allow_other>"
21930 #: ../fuse/guestmount.pod:229
21931 msgid "Allow other users to see the filesystem."
21935 #: ../fuse/guestmount.pod:231
21936 msgid "B<-o attr_timeout=N>"
21940 #: ../fuse/guestmount.pod:233
21941 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21945 #: ../fuse/guestmount.pod:235
21946 msgid "B<-o kernel_cache>"
21950 #: ../fuse/guestmount.pod:237
21952 "Allow the kernel to cache files (reduces the number of reads that have to go "
21953 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21954 "afford the extra memory usage."
21958 #: ../fuse/guestmount.pod:241
21959 msgid "B<-o uid=N> B<-o gid=N>"
21963 #: ../fuse/guestmount.pod:243
21965 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21966 "the chosen values."
21970 #: ../fuse/guestmount.pod:252
21972 "Add devices and mount everything read-only. Also disallow writes and make "
21973 "the disk appear read-only to FUSE."
21977 #: ../fuse/guestmount.pod:255
21979 "This is highly recommended if you are not going to edit the guest disk. If "
21980 "the guest is running and this option is I<not> supplied, then there is a "
21981 "strong risk of disk corruption in the guest. We try to prevent this from "
21982 "happening, but it is not always possible."
21986 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:199
21987 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21991 #: ../fuse/guestmount.pod:264
21992 msgid "Enable SELinux support for the guest."
21996 #: ../fuse/guestmount.pod:270
21997 msgid "Enable verbose messages from underlying libguestfs."
22001 #: ../fuse/guestmount.pod:276
22002 msgid "Display the program version and exit."
22006 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308 ../rescue/virt-rescue.pod:238 ../rescue/virt-rescue.pod:321
22007 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
22011 #: ../fuse/guestmount.pod:289
22016 #: ../fuse/guestmount.pod:291
22017 msgid "Trace libguestfs calls and entry into each FUSE function."
22021 #: ../fuse/guestmount.pod:293
22022 msgid "This also stops the daemon from forking into the background."
22026 #: ../fuse/guestmount.pod:319
22028 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22029 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
22030 "L<http://fuse.sf.net/>."
22034 #: ../fuse/guestmount.pod:334
22035 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
22039 #: ../inspector/virt-inspector.pod:5
22041 "virt-inspector - Display operating system version and other information "
22042 "about a virtual machine"
22046 #: ../inspector/virt-inspector.pod:9
22049 " virt-inspector [--options] -d domname\n"
22054 #: ../inspector/virt-inspector.pod:11
22057 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
22062 #: ../inspector/virt-inspector.pod:15
22065 " virt-inspector domname\n"
22070 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
22073 " virt-inspector disk.img [disk.img ...]\n"
22078 #: ../inspector/virt-inspector.pod:21
22080 "B<virt-inspector> examines a virtual machine or disk image and tries to "
22081 "determine the version of the operating system and other information about "
22082 "the virtual machine."
22086 #: ../inspector/virt-inspector.pod:25
22087 msgid "Virt-inspector produces XML output for feeding into other programs."
22091 #: ../inspector/virt-inspector.pod:27
22093 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
22094 "the libvirt domain (see: C<virsh list --all>)."
22098 #: ../inspector/virt-inspector.pod:30
22100 "You can also run virt-inspector directly on disk images from a single "
22101 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
22102 "has several block devices, in which case you should list several I<-a> "
22103 "options one after another, with the first corresponding to the guest's "
22104 "C</dev/sda>, the second to the guest's C</dev/sdb> and so on."
22108 #: ../inspector/virt-inspector.pod:37
22110 "You can also run virt-inspector on install disks, live CDs, bootable USB "
22111 "keys and similar."
22115 #: ../inspector/virt-inspector.pod:40
22117 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22118 "inspect several virtual machines, you have to run virt-inspector several "
22119 "times (for example, from a shell script for-loop)."
22123 #: ../inspector/virt-inspector.pod:45
22125 "Because virt-inspector needs direct access to guest images, it won't "
22126 "normally work over remote libvirt connections."
22130 #: ../inspector/virt-inspector.pod:48
22132 "All of the information available from virt-inspector is also available "
22133 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
22134 "The same information can also be fetched using guestfish or via libguestfs "
22135 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
22136 "WITH OTHER PROGRAMMING LANGUAGES>)."
22140 #: ../inspector/virt-inspector.pod:81
22142 "Libvirt is only used if you specify a C<domname> on the command line. If "
22143 "you specify guest block devices directly (I<-a>), then libvirt is not used "
22148 #: ../inspector/virt-inspector.pod:94
22150 "When prompting for keys and passphrases, virt-inspector normally turns "
22151 "echoing off so you cannot see what you are typing. If you are not worried "
22152 "about Tempest attacks and there is no one else in the room you can specify "
22153 "this flag to see what you are typing."
22157 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93 ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143 ../tools/virt-win-reg.pl:144
22159 "Specify the format of disk images given on the command line. If this is "
22160 "omitted then the format is autodetected from the content of the disk image."
22164 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97 ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147 ../tools/virt-win-reg.pl:148
22166 "If disk images are requested from libvirt, then this program asks libvirt "
22167 "for this information. In this case, the value of the format parameter is "
22172 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:391 ../resize/virt-resize.pod:483 ../sparsify/virt-sparsify.pod:138 ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
22174 "If working with untrusted raw-format guest disk images, you should ensure "
22175 "the format is always specified."
22179 #: ../inspector/virt-inspector.pod:135
22180 msgid "B<--xpath> query"
22184 #: ../inspector/virt-inspector.pod:137
22186 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
22187 "In this mode virt-inspector simply runs an XPath query; all other inspection "
22188 "functions are disabled. See L</XPATH QUERIES> below for some examples."
22192 #: ../inspector/virt-inspector.pod:146
22193 msgid "Previous versions of virt-inspector allowed you to write either:"
22197 #: ../inspector/virt-inspector.pod:152
22200 " virt-inspector guestname\n"
22205 #: ../inspector/virt-inspector.pod:160
22210 #: ../inspector/virt-inspector.pod:162
22212 "The virt-inspector XML is described precisely in a RELAX NG schema file "
22213 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
22214 "just an overview."
22218 #: ../inspector/virt-inspector.pod:166
22220 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
22221 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
22222 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
22223 "which is vanishingly rare in real world VMs."
22227 #: ../inspector/virt-inspector.pod:171
22228 msgid "E<lt>operatingsystemE<gt>"
22232 #: ../inspector/virt-inspector.pod:173
22234 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
22235 "describe the operating system, its architecture, the descriptive \"product "
22236 "name\" string, the type of OS and so on, as in this example:"
22240 #: ../inspector/virt-inspector.pod:177
22243 " <operatingsystems>\n"
22244 " <operatingsystem>\n"
22245 " <root>/dev/sda2</root>\n"
22246 " <name>windows</name>\n"
22247 " <arch>i386</arch>\n"
22248 " <distro>windows</distro>\n"
22249 " <product_name>Windows 7 Enterprise</product_name>\n"
22250 " <product_variant>Client</product_variant>\n"
22251 " <major_version>6</major_version>\n"
22252 " <minor_version>1</minor_version>\n"
22253 " <windows_systemroot>/Windows</windows_systemroot>\n"
22254 " <format>installed</format>\n"
22259 #: ../inspector/virt-inspector.pod:190
22261 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
22262 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
22263 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
22264 "architecture. The other fields are fairly self-explanatory, but because "
22265 "these fields are taken directly from the libguestfs inspection API you can "
22266 "find precise information from L<guestfs(3)/INSPECTION>."
22270 #: ../inspector/virt-inspector.pod:198
22272 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
22273 "of view of libguestfs (block devices may have completely different names "
22274 "inside the VM itself)."
22278 #: ../inspector/virt-inspector.pod:202
22279 msgid "E<lt>mountpointsE<gt>"
22283 #: ../inspector/virt-inspector.pod:204
22285 "Un*x-like guests typically have multiple filesystems which are mounted at "
22286 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
22287 "element which looks like this:"
22291 #: ../inspector/virt-inspector.pod:208
22294 " <operatingsystems>\n"
22295 " <operatingsystem>\n"
22298 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
22299 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
22300 " </mountpoints>\n"
22305 #: ../inspector/virt-inspector.pod:216
22307 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
22308 "and may have completely different names inside the guest. Only mountable "
22309 "filesystems appear in this list, not things like swap devices."
22313 #: ../inspector/virt-inspector.pod:221
22314 msgid "E<lt>filesystemsE<gt>"
22318 #: ../inspector/virt-inspector.pod:223
22320 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
22321 "filesystems belonging to the guest, including swap and empty partitions. "
22322 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
22323 "this OS or shared with this OS and other OSes)."
22327 #: ../inspector/virt-inspector.pod:229
22328 msgid "You might see something like this:"
22332 #: ../inspector/virt-inspector.pod:231
22335 " <operatingsystems>\n"
22336 " <operatingsystem>\n"
22339 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22340 " <type>ext4</type>\n"
22341 " <label>Fedora-13-x86_64</label>\n"
22342 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
22348 #: ../inspector/virt-inspector.pod:241
22350 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
22351 "the label, and the UUID."
22355 #: ../inspector/virt-inspector.pod:244
22356 msgid "E<lt>applicationsE<gt>"
22360 #: ../inspector/virt-inspector.pod:246
22362 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
22363 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
22368 #: ../inspector/virt-inspector.pod:250
22370 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
22371 "Typical values would be C<rpm> and C<deb>."
22375 #: ../inspector/virt-inspector.pod:253
22377 "E<lt>package_managementE<gt>, if present, describes the package manager. "
22378 "Typical values include C<yum>, C<up2date> and C<apt>"
22382 #: ../inspector/virt-inspector.pod:256
22383 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
22387 #: ../inspector/virt-inspector.pod:259
22390 " <operatingsystems>\n"
22391 " <operatingsystem>\n"
22393 " <applications>\n"
22395 " <name>coreutils</name>\n"
22396 " <version>8.5</version>\n"
22397 " <release>1</release>\n"
22398 " </application>\n"
22403 #: ../inspector/virt-inspector.pod:269
22405 "The version and release fields may not be available for some types guests. "
22406 "Other fields are possible, see "
22407 "L<guestfs(3)/guestfs_inspect_list_applications>."
22411 #: ../inspector/virt-inspector.pod:273
22412 msgid "E<lt>drive_mappingsE<gt>"
22416 #: ../inspector/virt-inspector.pod:275
22418 "For operating systems like Windows which use drive letters, virt-inspector "
22419 "is able to find out how drive letters map to filesystems."
22423 #: ../inspector/virt-inspector.pod:279
22426 " <operatingsystems>\n"
22427 " <operatingsystem>\n"
22429 " <drive_mappings>\n"
22430 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
22431 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
22432 " </drive_mappings>\n"
22437 #: ../inspector/virt-inspector.pod:287
22439 "In the example above, drive C maps to the filesystem on the second partition "
22440 "on the first disk, and drive E maps to the filesystem on the first partition "
22441 "on the second disk."
22445 #: ../inspector/virt-inspector.pod:291
22447 "Note that this only covers permanent local filesystem mappings, not things "
22448 "like network shares. Furthermore NTFS volume mount points may not be listed "
22453 #: ../inspector/virt-inspector.pod:295
22454 msgid "E<lt>iconE<gt>"
22458 #: ../inspector/virt-inspector.pod:297
22460 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
22461 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
22462 "very large and high quality."
22466 #: ../inspector/virt-inspector.pod:301
22469 " <operatingsystems>\n"
22470 " <operatingsystem>\n"
22473 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
22474 " [... many lines of base64 data ...]\n"
22480 #: ../inspector/virt-inspector.pod:309
22482 "To display the icon, you have to extract it and convert the base64 data back "
22483 "to a binary file. Use an XPath query or simply an editor to extract the "
22484 "data, then use the coreutils L<base64(1)> program to do the conversion back "
22489 #: ../inspector/virt-inspector.pod:314
22492 " base64 -i -d < icon.data > icon.png\n"
22497 #: ../inspector/virt-inspector.pod:316
22498 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
22502 #: ../inspector/virt-inspector.pod:318
22504 "Virt-inspector can detect some operating system installers on install disks, "
22505 "live CDs, bootable USB keys and more."
22509 #: ../inspector/virt-inspector.pod:321
22511 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
22512 "fields may be present to indicate a live CD, network installer, or one part "
22513 "of a multipart CD. For example:"
22517 #: ../inspector/virt-inspector.pod:325
22520 " <operatingsystems>\n"
22521 " <operatingsystem>\n"
22522 " <root>/dev/sda</root>\n"
22523 " <name>linux</name>\n"
22524 " <arch>i386</arch>\n"
22525 " <distro>ubuntu</distro>\n"
22526 " <product_name>Ubuntu 10.10 "Maverick "
22527 "Meerkat"</product_name>\n"
22528 " <major_version>10</major_version>\n"
22529 " <minor_version>10</minor_version>\n"
22530 " <format>installer</format>\n"
22536 #: ../inspector/virt-inspector.pod:337
22537 msgid "XPATH QUERIES"
22541 #: ../inspector/virt-inspector.pod:339
22543 "Virt-inspector includes built in support for running XPath queries. The "
22544 "reason for including XPath support directly in virt-inspector is simply that "
22545 "there are no good and widely available command line programs that can do "
22546 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
22547 "available on Red Hat Enterprise Linux."
22551 #: ../inspector/virt-inspector.pod:346
22553 "To perform an XPath query, use the I<--xpath> option. Note that in this "
22554 "mode, virt-inspector simply reads XML from stdin and outputs the query "
22555 "result on stdout. All other inspection features are disabled in this mode."
22559 #: ../inspector/virt-inspector.pod:353
22562 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
22564 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
22565 " <type>ext4</type>\n"
22571 #: ../inspector/virt-inspector.pod:359
22574 " $ virt-inspector -d Guest | \\\n"
22575 " virt-inspector --xpath "
22576 "\"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
22582 #: ../inspector/virt-inspector.pod:363
22585 " $ virt-inspector -d Guest | \\\n"
22586 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
22587 " [displays the guest icon, if there is one]\n"
22592 #: ../inspector/virt-inspector.pod:374
22593 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
22597 #: ../inspector/virt-inspector.pod:376
22599 "Early versions of libguestfs shipped with a different virt-inspector program "
22600 "written in Perl (the current version is written in C). The XML output of "
22601 "the Perl virt-inspector was different and it could also output in other "
22602 "formats like text."
22606 #: ../inspector/virt-inspector.pod:381
22607 msgid "The old virt-inspector is no longer supported or shipped with libguestfs."
22611 #: ../inspector/virt-inspector.pod:384
22613 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
22614 "versions of virt-inspector with different names:"
22618 #: ../inspector/virt-inspector.pod:387
22621 " virt-inspector Old Perl version.\n"
22622 " virt-inspector2 New C version.\n"
22627 #: ../inspector/virt-inspector.pod:397
22629 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, "
22630 "L<base64(1)>, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
22634 #: ../inspector/virt-inspector.pod:414
22635 msgid "Matthew Booth L<mbooth@redhat.com>"
22639 #: ../java/examples/guestfs-java.pod:5
22640 msgid "guestfs-java - How to use libguestfs from Java"
22644 #: ../java/examples/guestfs-java.pod:9
22647 " import com.redhat.et.libguestfs.*;\n"
22652 #: ../java/examples/guestfs-java.pod:11
22655 " GuestFS g = new GuestFS ();\n"
22656 " g.add_drive_opts (\"disk.img\", null);\n"
22662 #: ../java/examples/guestfs-java.pod:17
22664 "This manual page documents how to call libguestfs from the Java programming "
22665 "language. This page just documents the differences from the C API and gives "
22666 "some examples. If you are not familiar with using libguestfs, you also need "
22667 "to read L<guestfs(3)>."
22671 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
22672 msgid "CLOSING THE HANDLE"
22676 #: ../java/examples/guestfs-java.pod:24
22678 "The handle is closed when it is reaped by the garbage collector. Because "
22679 "libguestfs handles include a lot of state, it is also possible to close (and "
22680 "hence free) them explicitly by calling the C<close> method."
22684 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60 ../python/examples/guestfs-python.pod:21 ../ruby/examples/guestfs-ruby.pod:22
22689 #: ../java/examples/guestfs-java.pod:31
22691 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
22692 "exception. This has a single parameter which is the error message (a "
22697 #: ../java/examples/guestfs-java.pod:35
22698 msgid "Calling any method on a closed handle raises the same exception."
22702 #: ../java/examples/guestfs-java.pod:47
22704 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22705 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22706 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22707 "L<http://caml.inria.fr/>."
22711 #: ../ocaml/examples/guestfs-ocaml.pod:5
22712 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22716 #: ../ocaml/examples/guestfs-ocaml.pod:9
22717 msgid "Module style:"
22721 #: ../ocaml/examples/guestfs-ocaml.pod:11
22724 " let g = Guestfs.create () in\n"
22725 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22726 " Guestfs.launch g;\n"
22731 #: ../ocaml/examples/guestfs-ocaml.pod:15
22732 msgid "Object-oriented style:"
22736 #: ../ocaml/examples/guestfs-ocaml.pod:17
22739 " let g = new Guestfs.guestfs () in\n"
22740 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22746 #: ../ocaml/examples/guestfs-ocaml.pod:21
22749 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22751 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22756 #: ../ocaml/examples/guestfs-ocaml.pod:27
22758 "This manual page documents how to call libguestfs from the OCaml programming "
22759 "language. This page just documents the differences from the C API and gives "
22760 "some examples. If you are not familiar with using libguestfs, you also need "
22761 "to read L<guestfs(3)>."
22765 #: ../ocaml/examples/guestfs-ocaml.pod:32
22766 msgid "PROGRAMMING STYLES"
22770 #: ../ocaml/examples/guestfs-ocaml.pod:34
22772 "There are two different programming styles supported by the OCaml bindings. "
22773 "You can use a module style, with each C function mapped to an OCaml "
22778 #: ../ocaml/examples/guestfs-ocaml.pod:38
22781 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22786 #: ../ocaml/examples/guestfs-ocaml.pod:40
22791 #: ../ocaml/examples/guestfs-ocaml.pod:42
22794 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22799 #: ../ocaml/examples/guestfs-ocaml.pod:44
22801 "Alternately you can use an object-oriented style, calling methods on the "
22802 "class C<Guestfs.guestfs>:"
22806 #: ../ocaml/examples/guestfs-ocaml.pod:47
22809 " method set_verbose : bool -> unit\n"
22814 #: ../ocaml/examples/guestfs-ocaml.pod:49
22816 "The object-oriented style is usually briefer, and the minor performance "
22817 "penalty isn't noticable in the general overhead of performing libguestfs "
22822 #: ../ocaml/examples/guestfs-ocaml.pod:55
22824 "The handle is closed when it is reaped by the garbage collector. Because "
22825 "libguestfs handles include a lot of state, it is also possible to close (and "
22826 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22831 #: ../ocaml/examples/guestfs-ocaml.pod:62
22833 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22834 "exception. This has a single parameter which is the error message (a "
22839 #: ../ocaml/examples/guestfs-ocaml.pod:66
22841 "Calling any function/method on a closed handle raises "
22842 "C<Guestfs.Handle_closed>. The single parameter is the name of the function "
22847 #: ../ocaml/examples/guestfs-ocaml.pod:80
22849 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22850 "L<guestfs-java(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22851 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>, "
22852 "L<http://caml.inria.fr/>."
22856 #: ../perl/examples/guestfs-perl.pod:5
22857 msgid "guestfs-perl - How to use libguestfs from Perl"
22861 #: ../perl/examples/guestfs-perl.pod:9
22864 " use Sys::Guestfs;\n"
22869 #: ../perl/examples/guestfs-perl.pod:11
22872 " my $h = Sys::Guestfs->new ();\n"
22873 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22874 " $h->launch ();\n"
22875 " $h->mount_options ('', '/dev/sda1', '/');\n"
22876 " $h->touch ('/hello');\n"
22882 #: ../perl/examples/guestfs-perl.pod:20
22884 "This manual page documents how to call libguestfs from the Perl programming "
22885 "language. This page just documents the differences from the C API and gives "
22886 "some examples. If you are not familiar with using libguestfs, you also need "
22887 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22891 #: ../perl/examples/guestfs-perl.pod:26
22896 #: ../perl/examples/guestfs-perl.pod:28
22898 "Errors from libguestfs functions turn into calls to C<croak> (see "
22903 #: ../perl/examples/guestfs-perl.pod:41
22905 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, "
22906 "L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, "
22907 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, "
22908 "L<http://libguestfs.org/>."
22912 #: ../python/examples/guestfs-python.pod:5
22913 msgid "guestfs-python - How to use libguestfs from Python"
22917 #: ../python/examples/guestfs-python.pod:9
22920 " import guestfs\n"
22921 " g = guestfs.GuestFS ()\n"
22922 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22928 #: ../python/examples/guestfs-python.pod:16
22930 "This manual page documents how to call libguestfs from the Python "
22931 "programming language. This page just documents the differences from the C "
22932 "API and gives some examples. If you are not familiar with using libguestfs, "
22933 "you also need to read L<guestfs(3)>."
22937 #: ../python/examples/guestfs-python.pod:23
22939 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22940 "single string argument which is the error message."
22944 #: ../python/examples/guestfs-python.pod:26
22945 msgid "MORE DOCUMENTATION"
22949 #: ../python/examples/guestfs-python.pod:28
22954 #: ../python/examples/guestfs-python.pod:30
22958 " >>> import guestfs\n"
22959 " >>> help (guestfs)\n"
22964 #: ../python/examples/guestfs-python.pod:44
22966 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
22967 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
22968 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22972 #: ../rescue/virt-rescue.pod:5
22973 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22977 #: ../rescue/virt-rescue.pod:9
22980 " virt-rescue [--options] -d domname\n"
22985 #: ../rescue/virt-rescue.pod:11
22988 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22993 #: ../rescue/virt-rescue.pod:13
22996 " virt-rescue --suggest (-d domname | -a disk.img ...)\n"
23001 #: ../rescue/virt-rescue.pod:17
23004 " virt-rescue [--options] domname\n"
23009 #: ../rescue/virt-rescue.pod:19
23012 " virt-rescue [--options] disk.img [disk.img ...]\n"
23017 #: ../rescue/virt-rescue.pod:23
23019 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
23020 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
23021 "you from doing this, but doesn't catch all cases."
23025 #: ../rescue/virt-rescue.pod:27
23027 "However if you use the I<--ro> (read only) option, then you can attach a "
23028 "shell to a live virtual machine. The results might be strange or "
23029 "inconsistent at times but you won't get disk corruption."
23033 #: ../rescue/virt-rescue.pod:33
23035 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
23036 "need for a CD. virt-rescue gives you a rescue shell and some simple "
23037 "recovery tools which you can use to examine or rescue a virtual machine or "
23042 #: ../rescue/virt-rescue.pod:38
23044 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
23045 "on disk image(s):"
23049 #: ../rescue/virt-rescue.pod:41
23052 " virt-rescue -d GuestName\n"
23057 #: ../rescue/virt-rescue.pod:43
23060 " virt-rescue --ro -a /path/to/disk.img\n"
23065 #: ../rescue/virt-rescue.pod:45
23068 " virt-rescue -a /dev/sdc\n"
23073 #: ../rescue/virt-rescue.pod:47
23074 msgid "For live VMs you I<must> use the --ro option."
23078 #: ../rescue/virt-rescue.pod:49
23080 "When you run virt-rescue on a virtual machine or disk image, you are placed "
23081 "in an interactive bash shell where you can use many ordinary Linux "
23082 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
23083 "appliance. You must mount the virtual machine's filesystems by hand. There "
23084 "is an empty directory called C</sysroot> where you can mount filesystems."
23088 #: ../rescue/virt-rescue.pod:56
23090 "You can get virt-rescue to suggest mount commands for you by using the "
23091 "I<--suggest> option (in another terminal):"
23095 #: ../rescue/virt-rescue.pod:59
23098 " $ virt-rescue --suggest -d Fedora15\n"
23099 " Inspecting the virtual machine or disk image ...\n"
23104 #: ../rescue/virt-rescue.pod:62
23107 " This disk contains one or more operating systems. You can use these\n"
23108 " mount commands in virt-rescue (at the ><rescue> prompt) to mount the\n"
23114 #: ../rescue/virt-rescue.pod:66
23117 " # /dev/vg_f15x32/lv_root is the root of a linux operating system\n"
23118 " # type: linux, distro: fedora, version: 15.0\n"
23119 " # Fedora release 15 (Lovelock)\n"
23124 #: ../rescue/virt-rescue.pod:70
23127 " mount /dev/vg_f15x32/lv_root /sysroot/\n"
23128 " mount /dev/vda1 /sysroot/boot\n"
23129 " mount --bind /dev /sysroot/dev\n"
23130 " mount --bind /dev/pts /sysroot/dev/pts\n"
23131 " mount --bind /proc /sysroot/proc\n"
23132 " mount --bind /sys /sysroot/sys\n"
23137 #: ../rescue/virt-rescue.pod:77
23139 "Another way is to list the logical volumes (with L<lvs(8)>) and partitions "
23140 "(with L<parted(8)>) and mount them by hand:"
23144 #: ../rescue/virt-rescue.pod:80
23148 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
23149 " lv_root vg_f15x32 -wi-a- 8.83G\n"
23150 " lv_swap vg_f15x32 -wi-a- 992.00M\n"
23151 " ><rescue> mount /dev/vg_f15x32/lv_root /sysroot\n"
23152 " ><rescue> mount /dev/vda1 /sysroot/boot\n"
23153 " ><rescue> ls /sysroot\n"
23158 #: ../rescue/virt-rescue.pod:88
23159 msgid "Another command to list available filesystems is L<virt-filesystems(1)>."
23163 #: ../rescue/virt-rescue.pod:91
23165 "To run commands in a Linux guest (for example, grub), you should chroot into "
23166 "the /sysroot directory first:"
23170 #: ../rescue/virt-rescue.pod:94
23173 " ><rescue> chroot /sysroot\n"
23178 #: ../rescue/virt-rescue.pod:98
23180 "Virt-rescue can be used on I<any> disk image file or device, not just a "
23181 "virtual machine. For example you can use it on a blank file if you want to "
23182 "partition that file (although we would recommend using L<guestfish(1)> "
23183 "instead as it is more suitable for this purpose). You can even use "
23184 "virt-rescue on things like SD cards."
23188 #: ../rescue/virt-rescue.pod:104
23190 "Virt-rescue does not require root. You only need to run it as root if you "
23191 "need root to open the disk image."
23195 #: ../rescue/virt-rescue.pod:107
23197 "This tool is just designed for quick interactive hacking on a virtual "
23198 "machine. For more structured access to a virtual machine disk image, you "
23199 "should use L<guestfs(3)>. To get a structured shell that you can use to "
23200 "make scripted changes to guests, use L<guestfish(1)>."
23204 #: ../rescue/virt-rescue.pod:131
23205 msgid "B<--append kernelopts>"
23209 #: ../rescue/virt-rescue.pod:133
23210 msgid "Pass additional options to the rescue kernel."
23214 #: ../rescue/virt-rescue.pod:163
23217 " virt-rescue --format=raw -a disk.img\n"
23222 #: ../rescue/virt-rescue.pod:167
23225 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
23230 #: ../rescue/virt-rescue.pod:176
23235 #: ../rescue/virt-rescue.pod:178
23236 msgid "B<--memsize MB>"
23240 #: ../rescue/virt-rescue.pod:180
23242 "Change the amount of memory allocated to the rescue system. The default is "
23243 "set by libguestfs and is small but adequate for running system tools. The "
23244 "occasional program might need more memory. The parameter is specified in "
23249 #: ../rescue/virt-rescue.pod:185
23250 msgid "B<--network>"
23254 #: ../rescue/virt-rescue.pod:187
23255 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
23259 #: ../rescue/virt-rescue.pod:193
23260 msgid "Open the image read-only."
23264 #: ../rescue/virt-rescue.pod:203
23266 "Enable SELinux in the rescue appliance. You should read "
23267 "L<guestfs(3)/SELINUX> before using this option."
23271 #: ../rescue/virt-rescue.pod:206
23276 #: ../rescue/virt-rescue.pod:208
23277 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
23281 #: ../rescue/virt-rescue.pod:210
23282 msgid "B<--suggest>"
23286 #: ../rescue/virt-rescue.pod:212
23288 "Inspect the disk image and suggest what mount commands should be used to "
23289 "mount the disks. You should use the I<--suggest> option in a second "
23290 "terminal, then paste the commands into another virt-rescue."
23294 #: ../rescue/virt-rescue.pod:216
23296 "This option implies I<--ro> and is safe to use even if the guest is up or if "
23297 "another virt-rescue is running."
23301 #: ../rescue/virt-rescue.pod:235
23303 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
23304 "are done read-write."
23308 #: ../rescue/virt-rescue.pod:248
23309 msgid "Previous versions of virt-rescue allowed you to write either:"
23313 #: ../rescue/virt-rescue.pod:250
23316 " virt-rescue disk.img [disk.img ...]\n"
23321 #: ../rescue/virt-rescue.pod:254
23324 " virt-rescue guestname\n"
23329 #: ../rescue/virt-rescue.pod:262
23334 #: ../rescue/virt-rescue.pod:264
23336 "Adding the I<--network> option enables QEMU user networking in the rescue "
23337 "appliance. There are some differences between user networking and ordinary "
23342 #: ../rescue/virt-rescue.pod:270
23343 msgid "ping does not work"
23347 #: ../rescue/virt-rescue.pod:272
23349 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
23350 "send the ping packets, and because virt-rescue must be able to run as "
23351 "non-root, QEMU user networking is not able to emulate the L<ping(8)> "
23352 "command. The ping command will appear to resolve addresses but will not be "
23353 "able to send or receive any packets. This does not mean that the network is "
23358 #: ../rescue/virt-rescue.pod:279
23359 msgid "cannot receive connections"
23363 #: ../rescue/virt-rescue.pod:281
23364 msgid "QEMU user networking cannot receive incoming connections."
23368 #: ../rescue/virt-rescue.pod:283
23369 msgid "making TCP connections"
23373 #: ../rescue/virt-rescue.pod:285
23375 "The virt-rescue appliance needs to be small and so does not include many "
23376 "network tools. In particular there is no L<telnet(1)> command. You can "
23377 "make TCP connections from the shell using the magical "
23378 "C</dev/tcp/E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
23382 #: ../rescue/virt-rescue.pod:290
23385 " exec 3<>/dev/tcp/redhat.com/80\n"
23386 " echo \"GET /\" >&3\n"
23392 #: ../rescue/virt-rescue.pod:294
23393 msgid "See L<bash(1)> for more details."
23397 #: ../rescue/virt-rescue.pod:300
23399 "Several environment variables affect virt-rescue. See "
23400 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
23404 #: ../rescue/virt-rescue.pod:327
23406 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
23407 "L<virt-filesystems(1)>, L<http://libguestfs.org/>."
23411 #: ../resize/virt-resize.pod:5
23412 msgid "virt-resize - Resize a virtual machine disk"
23416 #: ../resize/virt-resize.pod:9
23419 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
23420 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
23421 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
23426 #: ../resize/virt-resize.pod:15
23428 "Virt-resize is a tool which can resize a virtual machine disk, making it "
23429 "larger or smaller overall, and resizing or deleting any partitions contained "
23434 #: ../resize/virt-resize.pod:19
23436 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
23437 "not> be used on live virtual machines - for consistent results, shut the "
23438 "virtual machine down before resizing it."
23442 #: ../resize/virt-resize.pod:23
23444 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
23445 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
23449 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:597 ../sparsify/virt-sparsify.pod:221 ../src/guestfs.pod:484 ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
23454 #: ../resize/virt-resize.pod:33
23456 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
23457 "fill the extra 5GB of space."
23461 #: ../resize/virt-resize.pod:36
23464 " virt-filesystems --long -h --all -a olddisk\n"
23469 #: ../resize/virt-resize.pod:38
23472 " truncate -r olddisk newdisk\n"
23473 " truncate -s +5G newdisk\n"
23478 #: ../resize/virt-resize.pod:41
23481 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
23482 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
23487 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:604 ../sparsify/virt-sparsify.pod:228 ../src/guestfs.pod:490 ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
23492 #: ../resize/virt-resize.pod:46
23494 "As above, but make the /boot partition 200MB bigger, while giving the "
23495 "remaining space to /dev/sda2:"
23499 #: ../resize/virt-resize.pod:49
23502 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23503 " olddisk newdisk\n"
23508 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:234 ../src/guestfs.pod:501 ../src/guestfs.pod:1451
23513 #: ../resize/virt-resize.pod:54
23515 "As in the first example, but expand a logical volume as the final step. "
23516 "This is what you would typically use for Linux guests that use LVM:"
23520 #: ../resize/virt-resize.pod:58
23523 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
23524 " olddisk newdisk\n"
23529 #: ../resize/virt-resize.pod:61
23534 #: ../resize/virt-resize.pod:63
23536 "As in the first example, but the output format will be qcow2 instead of a "
23541 #: ../resize/virt-resize.pod:66
23544 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
23545 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
23550 #: ../resize/virt-resize.pod:71
23551 msgid "DETAILED USAGE"
23555 #: ../resize/virt-resize.pod:73
23556 msgid "EXPANDING A VIRTUAL MACHINE DISK"
23560 #: ../resize/virt-resize.pod:77
23561 msgid "1. Shut down the virtual machine"
23565 #: ../resize/virt-resize.pod:79
23566 msgid "2. Locate input disk image"
23570 #: ../resize/virt-resize.pod:81
23572 "Locate the input disk image (ie. the file or device on the host containing "
23573 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
23574 "dumpxml> like this to find the disk image name:"
23578 #: ../resize/virt-resize.pod:85
23581 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
23582 " Found 1 nodes:\n"
23584 " <source dev=\"/dev/vg/lv_guest\" />\n"
23589 #: ../resize/virt-resize.pod:90
23590 msgid "3. Look at current sizing"
23594 #: ../resize/virt-resize.pod:92
23595 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
23599 #: ../resize/virt-resize.pod:95
23602 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
23603 " Name Type Size Parent\n"
23604 " /dev/sda1 partition 101M /dev/sda\n"
23605 " /dev/sda2 partition 7.9G /dev/sda\n"
23606 " /dev/sda device 8.0G -\n"
23611 #: ../resize/virt-resize.pod:101
23613 "(This example is a virtual machine with an 8 GB disk which we would like to "
23614 "expand up to 10 GB)."
23618 #: ../resize/virt-resize.pod:104
23619 msgid "4. Create output disk"
23623 #: ../resize/virt-resize.pod:106
23625 "Virt-resize cannot do in-place disk modifications. You have to have space "
23626 "to store the resized output disk."
23630 #: ../resize/virt-resize.pod:109
23631 msgid "To store the resized disk image in a file, create a file of a suitable size:"
23635 #: ../resize/virt-resize.pod:112
23638 " # rm -f outdisk\n"
23639 " # truncate -s 10G outdisk\n"
23644 #: ../resize/virt-resize.pod:115
23645 msgid "Or use L<lvcreate(1)> to create a logical volume:"
23649 #: ../resize/virt-resize.pod:117
23652 " # lvcreate -L 10G -n lv_name vg_name\n"
23657 #: ../resize/virt-resize.pod:119
23658 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
23662 #: ../resize/virt-resize.pod:121
23665 " # virsh pool-list\n"
23666 " # virsh vol-create-as poolname newvol 10G\n"
23671 #: ../resize/virt-resize.pod:124
23676 #: ../resize/virt-resize.pod:126
23678 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
23679 "file) and the output disk. The output disk is the one created in the "
23684 #: ../resize/virt-resize.pod:130
23687 " # virt-resize indisk outdisk\n"
23692 #: ../resize/virt-resize.pod:132
23694 "This command just copies disk image C<indisk> to disk image C<outdisk> "
23695 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
23696 "larger, then an extra, empty partition is created at the end of the disk "
23697 "covering the extra space. If C<outdisk> is smaller, then it will give an "
23702 #: ../resize/virt-resize.pod:138
23704 "More realistically you'd want to expand existing partitions in the disk "
23705 "image by passing extra options (for the full list see the L</OPTIONS> "
23710 #: ../resize/virt-resize.pod:142
23712 "L</--expand> is the most useful option. It expands the named partition "
23713 "within the disk to fill any extra space:"
23717 #: ../resize/virt-resize.pod:145
23720 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
23725 #: ../resize/virt-resize.pod:147
23727 "(In this case, an extra partition is I<not> created at the end of the disk, "
23728 "because there will be no unused space)."
23732 #: ../resize/virt-resize.pod:150
23734 "L</--resize> is the other commonly used option. The following would "
23735 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
23736 "rest of the available space:"
23740 #: ../resize/virt-resize.pod:154
23743 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
23744 " indisk outdisk\n"
23749 #: ../resize/virt-resize.pod:157
23751 "If the expanded partition in the image contains a filesystem or LVM PV, then "
23752 "if virt-resize knows how, it will resize the contents, the equivalent of "
23753 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
23754 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
23755 "filesystems, so you would have to online resize them after booting the "
23760 #: ../resize/virt-resize.pod:164
23761 msgid "Other options are covered below."
23765 #: ../resize/virt-resize.pod:166
23770 #: ../resize/virt-resize.pod:168
23771 msgid "Thoroughly test the new disk image I<before> discarding the old one."
23775 #: ../resize/virt-resize.pod:170
23776 msgid "If you are using libvirt, edit the XML to point at the new disk:"
23780 #: ../resize/virt-resize.pod:172
23783 " # virsh edit guestname\n"
23788 #: ../resize/virt-resize.pod:174
23790 "Change E<lt>source ...E<gt>, see "
23791 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
23795 #: ../resize/virt-resize.pod:177
23796 msgid "Then start up the domain with the new, resized disk:"
23800 #: ../resize/virt-resize.pod:179
23803 " # virsh start guestname\n"
23808 #: ../resize/virt-resize.pod:181
23810 "and check that it still works. See also the L</NOTES> section below for "
23811 "additional information."
23815 #: ../resize/virt-resize.pod:184
23816 msgid "7. Resize LVs etc inside the guest"
23820 #: ../resize/virt-resize.pod:186
23821 msgid "(This can also be done offline using L<guestfish(1)>)"
23825 #: ../resize/virt-resize.pod:188
23827 "Once the guest has booted you should see the new space available, at least "
23828 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23829 "may need to resize LVs inside PVs, and also resize filesystem types that "
23830 "virt-resize does not know how to expand."
23834 #: ../resize/virt-resize.pod:195
23835 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23839 #: ../resize/virt-resize.pod:197
23841 "Shrinking is somewhat more complex than expanding, and only an overview is "
23846 #: ../resize/virt-resize.pod:200
23848 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23849 "filesystems). The user has to shrink content before passing the disk image "
23850 "to virt-resize, and virt-resize will check that the content has been shrunk "
23855 #: ../resize/virt-resize.pod:205
23856 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23860 #: ../resize/virt-resize.pod:207
23862 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23863 "steps 3 and 4 above to allocate a new disk image."
23867 #: ../resize/virt-resize.pod:210
23868 msgid "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23872 #: ../resize/virt-resize.pod:213
23873 msgid "IGNORING OR DELETING PARTITIONS"
23877 #: ../resize/virt-resize.pod:215
23879 "virt-resize also gives a convenient way to ignore or delete partitions when "
23880 "copying from the input disk to the output disk. Ignoring a partition speeds "
23881 "up the copy where you don't care about the existing contents of a "
23882 "partition. Deleting a partition removes it completely, but note that it "
23883 "also renumbers any partitions after the one which is deleted, which can "
23884 "leave some guests unbootable."
23888 #: ../resize/virt-resize.pod:222
23889 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23893 #: ../resize/virt-resize.pod:224
23895 "If the input disk is in qcow2 format, then you may prefer that the output is "
23896 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23897 "the fly. The output format is simply determined by the format of the empty "
23898 "output container that you provide. Thus to create qcow2 output, use:"
23902 #: ../resize/virt-resize.pod:230
23905 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23910 #: ../resize/virt-resize.pod:232
23911 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23915 #: ../resize/virt-resize.pod:234
23916 msgid "Similarly, to get non-sparse raw output use:"
23920 #: ../resize/virt-resize.pod:236
23923 " fallocate -l size outdisk\n"
23928 #: ../resize/virt-resize.pod:238
23930 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
23931 "if=/dev/zero of=outdisk bs=1M count=..>)"
23935 #: ../resize/virt-resize.pod:241
23936 msgid "LOGICAL PARTITIONS"
23940 #: ../resize/virt-resize.pod:243
23942 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
23943 "tables) cannot be resized."
23947 #: ../resize/virt-resize.pod:246
23949 "To understand what is going on, firstly one of the four partitions "
23950 "C</dev/sda1-4> will have MBR partition type C<05> or C<0f>. This is called "
23951 "the B<extended partition>. Use L<virt-filesystems(1)> to see the MBR "
23956 #: ../resize/virt-resize.pod:251
23957 msgid "Logical partitions live inside the extended partition."
23961 #: ../resize/virt-resize.pod:253
23963 "The extended partition can be expanded, but not shrunk (unless you force it, "
23964 "which is not advisable). When the extended partition is copied across, all "
23965 "the logical partitions contained inside are copied over implicitly. "
23966 "Virt-resize does not look inside the extended partition, so it copies the "
23967 "logical partitions blindly."
23971 #: ../resize/virt-resize.pod:259
23973 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
23974 "line. Doing so will give an error."
23978 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
23979 msgid "Display help."
23983 #: ../resize/virt-resize.pod:270
23984 msgid "B<--align-first auto>"
23988 #: ../resize/virt-resize.pod:272
23989 msgid "B<--align-first never>"
23993 #: ../resize/virt-resize.pod:274
23994 msgid "B<--align-first always>"
23998 #: ../resize/virt-resize.pod:276
24000 "Align the first partition for improved performance (see also the "
24001 "I<--alignment> option)."
24005 #: ../resize/virt-resize.pod:279
24007 "The default is I<--align-first auto> which only aligns the first partition "
24008 "if it is safe to do so. That is, only when we know how to fix the "
24009 "bootloader automatically, and at the moment that can only be done for "
24014 #: ../resize/virt-resize.pod:284
24016 "I<--align-first never> means we never move the first partition. This is the "
24017 "safest option. Try this if the guest does not boot after resizing."
24021 #: ../resize/virt-resize.pod:288
24023 "I<--align-first always> means we always align the first partition (if it "
24024 "needs to be aligned). For some guests this will break the bootloader, "
24025 "making the guest unbootable."
24029 #: ../resize/virt-resize.pod:292
24030 msgid "B<--alignment N>"
24034 #: ../resize/virt-resize.pod:294
24036 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
24037 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
24041 #: ../resize/virt-resize.pod:298
24043 "Assuming 512 byte sector size inside the guest, here are some suitable "
24048 #: ../resize/virt-resize.pod:303
24049 msgid "I<--alignment 1> (512 bytes)"
24053 #: ../resize/virt-resize.pod:305
24055 "The partitions would be packed together as closely as possible, but would be "
24056 "completely unaligned. In some cases this can cause very poor performance. "
24057 "See L<virt-alignment-scan(1)> for further details."
24061 #: ../resize/virt-resize.pod:309
24062 msgid "I<--alignment 8> (4K)"
24066 #: ../resize/virt-resize.pod:311
24068 "This would be the minimum acceptable alignment for reasonable performance on "
24073 #: ../resize/virt-resize.pod:314
24074 msgid "I<--alignment 128> (64K)"
24078 #: ../resize/virt-resize.pod:316
24080 "This alignment provides good performance when the host is using high end "
24085 #: ../resize/virt-resize.pod:319
24086 msgid "I<--alignment 2048> (1M)"
24090 #: ../resize/virt-resize.pod:321
24092 "This is the standard alignment used by all newly installed guests since "
24097 #: ../resize/virt-resize.pod:326
24102 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:120
24107 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
24108 msgid "Enable debugging messages."
24112 #: ../resize/virt-resize.pod:332
24113 msgid "B<--delete part>"
24117 #: ../resize/virt-resize.pod:334
24119 "Delete the named partition. It would be more accurate to describe this as "
24120 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
24121 "the original disk image is left intact."
24125 #: ../resize/virt-resize.pod:338
24127 "Note that when you delete a partition, then anything contained in the "
24128 "partition is also deleted. Furthermore, this causes any partitions that "
24129 "come after to be I<renumbered>, which can easily make your guest unbootable."
24133 #: ../resize/virt-resize.pod:343 ../resize/virt-resize.pod:404 ../resize/virt-resize.pod:531 ../sparsify/virt-sparsify.pod:151
24134 msgid "You can give this option multiple times."
24138 #: ../resize/virt-resize.pod:345
24139 msgid "B<--expand part>"
24143 #: ../resize/virt-resize.pod:347
24145 "Expand the named partition so it uses up all extra space (space left over "
24146 "after any other resize changes that you request have been done)."
24150 #: ../resize/virt-resize.pod:350
24152 "If virt-resize knows how, it will expand the direct content of the "
24153 "partition. For example, if the partition is an LVM PV, it will expand the "
24154 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
24155 "content it doesn't know about alone."
24159 #: ../resize/virt-resize.pod:355
24160 msgid "Currently virt-resize can resize:"
24164 #: ../resize/virt-resize.pod:361
24165 msgid "ext2, ext3 and ext4 filesystems."
24169 #: ../resize/virt-resize.pod:365
24170 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
24174 #: ../resize/virt-resize.pod:367
24176 "The filesystem must have been shut down consistently last time it was used. "
24177 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
24178 "consistency check, so at the first boot after resizing Windows will check "
24183 #: ../resize/virt-resize.pod:374
24185 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
24186 "inside the PV, but see the I<--LV-expand> option. The user could also "
24187 "resize LVs as desired after boot."
24191 #: ../resize/virt-resize.pod:380
24192 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
24196 #: ../resize/virt-resize.pod:384 ../resize/virt-resize.pod:559
24197 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
24201 #: ../resize/virt-resize.pod:386 ../sparsify/virt-sparsify.pod:131 ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
24202 msgid "B<--format> raw"
24206 #: ../resize/virt-resize.pod:388 ../sparsify/virt-sparsify.pod:135
24208 "Specify the format of the input disk image. If this flag is not given then "
24209 "it is auto-detected from the image itself."
24213 #: ../resize/virt-resize.pod:394
24215 "Note that this option I<does not> affect the output format. See L</QCOW2 "
24216 "AND NON-SPARSE RAW FORMATS>."
24220 #: ../resize/virt-resize.pod:397
24221 msgid "B<--ignore part>"
24225 #: ../resize/virt-resize.pod:399
24227 "Ignore the named partition. Effectively this means the partition is "
24228 "allocated on the destination disk, but the content is not copied across from "
24229 "the source disk. The content of the partition will be blank (all zero "
24234 #: ../resize/virt-resize.pod:406
24235 msgid "B<--LV-expand logvol>"
24239 #: ../resize/virt-resize.pod:408
24241 "This takes the logical volume and, as a final step, expands it to fill all "
24242 "the space available in its volume group. A typical usage, assuming a Linux "
24243 "guest with a single PV C</dev/sda2> and a root device called "
24244 "C</dev/vg_guest/lv_root> would be:"
24248 #: ../resize/virt-resize.pod:413
24251 " virt-resize indisk outdisk \\\n"
24252 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
24257 #: ../resize/virt-resize.pod:416
24259 "This would first expand the partition (and PV), and then expand the root "
24260 "device to fill the extra space in the PV."
24264 #: ../resize/virt-resize.pod:419
24266 "The contents of the LV are also resized if virt-resize knows how to do "
24267 "that. You can stop virt-resize from trying to expand the content by using "
24268 "the option I<--no-expand-content>."
24272 #: ../resize/virt-resize.pod:423
24273 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
24277 #: ../resize/virt-resize.pod:425
24279 "You can give this option multiple times, I<but> it doesn't make sense to do "
24280 "this unless the logical volumes you specify are all in different volume "
24285 #: ../resize/virt-resize.pod:429 ../sparsify/virt-sparsify.pod:153
24286 msgid "B<--machine-readable>"
24290 #: ../resize/virt-resize.pod:431 ../sparsify/virt-sparsify.pod:155
24292 "This option is used to make the output more machine friendly when being "
24293 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
24297 #: ../resize/virt-resize.pod:437
24298 msgid "B<--dryrun>"
24302 #: ../resize/virt-resize.pod:439
24303 msgid "Print a summary of what would be done, but don't do anything."
24307 #: ../resize/virt-resize.pod:441
24308 msgid "B<--no-copy-boot-loader>"
24312 #: ../resize/virt-resize.pod:443
24314 "By default, virt-resize copies over some sectors at the start of the disk "
24315 "(up to the beginning of the first partition). Commonly these sectors "
24316 "contain the Master Boot Record (MBR) and the boot loader, and are required "
24317 "in order for the guest to boot correctly."
24321 #: ../resize/virt-resize.pod:448
24323 "If you specify this flag, then this initial copy is not done. You may need "
24324 "to reinstall the boot loader in this case."
24328 #: ../resize/virt-resize.pod:451
24329 msgid "B<--no-extra-partition>"
24333 #: ../resize/virt-resize.pod:453
24335 "By default, virt-resize creates an extra partition if there is any extra, "
24336 "unused space after all resizing has happened. Use this option to prevent "
24337 "the extra partition from being created. If you do this then the extra space "
24338 "will be inaccessible until you run fdisk, parted, or some other partitioning "
24339 "tool in the guest."
24343 #: ../resize/virt-resize.pod:459
24345 "Note that if the surplus space is smaller than 10 MB, no extra partition "
24350 #: ../resize/virt-resize.pod:462
24351 msgid "B<--no-expand-content>"
24355 #: ../resize/virt-resize.pod:464
24357 "By default, virt-resize will try to expand the direct contents of "
24358 "partitions, if it knows how (see I<--expand> option above)."
24362 #: ../resize/virt-resize.pod:467
24364 "If you give the I<--no-expand-content> option then virt-resize will not "
24369 #: ../resize/virt-resize.pod:470
24370 msgid "B<--ntfsresize-force>"
24374 #: ../resize/virt-resize.pod:472
24376 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
24377 "the NTFS disk is marked as needing a consistency check. You have to use "
24378 "this option if you want to resize a Windows guest multiple times without "
24379 "booting into Windows between each resize."
24383 #: ../resize/virt-resize.pod:478
24384 msgid "B<--output-format> raw"
24388 #: ../resize/virt-resize.pod:480
24390 "Specify the format of the output disk image. If this flag is not given then "
24391 "it is auto-detected from the image itself."
24395 #: ../resize/virt-resize.pod:486
24397 "Note that this option I<does not create> the output format. This option "
24398 "just tells libguestfs what it is so it doesn't try to guess it. You still "
24399 "need to create the output disk with the right format. See L</QCOW2 AND "
24400 "NON-SPARSE RAW FORMATS>."
24404 #: ../resize/virt-resize.pod:495
24405 msgid "Don't print the summary."
24409 #: ../resize/virt-resize.pod:497
24410 msgid "B<--resize part=size>"
24414 #: ../resize/virt-resize.pod:499
24416 "Resize the named partition (expanding or shrinking it) so that it has the "
24421 #: ../resize/virt-resize.pod:502
24423 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
24424 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
24425 "size; or as a relative number or percentage. For example:"
24429 #: ../resize/virt-resize.pod:508
24432 " --resize /dev/sda2=10G\n"
24437 #: ../resize/virt-resize.pod:510
24440 " --resize /dev/sda4=90%\n"
24445 #: ../resize/virt-resize.pod:512
24448 " --resize /dev/sda2=+1G\n"
24453 #: ../resize/virt-resize.pod:514
24456 " --resize /dev/sda2=-200M\n"
24461 #: ../resize/virt-resize.pod:516
24464 " --resize /dev/sda1=+128K\n"
24469 #: ../resize/virt-resize.pod:518
24472 " --resize /dev/sda1=+10%\n"
24477 #: ../resize/virt-resize.pod:520
24480 " --resize /dev/sda1=-10%\n"
24485 #: ../resize/virt-resize.pod:522
24487 "You can increase the size of any partition. Virt-resize will expand the "
24488 "direct content of the partition if it knows how (see I<--expand> below)."
24492 #: ../resize/virt-resize.pod:526
24494 "You can only I<decrease> the size of partitions that contain filesystems or "
24495 "PVs which have already been shrunk. Virt-resize will check this has been "
24496 "done before proceeding, or else will print an error (see also "
24497 "I<--resize-force>)."
24501 #: ../resize/virt-resize.pod:533
24502 msgid "B<--resize-force part=size>"
24506 #: ../resize/virt-resize.pod:535
24508 "This is the same as I<--resize> except that it will let you decrease the "
24509 "size of any partition. Generally this means you will lose any data which "
24510 "was at the end of the partition you shrink, but you may not care about that "
24511 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24512 "as a swap partition)."
24516 #: ../resize/virt-resize.pod:541
24517 msgid "See also the I<--ignore> option."
24521 #: ../resize/virt-resize.pod:543
24522 msgid "B<--shrink part>"
24526 #: ../resize/virt-resize.pod:545
24528 "Shrink the named partition until the overall disk image fits in the "
24529 "destination. The named partition B<must> contain a filesystem or PV which "
24530 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24531 "online tools). Virt-resize will check this and give an error if it has not "
24536 #: ../resize/virt-resize.pod:551
24538 "The amount by which the overall disk must be shrunk (after carrying out all "
24539 "other operations requested by the user) is called the \"deficit\". For "
24540 "example, a straight copy (assume no other operations) from a 5GB disk image "
24541 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24542 "would give an error unless the user specified a partition to shrink and that "
24543 "partition had more than a gigabyte of free space."
24547 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:195
24548 msgid "MACHINE READABLE OUTPUT"
24552 #: ../resize/virt-resize.pod:571
24554 "The I<--machine-readable> option can be used to make the output more machine "
24555 "friendly, which is useful when calling virt-resize from other programs, GUIs "
24560 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:201
24561 msgid "There are two ways to use this option."
24565 #: ../resize/virt-resize.pod:577
24567 "Firstly use the option on its own to query the capabilities of the "
24568 "virt-resize binary. Typical output looks like this:"
24572 #: ../resize/virt-resize.pod:580
24575 " $ virt-resize --machine-readable\n"
24577 " ntfsresize-force\n"
24585 #: ../resize/virt-resize.pod:587 ../sparsify/virt-sparsify.pod:211
24587 "A list of features is printed, one per line, and the program exits with "
24592 #: ../resize/virt-resize.pod:590 ../sparsify/virt-sparsify.pod:214
24594 "Secondly use the option in conjunction with other options to make the "
24595 "regular program output more machine friendly."
24599 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:217
24600 msgid "At the moment this means:"
24604 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:223
24606 "Progress bar messages can be parsed from stdout by looking for this regular "
24611 #: ../resize/virt-resize.pod:602 ../sparsify/virt-sparsify.pod:226
24614 " ^[0-9]+/[0-9]+$\n"
24619 #: ../resize/virt-resize.pod:606 ../sparsify/virt-sparsify.pod:230
24621 "The calling program should treat messages sent to stdout (except for "
24622 "progress bar messages) as status messages. They can be logged and/or "
24623 "displayed to the user."
24627 #: ../resize/virt-resize.pod:612
24629 "The calling program should treat messages sent to stderr as error messages. "
24630 "In addition, virt-resize exits with a non-zero status code if there was a "
24635 #: ../resize/virt-resize.pod:618
24637 "Versions of the program prior to 1.13.9 did not support the "
24638 "I<--machine-readable> option and will return an error."
24642 #: ../resize/virt-resize.pod:623
24643 msgid "\"Partition 1 does not end on cylinder boundary.\""
24647 #: ../resize/virt-resize.pod:625
24649 "Virt-resize aligns partitions to multiples of 128 sectors (see the "
24650 "I<--alignment> parameter). Usually this means the partitions will not be "
24651 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
24652 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
24653 "drives. Alignment of partitions to cylinders is not required by any modern "
24654 "operating system."
24658 #: ../resize/virt-resize.pod:632
24659 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24663 #: ../resize/virt-resize.pod:634
24665 "In Windows Vista and later versions, Microsoft switched to using a separate "
24666 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24667 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
24668 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
24669 "the second partition (ie. C: drive) should work."
24673 #: ../resize/virt-resize.pod:641
24675 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24676 "NTFS partitions have been expanded. This is just a safety check and (unless "
24677 "it find errors) is nothing to worry about."
24681 #: ../resize/virt-resize.pod:645
24682 msgid "GUEST BOOT STUCK AT \"GRUB\""
24686 #: ../resize/virt-resize.pod:647
24688 "If a Linux guest does not boot after resizing, and the boot is stuck after "
24689 "printing C<GRUB> on the console, try reinstalling grub."
24693 #: ../resize/virt-resize.pod:650
24696 " guestfish -i -a newdisk\n"
24697 " ><fs> cat /boot/grub/device.map\n"
24698 " # check the contents of this file are sensible or\n"
24699 " # edit the file if necessary\n"
24700 " ><fs> grub-install / /dev/vda\n"
24706 #: ../resize/virt-resize.pod:657
24708 "For more flexible guest reconfiguration, including if you need to specify "
24709 "other parameters to grub-install, use L<virt-rescue(1)>."
24713 #: ../resize/virt-resize.pod:660
24714 msgid "ALTERNATIVE TOOLS"
24718 #: ../resize/virt-resize.pod:662
24720 "There are several proprietary tools for resizing partitions. We won't "
24721 "mention any here."
24725 #: ../resize/virt-resize.pod:665
24727 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24728 "operations on disk images. They can resize and move partitions, but I don't "
24729 "think they can do anything with the contents, and they certainly don't "
24734 #: ../resize/virt-resize.pod:670
24736 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24737 "but at a much lower level. You will probably end up hand-calculating sector "
24738 "offsets, which is something that virt-resize was designed to avoid. If you "
24739 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24744 #: ../resize/virt-resize.pod:690
24746 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
24747 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
24748 "L<ntfsresize(8)>, L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
24749 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
24750 "L<virt-sparsify(1)>, L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
24754 #: ../ruby/examples/guestfs-ruby.pod:5
24755 msgid "guestfs-ruby - How to use libguestfs from Ruby"
24759 #: ../ruby/examples/guestfs-ruby.pod:9
24762 " require 'guestfs'\n"
24763 " g = Guestfs::Guestfs.new()\n"
24764 " g.add_drive_opts(\"disk.img\",\n"
24765 " :readonly => 1, :format => \"raw\")\n"
24771 #: ../ruby/examples/guestfs-ruby.pod:17
24773 "This manual page documents how to call libguestfs from the Ruby programming "
24774 "language. This page just documents the differences from the C API and gives "
24775 "some examples. If you are not familiar with using libguestfs, you also need "
24776 "to read L<guestfs(3)>."
24780 #: ../ruby/examples/guestfs-ruby.pod:24
24782 "Errors from libguestfs functions are mapped into the C<Error> exception. "
24783 "This has a single parameter which is the error message (a string)."
24787 #: ../ruby/examples/guestfs-ruby.pod:38
24789 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, "
24790 "L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, "
24791 "L<guestfs-python(3)>, L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
24795 #: ../sparsify/virt-sparsify.pod:5
24796 msgid "virt-sparsify - Make a virtual machine disk sparse"
24800 #: ../sparsify/virt-sparsify.pod:9
24803 " virt-sparsify [--options] indisk outdisk\n"
24808 #: ../sparsify/virt-sparsify.pod:13
24810 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
24811 "image) sparse a.k.a. thin-provisioned. This means that free space within "
24812 "the disk image can be converted back to free space on the host."
24816 #: ../sparsify/virt-sparsify.pod:18
24818 "Virt-sparsify can locate and sparsify free space in most filesystems "
24819 "(eg. ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
24823 #: ../sparsify/virt-sparsify.pod:21
24825 "Virt-sparsify can also convert between some disk formats, for example "
24826 "converting a raw disk image to a thin-provisioned qcow2 image."
24830 #: ../sparsify/virt-sparsify.pod:24
24832 "Virt-sparsify can operate on any disk image, not just ones from virtual "
24833 "machines. If a virtual machine has more than one attached disk, you must "
24834 "sparsify each one separately."
24838 #: ../sparsify/virt-sparsify.pod:28
24839 msgid "IMPORTANT LIMITATIONS"
24843 #: ../sparsify/virt-sparsify.pod:34
24845 "Virt-sparsify does not do in-place modifications. It copies from a source "
24846 "image to a destination image, leaving the source unchanged. I<Check that "
24847 "the sparsification was successful before deleting the source image>."
24851 #: ../sparsify/virt-sparsify.pod:41
24852 msgid "The virtual machine I<must be shut down> before using this tool."
24856 #: ../sparsify/virt-sparsify.pod:45
24858 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24859 "(1 temporary copy + 1 destination image). This is in the worst case and "
24860 "usually much less space is required."
24864 #: ../sparsify/virt-sparsify.pod:51
24865 msgid "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24869 #: ../sparsify/virt-sparsify.pod:56
24870 msgid "Virt-sparsify cannot handle encrypted disks."
24874 #: ../sparsify/virt-sparsify.pod:60
24876 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24877 "this space is often used for critical items like bootloaders so it's not "
24882 #: ../sparsify/virt-sparsify.pod:66
24884 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24885 "to do this unless we can be sure there is no hibernation data, so at the "
24886 "moment swap partitions are ignored."
24890 #: ../sparsify/virt-sparsify.pod:72
24892 "You may also want to read the manual pages for the associated tools "
24893 "L<virt-filesystems(1)> and L<virt-df(1)> before starting."
24897 #: ../sparsify/virt-sparsify.pod:77
24898 msgid "Typical usage is:"
24902 #: ../sparsify/virt-sparsify.pod:79
24905 " virt-sparsify indisk outdisk\n"
24910 #: ../sparsify/virt-sparsify.pod:81
24912 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24913 "is created, or overwritten if it already exists. The format of the input "
24914 "disk is detected (eg. qcow2) and the same format is used for the output "
24919 #: ../sparsify/virt-sparsify.pod:86
24920 msgid "To convert between formats, use the I<--convert> option:"
24924 #: ../sparsify/virt-sparsify.pod:88
24927 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24932 #: ../sparsify/virt-sparsify.pod:90
24934 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24935 "can find within the source disk image. You can get it to ignore (don't zero "
24936 "free space on) certain filesystems by doing:"
24940 #: ../sparsify/virt-sparsify.pod:94
24943 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24948 #: ../sparsify/virt-sparsify.pod:96
24949 msgid "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24953 #: ../sparsify/virt-sparsify.pod:107
24954 msgid "B<--compress>"
24958 #: ../sparsify/virt-sparsify.pod:109
24960 "Compress the output file. This I<only> works if the output format is "
24965 #: ../sparsify/virt-sparsify.pod:112
24966 msgid "B<--convert> raw"
24970 #: ../sparsify/virt-sparsify.pod:114
24971 msgid "B<--convert> qcow2"
24975 #: ../sparsify/virt-sparsify.pod:116
24976 msgid "B<--convert> [other formats]"
24980 #: ../sparsify/virt-sparsify.pod:118
24982 "Use C<output-format> as the format for the destination image. If this is "
24983 "not specified, then the input format is used."
24987 #: ../sparsify/virt-sparsify.pod:121
24988 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>, C<vdi>."
24992 #: ../sparsify/virt-sparsify.pod:123
24994 "You can also use any format supported by the L<qemu-img(1)> program, "
24995 "eg. C<vmdk>, but support for other formats is reliant on qemu."
24999 #: ../sparsify/virt-sparsify.pod:126
25001 "Specifying the I<--convert> option is usually a good idea, because then "
25002 "virt-sparsify doesn't need to try to guess the input format."
25006 #: ../sparsify/virt-sparsify.pod:129
25007 msgid "For fine-tuning the output format, see: I<--compress>, I<-o>."
25011 #: ../sparsify/virt-sparsify.pod:133
25012 msgid "B<--format> qcow2"
25016 #: ../sparsify/virt-sparsify.pod:141
25017 msgid "B<--ignore> filesystem"
25021 #: ../sparsify/virt-sparsify.pod:143
25022 msgid "B<--ignore> volgroup"
25026 #: ../sparsify/virt-sparsify.pod:145
25028 "Ignore the named filesystem. Free space on the filesystem will not be "
25029 "zeroed, but existing blocks of zeroes will still be sparsified."
25033 #: ../sparsify/virt-sparsify.pod:148
25035 "In the second form, this ignores the named volume group. Use the volume "
25036 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
25040 #: ../sparsify/virt-sparsify.pod:159
25041 msgid "B<-o> option[,option,...]"
25045 #: ../sparsify/virt-sparsify.pod:161
25047 "Pass I<-o> option(s) to the L<qemu-img(1)> command to fine-tune the output "
25048 "format. Options available depend on the output format (see I<--convert>) "
25049 "and the installed version of the qemu-img program."
25053 #: ../sparsify/virt-sparsify.pod:165
25055 "You should use I<-o> at most once. To pass multiple options, separate them "
25060 #: ../sparsify/virt-sparsify.pod:168
25063 " virt-sparsify --convert qcow2 \\\n"
25064 " -o cluster_size=512,preallocation=metadata ...\n"
25069 #: ../sparsify/virt-sparsify.pod:175
25070 msgid "This disables progress bars and other unnecessary output."
25074 #: ../sparsify/virt-sparsify.pod:197
25076 "The I<--machine-readable> option can be used to make the output more machine "
25077 "friendly, which is useful when calling virt-sparsify from other programs, "
25082 #: ../sparsify/virt-sparsify.pod:203
25084 "Firstly use the option on its own to query the capabilities of the "
25085 "virt-sparsify binary. Typical output looks like this:"
25089 #: ../sparsify/virt-sparsify.pod:206
25092 " $ virt-sparsify --machine-readable\n"
25100 #: ../sparsify/virt-sparsify.pod:236
25102 "The calling program should treat messages sent to stderr as error messages. "
25103 "In addition, virt-sparsify exits with a non-zero status code if there was a "
25108 #: ../sparsify/virt-sparsify.pod:242
25110 "All versions of virt-sparsify have supported the I<--machine-readable> "
25115 #: ../sparsify/virt-sparsify.pod:256
25117 "Location of the temporary directory used for the potentially large temporary "
25122 #: ../sparsify/virt-sparsify.pod:259
25124 "You should ensure there is enough free space in the worst case for a full "
25125 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
25126 "to another directory that has enough space."
25130 #: ../sparsify/virt-sparsify.pod:263
25131 msgid "This defaults to C</tmp>."
25135 #: ../sparsify/virt-sparsify.pod:267
25136 msgid "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
25140 #: ../sparsify/virt-sparsify.pod:271
25142 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
25143 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, "
25144 "L<qemu-img(1)>, L<http://libguestfs.org/>."
25148 #: ../src/guestfs-actions.pod:1
25149 msgid "guestfs_add_cdrom"
25153 #: ../src/guestfs-actions.pod:3
25157 " guestfs_add_cdrom (guestfs_h *g,\n"
25158 " const char *filename);\n"
25163 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:323
25165 "I<This function is deprecated.> In new code, use the "
25166 "L</guestfs_add_drive_opts> call instead."
25170 #: ../src/guestfs-actions.pod:24
25172 "This call checks for the existence of C<filename>. This stops you from "
25173 "specifying other types of drive which are supported by qemu such as C<nbd:> "
25174 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
25179 #: ../src/guestfs-actions.pod:31
25181 "If you just want to add an ISO file (often you use this as an efficient way "
25182 "to transfer large files into the guest), then you should probably use "
25183 "C<guestfs_add_drive_ro> instead."
25187 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:187 ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:291 ../src/guestfs-actions.pod:312 ../src/guestfs-actions.pod:333 ../src/guestfs-actions.pod:346 ../src/guestfs-actions.pod:360 ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:500 ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:559 ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:705 ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:734 ../src/guestfs-actions.pod:833 ../src/guestfs-actions.pod:851 ../src/guestfs-actions.pod:865 ../src/guestfs-actions.pod:879 ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:1099 ../src/guestfs-actions.pod:1119 ../src/guestfs-actions.pod:1137 ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:1286 ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:1372 ../src/guestfs-actions.pod:1425 ../src/guestfs-actions.pod:1478 ../src/guestfs-actions.pod:1536 ../src/guestfs-actions.pod:1590 ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1623 ../src/guestfs-actions.pod:1651 ../src/guestfs-actions.pod:1721 ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:1777 ../src/guestfs-actions.pod:1819 ../src/guestfs-actions.pod:1932 ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2174 ../src/guestfs-actions.pod:2196 ../src/guestfs-actions.pod:2283 ../src/guestfs-actions.pod:2791 ../src/guestfs-actions.pod:2935 ../src/guestfs-actions.pod:2996 ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:4092 ../src/guestfs-actions.pod:4107 ../src/guestfs-actions.pod:4132 ../src/guestfs-actions.pod:4334 ../src/guestfs-actions.pod:4348 ../src/guestfs-actions.pod:4361 ../src/guestfs-actions.pod:4375 ../src/guestfs-actions.pod:4390 ../src/guestfs-actions.pod:4426 ../src/guestfs-actions.pod:4498 ../src/guestfs-actions.pod:4518 ../src/guestfs-actions.pod:4535 ../src/guestfs-actions.pod:4555 ../src/guestfs-actions.pod:4575 ../src/guestfs-actions.pod:4610 ../src/guestfs-actions.pod:4629 ../src/guestfs-actions.pod:4648 ../src/guestfs-actions.pod:4683 ../src/guestfs-actions.pod:4695 ../src/guestfs-actions.pod:4728 ../src/guestfs-actions.pod:4744 ../src/guestfs-actions.pod:4757 ../src/guestfs-actions.pod:4772 ../src/guestfs-actions.pod:4789 ../src/guestfs-actions.pod:4947 ../src/guestfs-actions.pod:5021 ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5051 ../src/guestfs-actions.pod:5064 ../src/guestfs-actions.pod:5115 ../src/guestfs-actions.pod:5133 ../src/guestfs-actions.pod:5151 ../src/guestfs-actions.pod:5167 ../src/guestfs-actions.pod:5181 ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:5212 ../src/guestfs-actions.pod:5227 ../src/guestfs-actions.pod:5254 ../src/guestfs-actions.pod:5317 ../src/guestfs-actions.pod:5390 ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5440 ../src/guestfs-actions.pod:5459 ../src/guestfs-actions.pod:5471 ../src/guestfs-actions.pod:5488 ../src/guestfs-actions.pod:5501 ../src/guestfs-actions.pod:5516 ../src/guestfs-actions.pod:5531 ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:5589 ../src/guestfs-actions.pod:5628 ../src/guestfs-actions.pod:5648 ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5679 ../src/guestfs-actions.pod:5728 ../src/guestfs-actions.pod:5781 ../src/guestfs-actions.pod:5828 ../src/guestfs-actions.pod:5871 ../src/guestfs-actions.pod:5899 ../src/guestfs-actions.pod:5916 ../src/guestfs-actions.pod:5934 ../src/guestfs-actions.pod:6071 ../src/guestfs-actions.pod:6128 ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6168 ../src/guestfs-actions.pod:6220 ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:6303 ../src/guestfs-actions.pod:6316 ../src/guestfs-actions.pod:6330 ../src/guestfs-actions.pod:6619 ../src/guestfs-actions.pod:6638 ../src/guestfs-actions.pod:6657 ../src/guestfs-actions.pod:6671 ../src/guestfs-actions.pod:6683 ../src/guestfs-actions.pod:6697 ../src/guestfs-actions.pod:6709 ../src/guestfs-actions.pod:6723 ../src/guestfs-actions.pod:6739 ../src/guestfs-actions.pod:6757 ../src/guestfs-actions.pod:6776 ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:6825 ../src/guestfs-actions.pod:6843 ../src/guestfs-actions.pod:6866 ../src/guestfs-actions.pod:6884 ../src/guestfs-actions.pod:6903 ../src/guestfs-actions.pod:6924 ../src/guestfs-actions.pod:6943 ../src/guestfs-actions.pod:6960 ../src/guestfs-actions.pod:6979 ../src/guestfs-actions.pod:7007 ../src/guestfs-actions.pod:7031 ../src/guestfs-actions.pod:7050 ../src/guestfs-actions.pod:7066 ../src/guestfs-actions.pod:7090 ../src/guestfs-actions.pod:7109 ../src/guestfs-actions.pod:7124 ../src/guestfs-actions.pod:7143 ../src/guestfs-actions.pod:7187 ../src/guestfs-actions.pod:7214 ../src/guestfs-actions.pod:7244 ../src/guestfs-actions.pod:7356 ../src/guestfs-actions.pod:7477 ../src/guestfs-actions.pod:7489 ../src/guestfs-actions.pod:7502 ../src/guestfs-actions.pod:7515 ../src/guestfs-actions.pod:7537 ../src/guestfs-actions.pod:7550 ../src/guestfs-actions.pod:7563 ../src/guestfs-actions.pod:7576 ../src/guestfs-actions.pod:7591 ../src/guestfs-actions.pod:7650 ../src/guestfs-actions.pod:7667 ../src/guestfs-actions.pod:7683 ../src/guestfs-actions.pod:7699 ../src/guestfs-actions.pod:7716 ../src/guestfs-actions.pod:7729 ../src/guestfs-actions.pod:7749 ../src/guestfs-actions.pod:7849 ../src/guestfs-actions.pod:7907 ../src/guestfs-actions.pod:7921 ../src/guestfs-actions.pod:7962 ../src/guestfs-actions.pod:7975 ../src/guestfs-actions.pod:7993 ../src/guestfs-actions.pod:8027 ../src/guestfs-actions.pod:8063 ../src/guestfs-actions.pod:8179 ../src/guestfs-actions.pod:8194 ../src/guestfs-actions.pod:8208 ../src/guestfs-actions.pod:8263 ../src/guestfs-actions.pod:8276 ../src/guestfs-actions.pod:8321 ../src/guestfs-actions.pod:8361 ../src/guestfs-actions.pod:8417 ../src/guestfs-actions.pod:8437 ../src/guestfs-actions.pod:8470 ../src/guestfs-actions.pod:8534 ../src/guestfs-actions.pod:8557 ../src/guestfs-actions.pod:8583
25188 msgid "This function returns 0 on success or -1 on error."
25192 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189 ../src/guestfs-actions.pod:1334 ../src/guestfs-actions.pod:2397 ../src/guestfs-actions.pod:2495 ../src/guestfs-actions.pod:2620 ../src/guestfs-actions.pod:4094 ../src/guestfs-actions.pod:4114 ../src/guestfs-actions.pod:5565 ../src/guestfs-actions.pod:6845 ../src/guestfs-actions.pod:6962 ../src/guestfs-actions.pod:7111 ../src/guestfs-actions.pod:7593 ../src/guestfs-actions.pod:7718 ../src/guestfs-actions.pod:8363
25193 msgid "(Added in 0.3)"
25197 #: ../src/guestfs-actions.pod:41
25198 msgid "guestfs_add_domain"
25202 #: ../src/guestfs-actions.pod:43
25206 " guestfs_add_domain (guestfs_h *g,\n"
25207 " const char *dom,\n"
25213 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198 ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:1214 ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1344 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1466 ../src/guestfs-actions.pod:1519 ../src/guestfs-actions.pod:3288 ../src/guestfs-actions.pod:4882 ../src/guestfs-actions.pod:5266 ../src/guestfs-actions.pod:5575 ../src/guestfs-actions.pod:5792 ../src/guestfs-actions.pod:7760
25215 "You may supply a list of optional arguments to this call. Use zero or more "
25216 "of the following pairs of parameters, and terminate the list with C<-1> on "
25217 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
25221 #: ../src/guestfs-actions.pod:53
25224 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
25225 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
25226 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
25227 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
25228 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
25229 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
25234 #: ../src/guestfs-actions.pod:60
25236 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
25237 "It works by connecting to libvirt, requesting the domain and domain XML from "
25238 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
25243 #: ../src/guestfs-actions.pod:141
25245 "The other optional parameters are passed directly through to "
25246 "C<guestfs_add_drive_opts>."
25250 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403 ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:751 ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800 ../src/guestfs-actions.pod:819 ../src/guestfs-actions.pod:1797 ../src/guestfs-actions.pod:2153 ../src/guestfs-actions.pod:2356 ../src/guestfs-actions.pod:2467 ../src/guestfs-actions.pod:2518 ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2584 ../src/guestfs-actions.pod:2607 ../src/guestfs-actions.pod:2922 ../src/guestfs-actions.pod:3406 ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5968 ../src/guestfs-actions.pod:6206 ../src/guestfs-actions.pod:6400 ../src/guestfs-actions.pod:6426 ../src/guestfs-actions.pod:7948 ../src/guestfs-actions.pod:8374 ../src/guestfs-actions.pod:8387 ../src/guestfs-actions.pod:8400
25251 msgid "On error this function returns -1."
25255 #: ../src/guestfs-actions.pod:146
25256 msgid "(Added in 1.7.4)"
25260 #: ../src/guestfs-actions.pod:148
25261 msgid "guestfs_add_domain_va"
25265 #: ../src/guestfs-actions.pod:150
25269 " guestfs_add_domain_va (guestfs_h *g,\n"
25270 " const char *dom,\n"
25271 " va_list args);\n"
25276 #: ../src/guestfs-actions.pod:155
25277 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
25281 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168 ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:940 ../src/guestfs-actions.pod:1242 ../src/guestfs-actions.pod:1255 ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1391 ../src/guestfs-actions.pod:1403 ../src/guestfs-actions.pod:1444 ../src/guestfs-actions.pod:1456 ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1509 ../src/guestfs-actions.pod:1555 ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:3372 ../src/guestfs-actions.pod:3384 ../src/guestfs-actions.pod:4959 ../src/guestfs-actions.pod:4971 ../src/guestfs-actions.pod:5331 ../src/guestfs-actions.pod:5343 ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:5615 ../src/guestfs-actions.pod:5841 ../src/guestfs-actions.pod:5852 ../src/guestfs-actions.pod:7862 ../src/guestfs-actions.pod:7873
25282 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
25286 #: ../src/guestfs-actions.pod:159
25287 msgid "guestfs_add_domain_argv"
25291 #: ../src/guestfs-actions.pod:161
25295 " guestfs_add_domain_argv (guestfs_h *g,\n"
25296 " const char *dom,\n"
25297 " const struct guestfs_add_domain_argv *optargs);\n"
25302 #: ../src/guestfs-actions.pod:166
25303 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
25307 #: ../src/guestfs-actions.pod:170
25308 msgid "guestfs_add_drive"
25312 #: ../src/guestfs-actions.pod:172
25316 " guestfs_add_drive (guestfs_h *g,\n"
25317 " const char *filename);\n"
25322 #: ../src/guestfs-actions.pod:176
25324 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
25325 "optional parameters, so the disk is added writable, with the format being "
25326 "detected automatically."
25330 #: ../src/guestfs-actions.pod:180
25332 "Automatic detection of the format opens you up to a potential security hole "
25333 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
25334 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
25335 "you should think about replacing calls to this function with calls to "
25336 "C<guestfs_add_drive_opts>, and specifying the format."
25340 #: ../src/guestfs-actions.pod:191
25341 msgid "guestfs_add_drive_opts"
25345 #: ../src/guestfs-actions.pod:193
25349 " guestfs_add_drive_opts (guestfs_h *g,\n"
25350 " const char *filename,\n"
25356 #: ../src/guestfs-actions.pod:203
25359 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
25360 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
25361 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
25362 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
25367 #: ../src/guestfs-actions.pod:233
25369 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
25370 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
25371 "Possible formats include C<raw> and C<qcow2>."
25375 #: ../src/guestfs-actions.pod:244
25377 "This rarely-used option lets you emulate the behaviour of the deprecated "
25378 "C<guestfs_add_drive_with_if> call (q.v.)"
25382 #: ../src/guestfs-actions.pod:256
25383 msgid "(Added in 1.5.23)"
25387 #: ../src/guestfs-actions.pod:258
25388 msgid "guestfs_add_drive_opts_va"
25392 #: ../src/guestfs-actions.pod:260
25396 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
25397 " const char *filename,\n"
25398 " va_list args);\n"
25403 #: ../src/guestfs-actions.pod:265
25404 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
25408 #: ../src/guestfs-actions.pod:269
25409 msgid "guestfs_add_drive_opts_argv"
25413 #: ../src/guestfs-actions.pod:271
25417 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
25418 " const char *filename,\n"
25419 " const struct guestfs_add_drive_opts_argv "
25425 #: ../src/guestfs-actions.pod:276
25426 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
25430 #: ../src/guestfs-actions.pod:280
25431 msgid "guestfs_add_drive_ro"
25435 #: ../src/guestfs-actions.pod:282
25439 " guestfs_add_drive_ro (guestfs_h *g,\n"
25440 " const char *filename);\n"
25445 #: ../src/guestfs-actions.pod:286
25447 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
25448 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
25449 "disk is added read-only, with the format being detected automatically."
25453 #: ../src/guestfs-actions.pod:293
25454 msgid "(Added in 1.0.38)"
25458 #: ../src/guestfs-actions.pod:295
25459 msgid "guestfs_add_drive_ro_with_if"
25463 #: ../src/guestfs-actions.pod:297
25467 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
25468 " const char *filename,\n"
25469 " const char *iface);\n"
25474 #: ../src/guestfs-actions.pod:309
25476 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
25477 "QEMU interface emulation to use at run time."
25481 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335 ../src/guestfs-actions.pod:2881
25482 msgid "(Added in 1.0.84)"
25486 #: ../src/guestfs-actions.pod:316
25487 msgid "guestfs_add_drive_with_if"
25491 #: ../src/guestfs-actions.pod:318
25495 " guestfs_add_drive_with_if (guestfs_h *g,\n"
25496 " const char *filename,\n"
25497 " const char *iface);\n"
25502 #: ../src/guestfs-actions.pod:330
25504 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
25505 "QEMU interface emulation to use at run time."
25509 #: ../src/guestfs-actions.pod:337
25510 msgid "guestfs_aug_clear"
25514 #: ../src/guestfs-actions.pod:339
25518 " guestfs_aug_clear (guestfs_h *g,\n"
25519 " const char *augpath);\n"
25524 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2609
25525 msgid "(Added in 1.3.4)"
25529 #: ../src/guestfs-actions.pod:350
25530 msgid "guestfs_aug_close"
25534 #: ../src/guestfs-actions.pod:352
25538 " guestfs_aug_close (guestfs_h *g);\n"
25543 #: ../src/guestfs-actions.pod:355
25545 "Close the current Augeas handle and free up any resources used by it. After "
25546 "calling this, you have to call C<guestfs_aug_init> again before you can use "
25547 "any other Augeas functions."
25551 #: ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:387 ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:419 ../src/guestfs-actions.pod:482 ../src/guestfs-actions.pod:502 ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:547 ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:575 ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:607 ../src/guestfs-actions.pod:6477
25552 msgid "(Added in 0.7)"
25556 #: ../src/guestfs-actions.pod:364
25557 msgid "guestfs_aug_defnode"
25561 #: ../src/guestfs-actions.pod:366
25564 " struct guestfs_int_bool *\n"
25565 " guestfs_aug_defnode (guestfs_h *g,\n"
25566 " const char *name,\n"
25567 " const char *expr,\n"
25568 " const char *val);\n"
25573 #: ../src/guestfs-actions.pod:375
25575 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
25576 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
25577 "containing that single node."
25581 #: ../src/guestfs-actions.pod:383
25583 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
25584 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
25588 #: ../src/guestfs-actions.pod:389
25589 msgid "guestfs_aug_defvar"
25593 #: ../src/guestfs-actions.pod:391
25597 " guestfs_aug_defvar (guestfs_h *g,\n"
25598 " const char *name,\n"
25599 " const char *expr);\n"
25604 #: ../src/guestfs-actions.pod:407
25605 msgid "guestfs_aug_get"
25609 #: ../src/guestfs-actions.pod:409
25613 " guestfs_aug_get (guestfs_h *g,\n"
25614 " const char *augpath);\n"
25619 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:980 ../src/guestfs-actions.pod:998 ../src/guestfs-actions.pod:1058 ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1177 ../src/guestfs-actions.pod:1666 ../src/guestfs-actions.pod:1683 ../src/guestfs-actions.pod:1702 ../src/guestfs-actions.pod:1836 ../src/guestfs-actions.pod:2024 ../src/guestfs-actions.pod:2136 ../src/guestfs-actions.pod:2299 ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2383 ../src/guestfs-actions.pod:2426 ../src/guestfs-actions.pod:2447 ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2846 ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3256 ../src/guestfs-actions.pod:3275 ../src/guestfs-actions.pod:3490 ../src/guestfs-actions.pod:3518 ../src/guestfs-actions.pod:3539 ../src/guestfs-actions.pod:3573 ../src/guestfs-actions.pod:3640 ../src/guestfs-actions.pod:3660 ../src/guestfs-actions.pod:3680 ../src/guestfs-actions.pod:4320 ../src/guestfs-actions.pod:4667 ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:5093 ../src/guestfs-actions.pod:5986 ../src/guestfs-actions.pod:6187 ../src/guestfs-actions.pod:6375 ../src/guestfs-actions.pod:6553 ../src/guestfs-actions.pod:6602 ../src/guestfs-actions.pod:7262 ../src/guestfs-actions.pod:7278 ../src/guestfs-actions.pod:7302 ../src/guestfs-actions.pod:7326 ../src/guestfs-actions.pod:8122 ../src/guestfs-actions.pod:8141 ../src/guestfs-actions.pod:8159 ../src/guestfs-actions.pod:8333 ../src/guestfs-actions.pod:8647
25621 "This function returns a string, or NULL on error. I<The caller must free "
25622 "the returned string after use>."
25626 #: ../src/guestfs-actions.pod:421
25627 msgid "guestfs_aug_init"
25631 #: ../src/guestfs-actions.pod:423
25635 " guestfs_aug_init (guestfs_h *g,\n"
25636 " const char *root,\n"
25642 #: ../src/guestfs-actions.pod:432
25643 msgid "You must call this before using any other C<guestfs_aug_*> commands."
25647 #: ../src/guestfs-actions.pod:457
25649 "This option is only useful when debugging Augeas lenses. Use of this option "
25650 "may require additional memory for the libguestfs appliance. You may need to "
25651 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
25652 "C<guestfs_set_memsize>."
25656 #: ../src/guestfs-actions.pod:472
25657 msgid "Do not load the tree in C<guestfs_aug_init>."
25661 #: ../src/guestfs-actions.pod:476
25662 msgid "To close the handle, you can call C<guestfs_aug_close>."
25666 #: ../src/guestfs-actions.pod:484
25667 msgid "guestfs_aug_insert"
25671 #: ../src/guestfs-actions.pod:486
25675 " guestfs_aug_insert (guestfs_h *g,\n"
25676 " const char *augpath,\n"
25677 " const char *label,\n"
25683 #: ../src/guestfs-actions.pod:504
25684 msgid "guestfs_aug_load"
25688 #: ../src/guestfs-actions.pod:506
25692 " guestfs_aug_load (guestfs_h *g);\n"
25697 #: ../src/guestfs-actions.pod:518
25698 msgid "guestfs_aug_ls"
25702 #: ../src/guestfs-actions.pod:520
25706 " guestfs_aug_ls (guestfs_h *g,\n"
25707 " const char *augpath);\n"
25712 #: ../src/guestfs-actions.pod:524
25714 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
25715 "sorting the resulting nodes into alphabetical order."
25719 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543 ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1196 ../src/guestfs-actions.pod:1851 ../src/guestfs-actions.pod:1870 ../src/guestfs-actions.pod:1973 ../src/guestfs-actions.pod:1992 ../src/guestfs-actions.pod:2238 ../src/guestfs-actions.pod:2704 ../src/guestfs-actions.pod:2720 ../src/guestfs-actions.pod:2739 ../src/guestfs-actions.pod:2804 ../src/guestfs-actions.pod:2828 ../src/guestfs-actions.pod:2899 ../src/guestfs-actions.pod:2948 ../src/guestfs-actions.pod:3217 ../src/guestfs-actions.pod:3592 ../src/guestfs-actions.pod:3876 ../src/guestfs-actions.pod:4190 ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:4282 ../src/guestfs-actions.pod:4302 ../src/guestfs-actions.pod:4407 ../src/guestfs-actions.pod:4806 ../src/guestfs-actions.pod:5712 ../src/guestfs-actions.pod:6347 ../src/guestfs-actions.pod:6473 ../src/guestfs-actions.pod:6587 ../src/guestfs-actions.pod:7342 ../src/guestfs-actions.pod:7403 ../src/guestfs-actions.pod:7458 ../src/guestfs-actions.pod:7604 ../src/guestfs-actions.pod:7628 ../src/guestfs-actions.pod:8226 ../src/guestfs-actions.pod:8246 ../src/guestfs-actions.pod:8293 ../src/guestfs-actions.pod:8487 ../src/guestfs-actions.pod:8506 ../src/guestfs-actions.pod:8597 ../src/guestfs-actions.pod:8616 ../src/guestfs-actions.pod:8662 ../src/guestfs-actions.pod:8681
25721 "This function returns a NULL-terminated array of strings (like "
25722 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
25723 "strings and the array after use>."
25727 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1121 ../src/guestfs-actions.pod:1139 ../src/guestfs-actions.pod:1908 ../src/guestfs-actions.pod:3954 ../src/guestfs-actions.pod:3985 ../src/guestfs-actions.pod:4650 ../src/guestfs-actions.pod:4697 ../src/guestfs-actions.pod:5033 ../src/guestfs-actions.pod:5066 ../src/guestfs-actions.pod:5229 ../src/guestfs-actions.pod:5716 ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:6685 ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:6711 ../src/guestfs-actions.pod:7189 ../src/guestfs-actions.pod:7964 ../src/guestfs-actions.pod:7977 ../src/guestfs-actions.pod:8210 ../src/guestfs-actions.pod:8475
25728 msgid "(Added in 0.8)"
25732 #: ../src/guestfs-actions.pod:533
25733 msgid "guestfs_aug_match"
25737 #: ../src/guestfs-actions.pod:535
25741 " guestfs_aug_match (guestfs_h *g,\n"
25742 " const char *augpath);\n"
25747 #: ../src/guestfs-actions.pod:549
25748 msgid "guestfs_aug_mv"
25752 #: ../src/guestfs-actions.pod:551
25756 " guestfs_aug_mv (guestfs_h *g,\n"
25757 " const char *src,\n"
25758 " const char *dest);\n"
25763 #: ../src/guestfs-actions.pod:563
25764 msgid "guestfs_aug_rm"
25768 #: ../src/guestfs-actions.pod:565
25772 " guestfs_aug_rm (guestfs_h *g,\n"
25773 " const char *augpath);\n"
25778 #: ../src/guestfs-actions.pod:577
25779 msgid "guestfs_aug_save"
25783 #: ../src/guestfs-actions.pod:579
25787 " guestfs_aug_save (guestfs_h *g);\n"
25792 #: ../src/guestfs-actions.pod:584
25794 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25799 #: ../src/guestfs-actions.pod:591
25800 msgid "guestfs_aug_set"
25804 #: ../src/guestfs-actions.pod:593
25808 " guestfs_aug_set (guestfs_h *g,\n"
25809 " const char *augpath,\n"
25810 " const char *val);\n"
25815 #: ../src/guestfs-actions.pod:600
25817 "In the Augeas API, it is possible to clear a node by setting the value to "
25818 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25819 "this call. Instead you must use the C<guestfs_aug_clear> call."
25823 #: ../src/guestfs-actions.pod:609
25824 msgid "guestfs_available"
25828 #: ../src/guestfs-actions.pod:611
25832 " guestfs_available (guestfs_h *g,\n"
25833 " char *const *groups);\n"
25838 #: ../src/guestfs-actions.pod:619
25840 "The libguestfs groups, and the functions that those groups correspond to, "
25841 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25842 "runtime by calling C<guestfs_available_all_groups>."
25846 #: ../src/guestfs-actions.pod:643
25847 msgid "You must call C<guestfs_launch> before calling this function."
25851 #: ../src/guestfs-actions.pod:665
25853 "This call was added in version C<1.0.80>. In previous versions of "
25854 "libguestfs all you could do would be to speculatively execute a command to "
25855 "find out if the daemon implemented it. See also C<guestfs_version>."
25859 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1653
25860 msgid "(Added in 1.0.80)"
25864 #: ../src/guestfs-actions.pod:676
25865 msgid "guestfs_available_all_groups"
25869 #: ../src/guestfs-actions.pod:678
25873 " guestfs_available_all_groups (guestfs_h *g);\n"
25878 #: ../src/guestfs-actions.pod:681
25880 "This command returns a list of all optional groups that this daemon knows "
25881 "about. Note this returns both supported and unsupported groups. To find "
25882 "out which ones the daemon can actually support you have to call "
25883 "C<guestfs_available> on each member of the returned list."
25887 #: ../src/guestfs-actions.pod:687
25888 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25892 #: ../src/guestfs-actions.pod:693
25893 msgid "(Added in 1.3.15)"
25897 #: ../src/guestfs-actions.pod:695
25898 msgid "guestfs_base64_in"
25902 #: ../src/guestfs-actions.pod:697
25906 " guestfs_base64_in (guestfs_h *g,\n"
25907 " const char *base64file,\n"
25908 " const char *filename);\n"
25913 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
25914 msgid "(Added in 1.3.5)"
25918 #: ../src/guestfs-actions.pod:709
25919 msgid "guestfs_base64_out"
25923 #: ../src/guestfs-actions.pod:711
25927 " guestfs_base64_out (guestfs_h *g,\n"
25928 " const char *filename,\n"
25929 " const char *base64file);\n"
25934 #: ../src/guestfs-actions.pod:723
25935 msgid "guestfs_blockdev_flushbufs"
25939 #: ../src/guestfs-actions.pod:725
25943 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25944 " const char *device);\n"
25949 #: ../src/guestfs-actions.pod:736 ../src/guestfs-actions.pod:753 ../src/guestfs-actions.pod:768 ../src/guestfs-actions.pod:784 ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:821 ../src/guestfs-actions.pod:835 ../src/guestfs-actions.pod:853 ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:881
25950 msgid "(Added in 0.9.3)"
25954 #: ../src/guestfs-actions.pod:738
25955 msgid "guestfs_blockdev_getbsz"
25959 #: ../src/guestfs-actions.pod:740
25963 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25964 " const char *device);\n"
25969 #: ../src/guestfs-actions.pod:755
25970 msgid "guestfs_blockdev_getro"
25974 #: ../src/guestfs-actions.pod:757
25978 " guestfs_blockdev_getro (guestfs_h *g,\n"
25979 " const char *device);\n"
25984 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1891 ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:2395 ../src/guestfs-actions.pod:2406 ../src/guestfs-actions.pod:2478 ../src/guestfs-actions.pod:2504 ../src/guestfs-actions.pod:2544 ../src/guestfs-actions.pod:2559 ../src/guestfs-actions.pod:2595 ../src/guestfs-actions.pod:2618 ../src/guestfs-actions.pod:3697 ../src/guestfs-actions.pod:3713 ../src/guestfs-actions.pod:3731 ../src/guestfs-actions.pod:3893 ../src/guestfs-actions.pod:3907 ../src/guestfs-actions.pod:3922 ../src/guestfs-actions.pod:3936 ../src/guestfs-actions.pod:3952 ../src/guestfs-actions.pod:3967 ../src/guestfs-actions.pod:3983 ../src/guestfs-actions.pod:3997 ../src/guestfs-actions.pod:4010 ../src/guestfs-actions.pod:4024 ../src/guestfs-actions.pod:4039 ../src/guestfs-actions.pod:4054 ../src/guestfs-actions.pod:4067 ../src/guestfs-actions.pod:4081 ../src/guestfs-actions.pod:5950
25985 msgid "This function returns a C truth value on success or -1 on error."
25989 #: ../src/guestfs-actions.pod:770
25990 msgid "guestfs_blockdev_getsize64"
25994 #: ../src/guestfs-actions.pod:772
25998 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25999 " const char *device);\n"
26004 #: ../src/guestfs-actions.pod:778
26005 msgid "See also C<guestfs_blockdev_getsz>."
26009 #: ../src/guestfs-actions.pod:786
26010 msgid "guestfs_blockdev_getss"
26014 #: ../src/guestfs-actions.pod:788
26018 " guestfs_blockdev_getss (guestfs_h *g,\n"
26019 " const char *device);\n"
26024 #: ../src/guestfs-actions.pod:795
26026 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
26031 #: ../src/guestfs-actions.pod:804
26032 msgid "guestfs_blockdev_getsz"
26036 #: ../src/guestfs-actions.pod:806
26040 " guestfs_blockdev_getsz (guestfs_h *g,\n"
26041 " const char *device);\n"
26046 #: ../src/guestfs-actions.pod:813
26048 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
26049 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
26053 #: ../src/guestfs-actions.pod:823
26054 msgid "guestfs_blockdev_rereadpt"
26058 #: ../src/guestfs-actions.pod:825
26062 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
26063 " const char *device);\n"
26068 #: ../src/guestfs-actions.pod:837
26069 msgid "guestfs_blockdev_setbsz"
26073 #: ../src/guestfs-actions.pod:839
26077 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
26078 " const char *device,\n"
26079 " int blocksize);\n"
26084 #: ../src/guestfs-actions.pod:855
26085 msgid "guestfs_blockdev_setro"
26089 #: ../src/guestfs-actions.pod:857
26093 " guestfs_blockdev_setro (guestfs_h *g,\n"
26094 " const char *device);\n"
26099 #: ../src/guestfs-actions.pod:869
26100 msgid "guestfs_blockdev_setrw"
26104 #: ../src/guestfs-actions.pod:871
26108 " guestfs_blockdev_setrw (guestfs_h *g,\n"
26109 " const char *device);\n"
26114 #: ../src/guestfs-actions.pod:883
26115 msgid "guestfs_btrfs_filesystem_resize"
26119 #: ../src/guestfs-actions.pod:885
26123 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
26124 " const char *mountpoint,\n"
26130 #: ../src/guestfs-actions.pod:895
26133 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
26138 #: ../src/guestfs-actions.pod:918
26139 msgid "(Added in 1.11.17)"
26143 #: ../src/guestfs-actions.pod:920
26144 msgid "guestfs_btrfs_filesystem_resize_va"
26148 #: ../src/guestfs-actions.pod:922
26152 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
26153 " const char *mountpoint,\n"
26154 " va_list args);\n"
26159 #: ../src/guestfs-actions.pod:927
26160 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
26164 #: ../src/guestfs-actions.pod:931
26165 msgid "guestfs_btrfs_filesystem_resize_argv"
26169 #: ../src/guestfs-actions.pod:933
26173 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
26174 " const char *mountpoint,\n"
26176 "guestfs_btrfs_filesystem_resize_argv *optargs);\n"
26181 #: ../src/guestfs-actions.pod:938
26182 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
26186 #: ../src/guestfs-actions.pod:942
26187 msgid "guestfs_case_sensitive_path"
26191 #: ../src/guestfs-actions.pod:944
26195 " guestfs_case_sensitive_path (guestfs_h *g,\n"
26196 " const char *path);\n"
26201 #: ../src/guestfs-actions.pod:970
26203 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
26204 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
26205 "how the directories were originally created under Windows)."
26209 #: ../src/guestfs-actions.pod:978
26210 msgid "See also C<guestfs_realpath>."
26214 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:8144
26215 msgid "(Added in 1.0.75)"
26219 #: ../src/guestfs-actions.pod:985
26220 msgid "guestfs_cat"
26224 #: ../src/guestfs-actions.pod:987
26228 " guestfs_cat (guestfs_h *g,\n"
26229 " const char *path);\n"
26234 #: ../src/guestfs-actions.pod:993
26236 "Note that this function cannot correctly handle binary files (specifically, "
26237 "files containing C<\\0> character which is treated as end of string). For "
26238 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
26239 "functions which have a more complex interface."
26243 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4211 ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:4323 ../src/guestfs-actions.pod:4411 ../src/guestfs-actions.pod:4810 ../src/guestfs-actions.pod:4824 ../src/guestfs-actions.pod:6351 ../src/guestfs-actions.pod:6365 ../src/guestfs-actions.pod:8297 ../src/guestfs-actions.pod:8311
26244 msgid "(Added in 0.4)"
26248 #: ../src/guestfs-actions.pod:1006
26249 msgid "guestfs_checksum"
26253 #: ../src/guestfs-actions.pod:1008
26257 " guestfs_checksum (guestfs_h *g,\n"
26258 " const char *csumtype,\n"
26259 " const char *path);\n"
26264 #: ../src/guestfs-actions.pod:1054
26265 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
26269 #: ../src/guestfs-actions.pod:1056
26270 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
26274 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1728 ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3938 ../src/guestfs-actions.pod:3999 ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:8000
26275 msgid "(Added in 1.0.2)"
26279 #: ../src/guestfs-actions.pod:1063
26280 msgid "guestfs_checksum_device"
26284 #: ../src/guestfs-actions.pod:1065
26288 " guestfs_checksum_device (guestfs_h *g,\n"
26289 " const char *csumtype,\n"
26290 " const char *device);\n"
26295 #: ../src/guestfs-actions.pod:1070
26297 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
26298 "device named C<device>. For the types of checksums supported see the "
26299 "C<guestfs_checksum> command."
26303 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5783 ../src/guestfs-actions.pod:5918 ../src/guestfs-actions.pod:5952 ../src/guestfs-actions.pod:5970 ../src/guestfs-actions.pod:6152 ../src/guestfs-actions.pod:7909 ../src/guestfs-actions.pod:7923 ../src/guestfs-actions.pod:8323
26304 msgid "(Added in 1.3.2)"
26308 #: ../src/guestfs-actions.pod:1079
26309 msgid "guestfs_checksums_out"
26313 #: ../src/guestfs-actions.pod:1081
26317 " guestfs_checksums_out (guestfs_h *g,\n"
26318 " const char *csumtype,\n"
26319 " const char *directory,\n"
26320 " const char *sumsfile);\n"
26325 #: ../src/guestfs-actions.pod:1101
26326 msgid "(Added in 1.3.7)"
26330 #: ../src/guestfs-actions.pod:1103
26331 msgid "guestfs_chmod"
26335 #: ../src/guestfs-actions.pod:1105
26339 " guestfs_chmod (guestfs_h *g,\n"
26341 " const char *path);\n"
26346 #: ../src/guestfs-actions.pod:1123
26347 msgid "guestfs_chown"
26351 #: ../src/guestfs-actions.pod:1125
26355 " guestfs_chown (guestfs_h *g,\n"
26358 " const char *path);\n"
26363 #: ../src/guestfs-actions.pod:1141
26364 msgid "guestfs_command"
26368 #: ../src/guestfs-actions.pod:1143
26372 " guestfs_command (guestfs_h *g,\n"
26373 " char *const *arguments);\n"
26378 #: ../src/guestfs-actions.pod:1152
26380 "The single parameter is an argv-style list of arguments. The first element "
26381 "is the name of the program to run. Subsequent elements are parameters. The "
26382 "list must be non-empty (ie. must contain a program name). Note that the "
26383 "command runs directly, and is I<not> invoked via the shell (see "
26388 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203 ../src/guestfs-actions.pod:2027
26389 msgid "(Added in 0.9.1)"
26393 #: ../src/guestfs-actions.pod:1185
26394 msgid "guestfs_command_lines"
26398 #: ../src/guestfs-actions.pod:1187
26402 " guestfs_command_lines (guestfs_h *g,\n"
26403 " char *const *arguments);\n"
26408 #: ../src/guestfs-actions.pod:1191
26410 "This is the same as C<guestfs_command>, but splits the result into a list of "
26415 #: ../src/guestfs-actions.pod:1194
26416 msgid "See also: C<guestfs_sh_lines>"
26420 #: ../src/guestfs-actions.pod:1205
26421 msgid "guestfs_compress_device_out"
26425 #: ../src/guestfs-actions.pod:1207
26429 " guestfs_compress_device_out (guestfs_h *g,\n"
26430 " const char *ctype,\n"
26431 " const char *device,\n"
26432 " const char *zdevice,\n"
26438 #: ../src/guestfs-actions.pod:1219
26441 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
26446 #: ../src/guestfs-actions.pod:1224
26448 "The C<ctype> and optional C<level> parameters have the same meaning as in "
26449 "C<guestfs_compress_out>."
26453 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288 ../src/guestfs-actions.pod:2572 ../src/guestfs-actions.pod:7068
26454 msgid "(Added in 1.13.15)"
26458 #: ../src/guestfs-actions.pod:1231
26459 msgid "guestfs_compress_device_out_va"
26463 #: ../src/guestfs-actions.pod:1233
26467 " guestfs_compress_device_out_va (guestfs_h *g,\n"
26468 " const char *ctype,\n"
26469 " const char *device,\n"
26470 " const char *zdevice,\n"
26471 " va_list args);\n"
26476 #: ../src/guestfs-actions.pod:1240
26477 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
26481 #: ../src/guestfs-actions.pod:1244
26482 msgid "guestfs_compress_device_out_argv"
26486 #: ../src/guestfs-actions.pod:1246
26490 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
26491 " const char *ctype,\n"
26492 " const char *device,\n"
26493 " const char *zdevice,\n"
26495 "guestfs_compress_device_out_argv *optargs);\n"
26500 #: ../src/guestfs-actions.pod:1253
26501 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
26505 #: ../src/guestfs-actions.pod:1257
26506 msgid "guestfs_compress_out"
26510 #: ../src/guestfs-actions.pod:1259
26514 " guestfs_compress_out (guestfs_h *g,\n"
26515 " const char *ctype,\n"
26516 " const char *file,\n"
26517 " const char *zfile,\n"
26523 #: ../src/guestfs-actions.pod:1271
26526 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
26531 #: ../src/guestfs-actions.pod:1290
26532 msgid "guestfs_compress_out_va"
26536 #: ../src/guestfs-actions.pod:1292
26540 " guestfs_compress_out_va (guestfs_h *g,\n"
26541 " const char *ctype,\n"
26542 " const char *file,\n"
26543 " const char *zfile,\n"
26544 " va_list args);\n"
26549 #: ../src/guestfs-actions.pod:1299
26550 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
26554 #: ../src/guestfs-actions.pod:1303
26555 msgid "guestfs_compress_out_argv"
26559 #: ../src/guestfs-actions.pod:1305
26563 " guestfs_compress_out_argv (guestfs_h *g,\n"
26564 " const char *ctype,\n"
26565 " const char *file,\n"
26566 " const char *zfile,\n"
26567 " const struct guestfs_compress_out_argv "
26573 #: ../src/guestfs-actions.pod:1312
26574 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
26578 #: ../src/guestfs-actions.pod:1316
26579 msgid "guestfs_config"
26583 #: ../src/guestfs-actions.pod:1318
26587 " guestfs_config (guestfs_h *g,\n"
26588 " const char *qemuparam,\n"
26589 " const char *qemuvalue);\n"
26594 #: ../src/guestfs-actions.pod:1336
26595 msgid "guestfs_copy_device_to_device"
26599 #: ../src/guestfs-actions.pod:1338
26603 " guestfs_copy_device_to_device (guestfs_h *g,\n"
26604 " const char *src,\n"
26605 " const char *dest,\n"
26611 #: ../src/guestfs-actions.pod:1349
26614 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26615 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26616 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
26621 #: ../src/guestfs-actions.pod:1353
26623 "The four calls C<guestfs_copy_device_to_device>, "
26624 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
26625 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
26626 "destination (device|file)."
26630 #: ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1427 ../src/guestfs-actions.pod:1480 ../src/guestfs-actions.pod:1538 ../src/guestfs-actions.pod:1592 ../src/guestfs-actions.pod:1723 ../src/guestfs-actions.pod:1754 ../src/guestfs-actions.pod:1799 ../src/guestfs-actions.pod:2176 ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:4109 ../src/guestfs-actions.pod:7995 ../src/guestfs-actions.pod:8029 ../src/guestfs-actions.pod:8536 ../src/guestfs-actions.pod:8559
26632 "This long-running command can generate progress notification messages so "
26633 "that the caller can display a progress bar or indicator. To receive these "
26634 "messages, the caller must register a progress event callback. See "
26635 "L<guestfs(3)/GUESTFS_EVENT_PROGRESS>."
26639 #: ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1543 ../src/guestfs-actions.pod:6208
26640 msgid "(Added in 1.13.25)"
26644 #: ../src/guestfs-actions.pod:1381
26645 msgid "guestfs_copy_device_to_device_va"
26649 #: ../src/guestfs-actions.pod:1383
26653 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
26654 " const char *src,\n"
26655 " const char *dest,\n"
26656 " va_list args);\n"
26661 #: ../src/guestfs-actions.pod:1389
26662 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
26666 #: ../src/guestfs-actions.pod:1393
26667 msgid "guestfs_copy_device_to_device_argv"
26671 #: ../src/guestfs-actions.pod:1395
26675 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
26676 " const char *src,\n"
26677 " const char *dest,\n"
26679 "guestfs_copy_device_to_device_argv *optargs);\n"
26684 #: ../src/guestfs-actions.pod:1401
26685 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
26689 #: ../src/guestfs-actions.pod:1405
26690 msgid "guestfs_copy_device_to_file"
26694 #: ../src/guestfs-actions.pod:1407
26698 " guestfs_copy_device_to_file (guestfs_h *g,\n"
26699 " const char *src,\n"
26700 " const char *dest,\n"
26706 #: ../src/guestfs-actions.pod:1418
26709 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26710 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26711 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
26716 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1475 ../src/guestfs-actions.pod:1528
26717 msgid "See C<guestfs_copy_device_to_device> for a general overview of this call."
26721 #: ../src/guestfs-actions.pod:1434
26722 msgid "guestfs_copy_device_to_file_va"
26726 #: ../src/guestfs-actions.pod:1436
26730 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
26731 " const char *src,\n"
26732 " const char *dest,\n"
26733 " va_list args);\n"
26738 #: ../src/guestfs-actions.pod:1442
26739 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
26743 #: ../src/guestfs-actions.pod:1446
26744 msgid "guestfs_copy_device_to_file_argv"
26748 #: ../src/guestfs-actions.pod:1448
26752 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
26753 " const char *src,\n"
26754 " const char *dest,\n"
26756 "guestfs_copy_device_to_file_argv *optargs);\n"
26761 #: ../src/guestfs-actions.pod:1454
26762 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
26766 #: ../src/guestfs-actions.pod:1458
26767 msgid "guestfs_copy_file_to_device"
26771 #: ../src/guestfs-actions.pod:1460
26775 " guestfs_copy_file_to_device (guestfs_h *g,\n"
26776 " const char *src,\n"
26777 " const char *dest,\n"
26783 #: ../src/guestfs-actions.pod:1471
26786 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
26787 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
26788 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
26793 #: ../src/guestfs-actions.pod:1487
26794 msgid "guestfs_copy_file_to_device_va"
26798 #: ../src/guestfs-actions.pod:1489
26802 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
26803 " const char *src,\n"
26804 " const char *dest,\n"
26805 " va_list args);\n"
26810 #: ../src/guestfs-actions.pod:1495
26811 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
26815 #: ../src/guestfs-actions.pod:1499
26816 msgid "guestfs_copy_file_to_device_argv"
26820 #: ../src/guestfs-actions.pod:1501
26824 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
26825 " const char *src,\n"
26826 " const char *dest,\n"
26828 "guestfs_copy_file_to_device_argv *optargs);\n"
26833 #: ../src/guestfs-actions.pod:1507
26834 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
26838 #: ../src/guestfs-actions.pod:1511
26839 msgid "guestfs_copy_file_to_file"
26843 #: ../src/guestfs-actions.pod:1513
26847 " guestfs_copy_file_to_file (guestfs_h *g,\n"
26848 " const char *src,\n"
26849 " const char *dest,\n"
26855 #: ../src/guestfs-actions.pod:1524
26858 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
26859 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
26860 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
26865 #: ../src/guestfs-actions.pod:1531
26867 "This is B<not> the function you want for copying files. This is for copying "
26868 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
26869 "C<guestfs_mv> for general file copying and moving functions."
26873 #: ../src/guestfs-actions.pod:1545
26874 msgid "guestfs_copy_file_to_file_va"
26878 #: ../src/guestfs-actions.pod:1547
26882 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
26883 " const char *src,\n"
26884 " const char *dest,\n"
26885 " va_list args);\n"
26890 #: ../src/guestfs-actions.pod:1553
26891 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
26895 #: ../src/guestfs-actions.pod:1557
26896 msgid "guestfs_copy_file_to_file_argv"
26900 #: ../src/guestfs-actions.pod:1559
26904 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
26905 " const char *src,\n"
26906 " const char *dest,\n"
26907 " const struct guestfs_copy_file_to_file_argv "
26913 #: ../src/guestfs-actions.pod:1565
26914 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
26918 #: ../src/guestfs-actions.pod:1569
26919 msgid "guestfs_copy_size"
26923 #: ../src/guestfs-actions.pod:1571
26927 " guestfs_copy_size (guestfs_h *g,\n"
26928 " const char *src,\n"
26929 " const char *dest,\n"
26930 " int64_t size);\n"
26935 #: ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1634
26937 "I<This function is deprecated.> In new code, use the "
26938 "L</guestfs_copy_device_to_device> call instead."
26942 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:4837 ../src/guestfs-actions.pod:6378 ../src/guestfs-actions.pod:8230 ../src/guestfs-actions.pod:8250 ../src/guestfs-actions.pod:8336
26943 msgid "(Added in 1.0.87)"
26947 #: ../src/guestfs-actions.pod:1599
26952 #: ../src/guestfs-actions.pod:1601
26956 " guestfs_cp (guestfs_h *g,\n"
26957 " const char *src,\n"
26958 " const char *dest);\n"
26963 #: ../src/guestfs-actions.pod:1611 ../src/guestfs-actions.pod:1625 ../src/guestfs-actions.pod:1705 ../src/guestfs-actions.pod:1779 ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:5730 ../src/guestfs-actions.pod:6222
26964 msgid "(Added in 1.0.18)"
26968 #: ../src/guestfs-actions.pod:1613
26969 msgid "guestfs_cp_a"
26973 #: ../src/guestfs-actions.pod:1615
26977 " guestfs_cp_a (guestfs_h *g,\n"
26978 " const char *src,\n"
26979 " const char *dest);\n"
26984 #: ../src/guestfs-actions.pod:1627
26989 #: ../src/guestfs-actions.pod:1629
26993 " guestfs_dd (guestfs_h *g,\n"
26994 " const char *src,\n"
26995 " const char *dest);\n"
27000 #: ../src/guestfs-actions.pod:1646
27002 "If the destination is a device, it must be as large or larger than the "
27003 "source file or device, otherwise the copy will fail. This command cannot do "
27004 "partial copies (see C<guestfs_copy_device_to_device>)."
27008 #: ../src/guestfs-actions.pod:1655
27013 #: ../src/guestfs-actions.pod:1657
27017 " guestfs_df (guestfs_h *g);\n"
27022 #: ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1679
27024 "This command is mostly useful for interactive sessions. It is I<not> "
27025 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
27030 #: ../src/guestfs-actions.pod:1669 ../src/guestfs-actions.pod:1686 ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:2811 ../src/guestfs-actions.pod:2835 ../src/guestfs-actions.pod:2903 ../src/guestfs-actions.pod:5096 ../src/guestfs-actions.pod:5630 ../src/guestfs-actions.pod:7611 ../src/guestfs-actions.pod:7635 ../src/guestfs-actions.pod:8376 ../src/guestfs-actions.pod:8389 ../src/guestfs-actions.pod:8402
27031 msgid "(Added in 1.0.54)"
27035 #: ../src/guestfs-actions.pod:1671
27036 msgid "guestfs_df_h"
27040 #: ../src/guestfs-actions.pod:1673
27044 " guestfs_df_h (guestfs_h *g);\n"
27049 #: ../src/guestfs-actions.pod:1688
27050 msgid "guestfs_dmesg"
27054 #: ../src/guestfs-actions.pod:1690
27058 " guestfs_dmesg (guestfs_h *g);\n"
27063 #: ../src/guestfs-actions.pod:1697
27065 "Another way to get the same information is to enable verbose messages with "
27066 "C<guestfs_set_verbose> or by setting the environment variable "
27067 "C<LIBGUESTFS_DEBUG=1> before running the program."
27071 #: ../src/guestfs-actions.pod:1707
27072 msgid "guestfs_download"
27076 #: ../src/guestfs-actions.pod:1709
27080 " guestfs_download (guestfs_h *g,\n"
27081 " const char *remotefilename,\n"
27082 " const char *filename);\n"
27087 #: ../src/guestfs-actions.pod:1719
27088 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
27092 #: ../src/guestfs-actions.pod:1730
27093 msgid "guestfs_download_offset"
27097 #: ../src/guestfs-actions.pod:1732
27101 " guestfs_download_offset (guestfs_h *g,\n"
27102 " const char *remotefilename,\n"
27103 " const char *filename,\n"
27104 " int64_t offset,\n"
27105 " int64_t size);\n"
27110 #: ../src/guestfs-actions.pod:1745
27112 "Note that there is no limit on the amount of data that can be downloaded "
27113 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
27114 "full amount unless an error occurs."
27118 #: ../src/guestfs-actions.pod:1750
27119 msgid "See also C<guestfs_download>, C<guestfs_pread>."
27123 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:8034
27124 msgid "(Added in 1.5.17)"
27128 #: ../src/guestfs-actions.pod:1761
27129 msgid "guestfs_drop_caches"
27133 #: ../src/guestfs-actions.pod:1763
27137 " guestfs_drop_caches (guestfs_h *g,\n"
27138 " int whattodrop);\n"
27143 #: ../src/guestfs-actions.pod:1781
27148 #: ../src/guestfs-actions.pod:1783
27152 " guestfs_du (guestfs_h *g,\n"
27153 " const char *path);\n"
27158 #: ../src/guestfs-actions.pod:1806
27159 msgid "guestfs_e2fsck_f"
27163 #: ../src/guestfs-actions.pod:1808
27167 " guestfs_e2fsck_f (guestfs_h *g,\n"
27168 " const char *device);\n"
27173 #: ../src/guestfs-actions.pod:1816
27175 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
27176 "Normally you should use C<guestfs_fsck>."
27180 #: ../src/guestfs-actions.pod:1821
27181 msgid "(Added in 1.0.29)"
27185 #: ../src/guestfs-actions.pod:1823
27186 msgid "guestfs_echo_daemon"
27190 #: ../src/guestfs-actions.pod:1825
27194 " guestfs_echo_daemon (guestfs_h *g,\n"
27195 " char *const *words);\n"
27200 #: ../src/guestfs-actions.pod:1834
27201 msgid "See also C<guestfs_ping_daemon>."
27205 #: ../src/guestfs-actions.pod:1839 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:7092
27206 msgid "(Added in 1.0.69)"
27210 #: ../src/guestfs-actions.pod:1841
27211 msgid "guestfs_egrep"
27215 #: ../src/guestfs-actions.pod:1843
27219 " guestfs_egrep (guestfs_h *g,\n"
27220 " const char *regex,\n"
27221 " const char *path);\n"
27226 #: ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:1877 ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:1980 ../src/guestfs-actions.pod:1999 ../src/guestfs-actions.pod:2727 ../src/guestfs-actions.pod:2746 ../src/guestfs-actions.pod:2924 ../src/guestfs-actions.pod:2937 ../src/guestfs-actions.pod:2952 ../src/guestfs-actions.pod:2998 ../src/guestfs-actions.pod:3020 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:4336 ../src/guestfs-actions.pod:4350 ../src/guestfs-actions.pod:4363 ../src/guestfs-actions.pod:4377 ../src/guestfs-actions.pod:5518 ../src/guestfs-actions.pod:6556 ../src/guestfs-actions.pod:6605 ../src/guestfs-actions.pod:7479 ../src/guestfs-actions.pod:7491 ../src/guestfs-actions.pod:7504 ../src/guestfs-actions.pod:7517 ../src/guestfs-actions.pod:7539 ../src/guestfs-actions.pod:7552 ../src/guestfs-actions.pod:7565 ../src/guestfs-actions.pod:7578 ../src/guestfs-actions.pod:8494 ../src/guestfs-actions.pod:8513 ../src/guestfs-actions.pod:8604 ../src/guestfs-actions.pod:8623 ../src/guestfs-actions.pod:8669 ../src/guestfs-actions.pod:8688
27227 msgid "(Added in 1.0.66)"
27231 #: ../src/guestfs-actions.pod:1860
27232 msgid "guestfs_egrepi"
27236 #: ../src/guestfs-actions.pod:1862
27240 " guestfs_egrepi (guestfs_h *g,\n"
27241 " const char *regex,\n"
27242 " const char *path);\n"
27247 #: ../src/guestfs-actions.pod:1879
27248 msgid "guestfs_equal"
27252 #: ../src/guestfs-actions.pod:1881
27256 " guestfs_equal (guestfs_h *g,\n"
27257 " const char *file1,\n"
27258 " const char *file2);\n"
27263 #: ../src/guestfs-actions.pod:1895
27264 msgid "guestfs_exists"
27268 #: ../src/guestfs-actions.pod:1897
27272 " guestfs_exists (guestfs_h *g,\n"
27273 " const char *path);\n"
27278 #: ../src/guestfs-actions.pod:1904
27279 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
27283 #: ../src/guestfs-actions.pod:1910
27284 msgid "guestfs_fallocate"
27288 #: ../src/guestfs-actions.pod:1912
27292 " guestfs_fallocate (guestfs_h *g,\n"
27293 " const char *path,\n"
27299 #: ../src/guestfs-actions.pod:1917
27301 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
27306 #: ../src/guestfs-actions.pod:1936
27307 msgid "guestfs_fallocate64"
27311 #: ../src/guestfs-actions.pod:1938
27315 " guestfs_fallocate64 (guestfs_h *g,\n"
27316 " const char *path,\n"
27322 #: ../src/guestfs-actions.pod:1947
27324 "Note that this call allocates disk blocks for the file. To create a sparse "
27325 "file use C<guestfs_truncate_size> instead."
27329 #: ../src/guestfs-actions.pod:1950
27331 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
27332 "oversight it only allowed 30 bit lengths to be specified, effectively "
27333 "limiting the maximum size of files created through that call to 1GB."
27337 #: ../src/guestfs-actions.pod:1961
27338 msgid "(Added in 1.3.17)"
27342 #: ../src/guestfs-actions.pod:1963
27343 msgid "guestfs_fgrep"
27347 #: ../src/guestfs-actions.pod:1965
27351 " guestfs_fgrep (guestfs_h *g,\n"
27352 " const char *pattern,\n"
27353 " const char *path);\n"
27358 #: ../src/guestfs-actions.pod:1982
27359 msgid "guestfs_fgrepi"
27363 #: ../src/guestfs-actions.pod:1984
27367 " guestfs_fgrepi (guestfs_h *g,\n"
27368 " const char *pattern,\n"
27369 " const char *path);\n"
27374 #: ../src/guestfs-actions.pod:2001
27375 msgid "guestfs_file"
27379 #: ../src/guestfs-actions.pod:2003
27383 " guestfs_file (guestfs_h *g,\n"
27384 " const char *path);\n"
27389 #: ../src/guestfs-actions.pod:2021
27391 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
27392 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
27396 #: ../src/guestfs-actions.pod:2029
27397 msgid "guestfs_file_architecture"
27401 #: ../src/guestfs-actions.pod:2031
27405 " guestfs_file_architecture (guestfs_h *g,\n"
27406 " const char *filename);\n"
27411 #: ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:2302 ../src/guestfs-actions.pod:2319 ../src/guestfs-actions.pod:3053 ../src/guestfs-actions.pod:3155 ../src/guestfs-actions.pod:3221 ../src/guestfs-actions.pod:3408 ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3542 ../src/guestfs-actions.pod:3643 ../src/guestfs-actions.pod:3880 ../src/guestfs-actions.pod:4012
27412 msgid "(Added in 1.5.3)"
27416 #: ../src/guestfs-actions.pod:2141
27417 msgid "guestfs_filesize"
27421 #: ../src/guestfs-actions.pod:2143
27425 " guestfs_filesize (guestfs_h *g,\n"
27426 " const char *file);\n"
27431 #: ../src/guestfs-actions.pod:2149
27433 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
27434 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
27435 "devices, use C<guestfs_blockdev_getsize64>."
27439 #: ../src/guestfs-actions.pod:2155
27440 msgid "(Added in 1.0.82)"
27444 #: ../src/guestfs-actions.pod:2157
27445 msgid "guestfs_fill"
27449 #: ../src/guestfs-actions.pod:2159
27453 " guestfs_fill (guestfs_h *g,\n"
27456 " const char *path);\n"
27461 #: ../src/guestfs-actions.pod:2169
27463 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
27464 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
27465 "bytes use C<guestfs_fill_pattern>."
27469 #: ../src/guestfs-actions.pod:2181
27470 msgid "(Added in 1.0.79)"
27474 #: ../src/guestfs-actions.pod:2183
27475 msgid "guestfs_fill_pattern"
27479 #: ../src/guestfs-actions.pod:2185
27483 " guestfs_fill_pattern (guestfs_h *g,\n"
27484 " const char *pattern,\n"
27486 " const char *path);\n"
27491 #: ../src/guestfs-actions.pod:2191
27493 "This function is like C<guestfs_fill> except that it creates a new file of "
27494 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
27495 "pattern is truncated if necessary to ensure the length of the file is "
27496 "exactly C<len> bytes."
27500 #: ../src/guestfs-actions.pod:2203
27501 msgid "(Added in 1.3.12)"
27505 #: ../src/guestfs-actions.pod:2205
27506 msgid "guestfs_find"
27510 #: ../src/guestfs-actions.pod:2207
27514 " guestfs_find (guestfs_h *g,\n"
27515 " const char *directory);\n"
27520 #: ../src/guestfs-actions.pod:2223
27521 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
27525 #: ../src/guestfs-actions.pod:2236
27526 msgid "See also C<guestfs_find0>."
27530 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:4774 ../src/guestfs-actions.pod:6640
27531 msgid "(Added in 1.0.27)"
27535 #: ../src/guestfs-actions.pod:2247
27536 msgid "guestfs_find0"
27540 #: ../src/guestfs-actions.pod:2249
27544 " guestfs_find0 (guestfs_h *g,\n"
27545 " const char *directory,\n"
27546 " const char *files);\n"
27551 #: ../src/guestfs-actions.pod:2258
27553 "This command works the same way as C<guestfs_find> with the following "
27558 #: ../src/guestfs-actions.pod:2285
27559 msgid "(Added in 1.0.74)"
27563 #: ../src/guestfs-actions.pod:2287
27564 msgid "guestfs_findfs_label"
27568 #: ../src/guestfs-actions.pod:2289
27572 " guestfs_findfs_label (guestfs_h *g,\n"
27573 " const char *label);\n"
27578 #: ../src/guestfs-actions.pod:2297
27579 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
27583 #: ../src/guestfs-actions.pod:2304
27584 msgid "guestfs_findfs_uuid"
27588 #: ../src/guestfs-actions.pod:2306
27592 " guestfs_findfs_uuid (guestfs_h *g,\n"
27593 " const char *uuid);\n"
27598 #: ../src/guestfs-actions.pod:2314
27599 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
27603 #: ../src/guestfs-actions.pod:2321
27604 msgid "guestfs_fsck"
27608 #: ../src/guestfs-actions.pod:2323
27612 " guestfs_fsck (guestfs_h *g,\n"
27613 " const char *fstype,\n"
27614 " const char *device);\n"
27619 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:8541
27620 msgid "(Added in 1.0.16)"
27624 #: ../src/guestfs-actions.pod:2360
27625 msgid "guestfs_get_append"
27629 #: ../src/guestfs-actions.pod:2362
27633 " guestfs_get_append (guestfs_h *g);\n"
27638 #: ../src/guestfs-actions.pod:2370
27640 "This function returns a string which may be NULL. There is no way to return "
27641 "an error from this function. The string is owned by the guest handle and "
27642 "must I<not> be freed."
27646 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:6318 ../src/guestfs-actions.pod:6797 ../src/guestfs-actions.pod:7246 ../src/guestfs-actions.pod:7265 ../src/guestfs-actions.pod:7281 ../src/guestfs-actions.pod:7305 ../src/guestfs-actions.pod:8181 ../src/guestfs-actions.pod:8196 ../src/guestfs-actions.pod:8585
27647 msgid "(Added in 1.0.26)"
27651 #: ../src/guestfs-actions.pod:2376
27652 msgid "guestfs_get_attach_method"
27656 #: ../src/guestfs-actions.pod:2378
27660 " guestfs_get_attach_method (guestfs_h *g);\n"
27665 #: ../src/guestfs-actions.pod:2381
27666 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
27670 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:6827
27671 msgid "(Added in 1.9.8)"
27675 #: ../src/guestfs-actions.pod:2388
27676 msgid "guestfs_get_autosync"
27680 #: ../src/guestfs-actions.pod:2390
27684 " guestfs_get_autosync (guestfs_h *g);\n"
27689 #: ../src/guestfs-actions.pod:2399
27690 msgid "guestfs_get_direct"
27694 #: ../src/guestfs-actions.pod:2401
27698 " guestfs_get_direct (guestfs_h *g);\n"
27703 #: ../src/guestfs-actions.pod:2408 ../src/guestfs-actions.pod:6868
27704 msgid "(Added in 1.0.72)"
27708 #: ../src/guestfs-actions.pod:2410
27709 msgid "guestfs_get_e2label"
27713 #: ../src/guestfs-actions.pod:2412
27717 " guestfs_get_e2label (guestfs_h *g,\n"
27718 " const char *device);\n"
27723 #: ../src/guestfs-actions.pod:2416
27725 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
27730 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:6886 ../src/guestfs-actions.pod:6905
27731 msgid "(Added in 1.0.15)"
27735 #: ../src/guestfs-actions.pod:2431
27736 msgid "guestfs_get_e2uuid"
27740 #: ../src/guestfs-actions.pod:2433
27744 " guestfs_get_e2uuid (guestfs_h *g,\n"
27745 " const char *device);\n"
27750 #: ../src/guestfs-actions.pod:2437
27752 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
27757 #: ../src/guestfs-actions.pod:2452
27758 msgid "guestfs_get_memsize"
27762 #: ../src/guestfs-actions.pod:2454
27766 " guestfs_get_memsize (guestfs_h *g);\n"
27771 #: ../src/guestfs-actions.pod:2460
27773 "If C<guestfs_set_memsize> was not called on this handle, and if "
27774 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
27775 "value for memsize."
27779 #: ../src/guestfs-actions.pod:2469 ../src/guestfs-actions.pod:5214 ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5442 ../src/guestfs-actions.pod:5461 ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:5490 ../src/guestfs-actions.pod:5503 ../src/guestfs-actions.pod:6543 ../src/guestfs-actions.pod:6926 ../src/guestfs-actions.pod:7216 ../src/guestfs-actions.pod:7950
27780 msgid "(Added in 1.0.55)"
27784 #: ../src/guestfs-actions.pod:2471
27785 msgid "guestfs_get_network"
27789 #: ../src/guestfs-actions.pod:2473
27793 " guestfs_get_network (guestfs_h *g);\n"
27798 #: ../src/guestfs-actions.pod:2480 ../src/guestfs-actions.pod:6945
27799 msgid "(Added in 1.5.4)"
27803 #: ../src/guestfs-actions.pod:2482
27804 msgid "guestfs_get_path"
27808 #: ../src/guestfs-actions.pod:2484
27812 " guestfs_get_path (guestfs_h *g);\n"
27817 #: ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2532
27819 "This function returns a string, or NULL on error. The string is owned by "
27820 "the guest handle and must I<not> be freed."
27824 #: ../src/guestfs-actions.pod:2497
27825 msgid "guestfs_get_pgroup"
27829 #: ../src/guestfs-actions.pod:2499
27833 " guestfs_get_pgroup (guestfs_h *g);\n"
27838 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:6981 ../src/guestfs-actions.pod:8442
27839 msgid "(Added in 1.11.18)"
27843 #: ../src/guestfs-actions.pod:2508
27844 msgid "guestfs_get_pid"
27848 #: ../src/guestfs-actions.pod:2510
27852 " guestfs_get_pid (guestfs_h *g);\n"
27857 #: ../src/guestfs-actions.pod:2520
27858 msgid "(Added in 1.0.56)"
27862 #: ../src/guestfs-actions.pod:2522
27863 msgid "guestfs_get_qemu"
27867 #: ../src/guestfs-actions.pod:2524
27871 " guestfs_get_qemu (guestfs_h *g);\n"
27876 #: ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:7009
27877 msgid "(Added in 1.0.6)"
27881 #: ../src/guestfs-actions.pod:2537
27882 msgid "guestfs_get_recovery_proc"
27886 #: ../src/guestfs-actions.pod:2539
27890 " guestfs_get_recovery_proc (guestfs_h *g);\n"
27895 #: ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:4134 ../src/guestfs-actions.pod:4478 ../src/guestfs-actions.pod:4872 ../src/guestfs-actions.pod:5053 ../src/guestfs-actions.pod:6248 ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:7033 ../src/guestfs-actions.pod:7731 ../src/guestfs-actions.pod:7751 ../src/guestfs-actions.pod:8065
27896 msgid "(Added in 1.0.77)"
27900 #: ../src/guestfs-actions.pod:2548
27901 msgid "guestfs_get_selinux"
27905 #: ../src/guestfs-actions.pod:2550
27909 " guestfs_get_selinux (guestfs_h *g);\n"
27914 #: ../src/guestfs-actions.pod:2553
27916 "This returns the current setting of the selinux flag which is passed to the "
27917 "appliance at boot time. See C<guestfs_set_selinux>."
27921 #: ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:7052 ../src/guestfs-actions.pod:7126
27922 msgid "(Added in 1.0.67)"
27926 #: ../src/guestfs-actions.pod:2563
27927 msgid "guestfs_get_smp"
27931 #: ../src/guestfs-actions.pod:2565
27935 " guestfs_get_smp (guestfs_h *g);\n"
27940 #: ../src/guestfs-actions.pod:2574
27941 msgid "guestfs_get_state"
27945 #: ../src/guestfs-actions.pod:2576
27949 " guestfs_get_state (guestfs_h *g);\n"
27954 #: ../src/guestfs-actions.pod:2588
27955 msgid "guestfs_get_trace"
27959 #: ../src/guestfs-actions.pod:2590
27963 " guestfs_get_trace (guestfs_h *g);\n"
27968 #: ../src/guestfs-actions.pod:2599
27969 msgid "guestfs_get_umask"
27973 #: ../src/guestfs-actions.pod:2601
27977 " guestfs_get_umask (guestfs_h *g);\n"
27982 #: ../src/guestfs-actions.pod:2604
27984 "Return the current umask. By default the umask is C<022> unless it has been "
27985 "set by calling C<guestfs_umask>."
27989 #: ../src/guestfs-actions.pod:2611
27990 msgid "guestfs_get_verbose"
27994 #: ../src/guestfs-actions.pod:2613
27998 " guestfs_get_verbose (guestfs_h *g);\n"
28003 #: ../src/guestfs-actions.pod:2622
28004 msgid "guestfs_getcon"
28008 #: ../src/guestfs-actions.pod:2624
28012 " guestfs_getcon (guestfs_h *g);\n"
28017 #: ../src/guestfs-actions.pod:2629
28018 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
28022 #: ../src/guestfs-actions.pod:2637
28023 msgid "guestfs_getxattr"
28027 #: ../src/guestfs-actions.pod:2639
28031 " guestfs_getxattr (guestfs_h *g,\n"
28032 " const char *path,\n"
28033 " const char *name,\n"
28034 " size_t *size_r);\n"
28039 #: ../src/guestfs-actions.pod:2645
28041 "Get a single extended attribute from file C<path> named C<name>. This call "
28042 "follows symlinks. If you want to lookup an extended attribute for the "
28043 "symlink itself, use C<guestfs_lgetxattr>."
28047 #: ../src/guestfs-actions.pod:2649 ../src/guestfs-actions.pod:4148
28049 "Normally it is better to get all extended attributes from a file in one go "
28050 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
28051 "implementations are buggy and do not provide a way to list out attributes. "
28052 "For these filesystems (notably ntfs-3g) you have to know the names of the "
28053 "extended attributes you want in advance and call this function."
28057 #: ../src/guestfs-actions.pod:2659
28058 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
28062 #: ../src/guestfs-actions.pod:2661 ../src/guestfs-actions.pod:2874 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4160 ../src/guestfs-actions.pod:6241 ../src/guestfs-actions.pod:6267 ../src/guestfs-actions.pod:6448
28064 "This function returns a buffer, or NULL on error. The size of the returned "
28065 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
28070 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4164
28071 msgid "(Added in 1.7.24)"
28075 #: ../src/guestfs-actions.pod:2667
28076 msgid "guestfs_getxattrs"
28080 #: ../src/guestfs-actions.pod:2669
28083 " struct guestfs_xattr_list *\n"
28084 " guestfs_getxattrs (guestfs_h *g,\n"
28085 " const char *path);\n"
28090 #: ../src/guestfs-actions.pod:2679
28091 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
28095 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:4176 ../src/guestfs-actions.pod:4868
28097 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
28098 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
28102 #: ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4392 ../src/guestfs-actions.pod:4428 ../src/guestfs-actions.pod:6621 ../src/guestfs-actions.pod:7145 ../src/guestfs-actions.pod:8650
28103 msgid "(Added in 1.0.59)"
28107 #: ../src/guestfs-actions.pod:2687
28108 msgid "guestfs_glob_expand"
28112 #: ../src/guestfs-actions.pod:2689
28116 " guestfs_glob_expand (guestfs_h *g,\n"
28117 " const char *pattern);\n"
28122 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:7329 ../src/guestfs-actions.pod:7346
28123 msgid "(Added in 1.0.50)"
28127 #: ../src/guestfs-actions.pod:2710
28128 msgid "guestfs_grep"
28132 #: ../src/guestfs-actions.pod:2712
28136 " guestfs_grep (guestfs_h *g,\n"
28137 " const char *regex,\n"
28138 " const char *path);\n"
28143 #: ../src/guestfs-actions.pod:2729
28144 msgid "guestfs_grepi"
28148 #: ../src/guestfs-actions.pod:2731
28152 " guestfs_grepi (guestfs_h *g,\n"
28153 " const char *regex,\n"
28154 " const char *path);\n"
28159 #: ../src/guestfs-actions.pod:2748
28160 msgid "guestfs_grub_install"
28164 #: ../src/guestfs-actions.pod:2750
28168 " guestfs_grub_install (guestfs_h *g,\n"
28169 " const char *root,\n"
28170 " const char *device);\n"
28175 #: ../src/guestfs-actions.pod:2793
28176 msgid "(Added in 1.0.17)"
28180 #: ../src/guestfs-actions.pod:2795
28181 msgid "guestfs_head"
28185 #: ../src/guestfs-actions.pod:2797
28189 " guestfs_head (guestfs_h *g,\n"
28190 " const char *path);\n"
28195 #: ../src/guestfs-actions.pod:2813
28196 msgid "guestfs_head_n"
28200 #: ../src/guestfs-actions.pod:2815
28204 " guestfs_head_n (guestfs_h *g,\n"
28206 " const char *path);\n"
28211 #: ../src/guestfs-actions.pod:2837
28212 msgid "guestfs_hexdump"
28216 #: ../src/guestfs-actions.pod:2839
28220 " guestfs_hexdump (guestfs_h *g,\n"
28221 " const char *path);\n"
28226 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:7410 ../src/guestfs-actions.pod:7465
28227 msgid "(Added in 1.0.22)"
28231 #: ../src/guestfs-actions.pod:2854
28232 msgid "guestfs_initrd_cat"
28236 #: ../src/guestfs-actions.pod:2856
28240 " guestfs_initrd_cat (guestfs_h *g,\n"
28241 " const char *initrdpath,\n"
28242 " const char *filename,\n"
28243 " size_t *size_r);\n"
28248 #: ../src/guestfs-actions.pod:2872
28249 msgid "See also C<guestfs_initrd_list>."
28253 #: ../src/guestfs-actions.pod:2883
28254 msgid "guestfs_initrd_list"
28258 #: ../src/guestfs-actions.pod:2885
28262 " guestfs_initrd_list (guestfs_h *g,\n"
28263 " const char *path);\n"
28268 #: ../src/guestfs-actions.pod:2905
28269 msgid "guestfs_inotify_add_watch"
28273 #: ../src/guestfs-actions.pod:2907
28277 " guestfs_inotify_add_watch (guestfs_h *g,\n"
28278 " const char *path,\n"
28284 #: ../src/guestfs-actions.pod:2926
28285 msgid "guestfs_inotify_close"
28289 #: ../src/guestfs-actions.pod:2928
28293 " guestfs_inotify_close (guestfs_h *g);\n"
28298 #: ../src/guestfs-actions.pod:2939
28299 msgid "guestfs_inotify_files"
28303 #: ../src/guestfs-actions.pod:2941
28307 " guestfs_inotify_files (guestfs_h *g);\n"
28312 #: ../src/guestfs-actions.pod:2944
28314 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
28315 "returns a list of pathnames of objects that were touched. The returned "
28316 "pathnames are sorted and deduplicated."
28320 #: ../src/guestfs-actions.pod:2954
28321 msgid "guestfs_inotify_init"
28325 #: ../src/guestfs-actions.pod:2956
28329 " guestfs_inotify_init (guestfs_h *g,\n"
28330 " int maxevents);\n"
28335 #: ../src/guestfs-actions.pod:2964
28337 "C<maxevents> is the maximum number of events which will be queued up between "
28338 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
28339 "passed as C<0>, then the kernel (or previously set) default is used. For "
28340 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
28341 "throws away events, but records the fact that it threw them away by setting "
28342 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
28343 "C<guestfs_inotify_read>)."
28347 #: ../src/guestfs-actions.pod:2974
28349 "Before any events are generated, you have to add some watches to the "
28350 "internal watch list. See: C<guestfs_inotify_add_watch>, "
28351 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
28355 #: ../src/guestfs-actions.pod:2980
28357 "Queued up events should be read periodically by calling "
28358 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
28359 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
28360 "often enough then you risk the internal queue overflowing."
28364 #: ../src/guestfs-actions.pod:2987
28366 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
28367 "This also removes any watches automatically."
28371 #: ../src/guestfs-actions.pod:3000
28372 msgid "guestfs_inotify_read"
28376 #: ../src/guestfs-actions.pod:3002
28379 " struct guestfs_inotify_event_list *\n"
28380 " guestfs_inotify_read (guestfs_h *g);\n"
28385 #: ../src/guestfs-actions.pod:3016
28387 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
28388 "there was an error. I<The caller must call "
28389 "C<guestfs_free_inotify_event_list> after use>."
28393 #: ../src/guestfs-actions.pod:3022
28394 msgid "guestfs_inotify_rm_watch"
28398 #: ../src/guestfs-actions.pod:3024
28402 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
28408 #: ../src/guestfs-actions.pod:3028
28410 "Remove a previously defined inotify watch. See "
28411 "C<guestfs_inotify_add_watch>."
28415 #: ../src/guestfs-actions.pod:3035
28416 msgid "guestfs_inspect_get_arch"
28420 #: ../src/guestfs-actions.pod:3037
28424 " guestfs_inspect_get_arch (guestfs_h *g,\n"
28425 " const char *root);\n"
28430 #: ../src/guestfs-actions.pod:3041
28432 "This returns the architecture of the inspected operating system. The "
28433 "possible return values are listed under C<guestfs_file_architecture>."
28437 #: ../src/guestfs-actions.pod:3055
28438 msgid "guestfs_inspect_get_distro"
28442 #: ../src/guestfs-actions.pod:3057
28446 " guestfs_inspect_get_distro (guestfs_h *g,\n"
28447 " const char *root);\n"
28452 #: ../src/guestfs-actions.pod:3157
28453 msgid "guestfs_inspect_get_drive_mappings"
28457 #: ../src/guestfs-actions.pod:3159
28461 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
28462 " const char *root);\n"
28467 #: ../src/guestfs-actions.pod:3188
28469 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28470 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
28474 #: ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3460 ../src/guestfs-actions.pod:4267 ../src/guestfs-actions.pod:5006 ../src/guestfs-actions.pod:5692 ../src/guestfs-actions.pod:7889
28476 "This function returns a NULL-terminated array of strings, or NULL if there "
28477 "was an error. The array of strings will always have length C<2n+1>, where "
28478 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
28479 "caller must free the strings and the array after use>."
28483 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3663
28484 msgid "(Added in 1.9.17)"
28488 #: ../src/guestfs-actions.pod:3200
28489 msgid "guestfs_inspect_get_filesystems"
28493 #: ../src/guestfs-actions.pod:3202
28497 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
28498 " const char *root);\n"
28503 #: ../src/guestfs-actions.pod:3214
28505 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28506 "C<guestfs_inspect_get_mountpoints>."
28510 #: ../src/guestfs-actions.pod:3223
28511 msgid "guestfs_inspect_get_format"
28515 #: ../src/guestfs-actions.pod:3225
28519 " guestfs_inspect_get_format (guestfs_h *g,\n"
28520 " const char *root);\n"
28525 #: ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3699 ../src/guestfs-actions.pod:3715 ../src/guestfs-actions.pod:3733 ../src/guestfs-actions.pod:6659
28526 msgid "(Added in 1.9.4)"
28530 #: ../src/guestfs-actions.pod:3261
28531 msgid "guestfs_inspect_get_hostname"
28535 #: ../src/guestfs-actions.pod:3263
28539 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
28540 " const char *root);\n"
28545 #: ../src/guestfs-actions.pod:3278
28546 msgid "(Added in 1.7.9)"
28550 #: ../src/guestfs-actions.pod:3280
28551 msgid "guestfs_inspect_get_icon"
28555 #: ../src/guestfs-actions.pod:3282
28559 " guestfs_inspect_get_icon (guestfs_h *g,\n"
28560 " const char *root,\n"
28561 " size_t *size_r,\n"
28567 #: ../src/guestfs-actions.pod:3293
28570 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
28571 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
28576 #: ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:4194 ../src/guestfs-actions.pod:5591
28577 msgid "(Added in 1.11.12)"
28581 #: ../src/guestfs-actions.pod:3362
28582 msgid "guestfs_inspect_get_icon_va"
28586 #: ../src/guestfs-actions.pod:3364
28590 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
28591 " const char *root,\n"
28592 " size_t *size_r,\n"
28593 " va_list args);\n"
28598 #: ../src/guestfs-actions.pod:3370
28599 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
28603 #: ../src/guestfs-actions.pod:3374
28604 msgid "guestfs_inspect_get_icon_argv"
28608 #: ../src/guestfs-actions.pod:3376
28612 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
28613 " const char *root,\n"
28614 " size_t *size_r,\n"
28615 " const struct guestfs_inspect_get_icon_argv "
28621 #: ../src/guestfs-actions.pod:3382
28622 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
28626 #: ../src/guestfs-actions.pod:3386
28627 msgid "guestfs_inspect_get_major_version"
28631 #: ../src/guestfs-actions.pod:3388
28635 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
28636 " const char *root);\n"
28641 #: ../src/guestfs-actions.pod:3410
28642 msgid "guestfs_inspect_get_minor_version"
28646 #: ../src/guestfs-actions.pod:3412
28650 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
28651 " const char *root);\n"
28656 #: ../src/guestfs-actions.pod:3421
28658 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28659 "C<guestfs_inspect_get_major_version>."
28663 #: ../src/guestfs-actions.pod:3428
28664 msgid "guestfs_inspect_get_mountpoints"
28668 #: ../src/guestfs-actions.pod:3430
28672 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
28673 " const char *root);\n"
28678 #: ../src/guestfs-actions.pod:3451
28680 "For operating systems like Windows which still use drive letters, this call "
28681 "will only return an entry for the first drive \"mounted on\" C</>. For "
28682 "information about the mapping of drive letters to partitions, see "
28683 "C<guestfs_inspect_get_drive_mappings>."
28687 #: ../src/guestfs-actions.pod:3457
28689 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28690 "C<guestfs_inspect_get_filesystems>."
28694 #: ../src/guestfs-actions.pod:3468
28695 msgid "guestfs_inspect_get_package_format"
28699 #: ../src/guestfs-actions.pod:3470
28703 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
28704 " const char *root);\n"
28709 #: ../src/guestfs-actions.pod:3474
28711 "This function and C<guestfs_inspect_get_package_management> return the "
28712 "package format and package management tool used by the inspected operating "
28713 "system. For example for Fedora these functions would return C<rpm> (package "
28714 "format) and C<yum> (package management)."
28718 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3521
28719 msgid "(Added in 1.7.5)"
28723 #: ../src/guestfs-actions.pod:3495
28724 msgid "guestfs_inspect_get_package_management"
28728 #: ../src/guestfs-actions.pod:3497
28732 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
28733 " const char *root);\n"
28738 #: ../src/guestfs-actions.pod:3501
28740 "C<guestfs_inspect_get_package_format> and this function return the package "
28741 "format and package management tool used by the inspected operating system. "
28742 "For example for Fedora these functions would return C<rpm> (package format) "
28743 "and C<yum> (package management)."
28747 #: ../src/guestfs-actions.pod:3523
28748 msgid "guestfs_inspect_get_product_name"
28752 #: ../src/guestfs-actions.pod:3525
28756 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
28757 " const char *root);\n"
28762 #: ../src/guestfs-actions.pod:3544
28763 msgid "guestfs_inspect_get_product_variant"
28767 #: ../src/guestfs-actions.pod:3546
28771 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
28772 " const char *root);\n"
28777 #: ../src/guestfs-actions.pod:3569
28779 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
28780 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
28784 #: ../src/guestfs-actions.pod:3576
28785 msgid "(Added in 1.9.13)"
28789 #: ../src/guestfs-actions.pod:3578
28790 msgid "guestfs_inspect_get_roots"
28794 #: ../src/guestfs-actions.pod:3580
28798 " guestfs_inspect_get_roots (guestfs_h *g);\n"
28803 #: ../src/guestfs-actions.pod:3583
28805 "This function is a convenient way to get the list of root devices, as "
28806 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
28807 "the whole inspection process."
28811 #: ../src/guestfs-actions.pod:3587
28813 "This returns an empty list if either no root devices were found or the "
28814 "caller has not called C<guestfs_inspect_os>."
28818 #: ../src/guestfs-actions.pod:3596
28819 msgid "(Added in 1.7.3)"
28823 #: ../src/guestfs-actions.pod:3598
28824 msgid "guestfs_inspect_get_type"
28828 #: ../src/guestfs-actions.pod:3600
28832 " guestfs_inspect_get_type (guestfs_h *g,\n"
28833 " const char *root);\n"
28838 #: ../src/guestfs-actions.pod:3645
28839 msgid "guestfs_inspect_get_windows_current_control_set"
28843 #: ../src/guestfs-actions.pod:3647
28847 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
28848 " const char *root);\n"
28853 #: ../src/guestfs-actions.pod:3665
28854 msgid "guestfs_inspect_get_windows_systemroot"
28858 #: ../src/guestfs-actions.pod:3667
28862 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
28863 " const char *root);\n"
28868 #: ../src/guestfs-actions.pod:3683
28869 msgid "(Added in 1.5.25)"
28873 #: ../src/guestfs-actions.pod:3685
28874 msgid "guestfs_inspect_is_live"
28878 #: ../src/guestfs-actions.pod:3687
28882 " guestfs_inspect_is_live (guestfs_h *g,\n"
28883 " const char *root);\n"
28888 #: ../src/guestfs-actions.pod:3691
28890 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28891 "disk), then this returns true if a live image was detected on the disk."
28895 #: ../src/guestfs-actions.pod:3701
28896 msgid "guestfs_inspect_is_multipart"
28900 #: ../src/guestfs-actions.pod:3703
28904 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
28905 " const char *root);\n"
28910 #: ../src/guestfs-actions.pod:3707
28912 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28913 "disk), then this returns true if the disk is part of a set."
28917 #: ../src/guestfs-actions.pod:3717
28918 msgid "guestfs_inspect_is_netinst"
28922 #: ../src/guestfs-actions.pod:3719
28926 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28927 " const char *root);\n"
28932 #: ../src/guestfs-actions.pod:3723
28934 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28935 "disk), then this returns true if the disk is a network installer, ie. not a "
28936 "self-contained install CD but one which is likely to require network access "
28937 "to complete the install."
28941 #: ../src/guestfs-actions.pod:3735
28942 msgid "guestfs_inspect_list_applications"
28946 #: ../src/guestfs-actions.pod:3737
28949 " struct guestfs_application_list *\n"
28950 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28951 " const char *root);\n"
28956 #: ../src/guestfs-actions.pod:3743
28958 "I<Note:> This call works differently from other parts of the inspection "
28959 "API. You have to call C<guestfs_inspect_os>, then "
28960 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28961 "this. Listing applications is a significantly more difficult operation "
28962 "which requires access to the full filesystem. Also note that unlike the "
28963 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28964 "the libguestfs handle, this call actually reads parts of the mounted "
28965 "filesystems during the call."
28969 #: ../src/guestfs-actions.pod:3833
28971 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28972 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28977 #: ../src/guestfs-actions.pod:3837
28978 msgid "(Added in 1.7.8)"
28982 #: ../src/guestfs-actions.pod:3839
28983 msgid "guestfs_inspect_os"
28987 #: ../src/guestfs-actions.pod:3841
28991 " guestfs_inspect_os (guestfs_h *g);\n"
28996 #: ../src/guestfs-actions.pod:3857
28998 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28999 "functions in order to query further information about each operating system, "
29000 "such as the name and version."
29004 #: ../src/guestfs-actions.pod:3862
29006 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
29007 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
29008 "the contents. This should be called with no disks currently mounted. The "
29009 "function may also use Augeas, so any existing Augeas handle will be closed."
29013 #: ../src/guestfs-actions.pod:3874 ../src/guestfs-actions.pod:4205 ../src/guestfs-actions.pod:4300
29014 msgid "See also C<guestfs_list_filesystems>."
29018 #: ../src/guestfs-actions.pod:3882
29019 msgid "guestfs_is_blockdev"
29023 #: ../src/guestfs-actions.pod:3884
29027 " guestfs_is_blockdev (guestfs_h *g,\n"
29028 " const char *path);\n"
29033 #: ../src/guestfs-actions.pod:3891 ../src/guestfs-actions.pod:3920 ../src/guestfs-actions.pod:3950 ../src/guestfs-actions.pod:3965 ../src/guestfs-actions.pod:3981 ../src/guestfs-actions.pod:4037 ../src/guestfs-actions.pod:4052
29034 msgid "See also C<guestfs_stat>."
29038 #: ../src/guestfs-actions.pod:3895 ../src/guestfs-actions.pod:3924 ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:4041 ../src/guestfs-actions.pod:4056
29039 msgid "(Added in 1.5.10)"
29043 #: ../src/guestfs-actions.pod:3897
29044 msgid "guestfs_is_busy"
29048 #: ../src/guestfs-actions.pod:3899
29052 " guestfs_is_busy (guestfs_h *g);\n"
29057 #: ../src/guestfs-actions.pod:3911
29058 msgid "guestfs_is_chardev"
29062 #: ../src/guestfs-actions.pod:3913
29066 " guestfs_is_chardev (guestfs_h *g,\n"
29067 " const char *path);\n"
29072 #: ../src/guestfs-actions.pod:3926
29073 msgid "guestfs_is_config"
29077 #: ../src/guestfs-actions.pod:3928
29081 " guestfs_is_config (guestfs_h *g);\n"
29086 #: ../src/guestfs-actions.pod:3940
29087 msgid "guestfs_is_dir"
29091 #: ../src/guestfs-actions.pod:3942
29095 " guestfs_is_dir (guestfs_h *g,\n"
29096 " const char *path);\n"
29101 #: ../src/guestfs-actions.pod:3956
29102 msgid "guestfs_is_fifo"
29106 #: ../src/guestfs-actions.pod:3958
29110 " guestfs_is_fifo (guestfs_h *g,\n"
29111 " const char *path);\n"
29116 #: ../src/guestfs-actions.pod:3971
29117 msgid "guestfs_is_file"
29121 #: ../src/guestfs-actions.pod:3973
29125 " guestfs_is_file (guestfs_h *g,\n"
29126 " const char *path);\n"
29131 #: ../src/guestfs-actions.pod:3987
29132 msgid "guestfs_is_launching"
29136 #: ../src/guestfs-actions.pod:3989
29140 " guestfs_is_launching (guestfs_h *g);\n"
29145 #: ../src/guestfs-actions.pod:4001
29146 msgid "guestfs_is_lv"
29150 #: ../src/guestfs-actions.pod:4003
29154 " guestfs_is_lv (guestfs_h *g,\n"
29155 " const char *device);\n"
29160 #: ../src/guestfs-actions.pod:4014
29161 msgid "guestfs_is_ready"
29165 #: ../src/guestfs-actions.pod:4016
29169 " guestfs_is_ready (guestfs_h *g);\n"
29174 #: ../src/guestfs-actions.pod:4028
29175 msgid "guestfs_is_socket"
29179 #: ../src/guestfs-actions.pod:4030
29183 " guestfs_is_socket (guestfs_h *g,\n"
29184 " const char *path);\n"
29189 #: ../src/guestfs-actions.pod:4043
29190 msgid "guestfs_is_symlink"
29194 #: ../src/guestfs-actions.pod:4045
29198 " guestfs_is_symlink (guestfs_h *g,\n"
29199 " const char *path);\n"
29204 #: ../src/guestfs-actions.pod:4058
29205 msgid "guestfs_is_zero"
29209 #: ../src/guestfs-actions.pod:4060
29213 " guestfs_is_zero (guestfs_h *g,\n"
29214 " const char *path);\n"
29219 #: ../src/guestfs-actions.pod:4069 ../src/guestfs-actions.pod:4083
29220 msgid "(Added in 1.11.8)"
29224 #: ../src/guestfs-actions.pod:4071
29225 msgid "guestfs_is_zero_device"
29229 #: ../src/guestfs-actions.pod:4073
29233 " guestfs_is_zero_device (guestfs_h *g,\n"
29234 " const char *device);\n"
29239 #: ../src/guestfs-actions.pod:4085
29240 msgid "guestfs_kill_subprocess"
29244 #: ../src/guestfs-actions.pod:4087
29248 " guestfs_kill_subprocess (guestfs_h *g);\n"
29253 #: ../src/guestfs-actions.pod:4096
29254 msgid "guestfs_launch"
29258 #: ../src/guestfs-actions.pod:4098
29262 " guestfs_launch (guestfs_h *g);\n"
29267 #: ../src/guestfs-actions.pod:4116
29268 msgid "guestfs_lchown"
29272 #: ../src/guestfs-actions.pod:4118
29276 " guestfs_lchown (guestfs_h *g,\n"
29279 " const char *path);\n"
29284 #: ../src/guestfs-actions.pod:4124
29286 "Change the file owner to C<owner> and group to C<group>. This is like "
29287 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
29288 "changed, not the target."
29292 #: ../src/guestfs-actions.pod:4136
29293 msgid "guestfs_lgetxattr"
29297 #: ../src/guestfs-actions.pod:4138
29301 " guestfs_lgetxattr (guestfs_h *g,\n"
29302 " const char *path,\n"
29303 " const char *name,\n"
29304 " size_t *size_r);\n"
29309 #: ../src/guestfs-actions.pod:4158
29310 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
29314 #: ../src/guestfs-actions.pod:4166
29315 msgid "guestfs_lgetxattrs"
29319 #: ../src/guestfs-actions.pod:4168
29322 " struct guestfs_xattr_list *\n"
29323 " guestfs_lgetxattrs (guestfs_h *g,\n"
29324 " const char *path);\n"
29329 #: ../src/guestfs-actions.pod:4172
29331 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
29332 "then it returns the extended attributes of the link itself."
29336 #: ../src/guestfs-actions.pod:4182
29337 msgid "guestfs_list_9p"
29341 #: ../src/guestfs-actions.pod:4184
29345 " guestfs_list_9p (guestfs_h *g);\n"
29350 #: ../src/guestfs-actions.pod:4196
29351 msgid "guestfs_list_devices"
29355 #: ../src/guestfs-actions.pod:4198
29359 " guestfs_list_devices (guestfs_h *g);\n"
29364 #: ../src/guestfs-actions.pod:4213
29365 msgid "guestfs_list_dm_devices"
29369 #: ../src/guestfs-actions.pod:4215
29373 " guestfs_list_dm_devices (guestfs_h *g);\n"
29378 #: ../src/guestfs-actions.pod:4220
29380 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
29381 "previous call to C<guestfs_luks_open>."
29385 #: ../src/guestfs-actions.pod:4223
29387 "Device mapper devices which correspond to logical volumes are I<not> "
29388 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
29393 #: ../src/guestfs-actions.pod:4231 ../src/guestfs-actions.pod:5830
29394 msgid "(Added in 1.11.15)"
29398 #: ../src/guestfs-actions.pod:4233
29399 msgid "guestfs_list_filesystems"
29403 #: ../src/guestfs-actions.pod:4235
29407 " guestfs_list_filesystems (guestfs_h *g);\n"
29412 #: ../src/guestfs-actions.pod:4255
29414 "This command runs other libguestfs commands, which might include "
29415 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
29416 "soon after launch and only when nothing is mounted."
29420 #: ../src/guestfs-actions.pod:4259
29422 "Not all of the filesystems returned will be mountable. In particular, swap "
29423 "partitions are returned in the list. Also this command does not check that "
29424 "each filesystem found is valid and mountable, and some filesystems might be "
29425 "mountable but require special options. Filesystems may not all belong to a "
29426 "single logical operating system (use C<guestfs_inspect_os> to look for "
29431 #: ../src/guestfs-actions.pod:4273 ../src/guestfs-actions.pod:6190
29432 msgid "(Added in 1.5.15)"
29436 #: ../src/guestfs-actions.pod:4275
29437 msgid "guestfs_list_md_devices"
29441 #: ../src/guestfs-actions.pod:4277
29445 " guestfs_list_md_devices (guestfs_h *g);\n"
29450 #: ../src/guestfs-actions.pod:4286 ../src/guestfs-actions.pod:7851
29451 msgid "(Added in 1.15.4)"
29455 #: ../src/guestfs-actions.pod:4288
29456 msgid "guestfs_list_partitions"
29460 #: ../src/guestfs-actions.pod:4290
29464 " guestfs_list_partitions (guestfs_h *g);\n"
29469 #: ../src/guestfs-actions.pod:4297
29471 "This does not return logical volumes. For that you will need to call "
29476 #: ../src/guestfs-actions.pod:4308
29481 #: ../src/guestfs-actions.pod:4310
29485 " guestfs_ll (guestfs_h *g,\n"
29486 " const char *directory);\n"
29491 #: ../src/guestfs-actions.pod:4325
29496 #: ../src/guestfs-actions.pod:4327
29500 " guestfs_ln (guestfs_h *g,\n"
29501 " const char *target,\n"
29502 " const char *linkname);\n"
29507 #: ../src/guestfs-actions.pod:4338
29508 msgid "guestfs_ln_f"
29512 #: ../src/guestfs-actions.pod:4340
29516 " guestfs_ln_f (guestfs_h *g,\n"
29517 " const char *target,\n"
29518 " const char *linkname);\n"
29523 #: ../src/guestfs-actions.pod:4352
29524 msgid "guestfs_ln_s"
29528 #: ../src/guestfs-actions.pod:4354
29532 " guestfs_ln_s (guestfs_h *g,\n"
29533 " const char *target,\n"
29534 " const char *linkname);\n"
29539 #: ../src/guestfs-actions.pod:4365
29540 msgid "guestfs_ln_sf"
29544 #: ../src/guestfs-actions.pod:4367
29548 " guestfs_ln_sf (guestfs_h *g,\n"
29549 " const char *target,\n"
29550 " const char *linkname);\n"
29555 #: ../src/guestfs-actions.pod:4379
29556 msgid "guestfs_lremovexattr"
29560 #: ../src/guestfs-actions.pod:4381
29564 " guestfs_lremovexattr (guestfs_h *g,\n"
29565 " const char *xattr,\n"
29566 " const char *path);\n"
29571 #: ../src/guestfs-actions.pod:4386
29573 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
29574 "link, then it removes an extended attribute of the link itself."
29578 #: ../src/guestfs-actions.pod:4394
29583 #: ../src/guestfs-actions.pod:4396
29587 " guestfs_ls (guestfs_h *g,\n"
29588 " const char *directory);\n"
29593 #: ../src/guestfs-actions.pod:4404
29595 "This command is mostly useful for interactive sessions. Programs should "
29596 "probably use C<guestfs_readdir> instead."
29600 #: ../src/guestfs-actions.pod:4413
29601 msgid "guestfs_lsetxattr"
29605 #: ../src/guestfs-actions.pod:4415
29609 " guestfs_lsetxattr (guestfs_h *g,\n"
29610 " const char *xattr,\n"
29611 " const char *val,\n"
29613 " const char *path);\n"
29618 #: ../src/guestfs-actions.pod:4422
29620 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
29621 "then it sets an extended attribute of the link itself."
29625 #: ../src/guestfs-actions.pod:4430
29626 msgid "guestfs_lstat"
29630 #: ../src/guestfs-actions.pod:4432
29633 " struct guestfs_stat *\n"
29634 " guestfs_lstat (guestfs_h *g,\n"
29635 " const char *path);\n"
29640 #: ../src/guestfs-actions.pod:4438
29642 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
29643 "link, then the link is stat-ed, not the file it refers to."
29647 #: ../src/guestfs-actions.pod:4444 ../src/guestfs-actions.pod:7370
29649 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
29650 "error. I<The caller must call C<guestfs_free_stat> after use>."
29654 #: ../src/guestfs-actions.pod:4448 ../src/guestfs-actions.pod:7374 ../src/guestfs-actions.pod:7392 ../src/guestfs-actions.pod:7895
29655 msgid "(Added in 0.9.2)"
29659 #: ../src/guestfs-actions.pod:4450
29660 msgid "guestfs_lstatlist"
29664 #: ../src/guestfs-actions.pod:4452
29667 " struct guestfs_stat_list *\n"
29668 " guestfs_lstatlist (guestfs_h *g,\n"
29669 " const char *path,\n"
29670 " char *const *names);\n"
29675 #: ../src/guestfs-actions.pod:4457
29677 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
29678 "files, where all files are in the directory C<path>. C<names> is the list "
29679 "of files from this directory."
29683 #: ../src/guestfs-actions.pod:4466
29685 "This call is intended for programs that want to efficiently list a directory "
29686 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
29687 "for a similarly efficient call for getting extended attributes. Very long "
29688 "directory listings might cause the protocol message size to be exceeded, "
29689 "causing this call to fail. The caller must split up such requests into "
29690 "smaller groups of names."
29694 #: ../src/guestfs-actions.pod:4474
29696 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
29697 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
29701 #: ../src/guestfs-actions.pod:4480
29702 msgid "guestfs_luks_add_key"
29706 #: ../src/guestfs-actions.pod:4482
29710 " guestfs_luks_add_key (guestfs_h *g,\n"
29711 " const char *device,\n"
29712 " const char *key,\n"
29713 " const char *newkey,\n"
29719 #: ../src/guestfs-actions.pod:4494
29721 "Note that if C<keyslot> already contains a key, then this command will "
29722 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
29726 #: ../src/guestfs-actions.pod:4500 ../src/guestfs-actions.pod:4537 ../src/guestfs-actions.pod:4557 ../src/guestfs-actions.pod:4577 ../src/guestfs-actions.pod:4612 ../src/guestfs-actions.pod:4631
29728 "This function takes a key or passphrase parameter which could contain "
29729 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
29734 #: ../src/guestfs-actions.pod:4504 ../src/guestfs-actions.pod:4541 ../src/guestfs-actions.pod:4561 ../src/guestfs-actions.pod:4581
29735 msgid "(Added in 1.5.2)"
29739 #: ../src/guestfs-actions.pod:4506
29740 msgid "guestfs_luks_close"
29744 #: ../src/guestfs-actions.pod:4508
29748 " guestfs_luks_close (guestfs_h *g,\n"
29749 " const char *device);\n"
29754 #: ../src/guestfs-actions.pod:4512
29756 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
29757 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
29758 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
29759 "underlying block device."
29763 #: ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4616 ../src/guestfs-actions.pod:4635 ../src/guestfs-actions.pod:4685 ../src/guestfs-actions.pod:4730
29764 msgid "(Added in 1.5.1)"
29768 #: ../src/guestfs-actions.pod:4522
29769 msgid "guestfs_luks_format"
29773 #: ../src/guestfs-actions.pod:4524
29777 " guestfs_luks_format (guestfs_h *g,\n"
29778 " const char *device,\n"
29779 " const char *key,\n"
29785 #: ../src/guestfs-actions.pod:4543
29786 msgid "guestfs_luks_format_cipher"
29790 #: ../src/guestfs-actions.pod:4545
29794 " guestfs_luks_format_cipher (guestfs_h *g,\n"
29795 " const char *device,\n"
29796 " const char *key,\n"
29798 " const char *cipher);\n"
29803 #: ../src/guestfs-actions.pod:4552
29805 "This command is the same as C<guestfs_luks_format> but it also allows you to "
29806 "set the C<cipher> used."
29810 #: ../src/guestfs-actions.pod:4563
29811 msgid "guestfs_luks_kill_slot"
29815 #: ../src/guestfs-actions.pod:4565
29819 " guestfs_luks_kill_slot (guestfs_h *g,\n"
29820 " const char *device,\n"
29821 " const char *key,\n"
29827 #: ../src/guestfs-actions.pod:4583
29828 msgid "guestfs_luks_open"
29832 #: ../src/guestfs-actions.pod:4585
29836 " guestfs_luks_open (guestfs_h *g,\n"
29837 " const char *device,\n"
29838 " const char *key,\n"
29839 " const char *mapname);\n"
29844 #: ../src/guestfs-actions.pod:4603
29846 "If this block device contains LVM volume groups, then calling "
29847 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
29852 #: ../src/guestfs-actions.pod:4607
29853 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
29857 #: ../src/guestfs-actions.pod:4618
29858 msgid "guestfs_luks_open_ro"
29862 #: ../src/guestfs-actions.pod:4620
29866 " guestfs_luks_open_ro (guestfs_h *g,\n"
29867 " const char *device,\n"
29868 " const char *key,\n"
29869 " const char *mapname);\n"
29874 #: ../src/guestfs-actions.pod:4626
29876 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
29881 #: ../src/guestfs-actions.pod:4637
29882 msgid "guestfs_lvcreate"
29886 #: ../src/guestfs-actions.pod:4639
29890 " guestfs_lvcreate (guestfs_h *g,\n"
29891 " const char *logvol,\n"
29892 " const char *volgroup,\n"
29898 #: ../src/guestfs-actions.pod:4652
29899 msgid "guestfs_lvm_canonical_lv_name"
29903 #: ../src/guestfs-actions.pod:4654
29907 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
29908 " const char *lvname);\n"
29913 #: ../src/guestfs-actions.pod:4665
29914 msgid "See also C<guestfs_is_lv>."
29918 #: ../src/guestfs-actions.pod:4670
29919 msgid "(Added in 1.5.24)"
29923 #: ../src/guestfs-actions.pod:4672
29924 msgid "guestfs_lvm_clear_filter"
29928 #: ../src/guestfs-actions.pod:4674
29932 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29937 #: ../src/guestfs-actions.pod:4677
29939 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29940 "see every block device."
29944 #: ../src/guestfs-actions.pod:4687
29945 msgid "guestfs_lvm_remove_all"
29949 #: ../src/guestfs-actions.pod:4689
29953 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29958 #: ../src/guestfs-actions.pod:4699
29959 msgid "guestfs_lvm_set_filter"
29963 #: ../src/guestfs-actions.pod:4701
29967 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29968 " char *const *devices);\n"
29973 #: ../src/guestfs-actions.pod:4732
29974 msgid "guestfs_lvremove"
29978 #: ../src/guestfs-actions.pod:4734
29982 " guestfs_lvremove (guestfs_h *g,\n"
29983 " const char *device);\n"
29988 #: ../src/guestfs-actions.pod:4746 ../src/guestfs-actions.pod:6305 ../src/guestfs-actions.pod:8265
29989 msgid "(Added in 1.0.13)"
29993 #: ../src/guestfs-actions.pod:4748
29994 msgid "guestfs_lvrename"
29998 #: ../src/guestfs-actions.pod:4750
30002 " guestfs_lvrename (guestfs_h *g,\n"
30003 " const char *logvol,\n"
30004 " const char *newlogvol);\n"
30009 #: ../src/guestfs-actions.pod:4759 ../src/guestfs-actions.pod:8278
30010 msgid "(Added in 1.0.83)"
30014 #: ../src/guestfs-actions.pod:4761
30015 msgid "guestfs_lvresize"
30019 #: ../src/guestfs-actions.pod:4763
30023 " guestfs_lvresize (guestfs_h *g,\n"
30024 " const char *device,\n"
30030 #: ../src/guestfs-actions.pod:4776
30031 msgid "guestfs_lvresize_free"
30035 #: ../src/guestfs-actions.pod:4778
30039 " guestfs_lvresize_free (guestfs_h *g,\n"
30040 " const char *lv,\n"
30046 #: ../src/guestfs-actions.pod:4791
30047 msgid "(Added in 1.3.3)"
30051 #: ../src/guestfs-actions.pod:4793
30052 msgid "guestfs_lvs"
30056 #: ../src/guestfs-actions.pod:4795
30060 " guestfs_lvs (guestfs_h *g);\n"
30065 #: ../src/guestfs-actions.pod:4804
30066 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
30070 #: ../src/guestfs-actions.pod:4812
30071 msgid "guestfs_lvs_full"
30075 #: ../src/guestfs-actions.pod:4814
30078 " struct guestfs_lvm_lv_list *\n"
30079 " guestfs_lvs_full (guestfs_h *g);\n"
30084 #: ../src/guestfs-actions.pod:4820
30086 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
30087 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
30092 #: ../src/guestfs-actions.pod:4826
30093 msgid "guestfs_lvuuid"
30097 #: ../src/guestfs-actions.pod:4828
30101 " guestfs_lvuuid (guestfs_h *g,\n"
30102 " const char *device);\n"
30107 #: ../src/guestfs-actions.pod:4839
30108 msgid "guestfs_lxattrlist"
30112 #: ../src/guestfs-actions.pod:4841
30115 " struct guestfs_xattr_list *\n"
30116 " guestfs_lxattrlist (guestfs_h *g,\n"
30117 " const char *path,\n"
30118 " char *const *names);\n"
30123 #: ../src/guestfs-actions.pod:4860
30125 "This call is intended for programs that want to efficiently list a directory "
30126 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
30127 "a similarly efficient call for getting standard stats. Very long directory "
30128 "listings might cause the protocol message size to be exceeded, causing this "
30129 "call to fail. The caller must split up such requests into smaller groups of "
30134 #: ../src/guestfs-actions.pod:4874
30135 msgid "guestfs_md_create"
30139 #: ../src/guestfs-actions.pod:4876
30143 " guestfs_md_create (guestfs_h *g,\n"
30144 " const char *name,\n"
30145 " char *const *devices,\n"
30151 #: ../src/guestfs-actions.pod:4887
30154 " GUESTFS_MD_CREATE_MISSINGBITMAP, int64_t missingbitmap,\n"
30155 " GUESTFS_MD_CREATE_NRDEVICES, int nrdevices,\n"
30156 " GUESTFS_MD_CREATE_SPARE, int spare,\n"
30157 " GUESTFS_MD_CREATE_CHUNK, int64_t chunk,\n"
30158 " GUESTFS_MD_CREATE_LEVEL, const char *level,\n"
30163 #: ../src/guestfs-actions.pod:4949
30164 msgid "guestfs_md_create_va"
30168 #: ../src/guestfs-actions.pod:4951
30172 " guestfs_md_create_va (guestfs_h *g,\n"
30173 " const char *name,\n"
30174 " char *const *devices,\n"
30175 " va_list args);\n"
30180 #: ../src/guestfs-actions.pod:4957
30181 msgid "This is the \"va_list variant\" of L</guestfs_md_create>."
30185 #: ../src/guestfs-actions.pod:4961
30186 msgid "guestfs_md_create_argv"
30190 #: ../src/guestfs-actions.pod:4963
30194 " guestfs_md_create_argv (guestfs_h *g,\n"
30195 " const char *name,\n"
30196 " char *const *devices,\n"
30197 " const struct guestfs_md_create_argv *optargs);\n"
30202 #: ../src/guestfs-actions.pod:4969
30203 msgid "This is the \"argv variant\" of L</guestfs_md_create>."
30207 #: ../src/guestfs-actions.pod:4973
30208 msgid "guestfs_md_detail"
30212 #: ../src/guestfs-actions.pod:4975
30216 " guestfs_md_detail (guestfs_h *g,\n"
30217 " const char *md);\n"
30222 #: ../src/guestfs-actions.pod:5012
30223 msgid "guestfs_md_stop"
30227 #: ../src/guestfs-actions.pod:5014
30231 " guestfs_md_stop (guestfs_h *g,\n"
30232 " const char *md);\n"
30237 #: ../src/guestfs-actions.pod:5023
30238 msgid "guestfs_mkdir"
30242 #: ../src/guestfs-actions.pod:5025
30246 " guestfs_mkdir (guestfs_h *g,\n"
30247 " const char *path);\n"
30252 #: ../src/guestfs-actions.pod:5035
30253 msgid "guestfs_mkdir_mode"
30257 #: ../src/guestfs-actions.pod:5037
30261 " guestfs_mkdir_mode (guestfs_h *g,\n"
30262 " const char *path,\n"
30268 #: ../src/guestfs-actions.pod:5049
30269 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
30273 #: ../src/guestfs-actions.pod:5055
30274 msgid "guestfs_mkdir_p"
30278 #: ../src/guestfs-actions.pod:5057
30282 " guestfs_mkdir_p (guestfs_h *g,\n"
30283 " const char *path);\n"
30288 #: ../src/guestfs-actions.pod:5068
30289 msgid "guestfs_mkdtemp"
30293 #: ../src/guestfs-actions.pod:5070
30297 " guestfs_mkdtemp (guestfs_h *g,\n"
30298 " const char *template);\n"
30303 #: ../src/guestfs-actions.pod:5098
30304 msgid "guestfs_mke2fs_J"
30308 #: ../src/guestfs-actions.pod:5100
30312 " guestfs_mke2fs_J (guestfs_h *g,\n"
30313 " const char *fstype,\n"
30314 " int blocksize,\n"
30315 " const char *device,\n"
30316 " const char *journal);\n"
30321 #: ../src/guestfs-actions.pod:5113
30322 msgid "See also C<guestfs_mke2journal>."
30326 #: ../src/guestfs-actions.pod:5117 ../src/guestfs-actions.pod:5135 ../src/guestfs-actions.pod:5153 ../src/guestfs-actions.pod:5169 ../src/guestfs-actions.pod:5183 ../src/guestfs-actions.pod:5197 ../src/guestfs-actions.pod:5256 ../src/guestfs-actions.pod:5533
30327 msgid "(Added in 1.0.68)"
30331 #: ../src/guestfs-actions.pod:5119
30332 msgid "guestfs_mke2fs_JL"
30336 #: ../src/guestfs-actions.pod:5121
30340 " guestfs_mke2fs_JL (guestfs_h *g,\n"
30341 " const char *fstype,\n"
30342 " int blocksize,\n"
30343 " const char *device,\n"
30344 " const char *label);\n"
30349 #: ../src/guestfs-actions.pod:5131
30350 msgid "See also C<guestfs_mke2journal_L>."
30354 #: ../src/guestfs-actions.pod:5137
30355 msgid "guestfs_mke2fs_JU"
30359 #: ../src/guestfs-actions.pod:5139
30363 " guestfs_mke2fs_JU (guestfs_h *g,\n"
30364 " const char *fstype,\n"
30365 " int blocksize,\n"
30366 " const char *device,\n"
30367 " const char *uuid);\n"
30372 #: ../src/guestfs-actions.pod:5149
30373 msgid "See also C<guestfs_mke2journal_U>."
30377 #: ../src/guestfs-actions.pod:5155
30378 msgid "guestfs_mke2journal"
30382 #: ../src/guestfs-actions.pod:5157
30386 " guestfs_mke2journal (guestfs_h *g,\n"
30387 " int blocksize,\n"
30388 " const char *device);\n"
30393 #: ../src/guestfs-actions.pod:5171
30394 msgid "guestfs_mke2journal_L"
30398 #: ../src/guestfs-actions.pod:5173
30402 " guestfs_mke2journal_L (guestfs_h *g,\n"
30403 " int blocksize,\n"
30404 " const char *label,\n"
30405 " const char *device);\n"
30410 #: ../src/guestfs-actions.pod:5185
30411 msgid "guestfs_mke2journal_U"
30415 #: ../src/guestfs-actions.pod:5187
30419 " guestfs_mke2journal_U (guestfs_h *g,\n"
30420 " int blocksize,\n"
30421 " const char *uuid,\n"
30422 " const char *device);\n"
30427 #: ../src/guestfs-actions.pod:5199
30428 msgid "guestfs_mkfifo"
30432 #: ../src/guestfs-actions.pod:5201
30436 " guestfs_mkfifo (guestfs_h *g,\n"
30438 " const char *path);\n"
30443 #: ../src/guestfs-actions.pod:5206
30445 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
30446 "is just a convenient wrapper around C<guestfs_mknod>."
30450 #: ../src/guestfs-actions.pod:5216
30451 msgid "guestfs_mkfs"
30455 #: ../src/guestfs-actions.pod:5218
30459 " guestfs_mkfs (guestfs_h *g,\n"
30460 " const char *fstype,\n"
30461 " const char *device);\n"
30466 #: ../src/guestfs-actions.pod:5231
30467 msgid "guestfs_mkfs_b"
30471 #: ../src/guestfs-actions.pod:5233
30475 " guestfs_mkfs_b (guestfs_h *g,\n"
30476 " const char *fstype,\n"
30477 " int blocksize,\n"
30478 " const char *device);\n"
30483 #: ../src/guestfs-actions.pod:5239
30485 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
30490 #: ../src/guestfs-actions.pod:5246
30492 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
30493 "block size of the resulting filesystem. Supported block sizes depend on the "
30494 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
30498 #: ../src/guestfs-actions.pod:5258
30499 msgid "guestfs_mkfs_opts"
30503 #: ../src/guestfs-actions.pod:5260
30507 " guestfs_mkfs_opts (guestfs_h *g,\n"
30508 " const char *fstype,\n"
30509 " const char *device,\n"
30515 #: ../src/guestfs-actions.pod:5271
30518 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
30519 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
30520 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
30521 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
30526 #: ../src/guestfs-actions.pod:5319
30527 msgid "(Added in 1.7.19)"
30531 #: ../src/guestfs-actions.pod:5321
30532 msgid "guestfs_mkfs_opts_va"
30536 #: ../src/guestfs-actions.pod:5323
30540 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
30541 " const char *fstype,\n"
30542 " const char *device,\n"
30543 " va_list args);\n"
30548 #: ../src/guestfs-actions.pod:5329
30549 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
30553 #: ../src/guestfs-actions.pod:5333
30554 msgid "guestfs_mkfs_opts_argv"
30558 #: ../src/guestfs-actions.pod:5335
30562 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
30563 " const char *fstype,\n"
30564 " const char *device,\n"
30565 " const struct guestfs_mkfs_opts_argv *optargs);\n"
30570 #: ../src/guestfs-actions.pod:5341
30571 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
30575 #: ../src/guestfs-actions.pod:5345
30576 msgid "guestfs_mkmountpoint"
30580 #: ../src/guestfs-actions.pod:5347
30584 " guestfs_mkmountpoint (guestfs_h *g,\n"
30585 " const char *exemptpath);\n"
30590 #: ../src/guestfs-actions.pod:5351
30592 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
30593 "that can be used to create extra mountpoints before mounting the first "
30598 #: ../src/guestfs-actions.pod:5375
30600 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
30601 "may get unexpected errors if you try to mix these calls. It is safest to "
30602 "manually unmount filesystems and remove mountpoints after use."
30606 #: ../src/guestfs-actions.pod:5379
30608 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
30609 "first, so for this to work for manual mountpoints, you must ensure that the "
30610 "innermost mountpoints have the longest pathnames, as in the example code "
30615 #: ../src/guestfs-actions.pod:5386
30617 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
30618 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
30619 "can also trigger these issues."
30623 #: ../src/guestfs-actions.pod:5392 ../src/guestfs-actions.pod:5698 ../src/guestfs-actions.pod:6725
30624 msgid "(Added in 1.0.62)"
30628 #: ../src/guestfs-actions.pod:5394
30629 msgid "guestfs_mknod"
30633 #: ../src/guestfs-actions.pod:5396
30637 " guestfs_mknod (guestfs_h *g,\n"
30641 " const char *path);\n"
30646 #: ../src/guestfs-actions.pod:5411
30648 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
30649 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
30650 "regular file). These constants are available in the standard Linux header "
30651 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
30652 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
30653 "the appropriate constant for you."
30657 #: ../src/guestfs-actions.pod:5425
30658 msgid "guestfs_mknod_b"
30662 #: ../src/guestfs-actions.pod:5427
30666 " guestfs_mknod_b (guestfs_h *g,\n"
30670 " const char *path);\n"
30675 #: ../src/guestfs-actions.pod:5434
30677 "This call creates a block device node called C<path> with mode C<mode> and "
30678 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30679 "wrapper around C<guestfs_mknod>."
30683 #: ../src/guestfs-actions.pod:5444
30684 msgid "guestfs_mknod_c"
30688 #: ../src/guestfs-actions.pod:5446
30692 " guestfs_mknod_c (guestfs_h *g,\n"
30696 " const char *path);\n"
30701 #: ../src/guestfs-actions.pod:5453
30703 "This call creates a char device node called C<path> with mode C<mode> and "
30704 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
30705 "wrapper around C<guestfs_mknod>."
30709 #: ../src/guestfs-actions.pod:5463
30710 msgid "guestfs_mkswap"
30714 #: ../src/guestfs-actions.pod:5465
30718 " guestfs_mkswap (guestfs_h *g,\n"
30719 " const char *device);\n"
30724 #: ../src/guestfs-actions.pod:5475
30725 msgid "guestfs_mkswap_L"
30729 #: ../src/guestfs-actions.pod:5477
30733 " guestfs_mkswap_L (guestfs_h *g,\n"
30734 " const char *label,\n"
30735 " const char *device);\n"
30740 #: ../src/guestfs-actions.pod:5492
30741 msgid "guestfs_mkswap_U"
30745 #: ../src/guestfs-actions.pod:5494
30749 " guestfs_mkswap_U (guestfs_h *g,\n"
30750 " const char *uuid,\n"
30751 " const char *device);\n"
30756 #: ../src/guestfs-actions.pod:5505
30757 msgid "guestfs_mkswap_file"
30761 #: ../src/guestfs-actions.pod:5507
30765 " guestfs_mkswap_file (guestfs_h *g,\n"
30766 " const char *path);\n"
30771 #: ../src/guestfs-actions.pod:5513
30773 "This command just writes a swap file signature to an existing file. To "
30774 "create the file itself, use something like C<guestfs_fallocate>."
30778 #: ../src/guestfs-actions.pod:5520
30779 msgid "guestfs_modprobe"
30783 #: ../src/guestfs-actions.pod:5522
30787 " guestfs_modprobe (guestfs_h *g,\n"
30788 " const char *modulename);\n"
30793 #: ../src/guestfs-actions.pod:5535
30794 msgid "guestfs_mount"
30798 #: ../src/guestfs-actions.pod:5537
30802 " guestfs_mount (guestfs_h *g,\n"
30803 " const char *device,\n"
30804 " const char *mountpoint);\n"
30809 #: ../src/guestfs-actions.pod:5556
30811 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
30812 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
30813 "problems for users. If your program might need to work with older versions "
30814 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
30815 "for the first parameter if you don't want any options)."
30819 #: ../src/guestfs-actions.pod:5567
30820 msgid "guestfs_mount_9p"
30824 #: ../src/guestfs-actions.pod:5569
30828 " guestfs_mount_9p (guestfs_h *g,\n"
30829 " const char *mounttag,\n"
30830 " const char *mountpoint,\n"
30836 #: ../src/guestfs-actions.pod:5580
30839 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
30844 #: ../src/guestfs-actions.pod:5593
30845 msgid "guestfs_mount_9p_va"
30849 #: ../src/guestfs-actions.pod:5595
30853 " guestfs_mount_9p_va (guestfs_h *g,\n"
30854 " const char *mounttag,\n"
30855 " const char *mountpoint,\n"
30856 " va_list args);\n"
30861 #: ../src/guestfs-actions.pod:5601
30862 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
30866 #: ../src/guestfs-actions.pod:5605
30867 msgid "guestfs_mount_9p_argv"
30871 #: ../src/guestfs-actions.pod:5607
30875 " guestfs_mount_9p_argv (guestfs_h *g,\n"
30876 " const char *mounttag,\n"
30877 " const char *mountpoint,\n"
30878 " const struct guestfs_mount_9p_argv *optargs);\n"
30883 #: ../src/guestfs-actions.pod:5613
30884 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
30888 #: ../src/guestfs-actions.pod:5617
30889 msgid "guestfs_mount_loop"
30893 #: ../src/guestfs-actions.pod:5619
30897 " guestfs_mount_loop (guestfs_h *g,\n"
30898 " const char *file,\n"
30899 " const char *mountpoint);\n"
30904 #: ../src/guestfs-actions.pod:5632
30905 msgid "guestfs_mount_options"
30909 #: ../src/guestfs-actions.pod:5634
30913 " guestfs_mount_options (guestfs_h *g,\n"
30914 " const char *options,\n"
30915 " const char *device,\n"
30916 " const char *mountpoint);\n"
30921 #: ../src/guestfs-actions.pod:5640
30923 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30924 "the mount options as for the L<mount(8)> I<-o> flag."
30928 #: ../src/guestfs-actions.pod:5650 ../src/guestfs-actions.pod:5664 ../src/guestfs-actions.pod:5681
30929 msgid "(Added in 1.0.10)"
30933 #: ../src/guestfs-actions.pod:5652
30934 msgid "guestfs_mount_ro"
30938 #: ../src/guestfs-actions.pod:5654
30942 " guestfs_mount_ro (guestfs_h *g,\n"
30943 " const char *device,\n"
30944 " const char *mountpoint);\n"
30949 #: ../src/guestfs-actions.pod:5659
30951 "This is the same as the C<guestfs_mount> command, but it mounts the "
30952 "filesystem with the read-only (I<-o ro>) flag."
30956 #: ../src/guestfs-actions.pod:5666
30957 msgid "guestfs_mount_vfs"
30961 #: ../src/guestfs-actions.pod:5668
30965 " guestfs_mount_vfs (guestfs_h *g,\n"
30966 " const char *options,\n"
30967 " const char *vfstype,\n"
30968 " const char *device,\n"
30969 " const char *mountpoint);\n"
30974 #: ../src/guestfs-actions.pod:5675
30976 "This is the same as the C<guestfs_mount> command, but it allows you to set "
30977 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
30982 #: ../src/guestfs-actions.pod:5683
30983 msgid "guestfs_mountpoints"
30987 #: ../src/guestfs-actions.pod:5685
30991 " guestfs_mountpoints (guestfs_h *g);\n"
30996 #: ../src/guestfs-actions.pod:5688
30998 "This call is similar to C<guestfs_mounts>. That call returns a list of "
30999 "devices. This one returns a hash table (map) of device name to directory "
31000 "where the device is mounted."
31004 #: ../src/guestfs-actions.pod:5700
31005 msgid "guestfs_mounts"
31009 #: ../src/guestfs-actions.pod:5702
31013 " guestfs_mounts (guestfs_h *g);\n"
31018 #: ../src/guestfs-actions.pod:5710
31019 msgid "See also: C<guestfs_mountpoints>"
31023 #: ../src/guestfs-actions.pod:5718
31028 #: ../src/guestfs-actions.pod:5720
31032 " guestfs_mv (guestfs_h *g,\n"
31033 " const char *src,\n"
31034 " const char *dest);\n"
31039 #: ../src/guestfs-actions.pod:5732
31040 msgid "guestfs_ntfs_3g_probe"
31044 #: ../src/guestfs-actions.pod:5734
31048 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
31050 " const char *device);\n"
31055 #: ../src/guestfs-actions.pod:5753
31056 msgid "(Added in 1.0.43)"
31060 #: ../src/guestfs-actions.pod:5755
31061 msgid "guestfs_ntfsresize"
31065 #: ../src/guestfs-actions.pod:5757
31069 " guestfs_ntfsresize (guestfs_h *g,\n"
31070 " const char *device);\n"
31075 #: ../src/guestfs-actions.pod:5761 ../src/guestfs-actions.pod:5861
31077 "I<This function is deprecated.> In new code, use the "
31078 "L</guestfs_ntfsresize_opts> call instead."
31082 #: ../src/guestfs-actions.pod:5785
31083 msgid "guestfs_ntfsresize_opts"
31087 #: ../src/guestfs-actions.pod:5787
31091 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
31092 " const char *device,\n"
31098 #: ../src/guestfs-actions.pod:5797
31101 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
31102 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
31107 #: ../src/guestfs-actions.pod:5817
31109 "After the resize operation, the filesystem is always marked as requiring a "
31110 "consistency check (for safety). You have to boot into Windows to perform "
31111 "this check and clear this condition. If you I<don't> set the C<force> "
31112 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
31113 "times on a single filesystem without booting into Windows between each "
31118 #: ../src/guestfs-actions.pod:5832
31119 msgid "guestfs_ntfsresize_opts_va"
31123 #: ../src/guestfs-actions.pod:5834
31127 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
31128 " const char *device,\n"
31129 " va_list args);\n"
31134 #: ../src/guestfs-actions.pod:5839
31135 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
31139 #: ../src/guestfs-actions.pod:5843
31140 msgid "guestfs_ntfsresize_opts_argv"
31144 #: ../src/guestfs-actions.pod:5845
31148 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
31149 " const char *device,\n"
31150 " const struct guestfs_ntfsresize_opts_argv "
31156 #: ../src/guestfs-actions.pod:5850
31157 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
31161 #: ../src/guestfs-actions.pod:5854
31162 msgid "guestfs_ntfsresize_size"
31166 #: ../src/guestfs-actions.pod:5856
31170 " guestfs_ntfsresize_size (guestfs_h *g,\n"
31171 " const char *device,\n"
31172 " int64_t size);\n"
31177 #: ../src/guestfs-actions.pod:5868
31179 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
31180 "to specify the new size (in bytes) explicitly."
31184 #: ../src/guestfs-actions.pod:5873 ../src/guestfs-actions.pod:6332 ../src/guestfs-actions.pod:6405 ../src/guestfs-actions.pod:6673 ../src/guestfs-actions.pod:8422
31185 msgid "(Added in 1.3.14)"
31189 #: ../src/guestfs-actions.pod:5875
31190 msgid "guestfs_part_add"
31194 #: ../src/guestfs-actions.pod:5877
31198 " guestfs_part_add (guestfs_h *g,\n"
31199 " const char *device,\n"
31200 " const char *prlogex,\n"
31201 " int64_t startsect,\n"
31202 " int64_t endsect);\n"
31207 #: ../src/guestfs-actions.pod:5884
31209 "This command adds a partition to C<device>. If there is no partition table "
31210 "on the device, call C<guestfs_part_init> first."
31214 #: ../src/guestfs-actions.pod:5896
31216 "Creating a partition which covers the whole disk is not so easy. Use "
31217 "C<guestfs_part_disk> to do that."
31221 #: ../src/guestfs-actions.pod:5901 ../src/guestfs-actions.pod:5936 ../src/guestfs-actions.pod:5989 ../src/guestfs-actions.pod:6073 ../src/guestfs-actions.pod:6111 ../src/guestfs-actions.pod:6130 ../src/guestfs-actions.pod:6170
31222 msgid "(Added in 1.0.78)"
31226 #: ../src/guestfs-actions.pod:5903
31227 msgid "guestfs_part_del"
31231 #: ../src/guestfs-actions.pod:5905
31235 " guestfs_part_del (guestfs_h *g,\n"
31236 " const char *device,\n"
31242 #: ../src/guestfs-actions.pod:5920
31243 msgid "guestfs_part_disk"
31247 #: ../src/guestfs-actions.pod:5922
31251 " guestfs_part_disk (guestfs_h *g,\n"
31252 " const char *device,\n"
31253 " const char *parttype);\n"
31258 #: ../src/guestfs-actions.pod:5927
31260 "This command is simply a combination of C<guestfs_part_init> followed by "
31261 "C<guestfs_part_add> to create a single primary partition covering the whole "
31266 #: ../src/guestfs-actions.pod:5931
31268 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
31269 "possible values are described in C<guestfs_part_init>."
31273 #: ../src/guestfs-actions.pod:5938
31274 msgid "guestfs_part_get_bootable"
31278 #: ../src/guestfs-actions.pod:5940
31282 " guestfs_part_get_bootable (guestfs_h *g,\n"
31283 " const char *device,\n"
31289 #: ../src/guestfs-actions.pod:5948
31290 msgid "See also C<guestfs_part_set_bootable>."
31294 #: ../src/guestfs-actions.pod:5954
31295 msgid "guestfs_part_get_mbr_id"
31299 #: ../src/guestfs-actions.pod:5956
31303 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
31304 " const char *device,\n"
31310 #: ../src/guestfs-actions.pod:5964 ../src/guestfs-actions.pod:6146
31312 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
31313 "undefined results for other partition table types (see "
31314 "C<guestfs_part_get_parttype>)."
31318 #: ../src/guestfs-actions.pod:5972
31319 msgid "guestfs_part_get_parttype"
31323 #: ../src/guestfs-actions.pod:5974
31327 " guestfs_part_get_parttype (guestfs_h *g,\n"
31328 " const char *device);\n"
31333 #: ../src/guestfs-actions.pod:5981
31335 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
31336 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
31337 "possible, although unusual. See C<guestfs_part_init> for a full list."
31341 #: ../src/guestfs-actions.pod:5991
31342 msgid "guestfs_part_init"
31346 #: ../src/guestfs-actions.pod:5993
31350 " guestfs_part_init (guestfs_h *g,\n"
31351 " const char *device,\n"
31352 " const char *parttype);\n"
31357 #: ../src/guestfs-actions.pod:6002
31359 "Initially there are no partitions. Following this, you should call "
31360 "C<guestfs_part_add> for each partition required."
31364 #: ../src/guestfs-actions.pod:6075
31365 msgid "guestfs_part_list"
31369 #: ../src/guestfs-actions.pod:6077
31372 " struct guestfs_partition_list *\n"
31373 " guestfs_part_list (guestfs_h *g,\n"
31374 " const char *device);\n"
31379 #: ../src/guestfs-actions.pod:6094
31381 "Start of the partition I<in bytes>. To get sectors you have to divide by "
31382 "the device's sector size, see C<guestfs_blockdev_getss>."
31386 #: ../src/guestfs-actions.pod:6107
31388 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
31389 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
31394 #: ../src/guestfs-actions.pod:6113
31395 msgid "guestfs_part_set_bootable"
31399 #: ../src/guestfs-actions.pod:6115
31403 " guestfs_part_set_bootable (guestfs_h *g,\n"
31404 " const char *device,\n"
31406 " int bootable);\n"
31411 #: ../src/guestfs-actions.pod:6132
31412 msgid "guestfs_part_set_mbr_id"
31416 #: ../src/guestfs-actions.pod:6134
31420 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
31421 " const char *device,\n"
31428 #: ../src/guestfs-actions.pod:6154
31429 msgid "guestfs_part_set_name"
31433 #: ../src/guestfs-actions.pod:6156
31437 " guestfs_part_set_name (guestfs_h *g,\n"
31438 " const char *device,\n"
31440 " const char *name);\n"
31445 #: ../src/guestfs-actions.pod:6172
31446 msgid "guestfs_part_to_dev"
31450 #: ../src/guestfs-actions.pod:6174
31454 " guestfs_part_to_dev (guestfs_h *g,\n"
31455 " const char *partition);\n"
31460 #: ../src/guestfs-actions.pod:6182 ../src/guestfs-actions.pod:6201
31462 "The named partition must exist, for example as a string returned from "
31463 "C<guestfs_list_partitions>."
31467 #: ../src/guestfs-actions.pod:6185
31468 msgid "See also C<guestfs_part_to_partnum>."
31472 #: ../src/guestfs-actions.pod:6192
31473 msgid "guestfs_part_to_partnum"
31477 #: ../src/guestfs-actions.pod:6194
31481 " guestfs_part_to_partnum (guestfs_h *g,\n"
31482 " const char *partition);\n"
31487 #: ../src/guestfs-actions.pod:6204
31488 msgid "See also C<guestfs_part_to_dev>."
31492 #: ../src/guestfs-actions.pod:6210
31493 msgid "guestfs_ping_daemon"
31497 #: ../src/guestfs-actions.pod:6212
31501 " guestfs_ping_daemon (guestfs_h *g);\n"
31506 #: ../src/guestfs-actions.pod:6224
31507 msgid "guestfs_pread"
31511 #: ../src/guestfs-actions.pod:6226
31515 " guestfs_pread (guestfs_h *g,\n"
31516 " const char *path,\n"
31518 " int64_t offset,\n"
31519 " size_t *size_r);\n"
31524 #: ../src/guestfs-actions.pod:6239
31525 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
31529 #: ../src/guestfs-actions.pod:6250
31530 msgid "guestfs_pread_device"
31534 #: ../src/guestfs-actions.pod:6252
31538 " guestfs_pread_device (guestfs_h *g,\n"
31539 " const char *device,\n"
31541 " int64_t offset,\n"
31542 " size_t *size_r);\n"
31547 #: ../src/guestfs-actions.pod:6265
31548 msgid "See also C<guestfs_pread>."
31552 #: ../src/guestfs-actions.pod:6274
31553 msgid "(Added in 1.5.21)"
31557 #: ../src/guestfs-actions.pod:6276
31558 msgid "guestfs_pvcreate"
31562 #: ../src/guestfs-actions.pod:6278
31566 " guestfs_pvcreate (guestfs_h *g,\n"
31567 " const char *device);\n"
31572 #: ../src/guestfs-actions.pod:6290
31573 msgid "guestfs_pvremove"
31577 #: ../src/guestfs-actions.pod:6292
31581 " guestfs_pvremove (guestfs_h *g,\n"
31582 " const char *device);\n"
31587 #: ../src/guestfs-actions.pod:6307
31588 msgid "guestfs_pvresize"
31592 #: ../src/guestfs-actions.pod:6309
31596 " guestfs_pvresize (guestfs_h *g,\n"
31597 " const char *device);\n"
31602 #: ../src/guestfs-actions.pod:6320
31603 msgid "guestfs_pvresize_size"
31607 #: ../src/guestfs-actions.pod:6322
31611 " guestfs_pvresize_size (guestfs_h *g,\n"
31612 " const char *device,\n"
31613 " int64_t size);\n"
31618 #: ../src/guestfs-actions.pod:6327
31620 "This command is the same as C<guestfs_pvresize> except that it allows you to "
31621 "specify the new size (in bytes) explicitly."
31625 #: ../src/guestfs-actions.pod:6334
31626 msgid "guestfs_pvs"
31630 #: ../src/guestfs-actions.pod:6336
31634 " guestfs_pvs (guestfs_h *g);\n"
31639 #: ../src/guestfs-actions.pod:6345
31640 msgid "See also C<guestfs_pvs_full>."
31644 #: ../src/guestfs-actions.pod:6353
31645 msgid "guestfs_pvs_full"
31649 #: ../src/guestfs-actions.pod:6355
31652 " struct guestfs_lvm_pv_list *\n"
31653 " guestfs_pvs_full (guestfs_h *g);\n"
31658 #: ../src/guestfs-actions.pod:6361
31660 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
31661 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
31666 #: ../src/guestfs-actions.pod:6367
31667 msgid "guestfs_pvuuid"
31671 #: ../src/guestfs-actions.pod:6369
31675 " guestfs_pvuuid (guestfs_h *g,\n"
31676 " const char *device);\n"
31681 #: ../src/guestfs-actions.pod:6380
31682 msgid "guestfs_pwrite"
31686 #: ../src/guestfs-actions.pod:6382
31690 " guestfs_pwrite (guestfs_h *g,\n"
31691 " const char *path,\n"
31692 " const char *content,\n"
31693 " size_t content_size,\n"
31694 " int64_t offset);\n"
31699 #: ../src/guestfs-actions.pod:6398
31700 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
31704 #: ../src/guestfs-actions.pod:6407
31705 msgid "guestfs_pwrite_device"
31709 #: ../src/guestfs-actions.pod:6409
31713 " guestfs_pwrite_device (guestfs_h *g,\n"
31714 " const char *device,\n"
31715 " const char *content,\n"
31716 " size_t content_size,\n"
31717 " int64_t offset);\n"
31722 #: ../src/guestfs-actions.pod:6424
31723 msgid "See also C<guestfs_pwrite>."
31727 #: ../src/guestfs-actions.pod:6431
31728 msgid "(Added in 1.5.20)"
31732 #: ../src/guestfs-actions.pod:6433
31733 msgid "guestfs_read_file"
31737 #: ../src/guestfs-actions.pod:6435
31741 " guestfs_read_file (guestfs_h *g,\n"
31742 " const char *path,\n"
31743 " size_t *size_r);\n"
31748 #: ../src/guestfs-actions.pod:6443
31750 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
31751 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
31752 "function is limited in the total size of file that can be handled."
31756 #: ../src/guestfs-actions.pod:6455
31757 msgid "(Added in 1.0.63)"
31761 #: ../src/guestfs-actions.pod:6457
31762 msgid "guestfs_read_lines"
31766 #: ../src/guestfs-actions.pod:6459
31770 " guestfs_read_lines (guestfs_h *g,\n"
31771 " const char *path);\n"
31776 #: ../src/guestfs-actions.pod:6468
31778 "Note that this function cannot correctly handle binary files (specifically, "
31779 "files containing C<\\0> character which is treated as end of line). For "
31780 "those you need to use the C<guestfs_read_file> function which has a more "
31781 "complex interface."
31785 #: ../src/guestfs-actions.pod:6479
31786 msgid "guestfs_readdir"
31790 #: ../src/guestfs-actions.pod:6481
31793 " struct guestfs_dirent_list *\n"
31794 " guestfs_readdir (guestfs_h *g,\n"
31795 " const char *dir);\n"
31800 #: ../src/guestfs-actions.pod:6535
31802 "This function is primarily intended for use by programs. To get a simple "
31803 "list of names, use C<guestfs_ls>. To get a printable directory for human "
31804 "consumption, use C<guestfs_ll>."
31808 #: ../src/guestfs-actions.pod:6539
31810 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
31811 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
31816 #: ../src/guestfs-actions.pod:6545
31817 msgid "guestfs_readlink"
31821 #: ../src/guestfs-actions.pod:6547
31825 " guestfs_readlink (guestfs_h *g,\n"
31826 " const char *path);\n"
31831 #: ../src/guestfs-actions.pod:6558
31832 msgid "guestfs_readlinklist"
31836 #: ../src/guestfs-actions.pod:6560
31840 " guestfs_readlinklist (guestfs_h *g,\n"
31841 " const char *path,\n"
31842 " char *const *names);\n"
31847 #: ../src/guestfs-actions.pod:6593
31848 msgid "guestfs_realpath"
31852 #: ../src/guestfs-actions.pod:6595
31856 " guestfs_realpath (guestfs_h *g,\n"
31857 " const char *path);\n"
31862 #: ../src/guestfs-actions.pod:6607
31863 msgid "guestfs_removexattr"
31867 #: ../src/guestfs-actions.pod:6609
31871 " guestfs_removexattr (guestfs_h *g,\n"
31872 " const char *xattr,\n"
31873 " const char *path);\n"
31878 #: ../src/guestfs-actions.pod:6617
31879 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
31883 #: ../src/guestfs-actions.pod:6623
31884 msgid "guestfs_resize2fs"
31888 #: ../src/guestfs-actions.pod:6625
31892 " guestfs_resize2fs (guestfs_h *g,\n"
31893 " const char *device);\n"
31898 #: ../src/guestfs-actions.pod:6632
31900 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
31901 "C<device> before calling this command. For unknown reasons C<resize2fs> "
31902 "sometimes gives an error about this and sometimes not. In any case, it is "
31903 "always safe to call C<guestfs_e2fsck_f> before calling this function."
31907 #: ../src/guestfs-actions.pod:6642
31908 msgid "guestfs_resize2fs_M"
31912 #: ../src/guestfs-actions.pod:6644
31916 " guestfs_resize2fs_M (guestfs_h *g,\n"
31917 " const char *device);\n"
31922 #: ../src/guestfs-actions.pod:6648
31924 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
31925 "resized to its minimum size. This works like the I<-M> option to the "
31926 "C<resize2fs> command."
31930 #: ../src/guestfs-actions.pod:6652
31932 "To get the resulting size of the filesystem you should call "
31933 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
31934 "These two numbers, multiplied together, give the resulting size of the "
31935 "minimal filesystem in bytes."
31939 #: ../src/guestfs-actions.pod:6661
31940 msgid "guestfs_resize2fs_size"
31944 #: ../src/guestfs-actions.pod:6663
31948 " guestfs_resize2fs_size (guestfs_h *g,\n"
31949 " const char *device,\n"
31950 " int64_t size);\n"
31955 #: ../src/guestfs-actions.pod:6668
31957 "This command is the same as C<guestfs_resize2fs> except that it allows you "
31958 "to specify the new size (in bytes) explicitly."
31962 #: ../src/guestfs-actions.pod:6675
31967 #: ../src/guestfs-actions.pod:6677
31971 " guestfs_rm (guestfs_h *g,\n"
31972 " const char *path);\n"
31977 #: ../src/guestfs-actions.pod:6687
31978 msgid "guestfs_rm_rf"
31982 #: ../src/guestfs-actions.pod:6689
31986 " guestfs_rm_rf (guestfs_h *g,\n"
31987 " const char *path);\n"
31992 #: ../src/guestfs-actions.pod:6701
31993 msgid "guestfs_rmdir"
31997 #: ../src/guestfs-actions.pod:6703
32001 " guestfs_rmdir (guestfs_h *g,\n"
32002 " const char *path);\n"
32007 #: ../src/guestfs-actions.pod:6713
32008 msgid "guestfs_rmmountpoint"
32012 #: ../src/guestfs-actions.pod:6715
32016 " guestfs_rmmountpoint (guestfs_h *g,\n"
32017 " const char *exemptpath);\n"
32022 #: ../src/guestfs-actions.pod:6719
32024 "This calls removes a mountpoint that was previously created with "
32025 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
32029 #: ../src/guestfs-actions.pod:6727
32030 msgid "guestfs_scrub_device"
32034 #: ../src/guestfs-actions.pod:6729
32038 " guestfs_scrub_device (guestfs_h *g,\n"
32039 " const char *device);\n"
32044 #: ../src/guestfs-actions.pod:6741 ../src/guestfs-actions.pod:6759 ../src/guestfs-actions.pod:6778
32045 msgid "(Added in 1.0.52)"
32049 #: ../src/guestfs-actions.pod:6743
32050 msgid "guestfs_scrub_file"
32054 #: ../src/guestfs-actions.pod:6745
32058 " guestfs_scrub_file (guestfs_h *g,\n"
32059 " const char *file);\n"
32064 #: ../src/guestfs-actions.pod:6761
32065 msgid "guestfs_scrub_freespace"
32069 #: ../src/guestfs-actions.pod:6763
32073 " guestfs_scrub_freespace (guestfs_h *g,\n"
32074 " const char *dir);\n"
32079 #: ../src/guestfs-actions.pod:6767
32081 "This command creates the directory C<dir> and then fills it with files until "
32082 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
32083 "and deletes them. The intention is to scrub any free space on the partition "
32084 "containing C<dir>."
32088 #: ../src/guestfs-actions.pod:6780
32089 msgid "guestfs_set_append"
32093 #: ../src/guestfs-actions.pod:6782
32097 " guestfs_set_append (guestfs_h *g,\n"
32098 " const char *append);\n"
32103 #: ../src/guestfs-actions.pod:6799
32104 msgid "guestfs_set_attach_method"
32108 #: ../src/guestfs-actions.pod:6801
32112 " guestfs_set_attach_method (guestfs_h *g,\n"
32113 " const char *attachmethod);\n"
32118 #: ../src/guestfs-actions.pod:6829
32119 msgid "guestfs_set_autosync"
32123 #: ../src/guestfs-actions.pod:6831
32127 " guestfs_set_autosync (guestfs_h *g,\n"
32128 " int autosync);\n"
32133 #: ../src/guestfs-actions.pod:6847
32134 msgid "guestfs_set_direct"
32138 #: ../src/guestfs-actions.pod:6849
32142 " guestfs_set_direct (guestfs_h *g,\n"
32148 #: ../src/guestfs-actions.pod:6857
32150 "One consequence of this is that log messages aren't caught by the library "
32151 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
32156 #: ../src/guestfs-actions.pod:6870
32157 msgid "guestfs_set_e2label"
32161 #: ../src/guestfs-actions.pod:6872
32165 " guestfs_set_e2label (guestfs_h *g,\n"
32166 " const char *device,\n"
32167 " const char *label);\n"
32172 #: ../src/guestfs-actions.pod:6881
32174 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
32175 "the existing label on a filesystem."
32179 #: ../src/guestfs-actions.pod:6888
32180 msgid "guestfs_set_e2uuid"
32184 #: ../src/guestfs-actions.pod:6890
32188 " guestfs_set_e2uuid (guestfs_h *g,\n"
32189 " const char *device,\n"
32190 " const char *uuid);\n"
32195 #: ../src/guestfs-actions.pod:6900
32197 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
32198 "the existing UUID of a filesystem."
32202 #: ../src/guestfs-actions.pod:6907
32203 msgid "guestfs_set_memsize"
32207 #: ../src/guestfs-actions.pod:6909
32211 " guestfs_set_memsize (guestfs_h *g,\n"
32217 #: ../src/guestfs-actions.pod:6913
32219 "This sets the memory size in megabytes allocated to the qemu subprocess. "
32220 "This only has any effect if called before C<guestfs_launch>."
32224 #: ../src/guestfs-actions.pod:6928
32225 msgid "guestfs_set_network"
32229 #: ../src/guestfs-actions.pod:6930
32233 " guestfs_set_network (guestfs_h *g,\n"
32239 #: ../src/guestfs-actions.pod:6940
32241 "You must call this before calling C<guestfs_launch>, otherwise it has no "
32246 #: ../src/guestfs-actions.pod:6947
32247 msgid "guestfs_set_path"
32251 #: ../src/guestfs-actions.pod:6949
32255 " guestfs_set_path (guestfs_h *g,\n"
32256 " const char *searchpath);\n"
32261 #: ../src/guestfs-actions.pod:6964
32262 msgid "guestfs_set_pgroup"
32266 #: ../src/guestfs-actions.pod:6966
32270 " guestfs_set_pgroup (guestfs_h *g,\n"
32276 #: ../src/guestfs-actions.pod:6983
32277 msgid "guestfs_set_qemu"
32281 #: ../src/guestfs-actions.pod:6985
32285 " guestfs_set_qemu (guestfs_h *g,\n"
32286 " const char *qemu);\n"
32291 #: ../src/guestfs-actions.pod:7011
32292 msgid "guestfs_set_recovery_proc"
32296 #: ../src/guestfs-actions.pod:7013
32300 " guestfs_set_recovery_proc (guestfs_h *g,\n"
32301 " int recoveryproc);\n"
32306 #: ../src/guestfs-actions.pod:7017
32308 "If this is called with the parameter C<false> then C<guestfs_launch> does "
32309 "not create a recovery process. The purpose of the recovery process is to "
32310 "stop runaway qemu processes in the case where the main program aborts "
32315 #: ../src/guestfs-actions.pod:7022
32317 "This only has any effect if called before C<guestfs_launch>, and the default "
32322 #: ../src/guestfs-actions.pod:7035
32323 msgid "guestfs_set_selinux"
32327 #: ../src/guestfs-actions.pod:7037
32331 " guestfs_set_selinux (guestfs_h *g,\n"
32337 #: ../src/guestfs-actions.pod:7054
32338 msgid "guestfs_set_smp"
32342 #: ../src/guestfs-actions.pod:7056
32346 " guestfs_set_smp (guestfs_h *g,\n"
32352 #: ../src/guestfs-actions.pod:7064
32353 msgid "This function must be called before C<guestfs_launch>."
32357 #: ../src/guestfs-actions.pod:7070
32358 msgid "guestfs_set_trace"
32362 #: ../src/guestfs-actions.pod:7072
32366 " guestfs_set_trace (guestfs_h *g,\n"
32372 #: ../src/guestfs-actions.pod:7086
32374 "Trace messages are normally sent to C<stderr>, unless you register a "
32375 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32379 #: ../src/guestfs-actions.pod:7094
32380 msgid "guestfs_set_verbose"
32384 #: ../src/guestfs-actions.pod:7096
32388 " guestfs_set_verbose (guestfs_h *g,\n"
32394 #: ../src/guestfs-actions.pod:7105
32396 "Verbose messages are normally sent to C<stderr>, unless you register a "
32397 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
32401 #: ../src/guestfs-actions.pod:7113
32402 msgid "guestfs_setcon"
32406 #: ../src/guestfs-actions.pod:7115
32410 " guestfs_setcon (guestfs_h *g,\n"
32411 " const char *context);\n"
32416 #: ../src/guestfs-actions.pod:7128
32417 msgid "guestfs_setxattr"
32421 #: ../src/guestfs-actions.pod:7130
32425 " guestfs_setxattr (guestfs_h *g,\n"
32426 " const char *xattr,\n"
32427 " const char *val,\n"
32429 " const char *path);\n"
32434 #: ../src/guestfs-actions.pod:7141
32435 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
32439 #: ../src/guestfs-actions.pod:7147
32440 msgid "guestfs_sfdisk"
32444 #: ../src/guestfs-actions.pod:7149
32448 " guestfs_sfdisk (guestfs_h *g,\n"
32449 " const char *device,\n"
32453 " char *const *lines);\n"
32458 #: ../src/guestfs-actions.pod:7157 ../src/guestfs-actions.pod:7198 ../src/guestfs-actions.pod:7229
32460 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
32465 #: ../src/guestfs-actions.pod:7184
32466 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
32470 #: ../src/guestfs-actions.pod:7191
32471 msgid "guestfs_sfdiskM"
32475 #: ../src/guestfs-actions.pod:7193
32479 " guestfs_sfdiskM (guestfs_h *g,\n"
32480 " const char *device,\n"
32481 " char *const *lines);\n"
32486 #: ../src/guestfs-actions.pod:7205
32488 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
32489 "partition sizes are specified in megabytes only (rounded to the nearest "
32490 "cylinder) and you don't need to specify the cyls, heads and sectors "
32491 "parameters which were rarely if ever used anyway."
32495 #: ../src/guestfs-actions.pod:7211
32497 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
32498 "C<guestfs_part_disk>"
32502 #: ../src/guestfs-actions.pod:7218
32503 msgid "guestfs_sfdisk_N"
32507 #: ../src/guestfs-actions.pod:7220
32511 " guestfs_sfdisk_N (guestfs_h *g,\n"
32512 " const char *device,\n"
32517 " const char *line);\n"
32522 #: ../src/guestfs-actions.pod:7239
32524 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
32525 "for the cyls/heads/sectors parameters."
32529 #: ../src/guestfs-actions.pod:7242
32530 msgid "See also: C<guestfs_part_add>"
32534 #: ../src/guestfs-actions.pod:7248
32535 msgid "guestfs_sfdisk_disk_geometry"
32539 #: ../src/guestfs-actions.pod:7250
32543 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
32544 " const char *device);\n"
32549 #: ../src/guestfs-actions.pod:7254
32551 "This displays the disk geometry of C<device> read from the partition table. "
32552 "Especially in the case where the underlying block device has been resized, "
32553 "this can be different from the kernel's idea of the geometry (see "
32554 "C<guestfs_sfdisk_kernel_geometry>)."
32558 #: ../src/guestfs-actions.pod:7267
32559 msgid "guestfs_sfdisk_kernel_geometry"
32563 #: ../src/guestfs-actions.pod:7269
32567 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
32568 " const char *device);\n"
32573 #: ../src/guestfs-actions.pod:7283
32574 msgid "guestfs_sfdisk_l"
32578 #: ../src/guestfs-actions.pod:7285
32582 " guestfs_sfdisk_l (guestfs_h *g,\n"
32583 " const char *device);\n"
32588 #: ../src/guestfs-actions.pod:7289
32590 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
32595 #: ../src/guestfs-actions.pod:7300
32596 msgid "See also: C<guestfs_part_list>"
32600 #: ../src/guestfs-actions.pod:7307
32605 #: ../src/guestfs-actions.pod:7309
32609 " guestfs_sh (guestfs_h *g,\n"
32610 " const char *command);\n"
32615 #: ../src/guestfs-actions.pod:7316
32616 msgid "This is like C<guestfs_command>, but passes the command to:"
32620 #: ../src/guestfs-actions.pod:7324
32621 msgid "All the provisos about C<guestfs_command> apply to this call."
32625 #: ../src/guestfs-actions.pod:7331
32626 msgid "guestfs_sh_lines"
32630 #: ../src/guestfs-actions.pod:7333
32634 " guestfs_sh_lines (guestfs_h *g,\n"
32635 " const char *command);\n"
32640 #: ../src/guestfs-actions.pod:7337
32642 "This is the same as C<guestfs_sh>, but splits the result into a list of "
32647 #: ../src/guestfs-actions.pod:7340
32648 msgid "See also: C<guestfs_command_lines>"
32652 #: ../src/guestfs-actions.pod:7348
32653 msgid "guestfs_sleep"
32657 #: ../src/guestfs-actions.pod:7350
32661 " guestfs_sleep (guestfs_h *g,\n"
32667 #: ../src/guestfs-actions.pod:7358
32668 msgid "(Added in 1.0.41)"
32672 #: ../src/guestfs-actions.pod:7360 ../src/guestfs-structs.pod:109
32673 msgid "guestfs_stat"
32677 #: ../src/guestfs-actions.pod:7362
32680 " struct guestfs_stat *\n"
32681 " guestfs_stat (guestfs_h *g,\n"
32682 " const char *path);\n"
32687 #: ../src/guestfs-actions.pod:7376 ../src/guestfs-structs.pod:135
32688 msgid "guestfs_statvfs"
32692 #: ../src/guestfs-actions.pod:7378
32695 " struct guestfs_statvfs *\n"
32696 " guestfs_statvfs (guestfs_h *g,\n"
32697 " const char *path);\n"
32702 #: ../src/guestfs-actions.pod:7388
32704 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
32705 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
32709 #: ../src/guestfs-actions.pod:7394
32710 msgid "guestfs_strings"
32714 #: ../src/guestfs-actions.pod:7396
32718 " guestfs_strings (guestfs_h *g,\n"
32719 " const char *path);\n"
32724 #: ../src/guestfs-actions.pod:7412
32725 msgid "guestfs_strings_e"
32729 #: ../src/guestfs-actions.pod:7414
32733 " guestfs_strings_e (guestfs_h *g,\n"
32734 " const char *encoding,\n"
32735 " const char *path);\n"
32740 #: ../src/guestfs-actions.pod:7419
32742 "This is like the C<guestfs_strings> command, but allows you to specify the "
32743 "encoding of strings that are looked for in the source file C<path>."
32747 #: ../src/guestfs-actions.pod:7429
32749 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
32750 "ISO-8859-X (this is what C<guestfs_strings> uses)."
32754 #: ../src/guestfs-actions.pod:7467
32755 msgid "guestfs_swapoff_device"
32759 #: ../src/guestfs-actions.pod:7469
32763 " guestfs_swapoff_device (guestfs_h *g,\n"
32764 " const char *device);\n"
32769 #: ../src/guestfs-actions.pod:7473
32771 "This command disables the libguestfs appliance swap device or partition "
32772 "named C<device>. See C<guestfs_swapon_device>."
32776 #: ../src/guestfs-actions.pod:7481
32777 msgid "guestfs_swapoff_file"
32781 #: ../src/guestfs-actions.pod:7483
32785 " guestfs_swapoff_file (guestfs_h *g,\n"
32786 " const char *file);\n"
32791 #: ../src/guestfs-actions.pod:7493
32792 msgid "guestfs_swapoff_label"
32796 #: ../src/guestfs-actions.pod:7495
32800 " guestfs_swapoff_label (guestfs_h *g,\n"
32801 " const char *label);\n"
32806 #: ../src/guestfs-actions.pod:7506
32807 msgid "guestfs_swapoff_uuid"
32811 #: ../src/guestfs-actions.pod:7508
32815 " guestfs_swapoff_uuid (guestfs_h *g,\n"
32816 " const char *uuid);\n"
32821 #: ../src/guestfs-actions.pod:7519
32822 msgid "guestfs_swapon_device"
32826 #: ../src/guestfs-actions.pod:7521
32830 " guestfs_swapon_device (guestfs_h *g,\n"
32831 " const char *device);\n"
32836 #: ../src/guestfs-actions.pod:7525
32838 "This command enables the libguestfs appliance to use the swap device or "
32839 "partition named C<device>. The increased memory is made available for all "
32840 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
32844 #: ../src/guestfs-actions.pod:7541
32845 msgid "guestfs_swapon_file"
32849 #: ../src/guestfs-actions.pod:7543
32853 " guestfs_swapon_file (guestfs_h *g,\n"
32854 " const char *file);\n"
32859 #: ../src/guestfs-actions.pod:7547
32861 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
32866 #: ../src/guestfs-actions.pod:7554
32867 msgid "guestfs_swapon_label"
32871 #: ../src/guestfs-actions.pod:7556
32875 " guestfs_swapon_label (guestfs_h *g,\n"
32876 " const char *label);\n"
32881 #: ../src/guestfs-actions.pod:7560
32883 "This command enables swap to a labeled swap partition. See "
32884 "C<guestfs_swapon_device> for other notes."
32888 #: ../src/guestfs-actions.pod:7567
32889 msgid "guestfs_swapon_uuid"
32893 #: ../src/guestfs-actions.pod:7569
32897 " guestfs_swapon_uuid (guestfs_h *g,\n"
32898 " const char *uuid);\n"
32903 #: ../src/guestfs-actions.pod:7573
32905 "This command enables swap to a swap partition with the given UUID. See "
32906 "C<guestfs_swapon_device> for other notes."
32910 #: ../src/guestfs-actions.pod:7580
32911 msgid "guestfs_sync"
32915 #: ../src/guestfs-actions.pod:7582
32919 " guestfs_sync (guestfs_h *g);\n"
32924 #: ../src/guestfs-actions.pod:7595
32925 msgid "guestfs_tail"
32929 #: ../src/guestfs-actions.pod:7597
32933 " guestfs_tail (guestfs_h *g,\n"
32934 " const char *path);\n"
32939 #: ../src/guestfs-actions.pod:7613
32940 msgid "guestfs_tail_n"
32944 #: ../src/guestfs-actions.pod:7615
32948 " guestfs_tail_n (guestfs_h *g,\n"
32950 " const char *path);\n"
32955 #: ../src/guestfs-actions.pod:7637
32956 msgid "guestfs_tar_in"
32960 #: ../src/guestfs-actions.pod:7639
32964 " guestfs_tar_in (guestfs_h *g,\n"
32965 " const char *tarfile,\n"
32966 " const char *directory);\n"
32971 #: ../src/guestfs-actions.pod:7647
32972 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
32976 #: ../src/guestfs-actions.pod:7652 ../src/guestfs-actions.pod:7669 ../src/guestfs-actions.pod:7685 ../src/guestfs-actions.pod:7701
32977 msgid "(Added in 1.0.3)"
32981 #: ../src/guestfs-actions.pod:7654
32982 msgid "guestfs_tar_out"
32986 #: ../src/guestfs-actions.pod:7656
32990 " guestfs_tar_out (guestfs_h *g,\n"
32991 " const char *directory,\n"
32992 " const char *tarfile);\n"
32997 #: ../src/guestfs-actions.pod:7664
32999 "To download a compressed tarball, use C<guestfs_tgz_out> or "
33000 "C<guestfs_txz_out>."
33004 #: ../src/guestfs-actions.pod:7671
33005 msgid "guestfs_tgz_in"
33009 #: ../src/guestfs-actions.pod:7673
33013 " guestfs_tgz_in (guestfs_h *g,\n"
33014 " const char *tarball,\n"
33015 " const char *directory);\n"
33020 #: ../src/guestfs-actions.pod:7681
33021 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
33025 #: ../src/guestfs-actions.pod:7687
33026 msgid "guestfs_tgz_out"
33030 #: ../src/guestfs-actions.pod:7689
33034 " guestfs_tgz_out (guestfs_h *g,\n"
33035 " const char *directory,\n"
33036 " const char *tarball);\n"
33041 #: ../src/guestfs-actions.pod:7697
33042 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
33046 #: ../src/guestfs-actions.pod:7703
33047 msgid "guestfs_touch"
33051 #: ../src/guestfs-actions.pod:7705
33055 " guestfs_touch (guestfs_h *g,\n"
33056 " const char *path);\n"
33061 #: ../src/guestfs-actions.pod:7720
33062 msgid "guestfs_truncate"
33066 #: ../src/guestfs-actions.pod:7722
33070 " guestfs_truncate (guestfs_h *g,\n"
33071 " const char *path);\n"
33076 #: ../src/guestfs-actions.pod:7733
33077 msgid "guestfs_truncate_size"
33081 #: ../src/guestfs-actions.pod:7735
33085 " guestfs_truncate_size (guestfs_h *g,\n"
33086 " const char *path,\n"
33087 " int64_t size);\n"
33092 #: ../src/guestfs-actions.pod:7743
33094 "If the current file size is less than C<size> then the file is extended to "
33095 "the required size with zero bytes. This creates a sparse file (ie. disk "
33096 "blocks are not allocated for the file until you write to it). To create a "
33097 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
33101 #: ../src/guestfs-actions.pod:7753
33102 msgid "guestfs_tune2fs"
33106 #: ../src/guestfs-actions.pod:7755
33110 " guestfs_tune2fs (guestfs_h *g,\n"
33111 " const char *device,\n"
33117 #: ../src/guestfs-actions.pod:7765
33120 " GUESTFS_TUNE2FS_FORCE, int force,\n"
33121 " GUESTFS_TUNE2FS_MAXMOUNTCOUNT, int maxmountcount,\n"
33122 " GUESTFS_TUNE2FS_MOUNTCOUNT, int mountcount,\n"
33123 " GUESTFS_TUNE2FS_ERRORBEHAVIOR, const char *errorbehavior,\n"
33124 " GUESTFS_TUNE2FS_GROUP, int64_t group,\n"
33125 " GUESTFS_TUNE2FS_INTERVALBETWEENCHECKS, int intervalbetweenchecks,\n"
33126 " GUESTFS_TUNE2FS_RESERVEDBLOCKSPERCENTAGE, int reservedblockspercentage,\n"
33127 " GUESTFS_TUNE2FS_LASTMOUNTEDDIRECTORY, const char *lastmounteddirectory,\n"
33128 " GUESTFS_TUNE2FS_RESERVEDBLOCKSCOUNT, int64_t reservedblockscount,\n"
33129 " GUESTFS_TUNE2FS_USER, int64_t user,\n"
33134 #: ../src/guestfs-actions.pod:7845
33136 "To get the current values of filesystem parameters, see "
33137 "C<guestfs_tune2fs_l>. For precise details of how tune2fs works, see the "
33138 "L<tune2fs(8)> man page."
33142 #: ../src/guestfs-actions.pod:7853
33143 msgid "guestfs_tune2fs_va"
33147 #: ../src/guestfs-actions.pod:7855
33151 " guestfs_tune2fs_va (guestfs_h *g,\n"
33152 " const char *device,\n"
33153 " va_list args);\n"
33158 #: ../src/guestfs-actions.pod:7860
33159 msgid "This is the \"va_list variant\" of L</guestfs_tune2fs>."
33163 #: ../src/guestfs-actions.pod:7864
33164 msgid "guestfs_tune2fs_argv"
33168 #: ../src/guestfs-actions.pod:7866
33172 " guestfs_tune2fs_argv (guestfs_h *g,\n"
33173 " const char *device,\n"
33174 " const struct guestfs_tune2fs_argv *optargs);\n"
33179 #: ../src/guestfs-actions.pod:7871
33180 msgid "This is the \"argv variant\" of L</guestfs_tune2fs>."
33184 #: ../src/guestfs-actions.pod:7875
33185 msgid "guestfs_tune2fs_l"
33189 #: ../src/guestfs-actions.pod:7877
33193 " guestfs_tune2fs_l (guestfs_h *g,\n"
33194 " const char *device);\n"
33199 #: ../src/guestfs-actions.pod:7897
33200 msgid "guestfs_txz_in"
33204 #: ../src/guestfs-actions.pod:7899
33208 " guestfs_txz_in (guestfs_h *g,\n"
33209 " const char *tarball,\n"
33210 " const char *directory);\n"
33215 #: ../src/guestfs-actions.pod:7911
33216 msgid "guestfs_txz_out"
33220 #: ../src/guestfs-actions.pod:7913
33224 " guestfs_txz_out (guestfs_h *g,\n"
33225 " const char *directory,\n"
33226 " const char *tarball);\n"
33231 #: ../src/guestfs-actions.pod:7925
33232 msgid "guestfs_umask"
33236 #: ../src/guestfs-actions.pod:7927
33240 " guestfs_umask (guestfs_h *g,\n"
33246 #: ../src/guestfs-actions.pod:7943
33248 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
33249 "C<guestfs_mkdir>."
33253 #: ../src/guestfs-actions.pod:7952
33254 msgid "guestfs_umount"
33258 #: ../src/guestfs-actions.pod:7954
33262 " guestfs_umount (guestfs_h *g,\n"
33263 " const char *pathordevice);\n"
33268 #: ../src/guestfs-actions.pod:7966
33269 msgid "guestfs_umount_all"
33273 #: ../src/guestfs-actions.pod:7968
33277 " guestfs_umount_all (guestfs_h *g);\n"
33282 #: ../src/guestfs-actions.pod:7979
33283 msgid "guestfs_upload"
33287 #: ../src/guestfs-actions.pod:7981
33291 " guestfs_upload (guestfs_h *g,\n"
33292 " const char *filename,\n"
33293 " const char *remotefilename);\n"
33298 #: ../src/guestfs-actions.pod:7991
33299 msgid "See also C<guestfs_download>."
33303 #: ../src/guestfs-actions.pod:8002
33304 msgid "guestfs_upload_offset"
33308 #: ../src/guestfs-actions.pod:8004
33312 " guestfs_upload_offset (guestfs_h *g,\n"
33313 " const char *filename,\n"
33314 " const char *remotefilename,\n"
33315 " int64_t offset);\n"
33320 #: ../src/guestfs-actions.pod:8020
33322 "Note that there is no limit on the amount of data that can be uploaded with "
33323 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
33324 "full amount unless an error occurs."
33328 #: ../src/guestfs-actions.pod:8025
33329 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
33333 #: ../src/guestfs-actions.pod:8036
33334 msgid "guestfs_utimens"
33338 #: ../src/guestfs-actions.pod:8038
33342 " guestfs_utimens (guestfs_h *g,\n"
33343 " const char *path,\n"
33344 " int64_t atsecs,\n"
33345 " int64_t atnsecs,\n"
33346 " int64_t mtsecs,\n"
33347 " int64_t mtnsecs);\n"
33352 #: ../src/guestfs-actions.pod:8067 ../src/guestfs-structs.pod:175
33353 msgid "guestfs_version"
33357 #: ../src/guestfs-actions.pod:8069
33360 " struct guestfs_version *\n"
33361 " guestfs_version (guestfs_h *g);\n"
33366 #: ../src/guestfs-actions.pod:8097
33368 "I<Note:> Don't use this call to test for availability of features. In "
33369 "enterprise distributions we backport features from later versions into "
33370 "earlier versions, making this an unreliable way to test for features. Use "
33371 "C<guestfs_available> instead."
33375 #: ../src/guestfs-actions.pod:8103
33377 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
33378 "error. I<The caller must call C<guestfs_free_version> after use>."
33382 #: ../src/guestfs-actions.pod:8107
33383 msgid "(Added in 1.0.58)"
33387 #: ../src/guestfs-actions.pod:8109
33388 msgid "guestfs_vfs_label"
33392 #: ../src/guestfs-actions.pod:8111
33396 " guestfs_vfs_label (guestfs_h *g,\n"
33397 " const char *device);\n"
33402 #: ../src/guestfs-actions.pod:8120
33403 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
33407 #: ../src/guestfs-actions.pod:8125 ../src/guestfs-actions.pod:8162
33408 msgid "(Added in 1.3.18)"
33412 #: ../src/guestfs-actions.pod:8127
33413 msgid "guestfs_vfs_type"
33417 #: ../src/guestfs-actions.pod:8129
33421 " guestfs_vfs_type (guestfs_h *g,\n"
33422 " const char *device);\n"
33427 #: ../src/guestfs-actions.pod:8146
33428 msgid "guestfs_vfs_uuid"
33432 #: ../src/guestfs-actions.pod:8148
33436 " guestfs_vfs_uuid (guestfs_h *g,\n"
33437 " const char *device);\n"
33442 #: ../src/guestfs-actions.pod:8157
33443 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
33447 #: ../src/guestfs-actions.pod:8164
33448 msgid "guestfs_vg_activate"
33452 #: ../src/guestfs-actions.pod:8166
33456 " guestfs_vg_activate (guestfs_h *g,\n"
33458 " char *const *volgroups);\n"
33463 #: ../src/guestfs-actions.pod:8183
33464 msgid "guestfs_vg_activate_all"
33468 #: ../src/guestfs-actions.pod:8185
33472 " guestfs_vg_activate_all (guestfs_h *g,\n"
33473 " int activate);\n"
33478 #: ../src/guestfs-actions.pod:8198
33479 msgid "guestfs_vgcreate"
33483 #: ../src/guestfs-actions.pod:8200
33487 " guestfs_vgcreate (guestfs_h *g,\n"
33488 " const char *volgroup,\n"
33489 " char *const *physvols);\n"
33494 #: ../src/guestfs-actions.pod:8212
33495 msgid "guestfs_vglvuuids"
33499 #: ../src/guestfs-actions.pod:8214
33503 " guestfs_vglvuuids (guestfs_h *g,\n"
33504 " const char *vgname);\n"
33509 #: ../src/guestfs-actions.pod:8221
33511 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
33512 "associate logical volumes and volume groups."
33516 #: ../src/guestfs-actions.pod:8224
33517 msgid "See also C<guestfs_vgpvuuids>."
33521 #: ../src/guestfs-actions.pod:8232
33522 msgid "guestfs_vgpvuuids"
33526 #: ../src/guestfs-actions.pod:8234
33530 " guestfs_vgpvuuids (guestfs_h *g,\n"
33531 " const char *vgname);\n"
33536 #: ../src/guestfs-actions.pod:8241
33538 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
33539 "associate physical volumes and volume groups."
33543 #: ../src/guestfs-actions.pod:8244
33544 msgid "See also C<guestfs_vglvuuids>."
33548 #: ../src/guestfs-actions.pod:8252
33549 msgid "guestfs_vgremove"
33553 #: ../src/guestfs-actions.pod:8254
33557 " guestfs_vgremove (guestfs_h *g,\n"
33558 " const char *vgname);\n"
33563 #: ../src/guestfs-actions.pod:8267
33564 msgid "guestfs_vgrename"
33568 #: ../src/guestfs-actions.pod:8269
33572 " guestfs_vgrename (guestfs_h *g,\n"
33573 " const char *volgroup,\n"
33574 " const char *newvolgroup);\n"
33579 #: ../src/guestfs-actions.pod:8280
33580 msgid "guestfs_vgs"
33584 #: ../src/guestfs-actions.pod:8282
33588 " guestfs_vgs (guestfs_h *g);\n"
33593 #: ../src/guestfs-actions.pod:8291
33594 msgid "See also C<guestfs_vgs_full>."
33598 #: ../src/guestfs-actions.pod:8299
33599 msgid "guestfs_vgs_full"
33603 #: ../src/guestfs-actions.pod:8301
33606 " struct guestfs_lvm_vg_list *\n"
33607 " guestfs_vgs_full (guestfs_h *g);\n"
33612 #: ../src/guestfs-actions.pod:8307
33614 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
33615 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
33620 #: ../src/guestfs-actions.pod:8313
33621 msgid "guestfs_vgscan"
33625 #: ../src/guestfs-actions.pod:8315
33629 " guestfs_vgscan (guestfs_h *g);\n"
33634 #: ../src/guestfs-actions.pod:8325
33635 msgid "guestfs_vguuid"
33639 #: ../src/guestfs-actions.pod:8327
33643 " guestfs_vguuid (guestfs_h *g,\n"
33644 " const char *vgname);\n"
33649 #: ../src/guestfs-actions.pod:8338
33650 msgid "guestfs_wait_ready"
33654 #: ../src/guestfs-actions.pod:8340
33658 " guestfs_wait_ready (guestfs_h *g);\n"
33663 #: ../src/guestfs-actions.pod:8343
33665 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
33670 #: ../src/guestfs-actions.pod:8350
33671 msgid "This function is a no op."
33675 #: ../src/guestfs-actions.pod:8352
33677 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
33678 "calling C<guestfs_launch> to wait for the launch to complete. However this "
33679 "is no longer necessary because C<guestfs_launch> now does the waiting."
33683 #: ../src/guestfs-actions.pod:8357
33685 "If you see any calls to this function in code then you can just remove them, "
33686 "unless you want to retain compatibility with older versions of the API."
33690 #: ../src/guestfs-actions.pod:8365
33691 msgid "guestfs_wc_c"
33695 #: ../src/guestfs-actions.pod:8367
33699 " guestfs_wc_c (guestfs_h *g,\n"
33700 " const char *path);\n"
33705 #: ../src/guestfs-actions.pod:8378
33706 msgid "guestfs_wc_l"
33710 #: ../src/guestfs-actions.pod:8380
33714 " guestfs_wc_l (guestfs_h *g,\n"
33715 " const char *path);\n"
33720 #: ../src/guestfs-actions.pod:8391
33721 msgid "guestfs_wc_w"
33725 #: ../src/guestfs-actions.pod:8393
33729 " guestfs_wc_w (guestfs_h *g,\n"
33730 " const char *path);\n"
33735 #: ../src/guestfs-actions.pod:8404
33736 msgid "guestfs_write"
33740 #: ../src/guestfs-actions.pod:8406
33744 " guestfs_write (guestfs_h *g,\n"
33745 " const char *path,\n"
33746 " const char *content,\n"
33747 " size_t content_size);\n"
33752 #: ../src/guestfs-actions.pod:8415
33753 msgid "See also C<guestfs_write_append>."
33757 #: ../src/guestfs-actions.pod:8424
33758 msgid "guestfs_write_append"
33762 #: ../src/guestfs-actions.pod:8426
33766 " guestfs_write_append (guestfs_h *g,\n"
33767 " const char *path,\n"
33768 " const char *content,\n"
33769 " size_t content_size);\n"
33774 #: ../src/guestfs-actions.pod:8435
33775 msgid "See also C<guestfs_write>."
33779 #: ../src/guestfs-actions.pod:8444
33780 msgid "guestfs_write_file"
33784 #: ../src/guestfs-actions.pod:8446
33788 " guestfs_write_file (guestfs_h *g,\n"
33789 " const char *path,\n"
33790 " const char *content,\n"
33796 #: ../src/guestfs-actions.pod:8452
33798 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
33803 #: ../src/guestfs-actions.pod:8477
33804 msgid "guestfs_zegrep"
33808 #: ../src/guestfs-actions.pod:8479
33812 " guestfs_zegrep (guestfs_h *g,\n"
33813 " const char *regex,\n"
33814 " const char *path);\n"
33819 #: ../src/guestfs-actions.pod:8496
33820 msgid "guestfs_zegrepi"
33824 #: ../src/guestfs-actions.pod:8498
33828 " guestfs_zegrepi (guestfs_h *g,\n"
33829 " const char *regex,\n"
33830 " const char *path);\n"
33835 #: ../src/guestfs-actions.pod:8515
33836 msgid "guestfs_zero"
33840 #: ../src/guestfs-actions.pod:8517
33844 " guestfs_zero (guestfs_h *g,\n"
33845 " const char *device);\n"
33850 #: ../src/guestfs-actions.pod:8531
33852 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
33853 "C<guestfs_is_zero_device>"
33857 #: ../src/guestfs-actions.pod:8543
33858 msgid "guestfs_zero_device"
33862 #: ../src/guestfs-actions.pod:8545
33866 " guestfs_zero_device (guestfs_h *g,\n"
33867 " const char *device);\n"
33872 #: ../src/guestfs-actions.pod:8549
33874 "This command writes zeroes over the entire C<device>. Compare with "
33875 "C<guestfs_zero> which just zeroes the first few blocks of a device."
33879 #: ../src/guestfs-actions.pod:8564
33880 msgid "(Added in 1.3.1)"
33884 #: ../src/guestfs-actions.pod:8566
33885 msgid "guestfs_zerofree"
33889 #: ../src/guestfs-actions.pod:8568
33893 " guestfs_zerofree (guestfs_h *g,\n"
33894 " const char *device);\n"
33899 #: ../src/guestfs-actions.pod:8587
33900 msgid "guestfs_zfgrep"
33904 #: ../src/guestfs-actions.pod:8589
33908 " guestfs_zfgrep (guestfs_h *g,\n"
33909 " const char *pattern,\n"
33910 " const char *path);\n"
33915 #: ../src/guestfs-actions.pod:8606
33916 msgid "guestfs_zfgrepi"
33920 #: ../src/guestfs-actions.pod:8608
33924 " guestfs_zfgrepi (guestfs_h *g,\n"
33925 " const char *pattern,\n"
33926 " const char *path);\n"
33931 #: ../src/guestfs-actions.pod:8625
33932 msgid "guestfs_zfile"
33936 #: ../src/guestfs-actions.pod:8627
33940 " guestfs_zfile (guestfs_h *g,\n"
33941 " const char *meth,\n"
33942 " const char *path);\n"
33947 #: ../src/guestfs-actions.pod:8632
33949 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
33954 #: ../src/guestfs-actions.pod:8644
33956 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
33961 #: ../src/guestfs-actions.pod:8652
33962 msgid "guestfs_zgrep"
33966 #: ../src/guestfs-actions.pod:8654
33970 " guestfs_zgrep (guestfs_h *g,\n"
33971 " const char *regex,\n"
33972 " const char *path);\n"
33977 #: ../src/guestfs-actions.pod:8671
33978 msgid "guestfs_zgrepi"
33982 #: ../src/guestfs-actions.pod:8673
33986 " guestfs_zgrepi (guestfs_h *g,\n"
33987 " const char *regex,\n"
33988 " const char *path);\n"
33993 #: ../src/guestfs-availability.pod:3
33998 #: ../src/guestfs-availability.pod:5
34000 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
34001 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
34002 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
34003 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
34004 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
34008 #: ../src/guestfs-availability.pod:21
34013 #: ../src/guestfs-availability.pod:23
34014 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
34018 #: ../src/guestfs-availability.pod:26
34023 #: ../src/guestfs-availability.pod:28
34024 msgid "The following functions: L</guestfs_grub_install>"
34028 #: ../src/guestfs-availability.pod:31
34033 #: ../src/guestfs-availability.pod:33
34035 "The following functions: L</guestfs_inotify_add_watch> "
34036 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
34037 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
34041 #: ../src/guestfs-availability.pod:41
34042 msgid "B<linuxfsuuid>"
34046 #: ../src/guestfs-availability.pod:43
34048 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
34049 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
34053 #: ../src/guestfs-availability.pod:50
34054 msgid "B<linuxmodules>"
34058 #: ../src/guestfs-availability.pod:52
34059 msgid "The following functions: L</guestfs_modprobe>"
34063 #: ../src/guestfs-availability.pod:55
34064 msgid "B<linuxxattrs>"
34068 #: ../src/guestfs-availability.pod:57
34070 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
34071 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
34072 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
34073 "L</guestfs_setxattr>"
34077 #: ../src/guestfs-availability.pod:68
34082 #: ../src/guestfs-availability.pod:70
34084 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
34085 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
34086 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
34090 #: ../src/guestfs-availability.pod:79
34095 #: ../src/guestfs-availability.pod:81
34097 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
34098 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
34099 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
34100 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
34101 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
34102 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
34103 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
34104 "L</guestfs_vgs_full>"
34108 #: ../src/guestfs-availability.pod:104
34113 #: ../src/guestfs-availability.pod:106
34115 "The following functions: L</guestfs_md_create> L</guestfs_md_detail> "
34116 "L</guestfs_md_stop>"
34120 #: ../src/guestfs-availability.pod:111
34125 #: ../src/guestfs-availability.pod:113
34127 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
34128 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
34132 #: ../src/guestfs-availability.pod:119
34137 #: ../src/guestfs-availability.pod:121
34138 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
34142 #: ../src/guestfs-availability.pod:124
34143 msgid "B<ntfsprogs>"
34147 #: ../src/guestfs-availability.pod:126
34149 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
34150 "L</guestfs_ntfsresize_size>"
34154 #: ../src/guestfs-availability.pod:131
34155 msgid "B<realpath>"
34159 #: ../src/guestfs-availability.pod:133
34160 msgid "The following functions: L</guestfs_realpath>"
34164 #: ../src/guestfs-availability.pod:136
34169 #: ../src/guestfs-availability.pod:138
34171 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
34172 "L</guestfs_scrub_freespace>"
34176 #: ../src/guestfs-availability.pod:143
34181 #: ../src/guestfs-availability.pod:145
34182 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
34186 #: ../src/guestfs-availability.pod:149
34191 #: ../src/guestfs-availability.pod:151
34192 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
34196 #: ../src/guestfs-availability.pod:155
34197 msgid "B<zerofree>"
34201 #: ../src/guestfs-availability.pod:157
34202 msgid "The following functions: L</guestfs_zerofree>"
34206 #: ../src/guestfs-structs.pod:1
34207 msgid "guestfs_int_bool"
34211 #: ../src/guestfs-structs.pod:3
34214 " struct guestfs_int_bool {\n"
34222 #: ../src/guestfs-structs.pod:8
34225 " struct guestfs_int_bool_list {\n"
34226 " uint32_t len; /* Number of elements in list. */\n"
34227 " struct guestfs_int_bool *val; /* Elements. */\n"
34233 #: ../src/guestfs-structs.pod:13
34236 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
34237 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
34242 #: ../src/guestfs-structs.pod:16
34243 msgid "guestfs_lvm_pv"
34247 #: ../src/guestfs-structs.pod:18
34250 " struct guestfs_lvm_pv {\n"
34251 " char *pv_name;\n"
34252 " /* The next field is NOT nul-terminated, be careful when printing it: "
34254 " char pv_uuid[32];\n"
34256 " uint64_t pv_size;\n"
34257 " uint64_t dev_size;\n"
34258 " uint64_t pv_free;\n"
34259 " uint64_t pv_used;\n"
34260 " char *pv_attr;\n"
34261 " int64_t pv_pe_count;\n"
34262 " int64_t pv_pe_alloc_count;\n"
34263 " char *pv_tags;\n"
34264 " uint64_t pe_start;\n"
34265 " int64_t pv_mda_count;\n"
34266 " uint64_t pv_mda_free;\n"
34272 #: ../src/guestfs-structs.pod:36
34275 " struct guestfs_lvm_pv_list {\n"
34276 " uint32_t len; /* Number of elements in list. */\n"
34277 " struct guestfs_lvm_pv *val; /* Elements. */\n"
34283 #: ../src/guestfs-structs.pod:41
34286 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
34287 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
34292 #: ../src/guestfs-structs.pod:44
34293 msgid "guestfs_lvm_vg"
34297 #: ../src/guestfs-structs.pod:46
34300 " struct guestfs_lvm_vg {\n"
34301 " char *vg_name;\n"
34302 " /* The next field is NOT nul-terminated, be careful when printing it: "
34304 " char vg_uuid[32];\n"
34306 " char *vg_attr;\n"
34307 " uint64_t vg_size;\n"
34308 " uint64_t vg_free;\n"
34309 " char *vg_sysid;\n"
34310 " uint64_t vg_extent_size;\n"
34311 " int64_t vg_extent_count;\n"
34312 " int64_t vg_free_count;\n"
34313 " int64_t max_lv;\n"
34314 " int64_t max_pv;\n"
34315 " int64_t pv_count;\n"
34316 " int64_t lv_count;\n"
34317 " int64_t snap_count;\n"
34318 " int64_t vg_seqno;\n"
34319 " char *vg_tags;\n"
34320 " int64_t vg_mda_count;\n"
34321 " uint64_t vg_mda_free;\n"
34327 #: ../src/guestfs-structs.pod:69
34330 " struct guestfs_lvm_vg_list {\n"
34331 " uint32_t len; /* Number of elements in list. */\n"
34332 " struct guestfs_lvm_vg *val; /* Elements. */\n"
34338 #: ../src/guestfs-structs.pod:74
34341 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
34342 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
34347 #: ../src/guestfs-structs.pod:77
34348 msgid "guestfs_lvm_lv"
34352 #: ../src/guestfs-structs.pod:79
34355 " struct guestfs_lvm_lv {\n"
34356 " char *lv_name;\n"
34357 " /* The next field is NOT nul-terminated, be careful when printing it: "
34359 " char lv_uuid[32];\n"
34360 " char *lv_attr;\n"
34361 " int64_t lv_major;\n"
34362 " int64_t lv_minor;\n"
34363 " int64_t lv_kernel_major;\n"
34364 " int64_t lv_kernel_minor;\n"
34365 " uint64_t lv_size;\n"
34366 " int64_t seg_count;\n"
34368 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
34369 " float snap_percent;\n"
34370 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
34371 " float copy_percent;\n"
34372 " char *move_pv;\n"
34373 " char *lv_tags;\n"
34374 " char *mirror_log;\n"
34375 " char *modules;\n"
34381 #: ../src/guestfs-structs.pod:101
34384 " struct guestfs_lvm_lv_list {\n"
34385 " uint32_t len; /* Number of elements in list. */\n"
34386 " struct guestfs_lvm_lv *val; /* Elements. */\n"
34392 #: ../src/guestfs-structs.pod:106
34395 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
34396 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
34401 #: ../src/guestfs-structs.pod:111
34404 " struct guestfs_stat {\n"
34408 " int64_t nlink;\n"
34413 " int64_t blksize;\n"
34414 " int64_t blocks;\n"
34415 " int64_t atime;\n"
34416 " int64_t mtime;\n"
34417 " int64_t ctime;\n"
34423 #: ../src/guestfs-structs.pod:127
34426 " struct guestfs_stat_list {\n"
34427 " uint32_t len; /* Number of elements in list. */\n"
34428 " struct guestfs_stat *val; /* Elements. */\n"
34434 #: ../src/guestfs-structs.pod:132
34437 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
34438 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
34443 #: ../src/guestfs-structs.pod:137
34446 " struct guestfs_statvfs {\n"
34447 " int64_t bsize;\n"
34448 " int64_t frsize;\n"
34449 " int64_t blocks;\n"
34450 " int64_t bfree;\n"
34451 " int64_t bavail;\n"
34452 " int64_t files;\n"
34453 " int64_t ffree;\n"
34454 " int64_t favail;\n"
34457 " int64_t namemax;\n"
34463 #: ../src/guestfs-structs.pod:151
34466 " struct guestfs_statvfs_list {\n"
34467 " uint32_t len; /* Number of elements in list. */\n"
34468 " struct guestfs_statvfs *val; /* Elements. */\n"
34474 #: ../src/guestfs-structs.pod:156
34477 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
34478 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
34483 #: ../src/guestfs-structs.pod:159
34484 msgid "guestfs_dirent"
34488 #: ../src/guestfs-structs.pod:161
34491 " struct guestfs_dirent {\n"
34500 #: ../src/guestfs-structs.pod:167
34503 " struct guestfs_dirent_list {\n"
34504 " uint32_t len; /* Number of elements in list. */\n"
34505 " struct guestfs_dirent *val; /* Elements. */\n"
34511 #: ../src/guestfs-structs.pod:172
34514 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
34515 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
34520 #: ../src/guestfs-structs.pod:177
34523 " struct guestfs_version {\n"
34524 " int64_t major;\n"
34525 " int64_t minor;\n"
34526 " int64_t release;\n"
34533 #: ../src/guestfs-structs.pod:184
34536 " struct guestfs_version_list {\n"
34537 " uint32_t len; /* Number of elements in list. */\n"
34538 " struct guestfs_version *val; /* Elements. */\n"
34544 #: ../src/guestfs-structs.pod:189
34547 " void guestfs_free_version (struct guestfs_free_version *);\n"
34548 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
34553 #: ../src/guestfs-structs.pod:192
34554 msgid "guestfs_xattr"
34558 #: ../src/guestfs-structs.pod:194
34561 " struct guestfs_xattr {\n"
34562 " char *attrname;\n"
34563 " /* The next two fields describe a byte array. */\n"
34564 " uint32_t attrval_len;\n"
34565 " char *attrval;\n"
34571 #: ../src/guestfs-structs.pod:201
34574 " struct guestfs_xattr_list {\n"
34575 " uint32_t len; /* Number of elements in list. */\n"
34576 " struct guestfs_xattr *val; /* Elements. */\n"
34582 #: ../src/guestfs-structs.pod:206
34585 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
34586 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
34591 #: ../src/guestfs-structs.pod:209
34592 msgid "guestfs_inotify_event"
34596 #: ../src/guestfs-structs.pod:211
34599 " struct guestfs_inotify_event {\n"
34600 " int64_t in_wd;\n"
34601 " uint32_t in_mask;\n"
34602 " uint32_t in_cookie;\n"
34603 " char *in_name;\n"
34609 #: ../src/guestfs-structs.pod:218
34612 " struct guestfs_inotify_event_list {\n"
34613 " uint32_t len; /* Number of elements in list. */\n"
34614 " struct guestfs_inotify_event *val; /* Elements. */\n"
34620 #: ../src/guestfs-structs.pod:223
34623 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
34624 " void guestfs_free_inotify_event_list (struct "
34625 "guestfs_free_inotify_event_list *);\n"
34630 #: ../src/guestfs-structs.pod:226
34631 msgid "guestfs_partition"
34635 #: ../src/guestfs-structs.pod:228
34638 " struct guestfs_partition {\n"
34639 " int32_t part_num;\n"
34640 " uint64_t part_start;\n"
34641 " uint64_t part_end;\n"
34642 " uint64_t part_size;\n"
34648 #: ../src/guestfs-structs.pod:235
34651 " struct guestfs_partition_list {\n"
34652 " uint32_t len; /* Number of elements in list. */\n"
34653 " struct guestfs_partition *val; /* Elements. */\n"
34659 #: ../src/guestfs-structs.pod:240
34662 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
34663 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
34668 #: ../src/guestfs-structs.pod:243
34669 msgid "guestfs_application"
34673 #: ../src/guestfs-structs.pod:245
34676 " struct guestfs_application {\n"
34677 " char *app_name;\n"
34678 " char *app_display_name;\n"
34679 " int32_t app_epoch;\n"
34680 " char *app_version;\n"
34681 " char *app_release;\n"
34682 " char *app_install_path;\n"
34683 " char *app_trans_path;\n"
34684 " char *app_publisher;\n"
34685 " char *app_url;\n"
34686 " char *app_source_package;\n"
34687 " char *app_summary;\n"
34688 " char *app_description;\n"
34694 #: ../src/guestfs-structs.pod:260
34697 " struct guestfs_application_list {\n"
34698 " uint32_t len; /* Number of elements in list. */\n"
34699 " struct guestfs_application *val; /* Elements. */\n"
34705 #: ../src/guestfs-structs.pod:265
34708 " void guestfs_free_application (struct guestfs_free_application *);\n"
34709 " void guestfs_free_application_list (struct guestfs_free_application_list "
34715 #: ../src/guestfs.pod:5
34716 msgid "guestfs - Library for accessing and modifying virtual machine images"
34720 #: ../src/guestfs.pod:11
34723 " guestfs_h *g = guestfs_create ();\n"
34724 " guestfs_add_drive (g, \"guest.img\");\n"
34725 " guestfs_launch (g);\n"
34726 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34727 " guestfs_touch (g, \"/hello\");\n"
34728 " guestfs_umount (g, \"/\");\n"
34729 " guestfs_close (g);\n"
34734 #: ../src/guestfs.pod:25
34736 "Libguestfs is a library for accessing and modifying guest disk images. "
34737 "Amongst the things this is good for: making batch configuration changes to "
34738 "guests, getting disk used/free statistics (see also: virt-df), migrating "
34739 "between virtualization systems (see also: virt-p2v), performing partial "
34740 "backups, performing partial guest clones, cloning guests and changing "
34741 "registry/UUID/hostname info, and much else besides."
34745 #: ../src/guestfs.pod:33
34747 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
34748 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
34749 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
34754 #: ../src/guestfs.pod:38
34756 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
34757 "what filesystem is in each LV, etc.). It can also run commands in the "
34758 "context of the guest. Also you can access filesystems over FUSE."
34762 #: ../src/guestfs.pod:43
34764 "Libguestfs is a library that can be linked with C and C++ management "
34765 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
34766 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
34771 #: ../src/guestfs.pod:48
34773 "You don't need to be root to use libguestfs, although obviously you do need "
34774 "enough permissions to access the disk images."
34778 #: ../src/guestfs.pod:51
34780 "Libguestfs is a large API because it can do many things. For a gentle "
34781 "introduction, please read the L</API OVERVIEW> section next."
34785 #: ../src/guestfs.pod:54
34787 "There are also some example programs in the L<guestfs-examples(3)> manual "
34792 #: ../src/guestfs.pod:57
34793 msgid "API OVERVIEW"
34797 #: ../src/guestfs.pod:59
34799 "This section provides a gentler overview of the libguestfs API. We also try "
34800 "to group API calls together, where that may not be obvious from reading "
34801 "about the individual calls in the main section of this manual."
34805 #: ../src/guestfs.pod:64
34810 #: ../src/guestfs.pod:66
34812 "Before you can use libguestfs calls, you have to create a handle. Then you "
34813 "must add at least one disk image to the handle, followed by launching the "
34814 "handle, then performing whatever operations you want, and finally closing "
34815 "the handle. By convention we use the single letter C<g> for the name of the "
34816 "handle variable, although of course you can use any name you want."
34820 #: ../src/guestfs.pod:73
34821 msgid "The general structure of all libguestfs-using programs looks like this:"
34825 #: ../src/guestfs.pod:76
34828 " guestfs_h *g = guestfs_create ();\n"
34833 #: ../src/guestfs.pod:78
34836 " /* Call guestfs_add_drive additional times if there are\n"
34837 " * multiple disk images.\n"
34839 " guestfs_add_drive (g, \"guest.img\");\n"
34844 #: ../src/guestfs.pod:83
34847 " /* Most manipulation calls won't work until you've launched\n"
34848 " * the handle 'g'. You have to do this _after_ adding drives\n"
34849 " * and _before_ other commands.\n"
34851 " guestfs_launch (g);\n"
34856 #: ../src/guestfs.pod:89
34859 " /* Now you can examine what partitions, LVs etc are available.\n"
34861 " char **partitions = guestfs_list_partitions (g);\n"
34862 " char **logvols = guestfs_lvs (g);\n"
34867 #: ../src/guestfs.pod:94
34870 " /* To access a filesystem in the image, you must mount it.\n"
34872 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
34877 #: ../src/guestfs.pod:98
34880 " /* Now you can perform filesystem actions on the guest\n"
34883 " guestfs_touch (g, \"/hello\");\n"
34888 #: ../src/guestfs.pod:103
34891 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
34892 " * it is done automatically when you close the handle. See\n"
34893 " * discussion of autosync in this page.\n"
34895 " guestfs_sync (g);\n"
34900 #: ../src/guestfs.pod:109
34903 " /* Close the handle 'g'. */\n"
34904 " guestfs_close (g);\n"
34909 #: ../src/guestfs.pod:112
34911 "The code above doesn't include any error checking. In real code you should "
34912 "check return values carefully for errors. In general all functions that "
34913 "return integers return C<-1> on error, and all functions that return "
34914 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
34915 "how to handle errors, and consult the documentation for each function call "
34916 "below to see precisely how they return error indications. See "
34917 "L<guestfs-examples(3)> for fully worked examples."
34921 #: ../src/guestfs.pod:121
34922 msgid "DISK IMAGES"
34926 #: ../src/guestfs.pod:123
34928 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
34929 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
34930 "actual block device, or simply an empty file of zeroes that you have created "
34931 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
34936 #: ../src/guestfs.pod:129
34938 "The call you should use in modern code for adding drives is "
34939 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
34940 "specifying that the format is raw, do:"
34944 #: ../src/guestfs.pod:133
34947 " guestfs_add_drive_opts (g, filename,\n"
34948 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34954 #: ../src/guestfs.pod:137
34955 msgid "You can add a disk read-only using:"
34959 #: ../src/guestfs.pod:139
34962 " guestfs_add_drive_opts (g, filename,\n"
34963 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
34964 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34970 #: ../src/guestfs.pod:144
34972 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
34973 "libguestfs won't modify the file."
34977 #: ../src/guestfs.pod:147
34979 "Be extremely cautious if the disk image is in use, eg. if it is being used "
34980 "by a virtual machine. Adding it read-write will almost certainly cause disk "
34981 "corruption, but adding it read-only is safe."
34985 #: ../src/guestfs.pod:151
34987 "You must add at least one disk image, and you may add multiple disk images. "
34988 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
34989 "first one you added), C</dev/sdb> (for the second one you added), etc."
34993 #: ../src/guestfs.pod:156
34995 "Once L</guestfs_launch> has been called you cannot add any more images. You "
34996 "can call L</guestfs_list_devices> to get a list of the device names, in the "
34997 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
35001 #: ../src/guestfs.pod:161
35006 #: ../src/guestfs.pod:163
35008 "Before you can read or write files, create directories and so on in a disk "
35009 "image that contains filesystems, you have to mount those filesystems using "
35010 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
35011 "a disk image contains (for example) one partition with a filesystem on that "
35012 "partition, then you can mount it directly:"
35016 #: ../src/guestfs.pod:170
35019 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
35024 #: ../src/guestfs.pod:172
35026 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
35027 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
35028 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
35029 "that these are libguestfs virtual devices, and are nothing to do with host "
35034 #: ../src/guestfs.pod:178
35036 "If you are given a disk image and you don't know what it contains then you "
35037 "have to find out. Libguestfs can do that too: use "
35038 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
35039 "and LVs, and either try mounting each to see what is mountable, or else "
35040 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
35041 "filesystems, use L</guestfs_list_filesystems>."
35045 #: ../src/guestfs.pod:186
35047 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
35048 "L</INSPECTION> below). But you might find it easier to look at higher level "
35049 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
35053 #: ../src/guestfs.pod:191
35055 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
35056 "several other variations of the C<guestfs_mount_*> call."
35060 #: ../src/guestfs.pod:194
35061 msgid "FILESYSTEM ACCESS AND MODIFICATION"
35065 #: ../src/guestfs.pod:196
35067 "The majority of the libguestfs API consists of fairly low-level calls for "
35068 "accessing and modifying the files, directories, symlinks etc on mounted "
35069 "filesystems. There are over a hundred such calls which you can find listed "
35070 "in detail below in this man page, and we don't even pretend to cover them "
35071 "all in this overview."
35075 #: ../src/guestfs.pod:202
35077 "Specify filenames as full paths, starting with C<\"/\"> and including the "
35082 #: ../src/guestfs.pod:205
35084 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
35085 "the file called C<\"etc/passwd\"> then you could do:"
35089 #: ../src/guestfs.pod:208
35092 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
35097 #: ../src/guestfs.pod:210
35099 "This would return C<data> as a newly allocated buffer containing the full "
35100 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
35101 "or C<NULL> if there was an error."
35105 #: ../src/guestfs.pod:214
35107 "As another example, to create a top-level directory on that filesystem "
35108 "called C<\"var\"> you would do:"
35112 #: ../src/guestfs.pod:217
35115 " guestfs_mkdir (g, \"/var\");\n"
35120 #: ../src/guestfs.pod:219
35121 msgid "To create a symlink you could do:"
35125 #: ../src/guestfs.pod:221
35128 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
35129 " \"/etc/rc3.d/S30portmap\");\n"
35134 #: ../src/guestfs.pod:224
35136 "Libguestfs will reject attempts to use relative paths and there is no "
35137 "concept of a current working directory."
35141 #: ../src/guestfs.pod:227
35143 "Libguestfs can return errors in many situations: for example if the "
35144 "filesystem isn't writable, or if a file or directory that you requested "
35145 "doesn't exist. If you are using the C API (documented here) you have to "
35146 "check for those error conditions after each call. (Other language bindings "
35147 "turn these errors into exceptions)."
35151 #: ../src/guestfs.pod:233
35153 "File writes are affected by the per-handle umask, set by calling "
35154 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
35158 #: ../src/guestfs.pod:236
35159 msgid "PARTITIONING"
35163 #: ../src/guestfs.pod:238
35165 "Libguestfs contains API calls to read, create and modify partition tables on "
35170 #: ../src/guestfs.pod:241
35172 "In the common case where you want to create a single partition covering the "
35173 "whole disk, you should use the L</guestfs_part_disk> call:"
35177 #: ../src/guestfs.pod:245
35180 " const char *parttype = \"mbr\";\n"
35181 " if (disk_is_larger_than_2TB)\n"
35182 " parttype = \"gpt\";\n"
35183 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
35188 #: ../src/guestfs.pod:250
35190 "Obviously this effectively wipes anything that was on that disk image "
35195 #: ../src/guestfs.pod:253
35200 #: ../src/guestfs.pod:255
35202 "Libguestfs provides access to a large part of the LVM2 API, such as "
35203 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
35204 "unless you familiarize yourself with the concepts of physical volumes, "
35205 "volume groups and logical volumes."
35209 #: ../src/guestfs.pod:260
35211 "This author strongly recommends reading the LVM HOWTO, online at "
35212 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
35216 #: ../src/guestfs.pod:263
35217 msgid "DOWNLOADING"
35221 #: ../src/guestfs.pod:265
35223 "Use L</guestfs_cat> to download small, text only files. This call is "
35224 "limited to files which are less than 2 MB and which cannot contain any ASCII "
35225 "NUL (C<\\0>) characters. However the API is very simple to use."
35229 #: ../src/guestfs.pod:269
35231 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
35232 "bit data, since it returns a (pointer, size) pair. However it is still "
35233 "limited to \"small\" files, less than 2 MB."
35237 #: ../src/guestfs.pod:273
35239 "L</guestfs_download> can be used to download any file, with no limits on "
35240 "content or size (even files larger than 4 GB)."
35244 #: ../src/guestfs.pod:276
35245 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
35249 #: ../src/guestfs.pod:279
35254 #: ../src/guestfs.pod:281
35256 "It's often the case that you want to write a file or files to the disk "
35261 #: ../src/guestfs.pod:284
35263 "To write a small file with fixed content, use L</guestfs_write>. To create "
35264 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
35265 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
35266 "variety of other functions for creating test files, for example "
35267 "L</guestfs_fill> and L</guestfs_fill_pattern>."
35271 #: ../src/guestfs.pod:290
35273 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
35274 "file content or size (even files larger than 4 GB)."
35278 #: ../src/guestfs.pod:293
35279 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
35283 #: ../src/guestfs.pod:295
35285 "However the fastest way to upload I<large numbers of arbitrary files> is to "
35286 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
35287 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
35288 "the drive in a predictable way (eg. adding it last after all other drives) "
35289 "then you can get the device name from L</guestfs_list_devices> and mount it "
35290 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
35291 "sometimes non-portable between kernel versions, and they don't support "
35292 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
35293 "using a label or UUID, use an ISO image instead."
35297 #: ../src/guestfs.pod:306
35302 #: ../src/guestfs.pod:308
35304 "There are various different commands for copying between files and devices "
35305 "and in and out of the guest filesystem. These are summarised in the table "
35310 #: ../src/guestfs.pod:314
35311 msgid "B<file> to B<file>"
35315 #: ../src/guestfs.pod:316
35317 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
35318 "directories recursively."
35322 #: ../src/guestfs.pod:319
35323 msgid "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
35327 #: ../src/guestfs.pod:322
35328 msgid "B<file> to B<device>"
35332 #: ../src/guestfs.pod:324
35333 msgid "B<device> to B<file>"
35337 #: ../src/guestfs.pod:326
35338 msgid "B<device> to B<device>"
35342 #: ../src/guestfs.pod:328
35344 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or "
35345 "L</guestfs_copy_device_to_device>."
35349 #: ../src/guestfs.pod:331
35350 msgid "Example: duplicate the contents of an LV:"
35354 #: ../src/guestfs.pod:333
35357 " guestfs_copy_device_to_device (g,\n"
35358 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
35359 " /* -1 marks the end of the list of optional parameters */\n"
35365 #: ../src/guestfs.pod:338
35367 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
35368 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
35369 "optional C<size> parameter:"
35373 #: ../src/guestfs.pod:342
35376 " guestfs_copy_device_to_device (g,\n"
35377 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
35378 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
35384 #: ../src/guestfs.pod:347
35385 msgid "B<file on the host> to B<file or device>"
35389 #: ../src/guestfs.pod:349
35390 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
35394 #: ../src/guestfs.pod:351
35395 msgid "B<file or device> to B<file on the host>"
35399 #: ../src/guestfs.pod:353
35400 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
35404 #: ../src/guestfs.pod:357
35405 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
35409 #: ../src/guestfs.pod:359
35411 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
35412 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
35413 "appears you can only upload and download to files. However many Un*x-like "
35414 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
35415 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
35416 "stderr, and arbitrary file descriptor N."
35420 #: ../src/guestfs.pod:367
35421 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
35425 #: ../src/guestfs.pod:370
35428 " guestfs_download (g, filename, \"/dev/stdout\");\n"
35433 #: ../src/guestfs.pod:372
35434 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
35438 #: ../src/guestfs.pod:374
35441 " char devfd[64];\n"
35442 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
35443 " guestfs_tar_out (g, \"/\", devfd);\n"
35448 #: ../src/guestfs.pod:378
35449 msgid "LISTING FILES"
35453 #: ../src/guestfs.pod:380
35455 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
35456 "L<guestfish(1)>-equivalent command C<ll>)."
35460 #: ../src/guestfs.pod:383
35462 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
35463 "programs, as a flat list of strings."
35467 #: ../src/guestfs.pod:386
35469 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
35470 "directory, plus additional information about each one. It is more "
35471 "equivalent to using the L<readdir(3)> call on a local filesystem."
35475 #: ../src/guestfs.pod:390
35477 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
35482 #: ../src/guestfs.pod:393
35483 msgid "RUNNING COMMANDS"
35487 #: ../src/guestfs.pod:395
35489 "Although libguestfs is primarily an API for manipulating files inside guest "
35490 "images, we also provide some limited facilities for running commands inside "
35495 #: ../src/guestfs.pod:399
35496 msgid "There are many limitations to this:"
35500 #: ../src/guestfs.pod:405
35502 "The kernel version that the command runs under will be different from what "
35507 #: ../src/guestfs.pod:410
35509 "If the command needs to communicate with daemons, then most likely they "
35510 "won't be running."
35514 #: ../src/guestfs.pod:415
35515 msgid "The command will be running in limited memory."
35519 #: ../src/guestfs.pod:419
35521 "The network may not be available unless you enable it (see "
35522 "L</guestfs_set_network>)."
35526 #: ../src/guestfs.pod:424
35527 msgid "Only supports Linux guests (not Windows, BSD, etc)."
35531 #: ../src/guestfs.pod:428
35532 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
35536 #: ../src/guestfs.pod:433
35538 "For SELinux guests, you may need to enable SELinux and load policy first. "
35539 "See L</SELINUX> in this manpage."
35543 #: ../src/guestfs.pod:438
35545 "I<Security:> It is not safe to run commands from untrusted, possibly "
35546 "malicious guests. These commands may attempt to exploit your program by "
35547 "sending unexpected output. They could also try to exploit the Linux kernel "
35548 "or qemu provided by the libguestfs appliance. They could use the network "
35549 "provided by the libguestfs appliance to bypass ordinary network partitions "
35550 "and firewalls. They could use the elevated privileges or different SELinux "
35551 "context of your program to their advantage."
35555 #: ../src/guestfs.pod:447
35557 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
35558 "(a script which runs when the guest next boots normally), and to have this "
35559 "script run the commands you want in the normal context of the running guest, "
35560 "network security and so on. For information about other security issues, "
35561 "see L</SECURITY>."
35565 #: ../src/guestfs.pod:455
35567 "The two main API calls to run commands are L</guestfs_command> and "
35568 "L</guestfs_sh> (there are also variations)."
35572 #: ../src/guestfs.pod:458
35574 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
35575 "shell globs, redirections, etc will work."
35579 #: ../src/guestfs.pod:461
35580 msgid "CONFIGURATION FILES"
35584 #: ../src/guestfs.pod:463
35586 "To read and write configuration files in Linux guest filesystems, we "
35587 "strongly recommend using Augeas. For example, Augeas understands how to "
35588 "read and write, say, a Linux shadow password file or X.org configuration "
35589 "file, and so avoids you having to write that code."
35593 #: ../src/guestfs.pod:468
35595 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
35596 "document Augeas itself here because there is excellent documentation on the "
35597 "L<http://augeas.net/> website."
35601 #: ../src/guestfs.pod:472
35603 "If you don't want to use Augeas (you fool!) then try calling "
35604 "L</guestfs_read_lines> to get the file as a list of lines which you can "
35609 #: ../src/guestfs.pod:476
35614 #: ../src/guestfs.pod:478
35616 "We support SELinux guests. To ensure that labeling happens correctly in "
35617 "SELinux guests, you need to enable SELinux and load the guest's policy:"
35621 #: ../src/guestfs.pod:486
35622 msgid "Before launching, do:"
35626 #: ../src/guestfs.pod:488
35629 " guestfs_set_selinux (g, 1);\n"
35634 #: ../src/guestfs.pod:492
35636 "After mounting the guest's filesystem(s), load the policy. This is best "
35637 "done by running the L<load_policy(8)> command in the guest itself:"
35641 #: ../src/guestfs.pod:496
35644 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
35649 #: ../src/guestfs.pod:498
35651 "(Older versions of C<load_policy> require you to specify the name of the "
35656 #: ../src/guestfs.pod:503
35658 "Optionally, set the security context for the API. The correct security "
35659 "context to use can only be known by inspecting the guest. As an example:"
35663 #: ../src/guestfs.pod:507
35666 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
35671 #: ../src/guestfs.pod:511
35672 msgid "This will work for running commands and editing existing files."
35676 #: ../src/guestfs.pod:513
35678 "When new files are created, you may need to label them explicitly, for "
35679 "example by running the external command C<restorecon pathname>."
35683 #: ../src/guestfs.pod:517
35688 #: ../src/guestfs.pod:519
35690 "Certain calls are affected by the current file mode creation mask (the "
35691 "\"umask\"). In particular ones which create files or directories, such as "
35692 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
35693 "either the default mode that the file is created with or modifies the mode "
35698 #: ../src/guestfs.pod:525
35700 "The default umask is C<022>, so files are created with modes such as C<0644> "
35701 "and directories with C<0755>."
35705 #: ../src/guestfs.pod:528
35707 "There are two ways to avoid being affected by umask. Either set umask to 0 "
35708 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
35709 "L</guestfs_chmod> after creating each file or directory."
35713 #: ../src/guestfs.pod:532
35714 msgid "For more information about umask, see L<umask(2)>."
35718 #: ../src/guestfs.pod:536
35720 "Libguestfs allows you to access Linux guests which have been encrypted using "
35721 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
35722 "standard. This includes nearly all whole disk encryption systems used by "
35723 "modern Linux guests."
35727 #: ../src/guestfs.pod:542
35729 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
35730 "returns the string C<crypto_LUKS>)."
35734 #: ../src/guestfs.pod:545
35736 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
35737 "will require the passphrase!"
35741 #: ../src/guestfs.pod:548
35743 "Opening a LUKS device creates a new device mapper device called "
35744 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
35745 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
35746 "decrypted from and encrypted to the underlying block device respectively."
35750 #: ../src/guestfs.pod:554
35752 "LVM volume groups on the device can be made visible by calling "
35753 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
35754 "volume(s) can now be mounted in the usual way."
35758 #: ../src/guestfs.pod:558
35760 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
35761 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
35762 "[\"/dev/VG\"])>. Then close the mapper device by calling "
35763 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
35764 "underlying encrypted block device)."
35768 #: ../src/guestfs.pod:565
35773 #: ../src/guestfs.pod:567
35775 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
35776 "contains operating systems, an install CD or a live CD. (These APIs used to "
35777 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
35778 "version 1.5.3 the most frequently used part of this library has been "
35779 "rewritten in C and moved into the core code)."
35783 #: ../src/guestfs.pod:574
35785 "Add all disks belonging to the unknown virtual machine and call "
35786 "L</guestfs_launch> in the usual way."
35790 #: ../src/guestfs.pod:577
35792 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
35793 "and certain heuristics, and returns a list of operating systems that were "
35794 "found. An empty list means none were found. A single element is the root "
35795 "filesystem of the operating system. For dual- or multi-boot guests, "
35796 "multiple roots can be returned, each one corresponding to a separate "
35797 "operating system. (Multi-boot virtual machines are extremely rare in the "
35798 "world of virtualization, but since this scenario can happen, we have built "
35799 "libguestfs to deal with it.)"
35803 #: ../src/guestfs.pod:586
35805 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
35806 "to get additional details about that operating system. For example, call "
35807 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
35808 "Windows and Linux-based operating systems respectively."
35812 #: ../src/guestfs.pod:592
35814 "Un*x-like and Linux-based operating systems usually consist of several "
35815 "filesystems which are mounted at boot time (for example, a separate boot "
35816 "partition mounted on C</boot>). The inspection rules are able to detect how "
35817 "filesystems correspond to mount points. Call "
35818 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
35819 "hash table like this example:"
35823 #: ../src/guestfs.pod:599
35826 " /boot => /dev/sda1\n"
35827 " / => /dev/vg_guest/lv_root\n"
35828 " /usr => /dev/vg_guest/lv_usr\n"
35833 #: ../src/guestfs.pod:603
35835 "The caller can then make calls to L</guestfs_mount_options> to mount the "
35836 "filesystems as suggested."
35840 #: ../src/guestfs.pod:606
35842 "Be careful to mount filesystems in the right order (eg. C</> before "
35843 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
35848 #: ../src/guestfs.pod:610
35850 "Inspection currently only works for some common operating systems. "
35851 "Contributors are welcome to send patches for other operating systems that we "
35852 "currently cannot detect."
35856 #: ../src/guestfs.pod:614
35858 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
35859 "for more details. The L</guestfs_inspect_os> function just ignores any "
35860 "encrypted devices."
35864 #: ../src/guestfs.pod:618
35866 "A note on the implementation: The call L</guestfs_inspect_os> performs "
35867 "inspection and caches the results in the guest handle. Subsequent calls to "
35868 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
35869 "re-read the disks. If you change the content of the guest disks, you can "
35870 "redo inspection by calling L</guestfs_inspect_os> again. "
35871 "(L</guestfs_inspect_list_applications> works a little differently from the "
35872 "other calls and does read the disks. See documentation for that function "
35877 #: ../src/guestfs.pod:627
35878 msgid "INSPECTING INSTALL DISKS"
35882 #: ../src/guestfs.pod:629
35884 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
35889 #: ../src/guestfs.pod:632
35891 "Call L</guestfs_inspect_get_format> to return the format of the operating "
35892 "system, which currently can be C<installed> (a regular operating system) or "
35893 "C<installer> (some sort of install disk)."
35897 #: ../src/guestfs.pod:636
35899 "Further information is available about the operating system that can be "
35900 "installed using the regular inspection APIs like "
35901 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
35906 #: ../src/guestfs.pod:641
35908 "Some additional information specific to installer disks is also available "
35909 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
35910 "L</guestfs_inspect_is_multipart> calls."
35914 #: ../src/guestfs.pod:646
35915 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
35919 #: ../src/guestfs.pod:648
35921 "Libguestfs can mount NTFS partitions. It does this using the "
35922 "L<http://www.ntfs-3g.org/> driver."
35926 #: ../src/guestfs.pod:651
35927 msgid "DRIVE LETTERS AND PATHS"
35931 #: ../src/guestfs.pod:653
35933 "DOS and Windows still use drive letters, and the filesystems are always "
35934 "treated as case insensitive by Windows itself, and therefore you might find "
35935 "a Windows configuration file referring to a path like "
35936 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
35937 "that directory might be referred to as C</WINDOWS/System32>."
35941 #: ../src/guestfs.pod:659
35943 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
35944 "L</guestfs_inspect_get_drive_mappings>)"
35948 #: ../src/guestfs.pod:662
35950 "Dealing with separator characters (backslash vs forward slash) is outside "
35951 "the scope of libguestfs, but usually a simple character replacement will "
35956 #: ../src/guestfs.pod:666
35958 "To resolve the case insensitivity of paths, call "
35959 "L</guestfs_case_sensitive_path>."
35963 #: ../src/guestfs.pod:669
35964 msgid "ACCESSING THE WINDOWS REGISTRY"
35968 #: ../src/guestfs.pod:671
35970 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
35971 "files, through the library C<hivex> which is part of the libguestfs project "
35972 "although ships as a separate tarball. You have to locate and download the "
35973 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
35974 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
35975 "L<virt-win-reg(1)> for more help on this issue."
35979 #: ../src/guestfs.pod:679
35980 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
35984 #: ../src/guestfs.pod:681
35986 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
35987 "provide something which looks like a Linux symlink. The way it tries to do "
35988 "the rewriting is described here:"
35992 #: ../src/guestfs.pod:685
35993 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
35997 #: ../src/guestfs.pod:687
35999 "The essential problem is that ntfs-3g simply does not have enough "
36000 "information to do a correct job. NTFS links can contain drive letters and "
36001 "references to external device GUIDs that ntfs-3g has no way of resolving. "
36002 "It is almost certainly the case that libguestfs callers should ignore what "
36003 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
36007 #: ../src/guestfs.pod:694
36009 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
36010 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
36011 "attribute, and read the raw reparse data from that (you can find the format "
36012 "documented in various places around the web)."
36016 #: ../src/guestfs.pod:699
36017 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
36021 #: ../src/guestfs.pod:701
36023 "There are other useful extended attributes that can be read from ntfs-3g "
36024 "filesystems (using L</guestfs_getxattr>). See:"
36028 #: ../src/guestfs.pod:704
36029 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
36033 #: ../src/guestfs.pod:706
36034 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
36038 #: ../src/guestfs.pod:708
36040 "Although we don't want to discourage you from using the C API, we will "
36041 "mention here that the same API is also available in other languages."
36045 #: ../src/guestfs.pod:711
36047 "The API is broadly identical in all supported languages. This means that "
36048 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
36049 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
36050 "OCaml. In other words, a straightforward, predictable isomorphism between "
36055 #: ../src/guestfs.pod:717
36057 "Error messages are automatically transformed into exceptions if the language "
36062 #: ../src/guestfs.pod:720
36064 "We don't try to \"object orientify\" parts of the API in OO languages, "
36065 "although contributors are welcome to write higher level APIs above what we "
36066 "provide in their favourite languages if they wish."
36070 #: ../src/guestfs.pod:726
36075 #: ../src/guestfs.pod:728
36077 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
36078 "identical to the C API. C++ classes and exceptions are not used."
36082 #: ../src/guestfs.pod:732
36087 #: ../src/guestfs.pod:734
36089 "The C# bindings are highly experimental. Please read the warnings at the "
36090 "top of C<csharp/Libguestfs.cs>."
36094 #: ../src/guestfs.pod:737
36099 #: ../src/guestfs.pod:739
36100 msgid "See L<guestfs-erlang(3)>."
36104 #: ../src/guestfs.pod:741
36109 #: ../src/guestfs.pod:743
36111 "This is the only language binding that is working but incomplete. Only "
36112 "calls which return simple integers have been bound in Haskell, and we are "
36113 "looking for help to complete this binding."
36117 #: ../src/guestfs.pod:747
36122 #: ../src/guestfs.pod:749
36124 "Full documentation is contained in the Javadoc which is distributed with "
36125 "libguestfs. For examples, see L<guestfs-java(3)>."
36129 #: ../src/guestfs.pod:752
36134 #: ../src/guestfs.pod:754
36135 msgid "See L<guestfs-ocaml(3)>."
36139 #: ../src/guestfs.pod:756
36144 #: ../src/guestfs.pod:758
36145 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
36149 #: ../src/guestfs.pod:760
36154 #: ../src/guestfs.pod:762
36156 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
36157 "the php-libguestfs package for your distribution."
36161 #: ../src/guestfs.pod:765
36162 msgid "The PHP binding only works correctly on 64 bit machines."
36166 #: ../src/guestfs.pod:767
36171 #: ../src/guestfs.pod:769
36172 msgid "See L<guestfs-python(3)>."
36176 #: ../src/guestfs.pod:771
36181 #: ../src/guestfs.pod:773
36182 msgid "See L<guestfs-ruby(3)>."
36186 #: ../src/guestfs.pod:775
36187 msgid "B<shell scripts>"
36191 #: ../src/guestfs.pod:777
36192 msgid "See L<guestfish(1)>."
36196 #: ../src/guestfs.pod:781
36197 msgid "LIBGUESTFS GOTCHAS"
36201 #: ../src/guestfs.pod:783
36203 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
36204 "system [...] that works in the way it is documented but is counterintuitive "
36205 "and almost invites mistakes.\""
36209 #: ../src/guestfs.pod:787
36211 "Since we developed libguestfs and the associated tools, there are several "
36212 "things we would have designed differently, but are now stuck with for "
36213 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
36214 "release, you can expect these to change. Beware of them."
36218 #: ../src/guestfs.pod:795
36219 msgid "Autosync / forgetting to sync."
36223 #: ../src/guestfs.pod:797
36225 "I<Update:> Autosync is enabled by default for all API users starting from "
36226 "libguestfs 1.5.24. This section only applies to older versions."
36230 #: ../src/guestfs.pod:800
36232 "When modifying a filesystem from C or another language, you B<must> unmount "
36233 "all filesystems and call L</guestfs_sync> explicitly before you close the "
36234 "libguestfs handle. You can also call:"
36238 #: ../src/guestfs.pod:804
36241 " guestfs_set_autosync (g, 1);\n"
36246 #: ../src/guestfs.pod:806
36248 "to have the unmount/sync done automatically for you when the handle 'g' is "
36249 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
36254 #: ../src/guestfs.pod:810
36256 "If you forget to do this, then it is entirely possible that your changes "
36257 "won't be written out, or will be partially written, or (very rarely) that "
36258 "you'll get disk corruption."
36262 #: ../src/guestfs.pod:814
36264 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
36265 "guestfish scripts that forget to sync will work just fine, which can make "
36266 "this very puzzling if you are trying to debug a problem."
36270 #: ../src/guestfs.pod:818
36271 msgid "Mount option C<-o sync> should not be the default."
36275 #: ../src/guestfs.pod:820
36277 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
36278 "libguestfs 1.13.16. This section only applies to older versions."
36282 #: ../src/guestfs.pod:823
36284 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
36285 "However C<-o sync> does not add any reliability benefit, but does have a "
36286 "very large performance impact."
36290 #: ../src/guestfs.pod:827
36292 "The work around is to use L</guestfs_mount_options> and set the mount "
36293 "options that you actually want to use."
36297 #: ../src/guestfs.pod:830
36298 msgid "Read-only should be the default."
36302 #: ../src/guestfs.pod:832
36304 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
36305 "specify I<--rw> if you want to make changes to the image."
36309 #: ../src/guestfs.pod:835
36310 msgid "This would reduce the potential to corrupt live VM images."
36314 #: ../src/guestfs.pod:837
36316 "Note that many filesystems change the disk when you just mount and unmount, "
36317 "even if you didn't perform any writes. You need to use "
36318 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
36322 #: ../src/guestfs.pod:841
36323 msgid "guestfish command line is hard to use."
36327 #: ../src/guestfs.pod:843
36329 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
36330 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
36331 "exist, so it fails. In earlier versions of guestfish the error message was "
36332 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
36333 "we should have used C<guestfish -c command> to run commands."
36337 #: ../src/guestfs.pod:850
36338 msgid "guestfish megabyte modifiers don't work right on all commands"
36342 #: ../src/guestfs.pod:852
36344 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
36345 "other modifiers). What guestfish actually does is to multiply the number "
36346 "part by the modifier part and pass the result to the C API. However this "
36347 "doesn't work for a few APIs which aren't expecting bytes, but are already "
36348 "expecting some other unit (eg. megabytes)."
36352 #: ../src/guestfs.pod:859
36353 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
36357 #: ../src/guestfs.pod:861
36360 " lvcreate LV VG 100M\n"
36365 #: ../src/guestfs.pod:863
36367 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
36368 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
36369 "megabytes * megabytes) logical volume. The error message you get from this "
36370 "is also a little obscure."
36374 #: ../src/guestfs.pod:868
36376 "This could be fixed in the generator by specially marking parameters and "
36377 "return values which take bytes or other units."
36381 #: ../src/guestfs.pod:871
36382 msgid "Ambiguity between devices and paths"
36386 #: ../src/guestfs.pod:873
36388 "There is a subtle ambiguity in the API between a device name "
36389 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
36390 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
36394 #: ../src/guestfs.pod:878
36396 "In the current API we usually resolve this ambiguity by having two separate "
36397 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
36398 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
36399 "detecting if the path supplied begins with C</dev/>."
36403 #: ../src/guestfs.pod:884
36405 "To avoid both the ambiguity and the need to duplicate some calls, we could "
36406 "make paths/devices into structured names. One way to do this would be to "
36407 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
36408 "aspect of grub. Another way would be to use a structured type, equivalent "
36409 "to this OCaml type:"
36413 #: ../src/guestfs.pod:890
36416 " type path = Path of string | Device of int | Partition of int * int\n"
36421 #: ../src/guestfs.pod:892
36422 msgid "which would allow you to pass arguments like:"
36426 #: ../src/guestfs.pod:894
36429 " Path \"/foo/bar\"\n"
36430 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
36431 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
36432 " Path \"/dev/sdb2\" (* not a device *)\n"
36437 #: ../src/guestfs.pod:899
36439 "As you can see there are still problems to resolve even with this "
36440 "representation. Also consider how it might work in guestfish."
36444 #: ../src/guestfs.pod:904
36445 msgid "KEYS AND PASSPHRASES"
36449 #: ../src/guestfs.pod:906
36451 "Certain libguestfs calls take a parameter that contains sensitive key "
36452 "material, passed in as a C string."
36456 #: ../src/guestfs.pod:909
36458 "In the future we would hope to change the libguestfs implementation so that "
36459 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
36460 "swap. However this is I<not> done at the moment, because of the complexity "
36461 "of such an implementation."
36465 #: ../src/guestfs.pod:914
36467 "Therefore you should be aware that any key parameter you pass to libguestfs "
36468 "might end up being written out to the swap partition. If this is a concern, "
36469 "scrub the swap partition or don't use libguestfs on encrypted devices."
36473 #: ../src/guestfs.pod:919
36474 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
36478 #: ../src/guestfs.pod:921
36480 "All high-level libguestfs actions are synchronous. If you want to use "
36481 "libguestfs asynchronously then you must create a thread."
36485 #: ../src/guestfs.pod:924
36487 "Only use the handle from a single thread. Either use the handle exclusively "
36488 "from one thread, or provide your own mutex so that two threads cannot issue "
36489 "calls on the same handle at the same time."
36493 #: ../src/guestfs.pod:928
36495 "See the graphical program guestfs-browser for one possible architecture for "
36496 "multithreaded programs using libvirt and libguestfs."
36500 #: ../src/guestfs.pod:931
36505 #: ../src/guestfs.pod:933
36507 "Libguestfs needs a supermin appliance, which it finds by looking along an "
36512 #: ../src/guestfs.pod:936
36514 "By default it looks for these in the directory C<$libdir/guestfs> "
36515 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
36519 #: ../src/guestfs.pod:939
36521 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
36522 "to change the directories that libguestfs will search in. The value is a "
36523 "colon-separated list of paths. The current directory is I<not> searched "
36524 "unless the path contains an empty element or C<.>. For example "
36525 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
36526 "then C</usr/lib/guestfs>."
36530 #: ../src/guestfs.pod:946
36531 msgid "QEMU WRAPPERS"
36535 #: ../src/guestfs.pod:948
36537 "If you want to compile your own qemu, run qemu from a non-standard location, "
36538 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
36543 #: ../src/guestfs.pod:952
36545 "There is one important rule to remember: you I<must C<exec qemu>> as the "
36546 "last command in the shell script (so that qemu replaces the shell and "
36547 "becomes the direct child of the libguestfs-using program). If you don't do "
36548 "this, then the qemu process won't be cleaned up correctly."
36552 #: ../src/guestfs.pod:957
36554 "Here is an example of a wrapper, where I have built my own copy of qemu from "
36559 #: ../src/guestfs.pod:960
36563 " qemudir=/home/rjones/d/qemu\n"
36564 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
36570 #: ../src/guestfs.pod:964
36572 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
36573 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
36578 #: ../src/guestfs.pod:968
36581 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
36586 #: ../src/guestfs.pod:970
36588 "Note that libguestfs also calls qemu with the -help and -version options in "
36589 "order to determine features."
36593 #: ../src/guestfs.pod:973
36595 "Wrappers can also be used to edit the options passed to qemu. In the "
36596 "following example, the C<-machine ...> option (C<-machine> and the following "
36597 "argument) are removed from the command line and replaced with C<-machine "
36598 "pc,accel=tcg>. The while loop iterates over the options until it finds the "
36599 "right one to remove, putting the remaining options into the C<args> array."
36603 #: ../src/guestfs.pod:982
36607 " while [ $# -gt 0 ]; do\n"
36608 " case \"$1\" in\n"
36612 " args[i]=\"$1\"\n"
36621 #: ../src/guestfs.pod:994
36624 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
36629 #: ../src/guestfs.pod:996
36630 msgid "ATTACHING TO RUNNING DAEMONS"
36634 #: ../src/guestfs.pod:998
36636 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
36637 "babies. Use with caution."
36641 #: ../src/guestfs.pod:1001
36643 "I<Note (2):> This section explains how to attach to a running daemon from a "
36644 "low level perspective. For most users, simply using virt tools such as "
36645 "L<guestfish(1)> with the I<--live> option will \"just work\"."
36649 #: ../src/guestfs.pod:1005
36650 msgid "Using guestfs_set_attach_method"
36654 #: ../src/guestfs.pod:1007
36656 "By calling L</guestfs_set_attach_method> you can change how the library "
36657 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read "
36658 "L</ARCHITECTURE> for some background)."
36662 #: ../src/guestfs.pod:1011
36664 "The normal attach method is C<appliance>, where a small appliance is created "
36665 "containing the daemon, and then the library connects to this."
36669 #: ../src/guestfs.pod:1014
36671 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
36672 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
36673 "daemon over the Unix domain socket."
36677 #: ../src/guestfs.pod:1018
36679 "The normal use for this is to connect to a running virtual machine that "
36680 "contains a C<guestfsd> daemon, and send commands so you can read and write "
36681 "files inside the live virtual machine."
36685 #: ../src/guestfs.pod:1022
36686 msgid "Using guestfs_add_domain with live flag"
36690 #: ../src/guestfs.pod:1024
36692 "L</guestfs_add_domain> provides some help for getting the correct attach "
36693 "method. If you pass the C<live> option to this function, then (if the "
36694 "virtual machine is running) it will examine the libvirt XML looking for a "
36695 "virtio-serial channel to connect to:"
36699 #: ../src/guestfs.pod:1030
36706 " <channel type='unix'>\n"
36707 " <source mode='bind' path='/path/to/socket'/>\n"
36708 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
36717 #: ../src/guestfs.pod:1042
36719 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
36720 "method to C<unix:/path/to/socket>."
36724 #: ../src/guestfs.pod:1045
36726 "Some of the libguestfs tools (including guestfish) support a I<--live> "
36727 "option which is passed through to L</guestfs_add_domain> thus allowing you "
36728 "to attach to and modify live virtual machines."
36732 #: ../src/guestfs.pod:1049
36734 "The virtual machine needs to have been set up beforehand so that it has the "
36735 "virtio-serial channel and so that guestfsd is running inside it."
36739 #: ../src/guestfs.pod:1053
36740 msgid "ABI GUARANTEE"
36744 #: ../src/guestfs.pod:1055
36746 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
36747 "actions as outlined in this section. Although we will deprecate some "
36748 "actions, for example if they get replaced by newer calls, we will keep the "
36749 "old actions forever. This allows you the developer to program in confidence "
36750 "against the libguestfs API."
36754 #: ../src/guestfs.pod:1061
36755 msgid "BLOCK DEVICE NAMING"
36759 #: ../src/guestfs.pod:1063
36761 "In the kernel there is now quite a profusion of schemata for naming block "
36762 "devices (in this context, by I<block device> I mean a physical or virtual "
36763 "hard drive). The original Linux IDE driver used names starting with "
36764 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
36765 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
36766 "replacement for the old IDE driver (particularly for SATA devices) those "
36767 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
36768 "machines with paravirtualized drivers. This has created several different "
36769 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
36774 #: ../src/guestfs.pod:1075
36776 "As discussed above, libguestfs uses a qemu appliance running an embedded "
36777 "Linux kernel to access block devices. We can run a variety of appliances "
36778 "based on a variety of Linux kernels."
36782 #: ../src/guestfs.pod:1079
36784 "This causes a problem for libguestfs because many API calls use device or "
36785 "partition names. Working scripts and the recipe (example) scripts that we "
36786 "make available over the internet could fail if the naming scheme changes."
36790 #: ../src/guestfs.pod:1084
36792 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
36793 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
36794 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
36795 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
36799 #: ../src/guestfs.pod:1090
36801 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
36802 "L</guestfs_list_partitions> and similar calls return the true names of the "
36803 "devices and partitions as known to the appliance."
36807 #: ../src/guestfs.pod:1095
36808 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
36812 #: ../src/guestfs.pod:1097
36814 "Usually this translation is transparent. However in some (very rare) cases "
36815 "you may need to know the exact algorithm. Such cases include where you use "
36816 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
36817 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
36822 #: ../src/guestfs.pod:1103
36824 "The algorithm is applied only to I<parameters> which are known to be either "
36825 "device or partition names. Return values from functions such as "
36826 "L</guestfs_list_devices> are never changed."
36830 #: ../src/guestfs.pod:1111
36831 msgid "Is the string a parameter which is a device or partition name?"
36835 #: ../src/guestfs.pod:1115
36836 msgid "Does the string begin with C</dev/sd>?"
36840 #: ../src/guestfs.pod:1119
36842 "Does the named device exist? If so, we use that device. However if I<not> "
36843 "then we continue with this algorithm."
36847 #: ../src/guestfs.pod:1124
36848 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
36852 #: ../src/guestfs.pod:1126
36853 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
36857 #: ../src/guestfs.pod:1128
36858 msgid "If that named device exists, use it. If not, continue."
36862 #: ../src/guestfs.pod:1132
36863 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
36867 #: ../src/guestfs.pod:1134
36868 msgid "If that named device exists, use it. If not, return an error."
36872 #: ../src/guestfs.pod:1138
36873 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
36877 #: ../src/guestfs.pod:1140
36879 "Although the standard naming scheme and automatic translation is useful for "
36880 "simple programs and guestfish scripts, for larger programs it is best not to "
36881 "rely on this mechanism."
36885 #: ../src/guestfs.pod:1144
36887 "Where possible for maximum future portability programs using libguestfs "
36888 "should use these future-proof techniques:"
36892 #: ../src/guestfs.pod:1151
36894 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
36895 "device names, and then use those names directly."
36899 #: ../src/guestfs.pod:1154
36900 msgid "Since those device names exist by definition, they will never be translated."
36904 #: ../src/guestfs.pod:1159
36906 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
36907 "filesystem labels."
36911 #: ../src/guestfs.pod:1166
36913 "This section discusses security implications of using libguestfs, "
36914 "particularly with untrusted or malicious guests or disk images."
36918 #: ../src/guestfs.pod:1169
36919 msgid "GENERAL SECURITY CONSIDERATIONS"
36923 #: ../src/guestfs.pod:1171
36925 "Be careful with any files or data that you download from a guest (by "
36926 "\"download\" we mean not just the L</guestfs_download> command but any "
36927 "command that reads files, filenames, directories or anything else from a "
36928 "disk image). An attacker could manipulate the data to fool your program "
36929 "into doing the wrong thing. Consider cases such as:"
36933 #: ../src/guestfs.pod:1181
36934 msgid "the data (file etc) not being present"
36938 #: ../src/guestfs.pod:1185
36939 msgid "being present but empty"
36943 #: ../src/guestfs.pod:1189
36944 msgid "being much larger than normal"
36948 #: ../src/guestfs.pod:1193
36949 msgid "containing arbitrary 8 bit data"
36953 #: ../src/guestfs.pod:1197
36954 msgid "being in an unexpected character encoding"
36958 #: ../src/guestfs.pod:1201
36959 msgid "containing homoglyphs."
36963 #: ../src/guestfs.pod:1205
36964 msgid "SECURITY OF MOUNTING FILESYSTEMS"
36968 #: ../src/guestfs.pod:1207
36970 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
36971 "(VFS) module can sometimes be escalated into exploits by deliberately "
36972 "creating a malicious, malformed filesystem. These exploits are very severe "
36973 "for two reasons. Firstly there are very many filesystem drivers in the "
36974 "kernel, and many of them are infrequently used and not much developer "
36975 "attention has been paid to the code. Linux userspace helps potential "
36976 "crackers by detecting the filesystem type and automatically choosing the "
36977 "right VFS driver, even if that filesystem type is obscure or unexpected for "
36978 "the administrator. Secondly, a kernel-level exploit is like a local root "
36979 "exploit (worse in some ways), giving immediate and total access to the "
36980 "system right down to the hardware level."
36984 #: ../src/guestfs.pod:1220
36986 "That explains why you should never mount a filesystem from an untrusted "
36987 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
36988 "inside a qemu virtual machine, usually running as a non-root user. The "
36989 "attacker would need to write a filesystem which first exploited the kernel, "
36990 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
36991 "the libguestfs protocol, and finally to be as serious as the host kernel "
36992 "exploit it would need to escalate its privileges to root. This multi-step "
36993 "escalation, performed by a static piece of data, is thought to be extremely "
36994 "hard to do, although we never say 'never' about security issues."
36998 #: ../src/guestfs.pod:1231
37000 "In any case callers can reduce the attack surface by forcing the filesystem "
37001 "type when mounting (use L</guestfs_mount_vfs>)."
37005 #: ../src/guestfs.pod:1234
37006 msgid "PROTOCOL SECURITY"
37010 #: ../src/guestfs.pod:1236
37012 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
37013 "defined upper message size. However a program that uses libguestfs must "
37014 "also take care - for example you can write a program that downloads a binary "
37015 "from a disk image and executes it locally, and no amount of protocol "
37016 "security will save you from the consequences."
37020 #: ../src/guestfs.pod:1242
37021 msgid "INSPECTION SECURITY"
37025 #: ../src/guestfs.pod:1244
37027 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
37028 "directly from the guest, and these could contain any 8 bit data. Callers "
37029 "should be careful to escape these before printing them to a structured file "
37030 "(for example, use HTML escaping if creating a web page)."
37034 #: ../src/guestfs.pod:1250
37036 "Guest configuration may be altered in unusual ways by the administrator of "
37037 "the virtual machine, and may not reflect reality (particularly for untrusted "
37038 "or actively malicious guests). For example we parse the hostname from "
37039 "configuration files like C</etc/sysconfig/network> that we find in the "
37040 "guest, but the guest administrator can easily manipulate these files to "
37041 "provide the wrong hostname."
37045 #: ../src/guestfs.pod:1258
37047 "The inspection API parses guest configuration using two external libraries: "
37048 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
37049 "designed to be robust in the face of malicious data, although denial of "
37050 "service attacks are still possible, for example with oversized configuration "
37055 #: ../src/guestfs.pod:1264
37056 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
37060 #: ../src/guestfs.pod:1266
37062 "Be very cautious about running commands from the guest. By running a "
37063 "command in the guest, you are giving CPU time to a binary that you do not "
37064 "control, under the same user account as the library, albeit wrapped in qemu "
37065 "virtualization. More information and alternatives can be found in the "
37066 "section L</RUNNING COMMANDS>."
37070 #: ../src/guestfs.pod:1272
37071 msgid "CVE-2010-3851"
37075 #: ../src/guestfs.pod:1274
37076 msgid "https://bugzilla.redhat.com/642934"
37080 #: ../src/guestfs.pod:1276
37082 "This security bug concerns the automatic disk format detection that qemu "
37083 "does on disk images."
37087 #: ../src/guestfs.pod:1279
37089 "A raw disk image is just the raw bytes, there is no header. Other disk "
37090 "images like qcow2 contain a special header. Qemu deals with this by looking "
37091 "for one of the known headers, and if none is found then assuming the disk "
37092 "image must be raw."
37096 #: ../src/guestfs.pod:1284
37098 "This allows a guest which has been given a raw disk image to write some "
37099 "other header. At next boot (or when the disk image is accessed by "
37100 "libguestfs) qemu would do autodetection and think the disk image format was, "
37101 "say, qcow2 based on the header written by the guest."
37105 #: ../src/guestfs.pod:1289
37107 "This in itself would not be a problem, but qcow2 offers many features, one "
37108 "of which is to allow a disk image to refer to another image (called the "
37109 "\"backing disk\"). It does this by placing the path to the backing disk "
37110 "into the qcow2 header. This path is not validated and could point to any "
37111 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
37112 "\"holes\" in the qcow2 disk image, which of course is completely under the "
37113 "control of the attacker."
37117 #: ../src/guestfs.pod:1297
37118 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
37122 #: ../src/guestfs.pod:1304
37123 msgid "You have enabled the network or have opened the disk in write mode."
37127 #: ../src/guestfs.pod:1308
37129 "You are also running untrusted code from the guest (see L</RUNNING "
37134 #: ../src/guestfs.pod:1313
37136 "The way to avoid this is to specify the expected disk format when adding "
37137 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
37138 "should always do this if the disk is raw format, and it's a good idea for "
37143 #: ../src/guestfs.pod:1318
37145 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
37146 "format is fetched from libvirt and passed through."
37150 #: ../src/guestfs.pod:1321
37152 "For libguestfs tools, use the I<--format> command line parameter as "
37157 #: ../src/guestfs.pod:1324
37158 msgid "CONNECTION MANAGEMENT"
37162 #: ../src/guestfs.pod:1326
37163 msgid "guestfs_h *"
37167 #: ../src/guestfs.pod:1328
37169 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
37170 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
37171 "handle and release all resources used."
37175 #: ../src/guestfs.pod:1332
37177 "For information on using multiple handles and threads, see the section "
37178 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> above."
37182 #: ../src/guestfs.pod:1335
37183 msgid "guestfs_create"
37187 #: ../src/guestfs.pod:1337
37190 " guestfs_h *guestfs_create (void);\n"
37195 #: ../src/guestfs.pod:1339
37196 msgid "Create a connection handle."
37200 #: ../src/guestfs.pod:1341
37202 "On success this returns a non-NULL pointer to a handle. On error it returns "
37207 #: ../src/guestfs.pod:1344
37209 "You have to \"configure\" the handle after creating it. This includes "
37210 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
37211 "handle at least once."
37215 #: ../src/guestfs.pod:1348
37216 msgid "After configuring the handle, you have to call L</guestfs_launch>."
37220 #: ../src/guestfs.pod:1350
37222 "You may also want to configure error handling for the handle. See the "
37223 "L</ERROR HANDLING> section below."
37227 #: ../src/guestfs.pod:1353
37228 msgid "guestfs_close"
37232 #: ../src/guestfs.pod:1355
37235 " void guestfs_close (guestfs_h *g);\n"
37240 #: ../src/guestfs.pod:1357
37241 msgid "This closes the connection handle and frees up all resources used."
37245 #: ../src/guestfs.pod:1359
37247 "If autosync was set on the handle and the handle was launched, then this "
37248 "implicitly calls various functions to unmount filesystems and sync the "
37249 "disk. See L</guestfs_set_autosync> for more details."
37253 #: ../src/guestfs.pod:1363
37254 msgid "If a close callback was set on the handle, then it is called."
37258 #: ../src/guestfs.pod:1365
37259 msgid "ERROR HANDLING"
37263 #: ../src/guestfs.pod:1367
37265 "API functions can return errors. For example, almost all functions that "
37266 "return C<int> will return C<-1> to indicate an error."
37270 #: ../src/guestfs.pod:1370
37272 "Additional information is available for errors: an error message string and "
37273 "optionally an error number (errno) if the thing that failed was a system "
37278 #: ../src/guestfs.pod:1374
37280 "You can get at the additional information about the last error on the handle "
37281 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
37282 "up an error handler with L</guestfs_set_error_handler>."
37286 #: ../src/guestfs.pod:1379
37288 "When the handle is created, a default error handler is installed which "
37289 "prints the error message string to C<stderr>. For small short-running "
37290 "command line programs it is sufficient to do:"
37294 #: ../src/guestfs.pod:1383
37297 " if (guestfs_launch (g) == -1)\n"
37298 " exit (EXIT_FAILURE);\n"
37303 #: ../src/guestfs.pod:1386
37305 "since the default error handler will ensure that an error message has been "
37306 "printed to C<stderr> before the program exits."
37310 #: ../src/guestfs.pod:1389
37312 "For other programs the caller will almost certainly want to install an "
37313 "alternate error handler or do error handling in-line like this:"
37317 #: ../src/guestfs.pod:1392
37320 " /* This disables the default behaviour of printing errors\n"
37322 " guestfs_set_error_handler (g, NULL, NULL);\n"
37327 #: ../src/guestfs.pod:1396
37330 " if (guestfs_launch (g) == -1) {\n"
37331 " /* Examine the error message and print it etc. */\n"
37332 " char *msg = guestfs_last_error (g);\n"
37333 " int errnum = guestfs_last_errno (g);\n"
37334 " fprintf (stderr, \"%s\", msg);\n"
37335 " if (errnum != 0)\n"
37336 " fprintf (stderr, \": %s\", strerror (errnum));\n"
37337 " fprintf (stderr, \"\\n\");\n"
37344 #: ../src/guestfs.pod:1407
37346 "Out of memory errors are handled differently. The default action is to call "
37347 "L<abort(3)>. If this is undesirable, then you can set a handler using "
37348 "L</guestfs_set_out_of_memory_handler>."
37352 #: ../src/guestfs.pod:1411
37354 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
37355 "because there is no handle if this happens there is no way to get additional "
37356 "error information. However L</guestfs_create> is supposed to be a "
37357 "lightweight operation which can only fail because of insufficient memory (it "
37358 "returns NULL in this case)."
37362 #: ../src/guestfs.pod:1417
37363 msgid "guestfs_last_error"
37367 #: ../src/guestfs.pod:1419
37370 " const char *guestfs_last_error (guestfs_h *g);\n"
37375 #: ../src/guestfs.pod:1421
37377 "This returns the last error message that happened on C<g>. If there has not "
37378 "been an error since the handle was created, then this returns C<NULL>."
37382 #: ../src/guestfs.pod:1425
37384 "The lifetime of the returned string is until the next error occurs, or "
37385 "L</guestfs_close> is called."
37389 #: ../src/guestfs.pod:1428
37390 msgid "guestfs_last_errno"
37394 #: ../src/guestfs.pod:1430
37397 " int guestfs_last_errno (guestfs_h *g);\n"
37402 #: ../src/guestfs.pod:1432
37403 msgid "This returns the last error number (errno) that happened on C<g>."
37407 #: ../src/guestfs.pod:1434
37408 msgid "If successful, an errno integer not equal to zero is returned."
37412 #: ../src/guestfs.pod:1436
37413 msgid "If no error, this returns 0. This call can return 0 in three situations:"
37417 #: ../src/guestfs.pod:1443
37418 msgid "There has not been any error on the handle."
37422 #: ../src/guestfs.pod:1447
37424 "There has been an error but the errno was meaningless. This corresponds to "
37425 "the case where the error did not come from a failed system call, but for "
37426 "some other reason."
37430 #: ../src/guestfs.pod:1453
37432 "There was an error from a failed system call, but for some reason the errno "
37433 "was not captured and returned. This usually indicates a bug in libguestfs."
37437 #: ../src/guestfs.pod:1459
37439 "Libguestfs tries to convert the errno from inside the applicance into a "
37440 "corresponding errno for the caller (not entirely trivial: the appliance "
37441 "might be running a completely different operating system from the library "
37442 "and error numbers are not standardized across Un*xen). If this could not be "
37443 "done, then the error is translated to C<EINVAL>. In practice this should "
37444 "only happen in very rare circumstances."
37448 #: ../src/guestfs.pod:1467
37449 msgid "guestfs_set_error_handler"
37453 #: ../src/guestfs.pod:1469
37456 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
37458 " const char *msg);\n"
37459 " void guestfs_set_error_handler (guestfs_h *g,\n"
37460 " guestfs_error_handler_cb cb,\n"
37461 " void *opaque);\n"
37466 #: ../src/guestfs.pod:1476
37468 "The callback C<cb> will be called if there is an error. The parameters "
37469 "passed to the callback are an opaque data pointer and the error message "
37474 #: ../src/guestfs.pod:1480
37476 "C<errno> is not passed to the callback. To get that the callback must call "
37477 "L</guestfs_last_errno>."
37481 #: ../src/guestfs.pod:1483
37483 "Note that the message string C<msg> is freed as soon as the callback "
37484 "function returns, so if you want to stash it somewhere you must make your "
37489 #: ../src/guestfs.pod:1487
37490 msgid "The default handler prints messages on C<stderr>."
37494 #: ../src/guestfs.pod:1489
37495 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
37499 #: ../src/guestfs.pod:1491
37500 msgid "guestfs_get_error_handler"
37504 #: ../src/guestfs.pod:1493
37507 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
37508 " void **opaque_rtn);\n"
37513 #: ../src/guestfs.pod:1496
37514 msgid "Returns the current error handler callback."
37518 #: ../src/guestfs.pod:1498
37519 msgid "guestfs_set_out_of_memory_handler"
37523 #: ../src/guestfs.pod:1500
37526 " typedef void (*guestfs_abort_cb) (void);\n"
37527 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
37528 " guestfs_abort_cb);\n"
37533 #: ../src/guestfs.pod:1504
37535 "The callback C<cb> will be called if there is an out of memory situation. "
37536 "I<Note this callback must not return>."
37540 #: ../src/guestfs.pod:1507
37541 msgid "The default is to call L<abort(3)>."
37545 #: ../src/guestfs.pod:1509
37546 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
37550 #: ../src/guestfs.pod:1512
37551 msgid "guestfs_get_out_of_memory_handler"
37555 #: ../src/guestfs.pod:1514
37558 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
37563 #: ../src/guestfs.pod:1516
37564 msgid "This returns the current out of memory handler."
37568 #: ../src/guestfs.pod:1518
37573 #: ../src/guestfs.pod:1522
37578 #: ../src/guestfs.pod:1524
37583 #: ../src/guestfs.pod:1526
37584 msgid "AVAILABILITY"
37588 #: ../src/guestfs.pod:1528
37589 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
37593 #: ../src/guestfs.pod:1530
37595 "Using L</guestfs_available> you can test availability of the following "
37596 "groups of functions. This test queries the appliance to see if the "
37597 "appliance you are currently using supports the functionality."
37601 #: ../src/guestfs.pod:1535
37602 msgid "@AVAILABILITY@"
37606 #: ../src/guestfs.pod:1537
37607 msgid "GUESTFISH supported COMMAND"
37611 #: ../src/guestfs.pod:1539
37613 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
37614 "prints out the available groups and whether they are supported by this build "
37615 "of libguestfs. Note however that you have to do C<run> first."
37619 #: ../src/guestfs.pod:1544
37620 msgid "SINGLE CALLS AT COMPILE TIME"
37624 #: ../src/guestfs.pod:1546
37626 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
37627 "function, such as:"
37631 #: ../src/guestfs.pod:1549
37634 " #define LIBGUESTFS_HAVE_DD 1\n"
37639 #: ../src/guestfs.pod:1551
37640 msgid "if L</guestfs_dd> is available."
37644 #: ../src/guestfs.pod:1553
37646 "Before version 1.5.8, if you needed to test whether a single libguestfs "
37647 "function is available at compile time, we recommended using build tools such "
37648 "as autoconf or cmake. For example in autotools you could use:"
37652 #: ../src/guestfs.pod:1558
37655 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
37656 " AC_CHECK_FUNCS([guestfs_dd])\n"
37661 #: ../src/guestfs.pod:1561
37663 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
37668 #: ../src/guestfs.pod:1564
37669 msgid "SINGLE CALLS AT RUN TIME"
37673 #: ../src/guestfs.pod:1566
37675 "Testing at compile time doesn't guarantee that a function really exists in "
37676 "the library. The reason is that you might be dynamically linked against a "
37677 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
37678 "This situation unfortunately results in a segmentation fault, which is a "
37679 "shortcoming of the C dynamic linking system itself."
37683 #: ../src/guestfs.pod:1573
37685 "You can use L<dlopen(3)> to test if a function is available at run time, as "
37686 "in this example program (note that you still need the compile time check as "
37691 #: ../src/guestfs.pod:1577
37694 " #include <stdio.h>\n"
37695 " #include <stdlib.h>\n"
37696 " #include <unistd.h>\n"
37697 " #include <dlfcn.h>\n"
37698 " #include <guestfs.h>\n"
37703 #: ../src/guestfs.pod:1583
37708 " #ifdef LIBGUESTFS_HAVE_DD\n"
37710 " int has_function;\n"
37715 #: ../src/guestfs.pod:1589
37718 " /* Test if the function guestfs_dd is really available. */\n"
37719 " dl = dlopen (NULL, RTLD_LAZY);\n"
37721 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
37722 " exit (EXIT_FAILURE);\n"
37724 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
37730 #: ../src/guestfs.pod:1598
37733 " if (!has_function)\n"
37734 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
37736 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
37737 " /* Now it's safe to call\n"
37738 " guestfs_dd (g, \"foo\", \"bar\");\n"
37742 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
37749 #: ../src/guestfs.pod:1611
37751 "You may think the above is an awful lot of hassle, and it is. There are "
37752 "other ways outside of the C linking system to ensure that this kind of "
37753 "incompatibility never arises, such as using package versioning:"
37757 #: ../src/guestfs.pod:1616
37760 " Requires: libguestfs >= 1.0.80\n"
37765 #: ../src/guestfs.pod:1618
37766 msgid "CALLS WITH OPTIONAL ARGUMENTS"
37770 #: ../src/guestfs.pod:1620
37772 "A recent feature of the API is the introduction of calls which take optional "
37773 "arguments. In C these are declared 3 ways. The main way is as a call which "
37774 "takes variable arguments (ie. C<...>), as in this example:"
37778 #: ../src/guestfs.pod:1625
37781 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
37786 #: ../src/guestfs.pod:1627
37788 "Call this with a list of optional arguments, terminated by C<-1>. So to "
37789 "call with no optional arguments specified:"
37793 #: ../src/guestfs.pod:1630
37796 " guestfs_add_drive_opts (g, filename, -1);\n"
37801 #: ../src/guestfs.pod:1632
37802 msgid "With a single optional argument:"
37806 #: ../src/guestfs.pod:1634
37809 " guestfs_add_drive_opts (g, filename,\n"
37810 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37816 #: ../src/guestfs.pod:1638
37821 #: ../src/guestfs.pod:1640
37824 " guestfs_add_drive_opts (g, filename,\n"
37825 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
37826 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
37832 #: ../src/guestfs.pod:1645
37834 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
37839 #: ../src/guestfs.pod:1648
37840 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
37844 #: ../src/guestfs.pod:1650
37846 "The second variant has the same name with the suffix C<_va>, which works the "
37847 "same way but takes a C<va_list>. See the C manual for details. For the "
37848 "example function, this is declared:"
37852 #: ../src/guestfs.pod:1654
37855 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
37856 " va_list args);\n"
37861 #: ../src/guestfs.pod:1657
37862 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
37866 #: ../src/guestfs.pod:1659
37868 "The third variant is useful where you need to construct these calls. You "
37869 "pass in a structure where you fill in the optional fields. The structure "
37870 "has a bitmask as the first element which you must set to indicate which "
37871 "fields you have filled in. For our example function the structure and call "
37876 #: ../src/guestfs.pod:1665
37879 " struct guestfs_add_drive_opts_argv {\n"
37880 " uint64_t bitmask;\n"
37882 " const char *format;\n"
37885 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
37886 " const struct guestfs_add_drive_opts_argv *optargs);\n"
37891 #: ../src/guestfs.pod:1674
37892 msgid "You could call it like this:"
37896 #: ../src/guestfs.pod:1676
37899 " struct guestfs_add_drive_opts_argv optargs = {\n"
37900 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
37901 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
37902 " .readonly = 1,\n"
37903 " .format = \"qcow2\"\n"
37909 #: ../src/guestfs.pod:1683
37912 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
37917 #: ../src/guestfs.pod:1691
37918 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
37922 #: ../src/guestfs.pod:1696
37923 msgid "You do not need to fill in all fields of the structure."
37927 #: ../src/guestfs.pod:1700
37929 "There must be a one-to-one correspondence between fields of the structure "
37930 "that are filled in, and bits set in the bitmask."
37934 #: ../src/guestfs.pod:1705
37935 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
37939 #: ../src/guestfs.pod:1707
37941 "In other languages, optional arguments are expressed in the way that is "
37942 "natural for that language. We refer you to the language-specific "
37943 "documentation for more details on that."
37947 #: ../src/guestfs.pod:1711
37948 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
37952 #: ../src/guestfs.pod:1713
37953 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
37957 #: ../src/guestfs.pod:1715
37959 "B<Note:> This section documents the generic event mechanism introduced in "
37960 "libguestfs 1.10, which you should use in new code if possible. The old "
37961 "functions C<guestfs_set_log_message_callback>, "
37962 "C<guestfs_set_subprocess_quit_callback>, "
37963 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
37964 "C<guestfs_set_progress_callback> are no longer documented in this manual "
37965 "page. Because of the ABI guarantee, the old functions continue to work."
37969 #: ../src/guestfs.pod:1724
37971 "Handles generate events when certain things happen, such as log messages "
37972 "being generated, progress messages during long-running operations, or the "
37973 "handle being closed. The API calls described below let you register a "
37974 "callback to be called when events happen. You can register multiple "
37975 "callbacks (for the same, different or overlapping sets of events), and "
37976 "individually remove callbacks. If callbacks are not removed, then they "
37977 "remain in force until the handle is closed."
37981 #: ../src/guestfs.pod:1732
37983 "In the current implementation, events are only generated synchronously: that "
37984 "means that events (and hence callbacks) can only happen while you are in the "
37985 "middle of making another libguestfs call. The callback is called in the "
37990 #: ../src/guestfs.pod:1737
37992 "Events may contain a payload, usually nothing (void), an array of 64 bit "
37993 "unsigned integers, or a message buffer. Payloads are discussed later on."
37997 #: ../src/guestfs.pod:1741
37998 msgid "CLASSES OF EVENTS"
38002 #: ../src/guestfs.pod:1745
38003 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
38007 #: ../src/guestfs.pod:1748
38009 "The callback function will be called while the handle is being closed "
38010 "(synchronously from L</guestfs_close>)."
38014 #: ../src/guestfs.pod:1751
38016 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
38017 "handles that are open when the program exits. This means that this callback "
38018 "might be called indirectly from L<exit(3)>, which can cause unexpected "
38019 "problems in higher-level languages (eg. if your HLL interpreter has already "
38020 "been cleaned up by the time this is called, and if your callback then jumps "
38021 "into some HLL function)."
38025 #: ../src/guestfs.pod:1758
38027 "If no callback is registered: the handle is closed without any callback "
38032 #: ../src/guestfs.pod:1761
38033 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
38037 #: ../src/guestfs.pod:1764
38039 "The callback function will be called when the child process quits, either "
38040 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
38041 "corresponds to a transition from any state to the CONFIG state)."
38045 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
38046 msgid "If no callback is registered: the event is ignored."
38050 #: ../src/guestfs.pod:1770
38051 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
38055 #: ../src/guestfs.pod:1773
38057 "The callback function will be called when the child process becomes ready "
38058 "first time after it has been launched. (This corresponds to a transition "
38059 "from LAUNCHING to the READY state)."
38063 #: ../src/guestfs.pod:1779
38064 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
38068 #: ../src/guestfs.pod:1782
38070 "Some long-running operations can generate progress messages. If this "
38071 "callback is registered, then it will be called each time a progress message "
38072 "is generated (usually two seconds after the operation started, and three "
38073 "times per second thereafter until it completes, although the frequency may "
38074 "change in future versions)."
38078 #: ../src/guestfs.pod:1788
38080 "The callback receives in the payload four unsigned 64 bit numbers which are "
38081 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
38085 #: ../src/guestfs.pod:1791
38087 "The units of C<total> are not defined, although for some operations C<total> "
38088 "may relate in some way to the amount of data to be transferred (eg. in bytes "
38089 "or megabytes), and C<position> may be the portion which has been "
38094 #: ../src/guestfs.pod:1796
38095 msgid "The only defined and stable parts of the API are:"
38099 #: ../src/guestfs.pod:1802
38101 "The callback can display to the user some type of progress bar or indicator "
38102 "which shows the ratio of C<position>:C<total>."
38106 #: ../src/guestfs.pod:1807
38107 msgid "0 E<lt>= C<position> E<lt>= C<total>"
38111 #: ../src/guestfs.pod:1811
38113 "If any progress notification is sent during a call, then a final progress "
38114 "notification is always sent when C<position> = C<total> (I<unless> the call "
38115 "fails with an error)."
38119 #: ../src/guestfs.pod:1815
38121 "This is to simplify caller code, so callers can easily set the progress "
38122 "indicator to \"100%\" at the end of the operation, without requiring special "
38123 "code to detect this case."
38127 #: ../src/guestfs.pod:1821
38129 "For some calls we are unable to estimate the progress of the call, but we "
38130 "can still generate progress messages to indicate activity. This is known as "
38131 "\"pulse mode\", and is directly supported by certain progress bar "
38132 "implementations (eg. GtkProgressBar)."
38136 #: ../src/guestfs.pod:1826
38138 "For these calls, zero or more progress messages are generated with "
38139 "C<position = 0> and C<total = 1>, followed by a final message with "
38140 "C<position = total = 1>."
38144 #: ../src/guestfs.pod:1830
38146 "As noted above, if the call fails with an error then the final message may "
38147 "not be generated."
38151 #: ../src/guestfs.pod:1835
38153 "The callback also receives the procedure number (C<proc_nr>) and serial "
38154 "number (C<serial>) of the call. These are only useful for debugging "
38155 "protocol issues, and the callback can normally ignore them. The callback "
38156 "may want to print these numbers in error messages or debugging messages."
38160 #: ../src/guestfs.pod:1841
38161 msgid "If no callback is registered: progress messages are discarded."
38165 #: ../src/guestfs.pod:1843
38166 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
38170 #: ../src/guestfs.pod:1846
38172 "The callback function is called whenever a log message is generated by qemu, "
38173 "the appliance kernel, guestfsd (daemon), or utility programs."
38177 #: ../src/guestfs.pod:1849
38179 "If the verbose flag (L</guestfs_set_verbose>) is set before launch "
38180 "(L</guestfs_launch>) then additional debug messages are generated."
38184 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
38186 "If no callback is registered: the messages are discarded unless the verbose "
38187 "flag is set in which case they are sent to stderr. You can override the "
38188 "printing of verbose messages to stderr by setting up a callback."
38192 #: ../src/guestfs.pod:1857
38193 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
38197 #: ../src/guestfs.pod:1860
38199 "The callback function is called whenever a log message is generated by the "
38200 "library part of libguestfs."
38204 #: ../src/guestfs.pod:1863
38206 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
38207 "messages are generated."
38211 #: ../src/guestfs.pod:1871
38212 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
38216 #: ../src/guestfs.pod:1874
38218 "The callback function is called whenever a trace message is generated. This "
38219 "only applies if the trace flag (L</guestfs_set_trace>) is set."
38223 #: ../src/guestfs.pod:1877
38225 "If no callback is registered: the messages are sent to stderr. You can "
38226 "override the printing of trace messages to stderr by setting up a callback."
38230 #: ../src/guestfs.pod:1881
38231 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
38235 #: ../src/guestfs.pod:1884
38236 msgid "The callback function is called whenever a libguestfs function is entered."
38240 #: ../src/guestfs.pod:1887
38242 "The payload is a string which contains the name of the function that we are "
38243 "entering (not including C<guestfs_> prefix)."
38247 #: ../src/guestfs.pod:1890
38249 "Note that libguestfs functions can call themselves, so you may see many "
38250 "events from a single call. A few libguestfs functions do not generate this "
38255 #: ../src/guestfs.pod:1898
38256 msgid "guestfs_set_event_callback"
38260 #: ../src/guestfs.pod:1900
38263 " int guestfs_set_event_callback (guestfs_h *g,\n"
38264 " guestfs_event_callback cb,\n"
38265 " uint64_t event_bitmask,\n"
38267 " void *opaque);\n"
38272 #: ../src/guestfs.pod:1906
38274 "This function registers a callback (C<cb>) for all event classes in the "
38275 "C<event_bitmask>."
38279 #: ../src/guestfs.pod:1909
38281 "For example, to register for all log message events, you could call this "
38282 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
38283 "To register a single callback for all possible classes of events, use "
38284 "C<GUESTFS_EVENT_ALL>."
38288 #: ../src/guestfs.pod:1915
38289 msgid "C<flags> should always be passed as 0."
38293 #: ../src/guestfs.pod:1917
38295 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
38296 "it for any purpose."
38300 #: ../src/guestfs.pod:1920
38302 "The return value is the event handle (an integer) which you can use to "
38303 "delete the callback (see below)."
38307 #: ../src/guestfs.pod:1923
38309 "If there is an error, this function returns C<-1>, and sets the error in the "
38310 "handle in the usual way (see L</guestfs_last_error> etc.)"
38314 #: ../src/guestfs.pod:1926
38316 "Callbacks remain in effect until they are deleted, or until the handle is "
38321 #: ../src/guestfs.pod:1929
38323 "In the case where multiple callbacks are registered for a particular event "
38324 "class, all of the callbacks are called. The order in which multiple "
38325 "callbacks are called is not defined."
38329 #: ../src/guestfs.pod:1933
38330 msgid "guestfs_delete_event_callback"
38334 #: ../src/guestfs.pod:1935
38337 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
38342 #: ../src/guestfs.pod:1937
38344 "Delete a callback that was previously registered. C<event_handle> should be "
38345 "the integer that was returned by a previous call to "
38346 "C<guestfs_set_event_callback> on the same handle."
38350 #: ../src/guestfs.pod:1941
38351 msgid "guestfs_event_callback"
38355 #: ../src/guestfs.pod:1943
38358 " typedef void (*guestfs_event_callback) (\n"
38361 " uint64_t event,\n"
38362 " int event_handle,\n"
38364 " const char *buf, size_t buf_len,\n"
38365 " const uint64_t *array, size_t array_len);\n"
38370 #: ../src/guestfs.pod:1952
38371 msgid "This is the type of the event callback function that you have to provide."
38375 #: ../src/guestfs.pod:1955
38377 "The basic parameters are: the handle (C<g>), the opaque user pointer "
38378 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
38379 "handle, and C<flags> which in the current API you should ignore."
38383 #: ../src/guestfs.pod:1959
38385 "The remaining parameters contain the event payload (if any). Each event may "
38386 "contain a payload, which usually relates to the event class, but for future "
38387 "proofing your code should be written to handle any payload for any event "
38392 #: ../src/guestfs.pod:1964
38394 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
38395 "there is no message buffer). Note that this message buffer can contain "
38396 "arbitrary 8 bit data, including NUL bytes."
38400 #: ../src/guestfs.pod:1968
38402 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
38403 "moment this is only used for progress messages."
38407 #: ../src/guestfs.pod:1971
38408 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
38412 #: ../src/guestfs.pod:1973
38414 "One motivation for the generic event API was to allow GUI programs to "
38415 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
38416 "unconditionally to C<stderr>."
38420 #: ../src/guestfs.pod:1977
38422 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
38423 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
38424 "messages are not events; you must capture error messages separately)."
38428 #: ../src/guestfs.pod:1982
38430 "Programs have to set up a callback to capture the classes of events of "
38435 #: ../src/guestfs.pod:1985
38439 " guestfs_set_event_callback\n"
38440 " (g, message_callback,\n"
38441 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
38442 " GUESTFS_EVENT_TRACE,\n"
38443 " 0, NULL) == -1)\n"
38444 " if (eh == -1) {\n"
38445 " // handle error in the usual way\n"
38451 #: ../src/guestfs.pod:1995
38453 "The callback can then direct messages to the appropriate place. In this "
38454 "example, messages are directed to syslog:"
38458 #: ../src/guestfs.pod:1998
38462 " message_callback (\n"
38465 " uint64_t event,\n"
38466 " int event_handle,\n"
38468 " const char *buf, size_t buf_len,\n"
38469 " const uint64_t *array, size_t array_len)\n"
38471 " const int priority = LOG_USER|LOG_INFO;\n"
38472 " if (buf_len > 0)\n"
38473 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
38479 #: ../src/guestfs.pod:2013
38480 msgid "CANCELLING LONG TRANSFERS"
38484 #: ../src/guestfs.pod:2015
38486 "Some operations can be cancelled by the caller while they are in progress. "
38487 "Currently only operations that involve uploading or downloading data can be "
38488 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
38489 "parameters in the generator)."
38493 #: ../src/guestfs.pod:2020
38494 msgid "guestfs_user_cancel"
38498 #: ../src/guestfs.pod:2022
38501 " void guestfs_user_cancel (guestfs_h *g);\n"
38506 #: ../src/guestfs.pod:2024
38507 msgid "C<guestfs_user_cancel> cancels the current upload or download operation."
38511 #: ../src/guestfs.pod:2027
38513 "Unlike most other libguestfs calls, this function is signal safe and thread "
38514 "safe. You can call it from a signal handler or from another thread, without "
38515 "needing to do any locking."
38519 #: ../src/guestfs.pod:2031
38521 "The transfer that was in progress (if there is one) will stop shortly "
38522 "afterwards, and will return an error. The errno (see "
38523 "L</guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
38524 "out if the operation was cancelled or failed because of another error."
38528 #: ../src/guestfs.pod:2037
38530 "No cleanup is performed: for example, if a file was being uploaded then "
38531 "after cancellation there may be a partially uploaded file. It is the "
38532 "caller's responsibility to clean up if necessary."
38536 #: ../src/guestfs.pod:2041
38537 msgid "There are two common places that you might call C<guestfs_user_cancel>."
38541 #: ../src/guestfs.pod:2043
38543 "In an interactive text-based program, you might call it from a C<SIGINT> "
38544 "signal handler so that pressing C<^C> cancels the current operation. (You "
38545 "also need to call L</guestfs_set_pgroup> so that child processes don't "
38546 "receive the C<^C> signal)."
38550 #: ../src/guestfs.pod:2048
38552 "In a graphical program, when the main thread is displaying a progress bar "
38553 "with a cancel button, wire up the cancel button to call this function."
38557 #: ../src/guestfs.pod:2052
38558 msgid "PRIVATE DATA AREA"
38562 #: ../src/guestfs.pod:2054
38564 "You can attach named pieces of private data to the libguestfs handle, fetch "
38565 "them by name, and walk over them, for the lifetime of the handle. This is "
38566 "called the private data area and is only available from the C API."
38570 #: ../src/guestfs.pod:2059
38571 msgid "To attach a named piece of data, use the following call:"
38575 #: ../src/guestfs.pod:2061
38578 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
38583 #: ../src/guestfs.pod:2063
38585 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
38586 "pointer (which can be C<NULL>). Any previous item with the same key is "
38591 #: ../src/guestfs.pod:2067
38593 "You can use any C<key> you want, but your key should I<not> start with an "
38594 "underscore character. Keys beginning with an underscore character are "
38595 "reserved for internal libguestfs purposes (eg. for implementing language "
38596 "bindings). It is recommended that you prefix the key with some unique "
38597 "string to avoid collisions with other users."
38601 #: ../src/guestfs.pod:2073
38602 msgid "To retrieve the pointer, use:"
38606 #: ../src/guestfs.pod:2075
38609 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
38614 #: ../src/guestfs.pod:2077
38616 "This function returns C<NULL> if either no data is found associated with "
38617 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
38622 #: ../src/guestfs.pod:2081
38624 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
38625 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
38626 "all. In particular, libguestfs does I<not> try to free the data when the "
38627 "handle is closed. If the data must be freed, then the caller must either "
38628 "free it before calling L</guestfs_close> or must set up a close callback to "
38629 "do it (see L</GUESTFS_EVENT_CLOSE>)."
38633 #: ../src/guestfs.pod:2088
38634 msgid "To walk over all entries, use these two functions:"
38638 #: ../src/guestfs.pod:2090
38641 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
38646 #: ../src/guestfs.pod:2092
38649 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
38654 #: ../src/guestfs.pod:2094
38656 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
38657 "not have any particular meaning -- keys are not returned in any defined "
38658 "order). A pointer to the key is returned in C<*key_rtn> and the "
38659 "corresponding data pointer is returned from the function. C<NULL> is "
38660 "returned if there are no keys stored in the handle."
38664 #: ../src/guestfs.pod:2100
38666 "C<guestfs_next_private> returns the next key, pointer pair. The return "
38667 "value of this function is also C<NULL> is there are no further entries to "
38672 #: ../src/guestfs.pod:2104
38673 msgid "Notes about walking over entries:"
38677 #: ../src/guestfs.pod:2110
38678 msgid "You must not call C<guestfs_set_private> while walking over the entries."
38682 #: ../src/guestfs.pod:2115
38684 "The handle maintains an internal iterator which is reset when you call "
38685 "C<guestfs_first_private>. This internal iterator is invalidated when you "
38686 "call C<guestfs_set_private>."
38690 #: ../src/guestfs.pod:2121
38691 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
38695 #: ../src/guestfs.pod:2123
38698 " guestfs_set_private (g, key, NULL);\n"
38703 #: ../src/guestfs.pod:2125
38704 msgid "then that C<key> is not returned when walking."
38708 #: ../src/guestfs.pod:2129
38710 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
38711 "C<guestfs_next_private> or C<guestfs_set_private>."
38715 #: ../src/guestfs.pod:2135
38717 "The following example code shows how to print all keys and data pointers "
38718 "that are associated with the handle C<g>:"
38722 #: ../src/guestfs.pod:2138
38725 " const char *key;\n"
38726 " void *data = guestfs_first_private (g, &key);\n"
38727 " while (data != NULL)\n"
38729 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38730 " data = guestfs_next_private (g, &key);\n"
38736 #: ../src/guestfs.pod:2146
38738 "More commonly you are only interested in keys that begin with an "
38739 "application-specific prefix C<foo_>. Modify the loop like so:"
38743 #: ../src/guestfs.pod:2149
38746 " const char *key;\n"
38747 " void *data = guestfs_first_private (g, &key);\n"
38748 " while (data != NULL)\n"
38750 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38751 " printf (\"key = %s, data = %p\\n\", key, data);\n"
38752 " data = guestfs_next_private (g, &key);\n"
38758 #: ../src/guestfs.pod:2158
38760 "If you need to modify keys while walking, then you have to jump back to the "
38761 "beginning of the loop. For example, to delete all keys prefixed with "
38766 #: ../src/guestfs.pod:2162
38769 " const char *key;\n"
38772 " data = guestfs_first_private (g, &key);\n"
38773 " while (data != NULL)\n"
38775 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
38777 " guestfs_set_private (g, key, NULL);\n"
38778 " /* note that 'key' pointer is now invalid, and so is\n"
38779 " the internal iterator */\n"
38782 " data = guestfs_next_private (g, &key);\n"
38788 #: ../src/guestfs.pod:2178
38790 "Note that the above loop is guaranteed to terminate because the keys are "
38791 "being deleted, but other manipulations of keys within the loop might not "
38792 "terminate unless you also maintain an indication of which keys have been "
38797 #: ../src/guestfs.pod:2183
38802 #: ../src/guestfs.pod:2185
38804 "The libguestfs C library can be probed using systemtap or DTrace. This is "
38805 "true of any library, not just libguestfs. However libguestfs also contains "
38806 "static markers to help in probing internal operations."
38810 #: ../src/guestfs.pod:2189
38811 msgid "You can list all the static markers by doing:"
38815 #: ../src/guestfs.pod:2191
38818 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
38819 " .provider(\"guestfs\").mark(\"*\")'\n"
38824 #: ../src/guestfs.pod:2194
38826 "B<Note:> These static markers are I<not> part of the stable API and may "
38827 "change in future versions."
38831 #: ../src/guestfs.pod:2197
38832 msgid "SYSTEMTAP SCRIPT EXAMPLE"
38836 #: ../src/guestfs.pod:2199
38838 "This script contains examples of displaying both the static markers and some "
38839 "ordinary C entry points:"
38843 #: ../src/guestfs.pod:2202
38851 #: ../src/guestfs.pod:2204
38854 " function display_time () {\n"
38855 " now = gettimeofday_us ();\n"
38858 " delta = now - last;\n"
38864 #: ../src/guestfs.pod:2211
38867 " printf (\"%d (+%d):\", now, delta);\n"
38873 #: ../src/guestfs.pod:2214
38878 " printf (\"ready\\n\");\n"
38884 #: ../src/guestfs.pod:2219
38887 " /* Display all calls to static markers. */\n"
38888 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38889 " .provider(\"guestfs\").mark(\"*\") ? {\n"
38890 " display_time();\n"
38891 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
38897 #: ../src/guestfs.pod:2226
38900 " /* Display all calls to guestfs_mkfs* functions. */\n"
38901 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
38902 " .function(\"guestfs_mkfs*\") ? {\n"
38903 " display_time();\n"
38904 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
38910 #: ../src/guestfs.pod:2233
38912 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
38913 "program. Note that you either have to be root, or you have to add yourself "
38914 "to several special stap groups. Consult the systemtap documentation for "
38915 "more information."
38919 #: ../src/guestfs.pod:2238
38922 " # stap /tmp/test.stap\n"
38928 #: ../src/guestfs.pod:2241
38929 msgid "In another terminal, run a guestfish command such as this:"
38933 #: ../src/guestfs.pod:2245
38934 msgid "In the first terminal, stap trace output similar to this is shown:"
38938 #: ../src/guestfs.pod:2247
38941 " 1318248056692655 (+0):\tlaunch_start\n"
38942 " 1318248056692850 (+195): launch_build_appliance_start\n"
38943 " 1318248056818285 (+125435): launch_build_appliance_end\n"
38944 " 1318248056838059 (+19774): launch_run_qemu\n"
38945 " 1318248061071167 (+4233108): launch_end\n"
38946 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f "
38947 "device=0x1024e60\n"
38952 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
38957 #: ../src/guestfs.pod:2256
38959 "<!-- old anchor for the next section --> <a "
38960 "name=\"state_machine_and_low_level_event_api\"/>"
38964 #: ../src/guestfs.pod:2261
38965 msgid "ARCHITECTURE"
38969 #: ../src/guestfs.pod:2263
38971 "Internally, libguestfs is implemented by running an appliance (a special "
38972 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
38973 "process of the main program."
38977 #: ../src/guestfs.pod:2267
38980 " ___________________\n"
38982 " | main program |\n"
38984 " | | child process / appliance\n"
38985 " | | __________________________\n"
38987 " +-------------------+ RPC | +-----------------+ |\n"
38988 " | libguestfs <--------------------> guestfsd | |\n"
38989 " | | | +-----------------+ |\n"
38990 " \\___________________/ | | Linux kernel | |\n"
38991 " | +--^--------------+ |\n"
38992 " \\_________|________________/\n"
38994 " _______v______\n"
38997 " | disk image |\n"
38998 " \\______________/\n"
39003 #: ../src/guestfs.pod:2287
39005 "The library, linked to the main program, creates the child process and hence "
39006 "the appliance in the L</guestfs_launch> function."
39010 #: ../src/guestfs.pod:2290
39012 "Inside the appliance is a Linux kernel and a complete stack of userspace "
39013 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
39014 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
39015 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
39016 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
39017 "attached to the qemu process which translates device access by the "
39018 "appliance's Linux kernel into accesses to the image."
39022 #: ../src/guestfs.pod:2299
39024 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
39025 "Although the disk image you are attached to might also be used by some "
39026 "virtual machine, libguestfs doesn't know or care about this. (But you will "
39027 "care if both libguestfs's qemu process and your virtual machine are trying "
39028 "to update the disk image at the same time, since these usually results in "
39029 "massive disk corruption)."
39033 #: ../src/guestfs.pod:2306
39034 msgid "STATE MACHINE"
39038 #: ../src/guestfs.pod:2308
39039 msgid "libguestfs uses a state machine to model the child process:"
39043 #: ../src/guestfs.pod:2310
39047 " guestfs_create\n"
39055 " / | \\ \\ guestfs_launch\n"
39056 " / | _\\__V______\n"
39058 " / | | LAUNCHING |\n"
39059 " / | \\___________/\n"
39061 " / | guestfs_launch\n"
39063 " ______ / __|____V\n"
39064 " / \\ ------> / \\\n"
39065 " | BUSY | | READY |\n"
39066 " \\______/ <------ \\________/\n"
39071 #: ../src/guestfs.pod:2332
39073 "The normal transitions are (1) CONFIG (when the handle is created, but there "
39074 "is no child process), (2) LAUNCHING (when the child process is booting up), "
39075 "(3) alternating between READY and BUSY as commands are issued to, and "
39076 "carried out by, the child process."
39080 #: ../src/guestfs.pod:2337
39082 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
39083 "asynchronously at any time (eg. due to some internal error), and that causes "
39084 "the state to transition back to CONFIG."
39088 #: ../src/guestfs.pod:2341
39090 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
39091 "issued when in the CONFIG state."
39095 #: ../src/guestfs.pod:2344
39097 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
39098 "L</guestfs_launch> blocks until the child process is READY to accept "
39099 "commands (or until some failure or timeout). L</guestfs_launch> internally "
39100 "moves the state from CONFIG to LAUNCHING while it is running."
39104 #: ../src/guestfs.pod:2350
39106 "API actions such as L</guestfs_mount> can only be issued when in the READY "
39107 "state. These API calls block waiting for the command to be carried out "
39108 "(ie. the state to transition to BUSY and then back to READY). There are no "
39109 "non-blocking versions, and no way to issue more than one command per handle "
39110 "at the same time."
39114 #: ../src/guestfs.pod:2356
39116 "Finally, the child process sends asynchronous messages back to the main "
39117 "program, such as kernel log messages. You can register a callback to "
39118 "receive these messages."
39122 #: ../src/guestfs.pod:2360
39127 #: ../src/guestfs.pod:2362
39128 msgid "APPLIANCE BOOT PROCESS"
39132 #: ../src/guestfs.pod:2364
39134 "This process has evolved and continues to evolve. The description here "
39135 "corresponds only to the current version of libguestfs and is provided for "
39136 "information only."
39140 #: ../src/guestfs.pod:2368
39142 "In order to follow the stages involved below, enable libguestfs debugging "
39143 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
39147 #: ../src/guestfs.pod:2373
39148 msgid "Create the appliance"
39152 #: ../src/guestfs.pod:2375
39154 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
39155 "initrd and the appliance."
39159 #: ../src/guestfs.pod:2378
39161 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
39162 "directory if C<TMPDIR> is set)."
39166 #: ../src/guestfs.pod:2381
39168 "For a complete description of how the appliance is created and cached, read "
39169 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
39173 #: ../src/guestfs.pod:2385
39174 msgid "Start qemu and boot the kernel"
39178 #: ../src/guestfs.pod:2387
39179 msgid "qemu is invoked to boot the kernel."
39183 #: ../src/guestfs.pod:2389
39184 msgid "Run the initrd"
39188 #: ../src/guestfs.pod:2391
39190 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
39191 "appliance. The purpose of the initrd is to load enough kernel modules in "
39192 "order that the appliance itself can be mounted and started."
39196 #: ../src/guestfs.pod:2395
39198 "The initrd is a cpio archive called "
39199 "C</var/tmp/.guestfs-E<lt>UIDE<gt>/initrd>."
39203 #: ../src/guestfs.pod:2398
39205 "When the initrd has started you will see messages showing that kernel "
39206 "modules are being loaded, similar to this:"
39210 #: ../src/guestfs.pod:2401
39213 " febootstrap: ext2 mini initrd starting up\n"
39214 " febootstrap: mounting /sys\n"
39215 " febootstrap: internal insmod libcrc32c.ko\n"
39216 " febootstrap: internal insmod crc32c-intel.ko\n"
39221 #: ../src/guestfs.pod:2406
39222 msgid "Find and mount the appliance device"
39226 #: ../src/guestfs.pod:2408
39228 "The appliance is a sparse file containing an ext2 filesystem which contains "
39229 "a familiar (although reduced in size) Linux operating system. It would "
39230 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
39234 #: ../src/guestfs.pod:2412
39236 "The regular disks being inspected by libguestfs are the first devices "
39237 "exposed by qemu (eg. as C</dev/vda>)."
39241 #: ../src/guestfs.pod:2415
39243 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
39244 "there was only one regular disk)."
39248 #: ../src/guestfs.pod:2418
39250 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
39251 "and switch root into the appliance, and run C</init> from the appliance."
39255 #: ../src/guestfs.pod:2422
39256 msgid "If this works successfully you will see messages such as:"
39260 #: ../src/guestfs.pod:2424
39263 " febootstrap: picked /sys/block/vdb/dev as root device\n"
39264 " febootstrap: creating /dev/root as block special 252:16\n"
39265 " febootstrap: mounting new root on /root\n"
39266 " febootstrap: chroot\n"
39267 " Starting /init script ...\n"
39272 #: ../src/guestfs.pod:2430
39274 "Note that C<Starting /init script ...> indicates that the appliance's init "
39275 "script is now running."
39279 #: ../src/guestfs.pod:2433
39280 msgid "Initialize the appliance"
39284 #: ../src/guestfs.pod:2435
39286 "The appliance itself now initializes itself. This involves starting certain "
39287 "processes like C<udev>, possibly printing some debug information, and "
39288 "finally running the daemon (C<guestfsd>)."
39292 #: ../src/guestfs.pod:2439
39297 #: ../src/guestfs.pod:2441
39299 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
39304 #: ../src/guestfs.pod:2444
39307 " verbose daemon enabled\n"
39312 #: ../src/guestfs.pod:2446
39314 "The daemon expects to see a named virtio-serial port exposed by qemu and "
39315 "connected on the other end to the library."
39319 #: ../src/guestfs.pod:2449
39321 "The daemon connects to this port (and hence to the library) and sends a four "
39322 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
39323 "protocol (see below)."
39327 #: ../src/guestfs.pod:2455
39328 msgid "COMMUNICATION PROTOCOL"
39332 #: ../src/guestfs.pod:2457
39334 "Don't rely on using this protocol directly. This section documents how it "
39335 "currently works, but it may change at any time."
39339 #: ../src/guestfs.pod:2460
39341 "The protocol used to talk between the library and the daemon running inside "
39342 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
39343 "1014, RFC 1832, RFC 4506)."
39347 #: ../src/guestfs.pod:2464
39349 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
39350 "this file is automatically generated)."
39354 #: ../src/guestfs.pod:2467
39356 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
39357 "and C<FileOut> parameters, which are handled with very simple request/reply "
39358 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
39359 "parameters, which use the same request and reply messages, but they may also "
39360 "be followed by files sent using a chunked encoding."
39364 #: ../src/guestfs.pod:2474
39365 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
39369 #: ../src/guestfs.pod:2476
39370 msgid "For ordinary functions, the request message is:"
39374 #: ../src/guestfs.pod:2478
39377 " total length (header + arguments,\n"
39378 " but not including the length word itself)\n"
39379 " struct guestfs_message_header (encoded as XDR)\n"
39380 " struct guestfs_<foo>_args (encoded as XDR)\n"
39385 #: ../src/guestfs.pod:2483
39387 "The total length field allows the daemon to allocate a fixed size buffer "
39388 "into which it slurps the rest of the message. As a result, the total length "
39389 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
39390 "effective size of any request is limited to somewhere under this size."
39394 #: ../src/guestfs.pod:2489
39396 "Note also that many functions don't take any arguments, in which case the "
39397 "C<guestfs_I<foo>_args> is completely omitted."
39401 #: ../src/guestfs.pod:2492
39403 "The header contains the procedure number (C<guestfs_proc>) which is how the "
39404 "receiver knows what type of args structure to expect, or none at all."
39408 #: ../src/guestfs.pod:2496
39410 "For functions that take optional arguments, the optional arguments are "
39411 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
39412 "arguments. A bitmask in the header indicates which optional arguments are "
39413 "meaningful. The bitmask is also checked to see if it contains bits set "
39414 "which the daemon does not know about (eg. if more optional arguments were "
39415 "added in a later version of the library), and this causes the call to be "
39420 #: ../src/guestfs.pod:2504
39421 msgid "The reply message for ordinary functions is:"
39425 #: ../src/guestfs.pod:2506
39428 " total length (header + ret,\n"
39429 " but not including the length word itself)\n"
39430 " struct guestfs_message_header (encoded as XDR)\n"
39431 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39436 #: ../src/guestfs.pod:2511
39438 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
39439 "functions that return no formal return values."
39443 #: ../src/guestfs.pod:2514
39444 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
39448 #: ../src/guestfs.pod:2517
39450 "In the case of an error, a flag is set in the header, and the reply message "
39451 "is slightly changed:"
39455 #: ../src/guestfs.pod:2520
39458 " total length (header + error,\n"
39459 " but not including the length word itself)\n"
39460 " struct guestfs_message_header (encoded as XDR)\n"
39461 " struct guestfs_message_error (encoded as XDR)\n"
39466 #: ../src/guestfs.pod:2525
39468 "The C<guestfs_message_error> structure contains the error message as a "
39473 #: ../src/guestfs.pod:2528
39474 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
39478 #: ../src/guestfs.pod:2530
39480 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
39481 "The normal request message is sent (see above). However this is followed by "
39482 "a sequence of file chunks."
39486 #: ../src/guestfs.pod:2534
39489 " total length (header + arguments,\n"
39490 " but not including the length word itself,\n"
39491 " and not including the chunks)\n"
39492 " struct guestfs_message_header (encoded as XDR)\n"
39493 " struct guestfs_<foo>_args (encoded as XDR)\n"
39494 " sequence of chunks for FileIn param #0\n"
39495 " sequence of chunks for FileIn param #1 etc.\n"
39500 #: ../src/guestfs.pod:2542
39501 msgid "The \"sequence of chunks\" is:"
39505 #: ../src/guestfs.pod:2544
39508 " length of chunk (not including length word itself)\n"
39509 " struct guestfs_chunk (encoded as XDR)\n"
39510 " length of chunk\n"
39511 " struct guestfs_chunk (encoded as XDR)\n"
39513 " length of chunk\n"
39514 " struct guestfs_chunk (with data.data_len == 0)\n"
39519 #: ../src/guestfs.pod:2552
39521 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
39522 "is set in the final chunk to indicate either successful completion or early "
39527 #: ../src/guestfs.pod:2556
39529 "At time of writing there are no functions that have more than one FileIn "
39530 "parameter. However this is (theoretically) supported, by sending the "
39531 "sequence of chunks for each FileIn parameter one after another (from left to "
39536 #: ../src/guestfs.pod:2561
39538 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
39539 "transfer. The library does this by sending a chunk with a special flag set "
39540 "to indicate cancellation. When the daemon sees this, it cancels the whole "
39541 "RPC, does I<not> send any reply, and goes back to reading the next request."
39545 #: ../src/guestfs.pod:2567
39547 "The daemon may also cancel. It does this by writing a special word "
39548 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
39549 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
39550 "cancel chunk). The special word is chosen so that even if cancellation "
39551 "happens right at the end of the transfer (after the library has finished "
39552 "writing and has started listening for the reply), the \"spurious\" cancel "
39553 "flag will not be confused with the reply message."
39557 #: ../src/guestfs.pod:2576
39559 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
39560 "limit), and also files where the size is not known in advance (eg. from "
39561 "pipes or sockets). However the chunks are rather small "
39562 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
39563 "to keep much in memory."
39567 #: ../src/guestfs.pod:2582
39568 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
39572 #: ../src/guestfs.pod:2584
39574 "The protocol for FileOut parameters is exactly the same as for FileIn "
39575 "parameters, but with the roles of daemon and library reversed."
39579 #: ../src/guestfs.pod:2587
39582 " total length (header + ret,\n"
39583 " but not including the length word itself,\n"
39584 " and not including the chunks)\n"
39585 " struct guestfs_message_header (encoded as XDR)\n"
39586 " struct guestfs_<foo>_ret (encoded as XDR)\n"
39587 " sequence of chunks for FileOut param #0\n"
39588 " sequence of chunks for FileOut param #1 etc.\n"
39593 #: ../src/guestfs.pod:2595
39594 msgid "INITIAL MESSAGE"
39598 #: ../src/guestfs.pod:2597
39600 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
39601 "which indicates that the guest and daemon is alive. This is what "
39602 "L</guestfs_launch> waits for."
39606 #: ../src/guestfs.pod:2601
39607 msgid "PROGRESS NOTIFICATION MESSAGES"
39611 #: ../src/guestfs.pod:2603
39613 "The daemon may send progress notification messages at any time. These are "
39614 "distinguished by the normal length word being replaced by "
39615 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
39619 #: ../src/guestfs.pod:2607
39621 "The library turns them into progress callbacks (see "
39622 "L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
39627 #: ../src/guestfs.pod:2611
39629 "The daemon self-limits the frequency of progress messages it sends (see "
39630 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
39635 #: ../src/guestfs.pod:2615
39636 msgid "LIBGUESTFS VERSION NUMBERS"
39640 #: ../src/guestfs.pod:2617
39642 "Since April 2010, libguestfs has started to make separate development and "
39643 "stable releases, along with corresponding branches in our git repository. "
39644 "These separate releases can be identified by version number:"
39648 #: ../src/guestfs.pod:2622
39651 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
39652 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
39658 " | `-------- sub-version\n"
39660 " `------ always '1' because we don't change the ABI\n"
39665 #: ../src/guestfs.pod:2633
39666 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
39670 #: ../src/guestfs.pod:2635
39672 "As time passes we cherry pick fixes from the development branch and backport "
39673 "those into the stable branch, the effect being that the stable branch should "
39674 "get more stable and less buggy over time. So the stable releases are ideal "
39675 "for people who don't need new features but would just like the software to "
39680 #: ../src/guestfs.pod:2641
39681 msgid "Our criteria for backporting changes are:"
39685 #: ../src/guestfs.pod:2647
39687 "Documentation changes which don't affect any code are backported unless the "
39688 "documentation refers to a future feature which is not in stable."
39692 #: ../src/guestfs.pod:2653
39694 "Bug fixes which are not controversial, fix obvious problems, and have been "
39695 "well tested are backported."
39699 #: ../src/guestfs.pod:2658
39701 "Simple rearrangements of code which shouldn't affect how it works get "
39702 "backported. This is so that the code in the two branches doesn't get too "
39703 "far out of step, allowing us to backport future fixes more easily."
39707 #: ../src/guestfs.pod:2664
39709 "We I<don't> backport new features, new APIs, new tools etc, except in one "
39710 "exceptional case: the new feature is required in order to implement an "
39711 "important bug fix."
39715 #: ../src/guestfs.pod:2670
39717 "A new stable branch starts when we think the new features in development are "
39718 "substantial and compelling enough over the current stable branch to warrant "
39719 "it. When that happens we create new stable and development versions 1.N.0 "
39720 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
39721 "stable at this point, but by backporting fixes from development, that branch "
39722 "will stabilize over time."
39726 #: ../src/guestfs.pod:2678
39727 msgid "EXTENDING LIBGUESTFS"
39731 #: ../src/guestfs.pod:2680
39732 msgid "ADDING A NEW API ACTION"
39736 #: ../src/guestfs.pod:2682
39738 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
39739 "documentation) are generated, and this makes it easy to extend the "
39744 #: ../src/guestfs.pod:2686
39745 msgid "To add a new API action there are two changes:"
39749 #: ../src/guestfs.pod:2692
39751 "You need to add a description of the call (name, parameters, return type, "
39752 "tests, documentation) to C<generator/generator_actions.ml>."
39756 #: ../src/guestfs.pod:2695
39758 "There are two sorts of API action, depending on whether the call goes "
39759 "through to the daemon in the appliance, or is serviced entirely by the "
39760 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
39761 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
39762 "an example of the latter, since a trace flag is maintained in the handle and "
39763 "all tracing is done on the library side."
39767 #: ../src/guestfs.pod:2703
39769 "Most new actions are of the first type, and get added to the "
39770 "C<daemon_functions> list. Each function has a unique procedure number used "
39771 "in the RPC protocol which is assigned to that action when we publish "
39772 "libguestfs and cannot be reused. Take the latest procedure number and "
39777 #: ../src/guestfs.pod:2709
39779 "For library-only actions of the second type, add to the "
39780 "C<non_daemon_functions> list. Since these functions are serviced by the "
39781 "library and do not travel over the RPC mechanism to the daemon, these "
39782 "functions do not need a procedure number, and so the procedure number is set "
39787 #: ../src/guestfs.pod:2717
39788 msgid "Implement the action (in C):"
39792 #: ../src/guestfs.pod:2719
39794 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
39795 "C<daemon/> directory."
39799 #: ../src/guestfs.pod:2722
39801 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
39802 "(note: double underscore) in the C<src/> directory."
39806 #: ../src/guestfs.pod:2725
39807 msgid "In either case, use another function as an example of what to do."
39811 #: ../src/guestfs.pod:2729
39812 msgid "After making these changes, use C<make> to compile."
39816 #: ../src/guestfs.pod:2731
39818 "Note that you don't need to implement the RPC, language bindings, manual "
39819 "pages or anything else. It's all automatically generated from the OCaml "
39824 #: ../src/guestfs.pod:2735
39825 msgid "ADDING TESTS FOR AN API ACTION"
39829 #: ../src/guestfs.pod:2737
39831 "You can supply zero or as many tests as you want per API call. The tests "
39832 "can either be added as part of the API description "
39833 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
39834 "drop a script into C<regressions/>. Note that adding a script to "
39835 "C<regressions/> is slower, so if possible use the first method."
39839 #: ../src/guestfs.pod:2743
39841 "The following describes the test environment used when you add an API test "
39842 "in C<generator_actions.ml>."
39846 #: ../src/guestfs.pod:2746
39847 msgid "The test environment has 4 block devices:"
39851 #: ../src/guestfs.pod:2750
39852 msgid "C</dev/sda> 500MB"
39856 #: ../src/guestfs.pod:2752
39857 msgid "General block device for testing."
39861 #: ../src/guestfs.pod:2754
39862 msgid "C</dev/sdb> 50MB"
39866 #: ../src/guestfs.pod:2756
39868 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
39873 #: ../src/guestfs.pod:2759
39874 msgid "C</dev/sdc> 10MB"
39878 #: ../src/guestfs.pod:2761
39879 msgid "Used in a few tests where two block devices are needed."
39883 #: ../src/guestfs.pod:2763
39884 msgid "C</dev/sdd>"
39888 #: ../src/guestfs.pod:2765
39889 msgid "ISO with fixed content (see C<images/test.iso>)."
39893 #: ../src/guestfs.pod:2769
39895 "To be able to run the tests in a reasonable amount of time, the libguestfs "
39896 "appliance and block devices are reused between tests. So don't try testing "
39897 "L</guestfs_kill_subprocess> :-x"
39901 #: ../src/guestfs.pod:2773
39903 "Each test starts with an initial scenario, selected using one of the "
39904 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
39905 "initialize the disks mentioned above in a particular way as documented in "
39906 "C<generator_types.ml>. You should not assume anything about the previous "
39907 "contents of other disks that are not initialized."
39911 #: ../src/guestfs.pod:2779
39913 "You can add a prerequisite clause to any individual test. This is a "
39914 "run-time check, which, if it fails, causes the test to be skipped. Useful "
39915 "if testing a command which might not work on all variations of libguestfs "
39916 "builds. A test that has prerequisite of C<Always> means to run "
39921 #: ../src/guestfs.pod:2785
39923 "In addition, packagers can skip individual tests by setting environment "
39924 "variables before running C<make check>."
39928 #: ../src/guestfs.pod:2788
39931 " SKIP_TEST_<CMD>_<NUM>=1\n"
39936 #: ../src/guestfs.pod:2790
39937 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
39941 #: ../src/guestfs.pod:2794
39944 " SKIP_TEST_<CMD>=1\n"
39949 #: ../src/guestfs.pod:2796
39950 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
39954 #: ../src/guestfs.pod:2798
39955 msgid "Packagers can run only certain tests by setting for example:"
39959 #: ../src/guestfs.pod:2800
39962 " TEST_ONLY=\"vfs_type zerofree\"\n"
39967 #: ../src/guestfs.pod:2802
39969 "See C<capitests/tests.c> for more details of how these environment variables "
39974 #: ../src/guestfs.pod:2805
39975 msgid "DEBUGGING NEW API ACTIONS"
39979 #: ../src/guestfs.pod:2807
39980 msgid "Test new actions work before submitting them."
39984 #: ../src/guestfs.pod:2809
39985 msgid "You can use guestfish to try out new commands."
39989 #: ../src/guestfs.pod:2811
39991 "Debugging the daemon is a problem because it runs inside a minimal "
39992 "environment. However you can fprintf messages in the daemon to stderr, and "
39993 "they will show up if you use C<guestfish -v>."
39997 #: ../src/guestfs.pod:2815
39998 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
40002 #: ../src/guestfs.pod:2817
40004 "Our C source code generally adheres to some basic code-formatting "
40005 "conventions. The existing code base is not totally consistent on this "
40006 "front, but we do prefer that contributed code be formatted similarly. In "
40007 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
40008 "indentation level, and other than that, follow the K&R style."
40012 #: ../src/guestfs.pod:2823
40014 "If you use Emacs, add the following to one of one of your start-up files "
40015 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
40019 #: ../src/guestfs.pod:2826
40022 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
40023 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
40024 " (add-hook 'find-file-hook\n"
40025 " '(lambda () (if (and buffer-file-name\n"
40026 " (string-match \"/libguestfs\\\\>\"\n"
40027 " (buffer-file-name))\n"
40028 " (not (string-equal mode-name \"Change Log\"))\n"
40029 " (not (string-equal mode-name \"Makefile\")))\n"
40030 " (setq indent-tabs-mode nil))))\n"
40035 #: ../src/guestfs.pod:2836
40038 " ;;; When editing C sources in libguestfs, use this style.\n"
40039 " (defun libguestfs-c-mode ()\n"
40040 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
40042 " (c-set-style \"K&R\")\n"
40043 " (setq c-indent-level 2)\n"
40044 " (setq c-basic-offset 2))\n"
40045 " (add-hook 'c-mode-hook\n"
40046 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
40047 " (buffer-file-name))\n"
40048 " (libguestfs-c-mode))))\n"
40053 #: ../src/guestfs.pod:2848
40054 msgid "Enable warnings when compiling (and fix any problems this finds):"
40058 #: ../src/guestfs.pod:2851
40061 " ./configure --enable-gcc-warnings\n"
40066 #: ../src/guestfs.pod:2853
40067 msgid "Useful targets are:"
40071 #: ../src/guestfs.pod:2855
40074 " make syntax-check # checks the syntax of the C code\n"
40075 " make check # runs the test suite\n"
40080 #: ../src/guestfs.pod:2858
40081 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
40085 #: ../src/guestfs.pod:2860
40087 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
40088 "which are used to do shell quoting."
40092 #: ../src/guestfs.pod:2865
40097 #: ../src/guestfs.pod:2867
40099 "Simple shell quoted string. Any spaces or other shell characters are "
40104 #: ../src/guestfs.pod:2870
40109 #: ../src/guestfs.pod:2872
40111 "Same as C<%Q> except the string is treated as a path which is prefixed by "
40116 #: ../src/guestfs.pod:2879
40119 " asprintf (&cmd, \"cat %R\", path);\n"
40124 #: ../src/guestfs.pod:2881
40125 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
40129 #: ../src/guestfs.pod:2883
40131 "I<Note:> Do I<not> use these when you are passing parameters to the "
40132 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
40133 "because they are not passed via the shell (instead, straight to exec). You "
40134 "probably want to use the C<sysroot_path()> function however."
40138 #: ../src/guestfs.pod:2889
40139 msgid "SUBMITTING YOUR NEW API ACTIONS"
40143 #: ../src/guestfs.pod:2891
40145 "Submit patches to the mailing list: "
40146 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
40147 "L<rjones@redhat.com>."
40151 #: ../src/guestfs.pod:2895
40152 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
40156 #: ../src/guestfs.pod:2897
40157 msgid "We support i18n (gettext anyhow) in the library."
40161 #: ../src/guestfs.pod:2899
40163 "However many messages come from the daemon, and we don't translate those at "
40164 "the moment. One reason is that the appliance generally has all locale files "
40165 "removed from it, because they take up a lot of space. So we'd have to readd "
40166 "some of those, as well as copying our PO files into the appliance."
40170 #: ../src/guestfs.pod:2905
40172 "Debugging messages are never translated, since they are intended for the "
40177 #: ../src/guestfs.pod:2908
40178 msgid "SOURCE CODE SUBDIRECTORIES"
40182 #: ../src/guestfs.pod:2912
40187 #: ../src/guestfs.pod:2914
40188 msgid "L<virt-alignment-scan(1)> command and documentation."
40192 #: ../src/guestfs.pod:2918
40193 msgid "The libguestfs appliance, build scripts and so on."
40197 #: ../src/guestfs.pod:2920
40198 msgid "C<capitests>"
40202 #: ../src/guestfs.pod:2922
40203 msgid "Automated tests of the C API."
40207 #: ../src/guestfs.pod:2924
40212 #: ../src/guestfs.pod:2926
40214 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
40219 #: ../src/guestfs.pod:2929
40224 #: ../src/guestfs.pod:2931
40226 "Safety and liveness tests of components that libguestfs depends upon (not of "
40227 "libguestfs itself). Mainly this is for qemu and the kernel."
40231 #: ../src/guestfs.pod:2934
40236 #: ../src/guestfs.pod:2936
40238 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
40239 "command and documentation."
40243 #: ../src/guestfs.pod:2939
40248 #: ../src/guestfs.pod:2941
40249 msgid "Outside contributions, experimental parts."
40253 #: ../src/guestfs.pod:2943
40258 #: ../src/guestfs.pod:2945
40260 "The daemon that runs inside the libguestfs appliance and carries out "
40265 #: ../src/guestfs.pod:2948
40270 #: ../src/guestfs.pod:2950
40271 msgid "L<virt-df(1)> command and documentation."
40275 #: ../src/guestfs.pod:2952
40280 #: ../src/guestfs.pod:2954
40281 msgid "L<virt-edit(1)> command and documentation."
40285 #: ../src/guestfs.pod:2956
40286 msgid "C<examples>"
40290 #: ../src/guestfs.pod:2958
40291 msgid "C API example code."
40295 #: ../src/guestfs.pod:2960
40296 msgid "C<extratests>"
40300 #: ../src/guestfs.pod:2962
40302 "Extra tests. These are not run by default because they require special "
40303 "tools or configuration."
40307 #: ../src/guestfs.pod:2965
40312 #: ../src/guestfs.pod:2967
40314 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
40315 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
40316 "L<virt-tar-out(1)>."
40320 #: ../src/guestfs.pod:2971
40325 #: ../src/guestfs.pod:2973
40326 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
40330 #: ../src/guestfs.pod:2975
40331 msgid "C<generator>"
40335 #: ../src/guestfs.pod:2977
40337 "The crucially important generator, used to automatically generate large "
40338 "amounts of boilerplate C code for things like RPC and bindings."
40342 #: ../src/guestfs.pod:2980
40347 #: ../src/guestfs.pod:2982
40348 msgid "Files used by the test suite."
40352 #: ../src/guestfs.pod:2984
40353 msgid "Some \"phony\" guest images which we test against."
40357 #: ../src/guestfs.pod:2986
40358 msgid "C<inspector>"
40362 #: ../src/guestfs.pod:2988
40363 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
40367 #: ../src/guestfs.pod:2990
40372 #: ../src/guestfs.pod:2992
40373 msgid "Logo used on the website. The fish is called Arthur by the way."
40377 #: ../src/guestfs.pod:2994
40382 #: ../src/guestfs.pod:2996
40383 msgid "M4 macros used by autoconf."
40387 #: ../src/guestfs.pod:2998
40392 #: ../src/guestfs.pod:3000
40393 msgid "Translations of simple gettext strings."
40397 #: ../src/guestfs.pod:3002
40402 #: ../src/guestfs.pod:3004
40404 "The build infrastructure and PO files for translations of manpages and POD "
40405 "files. Eventually this will be combined with the C<po> directory, but that "
40406 "is rather complicated."
40410 #: ../src/guestfs.pod:3008
40411 msgid "C<regressions>"
40415 #: ../src/guestfs.pod:3010
40416 msgid "Regression tests."
40420 #: ../src/guestfs.pod:3012
40425 #: ../src/guestfs.pod:3014
40426 msgid "L<virt-rescue(1)> command and documentation."
40430 #: ../src/guestfs.pod:3016
40435 #: ../src/guestfs.pod:3018
40436 msgid "L<virt-resize(1)> command and documentation."
40440 #: ../src/guestfs.pod:3020
40441 msgid "C<sparsify>"
40445 #: ../src/guestfs.pod:3022
40446 msgid "L<virt-sparsify(1)> command and documentation."
40450 #: ../src/guestfs.pod:3024
40455 #: ../src/guestfs.pod:3026
40456 msgid "Source code to the C library."
40460 #: ../src/guestfs.pod:3028
40465 #: ../src/guestfs.pod:3030
40466 msgid "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
40470 #: ../src/guestfs.pod:3032
40471 msgid "C<test-tool>"
40475 #: ../src/guestfs.pod:3034
40477 "Test tool for end users to test if their qemu/kernel combination will work "
40482 #: ../src/guestfs.pod:3037
40487 #: ../src/guestfs.pod:3039
40492 #: ../src/guestfs.pod:3041
40497 #: ../src/guestfs.pod:3043
40502 #: ../src/guestfs.pod:3045
40507 #: ../src/guestfs.pod:3047
40512 #: ../src/guestfs.pod:3049
40517 #: ../src/guestfs.pod:3051
40522 #: ../src/guestfs.pod:3053
40527 #: ../src/guestfs.pod:3055
40528 msgid "Language bindings."
40532 #: ../src/guestfs.pod:3059
40533 msgid "MAKING A STABLE RELEASE"
40537 #: ../src/guestfs.pod:3061
40539 "When we make a stable release, there are several steps documented here. See "
40540 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
40545 #: ../src/guestfs.pod:3069
40546 msgid "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
40550 #: ../src/guestfs.pod:3074
40551 msgid "Finalize RELEASE-NOTES."
40555 #: ../src/guestfs.pod:3078
40556 msgid "Update ROADMAP."
40560 #: ../src/guestfs.pod:3082
40561 msgid "Run C<src/api-support/update-from-tarballs.sh>."
40565 #: ../src/guestfs.pod:3086
40566 msgid "Push and pull from Transifex."
40570 #: ../src/guestfs.pod:3090
40578 #: ../src/guestfs.pod:3092
40579 msgid "to push the latest POT files to Transifex. Then run:"
40583 #: ../src/guestfs.pod:3094
40591 #: ../src/guestfs.pod:3096
40592 msgid "which is a wrapper to pull the latest translated C<*.po> files."
40596 #: ../src/guestfs.pod:3100
40598 "Create new stable and development directories under "
40599 "L<http://libguestfs.org/download>."
40603 #: ../src/guestfs.pod:3105
40604 msgid "Create the branch in git:"
40608 #: ../src/guestfs.pod:3107
40611 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
40612 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
40613 " git branch stable-1.XX\n"
40614 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
40619 #: ../src/guestfs.pod:3114
40624 #: ../src/guestfs.pod:3116
40625 msgid "PROTOCOL LIMITS"
40629 #: ../src/guestfs.pod:3118
40631 "Internally libguestfs uses a message-based protocol to pass API calls and "
40632 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
40633 "plenty more detail about this). The maximum message size used by the "
40634 "protocol is slightly less than 4 MB. For some API calls you may need to be "
40635 "aware of this limit. The API calls which may be affected are individually "
40636 "documented, with a link back to this section of the documentation."
40640 #: ../src/guestfs.pod:3126
40642 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
40643 "a simple string. Because this string is at some point internally encoded as "
40644 "a message, the maximum size that it can return is slightly under 4 MB. If "
40645 "the requested file is larger than this then you will get an error."
40649 #: ../src/guestfs.pod:3132
40651 "In order to transfer large files into and out of the guest filesystem, you "
40652 "need to use particular calls that support this. The sections L</UPLOADING> "
40653 "and L</DOWNLOADING> document how to do this."
40657 #: ../src/guestfs.pod:3136
40659 "You might also consider mounting the disk image using our FUSE filesystem "
40660 "support (L<guestmount(1)>)."
40664 #: ../src/guestfs.pod:3139
40665 msgid "MAXIMUM NUMBER OF DISKS"
40669 #: ../src/guestfs.pod:3141
40670 msgid "When using virtio disks (the default) the current limit is B<25> disks."
40674 #: ../src/guestfs.pod:3144
40676 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
40677 "slots. However febootstrap only understands disks with names C</dev/vda> "
40678 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
40683 #: ../src/guestfs.pod:3149
40685 "We are working to substantially raise this limit in future versions but it "
40686 "requires complex changes to qemu."
40690 #: ../src/guestfs.pod:3152
40692 "In future versions of libguestfs it should also be possible to \"hot plug\" "
40693 "disks (add and remove disks after calling L</guestfs_launch>). This also "
40694 "requires changes to qemu."
40698 #: ../src/guestfs.pod:3156
40699 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
40703 #: ../src/guestfs.pod:3158
40704 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
40708 #: ../src/guestfs.pod:3160
40710 "This is because it reserves 4 bits for the minor device number (thus "
40711 "C</dev/vda>, and C</dev/vda1> through C</dev/vda15>)."
40715 #: ../src/guestfs.pod:3163
40717 "If you attach a disk with more than 15 partitions, the extra partitions are "
40718 "ignored by libguestfs."
40722 #: ../src/guestfs.pod:3166
40723 msgid "MAXIMUM SIZE OF A DISK"
40727 #: ../src/guestfs.pod:3168
40728 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
40732 #: ../src/guestfs.pod:3170
40734 "We have tested block devices up to 1 exabyte (2**60 or "
40735 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
40740 #: ../src/guestfs.pod:3174
40742 "Although libguestfs probably does not impose any limit, the underlying host "
40743 "storage will. If you store disk images on a host ext4 filesystem, then the "
40744 "maximum size will be limited by the maximum ext4 file size (currently 16 "
40745 "TB). If you store disk images as host logical volumes then you are limited "
40746 "by the maximum size of an LV."
40750 #: ../src/guestfs.pod:3180
40752 "For the hugest disk image files, we recommend using XFS on the host for "
40757 #: ../src/guestfs.pod:3183
40758 msgid "MAXIMUM SIZE OF A PARTITION"
40762 #: ../src/guestfs.pod:3185
40764 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
40765 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
40766 "address a partition located beyond 2 TB on the disk."
40770 #: ../src/guestfs.pod:3189
40772 "It is recommended that you use GPT partitions on disks which are larger than "
40773 "this size. GPT uses 64 bit sector numbers and so can address partitions "
40774 "which are theoretically larger than the largest disk we could support."
40778 #: ../src/guestfs.pod:3194
40779 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
40783 #: ../src/guestfs.pod:3196
40785 "This depends on the filesystem type. libguestfs itself does not impose any "
40786 "known limit. Consult Wikipedia or the filesystem documentation to find out "
40787 "what these limits are."
40791 #: ../src/guestfs.pod:3200
40792 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
40796 #: ../src/guestfs.pod:3202
40798 "The API functions L</guestfs_upload>, L</guestfs_download>, "
40799 "L</guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
40800 "uploads and downloads."
40804 #: ../src/guestfs.pod:3206
40805 msgid "INSPECTION LIMITS"
40809 #: ../src/guestfs.pod:3208
40811 "The inspection code has several arbitrary limits on things like the size of "
40812 "Windows Registry hive it will read, and the length of product name. These "
40813 "are intended to stop a malicious guest from consuming arbitrary amounts of "
40814 "memory and disk space on the host, and should not be reached in practice. "
40815 "See the source code for more information."
40819 #: ../src/guestfs.pod:3234
40821 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
40822 "effect as calling C<guestfs_set_verbose (g, 1)>."
40826 #: ../src/guestfs.pod:3246
40828 "Set the path that libguestfs uses to search for a supermin appliance. See "
40829 "the discussion of paths in section L</PATH> above."
40833 #: ../src/guestfs.pod:3255
40834 msgid "See also L</QEMU WRAPPERS> above."
40838 #: ../src/guestfs.pod:3259
40840 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
40841 "effect as calling C<guestfs_set_trace (g, 1)>."
40845 #: ../src/guestfs.pod:3277
40847 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, "
40848 "L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
40849 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, "
40850 "L<virt-alignment-scan(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
40851 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
40852 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
40853 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
40854 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, "
40855 "L<virt-sysprep(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
40856 "L<virt-win-reg(1)>, L<guestfs-testing(1)>, L<qemu(1)>, L<febootstrap(1)>, "
40857 "L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)>, "
40858 "L<http://libguestfs.org/>."
40862 #: ../src/guestfs.pod:3314
40864 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
40865 "L<lvm(8)>, L<disktype(1)>."
40869 #: ../src/guestfs.pod:3321 ../tools/virt-make-fs.pl:571 ../tools/virt-win-reg.pl:772
40874 #: ../src/guestfs.pod:3323
40875 msgid "To get a list of bugs against libguestfs use this link:"
40879 #: ../src/guestfs.pod:3325
40880 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
40884 #: ../src/guestfs.pod:3327
40885 msgid "To report a new bug against libguestfs use this link:"
40889 #: ../src/guestfs.pod:3329
40890 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
40894 #: ../src/guestfs.pod:3331
40895 msgid "When reporting a bug, please check:"
40899 #: ../src/guestfs.pod:3337
40900 msgid "That the bug hasn't been reported already."
40904 #: ../src/guestfs.pod:3341
40905 msgid "That you are testing a recent version."
40909 #: ../src/guestfs.pod:3345
40910 msgid "Describe the bug accurately, and give a way to reproduce it."
40914 #: ../src/guestfs.pod:3349
40916 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
40921 #: ../test-tool/libguestfs-test-tool.pod:5
40922 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
40926 #: ../test-tool/libguestfs-test-tool.pod:9
40929 " libguestfs-test-tool [--options]\n"
40934 #: ../test-tool/libguestfs-test-tool.pod:13
40936 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
40937 "to check basic libguestfs functionality is working. This is needed because "
40938 "libguestfs occasionally breaks for reasons beyond our control: usually "
40939 "because of changes in the underlying qemu or kernel packages, or the host "
40944 #: ../test-tool/libguestfs-test-tool.pod:19
40945 msgid "If you suspect a problem in libguestfs, then just run:"
40949 #: ../test-tool/libguestfs-test-tool.pod:21
40952 " libguestfs-test-tool\n"
40957 #: ../test-tool/libguestfs-test-tool.pod:23
40958 msgid "It will print lots of diagnostic messages."
40962 #: ../test-tool/libguestfs-test-tool.pod:25
40963 msgid "If it runs to completion successfully, you will see this near the end:"
40967 #: ../test-tool/libguestfs-test-tool.pod:27
40970 " ===== TEST FINISHED OK =====\n"
40975 #: ../test-tool/libguestfs-test-tool.pod:29
40976 msgid "and the test tool will exit with code 0."
40980 #: ../test-tool/libguestfs-test-tool.pod:31
40982 "If it fails (and/or exits with non-zero error code), please paste the "
40983 "I<complete, unedited> output of the test tool into a bug report. More "
40984 "information about reporting bugs can be found on the "
40985 "L<http://libguestfs.org/> website."
40989 #: ../test-tool/libguestfs-test-tool.pod:42
40990 msgid "Display short usage information and exit."
40994 #: ../test-tool/libguestfs-test-tool.pod:44
40995 msgid "B<--qemu qemu_binary>"
40999 #: ../test-tool/libguestfs-test-tool.pod:46
41001 "If you have downloaded another qemu binary, point this option at the full "
41002 "path of the binary to try it."
41006 #: ../test-tool/libguestfs-test-tool.pod:49
41007 msgid "B<--qemudir qemu_source_dir>"
41011 #: ../test-tool/libguestfs-test-tool.pod:51
41013 "If you have compiled qemu from source, point this option at the source "
41014 "directory to try it."
41018 #: ../test-tool/libguestfs-test-tool.pod:54
41023 #: ../test-tool/libguestfs-test-tool.pod:56
41024 msgid "B<--timeout N>"
41028 #: ../test-tool/libguestfs-test-tool.pod:58
41030 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
41031 "minutes) which does not usually need to be adjusted."
41035 #: ../test-tool/libguestfs-test-tool.pod:63
41036 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
41040 #: ../test-tool/libguestfs-test-tool.pod:65
41042 "If you have compiled another version of qemu from source and would like to "
41043 "try that, then you can use the I<--qemudir> option to point to the qemu "
41044 "source directory."
41048 #: ../test-tool/libguestfs-test-tool.pod:69
41050 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
41051 "option to point to the binary."
41055 #: ../test-tool/libguestfs-test-tool.pod:72
41057 "Note when using these options, you can ignore the business of qemu wrapper "
41058 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
41059 "wrapper script for you if one is needed."
41063 #: ../test-tool/libguestfs-test-tool.pod:76
41064 msgid "TRYING OUT A DIFFERENT KERNEL"
41068 #: ../test-tool/libguestfs-test-tool.pod:78
41070 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
41071 "libguestfs tries. You do this by setting the environment variables "
41072 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
41076 #: ../test-tool/libguestfs-test-tool.pod:82
41078 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
41083 #: ../test-tool/libguestfs-test-tool.pod:85
41084 msgid "SELF-DIAGNOSIS"
41088 #: ../test-tool/libguestfs-test-tool.pod:87
41090 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
41091 "produced by libguestfs-test-tool and/or possible errors."
41095 #: ../test-tool/libguestfs-test-tool.pod:92
41097 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
41098 "I<1> if there was an error."
41102 #: ../test-tool/libguestfs-test-tool.pod:97
41104 "For the full list of environment variables which may affect libguestfs, "
41105 "please see the L<guestfs(3)> manual page."
41109 #: ../test-tool/libguestfs-test-tool.pod:102
41110 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
41114 #: ../tools/virt-list-filesystems.pl:32
41115 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
41119 #: ../tools/virt-list-filesystems.pl:36
41122 " virt-list-filesystems [--options] domname\n"
41127 #: ../tools/virt-list-filesystems.pl:38
41130 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
41135 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
41137 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
41142 #: ../tools/virt-list-filesystems.pl:45
41144 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
41145 "are contained in a virtual machine or disk image."
41149 #: ../tools/virt-list-filesystems.pl:49
41151 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
41152 "functionality. For more complex cases you should look at the "
41153 "L<guestfish(1)> tool."
41157 #: ../tools/virt-list-filesystems.pl:112
41159 "With this option, C<virt-list-filesystems> displays the type of each "
41160 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
41164 #: ../tools/virt-list-filesystems.pl:119
41169 #: ../tools/virt-list-filesystems.pl:123
41171 "Normally we only show mountable filesystems. If this option is given then "
41172 "swap devices are shown too."
41176 #: ../tools/virt-list-filesystems.pl:197
41178 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
41179 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
41180 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41184 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
41185 msgid "Copyright (C) 2009 Red Hat Inc."
41189 #: ../tools/virt-list-partitions.pl:32
41190 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
41194 #: ../tools/virt-list-partitions.pl:36
41197 " virt-list-partitions [--options] domname\n"
41202 #: ../tools/virt-list-partitions.pl:38
41205 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
41210 #: ../tools/virt-list-partitions.pl:45
41212 "C<virt-list-partitions> is a command line tool to list the partitions that "
41213 "are contained in a virtual machine or disk image. It is mainly useful as a "
41214 "first step to using L<virt-resize(1)>."
41218 #: ../tools/virt-list-partitions.pl:50
41220 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
41221 "functionality. For more complex cases you should look at the "
41222 "L<guestfish(1)> tool."
41226 #: ../tools/virt-list-partitions.pl:113
41227 msgid "Show sizes in human-readable form (eg. \"1G\")."
41231 #: ../tools/virt-list-partitions.pl:123
41233 "With this option, C<virt-list-partitions> displays the type and size of each "
41234 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
41238 #: ../tools/virt-list-partitions.pl:130
41243 #: ../tools/virt-list-partitions.pl:132
41248 #: ../tools/virt-list-partitions.pl:134
41249 msgid "Display the total size of each block device (as a separate row or rows)."
41253 #: ../tools/virt-list-partitions.pl:267
41255 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
41256 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
41257 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41261 #: ../tools/virt-list-partitions.pl:283
41262 msgid "Copyright (C) 2009-2010 Red Hat Inc."
41266 #: ../tools/virt-make-fs.pl:37
41267 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
41271 #: ../tools/virt-make-fs.pl:41
41274 " virt-make-fs [--options] input.tar output.img\n"
41279 #: ../tools/virt-make-fs.pl:43
41282 " virt-make-fs [--options] input.tar.gz output.img\n"
41287 #: ../tools/virt-make-fs.pl:45
41290 " virt-make-fs [--options] directory output.img\n"
41295 #: ../tools/virt-make-fs.pl:49
41297 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
41298 "archive or some files in a directory. It is similar to tools like "
41299 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
41300 "it can create common filesystem types like ext2/3 or NTFS, which can be "
41301 "useful if you want to attach these filesystems to existing virtual machines "
41302 "(eg. to import large amounts of read-only data to a VM)."
41306 #: ../tools/virt-make-fs.pl:57
41307 msgid "Basic usage is:"
41311 #: ../tools/virt-make-fs.pl:59
41314 " virt-make-fs input output.img\n"
41319 #: ../tools/virt-make-fs.pl:61
41321 "where C<input> is either a directory containing files that you want to add, "
41322 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
41323 "C<output.img> is a disk image. The input type is detected automatically. "
41324 "The output disk image defaults to a raw ext2 sparse image unless you specify "
41325 "extra flags (see L</OPTIONS> below)."
41329 #: ../tools/virt-make-fs.pl:67
41330 msgid "FILESYSTEM TYPE"
41334 #: ../tools/virt-make-fs.pl:69
41336 "The default filesystem type is C<ext2>. Just about any filesystem type that "
41337 "libguestfs supports can be used (but I<not> read-only formats like "
41338 "ISO9660). Here are some of the more common choices:"
41342 #: ../tools/virt-make-fs.pl:75
41347 #: ../tools/virt-make-fs.pl:77
41349 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
41350 "you are not going to use the filesystem in a way that requires the journal, "
41351 "then this is just wasted overhead."
41355 #: ../tools/virt-make-fs.pl:81
41356 msgid "I<ntfs> or I<vfat>"
41360 #: ../tools/virt-make-fs.pl:83
41361 msgid "Useful if exporting data to a Windows guest."
41365 #: ../tools/virt-make-fs.pl:85
41367 "I<Note for vfat>: The tar archive or local directory must only contain files "
41368 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
41369 "program running within libguestfs is unable to change the ownership of "
41370 "non-root files, since vfat itself does not support this."
41374 #: ../tools/virt-make-fs.pl:90
41379 #: ../tools/virt-make-fs.pl:92
41381 "Lower overhead than C<ext2>, but certain limitations on filename length and "
41382 "total filesystem size."
41386 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116 ../tools/virt-make-fs.pl:149
41391 #: ../tools/virt-make-fs.pl:99
41394 " virt-make-fs --type=minix input minixfs.img\n"
41399 #: ../tools/virt-make-fs.pl:101
41400 msgid "TO PARTITION OR NOT TO PARTITION"
41404 #: ../tools/virt-make-fs.pl:103
41405 msgid "Optionally virt-make-fs can add a partition table to the output disk."
41409 #: ../tools/virt-make-fs.pl:105
41411 "Adding a partition can make the disk image more compatible with certain "
41412 "virtualized operating systems which don't expect to see a filesystem "
41413 "directly located on a block device (Linux doesn't care and will happily "
41414 "handle both types)."
41418 #: ../tools/virt-make-fs.pl:110
41420 "On the other hand, if you have a partition table then the output image is no "
41421 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
41422 "directly on a partitioned disk image. (However libguestfs tools such as "
41423 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
41427 #: ../tools/virt-make-fs.pl:118
41428 msgid "Add an MBR partition:"
41432 #: ../tools/virt-make-fs.pl:120
41435 " virt-make-fs --partition -- input disk.img\n"
41440 #: ../tools/virt-make-fs.pl:122
41442 "If the output disk image could be terabyte-sized or larger, it's better to "
41443 "use an EFI/GPT-compatible partition table:"
41447 #: ../tools/virt-make-fs.pl:125
41450 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
41455 #: ../tools/virt-make-fs.pl:127
41456 msgid "EXTRA SPACE"
41460 #: ../tools/virt-make-fs.pl:129
41462 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
41463 "the files that it contains, but might have extra space. Depending on how "
41464 "you are going to use the output, you might think this extra space is wasted "
41465 "and want to minimize it, or you might want to leave space so that more files "
41466 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
41467 "but you can use the I<--size> flag to leave space in the filesystem if you "
41472 #: ../tools/virt-make-fs.pl:137
41474 "An alternative way to leave extra space but not make the output image any "
41475 "bigger is to use an alternative disk image format (instead of the default "
41476 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
41477 "image format (check your hypervisor supports this before using it). This "
41478 "allows you to choose a large I<--size> but the extra space won't actually be "
41479 "allocated in the image until you try to store something in it."
41483 #: ../tools/virt-make-fs.pl:145
41485 "Don't forget that you can also use local commands including L<resize2fs(8)> "
41486 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
41487 "to build another image from scratch."
41491 #: ../tools/virt-make-fs.pl:151
41494 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
41499 #: ../tools/virt-make-fs.pl:179
41500 msgid "Enable debugging information."
41504 #: ../tools/virt-make-fs.pl:185
41505 msgid "B<--size=E<lt>NE<gt>>"
41509 #: ../tools/virt-make-fs.pl:187
41510 msgid "B<--size=+E<lt>NE<gt>>"
41514 #: ../tools/virt-make-fs.pl:189
41515 msgid "B<-s E<lt>NE<gt>>"
41519 #: ../tools/virt-make-fs.pl:191
41520 msgid "B<-s +E<lt>NE<gt>>"
41524 #: ../tools/virt-make-fs.pl:193
41525 msgid "Use the I<--size> (or I<-s>) option to choose the size of the output image."
41529 #: ../tools/virt-make-fs.pl:196
41531 "If this option is I<not> given, then the output image will be just large "
41532 "enough to contain all the files, with not much wasted space."
41536 #: ../tools/virt-make-fs.pl:199
41538 "To choose a fixed size output disk, specify an absolute number followed by "
41539 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41540 "Petabytes or Exabytes. This must be large enough to contain all the input "
41541 "files, else you will get an error."
41545 #: ../tools/virt-make-fs.pl:204
41547 "To leave extra space, specify C<+> (plus sign) and a number followed by "
41548 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
41549 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
41550 "the input files, and (approximately) an extra 200 MB free space."
41554 #: ../tools/virt-make-fs.pl:210
41556 "Note that virt-make-fs estimates free space, and therefore will not produce "
41557 "filesystems containing precisely the free space requested. (It is much more "
41558 "expensive and time-consuming to produce a filesystem which has precisely the "
41559 "desired free space)."
41563 #: ../tools/virt-make-fs.pl:219
41564 msgid "B<--format=E<lt>fmtE<gt>>"
41568 #: ../tools/virt-make-fs.pl:221
41569 msgid "B<-F E<lt>fmtE<gt>>"
41573 #: ../tools/virt-make-fs.pl:223
41574 msgid "Choose the output disk image format."
41578 #: ../tools/virt-make-fs.pl:225
41579 msgid "The default is C<raw> (raw sparse disk image)."
41583 #: ../tools/virt-make-fs.pl:227
41585 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
41586 "that would really make sense here is C<qcow2>."
41590 #: ../tools/virt-make-fs.pl:234
41591 msgid "B<--type=E<lt>fsE<gt>>"
41595 #: ../tools/virt-make-fs.pl:236
41596 msgid "B<-t E<lt>fsE<gt>>"
41600 #: ../tools/virt-make-fs.pl:238
41601 msgid "Choose the output filesystem type."
41605 #: ../tools/virt-make-fs.pl:240
41606 msgid "The default is C<ext2>."
41610 #: ../tools/virt-make-fs.pl:242
41611 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
41615 #: ../tools/virt-make-fs.pl:249
41616 msgid "B<--partition>"
41620 #: ../tools/virt-make-fs.pl:251
41621 msgid "B<--partition=E<lt>parttypeE<gt>>"
41625 #: ../tools/virt-make-fs.pl:253
41627 "If specified, this flag adds an MBR partition table to the output disk "
41632 #: ../tools/virt-make-fs.pl:256
41634 "You can change the partition table type, eg. I<--partition=gpt> for large "
41639 #: ../tools/virt-make-fs.pl:259
41641 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
41642 "might consider the next parameter to be the partition type. For example:"
41646 #: ../tools/virt-make-fs.pl:263
41649 " virt-make-fs --partition input.tar output.img\n"
41654 #: ../tools/virt-make-fs.pl:265
41656 "would cause virt-make-fs to think you wanted to use a partition type of "
41657 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
41658 "dash) between options and the input and output arguments:"
41662 #: ../tools/virt-make-fs.pl:269
41665 " virt-make-fs --partition -- input.tar output.img\n"
41670 #: ../tools/virt-make-fs.pl:271
41671 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
41675 #: ../tools/virt-make-fs.pl:559
41677 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
41678 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
41679 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
41683 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
41685 "When reporting bugs, please enable debugging and capture the I<complete> "
41690 #: ../tools/virt-make-fs.pl:576
41693 " export LIBGUESTFS_DEBUG=1\n"
41694 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
41699 #: ../tools/virt-make-fs.pl:579
41701 "Attach /tmp/virt-make-fs.log to a new bug report at "
41702 "L<https://bugzilla.redhat.com/>"
41706 #: ../tools/virt-tar.pl:33
41707 msgid "virt-tar - Extract or upload files to a virtual machine"
41711 #: ../tools/virt-tar.pl:37
41714 " virt-tar [--options] -x domname directory tarball\n"
41719 #: ../tools/virt-tar.pl:39
41722 " virt-tar [--options] -u domname tarball directory\n"
41727 #: ../tools/virt-tar.pl:41
41730 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
41735 #: ../tools/virt-tar.pl:43
41738 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
41743 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
41748 #: ../tools/virt-tar.pl:47
41750 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
41751 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
41755 #: ../tools/virt-tar.pl:52
41756 msgid "Download C</home> from the VM into a local tarball:"
41760 #: ../tools/virt-tar.pl:54
41763 " virt-tar -x domname /home home.tar\n"
41768 #: ../tools/virt-tar.pl:56
41771 " virt-tar -zx domname /home home.tar.gz\n"
41776 #: ../tools/virt-tar.pl:58
41777 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
41781 #: ../tools/virt-tar.pl:60
41784 " virt-tar -u domname uploadstuff.tar /tmp\n"
41789 #: ../tools/virt-tar.pl:62
41792 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
41797 #: ../tools/virt-tar.pl:66
41799 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
41800 "virtual machines. If you do this, you risk disk corruption in the VM. "
41801 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
41805 #: ../tools/virt-tar.pl:71
41807 "You can use I<-x> (extract) on live virtual machines, but you might get "
41808 "inconsistent results or errors if there is filesystem activity inside the "
41809 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
41810 "work, but the only way to guarantee consistent results is if the virtual "
41811 "machine is shut down."
41815 #: ../tools/virt-tar.pl:79
41817 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
41818 "parts of a guest filesystem. There are many possibilities: making backups, "
41819 "uploading data files, snooping on guest activity, fixing or customizing "
41824 #: ../tools/virt-tar.pl:84
41826 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
41827 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
41828 "should look at the L<guestfish(1)> tool."
41832 #: ../tools/virt-tar.pl:88
41834 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
41835 "its contents (recursively) from the virtual machine into a local tarball. "
41836 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
41837 "virtual machine. You cannot use these two options together."
41841 #: ../tools/virt-tar.pl:94
41843 "In addition, you may need to use the I<-z> (gZip) option to enable "
41844 "compression. When uploading, you have to specify I<-z> if the upload file "
41845 "is compressed because virt-tar won't detect this on its own."
41849 #: ../tools/virt-tar.pl:98
41851 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
41852 "example it cannot do PKZip files or bzip2 compression. If you want that "
41853 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
41854 "the L<libguestfs(3)> API)."
41858 #: ../tools/virt-tar.pl:160
41859 msgid "B<--extract>"
41863 #: ../tools/virt-tar.pl:162
41864 msgid "B<--download>"
41868 #: ../tools/virt-tar.pl:164
41873 #: ../tools/virt-tar.pl:166
41874 msgid "B<--upload>"
41878 #: ../tools/virt-tar.pl:168
41880 "Use I<-x> to extract (download) a directory from a virtual machine to a "
41885 #: ../tools/virt-tar.pl:171
41887 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
41888 "Please read the L</WARNING> section above before using this option."
41892 #: ../tools/virt-tar.pl:175
41893 msgid "You must specify exactly one of these options."
41897 #: ../tools/virt-tar.pl:181
41902 #: ../tools/virt-tar.pl:183
41907 #: ../tools/virt-tar.pl:185
41908 msgid "Specify that the input or output tarball is gzip-compressed."
41912 #: ../tools/virt-tar.pl:298
41914 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
41915 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
41916 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
41917 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41921 #: ../tools/virt-win-reg.pl:37
41923 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
41928 #: ../tools/virt-win-reg.pl:41
41931 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
41936 #: ../tools/virt-win-reg.pl:43
41939 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
41944 #: ../tools/virt-win-reg.pl:45
41947 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
41952 #: ../tools/virt-win-reg.pl:47
41955 " virt-win-reg --merge domname [input.reg ...]\n"
41960 #: ../tools/virt-win-reg.pl:49
41963 " virt-win-reg [--options] disk.img ... # instead of domname\n"
41968 #: ../tools/virt-win-reg.pl:53
41970 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
41971 "virtual machines. If you do this, you I<will> get irreversible disk "
41972 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
41973 "but doesn't catch all cases."
41977 #: ../tools/virt-win-reg.pl:58
41979 "Modifying the Windows Registry is an inherently risky operation. The format "
41980 "is deliberately obscure and undocumented, and Registry changes can leave the "
41981 "system unbootable. Therefore when using the I<--merge> option, make sure "
41982 "you have a reliable backup first."
41986 #: ../tools/virt-win-reg.pl:65
41988 "This program can export and merge Windows Registry entries from a Windows "
41993 #: ../tools/virt-win-reg.pl:68
41995 "The first parameter is the libvirt guest name or the raw disk image of a "
42000 #: ../tools/virt-win-reg.pl:71
42002 "If I<--merge> is I<not> specified, then the chosen registry key is "
42003 "displayed/exported (recursively). For example:"
42007 #: ../tools/virt-win-reg.pl:74
42010 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
42015 #: ../tools/virt-win-reg.pl:76
42016 msgid "You can also display single values from within registry keys, for example:"
42020 #: ../tools/virt-win-reg.pl:79
42023 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
42024 " $ virt-win-reg Windows7 $cvkey ProductName\n"
42025 " Windows 7 Enterprise\n"
42030 #: ../tools/virt-win-reg.pl:83
42032 "With I<--merge>, you can merge a textual regedit file into the Windows "
42037 #: ../tools/virt-win-reg.pl:86
42040 " $ virt-win-reg --merge Windows7 changes.reg\n"
42045 #: ../tools/virt-win-reg.pl:90
42047 "This program is only meant for simple access to the registry. If you want "
42048 "to do complicated things with the registry, we suggest you download the "
42049 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
42050 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
42051 "L<hivexregedit(1)>."
42055 #: ../tools/virt-win-reg.pl:159
42060 #: ../tools/virt-win-reg.pl:161
42062 "In merge mode, this merges a textual regedit file into the Windows Registry "
42063 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
42064 "displays or exports Registry entries instead."
42068 #: ../tools/virt-win-reg.pl:165
42070 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
42071 "result in disk corruption. However exporting (without this flag) is always "
42076 #: ../tools/virt-win-reg.pl:173
42077 msgid "B<--encoding> UTF-16LE|ASCII"
42081 #: ../tools/virt-win-reg.pl:175
42083 "When merging (only), you may need to specify the encoding for strings to be "
42084 "used in the hive file. This is explained in detail in "
42085 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
42089 #: ../tools/virt-win-reg.pl:179
42091 "The default is to use UTF-16LE, which should work with recent versions of "
42096 #: ../tools/virt-win-reg.pl:186
42097 msgid "B<--unsafe-printable-strings>"
42101 #: ../tools/virt-win-reg.pl:188
42103 "When exporting (only), assume strings are UTF-16LE and print them as strings "
42104 "instead of hex sequences. Remove the final zero codepoint from strings if "
42109 #: ../tools/virt-win-reg.pl:192
42111 "This is unsafe and does not preserve the fidelity of strings in the original "
42112 "Registry for various reasons:"
42116 #: ../tools/virt-win-reg.pl:199
42118 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
42119 "other encodings will be corrupted by this transformation."
42123 #: ../tools/virt-win-reg.pl:204
42125 "Assumes that everything which has type 1 or 2 is really a string and that "
42126 "everything else is not a string, but the type field in real Registries is "
42131 #: ../tools/virt-win-reg.pl:210
42133 "Loses information about whether a zero codepoint followed the string in the "
42138 #: ../tools/virt-win-reg.pl:215
42140 "This all happens because the Registry itself contains no information about "
42141 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
42145 #: ../tools/virt-win-reg.pl:219
42147 "You should only use this option for quick hacking and debugging of the "
42148 "Registry contents, and I<never> use it if the output is going to be passed "
42149 "into another program or stored in another Registry."
42153 #: ../tools/virt-win-reg.pl:556
42154 msgid "SUPPORTED SYSTEMS"
42158 #: ../tools/virt-win-reg.pl:558
42160 "The program currently supports Windows NT-derived guests starting with "
42161 "Windows XP through to at least Windows 7."
42165 #: ../tools/virt-win-reg.pl:561
42166 msgid "The following Registry keys are supported:"
42170 #: ../tools/virt-win-reg.pl:565
42171 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
42175 #: ../tools/virt-win-reg.pl:567
42176 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
42180 #: ../tools/virt-win-reg.pl:569
42181 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
42185 #: ../tools/virt-win-reg.pl:571
42186 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
42190 #: ../tools/virt-win-reg.pl:573
42191 msgid "C<HKEY_USERS\\.DEFAULT>"
42195 #: ../tools/virt-win-reg.pl:575
42196 msgid "C<HKEY_USERS\\I<SID>>"
42200 #: ../tools/virt-win-reg.pl:577
42201 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
42205 #: ../tools/virt-win-reg.pl:579
42206 msgid "C<HKEY_USERS\\I<username>>"
42210 #: ../tools/virt-win-reg.pl:581
42211 msgid "where I<username> is a local user name (this is a libguestfs extension)."
42215 #: ../tools/virt-win-reg.pl:585
42217 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
42222 #: ../tools/virt-win-reg.pl:588
42224 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
42225 "supported (there is no \"current user\")."
42229 #: ../tools/virt-win-reg.pl:591
42234 #: ../tools/virt-win-reg.pl:593
42236 "C<virt-win-reg> expects that regedit files have already been reencoded in "
42237 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
42238 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
42239 "with Windows-style line endings, you may need to reencode the whole file "
42240 "before or after processing."
42244 #: ../tools/virt-win-reg.pl:599
42246 "To reencode a file from Windows format to Linux (before processing it with "
42247 "the I<--merge> option), you would do something like this:"
42251 #: ../tools/virt-win-reg.pl:602
42254 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
42259 #: ../tools/virt-win-reg.pl:604
42261 "To go in the opposite direction, after exporting and before sending the file "
42262 "to a Windows user, do something like this:"
42266 #: ../tools/virt-win-reg.pl:607
42269 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
42274 #: ../tools/virt-win-reg.pl:609
42275 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
42279 #: ../tools/virt-win-reg.pl:611
42281 "If you are unsure about the current encoding, use the L<file(1)> command. "
42282 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
42283 "Windows-style (CRLF) line endings, like this:"
42287 #: ../tools/virt-win-reg.pl:615
42290 " $ file software.reg\n"
42291 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
42292 " with CRLF line terminators\n"
42297 #: ../tools/virt-win-reg.pl:619
42298 msgid "This file would need conversion before you could I<--merge> it."
42302 #: ../tools/virt-win-reg.pl:621
42303 msgid "CurrentControlSet etc."
42307 #: ../tools/virt-win-reg.pl:623
42309 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
42310 "Registry at the level of the hive file, and therefore you cannot modify "
42315 #: ../tools/virt-win-reg.pl:627
42317 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
42318 "circumstances it might refer to another control set. The way to find out is "
42319 "to look at the C<HKLM\\SYSTEM\\Select> key:"
42323 #: ../tools/virt-win-reg.pl:631
42326 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
42327 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
42328 " \"Current\"=dword:00000001\n"
42329 " \"Default\"=dword:00000001\n"
42330 " \"Failed\"=dword:00000000\n"
42331 " \"LastKnownGood\"=dword:00000002\n"
42336 #: ../tools/virt-win-reg.pl:638
42337 msgid "\"Current\" is the one which Windows will choose when it boots."
42341 #: ../tools/virt-win-reg.pl:640
42342 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
42346 #: ../tools/virt-win-reg.pl:643
42347 msgid "DELETING REGISTRY KEYS AND VALUES"
42351 #: ../tools/virt-win-reg.pl:645
42352 msgid "To delete a whole registry key, use the syntax:"
42356 #: ../tools/virt-win-reg.pl:647
42359 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
42364 #: ../tools/virt-win-reg.pl:649
42365 msgid "To delete a single value within a key, use the syntax:"
42369 #: ../tools/virt-win-reg.pl:651
42372 " [HKEY_LOCAL_MACHINE\\Foo]\n"
42378 #: ../tools/virt-win-reg.pl:654
42379 msgid "WINDOWS TIPS"
42383 #: ../tools/virt-win-reg.pl:656
42385 "Note that some of these tips modify the guest disk image. The guest I<must> "
42386 "be shut off, else you will get disk corruption."
42390 #: ../tools/virt-win-reg.pl:659
42391 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
42395 #: ../tools/virt-win-reg.pl:661
42397 "Prepare a DOS batch script, VBScript or executable. Upload this using "
42398 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
42399 "is uploaded into C<C:\\>:"
42403 #: ../tools/virt-win-reg.pl:665
42406 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
42411 #: ../tools/virt-win-reg.pl:667
42412 msgid "Prepare a regedit file containing the registry change:"
42416 #: ../tools/virt-win-reg.pl:669
42419 " cat > test.reg <<'EOF'\n"
42420 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
42421 " \"Test\"=\"c:\\\\test.bat\"\n"
42427 #: ../tools/virt-win-reg.pl:674
42429 "In this example we use the key C<RunOnce> which means that the script will "
42430 "run precisely once when the first user logs in. If you want it to run every "
42431 "time a user logs in, replace C<RunOnce> with C<Run>."
42435 #: ../tools/virt-win-reg.pl:678
42436 msgid "Now update the registry:"
42440 #: ../tools/virt-win-reg.pl:680
42443 " virt-win-reg --merge WindowsGuest test.reg\n"
42448 #: ../tools/virt-win-reg.pl:682
42449 msgid "INSTALLING A SERVICE"
42453 #: ../tools/virt-win-reg.pl:684
42455 "This section assumes you are familiar with Windows services, and you either "
42456 "have a program which handles the Windows Service Control Protocol directly "
42457 "or you want to run any program using a service wrapper like SrvAny or the "
42462 #: ../tools/virt-win-reg.pl:689
42464 "First upload the program and optionally the service wrapper. In this case "
42465 "the test program is called C<test.exe> and we are using the RHSrvAny "
42470 #: ../tools/virt-win-reg.pl:693
42473 " guestfish -i -d WindowsGuest <<EOF\n"
42474 " upload rhsrvany.exe /rhsrvany.exe\n"
42475 " upload test.exe /test.exe\n"
42481 #: ../tools/virt-win-reg.pl:698
42483 "Prepare a regedit file containing the registry changes. In this example, "
42484 "the first registry change is needed for the service itself or the service "
42485 "wrapper (if used). The second registry change is only needed because I am "
42486 "using the RHSrvAny service wrapper."
42490 #: ../tools/virt-win-reg.pl:703
42493 " cat > service.reg <<'EOF'\n"
42494 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
42495 " \"Type\"=dword:00000010\n"
42496 " \"Start\"=dword:00000002\n"
42497 " \"ErrorControl\"=dword:00000001\n"
42498 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
42499 " \"DisplayName\"=\"RHSrvAny\"\n"
42500 " \"ObjectName\"=\"NetworkService\"\n"
42505 #: ../tools/virt-win-reg.pl:712
42508 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
42509 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
42510 " \"PWD\"=\"c:\\\\Temp\"\n"
42516 #: ../tools/virt-win-reg.pl:723
42518 "For use of C<ControlSet001> see the section above in this manual page. You "
42519 "may need to adjust this according to the control set that is in use by the "
42524 #: ../tools/virt-win-reg.pl:729
42526 "C<\"ObjectName\"> controls the privileges that the service will have. An "
42527 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
42528 "privileged account."
42532 #: ../tools/virt-win-reg.pl:735
42534 "For the meaning of the magic numbers, see this Microsoft KB article: "
42535 "L<http://support.microsoft.com/kb/103000>."
42539 #: ../tools/virt-win-reg.pl:740
42540 msgid "Update the registry:"
42544 #: ../tools/virt-win-reg.pl:742
42547 " virt-win-reg --merge WindowsGuest service.reg\n"
42552 #: ../tools/virt-win-reg.pl:746
42554 "Be careful when passing parameters containing C<\\> (backslash) in the "
42555 "shell. Usually you will have to use 'single quotes' or double backslashes "
42556 "(but not both) to protect them from the shell."
42560 #: ../tools/virt-win-reg.pl:750
42561 msgid "Paths and value names are case-insensitive."
42565 #: ../tools/virt-win-reg.pl:759
42567 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
42568 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
42569 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
42570 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42574 #: ../tools/virt-win-reg.pl:777
42577 " export LIBGUESTFS_DEBUG=1\n"
42578 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
42583 #: ../tools/virt-win-reg.pl:780
42585 "Attach /tmp/virt-win-reg.log to a new bug report at "
42586 "L<https://bugzilla.redhat.com/>"